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
|
@@ -137,9 +137,8 @@
|
|
|
137
137
|
color: inherit
|
|
138
138
|
|
|
139
139
|
&__label
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
flex-direction: column
|
|
140
|
+
display: block
|
|
141
|
+
flex-grow: 1
|
|
143
142
|
line-height: $stepper-label-line-height
|
|
144
143
|
|
|
145
144
|
+ltr()
|
|
@@ -149,6 +148,7 @@
|
|
|
149
148
|
text-align: right
|
|
150
149
|
|
|
151
150
|
small
|
|
151
|
+
display: block
|
|
152
152
|
font-size: $stepper-label-small-font-size
|
|
153
153
|
font-weight: $stepper-label-small-font-weight
|
|
154
154
|
text-shadow: none
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
flex-basis: $stepper-alt-labels-flex-basis
|
|
220
220
|
|
|
221
221
|
small
|
|
222
|
-
align
|
|
222
|
+
text-align: center
|
|
223
223
|
|
|
224
224
|
.v-stepper__step__step
|
|
225
225
|
margin-bottom: $stepper-alt-labels-step-step-margin-bottom
|
|
@@ -11,6 +11,9 @@ import { ExtractVue } from './../../util/mixins'
|
|
|
11
11
|
// Types
|
|
12
12
|
import { VNode } from 'vue/types'
|
|
13
13
|
|
|
14
|
+
// Components
|
|
15
|
+
import VTabsBar from '../VTabs/VTabsBar'
|
|
16
|
+
|
|
14
17
|
const baseMixins = mixins(
|
|
15
18
|
Routable,
|
|
16
19
|
// Must be after routable
|
|
@@ -19,8 +22,11 @@ const baseMixins = mixins(
|
|
|
19
22
|
Themeable
|
|
20
23
|
)
|
|
21
24
|
|
|
25
|
+
type VTabBarInstance = InstanceType<typeof VTabsBar>
|
|
26
|
+
|
|
22
27
|
interface options extends ExtractVue<typeof baseMixins> {
|
|
23
28
|
$el: HTMLElement
|
|
29
|
+
tabsBar: VTabBarInstance
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
export default baseMixins.extend<options>().extend(
|
|
@@ -49,7 +55,9 @@ export default baseMixins.extend<options>().extend(
|
|
|
49
55
|
}
|
|
50
56
|
},
|
|
51
57
|
value (): any {
|
|
52
|
-
let to = this.to || this.href
|
|
58
|
+
let to = this.to || this.href
|
|
59
|
+
|
|
60
|
+
if (to == null) return to
|
|
53
61
|
|
|
54
62
|
if (this.$router &&
|
|
55
63
|
this.to === Object(this.to)
|
|
@@ -92,7 +100,7 @@ export default baseMixins.extend<options>().extend(
|
|
|
92
100
|
},
|
|
93
101
|
toggle () {
|
|
94
102
|
// VItemGroup treats a change event as a click
|
|
95
|
-
if (!this.isActive) {
|
|
103
|
+
if (!this.isActive || (!this.tabsBar.mandatory && !this.to)) {
|
|
96
104
|
this.$emit('change')
|
|
97
105
|
}
|
|
98
106
|
},
|
|
@@ -231,10 +231,15 @@ export default baseMixins.extend<options>().extend({
|
|
|
231
231
|
mounted () {
|
|
232
232
|
// #11533
|
|
233
233
|
this.$watch(() => this.labelValue, this.setLabelWidth)
|
|
234
|
-
|
|
235
234
|
this.autofocus && this.tryAutofocus()
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
requestAnimationFrame(() => {
|
|
236
|
+
this.isBooted = true
|
|
237
|
+
requestAnimationFrame(() => {
|
|
238
|
+
if (!this.isIntersecting) {
|
|
239
|
+
this.onResize()
|
|
240
|
+
}
|
|
241
|
+
})
|
|
242
|
+
})
|
|
238
243
|
},
|
|
239
244
|
|
|
240
245
|
methods: {
|
|
@@ -125,7 +125,6 @@ export default mixins(Colorable, Delayable, Dependent, Menuable, Toggleable).ext
|
|
|
125
125
|
left: this.calculatedLeft,
|
|
126
126
|
maxWidth: convertToUnit(this.maxWidth),
|
|
127
127
|
minWidth: convertToUnit(this.minWidth),
|
|
128
|
-
opacity: this.isActive ? 0.9 : 0,
|
|
129
128
|
top: this.calculatedTop,
|
|
130
129
|
zIndex: this.zIndex || this.activeZIndex,
|
|
131
130
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
$tooltip-background-color: rgba(map-get($grey, 'darken-2'), 0.9) !default;
|
|
4
4
|
$tooltip-text-color: map-get($shades, 'white') !default;
|
|
5
|
+
$tooltip-opacity: .9 !default;
|
|
5
6
|
$tooltip-border-radius: $border-radius-root !default;
|
|
6
7
|
$tooltip-font-size: 14px !default;
|
|
7
8
|
$tooltip-transition-timing-function: map-get($transition, 'linear-out-slow-in') !default;
|
|
@@ -59,6 +59,7 @@ export default mixins(
|
|
|
59
59
|
default: () => ([]),
|
|
60
60
|
} as PropValidator<NodeArray>,
|
|
61
61
|
dense: Boolean,
|
|
62
|
+
disabled: Boolean,
|
|
62
63
|
filter: Function as PropType<TreeviewItemFunction>,
|
|
63
64
|
hoverable: Boolean,
|
|
64
65
|
items: {
|
|
@@ -415,7 +416,7 @@ export default mixins(
|
|
|
415
416
|
}).map(item => {
|
|
416
417
|
const genChild = VTreeviewNode.options.methods.genChild.bind(this)
|
|
417
418
|
|
|
418
|
-
return genChild(item, getObjectValueByPath(item, this.itemDisabled))
|
|
419
|
+
return genChild(item, this.disabled || getObjectValueByPath(item, this.itemDisabled))
|
|
419
420
|
})
|
|
420
421
|
/* istanbul ignore next */
|
|
421
422
|
: this.$slots.default! // TODO: remove type annotation with TS 3.2
|
|
@@ -36,6 +36,7 @@ export const VTreeviewNodeProps = {
|
|
|
36
36
|
type: String,
|
|
37
37
|
default: 'primary',
|
|
38
38
|
},
|
|
39
|
+
disablePerNode: Boolean,
|
|
39
40
|
expandIcon: {
|
|
40
41
|
type: String,
|
|
41
42
|
default: '$subgroup',
|
|
@@ -122,7 +123,7 @@ const VTreeviewNode = baseMixins.extend<options>().extend({
|
|
|
122
123
|
disabled (): boolean {
|
|
123
124
|
return (
|
|
124
125
|
getObjectValueByPath(this.item, this.itemDisabled) ||
|
|
125
|
-
(this.parentIsDisabled && this.selectionType === 'leaf')
|
|
126
|
+
(!this.disablePerNode && (this.parentIsDisabled && this.selectionType === 'leaf'))
|
|
126
127
|
)
|
|
127
128
|
},
|
|
128
129
|
key (): string {
|
|
@@ -310,6 +311,7 @@ const VTreeviewNode = baseMixins.extend<options>().extend({
|
|
|
310
311
|
selectable: this.selectable,
|
|
311
312
|
selectedColor: this.selectedColor,
|
|
312
313
|
color: this.color,
|
|
314
|
+
disablePerNode: this.disablePerNode,
|
|
313
315
|
expandIcon: this.expandIcon,
|
|
314
316
|
indeterminateIcon: this.indeterminateIcon,
|
|
315
317
|
offIcon: this.offIcon,
|
package/src/components/index.ts
CHANGED
|
@@ -104,9 +104,9 @@ export const ClickOutside = {
|
|
|
104
104
|
if (!el._clickOutside) return
|
|
105
105
|
|
|
106
106
|
handleShadow(el, (app: HTMLElement) => {
|
|
107
|
-
if (!app || !el._clickOutside) return
|
|
107
|
+
if (!app || !el._clickOutside?.[vnode.context!._uid]) return
|
|
108
108
|
|
|
109
|
-
const { onClick, onMousedown } = el._clickOutside[vnode.context!._uid]
|
|
109
|
+
const { onClick, onMousedown } = el._clickOutside[vnode.context!._uid]!
|
|
110
110
|
|
|
111
111
|
app.removeEventListener('click', onClick, true)
|
|
112
112
|
app.removeEventListener('mousedown', onMousedown, true)
|
|
@@ -27,9 +27,9 @@ function inserted (el: HTMLElement, binding: ObserveVNodeDirective, vnode: VNode
|
|
|
27
27
|
entries: IntersectionObserverEntry[] = [],
|
|
28
28
|
observer: IntersectionObserver
|
|
29
29
|
) => {
|
|
30
|
-
|
|
30
|
+
const _observe = el._observe?.[vnode.context!._uid]
|
|
31
|
+
if (!_observe) return // Just in case, should never fire
|
|
31
32
|
|
|
32
|
-
const _observe = el._observe[vnode.context!._uid]
|
|
33
33
|
const isIntersecting = entries.some(entry => entry.isIntersecting)
|
|
34
34
|
|
|
35
35
|
// If is not quiet or has already been
|
|
@@ -58,10 +58,11 @@ function inserted (el: HTMLElement, binding: ObserveVNodeDirective, vnode: VNode
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function unbind (el: HTMLElement, binding: ObserveVNodeDirective, vnode: VNode) {
|
|
61
|
-
|
|
61
|
+
const observe = el._observe?.[vnode.context!._uid]
|
|
62
|
+
if (!observe) return
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
delete el._observe[vnode.context!._uid]
|
|
64
|
+
observe.observer.unobserve(el)
|
|
65
|
+
delete el._observe![vnode.context!._uid]
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
export const Intersect = {
|
|
@@ -61,10 +61,9 @@ function inserted (el: HTMLElement, binding: MutateVNodeDirective, vnode: VNode)
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function unbind (el: HTMLElement, binding: MutateVNodeDirective, vnode: VNode) {
|
|
64
|
-
|
|
65
|
-
if (!el._mutate) return
|
|
64
|
+
if (!el._mutate?.[vnode.context!._uid]) return
|
|
66
65
|
|
|
67
|
-
el._mutate[vnode.context!._uid]
|
|
66
|
+
el._mutate[vnode.context!._uid]!.observer.disconnect()
|
|
68
67
|
delete el._mutate[vnode.context!._uid]
|
|
69
68
|
}
|
|
70
69
|
|
|
@@ -24,9 +24,9 @@ function inserted (el: HTMLElement, binding: ResizeVNodeDirective, vnode: VNode)
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function unbind (el: HTMLElement, binding: ResizeVNodeDirective, vnode: VNode) {
|
|
27
|
-
if (!el._onResize) return
|
|
27
|
+
if (!el._onResize?.[vnode.context!._uid]) return
|
|
28
28
|
|
|
29
|
-
const { callback, options } = el._onResize[vnode.context!._uid]
|
|
29
|
+
const { callback, options } = el._onResize[vnode.context!._uid]!
|
|
30
30
|
|
|
31
31
|
window.removeEventListener('resize', callback, options)
|
|
32
32
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../styles/styles.sass'
|
|
2
2
|
|
|
3
3
|
.v-ripple
|
|
4
4
|
&__container
|
|
@@ -28,9 +28,12 @@
|
|
|
28
28
|
|
|
29
29
|
&--enter
|
|
30
30
|
transition: none
|
|
31
|
+
opacity: 0
|
|
31
32
|
|
|
32
33
|
&--in
|
|
33
34
|
transition: $ripple-animation-transition-in
|
|
35
|
+
opacity: $ripple-animation-visible-opacity
|
|
34
36
|
|
|
35
37
|
&--out
|
|
36
38
|
transition: $ripple-animation-transition-out
|
|
39
|
+
opacity: 0
|
|
@@ -17,10 +17,6 @@ function transform (el: HTMLElement, value: string) {
|
|
|
17
17
|
el.style.webkitTransform = value
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function opacity (el: HTMLElement, value: number) {
|
|
21
|
-
el.style.opacity = value.toString()
|
|
22
|
-
}
|
|
23
|
-
|
|
24
20
|
export interface RippleOptions {
|
|
25
21
|
class?: string
|
|
26
22
|
center?: boolean
|
|
@@ -109,14 +105,12 @@ const ripples = {
|
|
|
109
105
|
animation.classList.add('v-ripple__animation--enter')
|
|
110
106
|
animation.classList.add('v-ripple__animation--visible')
|
|
111
107
|
transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`)
|
|
112
|
-
opacity(animation, 0)
|
|
113
108
|
animation.dataset.activated = String(performance.now())
|
|
114
109
|
|
|
115
110
|
setTimeout(() => {
|
|
116
111
|
animation.classList.remove('v-ripple__animation--enter')
|
|
117
112
|
animation.classList.add('v-ripple__animation--in')
|
|
118
113
|
transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`)
|
|
119
|
-
opacity(animation, 0.25)
|
|
120
114
|
}, 0)
|
|
121
115
|
},
|
|
122
116
|
|
|
@@ -137,7 +131,6 @@ const ripples = {
|
|
|
137
131
|
setTimeout(() => {
|
|
138
132
|
animation.classList.remove('v-ripple__animation--in')
|
|
139
133
|
animation.classList.add('v-ripple__animation--out')
|
|
140
|
-
opacity(animation, 0)
|
|
141
134
|
|
|
142
135
|
setTimeout(() => {
|
|
143
136
|
const ripples = el.getElementsByClassName('v-ripple__animation')
|
|
@@ -39,7 +39,7 @@ function inserted (el: HTMLElement, binding: ScrollVNodeDirective, vnode: VNode)
|
|
|
39
39
|
function unbind (el: HTMLElement, binding: ScrollVNodeDirective, vnode: VNode) {
|
|
40
40
|
if (!el._onScroll?.[vnode.context!._uid]) return
|
|
41
41
|
|
|
42
|
-
const { handler, options, target = el } = el._onScroll[vnode.context!._uid]
|
|
42
|
+
const { handler, options, target = el } = el._onScroll[vnode.context!._uid]!
|
|
43
43
|
|
|
44
44
|
target.removeEventListener('scroll', handler, options)
|
|
45
45
|
delete el._onScroll[vnode.context!._uid]
|
package/src/globals.d.ts
CHANGED
|
@@ -32,11 +32,11 @@ declare global {
|
|
|
32
32
|
_clickOutside?: Record<number, {
|
|
33
33
|
onClick: EventListener
|
|
34
34
|
onMousedown: EventListener
|
|
35
|
-
}> & { lastMousedownWasOutside: boolean }
|
|
35
|
+
} | undefined> & { lastMousedownWasOutside: boolean }
|
|
36
36
|
_onResize?: Record<number, {
|
|
37
37
|
callback: () => void
|
|
38
38
|
options?: boolean | AddEventListenerOptions
|
|
39
|
-
}>
|
|
39
|
+
} | undefined>
|
|
40
40
|
_ripple?: {
|
|
41
41
|
enabled?: boolean
|
|
42
42
|
centered?: boolean
|
|
@@ -50,15 +50,15 @@ declare global {
|
|
|
50
50
|
_observe?: Record<number, {
|
|
51
51
|
init: boolean
|
|
52
52
|
observer: IntersectionObserver
|
|
53
|
-
}>
|
|
53
|
+
} | undefined>
|
|
54
54
|
_mutate?: Record<number, {
|
|
55
55
|
observer: MutationObserver
|
|
56
|
-
}>
|
|
56
|
+
} | undefined>
|
|
57
57
|
_onScroll?: Record<number, {
|
|
58
58
|
handler: EventListenerOrEventListenerObject
|
|
59
59
|
options: boolean | AddEventListenerOptions
|
|
60
60
|
target?: EventTarget
|
|
61
|
-
}>
|
|
61
|
+
} | undefined>
|
|
62
62
|
_touchHandlers?: {
|
|
63
63
|
[_uid: number]: TouchStoredHandlers
|
|
64
64
|
}
|
package/src/locale/da.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
badge: 'Emblem',
|
|
3
|
+
close: 'Luk',
|
|
4
|
+
dataIterator: {
|
|
5
|
+
noResultsText: 'Ingen matchende data fundet',
|
|
6
|
+
loadingText: 'Indhenter data...',
|
|
7
|
+
},
|
|
8
|
+
dataTable: {
|
|
9
|
+
itemsPerPageText: 'Rækker pr. side:',
|
|
10
|
+
ariaLabel: {
|
|
11
|
+
sortDescending: 'Sorteret faldende.',
|
|
12
|
+
sortAscending: 'Sorteret stigende.',
|
|
13
|
+
sortNone: 'Ikke sorteret.',
|
|
14
|
+
activateNone: 'Aktiver for at fjerne sortering.',
|
|
15
|
+
activateDescending: 'Aktiver for at sortere faldende.',
|
|
16
|
+
activateAscending: 'Aktiver for at sortere stigende.',
|
|
17
|
+
},
|
|
18
|
+
sortBy: 'Sorter efter',
|
|
19
|
+
},
|
|
20
|
+
dataFooter: {
|
|
21
|
+
itemsPerPageText: 'Rækker pr. side:',
|
|
22
|
+
itemsPerPageAll: 'Alle',
|
|
23
|
+
nextPage: 'Næste side',
|
|
24
|
+
prevPage: 'Forrige side',
|
|
25
|
+
firstPage: 'Første side',
|
|
26
|
+
lastPage: 'Sidste side',
|
|
27
|
+
pageText: '{0}-{1} af {2}',
|
|
28
|
+
},
|
|
29
|
+
datePicker: {
|
|
30
|
+
itemsSelected: '{0} valgt',
|
|
31
|
+
nextMonthAriaLabel: 'Næste måned',
|
|
32
|
+
nextYearAriaLabel: 'Næste år',
|
|
33
|
+
prevMonthAriaLabel: 'Forrige måned',
|
|
34
|
+
prevYearAriaLabel: 'Forrige år',
|
|
35
|
+
},
|
|
36
|
+
noDataText: 'Ingen data tilgængelig',
|
|
37
|
+
carousel: {
|
|
38
|
+
prev: 'Forrige visuelle',
|
|
39
|
+
next: 'Næste visuelle',
|
|
40
|
+
ariaLabel: {
|
|
41
|
+
delimiter: 'Karrusel dias {0} af {1}',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
calendar: {
|
|
45
|
+
moreEvents: '{0} mere',
|
|
46
|
+
},
|
|
47
|
+
fileInput: {
|
|
48
|
+
counter: '{0} filer',
|
|
49
|
+
counterSize: '{0} filer ({1} total)',
|
|
50
|
+
},
|
|
51
|
+
timePicker: {
|
|
52
|
+
am: 'AM',
|
|
53
|
+
pm: 'PM',
|
|
54
|
+
},
|
|
55
|
+
pagination: {
|
|
56
|
+
ariaLabel: {
|
|
57
|
+
wrapper: 'Pagineringsnavigation',
|
|
58
|
+
next: 'Næste side',
|
|
59
|
+
previous: 'Forrige side',
|
|
60
|
+
page: 'Gå til side {0}',
|
|
61
|
+
currentPage: 'Nuværende side, Side {0}',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
rating: {
|
|
65
|
+
ariaLabel: {
|
|
66
|
+
icon: 'Bedømmelse {0} af {1}',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
}
|
package/src/locale/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { default as bg } from './bg'
|
|
|
4
4
|
export { default as ca } from './ca'
|
|
5
5
|
export { default as ckb } from './ckb'
|
|
6
6
|
export { default as cs } from './cs'
|
|
7
|
+
export { default as da } from './da'
|
|
7
8
|
export { default as de } from './de'
|
|
8
9
|
export { default as el } from './el'
|
|
9
10
|
export { default as en } from './en'
|
package/src/locale/it.ts
CHANGED
|
@@ -22,8 +22,8 @@ export default {
|
|
|
22
22
|
itemsPerPageAll: 'Tutti',
|
|
23
23
|
nextPage: 'Pagina seguente',
|
|
24
24
|
prevPage: 'Pagina precedente',
|
|
25
|
-
firstPage: '
|
|
26
|
-
lastPage: '
|
|
25
|
+
firstPage: 'Prima pagina',
|
|
26
|
+
lastPage: 'Ultima pagina',
|
|
27
27
|
pageText: '{0}-{1} di {2}',
|
|
28
28
|
},
|
|
29
29
|
datePicker: {
|
|
@@ -38,15 +38,15 @@ export default {
|
|
|
38
38
|
prev: 'Vista precedente',
|
|
39
39
|
next: 'Prossima vista',
|
|
40
40
|
ariaLabel: {
|
|
41
|
-
delimiter: 'Carousel slide {0}
|
|
41
|
+
delimiter: 'Carousel slide {0} di {1}',
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
calendar: {
|
|
45
45
|
moreEvents: '{0} di più',
|
|
46
46
|
},
|
|
47
47
|
fileInput: {
|
|
48
|
-
counter: '{0}
|
|
49
|
-
counterSize: '{0}
|
|
48
|
+
counter: '{0} file',
|
|
49
|
+
counterSize: '{0} file ({1} in totale)',
|
|
50
50
|
},
|
|
51
51
|
timePicker: {
|
|
52
52
|
am: 'AM',
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
},
|
|
64
64
|
rating: {
|
|
65
65
|
ariaLabel: {
|
|
66
|
-
icon: '
|
|
66
|
+
icon: 'Valutazione {0} di {1}',
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
}
|
|
@@ -11,6 +11,10 @@ export default function intersectable (options: { onVisible: string[] }) {
|
|
|
11
11
|
return Vue.extend({
|
|
12
12
|
name: 'intersectable',
|
|
13
13
|
|
|
14
|
+
data: () => ({
|
|
15
|
+
isIntersecting: false,
|
|
16
|
+
}),
|
|
17
|
+
|
|
14
18
|
mounted () {
|
|
15
19
|
Intersect.inserted(this.$el as HTMLElement, {
|
|
16
20
|
name: 'intersect',
|
|
@@ -27,6 +31,8 @@ export default function intersectable (options: { onVisible: string[] }) {
|
|
|
27
31
|
|
|
28
32
|
methods: {
|
|
29
33
|
onObserve (entries: IntersectionObserverEntry[], observer: IntersectionObserver, isIntersecting: boolean) {
|
|
34
|
+
this.isIntersecting = isIntersecting
|
|
35
|
+
|
|
30
36
|
if (!isIntersecting) return
|
|
31
37
|
|
|
32
38
|
for (let i = 0, length = options.onVisible.length; i < length; i++) {
|
|
@@ -80,9 +80,6 @@ export default Vue.extend({
|
|
|
80
80
|
},
|
|
81
81
|
|
|
82
82
|
methods: {
|
|
83
|
-
click (e: MouseEvent): void {
|
|
84
|
-
this.$emit('click', e)
|
|
85
|
-
},
|
|
86
83
|
generateRouteLink () {
|
|
87
84
|
let exact = this.exact
|
|
88
85
|
let tag
|
|
@@ -100,7 +97,7 @@ export default Vue.extend({
|
|
|
100
97
|
}],
|
|
101
98
|
[this.to ? 'nativeOn' : 'on']: {
|
|
102
99
|
...this.$listeners,
|
|
103
|
-
click: this.click,
|
|
100
|
+
...('click' in this ? { click: (this as any).click } : undefined), // #14447
|
|
104
101
|
},
|
|
105
102
|
ref: 'link',
|
|
106
103
|
}
|
|
@@ -22,17 +22,18 @@ $rounded: map-deep-merge(
|
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
$spacer: 4px !default;
|
|
25
|
+
$spacers-steps: 16 !default;
|
|
25
26
|
|
|
26
27
|
$spacers: () !default;
|
|
27
28
|
@if (type-of($spacers) == list) {
|
|
28
|
-
@for $i from 0 through
|
|
29
|
+
@for $i from 0 through $spacers-steps {
|
|
29
30
|
$spacers: map-merge($spacers, ($i: $spacer * $i))
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
$negative-spacers: () !default;
|
|
34
35
|
@if (type-of($negative-spacers) == list) {
|
|
35
|
-
@for $i from 1 through
|
|
36
|
+
@for $i from 1 through $spacers-steps {
|
|
36
37
|
$negative-spacers: map-merge($negative-spacers, ("n" + $i: -$spacer * $i))
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -249,7 +250,7 @@ $secondary-transition: 0.2s map-get($transition, 'ease-in-out') !default;
|
|
|
249
250
|
// Ripples //;
|
|
250
251
|
$ripple-animation-transition-in: transform 0.25s map-get($transition, 'fast-out-slow-in'), opacity 0.1s map-get($transition, 'fast-out-slow-in') !default;
|
|
251
252
|
$ripple-animation-transition-out: opacity 0.3s map-get($transition, 'fast-out-slow-in') !default;
|
|
252
|
-
$ripple-animation-visible-opacity: 0.
|
|
253
|
+
$ripple-animation-visible-opacity: 0.25 !default;
|
|
253
254
|
|
|
254
255
|
// Elements //;
|
|
255
256
|
$bootable-transition: 0.2s map-get($transition, 'fast-out-slow-in') !default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`createSimpleFunctional should render with a custom tag 1`] = `
|
|
4
|
+
<pre class="v-test">
|
|
5
|
+
</pre>
|
|
6
|
+
`;
|
|
7
|
+
|
|
8
|
+
exports[`createSimpleFunctional should render with a user-defined tag 1`] = `
|
|
9
|
+
<h1 class="v-test">
|
|
10
|
+
</h1>
|
|
11
|
+
`;
|
|
@@ -9,7 +9,24 @@ import {
|
|
|
9
9
|
getObjectValueByPath,
|
|
10
10
|
humanReadableFileSize,
|
|
11
11
|
sortItems,
|
|
12
|
+
createSimpleFunctional,
|
|
12
13
|
} from '../helpers'
|
|
14
|
+
import { mount } from '@vue/test-utils'
|
|
15
|
+
|
|
16
|
+
describe('createSimpleFunctional', () => {
|
|
17
|
+
it('should render with a custom tag', () => {
|
|
18
|
+
const component = createSimpleFunctional('v-test', 'pre')
|
|
19
|
+
const wrapper = mount(component)
|
|
20
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
21
|
+
})
|
|
22
|
+
it('should render with a user-defined tag', () => {
|
|
23
|
+
const component = createSimpleFunctional('v-test', 'pre')
|
|
24
|
+
const wrapper = mount(component, {
|
|
25
|
+
propsData: { tag: 'h1' },
|
|
26
|
+
})
|
|
27
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
28
|
+
})
|
|
29
|
+
})
|
|
13
30
|
|
|
14
31
|
describe('helpers', () => {
|
|
15
32
|
it('should return set difference of arrays A and B', () => {
|
package/src/util/helpers.ts
CHANGED
|
@@ -13,10 +13,17 @@ export function createSimpleFunctional (
|
|
|
13
13
|
|
|
14
14
|
functional: true,
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
props: {
|
|
17
|
+
tag: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: el,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
render (h, { data, props, children }): VNode {
|
|
17
24
|
data.staticClass = (`${c} ${data.staticClass || ''}`).trim()
|
|
18
25
|
|
|
19
|
-
return h(
|
|
26
|
+
return h(props.tag, data, children)
|
|
20
27
|
},
|
|
21
28
|
})
|
|
22
29
|
}
|
|
@@ -378,11 +385,11 @@ export function searchItems<T extends any = any> (items: T[], search: string): T
|
|
|
378
385
|
* - 'v-slot' for unbound v-slot (`#default`) - only if the third param is true, otherwise counts as scoped
|
|
379
386
|
*/
|
|
380
387
|
export function getSlotType<T extends boolean = false> (vm: Vue, name: string, split?: T): (T extends true ? 'v-slot' : never) | 'normal' | 'scoped' | void {
|
|
381
|
-
if (vm.$slots
|
|
388
|
+
if (vm.$slots.hasOwnProperty(name) && vm.$scopedSlots.hasOwnProperty(name) && (vm.$scopedSlots[name] as any).name) {
|
|
382
389
|
return split ? 'v-slot' as any : 'scoped'
|
|
383
390
|
}
|
|
384
|
-
if (vm.$slots
|
|
385
|
-
if (vm.$scopedSlots
|
|
391
|
+
if (vm.$slots.hasOwnProperty(name)) return 'normal'
|
|
392
|
+
if (vm.$scopedSlots.hasOwnProperty(name)) return 'scoped'
|
|
386
393
|
}
|
|
387
394
|
|
|
388
395
|
export function debounce (fn: Function, delay: number) {
|
|
@@ -412,9 +419,9 @@ export function getPrefixedScopedSlots (prefix: string, scopedSlots: any) {
|
|
|
412
419
|
}
|
|
413
420
|
|
|
414
421
|
export function getSlot (vm: Vue, name = 'default', data?: object | (() => object), optional = false) {
|
|
415
|
-
if (vm.$scopedSlots
|
|
422
|
+
if (vm.$scopedSlots.hasOwnProperty(name)) {
|
|
416
423
|
return vm.$scopedSlots[name]!(data instanceof Function ? data() : data)
|
|
417
|
-
} else if (vm.$slots
|
|
424
|
+
} else if (vm.$slots.hasOwnProperty(name) && (!data || optional)) {
|
|
418
425
|
return vm.$slots[name]
|
|
419
426
|
}
|
|
420
427
|
return undefined
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
@import '../../styles/styles.sass';
|
|
2
|
-
|
|
3
|
-
$ripple-animation-transition-in: transform .25s map-get($transition, 'fast-in-slow-out'),
|
|
4
|
-
opacity .1s map-get($transition, 'fast-in-slow-out') !default;
|
|
5
|
-
$ripple-animation-transition-out: opacity .3s map-get($transition, 'fast-in-slow-out') !default;
|
|
6
|
-
$ripple-animation-visible-opacity: .15 !default;
|