quasar 2.4.0 → 2.4.4
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/BottomSheet.json +6 -2
- package/dist/api/Notify.json +25 -25
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +1 -1
- package/dist/api/QBtn.json +2 -2
- package/dist/api/QBtnDropdown.json +3 -3
- package/dist/api/QBtnToggle.json +1 -1
- package/dist/api/QCarousel.json +4 -4
- package/dist/api/QCarouselSlide.json +2 -2
- package/dist/api/QChatMessage.json +1 -1
- package/dist/api/QChip.json +4 -4
- package/dist/api/QExpansionItem.json +3 -3
- package/dist/api/QFab.json +2 -2
- package/dist/api/QFabAction.json +1 -1
- package/dist/api/QImg.json +2 -2
- package/dist/api/QLinearProgress.json +1 -1
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QParallax.json +1 -1
- package/dist/api/QPullToRefresh.json +1 -1
- package/dist/api/QRating.json +3 -3
- package/dist/api/QRouteTab.json +1 -1
- package/dist/api/QSelect.json +2 -2
- package/dist/api/QStep.json +4 -4
- package/dist/api/QStepper.json +4 -4
- package/dist/api/QTab.json +1 -1
- package/dist/api/QTable.json +4 -4
- package/dist/api/QTimelineEntry.json +2 -2
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTree.json +1 -1
- package/dist/api/QVideo.json +11 -1
- 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-ionicons-v6.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 +1 -1
- 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 +1 -1
- 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 +15 -14
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +15 -14
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +11 -13
- package/dist/quasar.umd.js +279 -209
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/api/slider.d.ts +6 -6
- package/dist/types/index.d.ts +20 -8
- package/dist/types/utils/date.d.ts +2 -1
- package/dist/vetur/quasar-attributes.json +5 -1
- package/dist/vetur/quasar-tags.json +2 -1
- package/dist/web-types/web-types.json +66 -57
- package/package.json +1 -1
- package/src/api.extends.json +1 -1
- package/src/components/btn/use-btn.js +5 -2
- package/src/components/btn-toggle/QBtnToggle.js +2 -0
- package/src/components/carousel/QCarouselSlide.json +2 -2
- package/src/components/chat/QChatMessage.json +1 -1
- package/src/components/dialog/QDialog.js +7 -5
- package/src/components/img/QImg.json +2 -2
- package/src/components/linear-progress/QLinearProgress.json +1 -1
- package/src/components/menu/QMenu.js +6 -2
- package/src/components/parallax/QParallax.json +1 -1
- package/src/components/range/QRange.js +67 -89
- package/src/components/rating/QRating.json +3 -3
- package/src/components/resize-observer/QResizeObserver.js +11 -10
- package/src/components/scroll-area/QScrollArea.js +5 -1
- package/src/components/scroll-area/QScrollArea.sass +1 -0
- package/src/components/scroll-observer/QScrollObserver.js +2 -0
- package/src/components/select/QSelect.js +4 -1
- package/src/components/select/QSelect.json +1 -1
- package/src/components/slider/QSlider.js +20 -10
- package/src/components/slider/QSlider.sass +5 -6
- package/src/components/slider/use-slider.js +19 -16
- package/src/components/tabs/QTabs.js +27 -11
- package/src/components/timeline/QTimeline.sass +1 -2
- package/src/components/timeline/QTimelineEntry.json +1 -1
- package/src/components/tooltip/QTooltip.js +1 -2
- package/src/components/video/QVideo.js +4 -1
- package/src/components/video/QVideo.json +12 -1
- package/src/composables/private/use-field.js +13 -15
- package/src/composables/private/use-model-toggle.js +1 -1
- package/src/composables/private/use-portal.js +9 -7
- package/src/composables/private/use-tick.js +7 -14
- package/src/css/variables.sass +4 -6
- package/src/plugins/BottomSheet.json +7 -1
- package/src/plugins/Notify.json +22 -22
- package/src/utils/clone.js +53 -4
- package/src/utils/private/focus-manager.js +8 -10
|
@@ -142,7 +142,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
142
142
|
const positionProp = computed(() => (
|
|
143
143
|
props.vertical === true
|
|
144
144
|
? (isReversed.value === true ? 'bottom' : 'top')
|
|
145
|
-
: isReversed.value === true ? 'right' : 'left'
|
|
145
|
+
: (isReversed.value === true ? 'right' : 'left')
|
|
146
146
|
))
|
|
147
147
|
|
|
148
148
|
const sizeProp = computed(() => (props.vertical === true ? 'height' : 'width'))
|
|
@@ -152,8 +152,8 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
152
152
|
const attributes = computed(() => {
|
|
153
153
|
const acc = {
|
|
154
154
|
role: 'slider',
|
|
155
|
-
'aria-valuemin':
|
|
156
|
-
'aria-valuemax':
|
|
155
|
+
'aria-valuemin': innerMin.value,
|
|
156
|
+
'aria-valuemax': innerMax.value,
|
|
157
157
|
'aria-orientation': orientation.value,
|
|
158
158
|
'data-step': props.step
|
|
159
159
|
}
|
|
@@ -344,15 +344,19 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
344
344
|
})
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
+
const filterFn = ({ value }) => value >= props.min && value <= props.max
|
|
348
|
+
|
|
347
349
|
if (Array.isArray(def) === true) {
|
|
348
|
-
return def
|
|
350
|
+
return def
|
|
351
|
+
.map(item => (Object(item) === item ? item : { value: item }))
|
|
352
|
+
.filter(filterFn)
|
|
349
353
|
}
|
|
350
354
|
|
|
351
355
|
return Object.keys(def).map(key => {
|
|
352
356
|
const item = def[ key ]
|
|
353
357
|
const value = Number(key)
|
|
354
358
|
return Object(item) === item ? { ...item, value } : { value, label: item }
|
|
355
|
-
})
|
|
359
|
+
}).filter(filterFn)
|
|
356
360
|
}
|
|
357
361
|
|
|
358
362
|
function getMarkerLabelStyle (val) {
|
|
@@ -407,6 +411,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
407
411
|
emit('pan', 'end')
|
|
408
412
|
}
|
|
409
413
|
active.value = false
|
|
414
|
+
focus.value = false
|
|
410
415
|
}
|
|
411
416
|
else if (event.isFirst === true) {
|
|
412
417
|
dragging.value = getDragging(event.evt)
|
|
@@ -467,7 +472,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
467
472
|
|
|
468
473
|
function getThumbRenderFn (thumb) {
|
|
469
474
|
const focusClass = computed(() => (
|
|
470
|
-
preventFocus.value === false && focus.value === thumb.focusValue
|
|
475
|
+
preventFocus.value === false && (focus.value === thumb.focusValue || focus.value === 'both')
|
|
471
476
|
? ' q-slider--focus'
|
|
472
477
|
: ''
|
|
473
478
|
))
|
|
@@ -482,9 +487,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
482
487
|
width: props.thumbSize,
|
|
483
488
|
height: props.thumbSize,
|
|
484
489
|
[ positionProp.value ]: `${ 100 * thumb.ratio.value }%`,
|
|
485
|
-
|
|
486
|
-
? thumb.nextFocus.value === 'min' ? 2 : void 0
|
|
487
|
-
: void 0
|
|
490
|
+
zIndex: focus.value === thumb.focusValue ? 2 : void 0
|
|
488
491
|
}))
|
|
489
492
|
|
|
490
493
|
const pinColor = computed(() => (
|
|
@@ -540,12 +543,12 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
540
543
|
return h('div', {
|
|
541
544
|
class: classes.value,
|
|
542
545
|
style: style.value,
|
|
543
|
-
...
|
|
546
|
+
...thumb.getNodeData()
|
|
544
547
|
}, thumbContent)
|
|
545
548
|
}
|
|
546
549
|
}
|
|
547
550
|
|
|
548
|
-
function getContent (selectionBarStyle,
|
|
551
|
+
function getContent (selectionBarStyle, trackContainerTabindex, trackContainerEvents, injectThumb) {
|
|
549
552
|
const trackContent = []
|
|
550
553
|
|
|
551
554
|
props.innerTrackColor !== 'transparent' && trackContent.push(
|
|
@@ -580,15 +583,14 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
580
583
|
{
|
|
581
584
|
key: 'trackC',
|
|
582
585
|
class: trackContainerClass.value,
|
|
583
|
-
tabindex:
|
|
584
|
-
...
|
|
586
|
+
tabindex: trackContainerTabindex.value,
|
|
587
|
+
...trackContainerEvents.value
|
|
585
588
|
},
|
|
586
589
|
[
|
|
587
590
|
h('div', {
|
|
588
591
|
class: trackClass.value,
|
|
589
592
|
style: trackStyle.value
|
|
590
|
-
},
|
|
591
|
-
trackContent)
|
|
593
|
+
}, trackContent)
|
|
592
594
|
],
|
|
593
595
|
'slide',
|
|
594
596
|
editable.value, () => panDirective.value
|
|
@@ -635,7 +637,8 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
|
|
|
635
637
|
innerMax,
|
|
636
638
|
innerMaxRatio,
|
|
637
639
|
positionProp,
|
|
638
|
-
sizeProp
|
|
640
|
+
sizeProp,
|
|
641
|
+
isReversed
|
|
639
642
|
},
|
|
640
643
|
|
|
641
644
|
methods: {
|
|
@@ -70,7 +70,8 @@ export default createComponent({
|
|
|
70
70
|
const vm = getCurrentInstance()
|
|
71
71
|
const { proxy: { $q } } = vm
|
|
72
72
|
|
|
73
|
-
const { registerTick
|
|
73
|
+
const { registerTick: registerScrollTick } = useTick()
|
|
74
|
+
const { registerTimeout: registerFocusTimeout, removeTimeout: removeFocusTimeout } = useTimeout()
|
|
74
75
|
const { registerTimeout } = useTimeout()
|
|
75
76
|
|
|
76
77
|
const rootRef = ref(null)
|
|
@@ -178,7 +179,7 @@ export default createComponent({
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
function recalculateScroll () {
|
|
181
|
-
|
|
182
|
+
registerScrollTick(() => {
|
|
182
183
|
if (vm.isDeactivated !== true && vm.isUnmounted !== true) {
|
|
183
184
|
updateContainer({
|
|
184
185
|
width: rootRef.value.offsetWidth,
|
|
@@ -186,8 +187,6 @@ export default createComponent({
|
|
|
186
187
|
})
|
|
187
188
|
}
|
|
188
189
|
})
|
|
189
|
-
|
|
190
|
-
prepareTick()
|
|
191
190
|
}
|
|
192
191
|
|
|
193
192
|
function updateContainer (domSize) {
|
|
@@ -346,11 +345,8 @@ export default createComponent({
|
|
|
346
345
|
return true
|
|
347
346
|
}
|
|
348
347
|
|
|
349
|
-
const dirPrev = (props.vertical === true
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const dirNext = (props.vertical === true && keyCode === 40 /* ArrowDown */)
|
|
353
|
-
|| (props.vertical !== true && keyCode === 39 /* ArrowRight */)
|
|
348
|
+
const dirPrev = keyCode === (props.vertical === true ? 38 /* ArrowUp */ : 37 /* ArrowLeft */)
|
|
349
|
+
const dirNext = keyCode === (props.vertical === true ? 40 /* ArrowDown */ : 39 /* ArrowRight */)
|
|
354
350
|
|
|
355
351
|
const dir = dirPrev === true ? -1 : (dirNext === true ? 1 : void 0)
|
|
356
352
|
|
|
@@ -484,8 +480,28 @@ export default createComponent({
|
|
|
484
480
|
}
|
|
485
481
|
}
|
|
486
482
|
|
|
487
|
-
function onFocusin () {
|
|
488
|
-
|
|
483
|
+
function onFocusin (e) {
|
|
484
|
+
removeFocusTimeout()
|
|
485
|
+
|
|
486
|
+
if (
|
|
487
|
+
hasFocus.value !== true
|
|
488
|
+
&& rootRef.value !== null
|
|
489
|
+
&& e.target
|
|
490
|
+
&& typeof e.target.closest === 'function'
|
|
491
|
+
) {
|
|
492
|
+
const tab = e.target.closest('.q-tab')
|
|
493
|
+
|
|
494
|
+
// if the target is contained by a QTab/QRouteTab
|
|
495
|
+
// (it might be other elements focused, like additional QBtn)
|
|
496
|
+
if (tab && rootRef.value.contains(tab) === true) {
|
|
497
|
+
hasFocus.value = true
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function onFocusout () {
|
|
503
|
+
registerFocusTimeout(() => { hasFocus.value = false }, 30)
|
|
504
|
+
}
|
|
489
505
|
|
|
490
506
|
function verifyRouteModel () {
|
|
491
507
|
if ($tabs.avoidRouteWatcher !== true) {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"desc": "URL to the avatar image; Icon takes precedence if used, so it replaces avatar",
|
|
35
35
|
"transformAssetUrls": true,
|
|
36
36
|
"examples": [
|
|
37
|
-
"(
|
|
37
|
+
"(public folder) src=\"img/my-bg.png\"",
|
|
38
38
|
"(assets folder) src=\"~assets/my-img.png\"",
|
|
39
39
|
"(relative path format) :src=\"require('./my_img.jpg')\"",
|
|
40
40
|
"(URL) src=\"https://placeimg.com/500/300/nature\""
|
|
@@ -92,7 +92,7 @@ export default createComponent({
|
|
|
92
92
|
const selfOrigin = computed(() => parsePosition(props.self, $q.lang.rtl))
|
|
93
93
|
const hideOnRouteChange = computed(() => props.persistent !== true)
|
|
94
94
|
|
|
95
|
-
const { registerTick, removeTick
|
|
95
|
+
const { registerTick, removeTick } = useTick()
|
|
96
96
|
const { registerTimeout, removeTimeout } = useTimeout()
|
|
97
97
|
const { transition, transitionStyle } = useTransition(props, showing)
|
|
98
98
|
const { localScrollTarget, changeScrollEvent, unconfigureScrollTarget } = useScrollTarget(props, configureScrollTarget)
|
|
@@ -158,7 +158,6 @@ export default createComponent({
|
|
|
158
158
|
updatePosition()
|
|
159
159
|
configureScrollTarget()
|
|
160
160
|
})
|
|
161
|
-
prepareTick()
|
|
162
161
|
|
|
163
162
|
if (unwatchPosition === void 0) {
|
|
164
163
|
unwatchPosition = watch(
|
|
@@ -13,7 +13,9 @@ export default createComponent({
|
|
|
13
13
|
src: {
|
|
14
14
|
type: String,
|
|
15
15
|
required: true
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
title: String
|
|
17
19
|
},
|
|
18
20
|
|
|
19
21
|
setup (props) {
|
|
@@ -30,6 +32,7 @@ export default createComponent({
|
|
|
30
32
|
}, [
|
|
31
33
|
h('iframe', {
|
|
32
34
|
src: props.src,
|
|
35
|
+
title: props.title,
|
|
33
36
|
frameborder: '0',
|
|
34
37
|
allowfullscreen: true
|
|
35
38
|
})
|
|
@@ -11,9 +11,20 @@
|
|
|
11
11
|
"desc": "The source url to display in an iframe",
|
|
12
12
|
"required": true,
|
|
13
13
|
"examples": [
|
|
14
|
-
"
|
|
14
|
+
"https://www.youtube.com/embed/k3_tw44QsZQ"
|
|
15
15
|
],
|
|
16
16
|
"category": "model"
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
"title": {
|
|
20
|
+
"type": "String",
|
|
21
|
+
"desc": "(Accessibility) Set the native 'title' attribute value of the inner iframe being used",
|
|
22
|
+
"required": false,
|
|
23
|
+
"examples": [
|
|
24
|
+
"My Daily Marathon"
|
|
25
|
+
],
|
|
26
|
+
"category": "accessibility",
|
|
27
|
+
"addedIn": "v2.4.3"
|
|
17
28
|
}
|
|
18
29
|
}
|
|
19
30
|
}
|
|
@@ -263,26 +263,24 @@ export default function (state) {
|
|
|
263
263
|
state.targetUid.value = getTargetUid(val)
|
|
264
264
|
})
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
function focusHandler () {
|
|
267
|
+
const el = document.activeElement
|
|
268
|
+
let target = state.targetRef !== void 0 && state.targetRef.value
|
|
267
269
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const el = document.activeElement
|
|
273
|
-
let target = state.targetRef !== void 0 && state.targetRef.value
|
|
274
|
-
|
|
275
|
-
if (target && (el === null || el.id !== state.targetUid.value)) {
|
|
276
|
-
target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'))
|
|
277
|
-
if (target && target !== el) {
|
|
278
|
-
target.focus()
|
|
279
|
-
}
|
|
270
|
+
if (target && (el === null || el.id !== state.targetUid.value)) {
|
|
271
|
+
target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'))
|
|
272
|
+
if (target && target !== el) {
|
|
273
|
+
target.focus()
|
|
280
274
|
}
|
|
281
|
-
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function focus () {
|
|
279
|
+
addFocusFn(focusHandler)
|
|
282
280
|
}
|
|
283
281
|
|
|
284
282
|
function blur () {
|
|
285
|
-
|
|
283
|
+
removeFocusFn(focusHandler)
|
|
286
284
|
const el = document.activeElement
|
|
287
285
|
if (el !== null && state.rootRef.value.contains(el)) {
|
|
288
286
|
el.blur()
|
|
@@ -15,7 +15,7 @@ export const useModelToggleEmits = [
|
|
|
15
15
|
'before-show', 'show', 'before-hide', 'hide'
|
|
16
16
|
]
|
|
17
17
|
|
|
18
|
-
// handleShow/handleHide -> removeTick(), self (& emit show)
|
|
18
|
+
// handleShow/handleHide -> removeTick(), self (& emit show)
|
|
19
19
|
|
|
20
20
|
export default function ({
|
|
21
21
|
showing,
|
|
@@ -48,16 +48,18 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
|
|
|
48
48
|
return
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
if (
|
|
52
|
-
portalEl
|
|
53
|
-
|
|
51
|
+
if (portalIsActive.value === false) {
|
|
52
|
+
if (onGlobalDialog === false && portalEl === null) {
|
|
53
|
+
portalEl = createGlobalNode()
|
|
54
|
+
}
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
portalIsActive.value = true
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
// register portal
|
|
59
|
+
portalList.push(vm.proxy)
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
addFocusWaitFlag(focusObj)
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
function hidePortal () {
|
|
@@ -4,8 +4,6 @@ import { nextTick, onBeforeUnmount } from 'vue'
|
|
|
4
4
|
* Usage:
|
|
5
5
|
* registerTick(fn)
|
|
6
6
|
* registerTick(fn)
|
|
7
|
-
* ....
|
|
8
|
-
* prepareTick()
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
9
|
export default function () {
|
|
@@ -18,22 +16,17 @@ export default function () {
|
|
|
18
16
|
return {
|
|
19
17
|
registerTick (fn) {
|
|
20
18
|
tickFn = fn
|
|
19
|
+
|
|
20
|
+
nextTick(() => {
|
|
21
|
+
if (tickFn === fn) {
|
|
22
|
+
tickFn()
|
|
23
|
+
tickFn = void 0
|
|
24
|
+
}
|
|
25
|
+
})
|
|
21
26
|
},
|
|
22
27
|
|
|
23
28
|
removeTick () {
|
|
24
29
|
tickFn = void 0
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
prepareTick () {
|
|
28
|
-
if (tickFn !== void 0) {
|
|
29
|
-
const fn = tickFn
|
|
30
|
-
nextTick(() => {
|
|
31
|
-
if (tickFn === fn) {
|
|
32
|
-
tickFn()
|
|
33
|
-
tickFn = void 0
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
30
|
}
|
|
38
31
|
}
|
|
39
32
|
}
|
package/src/css/variables.sass
CHANGED
|
@@ -39,20 +39,18 @@ $flex-gutter: ('none': 0, 'xs': $flex-gutter-xs, 'sm': $flex-gutter-sm, 'md': $f
|
|
|
39
39
|
// sorry for long line; we need .sass and it doesn't support multi-line list
|
|
40
40
|
$sizes: ('xs': 0, 'sm': ($breakpoint-xs + 1), 'md': ($breakpoint-sm + 1), 'lg': ($breakpoint-md + 1), 'xl': ($breakpoint-lg + 1)) !default
|
|
41
41
|
|
|
42
|
-
$breakpoint-xs-
|
|
43
|
-
$breakpoint-xs-max: $breakpoint-xs !default
|
|
42
|
+
$breakpoint-xs-max: (map-get($sizes, "sm") - 0.02) !default
|
|
44
43
|
|
|
45
44
|
$breakpoint-sm-min: map-get($sizes, "sm") !default
|
|
46
|
-
$breakpoint-sm-max: $
|
|
45
|
+
$breakpoint-sm-max: (map-get($sizes, "md") - 0.02) !default
|
|
47
46
|
|
|
48
47
|
$breakpoint-md-min: map-get($sizes, "md") !default
|
|
49
|
-
$breakpoint-md-max: $
|
|
48
|
+
$breakpoint-md-max: (map-get($sizes, "lg") - 0.02) !default
|
|
50
49
|
|
|
51
50
|
$breakpoint-lg-min: map-get($sizes, "lg") !default
|
|
52
|
-
$breakpoint-lg-max: $
|
|
51
|
+
$breakpoint-lg-max: (map-get($sizes, "xl") - 0.02) !default
|
|
53
52
|
|
|
54
53
|
$breakpoint-xl-min: map-get($sizes, "xl") !default
|
|
55
|
-
$breakpoint-xl-max: 9999px !default
|
|
56
54
|
|
|
57
55
|
$h1: (size: 6rem, line-height: 6rem, letter-spacing: -.01562em, weight: 300) !default
|
|
58
56
|
$h2: (size: 3.75rem, line-height: 3.75rem, letter-spacing: -.00833em, weight: 300) !default
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"type": "String",
|
|
46
46
|
"desc": "Path to an image for this action",
|
|
47
47
|
"examples": [
|
|
48
|
-
"(
|
|
48
|
+
"(public folder) img/something.png",
|
|
49
49
|
"(relative path format) :src=\"require('./my_img.jpg')\"",
|
|
50
50
|
"(URL) https://some-site.net/some-img.gif"
|
|
51
51
|
]
|
|
@@ -60,6 +60,12 @@
|
|
|
60
60
|
"type": [ "String", "Number" ],
|
|
61
61
|
"desc": "Action label",
|
|
62
62
|
"examples": [ "Facebook" ]
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
"...": {
|
|
66
|
+
"type": "Any",
|
|
67
|
+
"desc": "Any other custom props",
|
|
68
|
+
"__exemption": [ "examples" ]
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
},
|
package/src/plugins/Notify.json
CHANGED
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
|
|
46
46
|
"avatar": {
|
|
47
47
|
"type": "String",
|
|
48
|
-
"desc": "URL to an avatar/image; Suggestion: use
|
|
48
|
+
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
49
49
|
"examples": [
|
|
50
|
-
"(
|
|
50
|
+
"(public folder) img/something.png",
|
|
51
51
|
"(relative path format) require('./my_img.jpg')",
|
|
52
52
|
"(URL) https://some-site.net/some-img.gif"
|
|
53
53
|
]
|
|
@@ -204,9 +204,9 @@
|
|
|
204
204
|
|
|
205
205
|
"avatar": {
|
|
206
206
|
"type": "String",
|
|
207
|
-
"desc": "URL to an avatar/image; Suggestion:
|
|
207
|
+
"desc": "URL to an avatar/image; Suggestion: public folder",
|
|
208
208
|
"examples": [
|
|
209
|
-
"(
|
|
209
|
+
"(public folder) img/something.png",
|
|
210
210
|
"(relative path format) require('./my_img.jpg')",
|
|
211
211
|
"(URL) https://some-site.net/some-img.gif"
|
|
212
212
|
]
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
"desc": "Style definitions to be attributed to the badge",
|
|
259
259
|
"examples": [
|
|
260
260
|
"background-color: #ff0000",
|
|
261
|
-
"
|
|
261
|
+
"{ backgroundColor: '#ff0000' }"
|
|
262
262
|
]
|
|
263
263
|
},
|
|
264
264
|
"badgeClass": {
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
"desc": "Class definitions to be attributed to the badge",
|
|
267
267
|
"examples": [
|
|
268
268
|
"my-special-class",
|
|
269
|
-
"
|
|
269
|
+
"{ 'my-special-class': <condition> }"
|
|
270
270
|
]
|
|
271
271
|
},
|
|
272
272
|
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
"desc": "Class definitions to be attributed to the progress bar",
|
|
280
280
|
"examples": [
|
|
281
281
|
"my-special-class",
|
|
282
|
-
"
|
|
282
|
+
"{ 'my-special-class': <condition> }"
|
|
283
283
|
]
|
|
284
284
|
},
|
|
285
285
|
|
|
@@ -387,9 +387,9 @@
|
|
|
387
387
|
|
|
388
388
|
"avatar": {
|
|
389
389
|
"type": "String",
|
|
390
|
-
"desc": "URL to an avatar/image; Suggestion: use
|
|
390
|
+
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
391
391
|
"examples": [
|
|
392
|
-
"(
|
|
392
|
+
"(public folder) img/something.png",
|
|
393
393
|
"(relative path format) require('./my_img.jpg')",
|
|
394
394
|
"(URL) https://some-site.net/some-img.gif"
|
|
395
395
|
]
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
"desc": "Class definitions to be attributed to the progress bar",
|
|
411
411
|
"examples": [
|
|
412
412
|
"my-special-class",
|
|
413
|
-
"
|
|
413
|
+
"{ 'my-special-class': <condition> }"
|
|
414
414
|
]
|
|
415
415
|
},
|
|
416
416
|
|
|
@@ -521,13 +521,13 @@
|
|
|
521
521
|
|
|
522
522
|
"avatar": {
|
|
523
523
|
"type": "String",
|
|
524
|
-
"desc": "URL to an avatar/image; Suggestion: use
|
|
524
|
+
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
525
525
|
"examples": [
|
|
526
|
-
"(
|
|
526
|
+
"(public folder) img/something.png",
|
|
527
527
|
"(relative path format) require('./my_img.jpg')",
|
|
528
528
|
"(URL) https://some-site.net/some-img.gif"
|
|
529
529
|
]
|
|
530
|
-
|
|
530
|
+
},
|
|
531
531
|
|
|
532
532
|
"spinner": {
|
|
533
533
|
"type": [ "Boolean", "Component" ],
|
|
@@ -570,7 +570,7 @@
|
|
|
570
570
|
"desc": "Style definitions to be attributed to the badge",
|
|
571
571
|
"examples": [
|
|
572
572
|
"background-color: #ff0000",
|
|
573
|
-
"
|
|
573
|
+
"{ backgroundColor: '#ff0000' }"
|
|
574
574
|
]
|
|
575
575
|
},
|
|
576
576
|
"badgeClass": {
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
"desc": "Class definitions to be attributed to the badge",
|
|
579
579
|
"examples": [
|
|
580
580
|
"my-special-class",
|
|
581
|
-
"
|
|
581
|
+
"{ 'my-special-class': <condition> }"
|
|
582
582
|
]
|
|
583
583
|
},
|
|
584
584
|
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
"desc": "Class definitions to be attributed to the progress bar",
|
|
592
592
|
"examples": [
|
|
593
593
|
"my-special-class",
|
|
594
|
-
"
|
|
594
|
+
"{ 'my-special-class': <condition> }"
|
|
595
595
|
]
|
|
596
596
|
},
|
|
597
597
|
|
|
@@ -701,13 +701,13 @@
|
|
|
701
701
|
|
|
702
702
|
"avatar": {
|
|
703
703
|
"type": "String",
|
|
704
|
-
"desc": "URL to an avatar/image; Suggestion: use
|
|
704
|
+
"desc": "URL to an avatar/image; Suggestion: use public folder",
|
|
705
705
|
"examples": [
|
|
706
|
-
"(
|
|
706
|
+
"(public folder) img/something.png",
|
|
707
707
|
"(relative path format) require('./my_img.jpg')",
|
|
708
708
|
"(URL) https://some-site.net/some-img.gif"
|
|
709
709
|
]
|
|
710
|
-
|
|
710
|
+
},
|
|
711
711
|
|
|
712
712
|
"spinner": {
|
|
713
713
|
"type": [ "Boolean", "Component" ],
|
|
@@ -750,7 +750,7 @@
|
|
|
750
750
|
"desc": "Style definitions to be attributed to the badge",
|
|
751
751
|
"examples": [
|
|
752
752
|
"background-color: #ff0000",
|
|
753
|
-
"
|
|
753
|
+
"{ backgroundColor: '#ff0000' }"
|
|
754
754
|
]
|
|
755
755
|
},
|
|
756
756
|
"badgeClass": {
|
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
"desc": "Class definitions to be attributed to the badge",
|
|
759
759
|
"examples": [
|
|
760
760
|
"my-special-class",
|
|
761
|
-
"
|
|
761
|
+
"{ 'my-special-class': <condition> }"
|
|
762
762
|
]
|
|
763
763
|
},
|
|
764
764
|
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
"desc": "Class definitions to be attributed to the progress bar",
|
|
772
772
|
"examples": [
|
|
773
773
|
"my-special-class",
|
|
774
|
-
"
|
|
774
|
+
"{ 'my-special-class': <condition> }"
|
|
775
775
|
]
|
|
776
776
|
},
|
|
777
777
|
|
package/src/utils/clone.js
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// adapted from https://stackoverflow.com/a/40294058
|
|
2
|
+
|
|
3
|
+
export default function cloneDeep (data, hash = new WeakMap()) {
|
|
4
|
+
if (Object(data) !== data) return data
|
|
5
|
+
if (hash.has(data)) return hash.get(data)
|
|
6
|
+
|
|
7
|
+
const result = data instanceof Date
|
|
8
|
+
? new Date(data)
|
|
9
|
+
: (data instanceof RegExp
|
|
10
|
+
? new RegExp(data.source, data.flags)
|
|
11
|
+
: (data instanceof Set
|
|
12
|
+
? new Set()
|
|
13
|
+
: (data instanceof Map
|
|
14
|
+
? new Map()
|
|
15
|
+
: (typeof data.constructor !== 'function'
|
|
16
|
+
? Object.create(null)
|
|
17
|
+
: (data.prototype !== void 0 && typeof data.prototype.constructor === 'function'
|
|
18
|
+
? data
|
|
19
|
+
: new data.constructor()
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if (typeof data.constructor === 'function' && typeof data.valueOf === 'function') {
|
|
27
|
+
const val = data.valueOf()
|
|
28
|
+
|
|
29
|
+
if (Object(val) !== val) {
|
|
30
|
+
const result = new data.constructor(val)
|
|
31
|
+
|
|
32
|
+
hash.set(data, result)
|
|
33
|
+
|
|
34
|
+
return result
|
|
35
|
+
}
|
|
5
36
|
}
|
|
37
|
+
|
|
38
|
+
hash.set(data, result)
|
|
39
|
+
|
|
40
|
+
if (data instanceof Set) {
|
|
41
|
+
data.forEach(val => {
|
|
42
|
+
result.add(cloneDeep(val, hash))
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
else if (data instanceof Map) {
|
|
46
|
+
data.forEach((val, key) => {
|
|
47
|
+
result.set(key, cloneDeep(val, hash))
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return Object.assign(
|
|
52
|
+
result,
|
|
53
|
+
...Object.keys(data).map(key => ({ [ key ]: cloneDeep(data[ key ], hash) }))
|
|
54
|
+
)
|
|
6
55
|
}
|