@@ -1,5 +1,5 @@
Loading
1 1
// Types
2 -
import {
2 +
import type {
3 3
  DirectiveBinding,
4 4
  ObjectDirective,
5 5
} from 'vue'

@@ -259,7 +259,7 @@
Loading
259 259
        [sortA, sortB] = [sortB, sortA]
260 260
      }
261 261
262 -
      if (customSorters && customSorters[sortKey]) {
262 +
      if (customSorters?.[sortKey]) {
263 263
        const customResult = customSorters[sortKey](sortA, sortB)
264 264
265 265
        if (!customResult) continue

@@ -1,4 +1,4 @@
Loading
1 -
import { DirectiveBinding, ObjectDirective } from 'vue'
1 +
import type { DirectiveBinding, ObjectDirective } from 'vue'
2 2
3 3
interface ResizeDirectiveBinding extends Omit<DirectiveBinding, 'modifiers'> {
4 4
  value: (() => void)

@@ -1,4 +1,4 @@
Loading
1 -
import { ColorInt, XYZ } from '../colorUtils'
1 +
import type { ColorInt, XYZ } from '../colorUtils'
2 2
import { clamp } from '../../util/helpers'
3 3
4 4
// For converting XYZ to sRGB

@@ -1,4 +1,4 @@
Loading
1 -
import { DirectiveBinding } from 'vue'
1 +
import type { DirectiveBinding } from 'vue'
2 2
3 3
interface ScrollDirectiveBinding extends Omit<DirectiveBinding, 'modifiers'> {
4 4
  value: EventListener | {
@@ -11,7 +11,7 @@
Loading
11 11
}
12 12
13 13
function mounted (el: HTMLElement, binding: ScrollDirectiveBinding) {
14 -
  const { self = false } = binding.modifiers || {}
14 +
  const { self = false } = binding.modifiers ?? {}
15 15
  const value = binding.value
16 16
  const options = (typeof value === 'object' && value.options) || { passive: true }
17 17
  const handler = typeof value === 'function' || 'handleEvent' in value ? value : value.handler

@@ -70,7 +70,7 @@
Loading
70 70
  const file = options.__file
71 71
  if (!name && file) {
72 72
    const match = file.match(/([^/\\]+)\.vue$/)
73 -
    name = match && match[1]
73 +
    name = match?.[1]
74 74
  }
75 75
76 76
  return (

@@ -1,4 +1,4 @@
Loading
1 -
import { XYZ, LAB } from '../colorUtils'
1 +
import type { XYZ, LAB } from '../colorUtils'
2 2
3 3
const delta = 0.20689655172413793 // 6÷29
4 4

@@ -1,4 +1,4 @@
Loading
1 -
import { DirectiveBinding } from 'vue'
1 +
import type { DirectiveBinding } from 'vue'
2 2
3 3
interface ClickOutsideBindingArgs {
4 4
  handler: (e: Event) => void
@@ -21,9 +21,7 @@
Loading
21 21
22 22
  // The include element callbacks below can be expensive
23 23
  // so we should avoid calling them when we're not active.
24 -
  // Explicitly check for false to allow fallback compatibility
25 -
  // with non-toggleable components
26 -
  if (!e || isActive(e) === false) return
24 +
  if (!e || !isActive(e)) return
27 25
28 26
  // Check if additional elements were passed to be included in check
29 27
  // (click must be outside all included elements, if any)
@@ -52,7 +50,7 @@
Loading
52 50
    // iOS does not recognize click events on document
53 51
    // or body, this is the entire purpose of the v-app
54 52
    // component and [data-app], stop removing this
55 -
    const app = document.querySelector('[data-app]') ||
53 +
    const app = document.querySelector('[data-app]') ??
56 54
      document.body // This is only for unit tests
57 55
    app.addEventListener('click', onClick, true)
58 56
    el._clickOutside = onClick
@@ -61,9 +59,9 @@
Loading
61 59
  unmounted (el: HTMLElement) {
62 60
    if (!el._clickOutside) return
63 61
64 -
    const app = document.querySelector('[data-app]') ||
62 +
    const app = document.querySelector('[data-app]') ??
65 63
      document.body // This is only for unit tests
66 -
    app && app.removeEventListener('click', el._clickOutside, true)
64 +
    app?.removeEventListener('click', el._clickOutside, true)
67 65
    delete el._clickOutside
68 66
  },
69 67
}

@@ -4,7 +4,7 @@
Loading
4 4
import { toXYZ } from './color/transformSRGB'
5 5
6 6
// Types
7 -
import { VuetifyThemeVariant } from 'types/services/theme'
7 +
import type { VuetifyThemeVariant } from 'types/services/theme'
8 8
9 9
export type ColorInt = number
10 10
export type XYZ = [number, number, number]
@@ -29,7 +29,7 @@
Loading
29 29
  if (typeof color === 'number') {
30 30
    rgb = color
31 31
  } else if (typeof color === 'string') {
32 -
    let c = color[0] === '#' ? color.substring(1) : color
32 +
    let c = color.startsWith('#') ? color.substring(1) : color
33 33
    if (c.length === 3) {
34 34
      c = c.split('').map(char => char + char).join('')
35 35
    }
Files Coverage
packages/vuetify/src 3.92%
Project Totals (238 files) 3.92%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading