vuetify 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/json/attributes.json +47 -43
- package/dist/json/tags.json +1 -0
- package/dist/json/web-types.json +129 -86
- package/dist/vuetify.css +23 -10
- package/dist/vuetify.css.map +1 -1
- package/dist/vuetify.js +174 -103
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VBtn/VBtn.js +9 -6
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VCalendar/VCalendar.js +1 -1
- package/es5/components/VCalendar/VCalendar.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-events.js +2 -2
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +12 -38
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +9 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDatePicker/util/index.js +8 -0
- package/es5/components/VDatePicker/util/index.js.map +1 -1
- package/es5/components/VDatePicker/util/sanitizeDateString.js +37 -0
- package/es5/components/VDatePicker/util/sanitizeDateString.js.map +1 -0
- package/es5/components/VPagination/VPagination.js +1 -0
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VRangeSlider/VRangeSlider.js +41 -11
- package/es5/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +1 -0
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +12 -3
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +5 -3
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/services/theme/utils.js +3 -1
- package/es5/services/theme/utils.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +9 -6
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VCalendar/VCalendar.js +1 -1
- package/lib/components/VCalendar/VCalendar.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +2 -2
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +1 -12
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +12 -2
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VDatePicker/util/index.js +2 -1
- package/lib/components/VDatePicker/util/index.js.map +1 -1
- package/lib/components/VDatePicker/util/sanitizeDateString.js +12 -0
- package/lib/components/VDatePicker/util/sanitizeDateString.js.map +1 -0
- package/lib/components/VPagination/VPagination.js +1 -0
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.js +38 -6
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +1 -0
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +12 -3
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +5 -3
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/services/theme/utils.js +2 -1
- package/lib/services/theme/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +2 -2
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +1 -1
- package/src/components/VBottomNavigation/__tests__/__snapshots__/VBottomNavigation.spec.ts.snap +4 -4
- package/src/components/VBtn/VBtn.sass +1 -5
- package/src/components/VBtn/VBtn.ts +11 -7
- package/src/components/VBtn/__tests__/VBtn.spec.ts +1 -33
- package/src/components/VBtn/__tests__/__snapshots__/VBtn.spec.ts.snap +10 -10
- package/src/components/VCalendar/VCalendar.ts +2 -2
- package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +13 -5
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +50 -50
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +61 -61
- package/src/components/VCalendar/mixins/calendar-with-events.ts +2 -2
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +9 -9
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +5 -5
- package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +49 -0
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataFooter.spec.ts.snap +16 -16
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataIterator.spec.ts.snap +10 -10
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +102 -102
- package/src/components/VDataTable/__tests__/__snapshots__/VEditDialog.spec.ts.snap +3 -3
- package/src/components/VDatePicker/VDatePicker.ts +1 -7
- package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +32 -0
- package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +32 -0
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +16 -16
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +10 -10
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +10 -10
- package/src/components/VDatePicker/mixins/date-picker-table.ts +10 -2
- package/src/components/VDatePicker/util/__tests__/sanitizeDateString.spec.ts +10 -0
- package/src/components/VDatePicker/util/index.ts +2 -0
- package/src/components/VDatePicker/util/sanitizeDateString.ts +8 -0
- package/src/components/VGrid/VGrid.sass +6 -0
- package/src/components/VPagination/VPagination.ts +1 -0
- package/src/components/VPagination/__tests__/__snapshots__/VPagination.spec.ts.snap +6 -3
- package/src/components/VRangeSlider/VRangeSlider.ts +33 -5
- package/src/components/VRangeSlider/__tests__/VRangeSlider.spec.ts +1 -1
- package/src/components/VSelect/VSelect.ts +1 -0
- package/src/components/VSlideGroup/VSlideGroup.ts +15 -3
- package/src/components/VSlideGroup/__tests__/VSlideGroup.spec.ts +56 -0
- package/src/components/VSlider/VSlider.ts +5 -2
- package/src/components/VTextField/VTextField.sass +14 -8
- package/src/services/theme/utils.ts +2 -1
- package/types/services/theme.d.ts +0 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { keys } from '../../util/helpers';
|
|
1
2
|
import { colorToInt, intToHex, colorToHex } from '../../util/colorUtils';
|
|
2
3
|
import * as sRGB from '../../util/color/transformSRGB';
|
|
3
4
|
import * as LAB from '../../util/color/transformCIELAB';
|
|
@@ -91,7 +92,7 @@ export function genStyles(theme, cssVar = false) {
|
|
|
91
92
|
const value = theme[name];
|
|
92
93
|
css += genBaseColor(name, cssVar ? genColorVariable(name) : value.base);
|
|
93
94
|
cssVar && (variablesCss += ` ${genColorVariableName(name)}: ${value.base};\n`);
|
|
94
|
-
const variants =
|
|
95
|
+
const variants = keys(value);
|
|
95
96
|
|
|
96
97
|
for (let i = 0; i < variants.length; ++i) {
|
|
97
98
|
const variant = variants[i];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/services/theme/utils.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,QAArB,EAA+B,UAA/B,QAA2D,uBAA3D;AACA,OAAO,KAAK,IAAZ,MAAsB,gCAAtB;AACA,OAAO,KAAK,GAAZ,MAAqB,kCAArB;AAMA,OAAM,SAAU,KAAV,CACJ,KADI,EAEJ,MAAM,GAAG,KAFL,EAGJ,UAAU,GAAG,IAHT,EAGa;AAEjB,QAAM;AAAE,IAAA,MAAF;AAAU,OAAG;AAAb,MAAyB,KAA/B;AACA,QAAM,MAAM,GAAG,MAAM,CAAC,IAAP,CAAY,OAAZ,CA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AL,CAAW,KAAX,CAAZ,CAAZ;AACA,EAAA,GAAG,CAAC,CAAD,CAAH,GAAS,GAAG,CAAC,CAAD,CAAH,GAAS,MAAM,GAAG,EAA3B;AACA,SAAO,IAAI,CAAC,OAAL,CAAa,GAAG,CAAC,KAAJ,CAAU,GAAV,CAAb,CAAP;AACD;AAED,OAAM,SAAU,MAAV,CAAkB,KAAlB,EAAmC,MAAnC,EAAiD;AACrD,QAAM,GAAG,GAAG,GAAG,CAAC,OAAJ,CAAY,IAAI,CAAC,KAAL,CAAW,KAAX,CAAZ,CAAZ;AACA,EAAA,GAAG,CAAC,CAAD,CAAH,GAAS,GAAG,CAAC,CAAD,CAAH,GAAS,MAAM,GAAG,EAA3B;AACA,SAAO,IAAI,CAAC,OAAL,CAAa,GAAG,CAAC,KAAJ,CAAU,GAAV,CAAb,CAAP;AACD","sourcesContent":["import { keys } from '../../util/helpers'\nimport { colorToInt, intToHex, colorToHex, ColorInt } from '../../util/colorUtils'\nimport * as sRGB from '../../util/color/transformSRGB'\nimport * as LAB from '../../util/color/transformCIELAB'\nimport {\n VuetifyParsedTheme,\n VuetifyThemeItem,\n} from 'vuetify/types/services/theme'\n\nexport function parse (\n theme: Record<string, VuetifyThemeItem>,\n isItem = false,\n variations = true,\n): VuetifyParsedTheme {\n const { anchor, ...variant } = theme\n const colors = Object.keys(variant)\n const parsedTheme: any = {}\n\n for (let i = 0; i < colors.length; ++i) {\n const name = colors[i]\n const value = theme[name]\n\n if (value == null) continue\n\n if (!variations) {\n parsedTheme[name] = { base: intToHex(colorToInt(value)) }\n } else if (isItem) {\n /* istanbul ignore else */\n if (name === 'base' || name.startsWith('lighten') || name.startsWith('darken')) {\n parsedTheme[name] = colorToHex(value)\n }\n } else if (typeof value === 'object') {\n parsedTheme[name] = parse(value, true, variations)\n } else {\n parsedTheme[name] = genVariations(name, colorToInt(value))\n }\n }\n\n if (!isItem) {\n parsedTheme.anchor = anchor || parsedTheme.base || parsedTheme.primary.base\n }\n\n return parsedTheme\n}\n\n/**\n * Generate the CSS for a base color (.primary)\n */\nconst genBaseColor = (name: string, value: string): string => {\n return `\n.v-application .${name} {\n background-color: ${value} !important;\n border-color: ${value} !important;\n}\n.v-application .${name}--text {\n color: ${value} !important;\n caret-color: ${value} !important;\n}`\n}\n\n/**\n * Generate the CSS for a variant color (.primary.darken-2)\n */\nconst genVariantColor = (name: string, variant: string, value: string): string => {\n const [type, n] = variant.split(/(\\d)/, 2)\n return `\n.v-application .${name}.${type}-${n} {\n background-color: ${value} !important;\n border-color: ${value} !important;\n}\n.v-application .${name}--text.text--${type}-${n} {\n color: ${value} !important;\n caret-color: ${value} !important;\n}`\n}\n\nconst genColorVariableName = (name: string, variant = 'base'): string => `--v-${name}-${variant}`\n\nconst genColorVariable = (name: string, variant = 'base'): string => `var(${genColorVariableName(name, variant)})`\n\nexport function genStyles (theme: VuetifyParsedTheme, cssVar = false): string {\n const { anchor, ...variant } = theme\n const colors = Object.keys(variant)\n\n if (!colors.length) return ''\n\n let variablesCss = ''\n let css = ''\n\n const aColor = cssVar ? genColorVariable('anchor') : anchor\n css += `.v-application a { color: ${aColor}; }`\n cssVar && (variablesCss += ` ${genColorVariableName('anchor')}: ${anchor};\\n`)\n\n for (let i = 0; i < colors.length; ++i) {\n const name = colors[i]\n const value = theme[name]\n\n css += genBaseColor(name, cssVar ? genColorVariable(name) : value.base)\n cssVar && (variablesCss += ` ${genColorVariableName(name)}: ${value.base};\\n`)\n\n const variants = keys(value)\n for (let i = 0; i < variants.length; ++i) {\n const variant = variants[i]\n const variantValue = value[variant]\n if (variant === 'base') continue\n\n css += genVariantColor(name, variant, cssVar ? genColorVariable(name, variant) : variantValue)\n cssVar && (variablesCss += ` ${genColorVariableName(name, variant)}: ${variantValue};\\n`)\n }\n }\n\n if (cssVar) {\n variablesCss = `:root {\\n${variablesCss}}\\n\\n`\n }\n\n return variablesCss + css\n}\n\nexport function genVariations (name: string, value: ColorInt): Record<string, string> {\n const values: Record<string, string> = {\n base: intToHex(value),\n }\n\n for (let i = 5; i > 0; --i) {\n values[`lighten${i}`] = intToHex(lighten(value, i))\n }\n\n for (let i = 1; i <= 4; ++i) {\n values[`darken${i}`] = intToHex(darken(value, i))\n }\n\n return values\n}\n\nexport function lighten (value: ColorInt, amount: number): ColorInt {\n const lab = LAB.fromXYZ(sRGB.toXYZ(value))\n lab[0] = lab[0] + amount * 10\n return sRGB.fromXYZ(LAB.toXYZ(lab))\n}\n\nexport function darken (value: ColorInt, amount: number): ColorInt {\n const lab = LAB.fromXYZ(sRGB.toXYZ(value))\n lab[0] = lab[0] - amount * 10\n return sRGB.fromXYZ(LAB.toXYZ(lab))\n}\n"],"sourceRoot":"","file":"utils.js"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify",
|
|
3
3
|
"description": "Vue Material Component Framework",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "John Leider",
|
|
7
7
|
"email": "john@vuetifyjs.com"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"attributes": "dist/json/attributes.json"
|
|
115
115
|
},
|
|
116
116
|
"web-types": "dist/json/web-types.json",
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "eeefd9cb112aea7a7edf60629c470fdbd0b08721"
|
|
118
118
|
}
|
|
@@ -9,7 +9,7 @@ exports[`VAlert.ts should be dismissible 1`] = `
|
|
|
9
9
|
<div class="v-alert__content">
|
|
10
10
|
</div>
|
|
11
11
|
<button type="button"
|
|
12
|
-
class="v-alert__dismissible v-btn v-btn--
|
|
12
|
+
class="v-alert__dismissible v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
13
13
|
aria-label="$vuetify.close"
|
|
14
14
|
>
|
|
15
15
|
<span class="v-btn__content">
|
|
@@ -55,7 +55,7 @@ exports[`VAlert.ts should have a close icon 1`] = `
|
|
|
55
55
|
<div class="v-alert__content">
|
|
56
56
|
</div>
|
|
57
57
|
<button type="button"
|
|
58
|
-
class="v-alert__dismissible v-btn v-btn--
|
|
58
|
+
class="v-alert__dismissible v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
59
59
|
aria-label="$vuetify.close"
|
|
60
60
|
>
|
|
61
61
|
<span class="v-btn__content">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`AppBarNavIcon.ts should render correctly 1`] = `
|
|
4
4
|
<button type="button"
|
|
5
|
-
class="v-app-bar__nav-icon v-btn v-btn--
|
|
5
|
+
class="v-app-bar__nav-icon v-btn v-btn--icon v-btn--round theme--light v-size--default"
|
|
6
6
|
>
|
|
7
7
|
<span class="v-btn__content">
|
|
8
8
|
<i aria-hidden="true"
|
package/src/components/VBottomNavigation/__tests__/__snapshots__/VBottomNavigation.spec.ts.snap
CHANGED
|
@@ -12,13 +12,13 @@ exports[`VBottomNavigation.ts should be visible with a true value 2`] = `
|
|
|
12
12
|
style="height: 56px; transform: none;"
|
|
13
13
|
>
|
|
14
14
|
<button type="button"
|
|
15
|
-
class="v-btn v-btn--
|
|
15
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default"
|
|
16
16
|
>
|
|
17
17
|
<span class="v-btn__content">
|
|
18
18
|
</span>
|
|
19
19
|
</button>
|
|
20
20
|
<button type="button"
|
|
21
|
-
class="v-btn v-btn--
|
|
21
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default"
|
|
22
22
|
>
|
|
23
23
|
<span class="v-btn__content">
|
|
24
24
|
</span>
|
|
@@ -38,13 +38,13 @@ exports[`VBottomNavigation.ts should be visible with a true value 4`] = `
|
|
|
38
38
|
style="height: 56px; transform: translateY(100%);"
|
|
39
39
|
>
|
|
40
40
|
<button type="button"
|
|
41
|
-
class="v-btn v-btn--
|
|
41
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default"
|
|
42
42
|
>
|
|
43
43
|
<span class="v-btn__content">
|
|
44
44
|
</span>
|
|
45
45
|
</button>
|
|
46
46
|
<button type="button"
|
|
47
|
-
class="v-btn v-btn--
|
|
47
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default"
|
|
48
48
|
>
|
|
49
49
|
<span class="v-btn__content">
|
|
50
50
|
</span>
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
// https://stackoverflow.com/questions/10305658/prevent-button-from-shifting-during-click-in-ie
|
|
103
103
|
position: relative
|
|
104
104
|
transition: inherit
|
|
105
|
+
transition-property: opacity
|
|
105
106
|
|
|
106
107
|
.v-icon--left,
|
|
107
108
|
.v-icon--right
|
|
@@ -231,11 +232,6 @@
|
|
|
231
232
|
.v-btn--outlined
|
|
232
233
|
border: $btn-outline-border-width solid currentColor
|
|
233
234
|
|
|
234
|
-
.v-btn:not(.v-btn--has-bg)
|
|
235
|
-
.v-btn__content
|
|
236
|
-
.v-icon
|
|
237
|
-
color: currentColor
|
|
238
|
-
|
|
239
235
|
.v-btn--plain
|
|
240
236
|
&::before
|
|
241
237
|
display: none
|
|
@@ -10,6 +10,7 @@ import VProgressCircular from '../VProgressCircular'
|
|
|
10
10
|
// Mixins
|
|
11
11
|
import { factory as GroupableFactory } from '../../mixins/groupable'
|
|
12
12
|
import { factory as ToggleableFactory } from '../../mixins/toggleable'
|
|
13
|
+
import Elevatable from '../../mixins/elevatable'
|
|
13
14
|
import Positionable from '../../mixins/positionable'
|
|
14
15
|
import Routable from '../../mixins/routable'
|
|
15
16
|
import Sizeable from '../../mixins/sizeable'
|
|
@@ -82,13 +83,10 @@ export default baseMixins.extend<options>().extend({
|
|
|
82
83
|
'v-btn--absolute': this.absolute,
|
|
83
84
|
'v-btn--block': this.block,
|
|
84
85
|
'v-btn--bottom': this.bottom,
|
|
85
|
-
'v-btn--contained': this.isElevated, // TODO: remove v3
|
|
86
|
-
'v-btn--depressed': (this.depressed) || this.outlined, // TODO: remove v3
|
|
87
86
|
'v-btn--disabled': this.disabled,
|
|
88
87
|
'v-btn--is-elevated': this.isElevated,
|
|
89
88
|
'v-btn--fab': this.fab,
|
|
90
89
|
'v-btn--fixed': this.fixed,
|
|
91
|
-
'v-btn--flat': !this.isElevated, // TODO: remove v3,
|
|
92
90
|
'v-btn--has-bg': this.hasBg,
|
|
93
91
|
'v-btn--icon': this.icon,
|
|
94
92
|
'v-btn--left': this.left,
|
|
@@ -108,13 +106,18 @@ export default baseMixins.extend<options>().extend({
|
|
|
108
106
|
...this.sizeableClasses,
|
|
109
107
|
}
|
|
110
108
|
},
|
|
109
|
+
computedElevation (): string | number | undefined {
|
|
110
|
+
if (this.disabled) return undefined
|
|
111
|
+
|
|
112
|
+
return Elevatable.options.computed.computedElevation.call(this)
|
|
113
|
+
},
|
|
111
114
|
computedRipple (): RippleOptions | boolean {
|
|
112
115
|
const defaultRipple = this.icon || this.fab ? { circle: true } : true
|
|
113
116
|
if (this.disabled) return false
|
|
114
117
|
else return this.ripple ?? defaultRipple
|
|
115
118
|
},
|
|
116
119
|
hasBg (): boolean {
|
|
117
|
-
return this.
|
|
120
|
+
return !this.text && !this.plain && !this.outlined && !this.icon
|
|
118
121
|
},
|
|
119
122
|
isElevated (): boolean {
|
|
120
123
|
return Boolean(
|
|
@@ -123,8 +126,9 @@ export default baseMixins.extend<options>().extend({
|
|
|
123
126
|
!this.outlined &&
|
|
124
127
|
!this.depressed &&
|
|
125
128
|
!this.disabled &&
|
|
126
|
-
!this.plain
|
|
127
|
-
|
|
129
|
+
!this.plain &&
|
|
130
|
+
(this.elevation == null || Number(this.elevation) > 0)
|
|
131
|
+
)
|
|
128
132
|
},
|
|
129
133
|
isRound (): boolean {
|
|
130
134
|
return Boolean(
|
|
@@ -184,7 +188,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
184
188
|
this.loading && this.genLoader(),
|
|
185
189
|
]
|
|
186
190
|
const { tag, data } = this.generateRouteLink()
|
|
187
|
-
const setColor =
|
|
191
|
+
const setColor = this.hasBg
|
|
188
192
|
? this.setBackgroundColor
|
|
189
193
|
: this.setTextColor
|
|
190
194
|
|
|
@@ -152,38 +152,6 @@ describe('VBtn.ts', () => { // eslint-disable-line max-statements
|
|
|
152
152
|
expect(wrapper.classes('foo')).toBe(true)
|
|
153
153
|
})
|
|
154
154
|
|
|
155
|
-
it('should have v-btn--depressed class when using depressed prop', () => {
|
|
156
|
-
const wrapper = mountFunction({
|
|
157
|
-
propsData: {
|
|
158
|
-
depressed: true,
|
|
159
|
-
},
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
expect(wrapper.classes('v-btn--depressed')).toBe(true)
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
it('should have v-btn--flat class when using flat and depressed props', () => {
|
|
166
|
-
const wrapper = mountFunction({
|
|
167
|
-
propsData: {
|
|
168
|
-
depressed: true,
|
|
169
|
-
text: true,
|
|
170
|
-
},
|
|
171
|
-
})
|
|
172
|
-
|
|
173
|
-
expect(wrapper.classes('v-btn--text')).toBe(true)
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
it('should have v-btn--outlined and v-btn--depressed classes when using outlined prop', () => {
|
|
177
|
-
const wrapper = mountFunction({
|
|
178
|
-
propsData: {
|
|
179
|
-
outlined: true,
|
|
180
|
-
},
|
|
181
|
-
})
|
|
182
|
-
|
|
183
|
-
expect(wrapper.classes('v-btn--outlined')).toBe(true)
|
|
184
|
-
expect(wrapper.classes('v-btn--depressed')).toBe(true)
|
|
185
|
-
})
|
|
186
|
-
|
|
187
155
|
it('should have v-btn--plain class when plain prop is set to true', () => {
|
|
188
156
|
const wrapper = mountFunction({
|
|
189
157
|
propsData: {
|
|
@@ -284,7 +252,7 @@ describe('VBtn.ts', () => { // eslint-disable-line max-statements
|
|
|
284
252
|
it('should not add color classes if disabled', () => {
|
|
285
253
|
const wrapper = mountFunction({
|
|
286
254
|
propsData: {
|
|
287
|
-
color: 'primary
|
|
255
|
+
color: 'primary darken-2',
|
|
288
256
|
},
|
|
289
257
|
})
|
|
290
258
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`VBtn.ts should not add color classes if disabled 1`] = `
|
|
4
4
|
<button type="button"
|
|
5
|
-
class="v-btn v-btn--
|
|
5
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default primary darken-2"
|
|
6
6
|
>
|
|
7
7
|
<span class="v-btn__content">
|
|
8
8
|
</span>
|
|
@@ -11,7 +11,7 @@ exports[`VBtn.ts should not add color classes if disabled 1`] = `
|
|
|
11
11
|
|
|
12
12
|
exports[`VBtn.ts should not add color classes if disabled 2`] = `
|
|
13
13
|
<button type="button"
|
|
14
|
-
class="v-btn v-btn--disabled v-btn--
|
|
14
|
+
class="v-btn v-btn--disabled v-btn--has-bg theme--light v-size--default"
|
|
15
15
|
disabled="disabled"
|
|
16
16
|
>
|
|
17
17
|
<span class="v-btn__content">
|
|
@@ -21,7 +21,7 @@ exports[`VBtn.ts should not add color classes if disabled 2`] = `
|
|
|
21
21
|
|
|
22
22
|
exports[`VBtn.ts should render an <a> tag when using href prop 1`] = `
|
|
23
23
|
<a href="http://www.google.com"
|
|
24
|
-
class="v-btn v-btn--
|
|
24
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default"
|
|
25
25
|
>
|
|
26
26
|
<span class="v-btn__content">
|
|
27
27
|
</span>
|
|
@@ -30,7 +30,7 @@ exports[`VBtn.ts should render an <a> tag when using href prop 1`] = `
|
|
|
30
30
|
|
|
31
31
|
exports[`VBtn.ts should render component and match snapshot 1`] = `
|
|
32
32
|
<button type="button"
|
|
33
|
-
class="v-btn v-btn--
|
|
33
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default"
|
|
34
34
|
>
|
|
35
35
|
<span class="v-btn__content">
|
|
36
36
|
</span>
|
|
@@ -39,7 +39,7 @@ exports[`VBtn.ts should render component and match snapshot 1`] = `
|
|
|
39
39
|
|
|
40
40
|
exports[`VBtn.ts should render component with color prop and match snapshot 1`] = `
|
|
41
41
|
<button type="button"
|
|
42
|
-
class="v-btn v-btn--
|
|
42
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default green darken-1"
|
|
43
43
|
>
|
|
44
44
|
<span class="v-btn__content">
|
|
45
45
|
</span>
|
|
@@ -48,7 +48,7 @@ exports[`VBtn.ts should render component with color prop and match snapshot 1`]
|
|
|
48
48
|
|
|
49
49
|
exports[`VBtn.ts should render component with color prop and match snapshot 2`] = `
|
|
50
50
|
<button type="button"
|
|
51
|
-
class="v-btn v-btn--
|
|
51
|
+
class="v-btn v-btn--text theme--light v-size--default green--text text--darken-1"
|
|
52
52
|
>
|
|
53
53
|
<span class="v-btn__content">
|
|
54
54
|
</span>
|
|
@@ -57,7 +57,7 @@ exports[`VBtn.ts should render component with color prop and match snapshot 2`]
|
|
|
57
57
|
|
|
58
58
|
exports[`VBtn.ts should render component with loader and match snapshot 1`] = `
|
|
59
59
|
<button type="button"
|
|
60
|
-
class="v-btn v-btn--
|
|
60
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg v-btn--loading theme--light v-size--default"
|
|
61
61
|
>
|
|
62
62
|
<span class="v-btn__content">
|
|
63
63
|
</span>
|
|
@@ -92,7 +92,7 @@ exports[`VBtn.ts should render component with loader and match snapshot 1`] = `
|
|
|
92
92
|
|
|
93
93
|
exports[`VBtn.ts should render component with loader slot and match snapshot 1`] = `
|
|
94
94
|
<button type="button"
|
|
95
|
-
class="v-btn v-btn--
|
|
95
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg v-btn--loading theme--light v-size--default"
|
|
96
96
|
>
|
|
97
97
|
<span class="v-btn__content">
|
|
98
98
|
</span>
|
|
@@ -105,7 +105,7 @@ exports[`VBtn.ts should render component with loader slot and match snapshot 1`]
|
|
|
105
105
|
`;
|
|
106
106
|
|
|
107
107
|
exports[`VBtn.ts should render specified tag when using tag prop 1`] = `
|
|
108
|
-
<a class="v-btn v-btn--
|
|
108
|
+
<a class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default">
|
|
109
109
|
<span class="v-btn__content">
|
|
110
110
|
</span>
|
|
111
111
|
</a>
|
|
@@ -113,7 +113,7 @@ exports[`VBtn.ts should render specified tag when using tag prop 1`] = `
|
|
|
113
113
|
|
|
114
114
|
exports[`VBtn.ts should render tile button and match snapshot 1`] = `
|
|
115
115
|
<button type="button"
|
|
116
|
-
class="v-btn v-btn--
|
|
116
|
+
class="v-btn v-btn--is-elevated v-btn--has-bg v-btn--tile theme--light v-size--default"
|
|
117
117
|
>
|
|
118
118
|
<span class="v-btn__content">
|
|
119
119
|
</span>
|
|
@@ -293,11 +293,11 @@ export default CalendarWithEvents.extend({
|
|
|
293
293
|
},
|
|
294
294
|
getCategoryList (categories: CalendarCategory[]): CalendarCategory[] {
|
|
295
295
|
if (!this.noEvents) {
|
|
296
|
-
const categoryMap = categories.reduce((map, category, index) => {
|
|
296
|
+
const categoryMap: any = categories.reduce((map: any, category, index) => {
|
|
297
297
|
if (typeof category === 'object' && category.categoryName) map[category.categoryName] = { index, count: 0 }
|
|
298
298
|
|
|
299
299
|
return map
|
|
300
|
-
},
|
|
300
|
+
}, {})
|
|
301
301
|
|
|
302
302
|
if (!this.categoryHideDynamic || !this.categoryShowAll) {
|
|
303
303
|
let categoryLength = categories.length
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
MountOptions,
|
|
5
5
|
} from '@vue/test-utils'
|
|
6
6
|
import { ExtractVue } from '../../../util/mixins'
|
|
7
|
-
import
|
|
7
|
+
import VCalendar from '../VCalendar'
|
|
8
8
|
|
|
9
9
|
describe('VCalendarCategory', () => {
|
|
10
|
-
type Instance = ExtractVue<typeof
|
|
10
|
+
type Instance = ExtractVue<typeof VCalendar>
|
|
11
11
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
12
12
|
beforeEach(() => {
|
|
13
13
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
14
|
-
return mount(
|
|
14
|
+
return mount(VCalendar, {
|
|
15
15
|
...options,
|
|
16
16
|
mocks: {
|
|
17
17
|
$vuetify: {
|
|
@@ -27,6 +27,8 @@ describe('VCalendarCategory', () => {
|
|
|
27
27
|
it('should test categoryText prop as a string', () => {
|
|
28
28
|
const wrapper = mountFunction({
|
|
29
29
|
propsData: {
|
|
30
|
+
type: 'category',
|
|
31
|
+
events: [{ start: new Date(), category: 'Nate' }],
|
|
30
32
|
categories: [{ name: 'Nate' }],
|
|
31
33
|
categoryText: 'name',
|
|
32
34
|
},
|
|
@@ -38,7 +40,9 @@ describe('VCalendarCategory', () => {
|
|
|
38
40
|
it('should test categoryText prop as a function', () => {
|
|
39
41
|
const wrapper = mountFunction({
|
|
40
42
|
propsData: {
|
|
41
|
-
|
|
43
|
+
type: 'category',
|
|
44
|
+
events: [{ start: new Date(), category: '20' }],
|
|
45
|
+
categories: [{ name: 'Nate', age: '20' }],
|
|
42
46
|
categoryText (category) {
|
|
43
47
|
return category.age
|
|
44
48
|
},
|
|
@@ -50,11 +54,15 @@ describe('VCalendarCategory', () => {
|
|
|
50
54
|
|
|
51
55
|
it('should pass entire cateogry to interval style method', () => {
|
|
52
56
|
function intervalStyle (obj) {
|
|
53
|
-
expect(obj.category).toEqual(
|
|
57
|
+
expect(obj.category.name).toEqual('Nate')
|
|
58
|
+
expect(obj.category.age).toEqual(20)
|
|
59
|
+
expect(obj.category.categoryName).toEqual('Nate')
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
const wrapper = mountFunction({
|
|
57
63
|
propsData: {
|
|
64
|
+
type: 'category',
|
|
65
|
+
events: [{ start: new Date(), category: 'Nate' }],
|
|
58
66
|
categories: [{ name: 'Nate', age: 20 }],
|
|
59
67
|
categoryText: 'name',
|
|
60
68
|
intervalStyle,
|