vuetify 2.6.9 → 2.6.11
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/web-types.json +33 -10
- package/dist/vuetify.css +7 -0
- package/dist/vuetify.css.map +1 -1
- package/dist/vuetify.js +50 -63
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VCalendar/mixins/calendar-with-events.js +10 -13
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +2 -2
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VInput/VInput.js +2 -1
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +6 -9
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/directives/click-outside/index.js +2 -2
- package/es5/directives/click-outside/index.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/menuable/index.js +5 -1
- package/es5/mixins/menuable/index.js.map +1 -1
- package/es5/util/helpers.js +0 -13
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +11 -14
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +2 -2
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VInput/VInput.js +2 -1
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +7 -10
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/directives/click-outside/index.js +2 -2
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/menuable/index.js +5 -1
- package/lib/mixins/menuable/index.js.map +1 -1
- package/lib/util/helpers.js +0 -8
- package/lib/util/helpers.js.map +1 -1
- package/package.json +2 -2
- package/src/components/VCalendar/mixins/calendar-with-events.ts +14 -13
- package/src/components/VDialog/VDialog.ts +2 -2
- package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +7 -0
- package/src/components/VInput/VInput.ts +1 -0
- package/src/components/VSelect/VSelectList.ts +10 -15
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +2 -0
- package/src/components/VTextField/VTextField.sass +9 -0
- package/src/directives/click-outside/index.ts +2 -2
- package/src/mixins/menuable/index.ts +4 -1
- package/src/util/helpers.ts +0 -10
- package/types/index.d.ts +2 -2
|
@@ -10,9 +10,6 @@ import ripple from '../../../directives/ripple'
|
|
|
10
10
|
// Mixins
|
|
11
11
|
import CalendarBase from './calendar-base'
|
|
12
12
|
|
|
13
|
-
// Helpers
|
|
14
|
-
import { escapeHTML } from '../../../util/helpers'
|
|
15
|
-
|
|
16
13
|
// Util
|
|
17
14
|
import props from '../util/props'
|
|
18
15
|
import {
|
|
@@ -116,7 +113,7 @@ export default CalendarBase.extend({
|
|
|
116
113
|
eventNameFunction (): CalendarEventNameFunction {
|
|
117
114
|
return typeof this.eventName === 'function'
|
|
118
115
|
? this.eventName
|
|
119
|
-
: (event, timedEvent) =>
|
|
116
|
+
: (event, timedEvent) => event.input[this.eventName as string] as string || ''
|
|
120
117
|
},
|
|
121
118
|
eventModeFunction (): CalendarEventOverlapMode {
|
|
122
119
|
return typeof this.eventOverlapMode === 'function'
|
|
@@ -303,16 +300,23 @@ export default CalendarBase.extend({
|
|
|
303
300
|
const eventSummary = () => {
|
|
304
301
|
const name = this.eventNameFunction(event, timedEvent)
|
|
305
302
|
if (event.start.hasTime) {
|
|
306
|
-
const eventSummaryClass = 'v-event-summary'
|
|
307
303
|
if (timedEvent) {
|
|
308
304
|
const time = timeSummary()
|
|
309
|
-
const delimiter = singline ? ', ' : '
|
|
305
|
+
const delimiter = singline ? ', ' : this.$createElement('br')
|
|
310
306
|
|
|
311
|
-
return
|
|
307
|
+
return this.$createElement('span', { staticClass: 'v-event-summary' }, [
|
|
308
|
+
this.$createElement('strong', [name]),
|
|
309
|
+
delimiter,
|
|
310
|
+
time,
|
|
311
|
+
])
|
|
312
312
|
} else {
|
|
313
313
|
const time = formatTime(event.start, true)
|
|
314
314
|
|
|
315
|
-
return
|
|
315
|
+
return this.$createElement('span', { staticClass: 'v-event-summary' }, [
|
|
316
|
+
this.$createElement('strong', [time]),
|
|
317
|
+
' ',
|
|
318
|
+
name,
|
|
319
|
+
])
|
|
316
320
|
}
|
|
317
321
|
}
|
|
318
322
|
|
|
@@ -345,13 +349,10 @@ export default CalendarBase.extend({
|
|
|
345
349
|
: [this.genName(eventSummary)]
|
|
346
350
|
)
|
|
347
351
|
},
|
|
348
|
-
genName (eventSummary: () => string): VNode {
|
|
352
|
+
genName (eventSummary: () => string | VNode): VNode {
|
|
349
353
|
return this.$createElement('div', {
|
|
350
354
|
staticClass: 'pl-1',
|
|
351
|
-
|
|
352
|
-
innerHTML: eventSummary(),
|
|
353
|
-
},
|
|
354
|
-
})
|
|
355
|
+
}, [eventSummary()])
|
|
355
356
|
},
|
|
356
357
|
genPlaceholder (day: CalendarTimestamp): VNode {
|
|
357
358
|
const height = this.eventHeight + this.eventMarginBottom
|
|
@@ -234,8 +234,8 @@ export default baseMixins.extend({
|
|
|
234
234
|
// So we must have focused something outside the dialog and its children
|
|
235
235
|
) {
|
|
236
236
|
// Find and focus the first available element inside the dialog
|
|
237
|
-
const focusable = this.$refs.dialog.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')
|
|
238
|
-
const el = [...focusable].find(el => !el.hasAttribute('disabled')) as HTMLElement | undefined
|
|
237
|
+
const focusable = this.$refs.dialog.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])')
|
|
238
|
+
const el = [...focusable].find(el => !el.hasAttribute('disabled') && !el.matches('[tabindex="-1"]')) as HTMLElement | undefined
|
|
239
239
|
el && el.focus()
|
|
240
240
|
}
|
|
241
241
|
},
|
|
@@ -61,6 +61,7 @@ exports[`VFileInput.ts should display file size 1`] = `
|
|
|
61
61
|
<div class="v-input__icon v-input__icon--clear">
|
|
62
62
|
<button type="button"
|
|
63
63
|
aria-label="clear icon"
|
|
64
|
+
tabindex="-1"
|
|
64
65
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
65
66
|
>
|
|
66
67
|
$clear
|
|
@@ -107,6 +108,7 @@ exports[`VFileInput.ts should display file size 2`] = `
|
|
|
107
108
|
<div class="v-input__icon v-input__icon--clear">
|
|
108
109
|
<button type="button"
|
|
109
110
|
aria-label="clear icon"
|
|
111
|
+
tabindex="-1"
|
|
110
112
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
111
113
|
>
|
|
112
114
|
$clear
|
|
@@ -153,6 +155,7 @@ exports[`VFileInput.ts should display total size in counter 1`] = `
|
|
|
153
155
|
<div class="v-input__icon v-input__icon--clear">
|
|
154
156
|
<button type="button"
|
|
155
157
|
aria-label="clear icon"
|
|
158
|
+
tabindex="-1"
|
|
156
159
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
157
160
|
>
|
|
158
161
|
$clear
|
|
@@ -202,6 +205,7 @@ exports[`VFileInput.ts should display total size in counter 2`] = `
|
|
|
202
205
|
<div class="v-input__icon v-input__icon--clear">
|
|
203
206
|
<button type="button"
|
|
204
207
|
aria-label="clear icon"
|
|
208
|
+
tabindex="-1"
|
|
205
209
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
206
210
|
>
|
|
207
211
|
$clear
|
|
@@ -294,6 +298,7 @@ exports[`VFileInput.ts should render chips 1`] = `
|
|
|
294
298
|
<div class="v-input__icon v-input__icon--clear">
|
|
295
299
|
<button type="button"
|
|
296
300
|
aria-label="clear icon"
|
|
301
|
+
tabindex="-1"
|
|
297
302
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
298
303
|
>
|
|
299
304
|
$clear
|
|
@@ -340,6 +345,7 @@ exports[`VFileInput.ts should render counter 1`] = `
|
|
|
340
345
|
<div class="v-input__icon v-input__icon--clear">
|
|
341
346
|
<button type="button"
|
|
342
347
|
aria-label="clear icon"
|
|
348
|
+
tabindex="-1"
|
|
343
349
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
344
350
|
>
|
|
345
351
|
$clear
|
|
@@ -433,6 +439,7 @@ exports[`VFileInput.ts should render small chips 1`] = `
|
|
|
433
439
|
<div class="v-input__icon v-input__icon--clear">
|
|
434
440
|
<button type="button"
|
|
435
441
|
aria-label="clear icon"
|
|
442
|
+
tabindex="-1"
|
|
436
443
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
437
444
|
>
|
|
438
445
|
$clear
|
|
@@ -18,10 +18,7 @@ import Colorable from '../../mixins/colorable'
|
|
|
18
18
|
import Themeable from '../../mixins/themeable'
|
|
19
19
|
|
|
20
20
|
// Helpers
|
|
21
|
-
import {
|
|
22
|
-
escapeHTML,
|
|
23
|
-
getPropertyFromItem,
|
|
24
|
-
} from '../../util/helpers'
|
|
21
|
+
import { getPropertyFromItem } from '../../util/helpers'
|
|
25
22
|
|
|
26
23
|
// Types
|
|
27
24
|
import mixins from '../../util/mixins'
|
|
@@ -113,17 +110,17 @@ export default mixins(Colorable, Themeable).extend({
|
|
|
113
110
|
genFilteredText (text: string) {
|
|
114
111
|
text = text || ''
|
|
115
112
|
|
|
116
|
-
if (!this.searchInput || this.noFilter) return
|
|
113
|
+
if (!this.searchInput || this.noFilter) return text
|
|
117
114
|
|
|
118
115
|
const { start, middle, end } = this.getMaskedCharacters(text)
|
|
119
116
|
|
|
120
|
-
return
|
|
117
|
+
return [start, this.genHighlight(middle), end]
|
|
121
118
|
},
|
|
122
119
|
genHeader (props: { [key: string]: any }): VNode {
|
|
123
120
|
return this.$createElement(VSubheader, { props }, props.header)
|
|
124
121
|
},
|
|
125
|
-
genHighlight (text: string)
|
|
126
|
-
return
|
|
122
|
+
genHighlight (text: string) {
|
|
123
|
+
return this.$createElement('span', { staticClass: 'v-list-item__mask' }, text)
|
|
127
124
|
},
|
|
128
125
|
getMaskedCharacters (text: string): {
|
|
129
126
|
start: string
|
|
@@ -202,13 +199,11 @@ export default mixins(Colorable, Themeable).extend({
|
|
|
202
199
|
: scopedSlot
|
|
203
200
|
},
|
|
204
201
|
genTileContent (item: any, index = 0): VNode {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})]
|
|
211
|
-
)
|
|
202
|
+
return this.$createElement(VListItemContent, [
|
|
203
|
+
this.$createElement(VListItemTitle, [
|
|
204
|
+
this.genFilteredText(this.getText(item)),
|
|
205
|
+
]),
|
|
206
|
+
])
|
|
212
207
|
},
|
|
213
208
|
hasItem (item: object) {
|
|
214
209
|
return this.parsedItems.indexOf(this.getValue(item)) > -1
|
|
@@ -25,6 +25,7 @@ exports[`VSelect.ts should be clearable with prop, dirty and multi select 1`] =
|
|
|
25
25
|
<div class="v-input__icon v-input__icon--clear">
|
|
26
26
|
<button type="button"
|
|
27
27
|
aria-label="clear icon"
|
|
28
|
+
tabindex="-1"
|
|
28
29
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
29
30
|
>
|
|
30
31
|
$clear
|
|
@@ -85,6 +86,7 @@ exports[`VSelect.ts should be clearable with prop, dirty and single select 1`] =
|
|
|
85
86
|
<div class="v-input__icon v-input__icon--clear">
|
|
86
87
|
<button type="button"
|
|
87
88
|
aria-label="clear icon"
|
|
89
|
+
tabindex="-1"
|
|
88
90
|
class="v-icon notranslate v-icon--link material-icons theme--light"
|
|
89
91
|
>
|
|
90
92
|
$clear
|
|
@@ -504,6 +504,15 @@
|
|
|
504
504
|
&.v-input--has-state > .v-input__control > .v-input__slot:before
|
|
505
505
|
border-color: currentColor
|
|
506
506
|
|
|
507
|
+
.v-input__icon--clear
|
|
508
|
+
opacity: 0
|
|
509
|
+
transition: opacity $primary-transition
|
|
510
|
+
|
|
511
|
+
&.v-input--is-focused,
|
|
512
|
+
&.v-input--is-dirty:hover
|
|
513
|
+
.v-input__icon--clear
|
|
514
|
+
opacity: 1
|
|
515
|
+
|
|
507
516
|
// TODO: where are the corresponding rules for LTR?
|
|
508
517
|
//
|
|
509
518
|
// +rtl()
|
|
@@ -53,7 +53,7 @@ function checkIsActive (e: PointerEvent, binding: ClickOutsideDirective): boolea
|
|
|
53
53
|
return isActive(e)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
function directive (e: PointerEvent, el: HTMLElement, binding: ClickOutsideDirective
|
|
56
|
+
function directive (e: PointerEvent, el: HTMLElement, binding: ClickOutsideDirective) {
|
|
57
57
|
const handler = typeof binding.value === 'function' ? binding.value : binding.value!.handler
|
|
58
58
|
|
|
59
59
|
el._clickOutside!.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {
|
|
@@ -78,7 +78,7 @@ export const ClickOutside = {
|
|
|
78
78
|
// available, iOS does not support
|
|
79
79
|
// clicks on body
|
|
80
80
|
inserted (el: HTMLElement, binding: ClickOutsideDirective, vnode: VNode) {
|
|
81
|
-
const onClick = (e: Event) => directive(e as PointerEvent, el, binding
|
|
81
|
+
const onClick = (e: Event) => directive(e as PointerEvent, el, binding)
|
|
82
82
|
const onMousedown = (e: Event) => {
|
|
83
83
|
el._clickOutside!.lastMousedownWasOutside = checkEvent(e as PointerEvent, el, binding)
|
|
84
84
|
}
|
|
@@ -281,7 +281,10 @@ export default baseMixins.extend<options>().extend({
|
|
|
281
281
|
}
|
|
282
282
|
},
|
|
283
283
|
checkActivatorFixed () {
|
|
284
|
-
if (this.attach !== false)
|
|
284
|
+
if (this.attach !== false) {
|
|
285
|
+
this.activatorFixed = false
|
|
286
|
+
return
|
|
287
|
+
}
|
|
285
288
|
let el = this.getActivator()
|
|
286
289
|
while (el) {
|
|
287
290
|
if (window.getComputedStyle(el).position === 'fixed') {
|
package/src/util/helpers.ts
CHANGED
|
@@ -162,16 +162,6 @@ export function getZIndex (el?: Element | null): number {
|
|
|
162
162
|
return index
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
const tagsToReplace = {
|
|
166
|
-
'&': '&',
|
|
167
|
-
'<': '<',
|
|
168
|
-
'>': '>',
|
|
169
|
-
} as any
|
|
170
|
-
|
|
171
|
-
export function escapeHTML (str: string): string {
|
|
172
|
-
return str.replace(/[&<>]/g, tag => tagsToReplace[tag] || tag)
|
|
173
|
-
}
|
|
174
|
-
|
|
175
165
|
export function filterObjectOnKeys<T, K extends keyof T> (obj: T, keys: K[]): { [N in K]: T[N] } {
|
|
176
166
|
const filtered = {} as { [N in K]: T[N] }
|
|
177
167
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Vue, { Component, PluginFunction, VueConstructor, DirectiveOptions } from 'vue'
|
|
1
|
+
import Vue, { Component, PluginFunction, VueConstructor, DirectiveOptions, VNode } from 'vue'
|
|
2
2
|
import './lib'
|
|
3
3
|
import './alacarte'
|
|
4
4
|
import './colors'
|
|
@@ -275,7 +275,7 @@ export type CalendarEventTimedFunction = (event: CalendarEvent) => boolean
|
|
|
275
275
|
|
|
276
276
|
export type CalendarEventCategoryFunction = (event: CalendarEvent) => string
|
|
277
277
|
|
|
278
|
-
export type CalendarEventNameFunction = (event: CalendarEventParsed, timedEvent: boolean) => string
|
|
278
|
+
export type CalendarEventNameFunction = (event: CalendarEventParsed, timedEvent: boolean) => string | VNode
|
|
279
279
|
|
|
280
280
|
export type DataTableFilterFunction = (value: any, search: string | null, item: any) => boolean
|
|
281
281
|
|