quasar 2.9.2 → 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 (337) 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/QBreadcrumbsEl.json +0 -14
  12. package/dist/api/QBtn.json +0 -3
  13. package/dist/api/QBtnDropdown.json +32 -8
  14. package/dist/api/QCarousel.json +0 -10
  15. package/dist/api/QCarouselControl.json +0 -3
  16. package/dist/api/QCircularProgress.json +0 -23
  17. package/dist/api/QColor.json +0 -3
  18. package/dist/api/QDialog.json +18 -9
  19. package/dist/api/QDrawer.json +0 -6
  20. package/dist/api/QExpansionItem.json +0 -3
  21. package/dist/api/QFab.json +1 -6
  22. package/dist/api/QFabAction.json +1 -3
  23. package/dist/api/QField.json +1 -6
  24. package/dist/api/QFile.json +12 -29
  25. package/dist/api/QFooter.json +0 -3
  26. package/dist/api/QHeader.json +0 -6
  27. package/dist/api/QInfiniteScroll.json +9 -16
  28. package/dist/api/QInnerLoading.json +0 -4
  29. package/dist/api/QInput.json +8 -15
  30. package/dist/api/QIntersection.json +0 -4
  31. package/dist/api/QItemLabel.json +0 -5
  32. package/dist/api/QKnob.json +3 -36
  33. package/dist/api/QLayout.json +6 -24
  34. package/dist/api/QLinearProgress.json +0 -6
  35. package/dist/api/QList.json +15 -0
  36. package/dist/api/QMenu.json +7 -12
  37. package/dist/api/QOptionGroup.json +0 -3
  38. package/dist/api/QPage.json +2 -8
  39. package/dist/api/QPageScroller.json +0 -9
  40. package/dist/api/QPageSticky.json +0 -3
  41. package/dist/api/QPagination.json +138 -127
  42. package/dist/api/QParallax.json +2 -14
  43. package/dist/api/QPopupEdit.json +0 -8
  44. package/dist/api/QPopupProxy.json +0 -4
  45. package/dist/api/QRange.json +5 -32
  46. package/dist/api/QRating.json +0 -4
  47. package/dist/api/QResizeObserver.json +2 -8
  48. package/dist/api/QScrollArea.json +8 -36
  49. package/dist/api/QScrollObserver.json +6 -24
  50. package/dist/api/QSelect.json +18 -108
  51. package/dist/api/QSlideItem.json +1 -6
  52. package/dist/api/QSlideTransition.json +0 -4
  53. package/dist/api/QSlider.json +3 -24
  54. package/dist/api/QSpinner.json +0 -4
  55. package/dist/api/QSplitter.json +1 -4
  56. package/dist/api/QStepper.json +0 -7
  57. package/dist/api/QTabPanels.json +0 -7
  58. package/dist/api/QTable.json +43 -191
  59. package/dist/api/QTabs.json +1 -7
  60. package/dist/api/QTime.json +3 -12
  61. package/dist/api/QTooltip.json +7 -18
  62. package/dist/api/QTree.json +0 -3
  63. package/dist/api/QUploader.json +5 -16
  64. package/dist/api/QVirtualScroll.json +11 -56
  65. package/dist/api/Screen.json +9 -36
  66. package/dist/api/Scroll.json +2 -8
  67. package/dist/api/SessionStorage.json +4 -16
  68. package/dist/api/TouchHold.json +3 -12
  69. package/dist/api/TouchPan.json +7 -28
  70. package/dist/api/TouchRepeat.json +6 -24
  71. package/dist/api/TouchSwipe.json +3 -12
  72. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  73. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  74. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  75. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  76. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  77. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  78. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  79. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  80. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  81. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  82. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  83. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  84. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  85. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  86. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  87. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  88. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  89. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  90. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  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-themify.umd.prod.js +1 -1
  108. package/dist/icon-set/themify.umd.prod.js +1 -1
  109. package/dist/lang/ar-TN.umd.prod.js +1 -1
  110. package/dist/lang/ar.umd.prod.js +1 -1
  111. package/dist/lang/az-Latn.umd.prod.js +1 -1
  112. package/dist/lang/bg.umd.prod.js +1 -1
  113. package/dist/lang/bn.umd.prod.js +1 -1
  114. package/dist/lang/ca.umd.prod.js +1 -1
  115. package/dist/lang/cs.umd.prod.js +1 -1
  116. package/dist/lang/da.umd.prod.js +1 -1
  117. package/dist/lang/de.umd.prod.js +1 -1
  118. package/dist/lang/el.umd.prod.js +1 -1
  119. package/dist/lang/en-GB.umd.prod.js +1 -1
  120. package/dist/lang/en-US.umd.prod.js +1 -1
  121. package/dist/lang/eo.umd.prod.js +1 -1
  122. package/dist/lang/es.umd.prod.js +1 -1
  123. package/dist/lang/et.umd.prod.js +1 -1
  124. package/dist/lang/eu.umd.prod.js +1 -1
  125. package/dist/lang/fa-IR.umd.prod.js +1 -1
  126. package/dist/lang/fa.umd.prod.js +1 -1
  127. package/dist/lang/fi.umd.prod.js +1 -1
  128. package/dist/lang/fr.umd.prod.js +1 -1
  129. package/dist/lang/gn.umd.prod.js +1 -1
  130. package/dist/lang/he.umd.prod.js +1 -1
  131. package/dist/lang/hr.umd.prod.js +1 -1
  132. package/dist/lang/hu.umd.prod.js +1 -1
  133. package/dist/lang/id.umd.prod.js +1 -1
  134. package/dist/lang/is.umd.prod.js +1 -1
  135. package/dist/lang/it.umd.prod.js +1 -1
  136. package/dist/lang/ja.umd.prod.js +1 -1
  137. package/dist/lang/km.umd.prod.js +1 -1
  138. package/dist/lang/ko-KR.umd.prod.js +1 -1
  139. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  140. package/dist/lang/kz.umd.prod.js +1 -1
  141. package/dist/lang/lt.umd.prod.js +1 -1
  142. package/dist/lang/lu.umd.prod.js +1 -1
  143. package/dist/lang/lv.umd.prod.js +1 -1
  144. package/dist/lang/ml.umd.prod.js +1 -1
  145. package/dist/lang/mm.umd.prod.js +1 -1
  146. package/dist/lang/ms.umd.prod.js +1 -1
  147. package/dist/lang/my.umd.prod.js +1 -1
  148. package/dist/lang/nb-NO.umd.prod.js +1 -1
  149. package/dist/lang/nl.umd.prod.js +1 -1
  150. package/dist/lang/pl.umd.prod.js +1 -1
  151. package/dist/lang/pt-BR.umd.prod.js +1 -1
  152. package/dist/lang/pt.umd.prod.js +1 -1
  153. package/dist/lang/ro.umd.prod.js +1 -1
  154. package/dist/lang/ru.umd.prod.js +1 -1
  155. package/dist/lang/sk.umd.prod.js +1 -1
  156. package/dist/lang/sl.umd.prod.js +1 -1
  157. package/dist/lang/sm.umd.prod.js +1 -1
  158. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  159. package/dist/lang/sr.umd.prod.js +1 -1
  160. package/dist/lang/sv.umd.prod.js +1 -1
  161. package/dist/lang/ta.umd.prod.js +1 -1
  162. package/dist/lang/th.umd.prod.js +1 -1
  163. package/dist/lang/tr.umd.prod.js +1 -1
  164. package/dist/lang/ug.umd.prod.js +1 -1
  165. package/dist/lang/uk.umd.prod.js +1 -1
  166. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  167. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  168. package/dist/lang/vi.umd.prod.js +1 -1
  169. package/dist/lang/zh-CN.umd.prod.js +1 -1
  170. package/dist/lang/zh-TW.umd.prod.js +1 -1
  171. package/dist/quasar.cjs.prod.js +2 -2
  172. package/dist/quasar.css +12 -2
  173. package/dist/quasar.esm.js +603 -445
  174. package/dist/quasar.esm.prod.js +2 -2
  175. package/dist/quasar.prod.css +1 -1
  176. package/dist/quasar.rtl.css +28 -2
  177. package/dist/quasar.rtl.prod.css +1 -1
  178. package/dist/quasar.sass +13 -3
  179. package/dist/quasar.umd.js +603 -445
  180. package/dist/quasar.umd.prod.js +2 -2
  181. package/dist/transforms/auto-import.json +7 -3
  182. package/dist/transforms/import-map.json +2 -0
  183. package/dist/types/index.d.ts +116 -106
  184. package/dist/vetur/quasar-attributes.json +65 -49
  185. package/dist/vetur/quasar-tags.json +18 -14
  186. package/dist/web-types/web-types.json +261 -222
  187. package/package.json +3 -3
  188. package/src/api.extends.json +1 -2
  189. package/src/components/ajax-bar/QAjaxBar.json +5 -11
  190. package/src/components/badge/QBadge.js +1 -1
  191. package/src/components/breadcrumbs/QBreadcrumbs.json +0 -2
  192. package/src/components/breadcrumbs/QBreadcrumbsEl.json +1 -6
  193. package/src/components/breadcrumbs/__tests__/BasicBreadcrumbs.vue +7 -0
  194. package/src/components/breadcrumbs/__tests__/BreadcrumbWithSeparatorSlot.vue +11 -0
  195. package/src/components/breadcrumbs/__tests__/QBreadcrumbs.spec.js +112 -0
  196. package/src/components/breadcrumbs/__tests__/QBreadcrumbsEl.spec.js +87 -0
  197. package/src/components/btn/QBtn.json +1 -3
  198. package/src/components/btn/__tests__/QBtn.spec.js +87 -14
  199. package/src/components/btn/__tests__/use-btn.spec.js +385 -58
  200. package/src/components/btn/use-btn.js +24 -14
  201. package/src/components/btn-dropdown/QBtnDropdown.js +34 -18
  202. package/src/components/btn-dropdown/QBtnDropdown.json +1 -3
  203. package/src/components/btn-toggle/QBtnToggle.js +14 -14
  204. package/src/components/btn-toggle/QBtnToggle.json +2 -4
  205. package/src/components/carousel/QCarousel.json +4 -9
  206. package/src/components/carousel/QCarouselControl.json +0 -1
  207. package/src/components/checkbox/use-checkbox.js +1 -1
  208. package/src/components/checkbox/use-checkbox.json +1 -2
  209. package/src/components/chip/QChip.js +14 -11
  210. package/src/components/circular-progress/QCircularProgress.json +0 -5
  211. package/src/components/color/QColor.json +0 -1
  212. package/src/components/date/QDate.js +3 -3
  213. package/src/components/date/QDate.json +28 -56
  214. package/src/components/dialog/QDialog.js +32 -41
  215. package/src/components/dialog/QDialog.json +9 -2
  216. package/src/components/dialog-bottom-sheet/BottomSheet.js +7 -4
  217. package/src/components/dialog-plugin/DialogPlugin.js +4 -4
  218. package/src/components/drawer/QDrawer.js +10 -8
  219. package/src/components/drawer/QDrawer.json +0 -4
  220. package/src/components/editor/QEditor.json +3 -6
  221. package/src/components/expansion-item/QExpansionItem.js +3 -3
  222. package/src/components/expansion-item/QExpansionItem.json +3 -8
  223. package/src/components/fab/QFab.json +0 -1
  224. package/src/components/fab/use-fab.json +0 -1
  225. package/src/components/field/QField.json +0 -1
  226. package/src/components/file/QFile.js +4 -1
  227. package/src/components/file/QFile.json +19 -20
  228. package/src/components/footer/QFooter.js +5 -3
  229. package/src/components/footer/QFooter.json +0 -1
  230. package/src/components/form/QForm.js +5 -3
  231. package/src/components/form/QForm.json +2 -4
  232. package/src/components/header/QHeader.js +5 -3
  233. package/src/components/header/QHeader.json +0 -4
  234. package/src/components/infinite-scroll/QInfiniteScroll.json +9 -6
  235. package/src/components/inner-loading/QInnerLoading.js +2 -5
  236. package/src/components/input/QInput.js +4 -1
  237. package/src/components/input/QInput.json +11 -7
  238. package/src/components/input/use-mask.js +2 -2
  239. package/src/components/intersection/QIntersection.json +0 -1
  240. package/src/components/item/QItem.js +1 -0
  241. package/src/components/item/QItem.json +1 -2
  242. package/src/components/item/QItemLabel.json +0 -1
  243. package/src/components/item/QList.js +7 -2
  244. package/src/components/item/QList.json +7 -0
  245. package/src/components/knob/QKnob.js +3 -3
  246. package/src/components/knob/QKnob.json +3 -12
  247. package/src/components/layout/QLayout.js +1 -1
  248. package/src/components/layout/QLayout.json +6 -12
  249. package/src/components/linear-progress/QLinearProgress.json +0 -2
  250. package/src/components/menu/QMenu.js +8 -5
  251. package/src/components/menu/QMenu.json +0 -2
  252. package/src/components/option-group/QOptionGroup.js +1 -1
  253. package/src/components/option-group/QOptionGroup.json +2 -5
  254. package/src/components/page/QPage.js +11 -4
  255. package/src/components/page/QPage.json +3 -6
  256. package/src/components/page/QPageContainer.js +5 -3
  257. package/src/components/page-scroller/QPageScroller.json +0 -2
  258. package/src/components/page-sticky/QPageSticky.json +0 -1
  259. package/src/components/page-sticky/use-page-sticky.js +5 -3
  260. package/src/components/pagination/QPagination.js +265 -188
  261. package/src/components/pagination/QPagination.json +87 -78
  262. package/src/components/pagination/QPagination.sass +14 -0
  263. package/src/components/parallax/QParallax.json +2 -6
  264. package/src/components/popup-edit/QPopupEdit.js +3 -3
  265. package/src/components/popup-edit/QPopupEdit.json +4 -10
  266. package/src/components/popup-proxy/QPopupProxy.json +0 -1
  267. package/src/components/radio/QRadio.json +1 -2
  268. package/src/components/range/QRange.json +2 -4
  269. package/src/components/rating/QRating.json +0 -1
  270. package/src/components/resize-observer/QResizeObserver.js +14 -10
  271. package/src/components/resize-observer/QResizeObserver.json +2 -4
  272. package/src/components/scroll-area/QScrollArea.js +15 -4
  273. package/src/components/scroll-area/QScrollArea.json +24 -50
  274. package/src/components/scroll-observer/QScrollObserver.js +2 -0
  275. package/src/components/scroll-observer/QScrollObserver.json +6 -12
  276. package/src/components/select/QSelect.js +20 -24
  277. package/src/components/select/QSelect.json +30 -65
  278. package/src/components/select/QSelect.sass +2 -2
  279. package/src/components/slide-item/QSlideItem.json +1 -2
  280. package/src/components/slide-transition/QSlideTransition.json +0 -1
  281. package/src/components/slider/use-slider.json +33 -70
  282. package/src/components/spinner/QSpinner.json +0 -1
  283. package/src/components/splitter/QSplitter.json +1 -2
  284. package/src/components/stepper/QStep.js +7 -5
  285. package/src/components/tab-panels/QTabPanel.js +1 -1
  286. package/src/components/table/QTable.js +3 -3
  287. package/src/components/table/QTable.json +118 -239
  288. package/src/components/tabs/QRouteTab.json +0 -1
  289. package/src/components/tabs/QTabs.js +0 -7
  290. package/src/components/tabs/QTabs.json +1 -3
  291. package/src/components/tabs/use-tab.js +5 -3
  292. package/src/components/time/QTime.json +10 -20
  293. package/src/components/timeline/QTimelineEntry.js +5 -3
  294. package/src/components/toolbar/QToolbar.js +1 -1
  295. package/src/components/tooltip/QTooltip.js +3 -6
  296. package/src/components/tooltip/QTooltip.json +0 -4
  297. package/src/components/tree/QTree.js +6 -6
  298. package/src/components/tree/QTree.json +15 -31
  299. package/src/components/uploader/QUploader.json +13 -22
  300. package/src/components/uploader/QUploaderAddTrigger.js +7 -3
  301. package/src/components/uploader/xhr-uploader-plugin.js +1 -1
  302. package/src/components/uploader/xhr-uploader-plugin.json +25 -50
  303. package/src/components/virtual-scroll/QVirtualScroll.json +5 -10
  304. package/src/components/virtual-scroll/use-virtual-scroll.js +1 -1
  305. package/src/components/virtual-scroll/use-virtual-scroll.json +8 -19
  306. package/src/composables/private/use-field.js +1 -1
  307. package/src/composables/private/use-field.json +2 -3
  308. package/src/composables/private/use-file.js +10 -1
  309. package/src/composables/private/use-file.json +4 -13
  310. package/src/composables/private/use-model-toggle.js +3 -3
  311. package/src/composables/private/use-panel.js +2 -2
  312. package/src/composables/private/use-panel.json +0 -2
  313. package/src/composables/private/use-portal.js +5 -1
  314. package/src/composables/private/use-portal.json +7 -1
  315. package/src/composables/private/use-transition.js +17 -11
  316. package/src/composables/private/use-transition.json +0 -1
  317. package/src/composables/private/use-validate.json +1 -3
  318. package/src/directives/Intersection.json +26 -53
  319. package/src/directives/Morph.json +4 -8
  320. package/src/directives/Mutation.json +6 -12
  321. package/src/directives/Scroll.json +2 -4
  322. package/src/directives/TouchHold.json +3 -6
  323. package/src/directives/TouchPan.json +7 -14
  324. package/src/directives/TouchRepeat.json +6 -12
  325. package/src/directives/TouchSwipe.json +3 -6
  326. package/src/plugins/BottomSheet.json +1 -2
  327. package/src/plugins/Cookies.json +2 -4
  328. package/src/plugins/Dialog.json +32 -72
  329. package/src/plugins/Loading.json +6 -11
  330. package/src/plugins/LoadingBar.json +3 -6
  331. package/src/plugins/Notify.json +4 -5
  332. package/src/plugins/Platform.json +3 -6
  333. package/src/plugins/Screen.json +9 -18
  334. package/src/utils/private/global-dialog.json +6 -12
  335. package/src/utils/private/portal.js +4 -4
  336. package/src/utils/private/symbols.js +2 -0
  337. package/src/utils/private/web-storage.json +6 -10
@@ -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
 
@@ -376,7 +365,8 @@ export default createComponent({
376
365
 
377
366
  function renderPortalContent () {
378
367
  return h('div', {
379
- 'aria-modal': 'true',
368
+ role: 'dialog',
369
+ 'aria-modal': useBackdrop.value === true ? 'true' : 'false',
380
370
  ...attrs,
381
371
  class: rootClasses.value
382
372
  }, [
@@ -389,14 +379,15 @@ export default createComponent({
389
379
  class: 'q-dialog__backdrop fixed-full',
390
380
  style: transitionStyle.value,
391
381
  'aria-hidden': 'true',
392
- onMousedown: onBackdropClick
382
+ tabindex: -1,
383
+ onFocusin: onBackdropClick
393
384
  })
394
385
  : null
395
386
  )),
396
387
 
397
388
  h(
398
389
  Transition,
399
- { name: transition.value, appear: true },
390
+ transitionProps.value,
400
391
  () => (
401
392
  showing.value === true
402
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
 
@@ -70,6 +70,7 @@ export default createComponent({
70
70
  action.class
71
71
  ],
72
72
  tabindex: 0,
73
+ role: 'listitem',
73
74
  onClick () { onOk(action) },
74
75
  onKeyup (e) { e.keyCode === 13 && onOk(action) }
75
76
  }, [
@@ -102,8 +103,7 @@ export default createComponent({
102
103
  tabindex: 0,
103
104
  clickable: true,
104
105
  dark: isDark.value,
105
- onClick () { onOk(action) },
106
- onKeyup (e) { e.keyCode === 13 && onOk(action) }
106
+ onClick () { onOk(action) }
107
107
  }, () => [
108
108
  h(
109
109
  QItemSection,
@@ -145,9 +145,12 @@ export default createComponent({
145
145
  child.push(
146
146
  props.grid === true
147
147
  ? h('div', {
148
- class: 'row items-stretch justify-start'
148
+ class: 'row items-stretch justify-start',
149
+ role: 'list'
149
150
  }, getGrid())
150
- : h('div', getList())
151
+ : h('div', {
152
+ role: 'list'
153
+ }, getList())
151
154
  )
152
155
 
153
156
  return child
@@ -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
  ]
@@ -11,7 +11,7 @@ import TouchPan from '../../directives/TouchPan.js'
11
11
  import { createComponent } from '../../utils/private/create.js'
12
12
  import { between } from '../../utils/format.js'
13
13
  import { hSlot, hDir } from '../../utils/private/render.js'
14
- import { layoutKey } from '../../utils/private/symbols.js'
14
+ import { layoutKey, emptyRenderFn } from '../../utils/private/symbols.js'
15
15
 
16
16
  const duration = 150
17
17
 
@@ -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 }) {
@@ -77,9 +77,11 @@ export default createComponent({
77
77
  const { preventBodyScroll } = usePreventScroll()
78
78
  const { registerTimeout, removeTimeout } = useTimeout()
79
79
 
80
- const $layout = inject(layoutKey, () => {
80
+ const $layout = inject(layoutKey, emptyRenderFn)
81
+ if ($layout === emptyRenderFn) {
81
82
  console.error('QDrawer needs to be child of QLayout')
82
- })
83
+ return emptyRenderFn
84
+ }
83
85
 
84
86
  let lastDesktopState, timerMini, layoutTotalWidthWatcher
85
87
 
@@ -397,7 +399,7 @@ export default createComponent({
397
399
  watch(offset, val => { updateLayout('offset', val) })
398
400
 
399
401
  watch(onLayout, val => {
400
- emit('on-layout', val)
402
+ emit('onLayout', val)
401
403
  updateLayout('space', val)
402
404
  })
403
405
 
@@ -421,7 +423,7 @@ export default createComponent({
421
423
  }
422
424
  })
423
425
 
424
- watch(isMini, val => { emit('mini-state', val) })
426
+ watch(isMini, val => { emit('miniState', val) })
425
427
 
426
428
  function applyPosition (position) {
427
429
  if (position === void 0) {
@@ -586,8 +588,8 @@ export default createComponent({
586
588
  }
587
589
 
588
590
  onMounted(() => {
589
- emit('on-layout', onLayout.value)
590
- emit('mini-state', isMini.value)
591
+ emit('onLayout', onLayout.value)
592
+ emit('miniState', isMini.value)
591
593
 
592
594
  lastDesktopState = props.showIfAbove === true
593
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 () {
@@ -81,7 +81,6 @@
81
81
  "type": "Number",
82
82
  "desc": "Animation duration (in milliseconds)",
83
83
  "default": 300,
84
- "examples": [ ":duration=\"1000\"" ],
85
84
  "category": "behavior"
86
85
  },
87
86
 
@@ -189,7 +188,6 @@
189
188
  "detailsId": {
190
189
  "type": "String",
191
190
  "desc": "QExpansionItem details panel id (for use in aria-controls)",
192
- "__exemption": [ "examples" ],
193
191
  "addedIn": "v2.8.4"
194
192
  },
195
193
 
@@ -200,8 +198,7 @@
200
198
  "evt": {
201
199
  "type": "Object",
202
200
  "required": false,
203
- "desc": "JS event object",
204
- "__exemption": [ "examples" ]
201
+ "desc": "JS event object"
205
202
  }
206
203
  },
207
204
  "returns": null,
@@ -215,8 +212,7 @@
215
212
  "evt": {
216
213
  "type": "Object",
217
214
  "required": false,
218
- "desc": "JS event object",
219
- "__exemption": [ "examples" ]
215
+ "desc": "JS event object"
220
216
  }
221
217
  },
222
218
  "returns": null,
@@ -230,8 +226,7 @@
230
226
  "evt": {
231
227
  "type": "Object",
232
228
  "required": false,
233
- "desc": "JS event object",
234
- "__exemption": [ "examples" ]
229
+ "desc": "JS event object"
235
230
  }
236
231
  },
237
232
  "returns": null,
@@ -28,7 +28,6 @@
28
28
  "desc": "Direction to expand Fab Actions to",
29
29
  "default": "right",
30
30
  "values": [ "up", "right", "down", "left" ],
31
- "examples": [ "down" ],
32
31
  "category": "behavior"
33
32
  },
34
33
 
@@ -68,7 +68,6 @@
68
68
  "label": {
69
69
  "type": [ "String", "Number" ],
70
70
  "desc": "The label that will be shown when Fab is extended",
71
- "default": "",
72
71
  "examples": [ "Button Label" ],
73
72
  "category": "content"
74
73
  },
@@ -9,7 +9,6 @@
9
9
  "maxlength": {
10
10
  "type": [ "String", "Number" ],
11
11
  "desc": "Specify a max length of model",
12
- "examples": [ "12" ],
13
12
  "category": "model"
14
13
  },
15
14
 
@@ -10,6 +10,7 @@ import useFileFormDomProps from '../../composables/private/use-file-dom-props.js
10
10
  import { createComponent } from '../../utils/private/create.js'
11
11
  import { humanStorageSize } from '../../utils/format.js'
12
12
  import { prevent } from '../../utils/event.js'
13
+ import { injectProp } from '../../utils/private/inject-obj-prop.js'
13
14
 
14
15
  export default createComponent({
15
16
  name: 'QFile',
@@ -285,9 +286,11 @@ export default createComponent({
285
286
  Object.assign(proxy, {
286
287
  removeAtIndex,
287
288
  removeFile,
288
- getNativeElement: () => inputRef.value
289
+ getNativeElement: () => inputRef.value // deprecated
289
290
  })
290
291
 
292
+ injectProp(proxy, 'nativeEl', () => inputRef.value)
293
+
291
294
  return useField(state)
292
295
  }
293
296
  })
@@ -49,22 +49,19 @@
49
49
  "filesNumber": {
50
50
  "type": "Number",
51
51
  "required": true,
52
- "desc": "Number of picked files",
53
- "examples": [ 5 ]
52
+ "desc": "Number of picked files"
54
53
  },
55
54
  "maxFiles": {
56
55
  "type": [ "Number", "String" ],
57
56
  "required": true,
58
- "desc": "Maximum number of files (same as 'max-files' prop, if specified); When 'max-files' is not specified, this has 'void 0' as value",
59
- "examples": [ 5 ]
57
+ "desc": "Maximum number of files (same as 'max-files' prop, if specified); When 'max-files' is not specified, this has 'void 0' as value"
60
58
  }
61
59
  }
62
60
  }
63
61
  },
64
62
  "returns": {
65
63
  "type": "String",
66
- "desc": "String to display for the counter label",
67
- "__exemption": [ "examples" ]
64
+ "desc": "String to display for the counter label"
68
65
  },
69
66
  "examples": [
70
67
  ":counter-label=\"counterLabelFn\""
@@ -105,14 +102,12 @@
105
102
  "scope": {
106
103
  "index": {
107
104
  "type": "Number",
108
- "desc": "Selection index",
109
- "examples": [ 0 ]
105
+ "desc": "Selection index"
110
106
  },
111
107
 
112
108
  "file": {
113
109
  "type": "File",
114
- "desc": "File object",
115
- "__exemption": [ "examples" ]
110
+ "desc": "File object"
116
111
  },
117
112
 
118
113
  "ref": {
@@ -128,8 +123,7 @@
128
123
  "scope": {
129
124
  "files": {
130
125
  "type": [ "FileList", "Array" ],
131
- "desc": "Array of File objects",
132
- "__exemption": [ "examples" ]
126
+ "desc": "Array of File objects"
133
127
  },
134
128
 
135
129
  "ref": {
@@ -154,8 +148,7 @@
154
148
  "index": {
155
149
  "type": "Number",
156
150
  "desc": "Index at which to remove selection",
157
- "required": true,
158
- "examples": [ 0 ]
151
+ "required": true
159
152
  }
160
153
  }
161
154
  },
@@ -166,19 +159,25 @@
166
159
  "file": {
167
160
  "type": "File",
168
161
  "desc": "File to remove (instance of File)",
169
- "required": true,
170
- "__exemption": [ "examples" ]
162
+ "required": true
171
163
  }
172
164
  }
173
165
  },
174
166
 
175
167
  "getNativeElement": {
176
- "desc": "Get the native input DOM Element",
168
+ "desc": "DEPRECATED; Access 'nativeEl' directly; Gets the native input DOM Element",
177
169
  "returns": {
178
- "type": "Object",
179
- "desc": "The underlying native input DOM Element",
180
- "__exemption": [ "examples" ]
170
+ "type": "Element",
171
+ "desc": "The underlying native input DOM Element"
181
172
  }
182
173
  }
174
+ },
175
+
176
+ "computedProps": {
177
+ "nativeEl": {
178
+ "type": "Element",
179
+ "desc": "The native input DOM Element",
180
+ "addedIn": "v2.10.1"
181
+ }
183
182
  }
184
183
  }
@@ -6,7 +6,7 @@ import QResizeObserver from '../resize-observer/QResizeObserver.js'
6
6
 
7
7
  import { createComponent } from '../../utils/private/create.js'
8
8
  import { hMergeSlot } from '../../utils/private/render.js'
9
- import { layoutKey } from '../../utils/private/symbols.js'
9
+ import { layoutKey, emptyRenderFn } from '../../utils/private/symbols.js'
10
10
 
11
11
  export default createComponent({
12
12
  name: 'QFooter',
@@ -31,9 +31,11 @@ export default createComponent({
31
31
  setup (props, { slots, emit }) {
32
32
  const { proxy: { $q } } = getCurrentInstance()
33
33
 
34
- const $layout = inject(layoutKey, () => {
34
+ const $layout = inject(layoutKey, emptyRenderFn)
35
+ if ($layout === emptyRenderFn) {
35
36
  console.error('QFooter needs to be child of QLayout')
36
- })
37
+ return emptyRenderFn
38
+ }
37
39
 
38
40
  const size = ref(parseInt(props.heightHint, 10))
39
41
  const revealed = ref(true)
@@ -35,7 +35,6 @@
35
35
  "type": [ "Number", "String" ],
36
36
  "desc": "When using SSR, you can optionally hint of the height (in pixels) of the QFooter",
37
37
  "default": 50,
38
- "examples": [ "150" ],
39
38
  "category": "behavior"
40
39
  }
41
40
  },
@@ -19,7 +19,7 @@ export default createComponent({
19
19
  onSubmit: Function
20
20
  },
21
21
 
22
- emits: [ 'reset', 'validation-success', 'validation-error' ],
22
+ emits: [ 'reset', 'validationSuccess', 'validationError' ],
23
23
 
24
24
  setup (props, { slots, emit }) {
25
25
  const vm = getCurrentInstance()
@@ -36,7 +36,7 @@ export default createComponent({
36
36
  const index = ++validateIndex
37
37
 
38
38
  const emitEvent = (res, ref) => {
39
- emit('validation-' + (res === true ? 'success' : 'error'), ref)
39
+ emit('validation' + (res === true ? 'Success' : 'Error'), ref)
40
40
  }
41
41
 
42
42
  const validateComponent = comp => {
@@ -138,7 +138,9 @@ export default createComponent({
138
138
  addFocusFn(() => {
139
139
  if (rootRef.value === null) { return }
140
140
 
141
- const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
141
+ const target = rootRef.value.querySelector('[autofocus][tabindex], [data-autofocus][tabindex]')
142
+ || rootRef.value.querySelector('[autofocus] [tabindex], [data-autofocus] [tabindex]')
143
+ || rootRef.value.querySelector('[autofocus], [data-autofocus]')
142
144
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1)
143
145
 
144
146
  target !== null && target !== void 0 && target.focus({ preventScroll: true })
@@ -41,8 +41,7 @@
41
41
  "params": {
42
42
  "evt": {
43
43
  "type": [ "Event", "SubmitEvent" ],
44
- "desc": "Form submission event object",
45
- "__exemption": [ "examples" ]
44
+ "desc": "Form submission event object"
46
45
  }
47
46
  }
48
47
  },
@@ -114,8 +113,7 @@
114
113
  "desc": "Get array of children vue components that support validation",
115
114
  "returns": {
116
115
  "type": "Array",
117
- "desc": "Vue components that support Quasar validation API",
118
- "__exemption": [ "examples" ]
116
+ "desc": "Vue components that support Quasar validation API"
119
117
  }
120
118
  }
121
119
  }