quasar 2.3.4 → 2.4.3
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 +1 -1
- package/dist/api/Loading.json +2 -6
- package/dist/api/Notify.json +5 -5
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +32 -11
- package/dist/api/QBtn.json +32 -16
- package/dist/api/QBtnDropdown.json +33 -17
- package/dist/api/QBtnToggle.json +4 -1
- package/dist/api/QCarousel.json +4 -4
- package/dist/api/QChatMessage.json +4 -12
- package/dist/api/QChip.json +4 -4
- package/dist/api/QExpansionItem.json +34 -13
- package/dist/api/QFab.json +32 -2
- package/dist/api/QFabAction.json +9 -1
- package/dist/api/QField.json +1 -0
- package/dist/api/QFile.json +1 -0
- package/dist/api/QInput.json +1 -0
- package/dist/api/QItem.json +31 -10
- package/dist/api/QLinearProgress.json +1 -1
- package/dist/api/QOptionGroup.json +74 -4
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QPullToRefresh.json +1 -1
- package/dist/api/QRange.json +592 -107
- package/dist/api/QRating.json +3 -3
- package/dist/api/QRouteTab.json +32 -12
- package/dist/api/QSelect.json +4 -7
- package/dist/api/QSlider.json +504 -39
- 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 +1 -1
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTree.json +1 -1
- package/dist/api/QUploader.json +16 -2
- 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 +277 -196
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +344 -275
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +243 -189
- package/dist/quasar.umd.js +16670 -16294
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/transforms/loader-asset-urls.json +20 -0
- package/dist/types/api/slider.d.ts +46 -0
- package/dist/types/api/validation.d.ts +4 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/composables.d.ts +3 -3
- package/dist/types/index.d.ts +599 -121
- package/dist/types/utils/date.d.ts +2 -1
- package/dist/vetur/quasar-attributes.json +254 -82
- package/dist/vetur/quasar-tags.json +61 -18
- package/dist/web-types/web-types.json +635 -197
- package/package.json +1 -1
- package/src/api.extends.json +1 -2
- package/src/components/breadcrumbs/QBreadcrumbs.js +7 -2
- package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +14 -8
- package/src/components/btn/QBtn.js +5 -5
- package/src/components/btn/use-btn.js +21 -21
- package/src/components/btn/use-btn.json +22 -13
- package/src/components/btn-toggle/QBtnToggle.json +3 -0
- package/src/components/checkbox/use-checkbox.js +1 -1
- package/src/components/color/QColor.js +32 -26
- package/src/components/color/QColor.sass +10 -23
- package/src/components/date/QDate.sass +2 -0
- package/src/components/dialog/QDialog.js +7 -5
- package/src/components/drawer/QDrawer.js +18 -15
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/editor/QEditor.sass +10 -1
- package/src/components/expansion-item/QExpansionItem.js +4 -1
- package/src/components/fab/QFab.js +18 -12
- package/src/components/fab/QFab.json +33 -0
- package/src/components/fab/QFab.sass +1 -1
- package/src/components/fab/QFabAction.js +14 -7
- package/src/components/fab/QFabAction.json +10 -0
- package/src/components/file/QFile.js +12 -5
- package/src/components/file/QFile.sass +4 -2
- package/src/components/footer/QFooter.js +1 -1
- package/src/components/header/QHeader.js +1 -1
- package/src/components/icon/QIcon.js +1 -1
- package/src/components/infinite-scroll/QInfiniteScroll.js +4 -5
- package/src/components/item/QItem.js +2 -3
- package/src/components/linear-progress/QLinearProgress.json +1 -1
- package/src/components/menu/QMenu.js +6 -2
- package/src/components/option-group/QOptionGroup.js +3 -0
- package/src/components/option-group/QOptionGroup.json +48 -2
- package/src/components/parallax/QParallax.js +4 -2
- package/src/components/popup-edit/QPopupEdit.js +2 -5
- package/src/components/radio/QRadio.js +2 -7
- package/src/components/range/QRange.js +132 -273
- package/src/components/range/QRange.json +11 -121
- package/src/components/rating/QRating.json +3 -3
- package/src/components/resize-observer/QResizeObserver.js +11 -10
- package/src/components/scroll-area/QScrollArea.js +8 -2
- package/src/components/scroll-observer/QScrollObserver.js +2 -0
- package/src/components/select/QSelect.js +4 -1
- package/src/components/slider/QSlider.js +61 -137
- package/src/components/slider/QSlider.json +1 -121
- package/src/components/slider/QSlider.sass +203 -138
- package/src/components/slider/use-slider.js +454 -107
- package/src/components/slider/use-slider.json +546 -0
- package/src/components/stepper/QStepper.js +3 -3
- package/src/components/stepper/QStepper.sass +24 -26
- package/src/components/table/QTable.js +26 -46
- package/src/components/tabs/QRouteTab.js +1 -2
- package/src/components/tabs/QRouteTab.json +0 -7
- package/src/components/tabs/QTabs.js +91 -24
- package/src/components/tabs/use-tab.js +26 -13
- package/src/components/tooltip/QTooltip.js +1 -2
- package/src/components/tree/QTree.js +14 -12
- package/src/components/uploader/QUploader.json +14 -2
- package/src/components/uploader/uploader-core.js +16 -9
- package/src/components/video/QVideo.js +4 -1
- package/src/components/video/QVideo.json +12 -1
- package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
- package/src/components/virtual-scroll/use-virtual-scroll.js +30 -17
- package/src/composables/private/use-field.js +18 -20
- package/src/composables/private/use-file.js +20 -5
- package/src/composables/private/use-form.js +2 -3
- package/src/composables/private/use-fullscreen.js +15 -4
- package/src/composables/private/use-model-toggle.js +1 -1
- package/src/composables/private/use-portal.js +9 -7
- package/src/composables/private/use-router-link.js +44 -23
- package/src/composables/private/use-router-link.json +26 -10
- package/src/composables/private/use-split-attrs.js +4 -4
- package/src/composables/private/use-tick.js +7 -14
- package/src/composables/private/use-validate.js +21 -15
- package/src/composables/private/use-validate.json +1 -0
- package/src/css/core/helpers.sass +3 -0
- package/src/css/core/positioning.sass +5 -0
- package/src/css/variables.sass +4 -6
- package/src/directives/ScrollFire.js +1 -0
- package/src/icon-set.js +2 -4
- package/src/plugins/AppFullscreen.js +70 -53
- package/src/plugins/AppVisibility.js +2 -3
- package/src/plugins/BottomSheet.js +3 -5
- package/src/plugins/Dialog.js +3 -5
- package/src/plugins/LoadingBar.js +17 -18
- package/src/plugins/Notify.js +296 -295
- package/src/plugins/Platform.js +14 -14
- package/src/utils/clone.js +53 -4
- package/src/utils/date.js +4 -4
- package/src/utils/dom.js +2 -2
- package/src/utils/open-url.js +2 -2
- package/src/utils/patterns.js +1 -0
- package/src/utils/private/define-reactive-plugin.js +10 -8
- package/src/utils/private/focus-manager.js +8 -10
- package/src/utils/private/global-dialog.js +6 -8
- package/src/utils/private/inject-obj-prop.js +13 -0
- package/src/utils/private/is.js +2 -2
package/package.json
CHANGED
package/src/api.extends.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"map",
|
|
53
53
|
"ion-add",
|
|
54
54
|
"img:https://cdn.quasar.dev/logo-v2/svg/logo.svg",
|
|
55
|
-
"img:
|
|
55
|
+
"img:path/to/some_image.png"
|
|
56
56
|
],
|
|
57
57
|
"category": "content"
|
|
58
58
|
},
|
|
@@ -110,7 +110,6 @@
|
|
|
110
110
|
|
|
111
111
|
"html": {
|
|
112
112
|
"type": "Boolean",
|
|
113
|
-
"default": "false",
|
|
114
113
|
"desc": "Force use of textContent instead of innerHTML to render text; Use it when the text might be unsafe (from user input)",
|
|
115
114
|
"category": "behavior"
|
|
116
115
|
},
|
|
@@ -6,6 +6,8 @@ import { createComponent } from '../../utils/private/create.js'
|
|
|
6
6
|
import { hSlot } from '../../utils/private/render.js'
|
|
7
7
|
import { getNormalizedVNodes } from '../../utils/private/vm.js'
|
|
8
8
|
|
|
9
|
+
const disabledValues = [ void 0, true ]
|
|
10
|
+
|
|
9
11
|
export default createComponent({
|
|
10
12
|
name: 'QBreadcrumbs',
|
|
11
13
|
|
|
@@ -59,12 +61,15 @@ export default createComponent({
|
|
|
59
61
|
vnodes.forEach(comp => {
|
|
60
62
|
if (comp.type !== void 0 && comp.type.name === 'QBreadcrumbsEl') {
|
|
61
63
|
const middle = els < len
|
|
64
|
+
const disabled = comp.props !== null && disabledValues.includes(comp.props.disable)
|
|
65
|
+
const cls = (middle === true ? ' q-breadcrumbs--last' : '')
|
|
66
|
+
+ (disabled !== true && middle === true ? ' ' + activeClass.value : '')
|
|
67
|
+
|
|
62
68
|
els++
|
|
63
69
|
|
|
64
70
|
child.push(
|
|
65
71
|
h('div', {
|
|
66
|
-
class:
|
|
67
|
-
+ (middle === true ? activeClass.value : 'q-breadcrumbs--last')
|
|
72
|
+
class: `flex items-center${ cls }`
|
|
68
73
|
}, [ comp ])
|
|
69
74
|
)
|
|
70
75
|
|
|
@@ -22,12 +22,17 @@ export default createComponent({
|
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
setup (props, { slots }) {
|
|
25
|
-
const { linkTag, linkProps,
|
|
25
|
+
const { linkTag, linkProps, hasRouterLink, navigateToRouterLink } = useRouterLink()
|
|
26
26
|
|
|
27
27
|
const data = computed(() => {
|
|
28
|
-
const acc = {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const acc = {
|
|
29
|
+
class: 'q-breadcrumbs__el q-link '
|
|
30
|
+
+ 'flex inline items-center relative-position '
|
|
31
|
+
+ (props.disable !== true ? 'q-link--focusable' : 'q-breadcrumbs__el--disable'),
|
|
32
|
+
...linkProps.value
|
|
33
|
+
}
|
|
34
|
+
if (hasRouterLink.value === true) {
|
|
35
|
+
acc.onClick = navigateToRouterLink
|
|
31
36
|
}
|
|
32
37
|
return acc
|
|
33
38
|
})
|
|
@@ -49,10 +54,11 @@ export default createComponent({
|
|
|
49
54
|
|
|
50
55
|
props.label !== void 0 && child.push(props.label)
|
|
51
56
|
|
|
52
|
-
return h(
|
|
53
|
-
|
|
54
|
-
...data.value
|
|
55
|
-
|
|
57
|
+
return h(
|
|
58
|
+
linkTag.value,
|
|
59
|
+
{ ...data.value },
|
|
60
|
+
hMergeSlot(slots.default, child)
|
|
61
|
+
)
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
})
|
|
@@ -37,7 +37,7 @@ export default createComponent({
|
|
|
37
37
|
const {
|
|
38
38
|
classes, style, innerClasses,
|
|
39
39
|
attributes,
|
|
40
|
-
hasLink,
|
|
40
|
+
hasRouterLink, hasLink, linkTag, navigateToRouterLink,
|
|
41
41
|
isActionable
|
|
42
42
|
} = useBtn(props)
|
|
43
43
|
|
|
@@ -54,7 +54,7 @@ export default createComponent({
|
|
|
54
54
|
props.disable === true || props.ripple === false
|
|
55
55
|
? false
|
|
56
56
|
: {
|
|
57
|
-
keyCodes:
|
|
57
|
+
keyCodes: hasLink.value === true ? [ 13, 32 ] : [ 13 ],
|
|
58
58
|
...(props.ripple === true ? {} : props.ripple)
|
|
59
59
|
}
|
|
60
60
|
))
|
|
@@ -135,10 +135,10 @@ export default createComponent({
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
if (
|
|
138
|
+
if (hasRouterLink.value === true) {
|
|
139
139
|
const go = () => {
|
|
140
140
|
e.__qNavigate = true
|
|
141
|
-
|
|
141
|
+
navigateToRouterLink(e)
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
emit('click', e, go)
|
|
@@ -360,7 +360,7 @@ export default createComponent({
|
|
|
360
360
|
|
|
361
361
|
return withDirectives(
|
|
362
362
|
h(
|
|
363
|
-
|
|
363
|
+
linkTag.value,
|
|
364
364
|
nodeProps.value,
|
|
365
365
|
child
|
|
366
366
|
),
|
|
@@ -21,6 +21,9 @@ const defaultSizes = {
|
|
|
21
21
|
xl: 24
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
const formTypes = [ 'button', 'submit', 'reset' ]
|
|
25
|
+
const mediaTypeRE = /[^\s]\/[^\s]/
|
|
26
|
+
|
|
24
27
|
export const useBtnProps = {
|
|
25
28
|
...useSizeProps,
|
|
26
29
|
...useRouterLinkProps,
|
|
@@ -76,7 +79,7 @@ export const useBtnProps = {
|
|
|
76
79
|
export default function (props) {
|
|
77
80
|
const sizeStyle = useSize(props, defaultSizes)
|
|
78
81
|
const alignClass = useAlign(props)
|
|
79
|
-
const { hasLink, linkProps,
|
|
82
|
+
const { hasRouterLink, hasLink, linkTag, linkProps, navigateToRouterLink } = useRouterLink('button')
|
|
80
83
|
|
|
81
84
|
const style = computed(() => {
|
|
82
85
|
const obj = props.fab === false && props.fabMini === false
|
|
@@ -107,10 +110,6 @@ export default function (props) {
|
|
|
107
110
|
isActionable.value === true ? props.tabindex || 0 : -1
|
|
108
111
|
))
|
|
109
112
|
|
|
110
|
-
const isLink = computed(() =>
|
|
111
|
-
props.type === 'a' || hasLink.value === true
|
|
112
|
-
)
|
|
113
|
-
|
|
114
113
|
const design = computed(() => {
|
|
115
114
|
if (props.flat === true) return 'flat'
|
|
116
115
|
if (props.outline === true) return 'outline'
|
|
@@ -122,19 +121,24 @@ export default function (props) {
|
|
|
122
121
|
const attributes = computed(() => {
|
|
123
122
|
const acc = { tabindex: tabIndex.value }
|
|
124
123
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
124
|
+
if (hasLink.value === true) {
|
|
125
|
+
Object.assign(acc, linkProps.value)
|
|
126
|
+
}
|
|
127
|
+
else if (formTypes.includes(props.type) === true) {
|
|
129
128
|
acc.type = props.type
|
|
130
129
|
}
|
|
131
130
|
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
if (linkTag.value === 'a') {
|
|
132
|
+
if (acc.href === void 0) {
|
|
133
|
+
acc.role = 'button'
|
|
134
|
+
}
|
|
135
|
+
if (hasRouterLink.value !== true && mediaTypeRE.test(props.type) === true) {
|
|
136
|
+
acc.type = props.type
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
|
-
else {
|
|
137
|
-
acc.
|
|
139
|
+
else if (props.disable === true) {
|
|
140
|
+
acc.disabled = ''
|
|
141
|
+
acc[ 'aria-disabled' ] = 'true'
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
if (props.loading === true && props.percentage !== void 0) {
|
|
@@ -146,11 +150,6 @@ export default function (props) {
|
|
|
146
150
|
})
|
|
147
151
|
}
|
|
148
152
|
|
|
149
|
-
if (props.disable === true) {
|
|
150
|
-
acc.disabled = ''
|
|
151
|
-
acc[ 'aria-disabled' ] = 'true'
|
|
152
|
-
}
|
|
153
|
-
|
|
154
153
|
return acc
|
|
155
154
|
})
|
|
156
155
|
|
|
@@ -191,9 +190,10 @@ export default function (props) {
|
|
|
191
190
|
style,
|
|
192
191
|
innerClasses,
|
|
193
192
|
attributes,
|
|
193
|
+
hasRouterLink,
|
|
194
194
|
hasLink,
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
linkTag,
|
|
196
|
+
navigateToRouterLink,
|
|
197
197
|
isActionable
|
|
198
198
|
}
|
|
199
199
|
}
|
|
@@ -4,37 +4,46 @@
|
|
|
4
4
|
"props": {
|
|
5
5
|
"type":{
|
|
6
6
|
"type": "String",
|
|
7
|
-
"desc": "Define the button
|
|
7
|
+
"desc": "1) Define the button native type attribute (submit, reset, button) or 2) render component with <a> tag so you can access events even if disable or 3) Use 'href' prop and specify 'type' as a media tag",
|
|
8
8
|
"default": "button",
|
|
9
|
-
"values": [
|
|
10
|
-
"a", "submit", "button", "reset"
|
|
11
|
-
],
|
|
12
9
|
"examples": [
|
|
13
|
-
"
|
|
10
|
+
"a", "submit", "button", "reset",
|
|
11
|
+
"image/png",
|
|
12
|
+
"href=\"https://quasar.dev\" target=\"_blank\""
|
|
14
13
|
],
|
|
15
14
|
"category": "general"
|
|
16
15
|
},
|
|
17
16
|
|
|
18
17
|
"to": {
|
|
19
18
|
"type": [ "String", "Object" ],
|
|
20
|
-
"desc": "Equivalent to Vue Router <router-link> 'to' property",
|
|
19
|
+
"desc": "Equivalent to Vue Router <router-link> 'to' property; Superseeded by 'href' prop if used",
|
|
21
20
|
"examples": [
|
|
22
21
|
"/home/dashboard",
|
|
23
22
|
":to=\"{ name: 'my-route-name' }\""
|
|
24
23
|
],
|
|
25
|
-
"category": "
|
|
24
|
+
"category": "navigation"
|
|
26
25
|
},
|
|
27
26
|
|
|
28
27
|
"replace": {
|
|
29
28
|
"type": "Boolean",
|
|
30
|
-
"desc": "Equivalent to Vue Router <router-link> 'replace' property",
|
|
31
|
-
"category": "
|
|
29
|
+
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Superseeded by 'href' prop if used",
|
|
30
|
+
"category": "navigation"
|
|
32
31
|
},
|
|
33
32
|
|
|
34
|
-
"
|
|
35
|
-
"type": "
|
|
36
|
-
"desc": "
|
|
37
|
-
"
|
|
33
|
+
"href": {
|
|
34
|
+
"type": "String",
|
|
35
|
+
"desc": "Native <a> link href attribute; Has priority over the 'to' and 'replace' props",
|
|
36
|
+
"examples": [ "http://quasar.dev", "href=\"https://quasar.dev\" target=\"_blank\"" ],
|
|
37
|
+
"category": "navigation",
|
|
38
|
+
"addedIn": "v2.4"
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
"target": {
|
|
42
|
+
"type": "String",
|
|
43
|
+
"desc": "Native <a> link target attribute; Use it only with 'to' or 'href' props",
|
|
44
|
+
"examples": [ "_blank", "_self", "_parent", "_top" ],
|
|
45
|
+
"category": "navigation",
|
|
46
|
+
"addedIn": "v2.4"
|
|
38
47
|
},
|
|
39
48
|
|
|
40
49
|
"label":{
|
|
@@ -107,7 +107,7 @@ export default function (type, getInner) {
|
|
|
107
107
|
const prop = { type: 'checkbox' }
|
|
108
108
|
|
|
109
109
|
props.name !== void 0 && Object.assign(prop, {
|
|
110
|
-
checked: isTrue.value,
|
|
110
|
+
'^checked': isTrue.value === true ? 'checked' : void 0,
|
|
111
111
|
name: props.name,
|
|
112
112
|
value: modelIsArray.value === true
|
|
113
113
|
? props.val
|
|
@@ -35,6 +35,7 @@ const palette = [
|
|
|
35
35
|
]
|
|
36
36
|
|
|
37
37
|
const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
|
|
38
|
+
const alphaTrackImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg=='
|
|
38
39
|
|
|
39
40
|
export default createComponent({
|
|
40
41
|
name: 'QColor',
|
|
@@ -653,37 +654,42 @@ export default createComponent({
|
|
|
653
654
|
]
|
|
654
655
|
|
|
655
656
|
const sliders = [
|
|
656
|
-
h(
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
657
|
+
h(QSlider, {
|
|
658
|
+
class: 'q-color-picker__hue non-selectable',
|
|
659
|
+
modelValue: model.value.h,
|
|
660
|
+
min: 0,
|
|
661
|
+
max: 360,
|
|
662
|
+
trackSize: '8px',
|
|
663
|
+
innerTrackColor: 'transparent',
|
|
664
|
+
selectionColor: 'transparent',
|
|
665
|
+
readonly: editable.value !== true,
|
|
666
|
+
thumbPath,
|
|
667
|
+
'onUpdate:modelValue': onHueChange,
|
|
668
|
+
...getCache('lazyhue', {
|
|
669
|
+
onChange: val => onHueChange(val, true)
|
|
668
670
|
})
|
|
669
|
-
|
|
671
|
+
})
|
|
670
672
|
]
|
|
671
673
|
|
|
672
674
|
hasAlpha.value === true && sliders.push(
|
|
673
|
-
h(
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
675
|
+
h(QSlider, {
|
|
676
|
+
class: 'q-color-picker__alpha non-selectable',
|
|
677
|
+
modelValue: model.value.a,
|
|
678
|
+
min: 0,
|
|
679
|
+
max: 100,
|
|
680
|
+
trackSize: '8px',
|
|
681
|
+
trackColor: 'white',
|
|
682
|
+
innerTrackColor: 'transparent',
|
|
683
|
+
selectionColor: 'transparent',
|
|
684
|
+
trackImg: alphaTrackImg,
|
|
685
|
+
readonly: editable.value !== true,
|
|
686
|
+
hideSelection: true,
|
|
687
|
+
thumbPath,
|
|
688
|
+
...getCache('alphaSlide', {
|
|
689
|
+
'onUpdate:modelValue': value => onNumericChange(value, 'a', 100),
|
|
690
|
+
onChange: value => onNumericChange(value, 'a', 100, void 0, true)
|
|
685
691
|
})
|
|
686
|
-
|
|
692
|
+
})
|
|
687
693
|
)
|
|
688
694
|
|
|
689
695
|
return [
|
|
@@ -97,47 +97,34 @@
|
|
|
97
97
|
border-radius: 50%
|
|
98
98
|
transform: translate(-5px, -5px)
|
|
99
99
|
|
|
100
|
-
&__hue .q-slider__track
|
|
100
|
+
&__hue .q-slider__track
|
|
101
101
|
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important // @stylint ignore
|
|
102
102
|
opacity: 1
|
|
103
103
|
|
|
104
|
-
&__alpha
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
background-color: #fff !important
|
|
109
|
-
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==') !important
|
|
110
|
-
&:after
|
|
104
|
+
&__alpha
|
|
105
|
+
.q-slider__track-container
|
|
106
|
+
padding-top: 0
|
|
107
|
+
.q-slider__track:before
|
|
111
108
|
content: ''
|
|
112
109
|
position: absolute
|
|
113
110
|
top: 0
|
|
114
111
|
right: 0
|
|
115
112
|
bottom: 0
|
|
116
113
|
left: 0
|
|
114
|
+
border-radius: inherit
|
|
117
115
|
background: linear-gradient(90deg, rgba(255,255,255,0), $grey-7)
|
|
118
116
|
|
|
119
117
|
&__sliders
|
|
120
|
-
padding:
|
|
121
|
-
|
|
122
|
-
.q-slider__track-container
|
|
123
|
-
height: 10px
|
|
124
|
-
margin-top: -5px
|
|
125
|
-
|
|
126
|
-
.q-slider__track
|
|
127
|
-
display: none
|
|
118
|
+
padding: 0 16px
|
|
128
119
|
|
|
129
120
|
.q-slider__thumb
|
|
121
|
+
color: $grey-9
|
|
130
122
|
path
|
|
131
123
|
stroke-width: 2px
|
|
132
124
|
fill: transparent
|
|
133
125
|
.q-slider--active path
|
|
134
126
|
stroke-width: 3px
|
|
135
127
|
|
|
136
|
-
.q-slider
|
|
137
|
-
height: 16px
|
|
138
|
-
margin-top: 8px
|
|
139
|
-
color: $grey-9
|
|
140
|
-
|
|
141
128
|
/* Tune Tab */
|
|
142
129
|
|
|
143
130
|
&__tune-tab
|
|
@@ -188,5 +175,5 @@
|
|
|
188
175
|
.q-color-picker__tune-tab input
|
|
189
176
|
border: 1px solid rgba(#fff, .3)
|
|
190
177
|
|
|
191
|
-
.q-
|
|
192
|
-
color: $grey-
|
|
178
|
+
.q-slider__thumb
|
|
179
|
+
color: $grey-1
|
|
@@ -94,7 +94,7 @@ export default createComponent({
|
|
|
94
94
|
|
|
95
95
|
const { preventBodyScroll } = usePreventScroll()
|
|
96
96
|
const { registerTimeout, removeTimeout } = useTimeout()
|
|
97
|
-
const { registerTick, removeTick
|
|
97
|
+
const { registerTick, removeTick } = useTick()
|
|
98
98
|
|
|
99
99
|
const { showPortal, hidePortal, portalIsActive, renderPortal } = usePortal(
|
|
100
100
|
vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
|
|
@@ -193,7 +193,6 @@ export default createComponent({
|
|
|
193
193
|
if (props.noFocus !== true) {
|
|
194
194
|
document.activeElement !== null && document.activeElement.blur()
|
|
195
195
|
registerTick(focus)
|
|
196
|
-
prepareTick()
|
|
197
196
|
}
|
|
198
197
|
|
|
199
198
|
registerTimeout(() => {
|
|
@@ -239,6 +238,7 @@ export default createComponent({
|
|
|
239
238
|
|
|
240
239
|
if (refocusTarget !== null) {
|
|
241
240
|
refocusTarget.focus()
|
|
241
|
+
refocusTarget = null
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
registerTimeout(() => {
|
|
@@ -306,6 +306,10 @@ export default createComponent({
|
|
|
306
306
|
removeEscapeKey(onEscapeKey)
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
+
|
|
310
|
+
if (hiding !== true) {
|
|
311
|
+
refocusTarget = null
|
|
312
|
+
}
|
|
309
313
|
}
|
|
310
314
|
|
|
311
315
|
function updateMaximized (active) {
|
|
@@ -364,9 +368,7 @@ export default createComponent({
|
|
|
364
368
|
}
|
|
365
369
|
})
|
|
366
370
|
|
|
367
|
-
onBeforeUnmount(
|
|
368
|
-
cleanup()
|
|
369
|
-
})
|
|
371
|
+
onBeforeUnmount(cleanup)
|
|
370
372
|
|
|
371
373
|
function renderPortalContent () {
|
|
372
374
|
return h('div', {
|
|
@@ -330,6 +330,13 @@ export default createComponent({
|
|
|
330
330
|
] ]
|
|
331
331
|
})
|
|
332
332
|
|
|
333
|
+
function updateBelowBreakpoint () {
|
|
334
|
+
updateLocal(belowBreakpoint, (
|
|
335
|
+
props.behavior === 'mobile'
|
|
336
|
+
|| (props.behavior !== 'desktop' && $layout.totalWidth.value <= props.breakpoint)
|
|
337
|
+
))
|
|
338
|
+
}
|
|
339
|
+
|
|
333
340
|
watch(belowBreakpoint, val => {
|
|
334
341
|
if (val === true) { // from lg to xs
|
|
335
342
|
lastDesktopState = showing.value
|
|
@@ -351,13 +358,6 @@ export default createComponent({
|
|
|
351
358
|
}
|
|
352
359
|
})
|
|
353
360
|
|
|
354
|
-
watch($layout.totalWidth, val => {
|
|
355
|
-
updateLocal(belowBreakpoint, (
|
|
356
|
-
props.behavior === 'mobile'
|
|
357
|
-
|| (props.behavior !== 'desktop' && val <= props.breakpoint)
|
|
358
|
-
))
|
|
359
|
-
})
|
|
360
|
-
|
|
361
361
|
watch(() => props.side, (newSide, oldSide) => {
|
|
362
362
|
if ($layout.instances[ oldSide ] === instance) {
|
|
363
363
|
$layout.instances[ oldSide ] = void 0
|
|
@@ -371,10 +371,20 @@ export default createComponent({
|
|
|
371
371
|
$layout[ newSide ].offset = offset.value
|
|
372
372
|
})
|
|
373
373
|
|
|
374
|
-
watch(() =>
|
|
374
|
+
watch($layout.totalWidth, () => {
|
|
375
|
+
if ($layout.isContainer.value === true || document.qScrollPrevented !== true) {
|
|
376
|
+
updateBelowBreakpoint()
|
|
377
|
+
}
|
|
378
|
+
})
|
|
379
|
+
|
|
380
|
+
watch(
|
|
381
|
+
() => props.behavior + props.breakpoint,
|
|
382
|
+
updateBelowBreakpoint
|
|
383
|
+
)
|
|
375
384
|
|
|
376
385
|
watch($layout.isContainer, val => {
|
|
377
386
|
showing.value === true && preventBodyScroll(val !== true)
|
|
387
|
+
val === true && updateBelowBreakpoint()
|
|
378
388
|
})
|
|
379
389
|
|
|
380
390
|
watch($layout.scrollbarWidth, () => {
|
|
@@ -430,13 +440,6 @@ export default createComponent({
|
|
|
430
440
|
}
|
|
431
441
|
}
|
|
432
442
|
|
|
433
|
-
function updateBelowBreakpoint () {
|
|
434
|
-
updateLocal(belowBreakpoint, (
|
|
435
|
-
props.behavior === 'mobile'
|
|
436
|
-
|| (props.behavior !== 'desktop' && $layout.totalWidth.value <= props.breakpoint)
|
|
437
|
-
))
|
|
438
|
-
}
|
|
439
|
-
|
|
440
443
|
function applyBackdrop (x) {
|
|
441
444
|
flagBackdropBg.value = x
|
|
442
445
|
}
|
|
@@ -502,7 +502,7 @@ export default createComponent({
|
|
|
502
502
|
return h('div', {
|
|
503
503
|
ref: rootRef,
|
|
504
504
|
class: classes.value,
|
|
505
|
-
style: { height: inFullscreen.value === true ? '
|
|
505
|
+
style: { height: inFullscreen.value === true ? '100%' : null },
|
|
506
506
|
...attributes.value,
|
|
507
507
|
onFocusin,
|
|
508
508
|
onFocusout
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
&.disabled
|
|
7
7
|
border-style: dashed
|
|
8
8
|
|
|
9
|
-
> div:first-child,
|
|
9
|
+
> div:first-child,
|
|
10
|
+
&__toolbars-container,
|
|
11
|
+
&__toolbars-container > div:first-child
|
|
10
12
|
border-top-left-radius: inherit
|
|
11
13
|
border-top-right-radius: inherit
|
|
12
14
|
|
|
@@ -17,14 +19,18 @@
|
|
|
17
19
|
border-bottom-left-radius: inherit
|
|
18
20
|
border-bottom-right-radius: inherit
|
|
19
21
|
overflow: auto
|
|
22
|
+
max-width: 100%
|
|
23
|
+
|
|
20
24
|
pre
|
|
21
25
|
white-space: pre-wrap
|
|
26
|
+
|
|
22
27
|
hr
|
|
23
28
|
border: 0
|
|
24
29
|
outline: 0
|
|
25
30
|
margin: 1px
|
|
26
31
|
height: 1px
|
|
27
32
|
background: $editor-hr-color
|
|
33
|
+
|
|
28
34
|
&:empty:not(:focus):before
|
|
29
35
|
content: attr(placeholder)
|
|
30
36
|
opacity: .7
|
|
@@ -33,6 +39,9 @@
|
|
|
33
39
|
border-bottom: 1px solid $editor-border-color
|
|
34
40
|
min-height: 32px
|
|
35
41
|
|
|
42
|
+
&__toolbars-container
|
|
43
|
+
max-width: 100%
|
|
44
|
+
|
|
36
45
|
.q-btn
|
|
37
46
|
margin: $editor-button-gutter
|
|
38
47
|
|
|
@@ -96,7 +96,10 @@ export default createComponent({
|
|
|
96
96
|
})
|
|
97
97
|
|
|
98
98
|
const hasLink = computed(() =>
|
|
99
|
-
props.disable !== true &&
|
|
99
|
+
props.disable !== true && (
|
|
100
|
+
props.href !== void 0
|
|
101
|
+
|| (props.to !== void 0 && props.to !== null && props.to !== '')
|
|
102
|
+
)
|
|
100
103
|
)
|
|
101
104
|
|
|
102
105
|
const linkProps = computed(() => {
|