vuetify 2.5.13 → 2.6.1
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 +188 -0
- package/dist/json/tags.json +86 -20
- package/dist/json/web-types.json +697 -139
- package/dist/vuetify.css +136 -5
- package/dist/vuetify.css.map +1 -1
- package/dist/vuetify.js +927 -304
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAutocomplete/VAutocomplete.js +1 -0
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +3 -2
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomSheet/VBottomSheet.js +1 -4
- package/es5/components/VBottomSheet/VBottomSheet.js.map +1 -1
- package/es5/components/VCalendar/VCalendar.js +2 -2
- package/es5/components/VCalendar/VCalendar.js.map +1 -1
- package/es5/components/VCalendar/VCalendarDaily.js +16 -8
- package/es5/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/es5/components/VCalendar/VCalendarWeekly.js +14 -10
- package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-events.js +19 -20
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VCalendar/mixins/mouse.js +13 -4
- package/es5/components/VCalendar/mixins/mouse.js.map +1 -1
- package/es5/components/VDataTable/MobileRow.js +2 -2
- package/es5/components/VDataTable/MobileRow.js.map +1 -1
- package/es5/components/VDataTable/Row.js +25 -9
- package/es5/components/VDataTable/Row.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +13 -3
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +4 -10
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VInput/VInput.js +3 -1
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VItemGroup/VItemGroup.js +8 -4
- package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +1 -1
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +375 -0
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -0
- package/es5/components/VOtpInput/index.js +20 -0
- package/es5/components/VOtpInput/index.js.map +1 -0
- package/es5/components/VRadioGroup/VRadioGroup.js +1 -3
- package/es5/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +8 -1
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSnackbar/VSnackbar.js +4 -8
- package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
- package/es5/components/VTabs/VTab.js +3 -2
- package/es5/components/VTabs/VTab.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +6 -1
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +0 -1
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeview.js +2 -1
- package/es5/components/VTreeview/VTreeview.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +3 -1
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/index.js +13 -0
- package/es5/components/index.js.map +1 -1
- package/es5/directives/click-outside/index.js +3 -1
- package/es5/directives/click-outside/index.js.map +1 -1
- package/es5/directives/intersect/index.js +8 -5
- package/es5/directives/intersect/index.js.map +1 -1
- package/es5/directives/mutate/index.js +3 -2
- package/es5/directives/mutate/index.js.map +1 -1
- package/es5/directives/resize/index.js +3 -1
- package/es5/directives/resize/index.js.map +1 -1
- package/es5/directives/ripple/index.js +0 -7
- package/es5/directives/ripple/index.js.map +1 -1
- package/es5/directives/scroll/index.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/locale/da.js +77 -0
- package/es5/locale/da.js.map +1 -0
- package/es5/locale/index.js +8 -0
- package/es5/locale/index.js.map +1 -1
- package/es5/locale/it.js +6 -6
- package/es5/locale/it.js.map +1 -1
- package/es5/mixins/intersectable/index.js +6 -0
- package/es5/mixins/intersectable/index.js.map +1 -1
- package/es5/mixins/routable/index.js +2 -5
- package/es5/mixins/routable/index.js.map +1 -1
- package/es5/util/helpers.js +13 -6
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +1 -0
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +3 -2
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.js +1 -4
- package/lib/components/VBottomSheet/VBottomSheet.js.map +1 -1
- package/lib/components/VCalendar/VCalendar.js +2 -2
- package/lib/components/VCalendar/VCalendar.js.map +1 -1
- package/lib/components/VCalendar/VCalendarDaily.js +20 -8
- package/lib/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.js +10 -2
- package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +6 -3
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VCalendar/mixins/mouse.js +9 -4
- package/lib/components/VCalendar/mixins/mouse.js.map +1 -1
- package/lib/components/VDataTable/MobileRow.js +2 -2
- package/lib/components/VDataTable/MobileRow.js.map +1 -1
- package/lib/components/VDataTable/Row.js +15 -8
- package/lib/components/VDataTable/Row.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.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/VDialog/VDialog.js +4 -10
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VInput/VInput.js +2 -0
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +7 -5
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +1 -1
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +342 -0
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -0
- package/lib/components/VOtpInput/index.js +4 -0
- package/lib/components/VOtpInput/index.js.map +1 -0
- package/lib/components/VRadioGroup/VRadioGroup.js +2 -4
- package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +9 -1
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +4 -8
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VTabs/VTab.js +3 -2
- package/lib/components/VTabs/VTab.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +8 -1
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +0 -1
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +2 -1
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +3 -1
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/directives/click-outside/index.js +3 -1
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/directives/intersect/index.js +7 -5
- package/lib/directives/intersect/index.js.map +1 -1
- package/lib/directives/mutate/index.js +3 -2
- package/lib/directives/mutate/index.js.map +1 -1
- package/lib/directives/resize/index.js +3 -1
- package/lib/directives/resize/index.js.map +1 -1
- package/lib/directives/ripple/index.js +0 -7
- package/lib/directives/ripple/index.js.map +1 -1
- package/lib/directives/scroll/index.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/locale/da.js +70 -0
- package/lib/locale/da.js.map +1 -0
- package/lib/locale/index.js +1 -0
- package/lib/locale/index.js.map +1 -1
- package/lib/locale/it.js +6 -6
- package/lib/locale/it.js.map +1 -1
- package/lib/mixins/intersectable/index.js +4 -0
- package/lib/mixins/intersectable/index.js.map +1 -1
- package/lib/mixins/routable/index.js +3 -5
- package/lib/mixins/routable/index.js.map +1 -1
- package/lib/util/helpers.js +13 -6
- package/lib/util/helpers.js.map +1 -1
- package/package.json +2 -2
- package/src/components/VAutocomplete/VAutocomplete.ts +2 -0
- package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +16 -0
- package/src/components/VBanner/VBanner.ts +16 -10
- package/src/components/VBottomSheet/VBottomSheet.ts +1 -4
- package/src/components/VCalendar/VCalendar.ts +3 -2
- package/src/components/VCalendar/VCalendarCategory.sass +67 -0
- package/src/components/VCalendar/VCalendarDaily.ts +9 -8
- package/src/components/VCalendar/VCalendarWeekly.ts +4 -2
- package/src/components/VCalendar/_variables.scss +4 -0
- package/src/components/VCalendar/mixins/calendar-with-events.ts +4 -3
- package/src/components/VCalendar/mixins/mouse.ts +10 -4
- package/src/components/VDataTable/MobileRow.ts +2 -2
- package/src/components/VDataTable/Row.ts +23 -16
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +1 -1
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +16 -0
- package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +16 -0
- package/src/components/VDatePicker/mixins/date-picker-table.ts +24 -2
- package/src/components/VDialog/VDialog.ts +4 -10
- package/src/components/VInput/VInput.sass +8 -0
- package/src/components/VInput/VInput.ts +2 -0
- package/src/components/VItemGroup/VItemGroup.ts +5 -3
- package/src/components/VItemGroup/__tests__/VItemGroup.spec.ts +19 -2
- package/src/components/VMenu/VMenu.ts +1 -1
- package/src/components/VOtpInput/VOtpInput.sass +37 -0
- package/src/components/VOtpInput/VOtpInput.ts +322 -0
- package/src/components/VOtpInput/__tests__/VOtpInput.spec.ts +294 -0
- package/src/components/VOtpInput/_variables.scss +4 -0
- package/src/components/VOtpInput/index.ts +4 -0
- package/src/components/VRadioGroup/VRadioGroup.ts +0 -4
- package/src/components/VSlideGroup/VSlideGroup.ts +14 -1
- package/src/components/VSnackbar/VSnackbar.ts +3 -7
- package/src/components/VSnackbar/__tests__/VSnackbar.spec.ts +4 -1
- package/src/components/VStepper/VStepper.sass +4 -4
- package/src/components/VTabs/VTab.ts +10 -2
- package/src/components/VTextField/VTextField.ts +8 -3
- package/src/components/VTooltip/VTooltip.sass +4 -1
- package/src/components/VTooltip/VTooltip.ts +0 -1
- package/src/components/VTooltip/_variables.scss +1 -0
- package/src/components/VTreeview/VTreeview.ts +2 -1
- package/src/components/VTreeview/VTreeviewNode.ts +3 -1
- package/src/components/index.ts +1 -0
- package/src/directives/click-outside/index.ts +2 -2
- package/src/directives/intersect/index.ts +6 -5
- package/src/directives/mutate/index.ts +2 -3
- package/src/directives/resize/index.ts +2 -2
- package/src/directives/ripple/VRipple.sass +4 -1
- package/src/directives/ripple/index.ts +0 -7
- package/src/directives/scroll/index.ts +1 -1
- package/src/globals.d.ts +5 -5
- package/src/locale/da.ts +69 -0
- package/src/locale/index.ts +1 -0
- package/src/locale/it.ts +6 -6
- package/src/mixins/intersectable/index.ts +6 -0
- package/src/mixins/routable/index.ts +1 -4
- package/src/styles/settings/_variables.scss +4 -3
- package/src/util/__tests__/__snapshots__/helpers.spec.ts.snap +11 -0
- package/src/util/__tests__/helpers.spec.ts +17 -0
- package/src/util/helpers.ts +14 -7
- package/src/directives/ripple/_variables.scss +0 -6
|
@@ -7,21 +7,88 @@
|
|
|
7
7
|
border-right: map-deep-get($material, 'calendar', 'line-color') $calendar-line-width solid
|
|
8
8
|
|
|
9
9
|
.v-calendar-category
|
|
10
|
+
overflow: auto
|
|
11
|
+
position: relative
|
|
12
|
+
|
|
10
13
|
.v-calendar-category__category
|
|
11
14
|
text-align: center
|
|
12
15
|
|
|
13
16
|
.v-calendar-daily__day-container
|
|
17
|
+
width: min-content
|
|
14
18
|
.v-calendar-category__columns
|
|
15
19
|
position: absolute
|
|
16
20
|
height: 100%
|
|
17
21
|
width: 100%
|
|
18
22
|
top: 0
|
|
19
23
|
|
|
24
|
+
.v-calendar-daily__day-body
|
|
25
|
+
display: flex
|
|
26
|
+
flex: 1
|
|
27
|
+
width: 100%
|
|
28
|
+
height: 100%
|
|
29
|
+
|
|
30
|
+
.v-calendar-daily__head
|
|
31
|
+
flex-direction: row
|
|
32
|
+
width: min-content
|
|
33
|
+
min-width: 100%
|
|
34
|
+
position: sticky
|
|
35
|
+
top: 0
|
|
36
|
+
background: white
|
|
37
|
+
z-index: 2
|
|
38
|
+
|
|
39
|
+
.v-calendar-daily_head-day
|
|
40
|
+
width: auto
|
|
41
|
+
position: unset
|
|
42
|
+
|
|
43
|
+
.v-calendar-daily__intervals-head
|
|
44
|
+
position: sticky
|
|
45
|
+
left: 0
|
|
46
|
+
top: 0
|
|
47
|
+
background: white
|
|
48
|
+
z-index: 2
|
|
49
|
+
|
|
50
|
+
.v-calendar-daily_head-weekday
|
|
51
|
+
position: sticky
|
|
52
|
+
left: 50%
|
|
53
|
+
width: $calendar-daily-head-weekday-size
|
|
54
|
+
|
|
55
|
+
.v-calendar-daily_head-day-label
|
|
56
|
+
width: $calendar-daily-head-day-label-size
|
|
57
|
+
position: sticky
|
|
58
|
+
left: 50%
|
|
59
|
+
|
|
60
|
+
.v-calendar-daily__day
|
|
61
|
+
min-width: $calendar-category-column-min-width
|
|
62
|
+
|
|
63
|
+
.v-calendar-daily__intervals-body
|
|
64
|
+
position: sticky
|
|
65
|
+
left: 0
|
|
66
|
+
background: white
|
|
67
|
+
z-index: 1
|
|
68
|
+
|
|
69
|
+
.v-calendar-daily__interval
|
|
70
|
+
&:last-of-type::after
|
|
71
|
+
display: none
|
|
72
|
+
|
|
73
|
+
.v-calendar-daily__body
|
|
74
|
+
overflow: visible
|
|
75
|
+
.v-calendar-daily__scroll-area
|
|
76
|
+
overflow-y: visible
|
|
77
|
+
flex: none
|
|
78
|
+
|
|
79
|
+
.v-calendar-daily__pane
|
|
80
|
+
overflow-y: visible
|
|
81
|
+
|
|
20
82
|
.v-calendar-category__columns
|
|
21
83
|
display: flex
|
|
84
|
+
width: min-content
|
|
85
|
+
min-width: 100%
|
|
22
86
|
|
|
23
87
|
.v-calendar-category__column,
|
|
24
88
|
.v-calendar-category__column-header
|
|
25
89
|
flex: 1 1 auto
|
|
26
90
|
width: 0
|
|
27
91
|
position: relative
|
|
92
|
+
|
|
93
|
+
.v-calendar-category__column-header
|
|
94
|
+
min-width: $calendar-category-column-min-width
|
|
@@ -82,8 +82,8 @@ export default CalendarWithIntervals.extend({
|
|
|
82
82
|
key: day.date,
|
|
83
83
|
staticClass: 'v-calendar-daily_head-day',
|
|
84
84
|
class: this.getRelativeClasses(day),
|
|
85
|
-
on: this.getDefaultMouseEventHandlers(':day',
|
|
86
|
-
return this.getSlotScope(day)
|
|
85
|
+
on: this.getDefaultMouseEventHandlers(':day', nativeEvent => {
|
|
86
|
+
return { nativeEvent, ...this.getSlotScope(day) }
|
|
87
87
|
}),
|
|
88
88
|
}, [
|
|
89
89
|
this.genHeadWeekday(day),
|
|
@@ -120,8 +120,8 @@ export default CalendarWithIntervals.extend({
|
|
|
120
120
|
on: this.getMouseEventHandlers({
|
|
121
121
|
'click:date': { event: 'click', stop: true },
|
|
122
122
|
'contextmenu:date': { event: 'contextmenu', stop: true, prevent: true, result: false },
|
|
123
|
-
},
|
|
124
|
-
return day
|
|
123
|
+
}, nativeEvent => {
|
|
124
|
+
return { nativeEvent, ...day }
|
|
125
125
|
}),
|
|
126
126
|
}, this.dayFormatter(day, false))
|
|
127
127
|
},
|
|
@@ -167,8 +167,8 @@ export default CalendarWithIntervals.extend({
|
|
|
167
167
|
key: day.date,
|
|
168
168
|
staticClass: 'v-calendar-daily__day',
|
|
169
169
|
class: this.getRelativeClasses(day),
|
|
170
|
-
on: this.getDefaultMouseEventHandlers(':time',
|
|
171
|
-
return this.getSlotScope(this.getTimestampAtEvent(
|
|
170
|
+
on: this.getDefaultMouseEventHandlers(':time', nativeEvent => {
|
|
171
|
+
return { nativeEvent, ...this.getSlotScope(this.getTimestampAtEvent(nativeEvent, day)) }
|
|
172
172
|
}),
|
|
173
173
|
}, [
|
|
174
174
|
...this.genDayIntervals(index),
|
|
@@ -192,6 +192,7 @@ export default CalendarWithIntervals.extend({
|
|
|
192
192
|
height,
|
|
193
193
|
...styler(interval),
|
|
194
194
|
},
|
|
195
|
+
|
|
195
196
|
}
|
|
196
197
|
|
|
197
198
|
const children = getSlot(this, 'interval', () => this.getSlotScope(interval))
|
|
@@ -205,8 +206,8 @@ export default CalendarWithIntervals.extend({
|
|
|
205
206
|
style: {
|
|
206
207
|
width,
|
|
207
208
|
},
|
|
208
|
-
on: this.getDefaultMouseEventHandlers(':interval',
|
|
209
|
-
return this.getTimestampAtEvent(
|
|
209
|
+
on: this.getDefaultMouseEventHandlers(':interval', nativeEvent => {
|
|
210
|
+
return { nativeEvent, ...this.getTimestampAtEvent(nativeEvent, this.parsedStart) }
|
|
210
211
|
}),
|
|
211
212
|
}
|
|
212
213
|
|
|
@@ -159,7 +159,9 @@ export default CalendarBase.extend({
|
|
|
159
159
|
key: day.date,
|
|
160
160
|
staticClass: 'v-calendar-weekly__day',
|
|
161
161
|
class: this.getRelativeClasses(day, outside),
|
|
162
|
-
on: this.getDefaultMouseEventHandlers(':day',
|
|
162
|
+
on: this.getDefaultMouseEventHandlers(':day', nativeEvent => {
|
|
163
|
+
return { nativeEvent, ...day }
|
|
164
|
+
}),
|
|
163
165
|
}, [
|
|
164
166
|
this.genDayLabel(day),
|
|
165
167
|
...(getSlot(this, 'day', () => ({ outside, index, week, ...day })) || []),
|
|
@@ -184,7 +186,7 @@ export default CalendarBase.extend({
|
|
|
184
186
|
on: this.getMouseEventHandlers({
|
|
185
187
|
'click:date': { event: 'click', stop: true },
|
|
186
188
|
'contextmenu:date': { event: 'contextmenu', stop: true, prevent: true, result: false },
|
|
187
|
-
},
|
|
189
|
+
}, nativeEvent => ({ nativeEvent, ...day })),
|
|
188
190
|
}, hasMonth
|
|
189
191
|
? this.monthFormatter(day, this.shortMonths) + ' ' + this.dayFormatter(day, false)
|
|
190
192
|
: this.dayFormatter(day, false)
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
$calendar-line-width: 1px !default;
|
|
4
4
|
|
|
5
|
+
$calendar-daily-head-day-label-size: 56px !default;
|
|
6
|
+
$calendar-daily-head-weekday-size: 50px !default;
|
|
5
7
|
$calendar-daily-weekday-padding: 3px 0px 0px 0px !default;
|
|
6
8
|
$calendar-daily-weekday-font-size: 11px !default;
|
|
7
9
|
$calendar-daily-day-padding: 0px 0px 3px 0px !default;
|
|
@@ -12,6 +14,8 @@ $calendar-daily-interval-gutter-align: right !default;
|
|
|
12
14
|
$calendar-daily-interval-gutter-line-width: 8px !default;
|
|
13
15
|
$calendar-daily-interval-gutter-font-size: 10px !default;
|
|
14
16
|
|
|
17
|
+
$calendar-category-column-min-width: 200px !default;
|
|
18
|
+
|
|
15
19
|
$calendar-weekly-weekday-padding: 0px 4px 0px 4px !default;
|
|
16
20
|
$calendar-weekly-weekday-font-size: 11px !default;
|
|
17
21
|
$calendar-weekly-day-padding: 0px 0px 0px 0px !default;
|
|
@@ -384,9 +384,10 @@ export default CalendarBase.extend({
|
|
|
384
384
|
name: 'ripple',
|
|
385
385
|
value: this.eventRipple ?? true,
|
|
386
386
|
}],
|
|
387
|
-
on: {
|
|
388
|
-
|
|
389
|
-
},
|
|
387
|
+
on: this.getDefaultMouseEventHandlers(':more', nativeEvent => {
|
|
388
|
+
return { nativeEvent, ...day }
|
|
389
|
+
}),
|
|
390
|
+
|
|
390
391
|
style: {
|
|
391
392
|
display: 'none',
|
|
392
393
|
height: `${eventHeight}px`,
|
|
@@ -65,11 +65,17 @@ export default Vue.extend({
|
|
|
65
65
|
// Ref: https://developer.mozilla.org/en-US/docs/Web/API/Touch/target
|
|
66
66
|
// This block of code aims to make sure touchEvent is always dispatched from the element that is being pointed at
|
|
67
67
|
if (e && 'touches' in e) {
|
|
68
|
-
const
|
|
68
|
+
const classSeparator = ' '
|
|
69
|
+
|
|
70
|
+
const eventTargetClasses = (e.currentTarget as HTMLElement)?.className.split(classSeparator)
|
|
71
|
+
const currentTargets = document.elementsFromPoint(e.changedTouches[0].clientX, e.changedTouches[0].clientY)
|
|
72
|
+
|
|
73
|
+
// Get "the same kind" current hovering target by checking
|
|
74
|
+
// If element has the same class of initial touch start element (which has touch event listener registered)
|
|
75
|
+
const currentTarget = currentTargets.find(t => t.className.split(classSeparator).some(c => eventTargetClasses.includes(c)))
|
|
69
76
|
|
|
70
77
|
if (currentTarget &&
|
|
71
|
-
!(e.target as HTMLElement)?.isSameNode(currentTarget)
|
|
72
|
-
(e.target as HTMLElement)?.className === currentTarget.className
|
|
78
|
+
!(e.target as HTMLElement)?.isSameNode(currentTarget)
|
|
73
79
|
) {
|
|
74
80
|
currentTarget.dispatchEvent(new TouchEvent(e.type, {
|
|
75
81
|
changedTouches: e.changedTouches as unknown as Touch[],
|
|
@@ -80,7 +86,7 @@ export default Vue.extend({
|
|
|
80
86
|
}
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
this.$emit(event, getEvent(e))
|
|
89
|
+
this.$emit(event, getEvent(e), e)
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
return eventOptions.result
|
|
@@ -27,8 +27,8 @@ export default Vue.extend({
|
|
|
27
27
|
const value = getObjectValueByPath(props.item, header.value)
|
|
28
28
|
|
|
29
29
|
const slotName = header.value
|
|
30
|
-
const scopedSlot = data.scopedSlots && data.scopedSlots[slotName]
|
|
31
|
-
const regularSlot = computedSlots[slotName]
|
|
30
|
+
const scopedSlot = data.scopedSlots && data.scopedSlots.hasOwnProperty(slotName) && data.scopedSlots[slotName]
|
|
31
|
+
const regularSlot = computedSlots.hasOwnProperty(slotName) && computedSlots[slotName]
|
|
32
32
|
|
|
33
33
|
if (scopedSlot) {
|
|
34
34
|
children.push(scopedSlot({
|
|
@@ -3,7 +3,12 @@ import Vue, { VNode, PropType } from 'vue'
|
|
|
3
3
|
import { DataTableHeader } from 'vuetify/types'
|
|
4
4
|
|
|
5
5
|
// Utils
|
|
6
|
-
import { getObjectValueByPath } from '../../util/helpers'
|
|
6
|
+
import { getObjectValueByPath, wrapInArray } from '../../util/helpers'
|
|
7
|
+
|
|
8
|
+
function needsTd (slot: VNode[] | undefined) {
|
|
9
|
+
return slot!.length !== 1 ||
|
|
10
|
+
!['td', 'th'].includes(slot![0]?.tag!)
|
|
11
|
+
}
|
|
7
12
|
|
|
8
13
|
export default Vue.extend({
|
|
9
14
|
name: 'row',
|
|
@@ -20,39 +25,41 @@ export default Vue.extend({
|
|
|
20
25
|
render (h, { props, slots, data }): VNode {
|
|
21
26
|
const computedSlots = slots()
|
|
22
27
|
|
|
23
|
-
const columns
|
|
28
|
+
const columns = props.headers.map((header: DataTableHeader) => {
|
|
24
29
|
const children = []
|
|
25
30
|
const value = getObjectValueByPath(props.item, header.value)
|
|
26
31
|
|
|
27
32
|
const slotName = header.value
|
|
28
|
-
const scopedSlot = data.scopedSlots && data.scopedSlots[slotName]
|
|
29
|
-
const regularSlot = computedSlots[slotName]
|
|
33
|
+
const scopedSlot = data.scopedSlots && data.scopedSlots.hasOwnProperty(slotName) && data.scopedSlots[slotName]
|
|
34
|
+
const regularSlot = computedSlots.hasOwnProperty(slotName) && computedSlots[slotName]
|
|
30
35
|
|
|
31
36
|
if (scopedSlot) {
|
|
32
|
-
children.push(scopedSlot({
|
|
37
|
+
children.push(...wrapInArray(scopedSlot({
|
|
33
38
|
item: props.item,
|
|
34
39
|
isMobile: false,
|
|
35
40
|
header,
|
|
36
41
|
index: props.index,
|
|
37
42
|
value,
|
|
38
|
-
}))
|
|
43
|
+
})))
|
|
39
44
|
} else if (regularSlot) {
|
|
40
|
-
children.push(regularSlot)
|
|
45
|
+
children.push(...wrapInArray(regularSlot))
|
|
41
46
|
} else {
|
|
42
47
|
children.push(value == null ? value : String(value))
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
const textAlign = `text-${header.align || 'start'}`
|
|
46
51
|
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
return needsTd(children)
|
|
53
|
+
? h('td', {
|
|
54
|
+
class: [
|
|
55
|
+
textAlign,
|
|
56
|
+
header.cellClass,
|
|
57
|
+
{
|
|
58
|
+
'v-data-table__divider': header.divider,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
}, children)
|
|
62
|
+
: children
|
|
56
63
|
})
|
|
57
64
|
|
|
58
65
|
return h('tr', data, columns)
|
|
@@ -695,6 +695,22 @@ describe('VDatePicker.ts', () => { // eslint-disable-line max-statements
|
|
|
695
695
|
expect(change.mock.calls).toHaveLength(1)
|
|
696
696
|
})
|
|
697
697
|
|
|
698
|
+
it('should add class for the first and last days in range', async () => {
|
|
699
|
+
const wrapper = mountFunction({
|
|
700
|
+
propsData: {
|
|
701
|
+
range: true,
|
|
702
|
+
showCurrent: '2019-01',
|
|
703
|
+
type: 'date',
|
|
704
|
+
value: ['2019-01-06', '2019-01-16'],
|
|
705
|
+
},
|
|
706
|
+
})
|
|
707
|
+
|
|
708
|
+
expect(wrapper.findAll('.v-date-picker-table--date tbody button.v-date-picker--first-in-range')
|
|
709
|
+
.exists()).toBe(true)
|
|
710
|
+
expect(wrapper.findAll('.v-date-picker-table--date tbody button.v-date-picker--last-in-range')
|
|
711
|
+
.exists()).toBe(true)
|
|
712
|
+
})
|
|
713
|
+
|
|
698
714
|
it('should set proper tableDate', async () => {
|
|
699
715
|
const wrapper = mountFunction({
|
|
700
716
|
propsData: {
|
|
@@ -332,4 +332,20 @@ describe('VDatePicker.ts', () => {
|
|
|
332
332
|
expect(cb.mock.calls[0][0][0]).toBe(fromDate)
|
|
333
333
|
expect(cb.mock.calls[1][0][0]).toBe(toDate)
|
|
334
334
|
})
|
|
335
|
+
|
|
336
|
+
it('should add class for the first and last days in range', async () => {
|
|
337
|
+
const wrapper = mountFunction({
|
|
338
|
+
propsData: {
|
|
339
|
+
range: true,
|
|
340
|
+
showCurrent: '2019',
|
|
341
|
+
type: 'month',
|
|
342
|
+
value: ['2019-01', '2019-02'],
|
|
343
|
+
},
|
|
344
|
+
})
|
|
345
|
+
|
|
346
|
+
expect(wrapper.findAll('.v-date-picker-table--month tbody button.v-date-picker--first-in-range')
|
|
347
|
+
.exists()).toBe(true)
|
|
348
|
+
expect(wrapper.findAll('.v-date-picker-table--month tbody button.v-date-picker--last-in-range')
|
|
349
|
+
.exists()).toBe(true)
|
|
350
|
+
})
|
|
335
351
|
})
|
|
@@ -93,7 +93,14 @@ export default mixins(
|
|
|
93
93
|
},
|
|
94
94
|
|
|
95
95
|
methods: {
|
|
96
|
-
genButtonClasses (
|
|
96
|
+
genButtonClasses (
|
|
97
|
+
isAllowed: boolean,
|
|
98
|
+
isFloating: boolean,
|
|
99
|
+
isSelected: boolean,
|
|
100
|
+
isCurrent: boolean,
|
|
101
|
+
isFirst: boolean,
|
|
102
|
+
isLast: boolean,
|
|
103
|
+
) {
|
|
97
104
|
return {
|
|
98
105
|
'v-size--default': !isFloating,
|
|
99
106
|
'v-date-picker-table__current': isCurrent,
|
|
@@ -103,6 +110,8 @@ export default mixins(
|
|
|
103
110
|
'v-btn--rounded': isFloating,
|
|
104
111
|
'v-btn--disabled': !isAllowed || this.disabled,
|
|
105
112
|
'v-btn--outlined': isCurrent && !isSelected,
|
|
113
|
+
'v-date-picker--first-in-range': isFirst,
|
|
114
|
+
'v-date-picker--last-in-range': isLast,
|
|
106
115
|
...this.themeClasses,
|
|
107
116
|
}
|
|
108
117
|
},
|
|
@@ -121,10 +130,23 @@ export default mixins(
|
|
|
121
130
|
const isCurrent = value === this.current
|
|
122
131
|
const setColor = isSelected ? this.setBackgroundColor : this.setTextColor
|
|
123
132
|
const color = (isSelected || isCurrent) && (this.color || 'accent')
|
|
133
|
+
let isFirst = false
|
|
134
|
+
let isLast = false
|
|
135
|
+
if (this.range && !!this.value && Array.isArray(this.value)) {
|
|
136
|
+
isFirst = value === this.value[0]
|
|
137
|
+
isLast = value === this.value[this.value.length - 1]
|
|
138
|
+
}
|
|
124
139
|
|
|
125
140
|
return this.$createElement('button', setColor(color, {
|
|
126
141
|
staticClass: 'v-btn',
|
|
127
|
-
class: this.genButtonClasses(
|
|
142
|
+
class: this.genButtonClasses(
|
|
143
|
+
isAllowed && !isOtherMonth,
|
|
144
|
+
isFloating,
|
|
145
|
+
isSelected,
|
|
146
|
+
isCurrent,
|
|
147
|
+
isFirst,
|
|
148
|
+
isLast,
|
|
149
|
+
),
|
|
128
150
|
attrs: {
|
|
129
151
|
type: 'button',
|
|
130
152
|
},
|
|
@@ -48,10 +48,7 @@ export default baseMixins.extend({
|
|
|
48
48
|
disabled: Boolean,
|
|
49
49
|
fullscreen: Boolean,
|
|
50
50
|
light: Boolean,
|
|
51
|
-
maxWidth:
|
|
52
|
-
type: [String, Number],
|
|
53
|
-
default: 'none',
|
|
54
|
-
},
|
|
51
|
+
maxWidth: [String, Number],
|
|
55
52
|
noClickAnimation: Boolean,
|
|
56
53
|
origin: {
|
|
57
54
|
type: String,
|
|
@@ -67,10 +64,7 @@ export default baseMixins.extend({
|
|
|
67
64
|
type: [String, Boolean],
|
|
68
65
|
default: 'dialog-transition',
|
|
69
66
|
},
|
|
70
|
-
width:
|
|
71
|
-
type: [String, Number],
|
|
72
|
-
default: 'auto',
|
|
73
|
-
},
|
|
67
|
+
width: [String, Number],
|
|
74
68
|
},
|
|
75
69
|
|
|
76
70
|
data () {
|
|
@@ -306,8 +300,8 @@ export default baseMixins.extend({
|
|
|
306
300
|
if (!this.fullscreen) {
|
|
307
301
|
data.style = {
|
|
308
302
|
...data.style as object,
|
|
309
|
-
maxWidth:
|
|
310
|
-
width:
|
|
303
|
+
maxWidth: convertToUnit(this.maxWidth),
|
|
304
|
+
width: convertToUnit(this.width),
|
|
311
305
|
}
|
|
312
306
|
}
|
|
313
307
|
|
|
@@ -125,3 +125,11 @@
|
|
|
125
125
|
&--has-state
|
|
126
126
|
&.error--text .v-label
|
|
127
127
|
animation: v-shake .6s map-get($transition, 'swing')
|
|
128
|
+
|
|
129
|
+
&--hide-spin-buttons
|
|
130
|
+
input::-webkit-outer-spin-button,
|
|
131
|
+
input::-webkit-inner-spin-button
|
|
132
|
+
-webkit-appearance: none
|
|
133
|
+
margin: 0
|
|
134
|
+
input[type=number]
|
|
135
|
+
-moz-appearance: textfield
|
|
@@ -48,6 +48,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
48
48
|
dense: Boolean,
|
|
49
49
|
height: [Number, String],
|
|
50
50
|
hideDetails: [Boolean, String] as PropType<boolean | 'auto'>,
|
|
51
|
+
hideSpinButtons: Boolean,
|
|
51
52
|
hint: String,
|
|
52
53
|
id: String,
|
|
53
54
|
label: String,
|
|
@@ -77,6 +78,7 @@ export default baseMixins.extend<options>().extend({
|
|
|
77
78
|
'v-input--is-loading': this.loading !== false && this.loading != null,
|
|
78
79
|
'v-input--is-readonly': this.isReadonly,
|
|
79
80
|
'v-input--dense': this.dense,
|
|
81
|
+
'v-input--hide-spin-buttons': this.hideSpinButtons,
|
|
80
82
|
...this.themeClasses,
|
|
81
83
|
}
|
|
82
84
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import './VItemGroup.sass'
|
|
3
3
|
|
|
4
4
|
// Mixins
|
|
5
|
+
import Comparable from '../../mixins/comparable'
|
|
5
6
|
import Groupable from '../../mixins/groupable'
|
|
6
7
|
import Proxyable from '../../mixins/proxyable'
|
|
7
8
|
import Themeable from '../../mixins/themeable'
|
|
@@ -20,6 +21,7 @@ export type GroupableInstance = InstanceType<typeof Groupable> & {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export const BaseItemGroup = mixins(
|
|
24
|
+
Comparable,
|
|
23
25
|
Proxyable,
|
|
24
26
|
Themeable
|
|
25
27
|
).extend({
|
|
@@ -83,12 +85,12 @@ export const BaseItemGroup = mixins(
|
|
|
83
85
|
},
|
|
84
86
|
toggleMethod (): (v: any) => boolean {
|
|
85
87
|
if (!this.multiple) {
|
|
86
|
-
return (v: any) => this.internalValue
|
|
88
|
+
return (v: any) => this.valueComparator(this.internalValue, v)
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
const internalValue = this.internalValue
|
|
90
92
|
if (Array.isArray(internalValue)) {
|
|
91
|
-
return (v: any) => internalValue.
|
|
93
|
+
return (v: any) => internalValue.some(intern => this.valueComparator(intern, v))
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
return () => false
|
|
@@ -114,7 +116,7 @@ export const BaseItemGroup = mixins(
|
|
|
114
116
|
}
|
|
115
117
|
},
|
|
116
118
|
getValue (item: GroupableInstance, i: number): unknown {
|
|
117
|
-
return item.value
|
|
119
|
+
return item.value === undefined
|
|
118
120
|
? i
|
|
119
121
|
: item.value
|
|
120
122
|
},
|
|
@@ -58,9 +58,9 @@ describe('VItemGroup', () => {
|
|
|
58
58
|
|
|
59
59
|
const getValue = wrapper.vm.getValue
|
|
60
60
|
|
|
61
|
-
expect(getValue({ value: null }, 0)).
|
|
61
|
+
expect(getValue({ value: null }, 0)).toBeNull()
|
|
62
62
|
expect(getValue({ value: undefined }, 1)).toBe(1)
|
|
63
|
-
expect(getValue({ value: '' }, 2)).toBe(
|
|
63
|
+
expect(getValue({ value: '' }, 2)).toBe('')
|
|
64
64
|
expect(getValue({ value: 'foo' }, 'foo')).toBe('foo')
|
|
65
65
|
})
|
|
66
66
|
|
|
@@ -167,6 +167,23 @@ describe('VItemGroup', () => {
|
|
|
167
167
|
expect(wrapper.vm.toggleMethod(0)).toBe(false)
|
|
168
168
|
})
|
|
169
169
|
|
|
170
|
+
it('should correctly be active with objects having different references', () => {
|
|
171
|
+
const wrapper = mountFunction()
|
|
172
|
+
|
|
173
|
+
wrapper.setProps({ value: { a: 1 } })
|
|
174
|
+
expect(wrapper.vm.toggleMethod({ a: 1 })).toBe(true)
|
|
175
|
+
expect(wrapper.vm.toggleMethod({ a: 2 })).toBe(false)
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
it('should have a customizable comparator function', () => {
|
|
179
|
+
const wrapper = mountFunction()
|
|
180
|
+
|
|
181
|
+
wrapper.setProps({ valueComparator: (a: any, b: any) => a === b + 1, value: 0 })
|
|
182
|
+
|
|
183
|
+
expect(wrapper.vm.toggleMethod(0)).toBe(false)
|
|
184
|
+
expect(wrapper.vm.toggleMethod(-1)).toBe(true)
|
|
185
|
+
})
|
|
186
|
+
|
|
170
187
|
it('should select the first item if mandatory and no value', async () => {
|
|
171
188
|
const wrapper = mountFunction({
|
|
172
189
|
propsData: { mandatory: true },
|
|
@@ -391,7 +391,7 @@ export default baseMixins.extend({
|
|
|
391
391
|
getTiles () {
|
|
392
392
|
if (!this.$refs.content) return
|
|
393
393
|
|
|
394
|
-
this.tiles = Array.from(this.$refs.content.querySelectorAll('.v-list-item'))
|
|
394
|
+
this.tiles = Array.from(this.$refs.content.querySelectorAll('.v-list-item, .v-divider, .v-subheader'))
|
|
395
395
|
},
|
|
396
396
|
mouseEnterHandler () {
|
|
397
397
|
this.runDelay('open', () => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Imports
|
|
2
|
+
@import './_variables.scss'
|
|
3
|
+
|
|
4
|
+
// Theme
|
|
5
|
+
+theme(v-otp-input) using ($material)
|
|
6
|
+
.v-input
|
|
7
|
+
.v-input__control
|
|
8
|
+
.v-input__slot
|
|
9
|
+
background: map-get($material, 'bg-color')
|
|
10
|
+
|
|
11
|
+
.v-otp-input
|
|
12
|
+
display: flex
|
|
13
|
+
flex-wrap: wrap
|
|
14
|
+
flex: 1 1 auto
|
|
15
|
+
margin-right: -$otp-gutter
|
|
16
|
+
margin-left: -$otp-gutter
|
|
17
|
+
|
|
18
|
+
input
|
|
19
|
+
text-align: center
|
|
20
|
+
|
|
21
|
+
.v-input
|
|
22
|
+
margin: 0
|
|
23
|
+
flex: 1 0 $otp-width + $otp-gutter * 2
|
|
24
|
+
max-width: 100%
|
|
25
|
+
width: 100%
|
|
26
|
+
padding: $otp-gutter
|
|
27
|
+
|
|
28
|
+
&.v-otp-input--plain
|
|
29
|
+
fieldset
|
|
30
|
+
display: none
|
|
31
|
+
|
|
32
|
+
input[type=number]::-webkit-outer-spin-button,
|
|
33
|
+
input[type=number]::-webkit-inner-spin-button
|
|
34
|
+
-webkit-appearance: none
|
|
35
|
+
margin: 0
|
|
36
|
+
input[type=number]
|
|
37
|
+
-moz-appearance: textfield
|