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
@@ -95,13 +95,14 @@
95
95
  "params": {
96
96
  "info": {
97
97
  "type": "Object",
98
- "__exemption": [ "examples" ],
98
+ "desc": "An object containing scroll information",
99
99
  "definition": {
100
100
  "ref": {
101
101
  "type": "Object",
102
102
  "desc": "Vue reference to the QScrollArea which triggered the event",
103
103
  "__exemption": [ "examples" ]
104
104
  },
105
+
105
106
  "verticalPosition": {
106
107
  "type": "Number",
107
108
  "desc": "Vertical scroll position (in px)",
@@ -215,6 +216,7 @@
215
216
  "desc": "Get current scroll position",
216
217
  "returns": {
217
218
  "type": "Object",
219
+ "desc": "An object containing scroll position information",
218
220
  "definition": {
219
221
  "top": {
220
222
  "type": "Number",
@@ -235,6 +237,7 @@
235
237
  "desc": "Get current scroll position in percentage (0.0 <= x <= 1.0)",
236
238
  "returns": {
237
239
  "type": "Object",
240
+ "desc": "An object containing scroll position information in percentage",
238
241
  "definition": {
239
242
  "top": {
240
243
  "type": "Number",
@@ -1,12 +1,13 @@
1
- import { defineComponent, watch, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
1
+ import { watch, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { getScrollTarget, getVerticalScrollPosition, getHorizontalScrollPosition } from '../../utils/scroll.js'
4
5
  import { listenOpts, noop } from '../../utils/event.js'
5
6
 
6
7
  const { passive } = listenOpts
7
8
  const axisValues = [ 'both', 'horizontal', 'vertical' ]
8
9
 
9
- export default defineComponent({
10
+ export default createComponent({
10
11
  name: 'QScrollObserver',
11
12
 
12
13
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUpdate, onUpdated, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUpdate, onUpdated, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QField from '../field/QField.js'
4
4
  import QIcon from '../icon/QIcon.js'
@@ -16,6 +16,7 @@ import { useVirtualScroll, useVirtualScrollProps } from '../virtual-scroll/use-v
16
16
  import { useFormProps, useFormInputNameAttr } from '../../composables/private/use-form.js'
17
17
  import useKeyComposition from '../../composables/private/use-key-composition.js'
18
18
 
19
+ import { createComponent } from '../../utils/private/create.js'
19
20
  import { isDeepEqual } from '../../utils/private/is.js'
20
21
  import { stop, prevent, stopAndPrevent } from '../../utils/event.js'
21
22
  import { normalizeToInterval } from '../../utils/format.js'
@@ -26,7 +27,7 @@ const validateNewValueMode = v => [ 'add', 'add-unique', 'toggle' ].includes(v)
26
27
  const reEscapeList = '.*+?^${}()|[]\\'
27
28
  const fieldPropsList = Object.keys(useFieldProps)
28
29
 
29
- export default defineComponent({
30
+ export default createComponent({
30
31
  name: 'QSelect',
31
32
 
32
33
  inheritAttrs: false,
@@ -932,6 +933,12 @@ export default defineComponent({
932
933
  }
933
934
 
934
935
  function getAllOptions () {
936
+ if (noOptions.value === true) {
937
+ return slots[ 'no-option' ] !== void 0
938
+ ? slots[ 'no-option' ]({ inputValue: inputValue.value })
939
+ : void 0
940
+ }
941
+
935
942
  const fn = slots.option !== void 0
936
943
  ? slots.option
937
944
  : scope => {
@@ -1113,14 +1120,6 @@ export default defineComponent({
1113
1120
  }
1114
1121
 
1115
1122
  function getMenu () {
1116
- const child = noOptions.value === true
1117
- ? (
1118
- slots[ 'no-option' ] !== void 0
1119
- ? () => slots[ 'no-option' ]({ inputValue: inputValue.value })
1120
- : void 0
1121
- )
1122
- : getAllOptions
1123
-
1124
1123
  return h(QMenu, {
1125
1124
  ref: menuRef,
1126
1125
  class: menuContentClass.value,
@@ -1145,7 +1144,7 @@ export default defineComponent({
1145
1144
  onBeforeShow: onControlPopupShow,
1146
1145
  onBeforeHide: onMenuBeforeHide,
1147
1146
  onShow: onMenuShow
1148
- }, child)
1147
+ }, getAllOptions)
1149
1148
  }
1150
1149
 
1151
1150
  function onMenuBeforeHide (e) {
@@ -1202,15 +1201,7 @@ export default defineComponent({
1202
1201
  ...listboxAttrs.value,
1203
1202
  onClick: prevent,
1204
1203
  onScrollPassive: onVirtualScrollEvt
1205
- }, (
1206
- noOptions.value === true
1207
- ? (
1208
- slots[ 'no-option' ] !== void 0
1209
- ? slots[ 'no-option' ]({ inputValue: inputValue.value })
1210
- : null
1211
- )
1212
- : getAllOptions()
1213
- ))
1204
+ }, getAllOptions())
1214
1205
  )
1215
1206
 
1216
1207
  return h(QDialog, {
@@ -1348,14 +1339,14 @@ export default defineComponent({
1348
1339
  function onControlPopupShow (e) {
1349
1340
  e !== void 0 && stop(e)
1350
1341
  emit('popup-show', e)
1351
- state.hasPopupOpen.value = true
1342
+ state.hasPopupOpen = true
1352
1343
  state.onControlFocusin(e)
1353
1344
  }
1354
1345
 
1355
1346
  function onControlPopupHide (e) {
1356
1347
  e !== void 0 && stop(e)
1357
1348
  emit('popup-hide', e)
1358
- state.hasPopupOpen.value = false
1349
+ state.hasPopupOpen = false
1359
1350
  state.onControlFocusout(e)
1360
1351
  }
1361
1352
 
@@ -1427,6 +1418,10 @@ export default defineComponent({
1427
1418
  ) {
1428
1419
  return hasDialog === true ? getDialog() : getMenu()
1429
1420
  }
1421
+ else if (state.hasPopupOpen === true) {
1422
+ // explicitly set it otherwise TAB will not blur component
1423
+ state.hasPopupOpen = false
1424
+ }
1430
1425
  },
1431
1426
 
1432
1427
  controlEvents: {
@@ -47,6 +47,22 @@
47
47
  "type": [ "Function", "String" ],
48
48
  "desc": "Property of option which holds the 'value'; If using a function then for best performance, reference it from your scope and do not define it inline",
49
49
  "default": "value",
50
+ "params": {
51
+ "option": {
52
+ "type": [ "String", "Object" ],
53
+ "desc": "The current option being processed",
54
+ "examples": [
55
+ "'BMW'",
56
+ "'Samsung Phone'",
57
+ "{ label: 'BMW', value: 'car', cannotSelect: true }"
58
+ ]
59
+ }
60
+ },
61
+ "returns": {
62
+ "type": "Any",
63
+ "desc": "Value of the current option",
64
+ "examples": [ "'car'", "34" ]
65
+ },
50
66
  "examples": [
51
67
  "option-value=\"modelNumber\"",
52
68
  ":option-value=\"(item) => item === null ? null : item.modelNumber\""
@@ -58,6 +74,22 @@
58
74
  "type": [ "Function", "String" ],
59
75
  "desc": "Property of option which holds the 'label'; If using a function then for best performance, reference it from your scope and do not define it inline",
60
76
  "default": "label",
77
+ "params": {
78
+ "option": {
79
+ "type": [ "String", "Object" ],
80
+ "desc": "The current option being processed",
81
+ "examples": [
82
+ "'BMW'",
83
+ "'Samsung Phone'",
84
+ "{ label: 'BMW', value: 'car', cannotSelect: true }"
85
+ ]
86
+ }
87
+ },
88
+ "returns": {
89
+ "type": "String",
90
+ "desc": "Label of the current option",
91
+ "examples": [ "'BMW'", "'Samsung Phone'" ]
92
+ },
61
93
  "examples": [
62
94
  "option-label=\"itemName\"",
63
95
  ":option-label=\"(item) => item === null ? 'Null value' : item.itemName\""
@@ -69,6 +101,21 @@
69
101
  "type": [ "Function", "String" ],
70
102
  "desc": "Property of option which tells it's disabled; The value of the property must be a Boolean; If using a function then for best performance, reference it from your scope and do not define it inline",
71
103
  "default": "disable",
104
+ "params": {
105
+ "option": {
106
+ "type": [ "String", "Object" ],
107
+ "desc": "The current option being processed",
108
+ "examples": [
109
+ "'BMW'",
110
+ "'Samsung Phone'",
111
+ "{ label: 'BMW', value: 'car', cannotSelect: true }"
112
+ ]
113
+ }
114
+ },
115
+ "returns": {
116
+ "type": "Boolean",
117
+ "desc": "If true, the current option will be disabled"
118
+ },
72
119
  "examples": [
73
120
  "option-disable=\"cannotSelect\"",
74
121
  ":option-disable=\"(item) => item === null ? true : item.cannotSelect\""
@@ -1,7 +1,9 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const insetMap = {
6
8
  true: 'inset',
7
9
  item: 'item-inset',
@@ -16,7 +18,7 @@ export const margins = {
16
18
  xl: 24
17
19
  }
18
20
 
19
- export default defineComponent({
21
+ export default createComponent({
20
22
  name: 'QSeparator',
21
23
 
22
24
  props: {
@@ -1,7 +1,8 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
5
6
  import { hSlot } from '../../utils/private/render.js'
6
7
 
7
8
  export const skeletonTypes = [
@@ -16,7 +17,7 @@ export const skeletonAnimations = [
16
17
  'wave', 'pulse', 'pulse-x', 'pulse-y', 'fade', 'blink', 'none'
17
18
  ]
18
19
 
19
- export default defineComponent({
20
+ export default createComponent({
20
21
  name: 'QSkeleton',
21
22
 
22
23
  props: {
@@ -33,11 +33,8 @@
33
33
  },
34
34
 
35
35
  "animation-speed": {
36
- "type": [ "String", "Number" ],
37
- "desc": "Animation speed (in milliseconds, without unit)",
36
+ "extends": "animation-speed",
38
37
  "default": 300,
39
- "examples": [ 500, "1200" ],
40
- "category": "style",
41
38
  "addedIn": "v2.2"
42
39
  },
43
40
 
@@ -1,10 +1,11 @@
1
- import { h, defineComponent, ref, computed, withDirectives, onBeforeUnmount, onBeforeUpdate, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, withDirectives, onBeforeUnmount, onBeforeUpdate, getCurrentInstance } from 'vue'
2
2
 
3
3
  import TouchPan from '../../directives/TouchPan.js'
4
4
 
5
5
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
6
6
  import useCache from '../../composables/private/use-cache.js'
7
7
 
8
+ import { createComponent } from '../../utils/private/create.js'
8
9
  import { hSlot } from '../../utils/private/render.js'
9
10
 
10
11
  const slotsDef = [
@@ -14,7 +15,7 @@ const slotsDef = [
14
15
  [ 'bottom', 'end', 'center', 'height' ]
15
16
  ]
16
17
 
17
- export default defineComponent({
18
+ export default createComponent({
18
19
  name: 'QSlideItem',
19
20
 
20
21
  props: {
@@ -1,6 +1,8 @@
1
- import { h, defineComponent, onBeforeUnmount, Transition } from 'vue'
1
+ import { h, onBeforeUnmount, Transition } from 'vue'
2
2
 
3
- export default defineComponent({
3
+ import { createComponent } from '../../utils/private/create.js'
4
+
5
+ export default createComponent({
4
6
  name: 'QSlideTransition',
5
7
 
6
8
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, getCurrentInstance } from 'vue'
2
2
 
3
3
  import { useFormInject, useFormProps, useFormAttrs } from '../../composables/private/use-form.js'
4
4
 
@@ -10,11 +10,12 @@ import useSlider, {
10
10
  keyCodes
11
11
  } from './use-slider.js'
12
12
 
13
+ import { createComponent } from '../../utils/private/create.js'
13
14
  import { between } from '../../utils/format.js'
14
15
  import { stopAndPrevent } from '../../utils/event.js'
15
16
  import { hDir } from '../../utils/private/render.js'
16
17
 
17
- export default defineComponent({
18
+ export default createComponent({
18
19
  name: 'QSlider',
19
20
 
20
21
  props: {
@@ -210,7 +210,7 @@ export default function ({ updateValue, updatePosition, getDragging }) {
210
210
  }
211
211
 
212
212
  function onPan (event) {
213
- if (event.isFinal) {
213
+ if (event.isFinal === true) {
214
214
  if (dragging.value !== void 0) {
215
215
  updatePosition(event.evt)
216
216
  // only if touch, because we also have mousedown/up:
@@ -220,7 +220,7 @@ export default function ({ updateValue, updatePosition, getDragging }) {
220
220
  }
221
221
  active.value = false
222
222
  }
223
- else if (event.isFirst) {
223
+ else if (event.isFirst === true) {
224
224
  dragging.value = getDragging(event.evt)
225
225
  updatePosition(event.evt)
226
226
  updateValue()
@@ -250,7 +250,7 @@ export default function ({ updateValue, updatePosition, getDragging }) {
250
250
  function onDeactivate () {
251
251
  preventFocus.value = false
252
252
 
253
- if (dragging.value === void 0) {
253
+ if (dragging.value === false) {
254
254
  active.value = false
255
255
  }
256
256
 
@@ -1,8 +1,10 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
+
3
+ import { createComponent } from '../../utils/private/create.js'
2
4
 
3
5
  const space = h('div', { class: 'q-space' })
4
6
 
5
- export default defineComponent({
7
+ export default createComponent({
6
8
  name: 'QSpace',
7
9
 
8
10
  setup () {
@@ -1,8 +1,10 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
- export default defineComponent({
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
7
+ export default createComponent({
6
8
  name: 'QSpinner',
7
9
 
8
10
  props: {
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('g', {
7
9
  transform: 'matrix(1 0 0 -1 0 80)'
@@ -68,7 +70,7 @@ const svg = [
68
70
  ])
69
71
  ]
70
72
 
71
- export default defineComponent({
73
+ export default createComponent({
72
74
  name: 'QSpinnerAudio',
73
75
 
74
76
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('g', {
7
9
  transform: 'translate(1 1)',
@@ -84,7 +86,7 @@ const svg = [
84
86
  ])
85
87
  ]
86
88
 
87
- export default defineComponent({
89
+ export default createComponent({
88
90
  name: 'QSpinnerBall',
89
91
 
90
92
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('rect', {
7
9
  y: '10',
@@ -123,7 +125,7 @@ const svg = [
123
125
  ])
124
126
  ]
125
127
 
126
- export default defineComponent({
128
+ export default createComponent({
127
129
  name: 'QSpinnerBars',
128
130
 
129
131
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('rect', {
7
9
  x: '25',
@@ -41,7 +43,7 @@ const svg = [
41
43
  ])
42
44
  ]
43
45
 
44
- export default defineComponent({
46
+ export default createComponent({
45
47
  name: 'QSpinnerBox',
46
48
 
47
49
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('circle', {
7
9
  cx: '50',
@@ -52,7 +54,7 @@ const svg = [
52
54
  ])
53
55
  ]
54
56
 
55
- export default defineComponent({
57
+ export default createComponent({
56
58
  name: 'QSpinnerClock',
57
59
 
58
60
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('rect', {
7
9
  x: '0',
@@ -64,7 +66,7 @@ const svg = [
64
66
  ])
65
67
  ]
66
68
 
67
- export default defineComponent({
69
+ export default createComponent({
68
70
  name: 'QSpinnerComment',
69
71
 
70
72
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('rect', {
7
9
  x: '0',
@@ -112,7 +114,7 @@ const svg = [
112
114
  ])
113
115
  ]
114
116
 
115
- export default defineComponent({
117
+ export default createComponent({
116
118
  name: 'QSpinnerCube',
117
119
 
118
120
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('circle', {
7
9
  cx: '15',
@@ -84,7 +86,7 @@ const svg = [
84
86
  ])
85
87
  ]
86
88
 
87
- export default defineComponent({
89
+ export default createComponent({
88
90
  name: 'QSpinnerDots',
89
91
 
90
92
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('g', {
7
9
  transform: 'translate(20 50)'
@@ -83,7 +85,7 @@ const svg = [
83
85
  ])
84
86
  ]
85
87
 
86
- export default defineComponent({
88
+ export default createComponent({
87
89
  name: 'QSpinnerFacebook',
88
90
 
89
91
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('g', {
7
9
  transform: 'translate(-20,-20)'
@@ -39,7 +41,7 @@ const svg = [
39
41
  ])
40
42
  ]
41
43
 
42
- export default defineComponent({
44
+ export default createComponent({
43
45
  name: 'QSpinnerGears',
44
46
 
45
47
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('circle', {
7
9
  cx: '12.5',
@@ -132,7 +134,7 @@ const svg = [
132
134
  ])
133
135
  ]
134
136
 
135
- export default defineComponent({
137
+ export default createComponent({
136
138
  name: 'QSpinnerGrid',
137
139
 
138
140
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('path', {
7
9
  d: 'M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.716-6.002 11.47-7.65 17.304-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z',
@@ -34,7 +36,7 @@ const svg = [
34
36
  })
35
37
  ]
36
38
 
37
- export default defineComponent({
39
+ export default createComponent({
38
40
  name: 'QSpinnerHearts',
39
41
 
40
42
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('g', [
7
9
  h('path', {
@@ -92,7 +94,7 @@ const svg = [
92
94
  ])
93
95
  ]
94
96
 
95
- export default defineComponent({
97
+ export default createComponent({
96
98
  name: 'QSpinnerHourglass',
97
99
 
98
100
  props: useSpinnerProps,
@@ -1,7 +1,9 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
5
7
  const svg = [
6
8
  h('path', {
7
9
  d: 'M24.3,30C11.4,30,5,43.3,5,50s6.4,20,19.3,20c19.3,0,32.1-40,51.4-40C88.6,30,95,43.3,95,50s-6.4,20-19.3,20C56.4,70,43.6,30,24.3,30z',
@@ -23,7 +25,7 @@ const svg = [
23
25
  ])
24
26
  ]
25
27
 
26
- export default defineComponent({
28
+ export default createComponent({
27
29
  name: 'QSpinnerInfinity',
28
30
 
29
31
  props: useSpinnerProps,