quasar 2.1.8 → 2.2.2
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.
- package/dist/api/QCarousel.json +19 -5
- package/dist/api/QColor.json +6 -0
- package/dist/api/QInnerLoading.json +32 -0
- package/dist/api/QOptionGroup.json +58 -1
- package/dist/api/QRange.json +10 -3
- package/dist/api/QSeparator.json +1 -1
- package/dist/api/QSkeleton.json +14 -0
- package/dist/api/QSlider.json +10 -3
- package/dist/api/QStepper.json +16 -2
- package/dist/api/QTabPanels.json +16 -2
- package/dist/api/QTable.json +5 -0
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +6 -0
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +2 -2
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +24 -17
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +29 -22
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +24 -16
- package/dist/quasar.umd.js +374 -242
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/index.d.ts +81 -12
- package/dist/vetur/quasar-attributes.json +39 -7
- package/dist/vetur/quasar-tags.json +9 -1
- package/dist/web-types/web-types.json +101 -15
- package/lang/index.json +4 -0
- package/lang/lt.js +103 -0
- package/lang/ug.js +42 -42
- package/package.json +1 -1
- package/src/components/btn/QBtn.js +17 -20
- package/src/components/carousel/QCarousel.js +8 -1
- package/src/components/carousel/QCarousel.json +9 -1
- package/src/components/color/QColor.js +73 -61
- package/src/components/color/QColor.json +7 -0
- package/src/components/color/QColor.sass +5 -1
- package/src/components/dialog/QDialog.js +6 -0
- package/src/components/drawer/QDrawer.js +3 -0
- package/src/components/inner-loading/QInnerLoading.js +31 -7
- package/src/components/inner-loading/QInnerLoading.json +29 -0
- package/src/components/inner-loading/QInnerLoading.sass +4 -0
- package/src/components/option-group/QOptionGroup.js +29 -19
- package/src/components/option-group/QOptionGroup.json +50 -1
- package/src/components/range/QRange.js +1 -1
- package/src/components/range/QRange.json +7 -3
- package/src/components/rating/QRating.js +59 -39
- package/src/components/rating/QRating.sass +8 -6
- package/src/components/select/QSelect.js +1 -1
- package/src/components/separator/QSeparator.json +1 -1
- package/src/components/skeleton/QSkeleton.js +15 -5
- package/src/components/skeleton/QSkeleton.json +9 -0
- package/src/components/skeleton/QSkeleton.sass +7 -6
- package/src/components/slider/QSlider.js +1 -1
- package/src/components/slider/QSlider.json +7 -3
- package/src/components/slider/use-slider.js +7 -2
- package/src/components/stepper/StepHeader.js +10 -10
- package/src/components/table/QTable.json +1 -0
- package/src/components/tabs/use-tab.js +11 -9
- package/src/components/time/QTime.js +0 -2
- package/src/composables/private/use-panel.js +13 -8
- package/src/composables/private/use-panel.json +11 -2
- package/src/css/core/transitions.sass +4 -4
- package/src/utils/date.js +93 -60
|
@@ -62,14 +62,23 @@
|
|
|
62
62
|
"extends": "transition",
|
|
63
63
|
"desc": "One of Quasar's embedded transitions (has effect only if 'animated' prop is set)",
|
|
64
64
|
"default": "slide-right/slide-down",
|
|
65
|
-
"category": "
|
|
65
|
+
"category": "transition"
|
|
66
66
|
},
|
|
67
67
|
|
|
68
68
|
"transition-next": {
|
|
69
69
|
"extends": "transition",
|
|
70
70
|
"desc": "One of Quasar's embedded transitions (has effect only if 'animated' prop is set)",
|
|
71
71
|
"default": "slide-left/slide-up",
|
|
72
|
-
"category": "
|
|
72
|
+
"category": "transition"
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
"transition-duration": {
|
|
76
|
+
"type": [ "String", "Number" ],
|
|
77
|
+
"desc": "Transition duration (in milliseconds, without unit)",
|
|
78
|
+
"default": 300,
|
|
79
|
+
"examples": [ 500, "1200" ],
|
|
80
|
+
"category": "transition",
|
|
81
|
+
"addedIn": "v2.2"
|
|
73
82
|
}
|
|
74
83
|
},
|
|
75
84
|
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// default easing is easeOutCubic
|
|
2
2
|
|
|
3
|
-
\:root
|
|
4
|
-
--q-transition-duration: .3s
|
|
5
|
-
--q-transition-easing: cubic-bezier(0.215,0.61,0.355,1)
|
|
6
|
-
|
|
7
3
|
.q-transition
|
|
8
4
|
&--slide-right,
|
|
9
5
|
&--slide-left,
|
|
@@ -17,6 +13,10 @@
|
|
|
17
13
|
&--scale,
|
|
18
14
|
&--rotate,
|
|
19
15
|
&--flip
|
|
16
|
+
&-enter-active,
|
|
17
|
+
&-leave-active
|
|
18
|
+
--q-transition-duration: .3s
|
|
19
|
+
--q-transition-easing: cubic-bezier(0.215,0.61,0.355,1)
|
|
20
20
|
&-leave-active
|
|
21
21
|
position: absolute
|
|
22
22
|
|
package/src/utils/date.js
CHANGED
|
@@ -161,6 +161,96 @@ function getDateLocale (paramDateLocale, langProps) {
|
|
|
161
161
|
)
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
function formatTimezone (offset, delimeter = '') {
|
|
165
|
+
const
|
|
166
|
+
sign = offset > 0 ? '-' : '+',
|
|
167
|
+
absOffset = Math.abs(offset),
|
|
168
|
+
hours = Math.floor(absOffset / 60),
|
|
169
|
+
minutes = absOffset % 60
|
|
170
|
+
|
|
171
|
+
return sign + pad(hours) + delimeter + pad(minutes)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function applyYearMonthDayChange (date, mod, sign) {
|
|
175
|
+
let
|
|
176
|
+
year = date.getFullYear(),
|
|
177
|
+
month = date.getMonth(),
|
|
178
|
+
day = date.getDate()
|
|
179
|
+
|
|
180
|
+
if (mod.years !== void 0) {
|
|
181
|
+
year += sign * mod.years
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (mod.months !== void 0) {
|
|
185
|
+
month += sign * mod.months
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (mod.days !== void 0) {
|
|
189
|
+
day += sign * mod.days
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
date.setDate(1)
|
|
193
|
+
date.setMonth(2)
|
|
194
|
+
|
|
195
|
+
date.setFullYear(year)
|
|
196
|
+
date.setMonth(month)
|
|
197
|
+
date.setDate(day)
|
|
198
|
+
|
|
199
|
+
return date
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function getChange (date, mod, sign) {
|
|
203
|
+
const
|
|
204
|
+
d = new Date(date),
|
|
205
|
+
t = mod.years !== void 0 || mod.months !== void 0 || mod.days !== void 0
|
|
206
|
+
? applyYearMonthDayChange(d, mod, sign)
|
|
207
|
+
: d
|
|
208
|
+
|
|
209
|
+
Object.keys(mod).forEach(key => {
|
|
210
|
+
if (key !== 'years' && key !== 'months' && key !== 'days') {
|
|
211
|
+
const op = capitalize(key)
|
|
212
|
+
t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ])
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
return t
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function applyYearMonthDay (date, mod, middle) {
|
|
220
|
+
const
|
|
221
|
+
year = mod.year !== void 0 ? mod.year : date[ `get${ middle }FullYear` ](),
|
|
222
|
+
month = mod.month !== void 0 ? mod.month - 1 : date[ `get${ middle }Month` ](),
|
|
223
|
+
maxDay = (new Date(year, month + 1, 0)).getDate(),
|
|
224
|
+
day = Math.min(maxDay, mod.date !== void 0 ? mod.date : date[ `get${ middle }Date` ]())
|
|
225
|
+
|
|
226
|
+
date[ `set${ middle }Date` ](1)
|
|
227
|
+
date[ `set${ middle }Month` ](2)
|
|
228
|
+
|
|
229
|
+
date[ `set${ middle }FullYear` ](year)
|
|
230
|
+
date[ `set${ middle }Month` ](month)
|
|
231
|
+
date[ `set${ middle }Date` ](day)
|
|
232
|
+
|
|
233
|
+
return date
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function adjustDate (date, mod, utc) {
|
|
237
|
+
const
|
|
238
|
+
middle = utc === true ? 'UTC' : '',
|
|
239
|
+
d = new Date(date),
|
|
240
|
+
t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
|
|
241
|
+
? applyYearMonthDay(d, mod, middle)
|
|
242
|
+
: d
|
|
243
|
+
|
|
244
|
+
Object.keys(mod).forEach(key => {
|
|
245
|
+
if (key !== 'year' && key !== 'month' && key !== 'date') {
|
|
246
|
+
const op = key.charAt(0).toUpperCase() + key.slice(1)
|
|
247
|
+
t[ `set${ middle }${ op }` ](mod[ key ])
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
|
|
251
|
+
return t
|
|
252
|
+
}
|
|
253
|
+
|
|
164
254
|
export function extractDate (str, mask, dateLocale) {
|
|
165
255
|
const d = __splitDate(str, mask, dateLocale)
|
|
166
256
|
|
|
@@ -178,7 +268,7 @@ export function extractDate (str, mask, dateLocale) {
|
|
|
178
268
|
|
|
179
269
|
return d.timezoneOffset === null || d.timezoneOffset === tzOffset
|
|
180
270
|
? date
|
|
181
|
-
: getChange(date, { minutes: d.timezoneOffset - tzOffset },
|
|
271
|
+
: getChange(date, { minutes: d.timezoneOffset - tzOffset }, 1)
|
|
182
272
|
}
|
|
183
273
|
|
|
184
274
|
export function __splitDate (str, mask, dateLocale, calendar, defaultModel) {
|
|
@@ -319,43 +409,6 @@ export function __splitDate (str, mask, dateLocale, calendar, defaultModel) {
|
|
|
319
409
|
return date
|
|
320
410
|
}
|
|
321
411
|
|
|
322
|
-
function formatTimezone (offset, delimeter = '') {
|
|
323
|
-
const
|
|
324
|
-
sign = offset > 0 ? '-' : '+',
|
|
325
|
-
absOffset = Math.abs(offset),
|
|
326
|
-
hours = Math.floor(absOffset / 60),
|
|
327
|
-
minutes = absOffset % 60
|
|
328
|
-
|
|
329
|
-
return sign + pad(hours) + delimeter + pad(minutes)
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
function setMonth (date, newMonth /* 1-based */) {
|
|
333
|
-
const
|
|
334
|
-
test = new Date(date.getFullYear(), newMonth, 0, 0, 0, 0, 0),
|
|
335
|
-
days = test.getDate()
|
|
336
|
-
|
|
337
|
-
date.setMonth(newMonth - 1, Math.min(days, date.getDate()))
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
function getChange (date, mod, add) {
|
|
341
|
-
const
|
|
342
|
-
t = new Date(date),
|
|
343
|
-
sign = (add ? 1 : -1)
|
|
344
|
-
|
|
345
|
-
Object.keys(mod).forEach(key => {
|
|
346
|
-
if (key === 'months') {
|
|
347
|
-
setMonth(t, t.getMonth() + 1 + sign * mod.months)
|
|
348
|
-
return
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
const op = key === 'years'
|
|
352
|
-
? 'FullYear'
|
|
353
|
-
: capitalize(key === 'days' ? 'date' : key)
|
|
354
|
-
t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ])
|
|
355
|
-
})
|
|
356
|
-
return t
|
|
357
|
-
}
|
|
358
|
-
|
|
359
412
|
export function isValid (date) {
|
|
360
413
|
return typeof date === 'number'
|
|
361
414
|
? true
|
|
@@ -413,30 +466,10 @@ export function isBetweenDates (date, from, to, opts = {}) {
|
|
|
413
466
|
}
|
|
414
467
|
|
|
415
468
|
export function addToDate (date, mod) {
|
|
416
|
-
return getChange(date, mod,
|
|
469
|
+
return getChange(date, mod, 1)
|
|
417
470
|
}
|
|
418
471
|
export function subtractFromDate (date, mod) {
|
|
419
|
-
return getChange(date, mod,
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export function adjustDate (date, mod, utc) {
|
|
423
|
-
const
|
|
424
|
-
t = new Date(date),
|
|
425
|
-
prefix = `set${ utc === true ? 'UTC' : '' }`
|
|
426
|
-
|
|
427
|
-
Object.keys(mod).forEach(key => {
|
|
428
|
-
if (key === 'month') {
|
|
429
|
-
setMonth(t, mod.month)
|
|
430
|
-
return
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
const op = key === 'year'
|
|
434
|
-
? 'FullYear'
|
|
435
|
-
: key.charAt(0).toUpperCase() + key.slice(1)
|
|
436
|
-
t[ `${ prefix }${ op }` ](mod[ key ])
|
|
437
|
-
})
|
|
438
|
-
|
|
439
|
-
return t
|
|
472
|
+
return getChange(date, mod, -1)
|
|
440
473
|
}
|
|
441
474
|
|
|
442
475
|
export function startOfDate (date, unit, utc) {
|