quasar 2.2.2 → 2.3.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 (290) hide show
  1. package/dist/api/BottomSheet.json +17 -2
  2. package/dist/api/Dialog.json +17 -2
  3. package/dist/api/LocalStorage.json +8 -0
  4. package/dist/api/QCircularProgress.json +14 -0
  5. package/dist/api/QDate.json +46 -0
  6. package/dist/api/QEditor.json +7 -2
  7. package/dist/api/QFooter.json +1 -1
  8. package/dist/api/QHeader.json +1 -1
  9. package/dist/api/QIntersection.json +14 -0
  10. package/dist/api/QLinearProgress.json +14 -0
  11. package/dist/api/QRouteTab.json +1 -24
  12. package/dist/api/QScrollArea.json +3 -0
  13. package/dist/api/QSelect.json +62 -0
  14. package/dist/api/QSkeleton.json +1 -1
  15. package/dist/api/QTable.json +62 -5
  16. package/dist/api/QTree.json +6 -0
  17. package/dist/api/QUploader.json +81 -1
  18. package/dist/api/SessionStorage.json +8 -0
  19. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  20. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  21. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  22. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  23. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  24. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  25. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  26. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  27. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  28. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  30. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  31. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  47. package/dist/icon-set/themify.umd.prod.js +1 -1
  48. package/dist/lang/ar.umd.prod.js +1 -1
  49. package/dist/lang/az-Latn.umd.prod.js +1 -1
  50. package/dist/lang/bg.umd.prod.js +1 -1
  51. package/dist/lang/bn.umd.prod.js +1 -1
  52. package/dist/lang/ca.umd.prod.js +1 -1
  53. package/dist/lang/cs.umd.prod.js +1 -1
  54. package/dist/lang/da.umd.prod.js +1 -1
  55. package/dist/lang/de.umd.prod.js +1 -1
  56. package/dist/lang/el.umd.prod.js +1 -1
  57. package/dist/lang/en-GB.umd.prod.js +1 -1
  58. package/dist/lang/en-US.umd.prod.js +1 -1
  59. package/dist/lang/eo.umd.prod.js +1 -1
  60. package/dist/lang/es.umd.prod.js +1 -1
  61. package/dist/lang/et.umd.prod.js +1 -1
  62. package/dist/lang/fa-IR.umd.prod.js +1 -1
  63. package/dist/lang/fa.umd.prod.js +1 -1
  64. package/dist/lang/fi.umd.prod.js +1 -1
  65. package/dist/lang/fr.umd.prod.js +1 -1
  66. package/dist/lang/gn.umd.prod.js +1 -1
  67. package/dist/lang/he.umd.prod.js +1 -1
  68. package/dist/lang/hr.umd.prod.js +1 -1
  69. package/dist/lang/hu.umd.prod.js +1 -1
  70. package/dist/lang/id.umd.prod.js +1 -1
  71. package/dist/lang/is.umd.prod.js +1 -1
  72. package/dist/lang/it.umd.prod.js +1 -1
  73. package/dist/lang/ja.umd.prod.js +1 -1
  74. package/dist/lang/km.umd.prod.js +1 -1
  75. package/dist/lang/ko-KR.umd.prod.js +1 -1
  76. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  77. package/dist/lang/lt.umd.prod.js +1 -1
  78. package/dist/lang/lu.umd.prod.js +1 -1
  79. package/dist/lang/lv.umd.prod.js +1 -1
  80. package/dist/lang/ml.umd.prod.js +1 -1
  81. package/dist/lang/ms.umd.prod.js +1 -1
  82. package/dist/lang/nb-NO.umd.prod.js +1 -1
  83. package/dist/lang/nl.umd.prod.js +1 -1
  84. package/dist/lang/pl.umd.prod.js +1 -1
  85. package/dist/lang/pt-BR.umd.prod.js +1 -1
  86. package/dist/lang/pt.umd.prod.js +1 -1
  87. package/dist/lang/ro.umd.prod.js +1 -1
  88. package/dist/lang/ru.umd.prod.js +1 -1
  89. package/dist/lang/sk.umd.prod.js +1 -1
  90. package/dist/lang/sl.umd.prod.js +1 -1
  91. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  92. package/dist/lang/sr.umd.prod.js +1 -1
  93. package/dist/lang/sv.umd.prod.js +1 -1
  94. package/dist/lang/ta.umd.prod.js +1 -1
  95. package/dist/lang/th.umd.prod.js +1 -1
  96. package/dist/lang/tr.umd.prod.js +1 -1
  97. package/dist/lang/ug.umd.prod.js +1 -1
  98. package/dist/lang/uk.umd.prod.js +1 -1
  99. package/dist/lang/vi.umd.prod.js +1 -1
  100. package/dist/lang/zh-CN.umd.prod.js +1 -1
  101. package/dist/lang/zh-TW.umd.prod.js +1 -1
  102. package/dist/quasar.cjs.prod.js +2 -2
  103. package/dist/quasar.css +57 -9
  104. package/dist/quasar.esm.prod.js +2 -2
  105. package/dist/quasar.prod.css +1 -1
  106. package/dist/quasar.rtl.css +124 -9
  107. package/dist/quasar.rtl.prod.css +1 -1
  108. package/dist/quasar.sass +47 -7
  109. package/dist/quasar.umd.js +356 -267
  110. package/dist/quasar.umd.prod.js +2 -2
  111. package/dist/ssr-directives/Morph.js +1 -1
  112. package/dist/types/index.d.ts +374 -141
  113. package/dist/vetur/quasar-attributes.json +18 -2
  114. package/dist/vetur/quasar-tags.json +6 -2
  115. package/dist/web-types/web-types.json +44 -3
  116. package/package.json +4 -1
  117. package/src/api.extends.json +7 -0
  118. package/src/body.js +14 -4
  119. package/src/components/ajax-bar/QAjaxBar.js +3 -2
  120. package/src/components/avatar/QAvatar.js +3 -2
  121. package/src/components/badge/QBadge.js +3 -2
  122. package/src/components/banner/QBanner.js +3 -2
  123. package/src/components/bar/QBar.js +3 -2
  124. package/src/components/breadcrumbs/QBreadcrumbs.js +3 -2
  125. package/src/components/breadcrumbs/QBreadcrumbsEl.js +3 -2
  126. package/src/components/btn/QBtn.js +3 -2
  127. package/src/components/btn-dropdown/QBtnDropdown.js +3 -2
  128. package/src/components/btn-group/QBtnGroup.js +3 -2
  129. package/src/components/btn-toggle/QBtnToggle.js +3 -2
  130. package/src/components/card/QCard.js +3 -2
  131. package/src/components/card/QCardActions.js +3 -2
  132. package/src/components/card/QCardSection.js +3 -2
  133. package/src/components/carousel/QCarousel.js +3 -2
  134. package/src/components/carousel/QCarouselControl.js +3 -2
  135. package/src/components/carousel/QCarouselSlide.js +3 -2
  136. package/src/components/chat/QChatMessage.js +3 -2
  137. package/src/components/checkbox/QCheckbox.js +3 -2
  138. package/src/components/chip/QChip.js +3 -2
  139. package/src/components/circular-progress/QCircularProgress.js +9 -3
  140. package/src/components/circular-progress/QCircularProgress.json +6 -0
  141. package/src/components/color/QColor.js +3 -2
  142. package/src/components/date/QDate.js +5 -3
  143. package/src/components/date/QDate.json +34 -0
  144. package/src/components/dialog/QDialog.js +3 -2
  145. package/src/components/dialog-bottom-sheet/BottomSheet.js +3 -2
  146. package/src/components/dialog-plugin/DialogPlugin.js +3 -2
  147. package/src/components/drawer/QDrawer.js +3 -2
  148. package/src/components/editor/QEditor.js +3 -2
  149. package/src/components/editor/QEditor.json +6 -2
  150. package/src/components/expansion-item/QExpansionItem.js +3 -2
  151. package/src/components/fab/QFab.js +3 -2
  152. package/src/components/fab/QFabAction.js +3 -2
  153. package/src/components/field/QField.js +3 -3
  154. package/src/components/file/QFile.js +3 -2
  155. package/src/components/footer/QFooter.js +3 -2
  156. package/src/components/footer/QFooter.json +1 -1
  157. package/src/components/form/QForm.js +3 -2
  158. package/src/components/header/QHeader.js +3 -2
  159. package/src/components/header/QHeader.json +1 -1
  160. package/src/components/icon/QIcon.js +4 -2
  161. package/src/components/img/QImg.js +5 -2
  162. package/src/components/infinite-scroll/QInfiniteScroll.js +50 -32
  163. package/src/components/inner-loading/QInnerLoading.js +3 -2
  164. package/src/components/input/QInput.js +3 -2
  165. package/src/components/intersection/QIntersection.js +12 -3
  166. package/src/components/intersection/QIntersection.json +9 -0
  167. package/src/components/item/QItem.js +3 -2
  168. package/src/components/item/QItemLabel.js +3 -2
  169. package/src/components/item/QItemSection.js +3 -2
  170. package/src/components/item/QList.js +3 -3
  171. package/src/components/knob/QKnob.js +3 -2
  172. package/src/components/layout/QLayout.js +3 -2
  173. package/src/components/linear-progress/QLinearProgress.js +13 -3
  174. package/src/components/linear-progress/QLinearProgress.json +6 -0
  175. package/src/components/linear-progress/QLinearProgress.sass +2 -1
  176. package/src/components/markup-table/QMarkupTable.js +3 -2
  177. package/src/components/menu/QMenu.js +4 -3
  178. package/src/components/no-ssr/QNoSsr.js +3 -2
  179. package/src/components/option-group/QOptionGroup.js +4 -2
  180. package/src/components/page/QPage.js +3 -2
  181. package/src/components/page/QPageContainer.js +3 -2
  182. package/src/components/page-scroller/QPageScroller.js +4 -2
  183. package/src/components/page-sticky/QPageSticky.js +2 -3
  184. package/src/components/pagination/QPagination.js +3 -2
  185. package/src/components/parallax/QParallax.js +3 -2
  186. package/src/components/popup-edit/QPopupEdit.js +3 -2
  187. package/src/components/popup-proxy/QPopupProxy.js +10 -17
  188. package/src/components/pull-to-refresh/QPullToRefresh.js +3 -2
  189. package/src/components/radio/QRadio.js +3 -2
  190. package/src/components/range/QRange.js +3 -2
  191. package/src/components/rating/QRating.js +6 -5
  192. package/src/components/resize-observer/QResizeObserver.js +3 -2
  193. package/src/components/responsive/QResponsive.js +3 -2
  194. package/src/components/scroll-area/QScrollArea.js +3 -2
  195. package/src/components/scroll-area/QScrollArea.json +4 -1
  196. package/src/components/scroll-observer/QScrollObserver.js +3 -2
  197. package/src/components/select/QSelect.js +17 -22
  198. package/src/components/select/QSelect.json +47 -0
  199. package/src/components/separator/QSeparator.js +4 -2
  200. package/src/components/skeleton/QSkeleton.js +3 -2
  201. package/src/components/skeleton/QSkeleton.json +1 -4
  202. package/src/components/slide-item/QSlideItem.js +3 -2
  203. package/src/components/slide-transition/QSlideTransition.js +4 -2
  204. package/src/components/slider/QSlider.js +3 -2
  205. package/src/components/slider/use-slider.js +3 -3
  206. package/src/components/space/QSpace.js +4 -2
  207. package/src/components/spinner/QSpinner.js +4 -2
  208. package/src/components/spinner/QSpinnerAudio.js +4 -2
  209. package/src/components/spinner/QSpinnerBall.js +4 -2
  210. package/src/components/spinner/QSpinnerBars.js +4 -2
  211. package/src/components/spinner/QSpinnerBox.js +4 -2
  212. package/src/components/spinner/QSpinnerClock.js +4 -2
  213. package/src/components/spinner/QSpinnerComment.js +4 -2
  214. package/src/components/spinner/QSpinnerCube.js +4 -2
  215. package/src/components/spinner/QSpinnerDots.js +4 -2
  216. package/src/components/spinner/QSpinnerFacebook.js +4 -2
  217. package/src/components/spinner/QSpinnerGears.js +4 -2
  218. package/src/components/spinner/QSpinnerGrid.js +4 -2
  219. package/src/components/spinner/QSpinnerHearts.js +4 -2
  220. package/src/components/spinner/QSpinnerHourglass.js +4 -2
  221. package/src/components/spinner/QSpinnerInfinity.js +4 -2
  222. package/src/components/spinner/QSpinnerIos.js +4 -2
  223. package/src/components/spinner/QSpinnerOrbit.js +4 -2
  224. package/src/components/spinner/QSpinnerOval.js +4 -2
  225. package/src/components/spinner/QSpinnerPie.js +4 -2
  226. package/src/components/spinner/QSpinnerPuff.js +4 -2
  227. package/src/components/spinner/QSpinnerRadio.js +4 -2
  228. package/src/components/spinner/QSpinnerRings.js +4 -2
  229. package/src/components/spinner/QSpinnerTail.js +4 -2
  230. package/src/components/splitter/QSplitter.js +3 -2
  231. package/src/components/stepper/QStep.js +3 -2
  232. package/src/components/stepper/QStepper.js +3 -2
  233. package/src/components/stepper/QStepperNavigation.js +3 -2
  234. package/src/components/stepper/StepHeader.js +4 -2
  235. package/src/components/tab-panels/QTabPanel.js +4 -2
  236. package/src/components/tab-panels/QTabPanels.js +3 -2
  237. package/src/components/table/QTable.js +4 -2
  238. package/src/components/table/QTable.json +51 -5
  239. package/src/components/table/QTd.js +3 -2
  240. package/src/components/table/QTh.js +3 -2
  241. package/src/components/table/QTr.js +3 -2
  242. package/src/components/table/table-pagination.js +2 -2
  243. package/src/components/tabs/QRouteTab.js +4 -2
  244. package/src/components/tabs/QRouteTab.json +1 -23
  245. package/src/components/tabs/QTab.js +3 -3
  246. package/src/components/tabs/QTabs.js +4 -3
  247. package/src/components/time/QTime.js +9 -7
  248. package/src/components/timeline/QTimeline.js +3 -2
  249. package/src/components/timeline/QTimelineEntry.js +3 -2
  250. package/src/components/toggle/QToggle.js +5 -2
  251. package/src/components/toolbar/QToolbar.js +3 -2
  252. package/src/components/toolbar/QToolbarTitle.js +3 -2
  253. package/src/components/tooltip/QTooltip.js +3 -2
  254. package/src/components/tree/QTree.js +12 -7
  255. package/src/components/tree/QTree.json +5 -0
  256. package/src/components/tree/QTree.sass +52 -4
  257. package/src/components/uploader/QUploaderAddTrigger.js +3 -2
  258. package/src/components/uploader/uploader-core.js +2 -7
  259. package/src/components/uploader/xhr-uploader-plugin.json +97 -1
  260. package/src/components/video/QVideo.js +4 -2
  261. package/src/components/virtual-scroll/QVirtualScroll.js +3 -2
  262. package/src/components/virtual-scroll/use-virtual-scroll.js +17 -1
  263. package/src/composables/private/use-field.js +2 -2
  264. package/src/composables/private/use-file.js +8 -0
  265. package/src/composables/private/use-model-toggle.js +1 -1
  266. package/src/composables/private/use-refocus-target.js +12 -3
  267. package/src/composables/use-dialog-plugin-component.js +6 -1
  268. package/src/css/core/transitions.sass +3 -1
  269. package/src/css/normalize.sass +0 -7
  270. package/src/directives/ClosePopup.js +3 -1
  271. package/src/directives/Intersection.js +3 -1
  272. package/src/directives/Morph.js +4 -1
  273. package/src/directives/Mutation.js +3 -1
  274. package/src/directives/Ripple.js +3 -1
  275. package/src/directives/Scroll.js +3 -1
  276. package/src/directives/ScrollFire.js +3 -1
  277. package/src/directives/TouchHold.js +4 -1
  278. package/src/directives/TouchPan.js +4 -1
  279. package/src/directives/TouchRepeat.js +4 -1
  280. package/src/directives/TouchSwipe.js +4 -1
  281. package/src/install-quasar.js +1 -0
  282. package/src/plugins/Notify.js +4 -3
  283. package/src/utils/create-uploader-component.js +9 -7
  284. package/src/utils/date.js +1 -1
  285. package/src/utils/private/create.js +4 -0
  286. package/src/utils/private/get-emits-object.js +11 -0
  287. package/src/utils/private/global-dialog.json +10 -2
  288. package/src/utils/private/vm.js +3 -3
  289. package/src/utils/private/web-storage.json +10 -0
  290. package/wrappers/index.js +4 -0
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import TouchPan from '../../directives/TouchPan.js'
4
4
 
@@ -14,6 +14,7 @@ import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
14
14
  import useCache from '../../composables/private/use-cache.js'
15
15
  import { useFormInject, useFormProps } from '../../composables/private/use-form.js'
16
16
 
17
+ import { createComponent } from '../../utils/private/create.js'
17
18
  import { testPattern } from '../../utils/patterns.js'
18
19
  import throttle from '../../utils/throttle.js'
19
20
  import { stop } from '../../utils/event.js'
@@ -35,7 +36,7 @@ const palette = [
35
36
 
36
37
  const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
37
38
 
38
- export default defineComponent({
39
+ export default createComponent({
39
40
  name: 'QColor',
40
41
 
41
42
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, Transition, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, Transition, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QBtn from '../btn/QBtn.js'
4
4
 
@@ -7,6 +7,7 @@ import useCache from '../../composables/private/use-cache.js'
7
7
  import { useFormProps, useFormAttrs, useFormInject } from '../../composables/private/use-form.js'
8
8
  import useDatetime, { useDatetimeProps, useDatetimeEmits, getDayHash } from './use-datetime.js'
9
9
 
10
+ import { createComponent } from '../../utils/private/create.js'
10
11
  import { hSlot } from '../../utils/private/render.js'
11
12
  import { formatDate, __splitDate, getDateDiff } from '../../utils/date.js'
12
13
  import { pad } from '../../utils/format.js'
@@ -22,7 +23,7 @@ function getMonthHash (date) {
22
23
  return date.year + '/' + pad(date.month)
23
24
  }
24
25
 
25
- export default defineComponent({
26
+ export default createComponent({
26
27
  name: 'QDate',
27
28
 
28
29
  props: {
@@ -800,8 +801,9 @@ export default defineComponent({
800
801
  return getDefaultViewModel()
801
802
  }
802
803
 
804
+ const target = model[ model.length - 1 ]
803
805
  const decoded = decodeString(
804
- model[ 0 ].from !== void 0 ? model[ 0 ].from : model[ 0 ],
806
+ target.from !== void 0 ? target.from : target,
805
807
  mask,
806
808
  locale
807
809
  )
@@ -61,6 +61,17 @@
61
61
  "events": {
62
62
  "type": [ "Array", "Function" ],
63
63
  "desc": "A list of events to highlight on the calendar; If using a function, it receives the date as a String and must return a Boolean (matches or not); If using a function then for best performance, reference it from your scope and do not define it inline",
64
+ "params": {
65
+ "date": {
66
+ "type": "String",
67
+ "desc": "The current date being processed.",
68
+ "examples": [ "2018/11/05", "2021/10/25" ]
69
+ }
70
+ },
71
+ "returns": {
72
+ "type": "Boolean",
73
+ "desc": "If true, the current date will be highlighted"
74
+ },
64
75
  "examples": [
65
76
  ":events=\"['2018/11/05', '2018/11/06', '2018/11/09', '2018/11/23']\"",
66
77
  ":events=\"date => date[9] % 3 === 0\""
@@ -71,6 +82,18 @@
71
82
  "event-color": {
72
83
  "type": [ "String", "Function" ],
73
84
  "desc": "Color name (from the Quasar Color Palette); If using a function, it receives the date as a String and must return a String (color for the received date); If using a function then for best performance, reference it from your scope and do not define it inline",
85
+ "params": {
86
+ "date": {
87
+ "type": "String",
88
+ "desc": "The current date being processed.",
89
+ "examples": [ "2018/11/05", "2021/10/25" ]
90
+ }
91
+ },
92
+ "returns": {
93
+ "type": "String",
94
+ "desc": "Color for the current date.",
95
+ "examples": [ "teal", "orange" ]
96
+ },
74
97
  "examples": [
75
98
  "teal-10",
76
99
  ":event-color=\"(date) => date[9] % 2 === 0 ? 'teal' : 'orange'\""
@@ -81,6 +104,17 @@
81
104
  "options": {
82
105
  "type": [ "Array", "Function" ],
83
106
  "desc": "Optionally configure the days that are selectable; If using a function, it receives the date as a String and must return a Boolean (is date acceptable or not); If using a function then for best performance, reference it from your scope and do not define it inline; Incompatible with 'range' prop",
107
+ "params": {
108
+ "date": {
109
+ "type": "String",
110
+ "desc": "The current date being processed.",
111
+ "examples": [ "2018/11/05", "2021/10/25" ]
112
+ }
113
+ },
114
+ "returns": {
115
+ "type": "Boolean",
116
+ "desc": "If true, the current date will be made available for selection"
117
+ },
84
118
  "examples": [
85
119
  ":options=\"['2018/11/05', '2018/11/12', '2018/11/19', '2018/11/26' ]\"",
86
120
  ":options=\"date => date[9] % 3 === 0\"",
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, nextTick, Transition, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, nextTick, 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'
@@ -8,6 +8,7 @@ import { 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
 
11
+ import { createComponent } from '../../utils/private/create.js'
11
12
  import { childHasFocus } from '../../utils/dom.js'
12
13
  import { hSlot } from '../../utils/private/render.js'
13
14
  import { addEscapeKey, removeEscapeKey } from '../../utils/private/escape-key.js'
@@ -32,7 +33,7 @@ const transitions = {
32
33
  left: [ 'slide-right', 'slide-left' ]
33
34
  }
34
35
 
35
- export default defineComponent({
36
+ export default createComponent({
36
37
  name: 'QDialog',
37
38
 
38
39
  inheritAttrs: false,
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, getCurrentInstance } from 'vue'
1
+ import { h, ref, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QDialog from '../dialog/QDialog.js'
4
4
 
@@ -11,9 +11,10 @@ import QCardSection from '../card/QCardSection.js'
11
11
  import QItem from '../item/QItem.js'
12
12
  import QItemSection from '../item/QItemSection.js'
13
13
 
14
+ import { createComponent } from '../../utils/private/create.js'
14
15
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
15
16
 
16
- export default defineComponent({
17
+ export default createComponent({
17
18
  name: 'BottomSheetPlugin',
18
19
 
19
20
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, toRaw, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, toRaw, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QDialog from '../dialog/QDialog.js'
4
4
  import QBtn from '../btn/QBtn.js'
@@ -13,11 +13,12 @@ import QOptionGroup from '../option-group/QOptionGroup.js'
13
13
 
14
14
  import QSpinner from '../spinner/QSpinner.js'
15
15
 
16
+ import { createComponent } from '../../utils/private/create.js'
16
17
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
17
18
 
18
19
  import { isKeyCode } from '../../utils/private/key-composition.js'
19
20
 
20
- export default defineComponent({
21
+ export default createComponent({
21
22
  name: 'DialogPlugin',
22
23
 
23
24
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, withDirectives, ref, computed, watch, onMounted, onBeforeUnmount, nextTick, inject, getCurrentInstance } from 'vue'
1
+ import { h, withDirectives, ref, computed, watch, onMounted, onBeforeUnmount, nextTick, inject, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useHistory from '../../composables/private/use-history.js'
4
4
  import useModelToggle, { useModelToggleProps, useModelToggleEmits } from '../../composables/private/use-model-toggle.js'
@@ -8,13 +8,14 @@ import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
8
8
 
9
9
  import TouchPan from '../../directives/TouchPan.js'
10
10
 
11
+ import { createComponent } from '../../utils/private/create.js'
11
12
  import { between } from '../../utils/format.js'
12
13
  import { hSlot, hDir } from '../../utils/private/render.js'
13
14
  import { layoutKey } from '../../utils/private/symbols.js'
14
15
 
15
16
  const duration = 150
16
17
 
17
- export default defineComponent({
18
+ export default createComponent({
18
19
  name: 'QDrawer',
19
20
 
20
21
  inheritAttrs: false,
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onMounted, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onMounted, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import Caret from './editor-caret.js'
4
4
  import { getToolbar, getFonts, getLinkEditor } from './editor-utils.js'
@@ -7,12 +7,13 @@ import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
7
7
  import useFullscreen, { useFullscreenProps, useFullscreenEmits } from '../../composables/private/use-fullscreen.js'
8
8
  import useSplitAttrs from '../../composables/private/use-split-attrs.js'
9
9
 
10
+ import { createComponent } from '../../utils/private/create.js'
10
11
  import { stopAndPrevent } from '../../utils/event.js'
11
12
  import extend from '../../utils/extend.js'
12
13
  import { shouldIgnoreKey } from '../../utils/private/key-composition.js'
13
14
  import { addFocusFn } from '../../utils/private/focus-manager.js'
14
15
 
15
- export default defineComponent({
16
+ export default createComponent({
16
17
  name: 'QEditor',
17
18
 
18
19
  props: {
@@ -120,8 +120,12 @@
120
120
  },
121
121
  "disable": {
122
122
  "type": [ "Boolean", "Function" ],
123
- "desc": "Is button disabled? If specifying a function, return a Boolean value.",
124
- "examples": [ "() => this.userIsActive()" ]
123
+ "desc": "Is button disabled?",
124
+ "returns": {
125
+ "type": "Boolean",
126
+ "desc": "If true, the button will be disabled"
127
+ },
128
+ "examples": [ "!user.active", "() => !checkIfUserIsActive()" ]
125
129
  },
126
130
  "type": {
127
131
  "type": "String",
@@ -1,4 +1,4 @@
1
- import { h, shallowReactive, defineComponent, ref, computed, watch, withDirectives, getCurrentInstance, vShow, onBeforeUnmount } from 'vue'
1
+ import { h, shallowReactive, ref, computed, watch, withDirectives, getCurrentInstance, vShow, onBeforeUnmount } from 'vue'
2
2
 
3
3
  import QItem from '../item/QItem.js'
4
4
  import QItemSection from '../item/QItemSection.js'
@@ -11,6 +11,7 @@ import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
11
11
  import { useRouterLinkProps } from '../../composables/private/use-router-link.js'
12
12
  import useModelToggle, { useModelToggleProps, useModelToggleEmits } from '../../composables/private/use-model-toggle.js'
13
13
 
14
+ import { createComponent } from '../../utils/private/create.js'
14
15
  import { stopAndPrevent } from '../../utils/event.js'
15
16
  import { hSlot } from '../../utils/private/render.js'
16
17
  import uid from '../../utils/uid.js'
@@ -18,7 +19,7 @@ import uid from '../../utils/uid.js'
18
19
  const itemGroups = shallowReactive({})
19
20
  const LINK_PROPS = Object.keys(useRouterLinkProps)
20
21
 
21
- export default defineComponent({
22
+ export default createComponent({
22
23
  name: 'QExpansionItem',
23
24
 
24
25
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, provide, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, provide, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QBtn from '../btn/QBtn.js'
4
4
  import QIcon from '../icon/QIcon.js'
@@ -6,13 +6,14 @@ import QIcon from '../icon/QIcon.js'
6
6
  import useFab, { useFabProps } from './use-fab.js'
7
7
  import useModelToggle, { useModelToggleProps, useModelToggleEmits } from '../../composables/private/use-model-toggle.js'
8
8
 
9
+ import { createComponent } from '../../utils/private/create.js'
9
10
  import { hSlot, hMergeSlot } from '../../utils/private/render.js'
10
11
  import { fabKey } from '../../utils/private/symbols.js'
11
12
 
12
13
  const directions = [ 'up', 'right', 'down', 'left' ]
13
14
  const alignValues = [ 'left', 'center', 'right' ]
14
15
 
15
- export default defineComponent({
16
+ export default createComponent({
16
17
  name: 'QFab',
17
18
 
18
19
  props: {
@@ -1,10 +1,11 @@
1
- import { h, defineComponent, computed, inject, getCurrentInstance } from 'vue'
1
+ import { h, computed, inject, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QBtn from '../btn/QBtn.js'
4
4
  import QIcon from '../icon/QIcon.js'
5
5
 
6
6
  import useFab, { useFabProps } from './use-fab.js'
7
7
 
8
+ import { createComponent } from '../../utils/private/create.js'
8
9
  import { fabKey } from '../../utils/private/symbols.js'
9
10
  import { hMergeSlot } from '../../utils/private/render.js'
10
11
  import { noop } from '../../utils/event.js'
@@ -17,7 +18,7 @@ const anchorMap = {
17
18
 
18
19
  const anchorValues = Object.keys(anchorMap)
19
20
 
20
- export default defineComponent({
21
+ export default createComponent({
21
22
  name: 'QFabAction',
22
23
 
23
24
  props: {
@@ -1,8 +1,8 @@
1
- import { defineComponent } from 'vue'
2
-
3
1
  import useField, { useFieldState, useFieldProps, useFieldEmits } from '../../composables/private/use-field.js'
4
2
 
5
- export default defineComponent({
3
+ import { createComponent } from '../../utils/private/create.js'
4
+
5
+ export default createComponent({
6
6
  name: 'QField',
7
7
 
8
8
  inheritAttrs: false,
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QChip from '../chip/QChip.js'
4
4
 
@@ -7,9 +7,10 @@ import { useFormProps, useFormInputNameAttr } from '../../composables/private/us
7
7
  import useFile, { useFileProps, useFileEmits } from '../../composables/private/use-file.js'
8
8
  import useFileFormDomProps from '../../composables/private/use-file-dom-props.js'
9
9
 
10
+ import { createComponent } from '../../utils/private/create.js'
10
11
  import { humanStorageSize } from '../../utils/format.js'
11
12
 
12
- export default defineComponent({
13
+ export default createComponent({
13
14
  name: 'QFile',
14
15
 
15
16
  inheritAttrs: false,
@@ -1,13 +1,14 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, inject, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, inject, getCurrentInstance } from 'vue'
2
2
 
3
3
  import { isRuntimeSsrPreHydration } from '../../plugins/Platform.js'
4
4
 
5
5
  import QResizeObserver from '../resize-observer/QResizeObserver.js'
6
6
 
7
+ import { createComponent } from '../../utils/private/create.js'
7
8
  import { hMergeSlot } from '../../utils/private/render.js'
8
9
  import { layoutKey } from '../../utils/private/symbols.js'
9
10
 
10
- export default defineComponent({
11
+ export default createComponent({
11
12
  name: 'QFooter',
12
13
 
13
14
  props: {
@@ -32,7 +32,7 @@
32
32
  },
33
33
 
34
34
  "height-hint": {
35
- "type": [ "Number", "String " ],
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
38
  "examples": [ "150" ],
@@ -1,11 +1,12 @@
1
- import { h, defineComponent, ref, onMounted, getCurrentInstance, nextTick, provide } from 'vue'
1
+ import { h, ref, onMounted, getCurrentInstance, nextTick, provide } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { stopAndPrevent } from '../../utils/event.js'
4
5
  import { addFocusFn } from '../../utils/private/focus-manager.js'
5
6
  import { hSlot } from '../../utils/private/render.js'
6
7
  import { formKey } from '../../utils/private/symbols.js'
7
8
 
8
- export default defineComponent({
9
+ export default createComponent({
9
10
  name: 'QForm',
10
11
 
11
12
  props: {
@@ -1,11 +1,12 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, inject, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, inject, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QResizeObserver from '../resize-observer/QResizeObserver.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
5
6
  import { hUniqueSlot } from '../../utils/private/render.js'
6
7
  import { layoutKey } from '../../utils/private/symbols.js'
7
8
 
8
- export default defineComponent({
9
+ export default createComponent({
9
10
  name: 'QHeader',
10
11
 
11
12
  props: {
@@ -42,7 +42,7 @@
42
42
  },
43
43
 
44
44
  "height-hint": {
45
- "type": [ "Number", "String " ],
45
+ "type": [ "Number", "String" ],
46
46
  "desc": "When using SSR, you can optionally hint of the height (in pixels) of the QHeader",
47
47
  "default": 50,
48
48
  "examples": [ "150" ],
@@ -1,6 +1,8 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useSize, { useSizeProps } from '../../composables/private/use-size.js'
4
+
5
+ import { createComponent } from '../../utils/private/create.js'
4
6
  import { hSlot, hMergeSlot } from '../../utils/private/render.js'
5
7
 
6
8
  const sameFn = i => i
@@ -33,7 +35,7 @@ const svgUseRE = /^svguse:/
33
35
  const ionRE = /^ion-/
34
36
  const faLaRE = /^[l|f]a[s|r|l|b|d]? /
35
37
 
36
- export default defineComponent({
38
+ export default createComponent({
37
39
  name: 'QIcon',
38
40
 
39
41
  props: {
@@ -1,13 +1,16 @@
1
- import { h, defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, Transition } from 'vue'
1
+ import { h, ref, computed, watch, onMounted, onBeforeUnmount, Transition } from 'vue'
2
2
 
3
3
  import QSpinner from '../spinner/QSpinner.js'
4
+
4
5
  import useRatio, { useRatioProps } from '../../composables/private/use-ratio.js'
6
+
7
+ import { createComponent } from '../../utils/private/create.js'
5
8
  import { hSlot } from '../../utils/private/render.js'
6
9
  import { isRuntimeSsrPreHydration } from '../../plugins/Platform.js'
7
10
 
8
11
  const defaultRatio = 16 / 9
9
12
 
10
- export default defineComponent({
13
+ export default createComponent({
11
14
  name: 'QImg',
12
15
 
13
16
  props: {
@@ -1,12 +1,15 @@
1
- import { h, defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onMounted, onActivated, onDeactivated, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import debounce from '../../utils/debounce.js'
4
5
  import { height } from '../../utils/dom.js'
5
6
  import { getScrollTarget, getScrollHeight, getVerticalScrollPosition, setVerticalScrollPosition } from '../../utils/scroll.js'
6
7
  import { listenOpts } from '../../utils/event.js'
7
8
  import { hSlot, hUniqueSlot } from '../../utils/private/render.js'
8
9
 
9
- export default defineComponent({
10
+ const { passive } = listenOpts
11
+
12
+ export default createComponent({
10
13
  name: 'QInfiniteScroll',
11
14
 
12
15
  props: {
@@ -33,20 +36,21 @@ export default defineComponent({
33
36
  emits: [ 'load' ],
34
37
 
35
38
  setup (props, { slots, emit }) {
36
- const fetching = ref(false)
39
+ const isFetching = ref(false)
40
+ const isWorking = ref(true)
37
41
  const rootRef = ref(null)
38
42
 
39
43
  let index = props.initialIndex || 0
40
- let isWorking = true
44
+ let scrollPos = false
41
45
  let localScrollTarget, poll
42
46
 
43
47
  const classes = computed(() =>
44
48
  'q-infinite-scroll__loading'
45
- + (fetching.value === true ? '' : ' invisible')
49
+ + (isFetching.value === true ? '' : ' invisible')
46
50
  )
47
51
 
48
52
  function immediatePoll () {
49
- if (props.disable === true || fetching.value === true || isWorking === false) {
53
+ if (props.disable === true || isFetching.value === true || isWorking.value === false) {
50
54
  return
51
55
  }
52
56
 
@@ -68,18 +72,18 @@ export default defineComponent({
68
72
  }
69
73
 
70
74
  function trigger () {
71
- if (props.disable === true || fetching.value === true || isWorking === false) {
75
+ if (props.disable === true || isFetching.value === true || isWorking.value === false) {
72
76
  return
73
77
  }
74
78
 
75
79
  index++
76
- fetching.value = true
80
+ isFetching.value = true
77
81
 
78
82
  const heightBefore = getScrollHeight(localScrollTarget)
79
83
 
80
84
  emit('load', index, isDone => {
81
- if (isWorking === true) {
82
- fetching.value = false
85
+ if (isWorking.value === true) {
86
+ isFetching.value = false
83
87
  nextTick(() => {
84
88
  if (props.reverse === true) {
85
89
  const
@@ -106,31 +110,31 @@ export default defineComponent({
106
110
  }
107
111
 
108
112
  function resume () {
109
- if (isWorking === false) {
110
- isWorking = true
111
- localScrollTarget.addEventListener('scroll', poll, listenOpts.passive)
113
+ if (isWorking.value === false) {
114
+ isWorking.value = true
115
+ localScrollTarget.addEventListener('scroll', poll, passive)
112
116
  }
113
117
 
114
118
  immediatePoll()
115
119
  }
116
120
 
117
121
  function stop () {
118
- if (isWorking === true) {
119
- isWorking = false
120
- fetching.value = false
121
- localScrollTarget.removeEventListener('scroll', poll, listenOpts.passive)
122
+ if (isWorking.value === true) {
123
+ isWorking.value = false
124
+ isFetching.value = false
125
+ localScrollTarget.removeEventListener('scroll', poll, passive)
122
126
  }
123
127
  }
124
128
 
125
129
  function updateScrollTarget () {
126
- if (localScrollTarget && isWorking === true) {
127
- localScrollTarget.removeEventListener('scroll', poll, listenOpts.passive)
130
+ if (localScrollTarget && isWorking.value === true) {
131
+ localScrollTarget.removeEventListener('scroll', poll, passive)
128
132
  }
129
133
 
130
134
  localScrollTarget = getScrollTarget(rootRef.value, props.scrollTarget)
131
135
 
132
- if (isWorking === true) {
133
- localScrollTarget.addEventListener('scroll', poll, listenOpts.passive)
136
+ if (isWorking.value === true) {
137
+ localScrollTarget.addEventListener('scroll', poll, passive)
134
138
  }
135
139
  }
136
140
 
@@ -154,30 +158,44 @@ export default defineComponent({
154
158
  ? immediatePoll
155
159
  : debounce(immediatePoll, isNaN(val) === true ? 100 : val)
156
160
 
157
- if (localScrollTarget && isWorking === true) {
161
+ if (localScrollTarget && isWorking.value === true) {
158
162
  if (oldPoll !== void 0) {
159
- localScrollTarget.removeEventListener('scroll', oldPoll, listenOpts.passive)
163
+ localScrollTarget.removeEventListener('scroll', oldPoll, passive)
160
164
  }
161
165
 
162
- localScrollTarget.addEventListener('scroll', poll, listenOpts.passive)
166
+ localScrollTarget.addEventListener('scroll', poll, passive)
163
167
  }
164
168
  }
165
169
 
166
170
  watch(() => props.disable, val => {
167
- if (val === true) {
168
- stop()
169
- }
170
- else {
171
- resume()
171
+ if (val === true) { stop() }
172
+ else { resume() }
173
+ })
174
+
175
+ watch(() => props.reverse, val => {
176
+ if (isFetching.value === false && isWorking.value === true) {
177
+ immediatePoll()
172
178
  }
173
179
  })
174
180
 
175
181
  watch(() => props.scrollTarget, updateScrollTarget)
176
182
  watch(() => props.debounce, setDebounce)
177
183
 
184
+ onActivated(() => {
185
+ if (localScrollTarget && scrollPos !== false) {
186
+ setVerticalScrollPosition(localScrollTarget, scrollPos)
187
+ }
188
+ })
189
+
190
+ onDeactivated(() => {
191
+ scrollPos = localScrollTarget
192
+ ? getVerticalScrollPosition(localScrollTarget)
193
+ : false
194
+ })
195
+
178
196
  onBeforeUnmount(() => {
179
- if (isWorking === true) {
180
- localScrollTarget.removeEventListener('scroll', poll, listenOpts.passive)
197
+ if (isWorking.value === true) {
198
+ localScrollTarget.removeEventListener('scroll', poll, passive)
181
199
  }
182
200
  })
183
201
 
@@ -200,7 +218,7 @@ export default defineComponent({
200
218
  return () => {
201
219
  const child = hUniqueSlot(slots.default, [])
202
220
 
203
- if (props.disable !== true && isWorking === true) {
221
+ if (props.disable !== true && isWorking.value === true) {
204
222
  child[ props.reverse === false ? 'push' : 'unshift' ](
205
223
  h('div', { class: classes.value }, hSlot(slots.loading))
206
224
  )
@@ -1,11 +1,12 @@
1
- import { h, defineComponent, computed, Transition, getCurrentInstance } from 'vue'
1
+ import { h, computed, Transition, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QSpinner from '../spinner/QSpinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
5
6
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
6
7
  import useTransition, { useTransitionProps } from '../../composables/private/use-transition.js'
7
8
 
8
- export default defineComponent({
9
+ export default createComponent({
9
10
  name: 'QInnerLoading',
10
11
 
11
12
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, onMounted, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, onMounted, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useField, { useFieldState, useFieldProps, useFieldEmits, fieldValueIsFilled } from '../../composables/private/use-field.js'
4
4
  import useMask, { useMaskProps } from './use-mask.js'
@@ -6,10 +6,11 @@ import { useFormProps, useFormInputNameAttr } from '../../composables/private/us
6
6
  import useFileFormDomProps from '../../composables/private/use-file-dom-props.js'
7
7
  import useKeyComposition from '../../composables/private/use-key-composition.js'
8
8
 
9
+ import { createComponent } from '../../utils/private/create.js'
9
10
  import { stop } from '../../utils/event.js'
10
11
  import { addFocusFn } from '../../utils/private/focus-manager.js'
11
12
 
12
- export default defineComponent({
13
+ export default createComponent({
13
14
  name: 'QInput',
14
15
 
15
16
  inheritAttrs: false,