quasar 2.1.0

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 (973) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/dist/api/AddressbarColor.json +22 -0
  4. package/dist/api/AppFullscreen.json +71 -0
  5. package/dist/api/AppVisibility.json +15 -0
  6. package/dist/api/BottomSheet.json +212 -0
  7. package/dist/api/ClosePopup.json +21 -0
  8. package/dist/api/Cookies.json +189 -0
  9. package/dist/api/Dark.json +50 -0
  10. package/dist/api/Dialog.json +471 -0
  11. package/dist/api/Intersection.json +279 -0
  12. package/dist/api/Loading.json +256 -0
  13. package/dist/api/LoadingBar.json +55 -0
  14. package/dist/api/LocalStorage.json +191 -0
  15. package/dist/api/Meta.json +6 -0
  16. package/dist/api/Morph.json +193 -0
  17. package/dist/api/Mutation.json +122 -0
  18. package/dist/api/Notify.json +1068 -0
  19. package/dist/api/Platform.json +70 -0
  20. package/dist/api/QAjaxBar.json +91 -0
  21. package/dist/api/QAvatar.json +72 -0
  22. package/dist/api/QBadge.json +78 -0
  23. package/dist/api/QBanner.json +39 -0
  24. package/dist/api/QBar.json +23 -0
  25. package/dist/api/QBreadcrumbs.json +83 -0
  26. package/dist/api/QBreadcrumbsEl.json +101 -0
  27. package/dist/api/QBtn.json +288 -0
  28. package/dist/api/QBtnDropdown.json +484 -0
  29. package/dist/api/QBtnGroup.json +53 -0
  30. package/dist/api/QBtnToggle.json +249 -0
  31. package/dist/api/QCard.json +45 -0
  32. package/dist/api/QCardActions.json +33 -0
  33. package/dist/api/QCardSection.json +30 -0
  34. package/dist/api/QCarousel.json +393 -0
  35. package/dist/api/QCarouselControl.json +42 -0
  36. package/dist/api/QCarouselSlide.json +44 -0
  37. package/dist/api/QChatMessage.json +128 -0
  38. package/dist/api/QCheckbox.json +172 -0
  39. package/dist/api/QChip.json +206 -0
  40. package/dist/api/QCircularProgress.json +135 -0
  41. package/dist/api/QColor.json +131 -0
  42. package/dist/api/QDate.json +550 -0
  43. package/dist/api/QDialog.json +210 -0
  44. package/dist/api/QDrawer.json +262 -0
  45. package/dist/api/QEditor.json +385 -0
  46. package/dist/api/QExpansionItem.json +339 -0
  47. package/dist/api/QFab.json +310 -0
  48. package/dist/api/QFabAction.json +222 -0
  49. package/dist/api/QField.json +417 -0
  50. package/dist/api/QFile.json +623 -0
  51. package/dist/api/QFooter.json +61 -0
  52. package/dist/api/QForm.json +102 -0
  53. package/dist/api/QFormChildMixin.json +24 -0
  54. package/dist/api/QHeader.json +70 -0
  55. package/dist/api/QIcon.json +64 -0
  56. package/dist/api/QImg.json +236 -0
  57. package/dist/api/QInfiniteScroll.json +120 -0
  58. package/dist/api/QInnerLoading.json +77 -0
  59. package/dist/api/QInput.json +494 -0
  60. package/dist/api/QIntersection.json +91 -0
  61. package/dist/api/QItem.json +119 -0
  62. package/dist/api/QItemLabel.json +41 -0
  63. package/dist/api/QItemSection.json +38 -0
  64. package/dist/api/QKnob.json +196 -0
  65. package/dist/api/QLayout.json +110 -0
  66. package/dist/api/QLinearProgress.json +94 -0
  67. package/dist/api/QList.json +38 -0
  68. package/dist/api/QMarkupTable.json +58 -0
  69. package/dist/api/QMenu.json +323 -0
  70. package/dist/api/QNoSsr.json +37 -0
  71. package/dist/api/QOptionGroup.json +109 -0
  72. package/dist/api/QPage.json +47 -0
  73. package/dist/api/QPageContainer.json +11 -0
  74. package/dist/api/QPageScroller.json +73 -0
  75. package/dist/api/QPageSticky.json +46 -0
  76. package/dist/api/QPagination.json +324 -0
  77. package/dist/api/QParallax.json +85 -0
  78. package/dist/api/QPopupEdit.json +337 -0
  79. package/dist/api/QPopupProxy.json +147 -0
  80. package/dist/api/QPullToRefresh.json +87 -0
  81. package/dist/api/QRadio.json +133 -0
  82. package/dist/api/QRange.json +269 -0
  83. package/dist/api/QRating.json +167 -0
  84. package/dist/api/QResizeObserver.json +59 -0
  85. package/dist/api/QResponsive.json +26 -0
  86. package/dist/api/QRouteTab.json +190 -0
  87. package/dist/api/QScrollArea.json +338 -0
  88. package/dist/api/QScrollObserver.json +146 -0
  89. package/dist/api/QSelect.json +1341 -0
  90. package/dist/api/QSeparator.json +62 -0
  91. package/dist/api/QSkeleton.json +104 -0
  92. package/dist/api/QSlideItem.json +202 -0
  93. package/dist/api/QSlideTransition.json +36 -0
  94. package/dist/api/QSlider.json +196 -0
  95. package/dist/api/QSpace.json +6 -0
  96. package/dist/api/QSpinner.json +38 -0
  97. package/dist/api/QSpinnerAudio.json +28 -0
  98. package/dist/api/QSpinnerBall.json +28 -0
  99. package/dist/api/QSpinnerBars.json +28 -0
  100. package/dist/api/QSpinnerBox.json +28 -0
  101. package/dist/api/QSpinnerClock.json +28 -0
  102. package/dist/api/QSpinnerComment.json +28 -0
  103. package/dist/api/QSpinnerCube.json +28 -0
  104. package/dist/api/QSpinnerDots.json +28 -0
  105. package/dist/api/QSpinnerFacebook.json +28 -0
  106. package/dist/api/QSpinnerGears.json +28 -0
  107. package/dist/api/QSpinnerGrid.json +28 -0
  108. package/dist/api/QSpinnerHearts.json +28 -0
  109. package/dist/api/QSpinnerHourglass.json +28 -0
  110. package/dist/api/QSpinnerInfinity.json +28 -0
  111. package/dist/api/QSpinnerIos.json +28 -0
  112. package/dist/api/QSpinnerOrbit.json +28 -0
  113. package/dist/api/QSpinnerOval.json +28 -0
  114. package/dist/api/QSpinnerPie.json +28 -0
  115. package/dist/api/QSpinnerPuff.json +28 -0
  116. package/dist/api/QSpinnerRadio.json +28 -0
  117. package/dist/api/QSpinnerRings.json +28 -0
  118. package/dist/api/QSpinnerTail.json +28 -0
  119. package/dist/api/QSplitter.json +142 -0
  120. package/dist/api/QStep.json +158 -0
  121. package/dist/api/QStepper.json +317 -0
  122. package/dist/api/QStepperNavigation.json +11 -0
  123. package/dist/api/QTab.json +111 -0
  124. package/dist/api/QTabPanel.json +34 -0
  125. package/dist/api/QTabPanels.json +193 -0
  126. package/dist/api/QTable.json +2645 -0
  127. package/dist/api/QTabs.json +165 -0
  128. package/dist/api/QTd.json +31 -0
  129. package/dist/api/QTh.json +26 -0
  130. package/dist/api/QTime.json +278 -0
  131. package/dist/api/QTimeline.json +48 -0
  132. package/dist/api/QTimelineEntry.json +101 -0
  133. package/dist/api/QToggle.json +216 -0
  134. package/dist/api/QToolbar.json +18 -0
  135. package/dist/api/QToolbarTitle.json +18 -0
  136. package/dist/api/QTooltip.json +274 -0
  137. package/dist/api/QTr.json +26 -0
  138. package/dist/api/QTree.json +552 -0
  139. package/dist/api/QUploader.json +481 -0
  140. package/dist/api/QUploaderAddTrigger.json +6 -0
  141. package/dist/api/QVideo.json +30 -0
  142. package/dist/api/QVirtualScroll.json +291 -0
  143. package/dist/api/Ripple.json +111 -0
  144. package/dist/api/Screen.json +207 -0
  145. package/dist/api/Scroll.json +31 -0
  146. package/dist/api/ScrollFire.json +21 -0
  147. package/dist/api/SessionStorage.json +191 -0
  148. package/dist/api/TouchHold.json +86 -0
  149. package/dist/api/TouchPan.json +200 -0
  150. package/dist/api/TouchRepeat.json +156 -0
  151. package/dist/api/TouchSwipe.json +118 -0
  152. package/dist/icon-set/bootstrap-icons.umd.prod.js +6 -0
  153. package/dist/icon-set/eva-icons.umd.prod.js +6 -0
  154. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +6 -0
  155. package/dist/icon-set/fontawesome-v5.umd.prod.js +6 -0
  156. package/dist/icon-set/ionicons-v4.umd.prod.js +6 -0
  157. package/dist/icon-set/line-awesome.umd.prod.js +6 -0
  158. package/dist/icon-set/material-icons-outlined.umd.prod.js +6 -0
  159. package/dist/icon-set/material-icons-round.umd.prod.js +6 -0
  160. package/dist/icon-set/material-icons-sharp.umd.prod.js +6 -0
  161. package/dist/icon-set/material-icons.umd.prod.js +6 -0
  162. package/dist/icon-set/mdi-v3.umd.prod.js +6 -0
  163. package/dist/icon-set/mdi-v4.umd.prod.js +6 -0
  164. package/dist/icon-set/mdi-v5.umd.prod.js +6 -0
  165. package/dist/icon-set/mdi-v6.umd.prod.js +6 -0
  166. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +6 -0
  167. package/dist/icon-set/svg-eva-icons.umd.prod.js +6 -0
  168. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +6 -0
  169. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +6 -0
  170. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +6 -0
  171. package/dist/icon-set/svg-line-awesome.umd.prod.js +6 -0
  172. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +6 -0
  173. package/dist/icon-set/svg-material-icons-round.umd.prod.js +6 -0
  174. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +6 -0
  175. package/dist/icon-set/svg-material-icons.umd.prod.js +6 -0
  176. package/dist/icon-set/svg-mdi-v4.umd.prod.js +6 -0
  177. package/dist/icon-set/svg-mdi-v5.umd.prod.js +6 -0
  178. package/dist/icon-set/svg-mdi-v6.umd.prod.js +6 -0
  179. package/dist/icon-set/svg-themify.umd.prod.js +6 -0
  180. package/dist/icon-set/themify.umd.prod.js +6 -0
  181. package/dist/lang/ar.umd.prod.js +6 -0
  182. package/dist/lang/az-Latn.umd.prod.js +6 -0
  183. package/dist/lang/bg.umd.prod.js +6 -0
  184. package/dist/lang/bn.umd.prod.js +6 -0
  185. package/dist/lang/ca.umd.prod.js +6 -0
  186. package/dist/lang/cs.umd.prod.js +6 -0
  187. package/dist/lang/da.umd.prod.js +6 -0
  188. package/dist/lang/de.umd.prod.js +6 -0
  189. package/dist/lang/el.umd.prod.js +6 -0
  190. package/dist/lang/en-GB.umd.prod.js +6 -0
  191. package/dist/lang/en-US.umd.prod.js +6 -0
  192. package/dist/lang/eo.umd.prod.js +6 -0
  193. package/dist/lang/es.umd.prod.js +6 -0
  194. package/dist/lang/et.umd.prod.js +6 -0
  195. package/dist/lang/fa-IR.umd.prod.js +6 -0
  196. package/dist/lang/fa.umd.prod.js +6 -0
  197. package/dist/lang/fi.umd.prod.js +6 -0
  198. package/dist/lang/fr.umd.prod.js +6 -0
  199. package/dist/lang/gn.umd.prod.js +6 -0
  200. package/dist/lang/he.umd.prod.js +6 -0
  201. package/dist/lang/hr.umd.prod.js +6 -0
  202. package/dist/lang/hu.umd.prod.js +6 -0
  203. package/dist/lang/id.umd.prod.js +6 -0
  204. package/dist/lang/is.umd.prod.js +6 -0
  205. package/dist/lang/it.umd.prod.js +6 -0
  206. package/dist/lang/ja.umd.prod.js +6 -0
  207. package/dist/lang/km.umd.prod.js +6 -0
  208. package/dist/lang/ko-KR.umd.prod.js +6 -0
  209. package/dist/lang/kur-CKB.umd.prod.js +6 -0
  210. package/dist/lang/lu.umd.prod.js +6 -0
  211. package/dist/lang/lv.umd.prod.js +6 -0
  212. package/dist/lang/ml.umd.prod.js +6 -0
  213. package/dist/lang/ms.umd.prod.js +6 -0
  214. package/dist/lang/nb-NO.umd.prod.js +6 -0
  215. package/dist/lang/nl.umd.prod.js +6 -0
  216. package/dist/lang/pl.umd.prod.js +6 -0
  217. package/dist/lang/pt-BR.umd.prod.js +6 -0
  218. package/dist/lang/pt.umd.prod.js +6 -0
  219. package/dist/lang/ro.umd.prod.js +6 -0
  220. package/dist/lang/ru.umd.prod.js +6 -0
  221. package/dist/lang/sk.umd.prod.js +6 -0
  222. package/dist/lang/sl.umd.prod.js +6 -0
  223. package/dist/lang/sr.umd.prod.js +6 -0
  224. package/dist/lang/sv.umd.prod.js +6 -0
  225. package/dist/lang/ta.umd.prod.js +6 -0
  226. package/dist/lang/th.umd.prod.js +6 -0
  227. package/dist/lang/tr.umd.prod.js +6 -0
  228. package/dist/lang/ug.umd.prod.js +6 -0
  229. package/dist/lang/uk.umd.prod.js +6 -0
  230. package/dist/lang/vi.umd.prod.js +6 -0
  231. package/dist/lang/zh-CN.umd.prod.js +6 -0
  232. package/dist/lang/zh-TW.umd.prod.js +6 -0
  233. package/dist/quasar.addon.css +6291 -0
  234. package/dist/quasar.addon.prod.css +1 -0
  235. package/dist/quasar.addon.rtl.css +9286 -0
  236. package/dist/quasar.addon.rtl.prod.css +1 -0
  237. package/dist/quasar.cjs.prod.js +6 -0
  238. package/dist/quasar.css +11392 -0
  239. package/dist/quasar.esm.prod.js +6 -0
  240. package/dist/quasar.prod.css +1 -0
  241. package/dist/quasar.rtl.css +13790 -0
  242. package/dist/quasar.rtl.prod.css +1 -0
  243. package/dist/quasar.sass +7314 -0
  244. package/dist/quasar.umd.js +38430 -0
  245. package/dist/quasar.umd.prod.js +6 -0
  246. package/dist/ssr-directives/Morph.js +55 -0
  247. package/dist/ssr-directives/index.js +14 -0
  248. package/dist/transforms/api-list.json +151 -0
  249. package/dist/transforms/auto-import.json +267 -0
  250. package/dist/transforms/import-map.json +178 -0
  251. package/dist/transforms/import-transformation.js +9 -0
  252. package/dist/transforms/loader-asset-urls.json +40 -0
  253. package/dist/types/api/cookies.d.ts +1 -0
  254. package/dist/types/api/web-storage.d.ts +30 -0
  255. package/dist/types/api.d.ts +2 -0
  256. package/dist/types/composables.d.ts +30 -0
  257. package/dist/types/extras/animations.d.ts +106 -0
  258. package/dist/types/extras/fonts.d.ts +1 -0
  259. package/dist/types/extras/icon-set.d.ts +123 -0
  260. package/dist/types/extras.d.ts +3 -0
  261. package/dist/types/feature-flag.d.ts +57 -0
  262. package/dist/types/globals.d.ts +69 -0
  263. package/dist/types/index.d.ts +8818 -0
  264. package/dist/types/lang.d.ts +131 -0
  265. package/dist/types/meta.d.ts +16 -0
  266. package/dist/types/plugin.d.ts +17 -0
  267. package/dist/types/shim-icon-set.d.ts +7 -0
  268. package/dist/types/shim-lang.d.ts +7 -0
  269. package/dist/types/ts-helpers.d.ts +22 -0
  270. package/dist/types/tsconfig.json +7 -0
  271. package/dist/types/typings.json +4 -0
  272. package/dist/types/utils/colors.d.ts +28 -0
  273. package/dist/types/utils/date.d.ts +50 -0
  274. package/dist/types/utils/dom.d.ts +14 -0
  275. package/dist/types/utils/event.d.ts +28 -0
  276. package/dist/types/utils/format.d.ts +7 -0
  277. package/dist/types/utils/scroll.d.ts +20 -0
  278. package/dist/types/utils.d.ts +138 -0
  279. package/dist/vetur/quasar-attributes.json +5522 -0
  280. package/dist/vetur/quasar-tags.json +1992 -0
  281. package/dist/web-types/web-types.json +18572 -0
  282. package/icon-set/bootstrap-icons.js +136 -0
  283. package/icon-set/eva-icons.js +186 -0
  284. package/icon-set/fontawesome-v5-pro.js +128 -0
  285. package/icon-set/fontawesome-v5.js +128 -0
  286. package/icon-set/ionicons-v4.js +180 -0
  287. package/icon-set/line-awesome.js +128 -0
  288. package/icon-set/material-icons-outlined.js +128 -0
  289. package/icon-set/material-icons-round.js +128 -0
  290. package/icon-set/material-icons-sharp.js +128 -0
  291. package/icon-set/material-icons.js +128 -0
  292. package/icon-set/mdi-v3.js +141 -0
  293. package/icon-set/mdi-v4.js +141 -0
  294. package/icon-set/mdi-v5.js +141 -0
  295. package/icon-set/mdi-v6.js +141 -0
  296. package/icon-set/svg-bootstrap-icons.js +211 -0
  297. package/icon-set/svg-eva-icons.js +234 -0
  298. package/icon-set/svg-fontawesome-v5.js +198 -0
  299. package/icon-set/svg-ionicons-v4.js +235 -0
  300. package/icon-set/svg-ionicons-v5.js +225 -0
  301. package/icon-set/svg-line-awesome.js +198 -0
  302. package/icon-set/svg-material-icons-outlined.js +203 -0
  303. package/icon-set/svg-material-icons-round.js +203 -0
  304. package/icon-set/svg-material-icons-sharp.js +203 -0
  305. package/icon-set/svg-material-icons.js +203 -0
  306. package/icon-set/svg-mdi-v4.js +218 -0
  307. package/icon-set/svg-mdi-v5.js +225 -0
  308. package/icon-set/svg-mdi-v6.js +225 -0
  309. package/icon-set/svg-themify.js +232 -0
  310. package/icon-set/themify.js +169 -0
  311. package/lang/ar.js +96 -0
  312. package/lang/az-Latn.js +91 -0
  313. package/lang/bg.js +91 -0
  314. package/lang/bn.js +91 -0
  315. package/lang/ca.js +91 -0
  316. package/lang/cs.js +102 -0
  317. package/lang/da.js +91 -0
  318. package/lang/de.js +91 -0
  319. package/lang/el.js +91 -0
  320. package/lang/en-GB.js +91 -0
  321. package/lang/en-US.js +91 -0
  322. package/lang/eo.js +91 -0
  323. package/lang/es.js +91 -0
  324. package/lang/et.js +91 -0
  325. package/lang/fa-IR.js +92 -0
  326. package/lang/fa.js +92 -0
  327. package/lang/fi.js +92 -0
  328. package/lang/fr.js +94 -0
  329. package/lang/gn.js +91 -0
  330. package/lang/he.js +92 -0
  331. package/lang/hr.js +91 -0
  332. package/lang/hu.js +91 -0
  333. package/lang/id.js +91 -0
  334. package/lang/index.json +210 -0
  335. package/lang/is.js +91 -0
  336. package/lang/it.js +91 -0
  337. package/lang/ja.js +90 -0
  338. package/lang/km.js +91 -0
  339. package/lang/ko-KR.js +91 -0
  340. package/lang/kur-CKB.js +101 -0
  341. package/lang/lu.js +91 -0
  342. package/lang/lv.js +91 -0
  343. package/lang/ml.js +95 -0
  344. package/lang/ms.js +91 -0
  345. package/lang/nb-NO.js +92 -0
  346. package/lang/nl.js +91 -0
  347. package/lang/pl.js +91 -0
  348. package/lang/pt-BR.js +91 -0
  349. package/lang/pt.js +91 -0
  350. package/lang/ro.js +91 -0
  351. package/lang/ru.js +95 -0
  352. package/lang/sk.js +91 -0
  353. package/lang/sl.js +91 -0
  354. package/lang/sr.js +91 -0
  355. package/lang/sv.js +91 -0
  356. package/lang/ta.js +91 -0
  357. package/lang/th.js +91 -0
  358. package/lang/tr.js +87 -0
  359. package/lang/ug.js +92 -0
  360. package/lang/uk.js +95 -0
  361. package/lang/vi.js +91 -0
  362. package/lang/zh-CN.js +90 -0
  363. package/lang/zh-TW.js +90 -0
  364. package/package.json +108 -0
  365. package/src/api-file-example.json +94 -0
  366. package/src/api.extends.json +264 -0
  367. package/src/body.js +109 -0
  368. package/src/components/ajax-bar/QAjaxBar.js +238 -0
  369. package/src/components/ajax-bar/QAjaxBar.json +76 -0
  370. package/src/components/ajax-bar/QAjaxBar.sass +27 -0
  371. package/src/components/ajax-bar/index.js +5 -0
  372. package/src/components/avatar/QAvatar.js +61 -0
  373. package/src/components/avatar/QAvatar.json +42 -0
  374. package/src/components/avatar/QAvatar.sass +22 -0
  375. package/src/components/avatar/index.js +5 -0
  376. package/src/components/badge/QBadge.js +59 -0
  377. package/src/components/badge/QBadge.json +65 -0
  378. package/src/components/badge/QBadge.sass +32 -0
  379. package/src/components/badge/index.js +5 -0
  380. package/src/components/banner/QBanner.js +57 -0
  381. package/src/components/banner/QBanner.json +39 -0
  382. package/src/components/banner/QBanner.sass +38 -0
  383. package/src/components/banner/index.js +5 -0
  384. package/src/components/bar/QBar.js +30 -0
  385. package/src/components/bar/QBar.json +22 -0
  386. package/src/components/bar/QBar.sass +31 -0
  387. package/src/components/bar/index.js +5 -0
  388. package/src/components/breadcrumbs/QBreadcrumbs.js +90 -0
  389. package/src/components/breadcrumbs/QBreadcrumbs.json +57 -0
  390. package/src/components/breadcrumbs/QBreadcrumbs.sass +16 -0
  391. package/src/components/breadcrumbs/QBreadcrumbsEl.js +57 -0
  392. package/src/components/breadcrumbs/QBreadcrumbsEl.json +36 -0
  393. package/src/components/breadcrumbs/index.js +7 -0
  394. package/src/components/btn/QBtn.js +362 -0
  395. package/src/components/btn/QBtn.json +70 -0
  396. package/src/components/btn/QBtn.sass +157 -0
  397. package/src/components/btn/index.js +5 -0
  398. package/src/components/btn/use-btn.js +195 -0
  399. package/src/components/btn/use-btn.json +172 -0
  400. package/src/components/btn-dropdown/QBtnDropdown.js +215 -0
  401. package/src/components/btn-dropdown/QBtnDropdown.json +138 -0
  402. package/src/components/btn-dropdown/QBtnDropdown.sass +15 -0
  403. package/src/components/btn-dropdown/index.js +5 -0
  404. package/src/components/btn-group/QBtnGroup.js +31 -0
  405. package/src/components/btn-group/QBtnGroup.json +61 -0
  406. package/src/components/btn-group/QBtnGroup.sass +85 -0
  407. package/src/components/btn-group/index.js +5 -0
  408. package/src/components/btn-toggle/QBtnToggle.js +166 -0
  409. package/src/components/btn-toggle/QBtnToggle.json +194 -0
  410. package/src/components/btn-toggle/QBtnToggle.sass +2 -0
  411. package/src/components/btn-toggle/index.js +5 -0
  412. package/src/components/card/QCard.js +37 -0
  413. package/src/components/card/QCard.json +35 -0
  414. package/src/components/card/QCard.sass +96 -0
  415. package/src/components/card/QCardActions.js +25 -0
  416. package/src/components/card/QCardActions.json +27 -0
  417. package/src/components/card/QCardSection.js +25 -0
  418. package/src/components/card/QCardSection.json +25 -0
  419. package/src/components/card/index.js +9 -0
  420. package/src/components/carousel/QCarousel.js +267 -0
  421. package/src/components/carousel/QCarousel.json +150 -0
  422. package/src/components/carousel/QCarousel.sass +126 -0
  423. package/src/components/carousel/QCarouselControl.js +36 -0
  424. package/src/components/carousel/QCarouselControl.json +34 -0
  425. package/src/components/carousel/QCarouselSlide.js +27 -0
  426. package/src/components/carousel/QCarouselSlide.json +36 -0
  427. package/src/components/carousel/index.js +9 -0
  428. package/src/components/chat/QChatMessage.js +155 -0
  429. package/src/components/chat/QChatMessage.json +115 -0
  430. package/src/components/chat/QChatMessage.sass +75 -0
  431. package/src/components/chat/index.js +5 -0
  432. package/src/components/checkbox/QCheckbox.js +35 -0
  433. package/src/components/checkbox/QCheckbox.json +7 -0
  434. package/src/components/checkbox/QCheckbox.sass +114 -0
  435. package/src/components/checkbox/index.js +5 -0
  436. package/src/components/checkbox/use-checkbox.js +236 -0
  437. package/src/components/checkbox/use-checkbox.json +127 -0
  438. package/src/components/chip/QChip.js +197 -0
  439. package/src/components/chip/QChip.json +146 -0
  440. package/src/components/chip/QChip.sass +83 -0
  441. package/src/components/chip/index.js +5 -0
  442. package/src/components/circular-progress/QCircularProgress.js +135 -0
  443. package/src/components/circular-progress/QCircularProgress.json +107 -0
  444. package/src/components/circular-progress/QCircularProgress.sass +38 -0
  445. package/src/components/circular-progress/index.js +5 -0
  446. package/src/components/circular-progress/use-circular-progress.js +38 -0
  447. package/src/components/color/QColor.js +830 -0
  448. package/src/components/color/QColor.json +96 -0
  449. package/src/components/color/QColor.sass +188 -0
  450. package/src/components/color/index.js +5 -0
  451. package/src/components/date/QDate.js +1450 -0
  452. package/src/components/date/QDate.json +439 -0
  453. package/src/components/date/QDate.sass +249 -0
  454. package/src/components/date/index.js +5 -0
  455. package/src/components/date/use-datetime.js +95 -0
  456. package/src/components/date/use-datetime.json +86 -0
  457. package/src/components/dialog/QDialog.js +402 -0
  458. package/src/components/dialog/QDialog.json +126 -0
  459. package/src/components/dialog/QDialog.sass +106 -0
  460. package/src/components/dialog/index.js +5 -0
  461. package/src/components/dialog-bottom-sheet/BottomSheet.js +177 -0
  462. package/src/components/dialog-bottom-sheet/BottomSheet.sass +37 -0
  463. package/src/components/dialog-plugin/DialogPlugin.js +323 -0
  464. package/src/components/dialog-plugin/DialogPlugin.sass +11 -0
  465. package/src/components/drawer/QDrawer.js +693 -0
  466. package/src/components/drawer/QDrawer.json +164 -0
  467. package/src/components/drawer/index.js +5 -0
  468. package/src/components/editor/QEditor.js +539 -0
  469. package/src/components/editor/QEditor.json +301 -0
  470. package/src/components/editor/QEditor.sass +83 -0
  471. package/src/components/editor/editor-caret.js +363 -0
  472. package/src/components/editor/editor-utils.js +287 -0
  473. package/src/components/editor/index.js +5 -0
  474. package/src/components/expansion-item/QExpansionItem.js +337 -0
  475. package/src/components/expansion-item/QExpansionItem.json +175 -0
  476. package/src/components/expansion-item/QExpansionItem.sass +72 -0
  477. package/src/components/expansion-item/index.js +5 -0
  478. package/src/components/fab/QFab.js +136 -0
  479. package/src/components/fab/QFab.json +73 -0
  480. package/src/components/fab/QFab.sass +154 -0
  481. package/src/components/fab/QFabAction.js +96 -0
  482. package/src/components/fab/QFabAction.json +59 -0
  483. package/src/components/fab/index.js +7 -0
  484. package/src/components/fab/use-fab.js +90 -0
  485. package/src/components/fab/use-fab.json +123 -0
  486. package/src/components/field/QField.js +17 -0
  487. package/src/components/field/QField.json +112 -0
  488. package/src/components/field/QField.sass +535 -0
  489. package/src/components/field/index.js +5 -0
  490. package/src/components/file/QFile.js +273 -0
  491. package/src/components/file/QFile.json +179 -0
  492. package/src/components/file/QFile.sass +19 -0
  493. package/src/components/file/index.js +5 -0
  494. package/src/components/footer/QFooter.js +200 -0
  495. package/src/components/footer/QFooter.json +60 -0
  496. package/src/components/footer/index.js +5 -0
  497. package/src/components/form/QForm.js +184 -0
  498. package/src/components/form/QForm.json +120 -0
  499. package/src/components/form/QForm.sass +2 -0
  500. package/src/components/form/QFormChildMixin.js +40 -0
  501. package/src/components/form/QFormChildMixin.json +22 -0
  502. package/src/components/form/index.js +7 -0
  503. package/src/components/header/QHeader.js +179 -0
  504. package/src/components/header/QHeader.json +70 -0
  505. package/src/components/header/index.js +5 -0
  506. package/src/components/icon/QIcon.js +202 -0
  507. package/src/components/icon/QIcon.json +45 -0
  508. package/src/components/icon/QIcon.sass +38 -0
  509. package/src/components/icon/index.js +5 -0
  510. package/src/components/img/QImg.js +287 -0
  511. package/src/components/img/QImg.json +225 -0
  512. package/src/components/img/QImg.sass +40 -0
  513. package/src/components/img/index.js +5 -0
  514. package/src/components/infinite-scroll/QInfiniteScroll.js +215 -0
  515. package/src/components/infinite-scroll/QInfiniteScroll.json +109 -0
  516. package/src/components/infinite-scroll/index.js +5 -0
  517. package/src/components/inner-loading/QInnerLoading.js +57 -0
  518. package/src/components/inner-loading/QInnerLoading.json +35 -0
  519. package/src/components/inner-loading/QInnerLoading.sass +4 -0
  520. package/src/components/inner-loading/index.js +5 -0
  521. package/src/components/input/QInput.js +394 -0
  522. package/src/components/input/QInput.json +131 -0
  523. package/src/components/input/QInput.sass +58 -0
  524. package/src/components/input/index.js +5 -0
  525. package/src/components/input/use-mask.js +543 -0
  526. package/src/components/input/use-mask.json +31 -0
  527. package/src/components/intersection/QIntersection.js +97 -0
  528. package/src/components/intersection/QIntersection.json +78 -0
  529. package/src/components/intersection/QIntersection.sass +2 -0
  530. package/src/components/intersection/index.js +5 -0
  531. package/src/components/item/QItem.js +156 -0
  532. package/src/components/item/QItem.json +65 -0
  533. package/src/components/item/QItem.sass +119 -0
  534. package/src/components/item/QItemLabel.js +42 -0
  535. package/src/components/item/QItemLabel.json +38 -0
  536. package/src/components/item/QItemSection.js +28 -0
  537. package/src/components/item/QItemSection.json +43 -0
  538. package/src/components/item/QList.js +34 -0
  539. package/src/components/item/QList.json +37 -0
  540. package/src/components/item/index.js +13 -0
  541. package/src/components/knob/QKnob.js +278 -0
  542. package/src/components/knob/QKnob.json +140 -0
  543. package/src/components/knob/QKnob.sass +21 -0
  544. package/src/components/knob/index.js +5 -0
  545. package/src/components/layout/QLayout.js +208 -0
  546. package/src/components/layout/QLayout.json +102 -0
  547. package/src/components/layout/QLayout.sass +181 -0
  548. package/src/components/layout/index.js +5 -0
  549. package/src/components/linear-progress/QLinearProgress.js +115 -0
  550. package/src/components/linear-progress/QLinearProgress.json +77 -0
  551. package/src/components/linear-progress/QLinearProgress.sass +71 -0
  552. package/src/components/linear-progress/index.js +5 -0
  553. package/src/components/markup-table/QMarkupTable.js +49 -0
  554. package/src/components/markup-table/QMarkupTable.json +48 -0
  555. package/src/components/markup-table/index.js +5 -0
  556. package/src/components/menu/QMenu.js +369 -0
  557. package/src/components/menu/QMenu.json +142 -0
  558. package/src/components/menu/QMenu.sass +16 -0
  559. package/src/components/menu/index.js +5 -0
  560. package/src/components/no-ssr/QNoSsr.js +46 -0
  561. package/src/components/no-ssr/QNoSsr.json +30 -0
  562. package/src/components/no-ssr/index.js +5 -0
  563. package/src/components/option-group/QOptionGroup.js +114 -0
  564. package/src/components/option-group/QOptionGroup.json +80 -0
  565. package/src/components/option-group/QOptionGroup.sass +5 -0
  566. package/src/components/option-group/index.js +5 -0
  567. package/src/components/page/QPage.js +55 -0
  568. package/src/components/page/QPage.json +44 -0
  569. package/src/components/page/QPageContainer.js +42 -0
  570. package/src/components/page/QPageContainer.json +11 -0
  571. package/src/components/page/index.js +7 -0
  572. package/src/components/page-scroller/QPageScroller.js +116 -0
  573. package/src/components/page-scroller/QPageScroller.json +36 -0
  574. package/src/components/page-scroller/index.js +5 -0
  575. package/src/components/page-sticky/QPageSticky.js +14 -0
  576. package/src/components/page-sticky/QPageSticky.json +39 -0
  577. package/src/components/page-sticky/index.js +5 -0
  578. package/src/components/page-sticky/use-page-sticky.js +117 -0
  579. package/src/components/pagination/QPagination.js +374 -0
  580. package/src/components/pagination/QPagination.json +254 -0
  581. package/src/components/pagination/QPagination.sass +9 -0
  582. package/src/components/pagination/index.js +5 -0
  583. package/src/components/parallax/QParallax.js +166 -0
  584. package/src/components/parallax/QParallax.json +73 -0
  585. package/src/components/parallax/QParallax.sass +15 -0
  586. package/src/components/parallax/index.js +5 -0
  587. package/src/components/popup-edit/QPopupEdit.js +193 -0
  588. package/src/components/popup-edit/QPopupEdit.json +283 -0
  589. package/src/components/popup-edit/QPopupEdit.sass +8 -0
  590. package/src/components/popup-edit/index.js +5 -0
  591. package/src/components/popup-proxy/QPopupProxy.js +104 -0
  592. package/src/components/popup-proxy/QPopupProxy.json +65 -0
  593. package/src/components/popup-proxy/index.js +5 -0
  594. package/src/components/pull-to-refresh/QPullToRefresh.js +213 -0
  595. package/src/components/pull-to-refresh/QPullToRefresh.json +66 -0
  596. package/src/components/pull-to-refresh/QPullToRefresh.sass +13 -0
  597. package/src/components/pull-to-refresh/index.js +5 -0
  598. package/src/components/radio/QRadio.js +179 -0
  599. package/src/components/radio/QRadio.json +94 -0
  600. package/src/components/radio/QRadio.sass +95 -0
  601. package/src/components/radio/index.js +5 -0
  602. package/src/components/range/QRange.js +529 -0
  603. package/src/components/range/QRange.json +208 -0
  604. package/src/components/range/index.js +5 -0
  605. package/src/components/rating/QRating.js +216 -0
  606. package/src/components/rating/QRating.json +110 -0
  607. package/src/components/rating/QRating.sass +29 -0
  608. package/src/components/rating/index.js +5 -0
  609. package/src/components/resize-observer/QResizeObserver.js +139 -0
  610. package/src/components/resize-observer/QResizeObserver.json +51 -0
  611. package/src/components/resize-observer/index.js +5 -0
  612. package/src/components/responsive/QResponsive.js +29 -0
  613. package/src/components/responsive/QResponsive.json +13 -0
  614. package/src/components/responsive/QResponsive.sass +19 -0
  615. package/src/components/responsive/index.js +5 -0
  616. package/src/components/scroll-area/QScrollArea.js +446 -0
  617. package/src/components/scroll-area/QScrollArea.json +300 -0
  618. package/src/components/scroll-area/QScrollArea.sass +37 -0
  619. package/src/components/scroll-area/index.js +5 -0
  620. package/src/components/scroll-observer/QScrollObserver.js +135 -0
  621. package/src/components/scroll-observer/QScrollObserver.json +115 -0
  622. package/src/components/scroll-observer/index.js +5 -0
  623. package/src/components/select/QSelect.js +1556 -0
  624. package/src/components/select/QSelect.json +789 -0
  625. package/src/components/select/QSelect.sass +64 -0
  626. package/src/components/select/index.js +5 -0
  627. package/src/components/separator/QSeparator.js +85 -0
  628. package/src/components/separator/QSeparator.json +42 -0
  629. package/src/components/separator/QSeparator.sass +32 -0
  630. package/src/components/separator/index.js +5 -0
  631. package/src/components/skeleton/QSkeleton.js +72 -0
  632. package/src/components/skeleton/QSkeleton.json +76 -0
  633. package/src/components/skeleton/QSkeleton.sass +140 -0
  634. package/src/components/skeleton/index.js +5 -0
  635. package/src/components/slide-item/QSlideItem.js +232 -0
  636. package/src/components/slide-item/QSlideItem.json +186 -0
  637. package/src/components/slide-item/QSlideItem.sass +41 -0
  638. package/src/components/slide-item/index.js +5 -0
  639. package/src/components/slide-transition/QSlideTransition.js +113 -0
  640. package/src/components/slide-transition/QSlideTransition.json +37 -0
  641. package/src/components/slide-transition/index.js +5 -0
  642. package/src/components/slider/QSlider.js +239 -0
  643. package/src/components/slider/QSlider.json +147 -0
  644. package/src/components/slider/QSlider.sass +225 -0
  645. package/src/components/slider/index.js +5 -0
  646. package/src/components/slider/use-slider.js +304 -0
  647. package/src/components/space/QSpace.js +11 -0
  648. package/src/components/space/QSpace.json +5 -0
  649. package/src/components/space/QSpace.sass +2 -0
  650. package/src/components/space/index.js +5 -0
  651. package/src/components/spinner/QSpinner.js +38 -0
  652. package/src/components/spinner/QSpinner.json +21 -0
  653. package/src/components/spinner/QSpinner.sass +34 -0
  654. package/src/components/spinner/QSpinnerAudio.js +88 -0
  655. package/src/components/spinner/QSpinnerAudio.json +3 -0
  656. package/src/components/spinner/QSpinnerBall.js +104 -0
  657. package/src/components/spinner/QSpinnerBall.json +3 -0
  658. package/src/components/spinner/QSpinnerBars.js +143 -0
  659. package/src/components/spinner/QSpinnerBars.json +3 -0
  660. package/src/components/spinner/QSpinnerBox.js +61 -0
  661. package/src/components/spinner/QSpinnerBox.json +3 -0
  662. package/src/components/spinner/QSpinnerClock.js +72 -0
  663. package/src/components/spinner/QSpinnerClock.json +3 -0
  664. package/src/components/spinner/QSpinnerComment.js +84 -0
  665. package/src/components/spinner/QSpinnerComment.json +3 -0
  666. package/src/components/spinner/QSpinnerCube.js +132 -0
  667. package/src/components/spinner/QSpinnerCube.json +3 -0
  668. package/src/components/spinner/QSpinnerDots.js +104 -0
  669. package/src/components/spinner/QSpinnerDots.json +3 -0
  670. package/src/components/spinner/QSpinnerFacebook.js +103 -0
  671. package/src/components/spinner/QSpinnerFacebook.json +3 -0
  672. package/src/components/spinner/QSpinnerGears.js +59 -0
  673. package/src/components/spinner/QSpinnerGears.json +3 -0
  674. package/src/components/spinner/QSpinnerGrid.js +152 -0
  675. package/src/components/spinner/QSpinnerGrid.json +3 -0
  676. package/src/components/spinner/QSpinnerHearts.js +54 -0
  677. package/src/components/spinner/QSpinnerHearts.json +3 -0
  678. package/src/components/spinner/QSpinnerHourglass.js +112 -0
  679. package/src/components/spinner/QSpinnerHourglass.json +3 -0
  680. package/src/components/spinner/QSpinnerInfinity.js +42 -0
  681. package/src/components/spinner/QSpinnerInfinity.json +3 -0
  682. package/src/components/spinner/QSpinnerIos.js +174 -0
  683. package/src/components/spinner/QSpinnerIos.json +3 -0
  684. package/src/components/spinner/QSpinnerOrbit.js +51 -0
  685. package/src/components/spinner/QSpinnerOrbit.json +3 -0
  686. package/src/components/spinner/QSpinnerOval.js +50 -0
  687. package/src/components/spinner/QSpinnerOval.json +3 -0
  688. package/src/components/spinner/QSpinnerPie.js +81 -0
  689. package/src/components/spinner/QSpinnerPie.json +3 -0
  690. package/src/components/spinner/QSpinnerPuff.js +83 -0
  691. package/src/components/spinner/QSpinnerPuff.json +3 -0
  692. package/src/components/spinner/QSpinnerRadio.js +76 -0
  693. package/src/components/spinner/QSpinnerRadio.json +3 -0
  694. package/src/components/spinner/QSpinnerRings.js +106 -0
  695. package/src/components/spinner/QSpinnerRings.json +3 -0
  696. package/src/components/spinner/QSpinnerTail.js +83 -0
  697. package/src/components/spinner/QSpinnerTail.json +3 -0
  698. package/src/components/spinner/__spinner-mixin.json +13 -0
  699. package/src/components/spinner/index.js +51 -0
  700. package/src/components/spinner/use-spinner.js +24 -0
  701. package/src/components/splitter/QSplitter.js +205 -0
  702. package/src/components/splitter/QSplitter.json +129 -0
  703. package/src/components/splitter/QSplitter.sass +54 -0
  704. package/src/components/splitter/index.js +5 -0
  705. package/src/components/stepper/QStep.js +132 -0
  706. package/src/components/stepper/QStep.json +101 -0
  707. package/src/components/stepper/QStepper.js +133 -0
  708. package/src/components/stepper/QStepper.json +108 -0
  709. package/src/components/stepper/QStepper.sass +210 -0
  710. package/src/components/stepper/QStepperNavigation.js +11 -0
  711. package/src/components/stepper/QStepperNavigation.json +11 -0
  712. package/src/components/stepper/StepHeader.js +165 -0
  713. package/src/components/stepper/index.js +9 -0
  714. package/src/components/tab-panels/QTabPanel.js +14 -0
  715. package/src/components/tab-panels/QTabPanel.json +19 -0
  716. package/src/components/tab-panels/QTabPanel.sass +5 -0
  717. package/src/components/tab-panels/QTabPanels.js +42 -0
  718. package/src/components/tab-panels/QTabPanels.json +13 -0
  719. package/src/components/tab-panels/index.js +7 -0
  720. package/src/components/table/QTable.js +1068 -0
  721. package/src/components/table/QTable.json +2318 -0
  722. package/src/components/table/QTable.sass +283 -0
  723. package/src/components/table/QTd.js +43 -0
  724. package/src/components/table/QTd.json +32 -0
  725. package/src/components/table/QTh.js +69 -0
  726. package/src/components/table/QTh.json +26 -0
  727. package/src/components/table/QTr.js +22 -0
  728. package/src/components/table/QTr.json +26 -0
  729. package/src/components/table/get-table-middle.js +7 -0
  730. package/src/components/table/index.js +11 -0
  731. package/src/components/table/table-column-selection.js +88 -0
  732. package/src/components/table/table-filter.js +35 -0
  733. package/src/components/table/table-pagination.js +213 -0
  734. package/src/components/table/table-row-expand.js +56 -0
  735. package/src/components/table/table-row-selection.js +87 -0
  736. package/src/components/table/table-sort.js +124 -0
  737. package/src/components/tabs/QRouteTab.js +36 -0
  738. package/src/components/tabs/QRouteTab.json +55 -0
  739. package/src/components/tabs/QTab.js +16 -0
  740. package/src/components/tabs/QTab.json +78 -0
  741. package/src/components/tabs/QTabs.js +465 -0
  742. package/src/components/tabs/QTabs.json +141 -0
  743. package/src/components/tabs/QTabs.sass +189 -0
  744. package/src/components/tabs/index.js +9 -0
  745. package/src/components/tabs/use-tab.js +199 -0
  746. package/src/components/time/QTime.js +918 -0
  747. package/src/components/time/QTime.json +174 -0
  748. package/src/components/time/QTime.sass +186 -0
  749. package/src/components/time/index.js +5 -0
  750. package/src/components/timeline/QTimeline.js +43 -0
  751. package/src/components/timeline/QTimeline.json +37 -0
  752. package/src/components/timeline/QTimeline.sass +243 -0
  753. package/src/components/timeline/QTimelineEntry.js +110 -0
  754. package/src/components/timeline/QTimelineEntry.json +84 -0
  755. package/src/components/timeline/index.js +7 -0
  756. package/src/components/toggle/QToggle.js +56 -0
  757. package/src/components/toggle/QToggle.json +39 -0
  758. package/src/components/toggle/QToggle.sass +132 -0
  759. package/src/components/toggle/index.js +5 -0
  760. package/src/components/toolbar/QToolbar.js +20 -0
  761. package/src/components/toolbar/QToolbar.json +19 -0
  762. package/src/components/toolbar/QToolbar.sass +25 -0
  763. package/src/components/toolbar/QToolbarTitle.js +20 -0
  764. package/src/components/toolbar/QToolbarTitle.json +19 -0
  765. package/src/components/toolbar/index.js +7 -0
  766. package/src/components/tooltip/QTooltip.js +309 -0
  767. package/src/components/tooltip/QTooltip.json +113 -0
  768. package/src/components/tooltip/QTooltip.sass +18 -0
  769. package/src/components/tooltip/index.js +5 -0
  770. package/src/components/tree/QTree.js +694 -0
  771. package/src/components/tree/QTree.json +524 -0
  772. package/src/components/tree/QTree.sass +132 -0
  773. package/src/components/tree/index.js +5 -0
  774. package/src/components/uploader/QUploader.js +4 -0
  775. package/src/components/uploader/QUploader.json +144 -0
  776. package/src/components/uploader/QUploader.sass +134 -0
  777. package/src/components/uploader/QUploaderAddTrigger.js +13 -0
  778. package/src/components/uploader/QUploaderAddTrigger.json +5 -0
  779. package/src/components/uploader/index.js +7 -0
  780. package/src/components/uploader/uploader-core.js +481 -0
  781. package/src/components/uploader/xhr-uploader-plugin.js +258 -0
  782. package/src/components/uploader/xhr-uploader-plugin.json +203 -0
  783. package/src/components/video/QVideo.js +36 -0
  784. package/src/components/video/QVideo.json +19 -0
  785. package/src/components/video/QVideo.sass +24 -0
  786. package/src/components/video/index.js +5 -0
  787. package/src/components/virtual-scroll/QVirtualScroll.js +161 -0
  788. package/src/components/virtual-scroll/QVirtualScroll.json +95 -0
  789. package/src/components/virtual-scroll/QVirtualScroll.sass +40 -0
  790. package/src/components/virtual-scroll/index.js +5 -0
  791. package/src/components/virtual-scroll/use-virtual-scroll.js +727 -0
  792. package/src/components/virtual-scroll/use-virtual-scroll.json +141 -0
  793. package/src/components.js +79 -0
  794. package/src/composables/private/use-align.js +31 -0
  795. package/src/composables/private/use-anchor.js +208 -0
  796. package/src/composables/private/use-anchor.json +29 -0
  797. package/src/composables/private/use-cache.js +21 -0
  798. package/src/composables/private/use-can-render.js +16 -0
  799. package/src/composables/private/use-dark.js +17 -0
  800. package/src/composables/private/use-field.js +589 -0
  801. package/src/composables/private/use-field.json +246 -0
  802. package/src/composables/private/use-file-dom-props.js +44 -0
  803. package/src/composables/private/use-file.js +201 -0
  804. package/src/composables/private/use-file.json +106 -0
  805. package/src/composables/private/use-form.js +29 -0
  806. package/src/composables/private/use-form.json +10 -0
  807. package/src/composables/private/use-fullscreen.js +101 -0
  808. package/src/composables/private/use-fullscreen.json +32 -0
  809. package/src/composables/private/use-history.js +31 -0
  810. package/src/composables/private/use-key-composition.js +26 -0
  811. package/src/composables/private/use-model-toggle.js +151 -0
  812. package/src/composables/private/use-model-toggle.json +51 -0
  813. package/src/composables/private/use-panel.child.json +17 -0
  814. package/src/composables/private/use-panel.js +277 -0
  815. package/src/composables/private/use-panel.json +142 -0
  816. package/src/composables/private/use-panel.sass +11 -0
  817. package/src/composables/private/use-portal.js +100 -0
  818. package/src/composables/private/use-portal.json +3 -0
  819. package/src/composables/private/use-prevent-scroll.js +17 -0
  820. package/src/composables/private/use-ratio.js +18 -0
  821. package/src/composables/private/use-ratio.json +14 -0
  822. package/src/composables/private/use-refocus-target.js +33 -0
  823. package/src/composables/private/use-router-link.js +213 -0
  824. package/src/composables/private/use-router-link.json +43 -0
  825. package/src/composables/private/use-scroll-target.js +46 -0
  826. package/src/composables/private/use-size.js +22 -0
  827. package/src/composables/private/use-size.json +10 -0
  828. package/src/composables/private/use-split-attrs.js +33 -0
  829. package/src/composables/private/use-tick.js +39 -0
  830. package/src/composables/private/use-timeout.js +20 -0
  831. package/src/composables/private/use-transition.js +35 -0
  832. package/src/composables/private/use-transition.json +21 -0
  833. package/src/composables/private/use-validate.js +215 -0
  834. package/src/composables/private/use-validate.json +77 -0
  835. package/src/composables/use-dialog-plugin-component.js +39 -0
  836. package/src/composables/use-form-child.js +35 -0
  837. package/src/composables/use-meta.js +49 -0
  838. package/src/composables/use-quasar.js +10 -0
  839. package/src/composables.js +11 -0
  840. package/src/css/core/animations.sass +90 -0
  841. package/src/css/core/colors.sass +1788 -0
  842. package/src/css/core/dark.sass +7 -0
  843. package/src/css/core/elevation.sass +27 -0
  844. package/src/css/core/flex.sass +158 -0
  845. package/src/css/core/helpers.sass +61 -0
  846. package/src/css/core/mouse.sass +40 -0
  847. package/src/css/core/orientation.sass +18 -0
  848. package/src/css/core/positioning.sass +101 -0
  849. package/src/css/core/size.sass +75 -0
  850. package/src/css/core/touch.sass +9 -0
  851. package/src/css/core/transitions.sass +153 -0
  852. package/src/css/core/typography.sass +70 -0
  853. package/src/css/core/visibility.sass +163 -0
  854. package/src/css/flex-addon.sass +212 -0
  855. package/src/css/helpers/math.sass +42 -0
  856. package/src/css/helpers/string.sass +17 -0
  857. package/src/css/index.sass +102 -0
  858. package/src/css/normalize.sass +177 -0
  859. package/src/css/variables.sass +550 -0
  860. package/src/directives/ClosePopup.js +66 -0
  861. package/src/directives/ClosePopup.json +17 -0
  862. package/src/directives/Intersection.js +90 -0
  863. package/src/directives/Intersection.json +231 -0
  864. package/src/directives/Morph.js +211 -0
  865. package/src/directives/Morph.json +177 -0
  866. package/src/directives/Morph.sass +7 -0
  867. package/src/directives/Morph.ssr.js +45 -0
  868. package/src/directives/Mutation.js +63 -0
  869. package/src/directives/Mutation.json +124 -0
  870. package/src/directives/Ripple.js +141 -0
  871. package/src/directives/Ripple.json +105 -0
  872. package/src/directives/Ripple.sass +29 -0
  873. package/src/directives/Scroll.js +49 -0
  874. package/src/directives/Scroll.json +24 -0
  875. package/src/directives/ScrollFire.js +65 -0
  876. package/src/directives/ScrollFire.json +19 -0
  877. package/src/directives/TouchHold.js +159 -0
  878. package/src/directives/TouchHold.json +82 -0
  879. package/src/directives/TouchPan.js +410 -0
  880. package/src/directives/TouchPan.json +187 -0
  881. package/src/directives/TouchRepeat.js +241 -0
  882. package/src/directives/TouchRepeat.json +153 -0
  883. package/src/directives/TouchSwipe.js +265 -0
  884. package/src/directives/TouchSwipe.json +113 -0
  885. package/src/directives.js +25 -0
  886. package/src/history.js +118 -0
  887. package/src/icon-set.js +60 -0
  888. package/src/index.all.js +25 -0
  889. package/src/index.umd.js +28 -0
  890. package/src/install-quasar.js +137 -0
  891. package/src/lang.js +100 -0
  892. package/src/plugins/AddressbarColor.js +69 -0
  893. package/src/plugins/AddressbarColor.json +21 -0
  894. package/src/plugins/AppFullscreen.js +110 -0
  895. package/src/plugins/AppFullscreen.json +74 -0
  896. package/src/plugins/AppVisibility.js +40 -0
  897. package/src/plugins/AppVisibility.json +16 -0
  898. package/src/plugins/BottomSheet.js +13 -0
  899. package/src/plugins/BottomSheet.json +91 -0
  900. package/src/plugins/Cookies.js +204 -0
  901. package/src/plugins/Cookies.json +160 -0
  902. package/src/plugins/Dark.js +98 -0
  903. package/src/plugins/Dark.json +40 -0
  904. package/src/plugins/Dialog.js +13 -0
  905. package/src/plugins/Dialog.json +322 -0
  906. package/src/plugins/Loading.js +151 -0
  907. package/src/plugins/Loading.json +182 -0
  908. package/src/plugins/Loading.sass +26 -0
  909. package/src/plugins/LoadingBar.js +67 -0
  910. package/src/plugins/LoadingBar.json +58 -0
  911. package/src/plugins/LocalStorage.js +16 -0
  912. package/src/plugins/LocalStorage.json +5 -0
  913. package/src/plugins/Meta.js +257 -0
  914. package/src/plugins/Meta.json +5 -0
  915. package/src/plugins/Notify.js +513 -0
  916. package/src/plugins/Notify.json +838 -0
  917. package/src/plugins/Notify.sass +203 -0
  918. package/src/plugins/Platform.js +366 -0
  919. package/src/plugins/Platform.json +73 -0
  920. package/src/plugins/Screen.js +176 -0
  921. package/src/plugins/Screen.json +192 -0
  922. package/src/plugins/SessionStorage.js +16 -0
  923. package/src/plugins/SessionStorage.json +5 -0
  924. package/src/plugins.js +33 -0
  925. package/src/utils/clone.js +6 -0
  926. package/src/utils/colors.js +295 -0
  927. package/src/utils/copy-to-clipboard.js +29 -0
  928. package/src/utils/create-meta-mixin.js +67 -0
  929. package/src/utils/create-uploader-component.js +21 -0
  930. package/src/utils/date.js +888 -0
  931. package/src/utils/debounce.js +26 -0
  932. package/src/utils/dom.js +98 -0
  933. package/src/utils/event.js +170 -0
  934. package/src/utils/export-file.js +65 -0
  935. package/src/utils/extend.js +83 -0
  936. package/src/utils/format.js +56 -0
  937. package/src/utils/frame-debounce.js +22 -0
  938. package/src/utils/get-css-var.js +11 -0
  939. package/src/utils/morph.js +987 -0
  940. package/src/utils/open-url.js +62 -0
  941. package/src/utils/patterns.js +31 -0
  942. package/src/utils/prevent-scroll.js +195 -0
  943. package/src/utils/private/click-outside.js +81 -0
  944. package/src/utils/private/date-persian.js +281 -0
  945. package/src/utils/private/define-reactive-plugin.js +21 -0
  946. package/src/utils/private/escape-key.js +53 -0
  947. package/src/utils/private/focus-manager.js +36 -0
  948. package/src/utils/private/focusout.js +28 -0
  949. package/src/utils/private/global-config.js +7 -0
  950. package/src/utils/private/global-dialog.js +161 -0
  951. package/src/utils/private/global-dialog.json +123 -0
  952. package/src/utils/private/global-nodes.js +43 -0
  953. package/src/utils/private/is.js +150 -0
  954. package/src/utils/private/key-composition.js +18 -0
  955. package/src/utils/private/noop-ssr-directive-transform.js +1 -0
  956. package/src/utils/private/option-sizes.js +7 -0
  957. package/src/utils/private/portal.js +56 -0
  958. package/src/utils/private/position-engine.js +244 -0
  959. package/src/utils/private/render.js +63 -0
  960. package/src/utils/private/selection.js +17 -0
  961. package/src/utils/private/sort.js +20 -0
  962. package/src/utils/private/symbols.js +9 -0
  963. package/src/utils/private/touch.js +55 -0
  964. package/src/utils/private/vm.js +38 -0
  965. package/src/utils/private/web-storage.js +135 -0
  966. package/src/utils/private/web-storage.json +150 -0
  967. package/src/utils/scroll.js +198 -0
  968. package/src/utils/set-css-var.js +13 -0
  969. package/src/utils/throttle.js +13 -0
  970. package/src/utils/uid.js +72 -0
  971. package/src/utils.js +46 -0
  972. package/src/vue-plugin.js +10 -0
  973. package/wrappers/index.js +31 -0
@@ -0,0 +1,96 @@
1
+ {
2
+ "mixins": [ "composables/private/use-form" ],
3
+
4
+ "meta": {
5
+ "docsUrl": "https://v2.quasar.dev/vue-components/color-picker"
6
+ },
7
+
8
+ "props": {
9
+ "model-value": {
10
+ "extends": "model-value",
11
+ "type": "String",
12
+ "examples": [ "v-model=\"myColor\"" ]
13
+ },
14
+
15
+ "default-value": {
16
+ "type": "String",
17
+ "desc": "The default value to show when the model doesn't have one",
18
+ "examples": [ "default-value=\"#c0c0c0\"" ],
19
+ "category": "model"
20
+ },
21
+
22
+ "default-view": {
23
+ "type": "String",
24
+ "desc": "The default view of the picker",
25
+ "default": "spectrum",
26
+ "values": [ "spectrum", "tune", "palette" ],
27
+ "category": "behavior"
28
+ },
29
+
30
+ "format-model": {
31
+ "type": "String",
32
+ "desc": "Forces a certain model format upon the model",
33
+ "default": "auto",
34
+ "values": [ "auto", "hex", "rgb", "hexa", "rgba" ],
35
+ "examples": [ "hex" ],
36
+ "category": "model"
37
+ },
38
+
39
+ "palette": {
40
+ "type": "Array",
41
+ "desc": "Use a custom palette of colors for the palette tab",
42
+ "default": "(hard-coded palette)",
43
+ "examples": [
44
+ ":palette=\"[ '#019A9D', '#D9B801', 'rgb(23,120,0)', '#B2028A' ]\""
45
+ ],
46
+ "category": "content"
47
+ },
48
+
49
+ "square": {
50
+ "extends": "square"
51
+ },
52
+
53
+ "flat": {
54
+ "extends": "flat"
55
+ },
56
+
57
+ "bordered": {
58
+ "extends": "bordered"
59
+ },
60
+
61
+ "no-header": {
62
+ "type": "Boolean",
63
+ "desc": "Do not render header",
64
+ "category": "content"
65
+ },
66
+
67
+ "no-footer": {
68
+ "type": "Boolean",
69
+ "desc": "Do not render footer; Useful when you want a specific view ('default-view' prop) and don't want the user to be able to switch it",
70
+ "category": "content"
71
+ },
72
+
73
+ "disable": {
74
+ "extends": "disable"
75
+ },
76
+
77
+ "readonly": {
78
+ "extends": "readonly"
79
+ },
80
+
81
+ "dark": {
82
+ "extends": "dark"
83
+ }
84
+ },
85
+
86
+ "events": {
87
+ "update:model-value": {
88
+ "extends": "update:model-value"
89
+ },
90
+
91
+ "change": {
92
+ "extends": "update:model-value",
93
+ "desc": "Emitted on lazy model value change (after user finishes selecting a color)"
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,188 @@
1
+ .q-color-picker
2
+ overflow: hidden
3
+ background: #fff
4
+ max-width: 350px
5
+ vertical-align: top
6
+
7
+ min-width: 180px
8
+
9
+ border-radius: $generic-border-radius
10
+ box-shadow: $shadow-2
11
+
12
+ .q-tab
13
+ padding: 0 !important
14
+
15
+ &--bordered
16
+ border: 1px solid $separator-color
17
+
18
+ &__header
19
+ height: 68px
20
+
21
+ input
22
+ line-height: 24px
23
+ border: 0
24
+
25
+ .q-tab
26
+ min-height: 32px !important
27
+ height: 32px !important
28
+
29
+ &--inactive
30
+ background: linear-gradient(to top, rgba(0,0,0,.3) 0%, rgba(0,0,0,.15) 25%, rgba(0,0,0,.1))
31
+
32
+ &__error-icon
33
+ bottom: 2px
34
+ right: 2px
35
+ font-size: 24px
36
+ opacity: 0
37
+ transition: opacity .3s ease-in
38
+
39
+ &__header-content
40
+ position: relative
41
+ background: #fff
42
+
43
+ &--light
44
+ color: #000
45
+
46
+ &--dark
47
+ color: #fff
48
+ .q-tab--inactive
49
+ &:before
50
+ content: ''
51
+ position: absolute
52
+ top: 0
53
+ right: 0
54
+ bottom: 0
55
+ left: 0
56
+ background: rgba(255,255,255,.2)
57
+
58
+ &__header-banner
59
+ height: 36px
60
+ &__header-bg
61
+ background: #fff
62
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==') !important
63
+
64
+ &__footer
65
+ height: 36px
66
+
67
+ .q-tab
68
+ min-height: 36px !important
69
+ height: 36px !important
70
+
71
+ &--inactive
72
+ background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.15) 25%, rgba(0,0,0,.1))
73
+
74
+ /* Saturation Tab */
75
+
76
+ &__spectrum
77
+ width: 100%
78
+ height: 100%
79
+
80
+ &__spectrum-tab
81
+ padding: 0 !important
82
+
83
+ &__spectrum-white
84
+ background: linear-gradient(to right, #fff, rgba(255,255,255,0))
85
+
86
+ &__spectrum-black
87
+ background: linear-gradient(to top, #000, rgba(0,0,0,0))
88
+
89
+ &__spectrum-circle
90
+ width: 10px
91
+ height: 10px
92
+ box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3), 0 0 1px 2px rgba(0,0,0,.4)
93
+ border-radius: 50%
94
+ transform: translate(-5px, -5px)
95
+
96
+ &__hue .q-slider__track-container
97
+ background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important // @stylint ignore
98
+ opacity: 1
99
+
100
+ &__alpha .q-slider__track-container
101
+ color: #fff
102
+ opacity: 1
103
+ height: 8px
104
+ background-color: #fff !important
105
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==') !important
106
+ &:after
107
+ content: ''
108
+ position: absolute
109
+ top: 0
110
+ right: 0
111
+ bottom: 0
112
+ left: 0
113
+ background: linear-gradient(90deg, rgba(255,255,255,0), $grey-7)
114
+
115
+ &__sliders
116
+ padding: 4px 16px 16px
117
+
118
+ .q-slider__track-container
119
+ height: 10px
120
+ margin-top: -5px
121
+
122
+ .q-slider__track
123
+ display: none
124
+
125
+ .q-slider__thumb
126
+ path
127
+ stroke-width: 2px
128
+ fill: transparent
129
+ .q-slider--active path
130
+ stroke-width: 3px
131
+
132
+ .q-slider
133
+ height: 16px
134
+ margin-top: 8px
135
+ color: $grey-9
136
+
137
+ /* Tune Tab */
138
+
139
+ &__tune-tab
140
+
141
+ .q-slider
142
+ margin-left: 18px
143
+ margin-right: 18px
144
+
145
+ input
146
+ font-size: 11px
147
+ border: 1px solid $grey-4
148
+ border-radius: $generic-border-radius
149
+ width: 3.5em
150
+
151
+ /* Palette Tab */
152
+
153
+ &__palette-tab
154
+ padding: 0 !important
155
+
156
+ &__palette-rows
157
+ &--editable .q-color-picker__cube
158
+ cursor: pointer
159
+
160
+ &__cube
161
+ padding-bottom: 10%
162
+ width: 10% !important
163
+
164
+ /* Generic */
165
+
166
+ input
167
+ color: inherit
168
+ background: transparent
169
+ outline: 0
170
+ text-align: center
171
+ .q-tabs
172
+ overflow: hidden
173
+ .q-tab--active
174
+ box-shadow: 0 0 14px 3px rgba(0,0,0,.2)
175
+ .q-focus-helper
176
+ display: none
177
+ .q-tab__indicator
178
+ display: none
179
+ .q-tab-panels
180
+ background: inherit
181
+
182
+ &--dark
183
+
184
+ .q-color-picker__tune-tab input
185
+ border: 1px solid rgba(#fff, .3)
186
+
187
+ .q-slider
188
+ color: $grey-5
@@ -0,0 +1,5 @@
1
+ import QColor from './QColor.js'
2
+
3
+ export {
4
+ QColor
5
+ }
@@ -0,0 +1,1450 @@
1
+ import { h, defineComponent, ref, computed, watch, Transition, nextTick, getCurrentInstance } from 'vue'
2
+
3
+ import QBtn from '../btn/QBtn.js'
4
+
5
+ import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
6
+ import useCache from '../../composables/private/use-cache.js'
7
+ import { useFormProps, useFormAttrs, useFormInject } from '../../composables/private/use-form.js'
8
+ import useDatetime, { useDatetimeProps, useDatetimeEmits, getDayHash } from './use-datetime.js'
9
+
10
+ import { hSlot } from '../../utils/private/render.js'
11
+ import { formatDate, __splitDate, getDateDiff } from '../../utils/date.js'
12
+ import { pad } from '../../utils/format.js'
13
+ import { jalaaliMonthLength, toGregorian } from '../../utils/private/date-persian.js'
14
+
15
+ const yearsInterval = 20
16
+ const views = [ 'Calendar', 'Years', 'Months' ]
17
+ const viewIsValid = v => views.includes(v)
18
+ const yearMonthValidator = v => /^-?[\d]+\/[0-1]\d$/.test(v)
19
+ const lineStr = ' \u2014 '
20
+
21
+ function getMonthHash (date) {
22
+ return date.year + '/' + pad(date.month)
23
+ }
24
+
25
+ export default defineComponent({
26
+ name: 'QDate',
27
+
28
+ props: {
29
+ ...useDatetimeProps,
30
+ ...useFormProps,
31
+ ...useDarkProps,
32
+
33
+ multiple: Boolean,
34
+ range: Boolean,
35
+
36
+ title: String,
37
+ subtitle: String,
38
+
39
+ mask: {
40
+ // this mask is forced
41
+ // when using persian calendar
42
+ default: 'YYYY/MM/DD'
43
+ },
44
+
45
+ defaultYearMonth: {
46
+ type: String,
47
+ validator: yearMonthValidator
48
+ },
49
+
50
+ yearsInMonthView: Boolean,
51
+
52
+ events: [ Array, Function ],
53
+ eventColor: [ String, Function ],
54
+
55
+ emitImmediately: Boolean,
56
+
57
+ options: [ Array, Function ],
58
+
59
+ navigationMinYearMonth: {
60
+ type: String,
61
+ validator: yearMonthValidator
62
+ },
63
+
64
+ navigationMaxYearMonth: {
65
+ type: String,
66
+ validator: yearMonthValidator
67
+ },
68
+
69
+ noUnset: Boolean,
70
+
71
+ firstDayOfWeek: [ String, Number ],
72
+ todayBtn: Boolean,
73
+ minimal: Boolean,
74
+ defaultView: {
75
+ type: String,
76
+ default: 'Calendar',
77
+ validator: viewIsValid
78
+ }
79
+ },
80
+
81
+ emits: [
82
+ ...useDatetimeEmits,
83
+ 'range-start', 'range-end', 'navigation'
84
+ ],
85
+
86
+ setup (props, { slots, emit }) {
87
+ const { proxy } = getCurrentInstance()
88
+ const { $q } = proxy
89
+
90
+ const isDark = useDark(props, $q)
91
+ const { getCache } = useCache()
92
+ const { tabindex, headerClass, getLocale, getCurrentDate } = useDatetime(props, $q)
93
+
94
+ let lastEmitValue
95
+
96
+ const formAttrs = useFormAttrs(props)
97
+ const injectFormInput = useFormInject(formAttrs)
98
+
99
+ const blurTargetRef = ref(null)
100
+ const innerMask = ref(getMask())
101
+ const innerLocale = ref(getLocale())
102
+
103
+ const mask = computed(() => getMask())
104
+ const locale = computed(() => getLocale())
105
+
106
+ const today = computed(() => getCurrentDate())
107
+
108
+ // model of current calendar view:
109
+ const viewModel = ref(getViewModel(innerMask.value, innerLocale.value))
110
+
111
+ const view = ref(props.defaultView)
112
+
113
+ const direction = $q.lang.rtl === true ? 'right' : 'left'
114
+ const monthDirection = ref(direction.value)
115
+ const yearDirection = ref(direction.value)
116
+
117
+ const year = viewModel.value.year
118
+ const startYear = ref(year - (year % yearsInterval) - (year < 0 ? yearsInterval : 0))
119
+ const editRange = ref(null)
120
+
121
+ const classes = computed(() => {
122
+ const type = props.landscape === true ? 'landscape' : 'portrait'
123
+ return `q-date q-date--${ type } q-date--${ type }-${ props.minimal === true ? 'minimal' : 'standard' }`
124
+ + (isDark.value === true ? ' q-date--dark q-dark' : '')
125
+ + (props.bordered === true ? ' q-date--bordered' : '')
126
+ + (props.square === true ? ' q-date--square no-border-radius' : '')
127
+ + (props.flat === true ? ' q-date--flat no-shadow' : '')
128
+ + (props.disable === true ? ' disabled' : (props.readonly === true ? ' q-date--readonly' : ''))
129
+ })
130
+
131
+ const computedColor = computed(() => {
132
+ return props.color || 'primary'
133
+ })
134
+
135
+ const computedTextColor = computed(() => {
136
+ return props.textColor || 'white'
137
+ })
138
+
139
+ const isImmediate = computed(() =>
140
+ props.emitImmediately === true
141
+ && props.multiple !== true
142
+ && props.range !== true
143
+ )
144
+
145
+ const normalizedModel = computed(() => (
146
+ Array.isArray(props.modelValue) === true
147
+ ? props.modelValue
148
+ : (props.modelValue !== null && props.modelValue !== void 0 ? [ props.modelValue ] : [])
149
+ ))
150
+
151
+ const daysModel = computed(() =>
152
+ normalizedModel.value
153
+ .filter(date => typeof date === 'string')
154
+ .map(date => decodeString(date, innerMask.value, innerLocale.value))
155
+ .filter(date => date.dateHash !== null)
156
+ )
157
+
158
+ const rangeModel = computed(() => {
159
+ const fn = date => decodeString(date, innerMask.value, innerLocale.value)
160
+ return normalizedModel.value
161
+ .filter(date => Object(date) === date && date.from !== void 0 && date.to !== void 0)
162
+ .map(range => ({ from: fn(range.from), to: fn(range.to) }))
163
+ .filter(range => range.from.dateHash !== null && range.to.dateHash !== null && range.from.dateHash < range.to.dateHash)
164
+ })
165
+
166
+ const getNativeDateFn = computed(() => (
167
+ props.calendar !== 'persian'
168
+ ? model => new Date(model.year, model.month - 1, model.day)
169
+ : model => {
170
+ const gDate = toGregorian(model.year, model.month, model.day)
171
+ return new Date(gDate.gy, gDate.gm - 1, gDate.gd)
172
+ }
173
+ ))
174
+
175
+ const encodeObjectFn = computed(() => (
176
+ props.calendar === 'persian'
177
+ ? getDayHash
178
+ : (date, mask, locale) => formatDate(
179
+ new Date(
180
+ date.year,
181
+ date.month - 1,
182
+ date.day,
183
+ date.hour,
184
+ date.minute,
185
+ date.second,
186
+ date.millisecond
187
+ ),
188
+ mask === void 0 ? innerMask.value : mask,
189
+ locale === void 0 ? innerLocale.value : locale,
190
+ date.year,
191
+ date.timezoneOffset
192
+ )
193
+ ))
194
+
195
+ const daysInModel = computed(() =>
196
+ daysModel.value.length + rangeModel.value.reduce(
197
+ (acc, range) => acc + 1 + getDateDiff(
198
+ getNativeDateFn.value(range.to),
199
+ getNativeDateFn.value(range.from)
200
+ ),
201
+ 0
202
+ )
203
+ )
204
+
205
+ const headerTitle = computed(() => {
206
+ if (props.title !== void 0 && props.title !== null && props.title.length > 0) {
207
+ return props.title
208
+ }
209
+
210
+ if (editRange.value !== null) {
211
+ const model = editRange.value.init
212
+ const date = getNativeDateFn.value(model)
213
+
214
+ return innerLocale.value.daysShort[ date.getDay() ] + ', '
215
+ + innerLocale.value.monthsShort[ model.month - 1 ] + ' '
216
+ + model.day + lineStr + '?'
217
+ }
218
+
219
+ if (daysInModel.value === 0) {
220
+ return lineStr
221
+ }
222
+
223
+ if (daysInModel.value > 1) {
224
+ return `${ daysInModel.value } ${ innerLocale.value.pluralDay }`
225
+ }
226
+
227
+ const model = daysModel.value[ 0 ]
228
+ const date = getNativeDateFn.value(model)
229
+
230
+ if (isNaN(date.valueOf()) === true) {
231
+ return lineStr
232
+ }
233
+
234
+ if (innerLocale.value.headerTitle !== void 0) {
235
+ return innerLocale.value.headerTitle(date, model)
236
+ }
237
+
238
+ return innerLocale.value.daysShort[ date.getDay() ] + ', '
239
+ + innerLocale.value.monthsShort[ model.month - 1 ] + ' '
240
+ + model.day
241
+ })
242
+
243
+ const minSelectedModel = computed(() => {
244
+ const model = daysModel.value.concat(rangeModel.value.map(range => range.from))
245
+ .sort((a, b) => a.year - b.year || a.month - b.month)
246
+
247
+ return model[ 0 ]
248
+ })
249
+
250
+ const maxSelectedModel = computed(() => {
251
+ const model = daysModel.value.concat(rangeModel.value.map(range => range.to))
252
+ .sort((a, b) => b.year - a.year || b.month - a.month)
253
+
254
+ return model[ 0 ]
255
+ })
256
+
257
+ const headerSubtitle = computed(() => {
258
+ if (props.subtitle !== void 0 && props.subtitle !== null && props.subtitle.length > 0) {
259
+ return props.subtitle
260
+ }
261
+
262
+ if (daysInModel.value === 0) {
263
+ return lineStr
264
+ }
265
+
266
+ if (daysInModel.value > 1) {
267
+ const from = minSelectedModel.value
268
+ const to = maxSelectedModel.value
269
+ const month = innerLocale.value.monthsShort
270
+
271
+ return month[ from.month - 1 ] + (
272
+ from.year !== to.year
273
+ ? ' ' + from.year + lineStr + month[ to.month - 1 ] + ' '
274
+ : (
275
+ from.month !== to.month
276
+ ? lineStr + month[ to.month - 1 ]
277
+ : ''
278
+ )
279
+ ) + ' ' + to.year
280
+ }
281
+
282
+ return daysModel.value[ 0 ].year
283
+ })
284
+
285
+ const dateArrow = computed(() => {
286
+ const val = [ $q.iconSet.datetime.arrowLeft, $q.iconSet.datetime.arrowRight ]
287
+ return $q.lang.rtl === true ? val.reverse() : val
288
+ })
289
+
290
+ const computedFirstDayOfWeek = computed(() => (
291
+ props.firstDayOfWeek !== void 0
292
+ ? Number(props.firstDayOfWeek)
293
+ : innerLocale.value.firstDayOfWeek
294
+ ))
295
+
296
+ const daysOfWeek = computed(() => {
297
+ const
298
+ days = innerLocale.value.daysShort,
299
+ first = computedFirstDayOfWeek.value
300
+
301
+ return first > 0
302
+ ? days.slice(first, 7).concat(days.slice(0, first))
303
+ : days
304
+ })
305
+
306
+ const daysInMonth = computed(() => {
307
+ const date = viewModel.value
308
+ return props.calendar !== 'persian'
309
+ ? (new Date(date.year, date.month, 0)).getDate()
310
+ : jalaaliMonthLength(date.year, date.month)
311
+ })
312
+
313
+ const evtColor = computed(() => (
314
+ typeof props.eventColor === 'function'
315
+ ? props.eventColor
316
+ : () => props.eventColor
317
+ ))
318
+
319
+ const minNav = computed(() => {
320
+ if (props.navigationMinYearMonth === void 0) {
321
+ return null
322
+ }
323
+
324
+ const data = props.navigationMinYearMonth.split('/')
325
+ return { year: parseInt(data[ 0 ], 10), month: parseInt(data[ 1 ], 10) }
326
+ })
327
+
328
+ const maxNav = computed(() => {
329
+ if (props.navigationMaxYearMonth === void 0) {
330
+ return null
331
+ }
332
+
333
+ const data = props.navigationMaxYearMonth.split('/')
334
+ return { year: parseInt(data[ 0 ], 10), month: parseInt(data[ 1 ], 10) }
335
+ })
336
+
337
+ const navBoundaries = computed(() => {
338
+ const data = {
339
+ month: { prev: true, next: true },
340
+ year: { prev: true, next: true }
341
+ }
342
+
343
+ if (minNav.value !== null && minNav.value.year >= viewModel.value.year) {
344
+ data.year.prev = false
345
+ if (minNav.value.year === viewModel.value.year && minNav.value.month >= viewModel.value.month) {
346
+ data.month.prev = false
347
+ }
348
+ }
349
+
350
+ if (maxNav.value !== null && maxNav.value.year <= viewModel.value.year) {
351
+ data.year.next = false
352
+ if (maxNav.value.year === viewModel.value.year && maxNav.value.month <= viewModel.value.month) {
353
+ data.month.next = false
354
+ }
355
+ }
356
+
357
+ return data
358
+ })
359
+
360
+ const daysMap = computed(() => {
361
+ const map = {}
362
+
363
+ daysModel.value.forEach(entry => {
364
+ const hash = getMonthHash(entry)
365
+
366
+ if (map[ hash ] === void 0) {
367
+ map[ hash ] = []
368
+ }
369
+
370
+ map[ hash ].push(entry.day)
371
+ })
372
+
373
+ return map
374
+ })
375
+
376
+ const rangeMap = computed(() => {
377
+ const map = {}
378
+
379
+ rangeModel.value.forEach(entry => {
380
+ const hashFrom = getMonthHash(entry.from)
381
+ const hashTo = getMonthHash(entry.to)
382
+
383
+ if (map[ hashFrom ] === void 0) {
384
+ map[ hashFrom ] = []
385
+ }
386
+
387
+ map[ hashFrom ].push({
388
+ from: entry.from.day,
389
+ to: hashFrom === hashTo ? entry.to.day : void 0,
390
+ range: entry
391
+ })
392
+
393
+ if (hashFrom < hashTo) {
394
+ let hash
395
+ const { year, month } = entry.from
396
+ const cur = month < 12
397
+ ? { year, month: month + 1 }
398
+ : { year: year + 1, month: 1 }
399
+
400
+ while ((hash = getMonthHash(cur)) <= hashTo) {
401
+ if (map[ hash ] === void 0) {
402
+ map[ hash ] = []
403
+ }
404
+
405
+ map[ hash ].push({
406
+ from: void 0,
407
+ to: hash === hashTo ? entry.to.day : void 0,
408
+ range: entry
409
+ })
410
+
411
+ cur.month++
412
+ if (cur.month > 12) {
413
+ cur.year++
414
+ cur.month = 1
415
+ }
416
+ }
417
+ }
418
+ })
419
+
420
+ return map
421
+ })
422
+
423
+ const rangeView = computed(() => {
424
+ if (editRange.value === null) {
425
+ return
426
+ }
427
+
428
+ const { init, initHash, final, finalHash } = editRange.value
429
+
430
+ const [ from, to ] = initHash <= finalHash
431
+ ? [ init, final ]
432
+ : [ final, init ]
433
+
434
+ const fromHash = getMonthHash(from)
435
+ const toHash = getMonthHash(to)
436
+
437
+ if (fromHash !== viewMonthHash.value && toHash !== viewMonthHash.value) {
438
+ return
439
+ }
440
+
441
+ const view = {}
442
+
443
+ if (fromHash === viewMonthHash.value) {
444
+ view.from = from.day
445
+ view.includeFrom = true
446
+ }
447
+ else {
448
+ view.from = 1
449
+ }
450
+
451
+ if (toHash === viewMonthHash.value) {
452
+ view.to = to.day
453
+ view.includeTo = true
454
+ }
455
+ else {
456
+ view.to = daysInMonth.value
457
+ }
458
+
459
+ return view
460
+ })
461
+
462
+ const viewMonthHash = computed(() => getMonthHash(viewModel.value))
463
+
464
+ const selectionDaysMap = computed(() => {
465
+ const map = {}
466
+
467
+ if (props.options === void 0) {
468
+ for (let i = 1; i <= daysInMonth.value; i++) {
469
+ map[ i ] = true
470
+ }
471
+
472
+ return map
473
+ }
474
+
475
+ const fn = typeof props.options === 'function'
476
+ ? props.options
477
+ : date => props.options.includes(date)
478
+
479
+ for (let i = 1; i <= daysInMonth.value; i++) {
480
+ const dayHash = viewMonthHash.value + '/' + pad(i)
481
+ map[ i ] = fn(dayHash)
482
+ }
483
+
484
+ return map
485
+ })
486
+
487
+ const eventDaysMap = computed(() => {
488
+ const map = {}
489
+
490
+ if (props.events === void 0) {
491
+ for (let i = 1; i <= daysInMonth.value; i++) {
492
+ map[ i ] = false
493
+ }
494
+ }
495
+ else {
496
+ const fn = typeof props.events === 'function'
497
+ ? props.events
498
+ : date => props.events.includes(date)
499
+
500
+ for (let i = 1; i <= daysInMonth.value; i++) {
501
+ const dayHash = viewMonthHash.value + '/' + pad(i)
502
+ map[ i ] = fn(dayHash) === true && evtColor.value(dayHash)
503
+ }
504
+ }
505
+
506
+ return map
507
+ })
508
+
509
+ const viewDays = computed(() => {
510
+ let date, endDay
511
+ const { year, month } = viewModel.value
512
+
513
+ if (props.calendar !== 'persian') {
514
+ date = new Date(year, month - 1, 1)
515
+ endDay = (new Date(year, month - 1, 0)).getDate()
516
+ }
517
+ else {
518
+ const gDate = toGregorian(year, month, 1)
519
+ date = new Date(gDate.gy, gDate.gm - 1, gDate.gd)
520
+ let prevJM = month - 1
521
+ let prevJY = year
522
+ if (prevJM === 0) {
523
+ prevJM = 12
524
+ prevJY--
525
+ }
526
+ endDay = jalaaliMonthLength(prevJY, prevJM)
527
+ }
528
+
529
+ return {
530
+ days: date.getDay() - computedFirstDayOfWeek.value - 1,
531
+ endDay
532
+ }
533
+ })
534
+
535
+ const days = computed(() => {
536
+ const res = []
537
+ const { days, endDay } = viewDays.value
538
+
539
+ const len = days < 0 ? days + 7 : days
540
+ if (len < 6) {
541
+ for (let i = endDay - len; i <= endDay; i++) {
542
+ res.push({ i, fill: true })
543
+ }
544
+ }
545
+
546
+ const index = res.length
547
+
548
+ for (let i = 1; i <= daysInMonth.value; i++) {
549
+ const day = { i, event: eventDaysMap.value[ i ], classes: [] }
550
+
551
+ if (selectionDaysMap.value[ i ] === true) {
552
+ day.in = true
553
+ day.flat = true
554
+ }
555
+
556
+ res.push(day)
557
+ }
558
+
559
+ // if current view has days in model
560
+ if (daysMap.value[ viewMonthHash.value ] !== void 0) {
561
+ daysMap.value[ viewMonthHash.value ].forEach(day => {
562
+ const i = index + day - 1
563
+ Object.assign(res[ i ], {
564
+ selected: true,
565
+ unelevated: true,
566
+ flat: false,
567
+ color: computedColor.value,
568
+ textColor: computedTextColor.value
569
+ })
570
+ })
571
+ }
572
+
573
+ // if current view has ranges in model
574
+ if (rangeMap.value[ viewMonthHash.value ] !== void 0) {
575
+ rangeMap.value[ viewMonthHash.value ].forEach(entry => {
576
+ if (entry.from !== void 0) {
577
+ const from = index + entry.from - 1
578
+ const to = index + (entry.to || daysInMonth.value) - 1
579
+
580
+ for (let day = from; day <= to; day++) {
581
+ Object.assign(res[ day ], {
582
+ range: entry.range,
583
+ unelevated: true,
584
+ color: computedColor.value,
585
+ textColor: computedTextColor.value
586
+ })
587
+ }
588
+
589
+ Object.assign(res[ from ], {
590
+ rangeFrom: true,
591
+ flat: false
592
+ })
593
+
594
+ entry.to !== void 0 && Object.assign(res[ to ], {
595
+ rangeTo: true,
596
+ flat: false
597
+ })
598
+ }
599
+ else if (entry.to !== void 0) {
600
+ const to = index + entry.to - 1
601
+
602
+ for (let day = index; day <= to; day++) {
603
+ Object.assign(res[ day ], {
604
+ range: entry.range,
605
+ unelevated: true,
606
+ color: computedColor.value,
607
+ textColor: computedTextColor.value
608
+ })
609
+ }
610
+
611
+ Object.assign(res[ to ], {
612
+ flat: false,
613
+ rangeTo: true
614
+ })
615
+ }
616
+ else {
617
+ const to = index + daysInMonth.value - 1
618
+ for (let day = index; day <= to; day++) {
619
+ Object.assign(res[ day ], {
620
+ range: entry.range,
621
+ unelevated: true,
622
+ color: computedColor.value,
623
+ textColor: computedTextColor.value
624
+ })
625
+ }
626
+ }
627
+ })
628
+ }
629
+
630
+ if (rangeView.value !== void 0) {
631
+ const from = index + rangeView.value.from - 1
632
+ const to = index + rangeView.value.to - 1
633
+
634
+ for (let day = from; day <= to; day++) {
635
+ res[ day ].color = computedColor.value
636
+ res[ day ].editRange = true
637
+ }
638
+
639
+ if (rangeView.value.includeFrom === true) {
640
+ res[ from ].editRangeFrom = true
641
+ }
642
+ if (rangeView.value.includeTo === true) {
643
+ res[ to ].editRangeTo = true
644
+ }
645
+ }
646
+
647
+ if (viewModel.value.year === today.value.year && viewModel.value.month === today.value.month) {
648
+ res[ index + today.value.day - 1 ].today = true
649
+ }
650
+
651
+ const left = res.length % 7
652
+ if (left > 0) {
653
+ const afterDays = 7 - left
654
+ for (let i = 1; i <= afterDays; i++) {
655
+ res.push({ i, fill: true })
656
+ }
657
+ }
658
+
659
+ res.forEach(day => {
660
+ let cls = 'q-date__calendar-item '
661
+
662
+ if (day.fill === true) {
663
+ cls += 'q-date__calendar-item--fill'
664
+ }
665
+ else {
666
+ cls += `q-date__calendar-item--${ day.in === true ? 'in' : 'out' }`
667
+
668
+ if (day.range !== void 0) {
669
+ cls += ` q-date__range${ day.rangeTo === true ? '-to' : (day.rangeFrom === true ? '-from' : '') }`
670
+ }
671
+
672
+ if (day.editRange === true) {
673
+ cls += ` q-date__edit-range${ day.editRangeFrom === true ? '-from' : '' }${ day.editRangeTo === true ? '-to' : '' }`
674
+ }
675
+
676
+ if (day.range !== void 0 || day.editRange === true) {
677
+ cls += ` text-${ day.color }`
678
+ }
679
+ }
680
+
681
+ day.classes = cls
682
+ })
683
+
684
+ return res
685
+ })
686
+
687
+ const attributes = computed(() => (
688
+ props.disable === true
689
+ ? { 'aria-disabled': 'true' }
690
+ : (props.readonly === true ? { 'aria-readonly': 'true' } : {})
691
+ ))
692
+
693
+ watch(() => props.modelValue, v => {
694
+ if (lastEmitValue === v) {
695
+ lastEmitValue = 0
696
+ }
697
+ else {
698
+ const { year, month } = getViewModel(innerMask.value, innerLocale.value)
699
+ updateViewModel(year, month)
700
+ }
701
+ })
702
+
703
+ watch(view, () => {
704
+ blurTargetRef.value !== null && blurTargetRef.value.focus()
705
+ })
706
+
707
+ watch(() => viewModel.value.year, year => {
708
+ emit('navigation', { year, month: viewModel.value.month })
709
+ })
710
+
711
+ watch(() => viewModel.value.month, month => {
712
+ emit('navigation', { year: viewModel.value.year, month })
713
+ })
714
+
715
+ watch(mask, val => {
716
+ updateValue(val, innerLocale.value, 'mask')
717
+ innerMask.value = val
718
+ })
719
+
720
+ watch(locale, val => {
721
+ updateValue(innerMask.value, val, 'locale')
722
+ innerLocale.value = val
723
+ })
724
+
725
+ function setToday () {
726
+ toggleDate(today.value, getMonthHash(today.value))
727
+ setCalendarTo(today.value.year, today.value.month)
728
+ }
729
+
730
+ function setView (viewMode) {
731
+ if (viewIsValid(viewMode) === true) {
732
+ view.value = viewMode
733
+ }
734
+ }
735
+
736
+ function offsetCalendar (type, descending) {
737
+ if ([ 'month', 'year' ].includes(type)) {
738
+ const fn = type === 'month' ? goToMonth : goToYear
739
+ fn(descending === true ? -1 : 1)
740
+ }
741
+ }
742
+
743
+ function setCalendarTo (year, month) {
744
+ view.value = 'Calendar'
745
+ updateViewModel(year, month)
746
+ }
747
+
748
+ function setEditingRange (from, to) {
749
+ if (props.range === false || !from) {
750
+ editRange.value = null
751
+ return
752
+ }
753
+
754
+ const init = Object.assign({ ...viewModel.value }, from)
755
+ const final = to !== void 0
756
+ ? Object.assign({ ...viewModel.value }, to)
757
+ : init
758
+
759
+ editRange.value = {
760
+ init,
761
+ initHash: getDayHash(init),
762
+ final,
763
+ finalHash: getDayHash(final)
764
+ }
765
+
766
+ setCalendarTo(init.year, init.month)
767
+ }
768
+
769
+ function getMask () {
770
+ return props.calendar === 'persian' ? 'YYYY/MM/DD' : props.mask
771
+ }
772
+
773
+ function decodeString (date, mask, locale) {
774
+ return __splitDate(
775
+ date,
776
+ mask,
777
+ locale,
778
+ props.calendar,
779
+ {
780
+ hour: 0,
781
+ minute: 0,
782
+ second: 0,
783
+ millisecond: 0
784
+ }
785
+ )
786
+ }
787
+
788
+ function getViewModel (mask, locale) {
789
+ const model = Array.isArray(props.modelValue) === true
790
+ ? props.modelValue
791
+ : (props.modelValue ? [ props.modelValue ] : [])
792
+
793
+ if (model.length === 0) {
794
+ return getDefaultViewModel()
795
+ }
796
+
797
+ const decoded = decodeString(
798
+ model[ 0 ].from !== void 0 ? model[ 0 ].from : model[ 0 ],
799
+ mask,
800
+ locale
801
+ )
802
+
803
+ return decoded.dateHash === null
804
+ ? getDefaultViewModel()
805
+ : decoded
806
+ }
807
+
808
+ function getDefaultViewModel () {
809
+ let year, month
810
+
811
+ if (props.defaultYearMonth !== void 0) {
812
+ const d = props.defaultYearMonth.split('/')
813
+ year = parseInt(d[ 0 ], 10)
814
+ month = parseInt(d[ 1 ], 10)
815
+ }
816
+ else {
817
+ // may come from data() where computed
818
+ // props are not yet available
819
+ const d = today.value !== void 0
820
+ ? today.value
821
+ : getCurrentDate()
822
+
823
+ year = d.year
824
+ month = d.month
825
+ }
826
+
827
+ return {
828
+ year,
829
+ month,
830
+ day: 1,
831
+ hour: 0,
832
+ minute: 0,
833
+ second: 0,
834
+ millisecond: 0,
835
+ dateHash: year + '/' + pad(month) + '/01'
836
+ }
837
+ }
838
+
839
+ function goToMonth (offset) {
840
+ let year = viewModel.value.year
841
+ let month = Number(viewModel.value.month) + offset
842
+
843
+ if (month === 13) {
844
+ month = 1
845
+ year++
846
+ }
847
+ else if (month === 0) {
848
+ month = 12
849
+ year--
850
+ }
851
+
852
+ updateViewModel(year, month)
853
+ isImmediate.value === true && emitImmediately('month')
854
+ }
855
+
856
+ function goToYear (offset) {
857
+ const year = Number(viewModel.value.year) + offset
858
+ updateViewModel(year, viewModel.value.month)
859
+ isImmediate.value === true && emitImmediately('year')
860
+ }
861
+
862
+ function setYear (year) {
863
+ updateViewModel(year, viewModel.value.month)
864
+ view.value = props.defaultView === 'Years' ? 'Months' : 'Calendar'
865
+ isImmediate.value === true && emitImmediately('year')
866
+ }
867
+
868
+ function setMonth (month) {
869
+ updateViewModel(viewModel.value.year, month)
870
+ view.value = 'Calendar'
871
+ isImmediate.value === true && emitImmediately('month')
872
+ }
873
+
874
+ function toggleDate (date, monthHash) {
875
+ const month = daysMap.value[ monthHash ]
876
+ const fn = month !== void 0 && month.includes(date.day) === true
877
+ ? removeFromModel
878
+ : addToModel
879
+
880
+ fn(date)
881
+ }
882
+
883
+ function getShortDate (date) {
884
+ return { year: date.year, month: date.month, day: date.day }
885
+ }
886
+
887
+ function updateViewModel (year, month) {
888
+ if (minNav.value !== null && year <= minNav.value.year) {
889
+ year = minNav.value.year
890
+ if (month < minNav.value.month) {
891
+ month = minNav.value.month
892
+ }
893
+ }
894
+
895
+ if (maxNav.value !== null && year >= maxNav.value.year) {
896
+ year = maxNav.value.year
897
+ if (month > maxNav.value.month) {
898
+ month = maxNav.value.month
899
+ }
900
+ }
901
+
902
+ const newHash = year + '/' + pad(month) + '/01'
903
+
904
+ if (newHash !== viewModel.value.dateHash) {
905
+ monthDirection.value = (viewModel.value.dateHash < newHash) === ($q.lang.rtl !== true) ? 'left' : 'right'
906
+ if (year !== viewModel.value.year) {
907
+ yearDirection.value = monthDirection.value
908
+ }
909
+
910
+ nextTick(() => {
911
+ startYear.value = year - year % yearsInterval - (year < 0 ? yearsInterval : 0)
912
+ Object.assign(viewModel.value, {
913
+ year,
914
+ month,
915
+ day: 1,
916
+ dateHash: newHash
917
+ })
918
+ })
919
+ }
920
+ }
921
+
922
+ function emitValue (val, action, date) {
923
+ const value = val !== null && val.length === 1 && props.multiple === false
924
+ ? val[ 0 ]
925
+ : val
926
+
927
+ lastEmitValue = value
928
+
929
+ const { reason, details } = getEmitParams(action, date)
930
+ emit('update:modelValue', value, reason, details)
931
+ }
932
+
933
+ function emitImmediately (reason) {
934
+ const date = daysModel.value[ 0 ] !== void 0 && daysModel.value[ 0 ].dateHash !== null
935
+ ? { ...daysModel.value[ 0 ] }
936
+ : { ...viewModel.value } // inherit day, hours, minutes, milliseconds...
937
+
938
+ // nextTick required because of animation delay in viewModel
939
+ nextTick(() => {
940
+ date.year = viewModel.value.year
941
+ date.month = viewModel.value.month
942
+
943
+ const maxDay = props.calendar !== 'persian'
944
+ ? (new Date(date.year, date.month, 0)).getDate()
945
+ : jalaaliMonthLength(date.year, date.month)
946
+
947
+ date.day = Math.min(Math.max(1, date.day), maxDay)
948
+
949
+ const value = encodeEntry(date)
950
+ lastEmitValue = value
951
+
952
+ const { details } = getEmitParams('', date)
953
+ emit('update:modelValue', value, reason, details)
954
+ })
955
+ }
956
+
957
+ function getEmitParams (action, date) {
958
+ return date.from !== void 0
959
+ ? {
960
+ reason: `${ action }-range`,
961
+ details: {
962
+ ...getShortDate(date.target),
963
+ from: getShortDate(date.from),
964
+ to: getShortDate(date.to)
965
+ }
966
+ }
967
+ : {
968
+ reason: `${ action }-day`,
969
+ details: getShortDate(date)
970
+ }
971
+ }
972
+
973
+ function encodeEntry (date, mask, locale) {
974
+ return date.from !== void 0
975
+ ? { from: encodeObjectFn.value(date.from, mask, locale), to: encodeObjectFn.value(date.to, mask, locale) }
976
+ : encodeObjectFn.value(date, mask, locale)
977
+ }
978
+
979
+ function addToModel (date) {
980
+ let value
981
+
982
+ if (props.multiple === true) {
983
+ if (date.from !== void 0) {
984
+ // we also need to filter out intersections
985
+
986
+ const fromHash = getDayHash(date.from)
987
+ const toHash = getDayHash(date.to)
988
+
989
+ const days = daysModel.value
990
+ .filter(day => day.dateHash < fromHash || day.dateHash > toHash)
991
+
992
+ const ranges = rangeModel.value
993
+ .filter(({ from, to }) => to.dateHash < fromHash || from.dateHash > toHash)
994
+
995
+ value = days.concat(ranges).concat(date).map(entry => encodeEntry(entry))
996
+ }
997
+ else {
998
+ const model = normalizedModel.value.slice()
999
+ model.push(encodeEntry(date))
1000
+ value = model
1001
+ }
1002
+ }
1003
+ else {
1004
+ value = encodeEntry(date)
1005
+ }
1006
+
1007
+ emitValue(value, 'add', date)
1008
+ }
1009
+
1010
+ function removeFromModel (date) {
1011
+ if (props.noUnset === true) {
1012
+ return
1013
+ }
1014
+
1015
+ let model = null
1016
+
1017
+ if (props.multiple === true && Array.isArray(props.modelValue) === true) {
1018
+ const val = encodeEntry(date)
1019
+
1020
+ if (date.from !== void 0) {
1021
+ model = props.modelValue.filter(
1022
+ date => (
1023
+ date.from !== void 0
1024
+ ? (date.from !== val.from && date.to !== val.to)
1025
+ : true
1026
+ )
1027
+ )
1028
+ }
1029
+ else {
1030
+ model = props.modelValue.filter(date => date !== val)
1031
+ }
1032
+
1033
+ if (model.length === 0) {
1034
+ model = null
1035
+ }
1036
+ }
1037
+
1038
+ emitValue(model, 'remove', date)
1039
+ }
1040
+
1041
+ function updateValue (mask, locale, reason) {
1042
+ const model = daysModel.value
1043
+ .concat(rangeModel.value)
1044
+ .map(entry => encodeEntry(entry, mask, locale))
1045
+ .filter(entry => {
1046
+ return entry.from !== void 0
1047
+ ? entry.from.dateHash !== null && entry.to.dateHash !== null
1048
+ : entry.dateHash !== null
1049
+ })
1050
+
1051
+ emit('update:modelValue', (props.multiple === true ? model : model[ 0 ]) || null, reason)
1052
+ }
1053
+
1054
+ // expose public methods
1055
+ Object.assign(proxy, {
1056
+ setToday, setView, offsetCalendar, setCalendarTo, setEditingRange
1057
+ })
1058
+
1059
+ function getHeader () {
1060
+ if (props.minimal === true) { return }
1061
+
1062
+ return h('div', {
1063
+ class: 'q-date__header ' + headerClass.value
1064
+ }, [
1065
+ h('div', {
1066
+ class: 'relative-position'
1067
+ }, [
1068
+ h(Transition, {
1069
+ name: 'q-transition--fade'
1070
+ }, () => h('div', {
1071
+ key: 'h-yr-' + headerSubtitle.value,
1072
+ class: 'q-date__header-subtitle q-date__header-link '
1073
+ + (view.value === 'Years' ? 'q-date__header-link--active' : 'cursor-pointer'),
1074
+ tabindex: tabindex.value,
1075
+ ...getCache('vY', {
1076
+ onClick () { view.value = 'Years' },
1077
+ onKeyup (e) { e.keyCode === 13 && (view.value = 'Years') }
1078
+ })
1079
+ }, [ headerSubtitle.value ]))
1080
+ ]),
1081
+
1082
+ h('div', {
1083
+ class: 'q-date__header-title relative-position flex no-wrap'
1084
+ }, [
1085
+ h('div', {
1086
+ class: 'relative-position col'
1087
+ }, [
1088
+ h(Transition, {
1089
+ name: 'q-transition--fade'
1090
+ }, () => h('div', {
1091
+ key: 'h-sub' + headerTitle.value,
1092
+ class: 'q-date__header-title-label q-date__header-link '
1093
+ + (view.value === 'Calendar' ? 'q-date__header-link--active' : 'cursor-pointer'),
1094
+ tabindex: tabindex.value,
1095
+ ...getCache('vC', {
1096
+ onClick () { view.value = 'Calendar' },
1097
+ onKeyup (e) { e.keyCode === 13 && (view.value = 'Calendar') }
1098
+ })
1099
+ }, [ headerTitle.value ]))
1100
+ ]),
1101
+
1102
+ props.todayBtn === true ? h(QBtn, {
1103
+ class: 'q-date__header-today self-start',
1104
+ icon: $q.iconSet.datetime.today,
1105
+ flat: true,
1106
+ size: 'sm',
1107
+ round: true,
1108
+ tabindex: tabindex.value,
1109
+ onClick: setToday
1110
+ }) : null
1111
+ ])
1112
+ ])
1113
+ }
1114
+
1115
+ function getNavigation ({ label, type, key, dir, goTo, boundaries, cls }) {
1116
+ return [
1117
+ h('div', {
1118
+ class: 'row items-center q-date__arrow'
1119
+ }, [
1120
+ h(QBtn, {
1121
+ round: true,
1122
+ dense: true,
1123
+ size: 'sm',
1124
+ flat: true,
1125
+ icon: dateArrow.value[ 0 ],
1126
+ tabindex: tabindex.value,
1127
+ disable: boundaries.prev === false,
1128
+ ...getCache('go-#' + type, { onClick () { goTo(-1) } })
1129
+ })
1130
+ ]),
1131
+
1132
+ h('div', {
1133
+ class: 'relative-position overflow-hidden flex flex-center' + cls
1134
+ }, [
1135
+ h(Transition, {
1136
+ name: 'q-transition--jump-' + dir
1137
+ }, () => h('div', { key }, [
1138
+ h(QBtn, {
1139
+ flat: true,
1140
+ dense: true,
1141
+ noCaps: true,
1142
+ label,
1143
+ tabindex: tabindex.value,
1144
+ ...getCache('view#' + type, { onClick: () => { view.value = type } })
1145
+ })
1146
+ ]))
1147
+ ]),
1148
+
1149
+ h('div', {
1150
+ class: 'row items-center q-date__arrow'
1151
+ }, [
1152
+ h(QBtn, {
1153
+ round: true,
1154
+ dense: true,
1155
+ size: 'sm',
1156
+ flat: true,
1157
+ icon: dateArrow.value[ 1 ],
1158
+ tabindex: tabindex.value,
1159
+ disable: boundaries.next === false,
1160
+ ...getCache('go+#' + type, { onClick () { goTo(1) } })
1161
+ })
1162
+ ])
1163
+ ]
1164
+ }
1165
+
1166
+ const renderViews = {
1167
+ Calendar: () => ([
1168
+ h('div', {
1169
+ key: 'calendar-view',
1170
+ class: 'q-date__view q-date__calendar'
1171
+ }, [
1172
+ h('div', {
1173
+ class: 'q-date__navigation row items-center no-wrap'
1174
+ }, getNavigation({
1175
+ label: innerLocale.value.months[ viewModel.value.month - 1 ],
1176
+ type: 'Months',
1177
+ key: viewModel.value.month,
1178
+ dir: monthDirection.value,
1179
+ goTo: goToMonth,
1180
+ boundaries: navBoundaries.value.month,
1181
+ cls: ' col'
1182
+ }).concat(getNavigation({
1183
+ label: viewModel.value.year,
1184
+ type: 'Years',
1185
+ key: viewModel.value.year,
1186
+ dir: yearDirection.value,
1187
+ goTo: goToYear,
1188
+ boundaries: navBoundaries.value.year,
1189
+ cls: ''
1190
+ }))),
1191
+
1192
+ h('div', {
1193
+ class: 'q-date__calendar-weekdays row items-center no-wrap'
1194
+ }, daysOfWeek.value.map(day => h('div', { class: 'q-date__calendar-item' }, [ h('div', day) ]))),
1195
+
1196
+ h('div', {
1197
+ class: 'q-date__calendar-days-container relative-position overflow-hidden'
1198
+ }, [
1199
+ h(Transition, {
1200
+ name: 'q-transition--slide-' + monthDirection.value
1201
+ }, () => h('div', {
1202
+ key: viewMonthHash.value,
1203
+ class: 'q-date__calendar-days fit'
1204
+ }, days.value.map(day => h('div', { class: day.classes }, [
1205
+ day.in === true
1206
+ ? h(
1207
+ QBtn, {
1208
+ class: day.today === true ? 'q-date__today' : '',
1209
+ dense: true,
1210
+ flat: day.flat,
1211
+ unelevated: day.unelevated,
1212
+ color: day.color,
1213
+ textColor: day.textColor,
1214
+ label: day.i,
1215
+ tabindex: tabindex.value,
1216
+ ...getCache('day#' + day.i, {
1217
+ onClick: () => { onDayClick(day.i) },
1218
+ onMouseover: () => { onDayMouseover(day.i) }
1219
+ })
1220
+ },
1221
+ day.event !== false
1222
+ ? () => h('div', { class: 'q-date__event bg-' + day.event })
1223
+ : null
1224
+ )
1225
+ : h('div', '' + day.i)
1226
+ ]))))
1227
+ ])
1228
+ ])
1229
+ ]),
1230
+
1231
+ Months () {
1232
+ const currentYear = viewModel.value.year === today.value.year
1233
+ const isDisabled = month => {
1234
+ return (
1235
+ (minNav.value !== null && viewModel.value.year === minNav.value.year && minNav.value.month > month)
1236
+ || (maxNav.value !== null && viewModel.value.year === maxNav.value.year && maxNav.value.month < month)
1237
+ )
1238
+ }
1239
+
1240
+ const content = innerLocale.value.monthsShort.map((month, i) => {
1241
+ const active = viewModel.value.month === i + 1
1242
+
1243
+ return h('div', {
1244
+ class: 'q-date__months-item flex flex-center'
1245
+ }, [
1246
+ h(QBtn, {
1247
+ class: currentYear === true && today.value.month === i + 1 ? 'q-date__today' : null,
1248
+ flat: active !== true,
1249
+ label: month,
1250
+ unelevated: active,
1251
+ color: active === true ? computedColor.value : null,
1252
+ textColor: active === true ? computedTextColor.value : null,
1253
+ tabindex: tabindex.value,
1254
+ disable: isDisabled(i + 1),
1255
+ ...getCache('month#' + i, { onClick: () => { setMonth(i + 1) } })
1256
+ })
1257
+ ])
1258
+ })
1259
+
1260
+ props.yearsInMonthView === true && content.unshift(
1261
+ h('div', { class: 'row no-wrap full-width' }, [
1262
+ getNavigation({
1263
+ label: viewModel.value.year,
1264
+ type: 'Years',
1265
+ key: viewModel.value.year,
1266
+ dir: yearDirection.value,
1267
+ goTo: goToYear,
1268
+ boundaries: navBoundaries.value.year,
1269
+ cls: ' col'
1270
+ })
1271
+ ])
1272
+ )
1273
+
1274
+ return h('div', {
1275
+ key: 'months-view',
1276
+ class: 'q-date__view q-date__months flex flex-center'
1277
+ }, content)
1278
+ },
1279
+
1280
+ Years () {
1281
+ const
1282
+ start = startYear.value,
1283
+ stop = start + yearsInterval,
1284
+ years = []
1285
+
1286
+ const isDisabled = year => {
1287
+ return (
1288
+ (minNav.value !== null && minNav.value.year > year)
1289
+ || (maxNav.value !== null && maxNav.value.year < year)
1290
+ )
1291
+ }
1292
+
1293
+ for (let i = start; i <= stop; i++) {
1294
+ const active = viewModel.value.year === i
1295
+
1296
+ years.push(
1297
+ h('div', {
1298
+ class: 'q-date__years-item flex flex-center'
1299
+ }, [
1300
+ h(QBtn, {
1301
+ key: 'yr' + i,
1302
+ class: today.value.year === i ? 'q-date__today' : null,
1303
+ flat: !active,
1304
+ label: i,
1305
+ dense: true,
1306
+ unelevated: active,
1307
+ color: active === true ? computedColor.value : null,
1308
+ textColor: active === true ? computedTextColor.value : null,
1309
+ tabindex: tabindex.value,
1310
+ disable: isDisabled(i),
1311
+ ...getCache('yr#' + i, { onClick: () => { setYear(i) } })
1312
+ })
1313
+ ])
1314
+ )
1315
+ }
1316
+
1317
+ return h('div', {
1318
+ class: 'q-date__view q-date__years flex flex-center'
1319
+ }, [
1320
+ h('div', {
1321
+ class: 'col-auto'
1322
+ }, [
1323
+ h(QBtn, {
1324
+ round: true,
1325
+ dense: true,
1326
+ flat: true,
1327
+ icon: dateArrow.value[ 0 ],
1328
+ tabindex: tabindex.value,
1329
+ disable: isDisabled(start),
1330
+ ...getCache('y-', { onClick: () => { startYear.value -= yearsInterval } })
1331
+ })
1332
+ ]),
1333
+
1334
+ h('div', {
1335
+ class: 'q-date__years-content col self-stretch row items-center'
1336
+ }, years),
1337
+
1338
+ h('div', {
1339
+ class: 'col-auto'
1340
+ }, [
1341
+ h(QBtn, {
1342
+ round: true,
1343
+ dense: true,
1344
+ flat: true,
1345
+ icon: dateArrow.value[ 1 ],
1346
+ tabindex: tabindex.value,
1347
+ disable: isDisabled(stop),
1348
+ ...getCache('y+', { onClick: () => { startYear.value += yearsInterval } })
1349
+ })
1350
+ ])
1351
+ ])
1352
+ }
1353
+ }
1354
+
1355
+ function onDayClick (dayIndex) {
1356
+ const day = { ...viewModel.value, day: dayIndex }
1357
+
1358
+ if (props.range === false) {
1359
+ toggleDate(day, viewMonthHash.value)
1360
+ return
1361
+ }
1362
+
1363
+ if (editRange.value === null) {
1364
+ const dayProps = days.value.find(day => day.fill !== true && day.i === dayIndex)
1365
+
1366
+ if (dayProps.range !== void 0) {
1367
+ removeFromModel({ target: day, from: dayProps.range.from, to: dayProps.range.to })
1368
+ return
1369
+ }
1370
+
1371
+ if (dayProps.selected === true) {
1372
+ removeFromModel(day)
1373
+ return
1374
+ }
1375
+
1376
+ const initHash = getDayHash(day)
1377
+
1378
+ editRange.value = {
1379
+ init: day,
1380
+ initHash,
1381
+ final: day,
1382
+ finalHash: initHash
1383
+ }
1384
+
1385
+ emit('range-start', getShortDate(day))
1386
+ }
1387
+ else {
1388
+ const
1389
+ initHash = editRange.value.initHash,
1390
+ finalHash = getDayHash(day),
1391
+ payload = initHash <= finalHash
1392
+ ? { from: editRange.value.init, to: day }
1393
+ : { from: day, to: editRange.value.init }
1394
+
1395
+ editRange.value = null
1396
+ addToModel(initHash === finalHash ? day : { target: day, ...payload })
1397
+
1398
+ emit('range-end', {
1399
+ from: getShortDate(payload.from),
1400
+ to: getShortDate(payload.to)
1401
+ })
1402
+ }
1403
+ }
1404
+
1405
+ function onDayMouseover (dayIndex) {
1406
+ if (editRange.value !== null) {
1407
+ const final = { ...viewModel.value, day: dayIndex }
1408
+
1409
+ Object.assign(editRange.value, {
1410
+ final,
1411
+ finalHash: getDayHash(final)
1412
+ })
1413
+ }
1414
+ }
1415
+
1416
+ return () => {
1417
+ const content = [
1418
+ h('div', {
1419
+ class: 'q-date__content col relative-position'
1420
+ }, [
1421
+ h(Transition, {
1422
+ name: 'q-transition--fade'
1423
+ }, renderViews[ view.value ])
1424
+ ])
1425
+ ]
1426
+
1427
+ const def = hSlot(slots.default)
1428
+ def !== void 0 && content.push(
1429
+ h('div', { class: 'q-date__actions' }, def)
1430
+ )
1431
+
1432
+ if (props.name !== void 0 && props.disable !== true) {
1433
+ injectFormInput(content, 'push')
1434
+ }
1435
+
1436
+ return h('div', {
1437
+ class: classes.value,
1438
+ ...attributes.value
1439
+ }, [
1440
+ getHeader(),
1441
+
1442
+ h('div', {
1443
+ ref: blurTargetRef,
1444
+ class: 'q-date__main col column',
1445
+ tabindex: -1
1446
+ }, content)
1447
+ ])
1448
+ }
1449
+ }
1450
+ })