@dimailn/vuetify 2.7.2-alpha56 → 2.7.2-alpha57

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.
Files changed (51) hide show
  1. package/dist/json/attributes.json +3945 -417
  2. package/dist/json/tags.json +1120 -133
  3. package/dist/json/web-types.json +12516 -2651
  4. package/dist/vuetify.js +66 -76
  5. package/dist/vuetify.js.map +1 -1
  6. package/dist/vuetify.min.css +1 -1
  7. package/dist/vuetify.min.js +2 -2
  8. package/es5/directives/click-outside/index.js +19 -21
  9. package/es5/directives/click-outside/index.js.map +1 -1
  10. package/es5/directives/intersect/index.js +12 -17
  11. package/es5/directives/intersect/index.js.map +1 -1
  12. package/es5/directives/mutate/index.js +9 -11
  13. package/es5/directives/mutate/index.js.map +1 -1
  14. package/es5/directives/resize/index.js +8 -10
  15. package/es5/directives/resize/index.js.map +1 -1
  16. package/es5/directives/scroll/index.js +11 -12
  17. package/es5/directives/scroll/index.js.map +1 -1
  18. package/es5/directives/touch/index.js +6 -5
  19. package/es5/directives/touch/index.js.map +1 -1
  20. package/es5/framework.js +1 -1
  21. package/es5/services/theme/utils.js.map +1 -1
  22. package/lib/directives/click-outside/index.js +17 -19
  23. package/lib/directives/click-outside/index.js.map +1 -1
  24. package/lib/directives/intersect/index.js +12 -16
  25. package/lib/directives/intersect/index.js.map +1 -1
  26. package/lib/directives/mutate/index.js +9 -11
  27. package/lib/directives/mutate/index.js.map +1 -1
  28. package/lib/directives/resize/index.js +8 -8
  29. package/lib/directives/resize/index.js.map +1 -1
  30. package/lib/directives/scroll/index.js +8 -8
  31. package/lib/directives/scroll/index.js.map +1 -1
  32. package/lib/directives/touch/index.js +6 -5
  33. package/lib/directives/touch/index.js.map +1 -1
  34. package/lib/framework.js +1 -1
  35. package/lib/services/theme/utils.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/components/VMenu/__tests__/VMenuActivatorTest.spec.ts +25 -0
  38. package/src/components/VMenu/__tests__/test-with-directives.spec.ts +50 -0
  39. package/src/directives/click-outside/__tests__/click-outside-shadow-dom.spec.ts +2 -1
  40. package/src/directives/click-outside/__tests__/click-outside.spec.ts +2 -1
  41. package/src/directives/click-outside/index.ts +25 -18
  42. package/src/directives/intersect/__tests__/intersect.spec.ts +31 -13
  43. package/src/directives/intersect/index.ts +15 -19
  44. package/src/directives/mutate/__tests__/mutate.spec.ts +35 -27
  45. package/src/directives/mutate/index.ts +12 -6
  46. package/src/directives/resize/__tests__/resize.spec.ts +4 -4
  47. package/src/directives/resize/index.ts +11 -18
  48. package/src/directives/scroll/__tests__/scroll.spec.ts +5 -29
  49. package/src/directives/scroll/index.ts +14 -7
  50. package/src/directives/touch/index.ts +6 -5
  51. package/src/services/theme/utils.ts +1 -1
@@ -85,6 +85,8 @@ function createHandlers (value: TouchHandlers): TouchStoredHandlers {
85
85
  }
86
86
  }
87
87
 
88
+ const touchState = new WeakMap<EventTarget, TouchStoredHandlers>()
89
+
88
90
  function mounted (
89
91
  el: HTMLElement,
90
92
  binding: DirectiveBinding<TouchValue>,
@@ -98,8 +100,7 @@ function mounted (
98
100
  if (!target) return
99
101
 
100
102
  const handlers = createHandlers(binding.value)
101
- target._touchHandlers = Object(target._touchHandlers)
102
- target._touchHandlers![vnode.ctx!.uid] = handlers
103
+ touchState.set(target, handlers)
103
104
 
104
105
  keys(handlers).forEach(eventName => {
105
106
  target.addEventListener(
@@ -116,14 +117,14 @@ function unmounted (
116
117
  vnode: VNode
117
118
  ) {
118
119
  const target = binding.value.parent ? el.parentElement : el
119
- if (!target || !target._touchHandlers) return
120
+ if (!target) return
120
121
 
121
- const handlers = target._touchHandlers[vnode.ctx!.uid]
122
+ const handlers = touchState.get(target)
122
123
  if (handlers) {
123
124
  keys(handlers).forEach(eventName => {
124
125
  target.removeEventListener(eventName, handlers[eventName])
125
126
  })
126
- delete target._touchHandlers[vnode.ctx!.uid]
127
+ touchState.delete(target)
127
128
  }
128
129
  }
129
130
 
@@ -100,7 +100,7 @@ export function genStyles (theme: VuetifyParsedTheme, cssVar = false): string {
100
100
 
101
101
  const variants = keys(value)
102
102
  for (let i = 0; i < variants.length; ++i) {
103
- const variant = variants[i]
103
+ const variant = variants[i] as string
104
104
  const variantValue = value[variant]
105
105
  if (variant === 'base') continue
106
106