@kokoccc/vuetify 1.0.1 → 1.0.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/package.json +1 -1
- package/src/components/VChip/VChip.ts +2 -2
- package/src/components/VContent/VContent.ts +2 -2
- package/src/components/VFooter/VFooter.ts +2 -2
- package/src/components/VGrid/VCol.ts +2 -2
- package/src/components/VGrid/VContainer.ts +2 -1
- package/src/components/VGrid/VRow.ts +2 -2
- package/src/components/VGrid/grid.ts +2 -1
- package/src/components/VIcon/VIcon.ts +2 -2
- package/src/components/VItemGroup/VItemGroup.ts +2 -2
- package/src/components/VLazy/VLazy.ts +2 -2
- package/src/components/VList/VList.ts +2 -2
- package/src/components/VMain/VMain.ts +2 -2
- package/src/components/VSheet/VSheet.ts +2 -1
- package/src/components/VStepper/VStepper.ts +2 -2
- package/src/components/VToolbar/VToolbar.ts +2 -2
- package/src/components/VTooltip/VTooltip.ts +2 -2
- package/src/util/helpers.ts +8 -2
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ import Sizeable from '../../mixins/sizeable'
|
|
|
17
17
|
|
|
18
18
|
// Utilities
|
|
19
19
|
import { breaking } from '../../util/console'
|
|
20
|
-
import { getSlot } from '../../util/helpers'
|
|
20
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
21
21
|
|
|
22
22
|
// Types
|
|
23
23
|
import { PropValidator, PropType } from 'vue/types/options'
|
|
@@ -197,7 +197,7 @@ export default mixins(
|
|
|
197
197
|
const color = this.textColor || (this.outlined && this.color)
|
|
198
198
|
|
|
199
199
|
return withDirectives(
|
|
200
|
-
h(tag, this.setTextColor(color, data), children),
|
|
200
|
+
h(getTagValue(tag), this.setTextColor(color, data), children),
|
|
201
201
|
directives
|
|
202
202
|
)
|
|
203
203
|
},
|
|
@@ -5,7 +5,7 @@ import { VNode, defineComponent } from 'vue'
|
|
|
5
5
|
// Extensions
|
|
6
6
|
import VMain from '../VMain/VMain'
|
|
7
7
|
import { deprecate } from '../../util/console'
|
|
8
|
-
import { normalizeClasses } from '../../util/helpers'
|
|
8
|
+
import { normalizeClasses, getTagValue } from '../../util/helpers'
|
|
9
9
|
|
|
10
10
|
/* @vue/component */
|
|
11
11
|
export default defineComponent({
|
|
@@ -31,6 +31,6 @@ export default defineComponent({
|
|
|
31
31
|
node.children[0].data = { ...node.children[0].data, class: wrapClasses }
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
return h(
|
|
34
|
+
return h(getTagValue(this.tag), node.data, node.children)
|
|
35
35
|
},
|
|
36
36
|
})
|
|
@@ -11,7 +11,7 @@ import SSRBootable from '../../mixins/ssr-bootable'
|
|
|
11
11
|
|
|
12
12
|
// Utilities
|
|
13
13
|
import mixins from '../../util/mixins'
|
|
14
|
-
import { convertToUnit, getSlot } from '../../util/helpers'
|
|
14
|
+
import { convertToUnit, getSlot, getTagValue } from '../../util/helpers'
|
|
15
15
|
|
|
16
16
|
// Types
|
|
17
17
|
import { VNode } from 'vue/types/vnode'
|
|
@@ -111,6 +111,6 @@ export default mixins(
|
|
|
111
111
|
style: this.styles,
|
|
112
112
|
})
|
|
113
113
|
|
|
114
|
-
return h(this.tag, data, getSlot(this))
|
|
114
|
+
return h(getTagValue(this.tag), data, getSlot(this))
|
|
115
115
|
},
|
|
116
116
|
})
|
|
@@ -2,7 +2,7 @@ import './VGrid.sass'
|
|
|
2
2
|
|
|
3
3
|
import { defineComponent, VNode, PropOptions, getCurrentInstance } from 'vue'
|
|
4
4
|
import mergeData from '../../util/mergeData'
|
|
5
|
-
import { upperFirst } from '../../util/helpers'
|
|
5
|
+
import { upperFirst, getTagValue } from '../../util/helpers'
|
|
6
6
|
import {h} from 'vue'
|
|
7
7
|
// no xs
|
|
8
8
|
const breakpoints = ['sm', 'md', 'lg', 'xl']
|
|
@@ -134,6 +134,6 @@ export default defineComponent({
|
|
|
134
134
|
cache.set(cacheKey, classList)
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
return h(props.tag, mergeData({ class: classList }, data), children)
|
|
137
|
+
return h(getTagValue(props.tag), mergeData({ class: classList }, data), children)
|
|
138
138
|
},
|
|
139
139
|
})
|
|
@@ -5,6 +5,7 @@ import Grid from './grid'
|
|
|
5
5
|
|
|
6
6
|
import mergeData from '../../util/mergeData'
|
|
7
7
|
import { defineComponent, h } from 'vue'
|
|
8
|
+
import { getTagValue } from '../../util/helpers'
|
|
8
9
|
|
|
9
10
|
/* @vue/component */
|
|
10
11
|
export default defineComponent({
|
|
@@ -60,7 +61,7 @@ export default defineComponent({
|
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
return h(
|
|
63
|
-
this.tag,
|
|
64
|
+
getTagValue(this.tag),
|
|
64
65
|
data,
|
|
65
66
|
this.$slots.default?.()
|
|
66
67
|
)
|
|
@@ -2,7 +2,7 @@ import './VGrid.sass'
|
|
|
2
2
|
|
|
3
3
|
import { defineComponent, PropOptions } from 'vue'
|
|
4
4
|
import mergeData from '../../util/mergeData'
|
|
5
|
-
import { upperFirst } from '../../util/helpers'
|
|
5
|
+
import { upperFirst, getTagValue } from '../../util/helpers'
|
|
6
6
|
import {h} from 'vue'
|
|
7
7
|
// no xs
|
|
8
8
|
const breakpoints = ['sm', 'md', 'lg', 'xl']
|
|
@@ -128,7 +128,7 @@ export default defineComponent({
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return h(
|
|
131
|
-
props.tag,
|
|
131
|
+
getTagValue(props.tag),
|
|
132
132
|
mergeData(this.$attrs, {
|
|
133
133
|
class: classList.concat('row'),
|
|
134
134
|
}),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Types
|
|
2
2
|
import { defineComponent, VNode, h } from 'vue'
|
|
3
|
+
import { getTagValue } from '../../util/helpers'
|
|
3
4
|
|
|
4
5
|
export default function VGrid (name: string) {
|
|
5
6
|
/* @vue/component */
|
|
@@ -49,7 +50,7 @@ export default function VGrid (name: string) {
|
|
|
49
50
|
data.id = componentProps.id
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
return h(componentProps?.tag || 'div', data, children)
|
|
53
|
+
return h(getTagValue(componentProps?.tag || 'div'), data, children)
|
|
53
54
|
}
|
|
54
55
|
})
|
|
55
56
|
}
|
|
@@ -7,7 +7,7 @@ import Sizeable from '../../mixins/sizeable'
|
|
|
7
7
|
import Themeable from '../../mixins/themeable'
|
|
8
8
|
|
|
9
9
|
// Util
|
|
10
|
-
import { convertToUnit, keys, remapInternalIcon } from '../../util/helpers'
|
|
10
|
+
import { convertToUnit, keys, remapInternalIcon, getTagValue } from '../../util/helpers'
|
|
11
11
|
|
|
12
12
|
// Types
|
|
13
13
|
import { defineComponent, CreateElement, VNode, VNodeChildren, VNodeData, h } from 'vue'
|
|
@@ -192,7 +192,7 @@ export const VIconInternal = mixins(
|
|
|
192
192
|
|
|
193
193
|
this.applyColors(fontData)
|
|
194
194
|
|
|
195
|
-
return h(this.hasClickListener ? 'button' : this.tag, fontData, {default: () => newChildren})
|
|
195
|
+
return h(this.hasClickListener ? 'button' : getTagValue(this.tag), fontData, {default: () => newChildren})
|
|
196
196
|
},
|
|
197
197
|
renderSvgIcon (icon: string): VNode {
|
|
198
198
|
const size = this.getSize()
|
|
@@ -11,7 +11,7 @@ import Themeable from '../../mixins/themeable'
|
|
|
11
11
|
// Utilities
|
|
12
12
|
import mixins from '../../util/mixins'
|
|
13
13
|
import { consoleWarn } from '../../util/console'
|
|
14
|
-
import { getSlot } from '../../util/helpers'
|
|
14
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
15
15
|
|
|
16
16
|
// Types
|
|
17
17
|
import { VNode } from 'vue/types'
|
|
@@ -266,7 +266,7 @@ export const BaseItemGroup = mixins(
|
|
|
266
266
|
|
|
267
267
|
render (): VNode {
|
|
268
268
|
const data = this.genData()
|
|
269
|
-
return h(this.tag, {
|
|
269
|
+
return h(getTagValue(this.tag), {
|
|
270
270
|
class: data.class,
|
|
271
271
|
...data.attrs,
|
|
272
272
|
}, getSlot(this))
|
|
@@ -8,7 +8,7 @@ import intersect from '../../directives/intersect'
|
|
|
8
8
|
|
|
9
9
|
// Utilities
|
|
10
10
|
import mixins from '../../util/mixins'
|
|
11
|
-
import { getSlot } from '../../util/helpers'
|
|
11
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
12
12
|
|
|
13
13
|
// Types
|
|
14
14
|
import { VNode } from 'vue'
|
|
@@ -74,7 +74,7 @@ export default mixins(
|
|
|
74
74
|
},
|
|
75
75
|
|
|
76
76
|
render (): VNode {
|
|
77
|
-
return withDirectives(h(this.tag, {
|
|
77
|
+
return withDirectives(h(getTagValue(this.tag), {
|
|
78
78
|
class: 'v-lazy',
|
|
79
79
|
...this.$attrs,
|
|
80
80
|
style: this.styles,
|
|
@@ -5,7 +5,7 @@ import VListGroup from './VListGroup'
|
|
|
5
5
|
|
|
6
6
|
// Components
|
|
7
7
|
import VSheet from '../VSheet/VSheet'
|
|
8
|
-
import { getSlot } from '../../util/helpers'
|
|
8
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
9
9
|
|
|
10
10
|
// Types
|
|
11
11
|
import { VNode, defineComponent } from 'vue'
|
|
@@ -97,6 +97,6 @@ export default defineComponent({
|
|
|
97
97
|
...this.listeners$,
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
return h(this.tag, this.setBackgroundColor(this.color, data), getSlot(this))
|
|
100
|
+
return h(getTagValue(this.tag), this.setBackgroundColor(this.color, data), getSlot(this))
|
|
101
101
|
},
|
|
102
102
|
})
|
|
@@ -3,7 +3,7 @@ import './VMain.sass'
|
|
|
3
3
|
|
|
4
4
|
// Mixins
|
|
5
5
|
import SSRBootable from '../../mixins/ssr-bootable'
|
|
6
|
-
import { getSlot } from '../../util/helpers'
|
|
6
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
7
7
|
|
|
8
8
|
// Types
|
|
9
9
|
import { VNode, defineComponent, h } from 'vue'
|
|
@@ -43,7 +43,7 @@ export default defineComponent({
|
|
|
43
43
|
ref: 'main',
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
return h(this.tag, data, [
|
|
46
|
+
return h(getTagValue(this.tag), data, [
|
|
47
47
|
h(
|
|
48
48
|
'div',
|
|
49
49
|
{ class: 'v-main__wrap' },
|
|
@@ -12,6 +12,7 @@ import Themeable from '../../mixins/themeable'
|
|
|
12
12
|
|
|
13
13
|
// Helpers
|
|
14
14
|
import mixins from '../../util/mixins'
|
|
15
|
+
import { getTagValue } from '../../util/helpers'
|
|
15
16
|
|
|
16
17
|
// Types
|
|
17
18
|
import { VNode, defineComponent } from 'vue'
|
|
@@ -61,7 +62,7 @@ export default defineComponent({
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
return h(
|
|
64
|
-
this.tag,
|
|
65
|
+
getTagValue(this.tag),
|
|
65
66
|
this.setBackgroundColor(this.color, data),
|
|
66
67
|
this.$slots.default?.()
|
|
67
68
|
)
|
|
@@ -16,7 +16,7 @@ import Proxyable from '../../mixins/proxyable'
|
|
|
16
16
|
// Utilities
|
|
17
17
|
import mixins from '../../util/mixins'
|
|
18
18
|
import { breaking } from '../../util/console'
|
|
19
|
-
import { getSlot } from '../../util/helpers'
|
|
19
|
+
import { getSlot, getTagValue } from '../../util/helpers'
|
|
20
20
|
|
|
21
21
|
// Types
|
|
22
22
|
import { VNode } from 'vue'
|
|
@@ -135,7 +135,7 @@ export default baseMixins.extend({
|
|
|
135
135
|
},
|
|
136
136
|
|
|
137
137
|
render (): VNode {
|
|
138
|
-
return h(this.tag, {
|
|
138
|
+
return h(getTagValue(this.tag), {
|
|
139
139
|
class: ['v-stepper', this.classes],
|
|
140
140
|
style: this.styles,
|
|
141
141
|
}, getSlot(this))
|
|
@@ -9,7 +9,7 @@ import VSheet from '../VSheet/VSheet'
|
|
|
9
9
|
import VImg, { srcObject } from '../VImg/VImg'
|
|
10
10
|
|
|
11
11
|
// Utilities
|
|
12
|
-
import { convertToUnit, getSlot } from '../../util/helpers'
|
|
12
|
+
import { convertToUnit, getSlot, getTagValue } from '../../util/helpers'
|
|
13
13
|
import { breaking } from '../../util/console'
|
|
14
14
|
|
|
15
15
|
// Types
|
|
@@ -162,6 +162,6 @@ export default defineComponent({
|
|
|
162
162
|
if (this.isExtended) children.push(this.genExtension())
|
|
163
163
|
if (this.src || this.$slots.img) children.unshift(this.genBackground())
|
|
164
164
|
|
|
165
|
-
return h(this.tag, {...this.attrs$, ...data}, children)
|
|
165
|
+
return h(getTagValue(this.tag), {...this.attrs$, ...data}, children)
|
|
166
166
|
}
|
|
167
167
|
})
|
|
@@ -9,7 +9,7 @@ import Dependent from '../../mixins/dependent'
|
|
|
9
9
|
import Menuable from '../../mixins/menuable'
|
|
10
10
|
|
|
11
11
|
// Helpers
|
|
12
|
-
import { convertToUnit, keyCodes, getSlotType } from '../../util/helpers'
|
|
12
|
+
import { convertToUnit, keyCodes, getSlotType, getTagValue } from '../../util/helpers'
|
|
13
13
|
import { consoleError } from '../../util/console'
|
|
14
14
|
|
|
15
15
|
// Types
|
|
@@ -213,7 +213,7 @@ export default mixins(Colorable, Delayable, Dependent, Menuable).extend({
|
|
|
213
213
|
},
|
|
214
214
|
|
|
215
215
|
render (): VNode {
|
|
216
|
-
return h(this.tag, {
|
|
216
|
+
return h(getTagValue(this.tag), {
|
|
217
217
|
class: ['v-tooltip', this.classes],
|
|
218
218
|
}, [
|
|
219
219
|
this.showLazyContent(() => [this.genTransition()]),
|
package/src/util/helpers.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { defineComponent, h } from 'vue'
|
|
1
|
+
import { defineComponent, h, resolveComponent } from 'vue'
|
|
2
2
|
import { VNode, VNodeDirective } from 'vue/types'
|
|
3
3
|
import { VuetifyIcon } from 'vuetify/types/services/icons'
|
|
4
4
|
import { DataTableCompareFunction, SelectItemKey, ItemGroup } from 'vuetify/types'
|
|
5
5
|
|
|
6
|
+
export const getTagValue = (tag: string) => (
|
|
7
|
+
tag.includes('-') || /^[A-Z]/.test(tag)
|
|
8
|
+
? resolveComponent(tag)
|
|
9
|
+
: tag
|
|
10
|
+
)
|
|
11
|
+
|
|
6
12
|
export function createSimpleFunctional (
|
|
7
13
|
c: string,
|
|
8
14
|
el = 'div',
|
|
@@ -25,7 +31,7 @@ export function createSimpleFunctional (
|
|
|
25
31
|
|
|
26
32
|
data.class = (`${c} ${data.class || ''}`).trim()
|
|
27
33
|
|
|
28
|
-
return h(this.tag, data, this.$slots.default?.())
|
|
34
|
+
return h(getTagValue(this.tag), data, this.$slots.default?.())
|
|
29
35
|
},
|
|
30
36
|
})
|
|
31
37
|
}
|