@vuetify/nightly 3.7.1-master.2024-09-02 → 3.7.1-master.2024-09-03

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 (41) hide show
  1. package/dist/json/importMap-labs.json +18 -18
  2. package/dist/json/importMap.json +164 -164
  3. package/dist/json/web-types.json +1 -1
  4. package/dist/vuetify-labs.css +2480 -2477
  5. package/dist/vuetify-labs.esm.js +34 -31
  6. package/dist/vuetify-labs.esm.js.map +1 -1
  7. package/dist/vuetify-labs.js +34 -31
  8. package/dist/vuetify-labs.min.css +2 -2
  9. package/dist/vuetify.css +2919 -2916
  10. package/dist/vuetify.d.ts +53 -53
  11. package/dist/vuetify.esm.js +34 -31
  12. package/dist/vuetify.esm.js.map +1 -1
  13. package/dist/vuetify.js +34 -31
  14. package/dist/vuetify.js.map +1 -1
  15. package/dist/vuetify.min.css +2 -2
  16. package/dist/vuetify.min.js +267 -267
  17. package/dist/vuetify.min.js.map +1 -1
  18. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +3 -5
  19. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
  20. package/lib/components/VBtn/VBtn.mjs +3 -4
  21. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  22. package/lib/components/VCard/VCard.mjs +3 -4
  23. package/lib/components/VCard/VCard.mjs.map +1 -1
  24. package/lib/components/VChip/VChip.mjs +2 -3
  25. package/lib/components/VChip/VChip.mjs.map +1 -1
  26. package/lib/components/VDialog/VDialog.css +4 -1
  27. package/lib/components/VDialog/VDialog.mjs +1 -2
  28. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  29. package/lib/components/VDialog/VDialog.sass +2 -1
  30. package/lib/components/VList/VListItem.mjs +3 -4
  31. package/lib/components/VList/VListItem.mjs.map +1 -1
  32. package/lib/composables/directiveComponent.mjs +1 -1
  33. package/lib/composables/directiveComponent.mjs.map +1 -1
  34. package/lib/composables/router.mjs +19 -9
  35. package/lib/composables/router.mjs.map +1 -1
  36. package/lib/directives/tooltip/index.mjs +1 -1
  37. package/lib/directives/tooltip/index.mjs.map +1 -1
  38. package/lib/entry-bundler.mjs +1 -1
  39. package/lib/framework.mjs +1 -1
  40. package/lib/index.d.mts +53 -53
  41. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"VListItem.mjs","names":["VListItemSubtitle","VListItemTitle","VAvatar","VDefaultsProvider","VIcon","useList","makeBorderProps","useBorder","makeComponentProps","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","IconValue","useNestedItem","makeRoundedProps","useRounded","makeRouterProps","useLink","makeTagProps","makeThemeProps","provideTheme","genOverlays","makeVariantProps","useVariant","Ripple","computed","watch","deprecate","EventProp","genericComponent","propsFactory","useRender","makeVListItemProps","active","type","Boolean","default","undefined","activeClass","String","activeColor","appendAvatar","appendIcon","baseColor","disabled","lines","link","nav","prependAvatar","prependIcon","ripple","Object","slim","subtitle","Number","title","value","onClick","onClickOnce","variant","VListItem","name","directives","props","emits","click","e","setup","_ref","attrs","slots","emit","id","href","activate","isActivated","select","isOpen","isSelected","isIndeterminate","isGroupActivator","root","parent","openOnSelect","uid","list","isActive","activatable","isLink","isClickable","selectable","roundedProps","rounded","color","variantProps","val","open","immediate","themeClasses","borderClasses","colorClasses","colorStyles","variantClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","lineClasses","slotProps","navigate","onKeyDown","key","preventDefault","target","dispatchEvent","MouseEvent","Tag","tag","hasTitle","hasSubtitle","hasAppendMedia","hasAppend","append","hasPrependMedia","hasPrepend","prepend","updateHasPrepend","_withDirectives","_createVNode","class","style","_Fragment","density","image","icon","VListItemAction","start","end","_resolveDirective"],"sources":["../../../src/components/VList/VListItem.tsx"],"sourcesContent":["// Styles\nimport './VListItem.sass'\n\n// Components\nimport { VListItemSubtitle } from './VListItemSubtitle'\nimport { VListItemTitle } from './VListItemTitle'\nimport { VAvatar } from '@/components/VAvatar'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VIcon } from '@/components/VIcon'\n\n// Composables\nimport { useList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { IconValue } from '@/composables/icons'\nimport { useNestedItem } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeRouterProps, useLink } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { genOverlays, makeVariantProps, useVariant } from '@/composables/variant'\n\n// Directives\nimport { Ripple } from '@/directives/ripple'\n\n// Utilities\nimport { computed, watch } from 'vue'\nimport { deprecate, EventProp, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { RippleDirectiveBinding } from '@/directives/ripple'\n\nexport type ListItemSlot = {\n isActive: boolean\n isOpen: boolean\n isSelected: boolean\n isIndeterminate: boolean\n select: (value: boolean) => void\n}\n\nexport type ListItemTitleSlot = {\n title?: string | number\n}\n\nexport type ListItemSubtitleSlot = {\n subtitle?: string | number\n}\n\nexport type VListItemSlots = {\n prepend: ListItemSlot\n append: ListItemSlot\n default: ListItemSlot\n title: ListItemTitleSlot\n subtitle: ListItemSubtitleSlot\n}\n\nexport const makeVListItemProps = propsFactory({\n active: {\n type: Boolean,\n default: undefined,\n },\n activeClass: String,\n /* @deprecated */\n activeColor: String,\n appendAvatar: String,\n appendIcon: IconValue,\n baseColor: String,\n disabled: Boolean,\n lines: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n link: {\n type: Boolean,\n default: undefined,\n },\n nav: Boolean,\n prependAvatar: String,\n prependIcon: IconValue,\n ripple: {\n type: [Boolean, Object] as PropType<RippleDirectiveBinding['value']>,\n default: true,\n },\n slim: Boolean,\n subtitle: [String, Number],\n title: [String, Number],\n value: null,\n\n onClick: EventProp<[MouseEvent | KeyboardEvent]>(),\n onClickOnce: EventProp<[MouseEvent]>(),\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VListItem')\n\nexport const VListItem = genericComponent<VListItemSlots>()({\n name: 'VListItem',\n\n directives: { Ripple },\n\n props: makeVListItemProps(),\n\n emits: {\n click: (e: MouseEvent | KeyboardEvent) => true,\n },\n\n setup (props, { attrs, slots, emit }) {\n const link = useLink(props, attrs)\n const id = computed(() => props.value === undefined ? link.href.value : props.value)\n const {\n activate,\n isActivated,\n select,\n isOpen,\n isSelected,\n isIndeterminate,\n isGroupActivator,\n root,\n parent,\n openOnSelect,\n id: uid,\n } = useNestedItem(id, false)\n const list = useList()\n const isActive = computed(() =>\n props.active !== false &&\n (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value))\n )\n const isLink = computed(() => props.link !== false && link.isLink.value)\n const isClickable = computed(() =>\n !props.disabled &&\n props.link !== false &&\n (props.link || link.isClickable.value || (!!list && (root.selectable.value || root.activatable.value || props.value != null)))\n )\n\n const roundedProps = computed(() => props.rounded || props.nav)\n const color = computed(() => props.color ?? props.activeColor)\n const variantProps = computed(() => ({\n color: isActive.value ? color.value ?? props.baseColor : props.baseColor,\n variant: props.variant,\n }))\n\n watch(() => link.isActive?.value, val => {\n if (val && parent.value != null) {\n root.open(parent.value, true)\n }\n\n if (val) {\n openOnSelect(val)\n }\n }, { immediate: true })\n\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(roundedProps)\n const lineClasses = computed(() => props.lines ? `v-list-item--${props.lines}-line` : undefined)\n\n const slotProps = computed(() => ({\n isActive: isActive.value,\n select,\n isOpen: isOpen.value,\n isSelected: isSelected.value,\n isIndeterminate: isIndeterminate.value,\n } satisfies ListItemSlot))\n\n function onClick (e: MouseEvent) {\n emit('click', e)\n\n if (!isClickable.value) return\n\n link.navigate?.(e)\n\n if (isGroupActivator) return\n\n if (root.activatable.value) {\n activate(!isActivated.value, e)\n } else if (root.selectable.value) {\n select(!isSelected.value, e)\n } else if (props.value != null) {\n select(!isSelected.value, e)\n }\n }\n\n function onKeyDown (e: KeyboardEvent) {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n e.target!.dispatchEvent(new MouseEvent('click', e))\n }\n }\n\n useRender(() => {\n const Tag = isLink.value ? 'a' : props.tag\n const hasTitle = (slots.title || props.title != null)\n const hasSubtitle = (slots.subtitle || props.subtitle != null)\n const hasAppendMedia = !!(props.appendAvatar || props.appendIcon)\n const hasAppend = !!(hasAppendMedia || slots.append)\n const hasPrependMedia = !!(props.prependAvatar || props.prependIcon)\n const hasPrepend = !!(hasPrependMedia || slots.prepend)\n\n list?.updateHasPrepend(hasPrepend)\n\n if (props.activeColor) {\n deprecate('active-color', ['color', 'base-color'])\n }\n\n return (\n <Tag\n class={[\n 'v-list-item',\n {\n 'v-list-item--active': isActive.value,\n 'v-list-item--disabled': props.disabled,\n 'v-list-item--link': isClickable.value,\n 'v-list-item--nav': props.nav,\n 'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,\n 'v-list-item--slim': props.slim,\n [`${props.activeClass}`]: props.activeClass && isActive.value,\n },\n themeClasses.value,\n borderClasses.value,\n colorClasses.value,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n variantClasses.value,\n props.class,\n ]}\n style={[\n colorStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n href={ link.href.value }\n tabindex={ isClickable.value ? (list ? -2 : 0) : undefined }\n onClick={ onClick }\n onKeydown={ isClickable.value && !isLink.value && onKeyDown }\n v-ripple={ isClickable.value && props.ripple }\n >\n { genOverlays(isClickable.value || isActive.value, 'v-list-item') }\n\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-list-item__prepend\">\n { !slots.prepend ? (\n <>\n { props.prependAvatar && (\n <VAvatar\n key=\"prepend-avatar\"\n density={ props.density }\n image={ props.prependAvatar }\n />\n )}\n\n { props.prependIcon && (\n <VIcon\n key=\"prepend-icon\"\n density={ props.density }\n icon={ props.prependIcon }\n />\n )}\n </>\n ) : (\n <VDefaultsProvider\n key=\"prepend-defaults\"\n disabled={ !hasPrependMedia }\n defaults={{\n VAvatar: {\n density: props.density,\n image: props.prependAvatar,\n },\n VIcon: {\n density: props.density,\n icon: props.prependIcon,\n },\n VListItemAction: {\n start: true,\n },\n }}\n >\n { slots.prepend?.(slotProps.value) }\n </VDefaultsProvider>\n )}\n\n <div class=\"v-list-item__spacer\" />\n </div>\n )}\n\n <div class=\"v-list-item__content\" data-no-activator=\"\">\n { hasTitle && (\n <VListItemTitle key=\"title\">\n { slots.title?.({ title: props.title }) ?? props.title }\n </VListItemTitle>\n )}\n\n { hasSubtitle && (\n <VListItemSubtitle key=\"subtitle\">\n { slots.subtitle?.({ subtitle: props.subtitle }) ?? props.subtitle }\n </VListItemSubtitle>\n )}\n\n { slots.default?.(slotProps.value) }\n </div>\n\n { hasAppend && (\n <div key=\"append\" class=\"v-list-item__append\">\n { !slots.append ? (\n <>\n { props.appendIcon && (\n <VIcon\n key=\"append-icon\"\n density={ props.density }\n icon={ props.appendIcon }\n />\n )}\n\n { props.appendAvatar && (\n <VAvatar\n key=\"append-avatar\"\n density={ props.density }\n image={ props.appendAvatar }\n />\n )}\n </>\n ) : (\n <VDefaultsProvider\n key=\"append-defaults\"\n disabled={ !hasAppendMedia }\n defaults={{\n VAvatar: {\n density: props.density,\n image: props.appendAvatar,\n },\n VIcon: {\n density: props.density,\n icon: props.appendIcon,\n },\n VListItemAction: {\n end: true,\n },\n }}\n >\n { slots.append?.(slotProps.value) }\n </VDefaultsProvider>\n )}\n\n <div class=\"v-list-item__spacer\" />\n </div>\n )}\n </Tag>\n )\n })\n\n return {\n activate,\n isActivated,\n isGroupActivator,\n isSelected,\n list,\n select,\n root,\n id: uid,\n }\n },\n})\n\nexport type VListItem = InstanceType<typeof VListItem>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,iBAAiB;AAAA,SACjBC,KAAK,8BAEd;AAAA,SACSC,OAAO;AAAA,SACPC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,SAAS;AAAA,SACTC,aAAa;AAAA,SACbC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,eAAe,EAAEC,OAAO;AAAA,SACxBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,WAAW,EAAEC,gBAAgB,EAAEC,UAAU,yCAElD;AAAA,SACSC,MAAM,6CAEf;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,SAAS,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAExE;AA4BA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,MAAM,EAAE;IACNC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAEC;EACX,CAAC;EACDC,WAAW,EAAEC,MAAM;EACnB;EACAC,WAAW,EAAED,MAAM;EACnBE,YAAY,EAAEF,MAAM;EACpBG,UAAU,EAAE9B,SAAS;EACrB+B,SAAS,EAAEJ,MAAM;EACjBK,QAAQ,EAAET,OAAO;EACjBU,KAAK,EAAE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1B,EAECqB,KAAK,CAACtB,YAAY,IAAAuF,YAAA,CAAAjI,OAAA;UAAA;UAAA,WAGNgE,KAAK,CAACqE,OAAO;UAAA,SACfrE,KAAK,CAACtB;QAAY,QAE7B,KAAAuF,YAAA,CAAAhI,iBAAA;UAAA;UAAA,YAKU,CAACwH,cAAc;UAAA,YAChB;YACRzH,OAAO,EAAE;cACPqI,OAAO,EAAErE,KAAK,CAACqE,OAAO;cACtBC,KAAK,EAAEtE,KAAK,CAACtB;YACf,CAAC;YACDxC,KAAK,EAAE;cACLmI,OAAO,EAAErE,KAAK,CAACqE,OAAO;cACtBE,IAAI,EAAEvE,KAAK,CAACrB;YACd,CAAC;YACD6F,eAAe,EAAE;cACfE,GAAG,EAAE;YACP;UACF;QAAC;UAAArG,OAAA,EAAAA,CAAA,MAECkC,KAAK,CAACoD,MAAM,GAAGd,SAAS,CAACpD,KAAK,CAAC;QAAA,EAEpC,EAAAwE,YAAA;UAAA;QAAA,UAIJ;MAAA,MAAAU,iBAAA,YA9GUjD,WAAW,CAACjC,KAAK,IAAIO,KAAK,CAACb,MAAM;IAiHlD,CAAC,CAAC;IAEF,OAAO;MACLwB,QAAQ;MACRC,WAAW;MACXK,gBAAgB;MAChBF,UAAU;MACVO,IAAI;MACJT,MAAM;MACNK,IAAI;MACJT,EAAE,EAAEY;IACN,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VListItem.mjs","names":["VListItemSubtitle","VListItemTitle","VAvatar","VDefaultsProvider","VIcon","useList","makeBorderProps","useBorder","makeComponentProps","makeDensityProps","useDensity","makeDimensionProps","useDimension","makeElevationProps","useElevation","IconValue","useNestedItem","makeRoundedProps","useRounded","makeRouterProps","useLink","makeTagProps","makeThemeProps","provideTheme","genOverlays","makeVariantProps","useVariant","Ripple","computed","watch","deprecate","EventProp","genericComponent","propsFactory","useRender","makeVListItemProps","active","type","Boolean","default","undefined","activeClass","String","activeColor","appendAvatar","appendIcon","baseColor","disabled","lines","link","nav","prependAvatar","prependIcon","ripple","Object","slim","subtitle","Number","title","value","onClick","onClickOnce","variant","VListItem","name","directives","props","emits","click","e","setup","_ref","attrs","slots","emit","id","href","activate","isActivated","select","isOpen","isSelected","isIndeterminate","isGroupActivator","root","parent","openOnSelect","uid","list","isActive","activatable","isLink","isClickable","selectable","roundedProps","rounded","color","variantProps","val","open","immediate","themeClasses","borderClasses","colorClasses","colorStyles","variantClasses","densityClasses","dimensionStyles","elevationClasses","roundedClasses","lineClasses","slotProps","navigate","onKeyDown","key","preventDefault","target","dispatchEvent","MouseEvent","Tag","tag","hasTitle","hasSubtitle","hasAppendMedia","hasAppend","append","hasPrependMedia","hasPrepend","prepend","updateHasPrepend","_withDirectives","_createVNode","_mergeProps","class","style","linkProps","_Fragment","density","image","icon","VListItemAction","start","end","_resolveDirective"],"sources":["../../../src/components/VList/VListItem.tsx"],"sourcesContent":["// Styles\nimport './VListItem.sass'\n\n// Components\nimport { VListItemSubtitle } from './VListItemSubtitle'\nimport { VListItemTitle } from './VListItemTitle'\nimport { VAvatar } from '@/components/VAvatar'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VIcon } from '@/components/VIcon'\n\n// Composables\nimport { useList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { IconValue } from '@/composables/icons'\nimport { useNestedItem } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeRouterProps, useLink } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { genOverlays, makeVariantProps, useVariant } from '@/composables/variant'\n\n// Directives\nimport { Ripple } from '@/directives/ripple'\n\n// Utilities\nimport { computed, watch } from 'vue'\nimport { deprecate, EventProp, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { RippleDirectiveBinding } from '@/directives/ripple'\n\nexport type ListItemSlot = {\n isActive: boolean\n isOpen: boolean\n isSelected: boolean\n isIndeterminate: boolean\n select: (value: boolean) => void\n}\n\nexport type ListItemTitleSlot = {\n title?: string | number\n}\n\nexport type ListItemSubtitleSlot = {\n subtitle?: string | number\n}\n\nexport type VListItemSlots = {\n prepend: ListItemSlot\n append: ListItemSlot\n default: ListItemSlot\n title: ListItemTitleSlot\n subtitle: ListItemSubtitleSlot\n}\n\nexport const makeVListItemProps = propsFactory({\n active: {\n type: Boolean,\n default: undefined,\n },\n activeClass: String,\n /* @deprecated */\n activeColor: String,\n appendAvatar: String,\n appendIcon: IconValue,\n baseColor: String,\n disabled: Boolean,\n lines: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n link: {\n type: Boolean,\n default: undefined,\n },\n nav: Boolean,\n prependAvatar: String,\n prependIcon: IconValue,\n ripple: {\n type: [Boolean, Object] as PropType<RippleDirectiveBinding['value']>,\n default: true,\n },\n slim: Boolean,\n subtitle: [String, Number],\n title: [String, Number],\n value: null,\n\n onClick: EventProp<[MouseEvent | KeyboardEvent]>(),\n onClickOnce: EventProp<[MouseEvent]>(),\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VListItem')\n\nexport const VListItem = genericComponent<VListItemSlots>()({\n name: 'VListItem',\n\n directives: { Ripple },\n\n props: makeVListItemProps(),\n\n emits: {\n click: (e: MouseEvent | KeyboardEvent) => true,\n },\n\n setup (props, { attrs, slots, emit }) {\n const link = useLink(props, attrs)\n const id = computed(() => props.value === undefined ? link.href.value : props.value)\n const {\n activate,\n isActivated,\n select,\n isOpen,\n isSelected,\n isIndeterminate,\n isGroupActivator,\n root,\n parent,\n openOnSelect,\n id: uid,\n } = useNestedItem(id, false)\n const list = useList()\n const isActive = computed(() =>\n props.active !== false &&\n (props.active || link.isActive?.value || (root.activatable.value ? isActivated.value : isSelected.value))\n )\n const isLink = computed(() => props.link !== false && link.isLink.value)\n const isClickable = computed(() =>\n !props.disabled &&\n props.link !== false &&\n (props.link || link.isClickable.value || (!!list && (root.selectable.value || root.activatable.value || props.value != null)))\n )\n\n const roundedProps = computed(() => props.rounded || props.nav)\n const color = computed(() => props.color ?? props.activeColor)\n const variantProps = computed(() => ({\n color: isActive.value ? color.value ?? props.baseColor : props.baseColor,\n variant: props.variant,\n }))\n\n watch(() => link.isActive?.value, val => {\n if (val && parent.value != null) {\n root.open(parent.value, true)\n }\n\n if (val) {\n openOnSelect(val)\n }\n }, { immediate: true })\n\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { colorClasses, colorStyles, variantClasses } = useVariant(variantProps)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(roundedProps)\n const lineClasses = computed(() => props.lines ? `v-list-item--${props.lines}-line` : undefined)\n\n const slotProps = computed(() => ({\n isActive: isActive.value,\n select,\n isOpen: isOpen.value,\n isSelected: isSelected.value,\n isIndeterminate: isIndeterminate.value,\n } satisfies ListItemSlot))\n\n function onClick (e: MouseEvent) {\n emit('click', e)\n\n if (!isClickable.value) return\n\n link.navigate?.(e)\n\n if (isGroupActivator) return\n\n if (root.activatable.value) {\n activate(!isActivated.value, e)\n } else if (root.selectable.value) {\n select(!isSelected.value, e)\n } else if (props.value != null) {\n select(!isSelected.value, e)\n }\n }\n\n function onKeyDown (e: KeyboardEvent) {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n e.target!.dispatchEvent(new MouseEvent('click', e))\n }\n }\n\n useRender(() => {\n const Tag = isLink.value ? 'a' : props.tag\n const hasTitle = (slots.title || props.title != null)\n const hasSubtitle = (slots.subtitle || props.subtitle != null)\n const hasAppendMedia = !!(props.appendAvatar || props.appendIcon)\n const hasAppend = !!(hasAppendMedia || slots.append)\n const hasPrependMedia = !!(props.prependAvatar || props.prependIcon)\n const hasPrepend = !!(hasPrependMedia || slots.prepend)\n\n list?.updateHasPrepend(hasPrepend)\n\n if (props.activeColor) {\n deprecate('active-color', ['color', 'base-color'])\n }\n\n return (\n <Tag\n class={[\n 'v-list-item',\n {\n 'v-list-item--active': isActive.value,\n 'v-list-item--disabled': props.disabled,\n 'v-list-item--link': isClickable.value,\n 'v-list-item--nav': props.nav,\n 'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,\n 'v-list-item--slim': props.slim,\n [`${props.activeClass}`]: props.activeClass && isActive.value,\n },\n themeClasses.value,\n borderClasses.value,\n colorClasses.value,\n densityClasses.value,\n elevationClasses.value,\n lineClasses.value,\n roundedClasses.value,\n variantClasses.value,\n props.class,\n ]}\n style={[\n colorStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n tabindex={ isClickable.value ? (list ? -2 : 0) : undefined }\n onClick={ onClick }\n onKeydown={ isClickable.value && !isLink.value && onKeyDown }\n v-ripple={ isClickable.value && props.ripple }\n { ...link.linkProps }\n >\n { genOverlays(isClickable.value || isActive.value, 'v-list-item') }\n\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-list-item__prepend\">\n { !slots.prepend ? (\n <>\n { props.prependAvatar && (\n <VAvatar\n key=\"prepend-avatar\"\n density={ props.density }\n image={ props.prependAvatar }\n />\n )}\n\n { props.prependIcon && (\n <VIcon\n key=\"prepend-icon\"\n density={ props.density }\n icon={ props.prependIcon }\n />\n )}\n </>\n ) : (\n <VDefaultsProvider\n key=\"prepend-defaults\"\n disabled={ !hasPrependMedia }\n defaults={{\n VAvatar: {\n density: props.density,\n image: props.prependAvatar,\n },\n VIcon: {\n density: props.density,\n icon: props.prependIcon,\n },\n VListItemAction: {\n start: true,\n },\n }}\n >\n { slots.prepend?.(slotProps.value) }\n </VDefaultsProvider>\n )}\n\n <div class=\"v-list-item__spacer\" />\n </div>\n )}\n\n <div class=\"v-list-item__content\" data-no-activator=\"\">\n { hasTitle && (\n <VListItemTitle key=\"title\">\n { slots.title?.({ title: props.title }) ?? props.title }\n </VListItemTitle>\n )}\n\n { hasSubtitle && (\n <VListItemSubtitle key=\"subtitle\">\n { slots.subtitle?.({ subtitle: props.subtitle }) ?? props.subtitle }\n </VListItemSubtitle>\n )}\n\n { slots.default?.(slotProps.value) }\n </div>\n\n { hasAppend && (\n <div key=\"append\" class=\"v-list-item__append\">\n { !slots.append ? (\n <>\n { props.appendIcon && (\n <VIcon\n key=\"append-icon\"\n density={ props.density }\n icon={ props.appendIcon }\n />\n )}\n\n { props.appendAvatar && (\n <VAvatar\n key=\"append-avatar\"\n density={ props.density }\n image={ props.appendAvatar }\n />\n )}\n </>\n ) : (\n <VDefaultsProvider\n key=\"append-defaults\"\n disabled={ !hasAppendMedia }\n defaults={{\n VAvatar: {\n density: props.density,\n image: props.appendAvatar,\n },\n VIcon: {\n density: props.density,\n icon: props.appendIcon,\n },\n VListItemAction: {\n end: true,\n },\n }}\n >\n { slots.append?.(slotProps.value) }\n </VDefaultsProvider>\n )}\n\n <div class=\"v-list-item__spacer\" />\n </div>\n )}\n </Tag>\n )\n })\n\n return {\n activate,\n isActivated,\n isGroupActivator,\n isSelected,\n list,\n select,\n root,\n id: uid,\n }\n },\n})\n\nexport type VListItem = InstanceType<typeof VListItem>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,iBAAiB;AAAA,SACjBC,KAAK,8BAEd;AAAA,SACSC,OAAO;AAAA,SACPC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAA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K,CAAC;QAAA,EAEpC,EAAAwE,YAAA;UAAA;QAAA,UAIJ;MAAA,MAAAY,iBAAA,YA/GUnD,WAAW,CAACjC,KAAK,IAAIO,KAAK,CAACb,MAAM;IAkHlD,CAAC,CAAC;IAEF,OAAO;MACLwB,QAAQ;MACRC,WAAW;MACXK,gBAAgB;MAChBF,UAAU;MACVO,IAAI;MACJT,MAAM;MACNK,IAAI;MACJT,EAAE,EAAEY;IACN,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -19,7 +19,7 @@ function mountComponent(component, props) {
19
19
  const value = isObject(binding.value) ? binding.value : {};
20
20
 
21
21
  // Get the children from the props or directive value, or the element's children
22
- const children = () => text ?? el.innerHTML;
22
+ const children = () => text ?? el.textContent;
23
23
 
24
24
  // If vnode.ctx is the same as the instance, then we're bound to a plain element
25
25
  // and need to find the nearest parent component instance to inherit provides from
@@ -1 +1 @@
1
- {"version":3,"file":"directiveComponent.mjs","names":["h","mergeProps","render","resolveComponent","isObject","useDirectiveComponent","component","props","concreteComponent","hook","mountComponent","mounted","updated","unmounted","el","binding","vnode","_props","text","value","children","innerHTML","provides","ctx","instance","$","findComponentParent","node","appContext","Object","assign","create","root","stack","Set","walk","child","add","result","suspense","ssContent","Array","isArray","subTree","delete","Error","from","reverse"],"sources":["../../src/composables/directiveComponent.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, render, resolveComponent } from 'vue'\nimport { isObject } from '@/util'\n\n// Types\nimport type {\n Component,\n ComponentInternalInstance,\n ComponentPublicInstance,\n ConcreteComponent,\n DirectiveBinding,\n ObjectDirective,\n VNode,\n} from 'vue'\nimport type { ComponentInstance } from '@/util'\n\ntype ExcludeProps =\n | 'v-slots'\n | `v-slot:${string}`\n | `on${Uppercase<string>}${string}`\n | 'key'\n | 'ref'\n | 'ref_for'\n | 'ref_key'\n | '$children'\n\ndeclare const CustomDirectiveSymbol: unique symbol\ntype DirectiveHook<B extends DirectiveBinding> = (el: any, binding: B, vnode: VNode<any, any>, prevVNode: VNode<any, any>) => void\nexport interface CustomDirective<B extends DirectiveBinding = DirectiveBinding> {\n created?: DirectiveHook<B>\n beforeMount?: DirectiveHook<B>\n mounted?: DirectiveHook<B>\n beforeUpdate?: DirectiveHook<B>\n updated?: DirectiveHook<B>\n beforeUnmount?: DirectiveHook<B>\n unmounted?: DirectiveHook<B>\n [CustomDirectiveSymbol]: true\n}\n\nexport function useDirectiveComponent <\n Binding extends DirectiveBinding,\n> (component: string | Component, props?: (binding: Binding) => Record<string, any>): CustomDirective<Binding>\nexport function useDirectiveComponent <\n C extends Component,\n Props = Omit<ComponentInstance<C>['$props'], ExcludeProps>\n> (component: string | C, props?: Record<string, any>): ObjectDirective<any, Props>\nexport function useDirectiveComponent (\n component: string | Component,\n props?: Record<string, any> | ((binding: DirectiveBinding) => Record<string, any>)\n): ObjectDirective | CustomDirective {\n const concreteComponent = (typeof component === 'string'\n ? resolveComponent(component)\n : component) as ConcreteComponent\n\n const hook = mountComponent(concreteComponent, props)\n\n return {\n mounted: hook,\n updated: hook,\n unmounted (el: HTMLElement) {\n render(null, el)\n },\n }\n}\n\nfunction mountComponent (component: ConcreteComponent, props?: Record<string, any> | ((binding: DirectiveBinding) => Record<string, any>)) {\n return function (el: HTMLElement, binding: DirectiveBinding, vnode: VNode) {\n const _props = typeof props === 'function' ? props(binding) : props\n const text = binding.value?.text ?? binding.value ?? _props?.text\n const value = isObject(binding.value) ? binding.value : {}\n\n // Get the children from the props or directive value, or the element's children\n const children = () => text ?? el.innerHTML\n\n // If vnode.ctx is the same as the instance, then we're bound to a plain element\n // and need to find the nearest parent component instance to inherit provides from\n const provides = (vnode.ctx === binding.instance!.$\n ? findComponentParent(vnode, binding.instance!.$)?.provides\n : vnode.ctx?.provides) ?? binding.instance!.$.provides\n\n const node = h(component, mergeProps(_props, value), children)\n node.appContext = Object.assign(\n Object.create(null),\n (binding.instance as ComponentPublicInstance).$.appContext,\n { provides }\n )\n\n render(node, el)\n }\n}\n\nfunction findComponentParent (vnode: VNode, root: ComponentInternalInstance): ComponentInternalInstance | null {\n // Walk the tree from root until we find the child vnode\n const stack = new Set<VNode>()\n const walk = (children: VNode[]): boolean => {\n for (const child of children) {\n if (!child) continue\n\n if (child === vnode) {\n return true\n }\n\n stack.add(child)\n let result\n if (child.suspense) {\n result = walk([child.ssContent!])\n } else if (Array.isArray(child.children)) {\n result = walk(child.children as VNode[])\n } else if (child.component?.vnode) {\n result = walk([child.component?.subTree])\n }\n if (result) {\n return result\n }\n stack.delete(child)\n }\n\n return false\n }\n if (!walk([root.subTree])) {\n throw new Error('Could not find original vnode')\n }\n\n // Return the first component parent\n const result = Array.from(stack).reverse()\n for (const child of result) {\n if (child.component) {\n return child.component\n }\n }\n return root\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,KAAK;AAAA,SACpDC,QAAQ,6BAEjB;AA0CA,OAAO,SAASC,qBAAqBA,CACnCC,SAA6B,EAC7BC,KAAkF,EAC/C;EACnC,MAAMC,iBAAiB,GAAI,OAAOF,SAAS,KAAK,QAAQ,GACpDH,gBAAgB,CAACG,SAAS,CAAC,GAC3BA,SAA+B;EAEnC,MAAMG,IAAI,GAAGC,cAAc,CAACF,iBAAiB,EAAED,KAAK,CAAC;EAErD,OAAO;IACLI,OAAO,EAAEF,IAAI;IACbG,OAAO,EAAEH,IAAI;IACbI,SAASA,CAAEC,EAAe,EAAE;MAC1BZ,MAAM,CAAC,IAAI,EAAEY,EAAE,CAAC;IAClB;EACF,CAAC;AACH;AAEA,SAASJ,cAAcA,CAAEJ,SAA4B,EAAEC,KAAkF,EAAE;EACzI,OAAO,UAAUO,EAAe,EAAEC,OAAyB,EAAEC,KAAY,EAAE;IACzE,MAAMC,MAAM,GAAG,OAAOV,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACQ,OAAO,CAAC,GAAGR,KAAK;IACnE,MAAMW,IAAI,GAAGH,OAAO,CAACI,KAAK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,CAAC;MAChB,IAAIE,MAAM;MACV,IAAIF,KAAK,CAACG,QAAQ,EAAE;QAClBD,MAAM,GAAGH,IAAI,CAAC,CAACC,KAAK,CAACI,SAAS,CAAE,CAAC;MACnC,CAAC,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACN,KAAK,CAAChB,QAAQ,CAAC,EAAE;QACxCkB,MAAM,GAAGH,IAAI,CAACC,KAAK,CAAChB,QAAmB,CAAC;MAC1C,CAAC,MAAM,IAAIgB,KAAK,CAAC9B,SAAS,EAAEU,KAAK,EAAE;QACjCsB,MAAM,GAAGH,IAAI,CAAC,CAACC,KAAK,CAAC9B,SAAS,EAAEqC,OAAO,CAAC,CAAC;MAC3C;MACA,IAAIL,MAAM,EAAE;QACV,OAAOA,MAAM;MACf;MACAL,KAAK,CAACW,MAAM,CAACR,KAAK,CAAC;IACrB;IAEA,OAAO,KAAK;EACd,CAAC;EACD,IAAI,CAACD,IAAI,CAAC,CAACH,IAAI,CAACW,OAAO,CAAC,CAAC,EAAE;IACzB,MAAM,IAAIE,KAAK,CAAC,+BAA+B,CAAC;EAClD;;EAEA;EACA,MAAMP,MAAM,GAAGG,KAAK,CAACK,IAAI,CAACb,KAAK,CAAC,CAACc,OAAO,CAAC,CAAC;EAC1C,KAAK,MAAMX,KAAK,IAAIE,MAAM,EAAE;IAC1B,IAAIF,KAAK,CAAC9B,SAAS,EAAE;MACnB,OAAO8B,KAAK,CAAC9B,SAAS;IACxB;EACF;EACA,OAAO0B,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"file":"directiveComponent.mjs","names":["h","mergeProps","render","resolveComponent","isObject","useDirectiveComponent","component","props","concreteComponent","hook","mountComponent","mounted","updated","unmounted","el","binding","vnode","_props","text","value","children","textContent","provides","ctx","instance","$","findComponentParent","node","appContext","Object","assign","create","root","stack","Set","walk","child","add","result","suspense","ssContent","Array","isArray","subTree","delete","Error","from","reverse"],"sources":["../../src/composables/directiveComponent.ts"],"sourcesContent":["// Utilities\nimport { h, mergeProps, render, resolveComponent } from 'vue'\nimport { isObject } from '@/util'\n\n// Types\nimport type {\n Component,\n ComponentInternalInstance,\n ComponentPublicInstance,\n ConcreteComponent,\n DirectiveBinding,\n ObjectDirective,\n VNode,\n} from 'vue'\nimport type { ComponentInstance } from '@/util'\n\ntype ExcludeProps =\n | 'v-slots'\n | `v-slot:${string}`\n | `on${Uppercase<string>}${string}`\n | 'key'\n | 'ref'\n | 'ref_for'\n | 'ref_key'\n | '$children'\n\ndeclare const CustomDirectiveSymbol: unique symbol\ntype DirectiveHook<B extends DirectiveBinding> = (el: any, binding: B, vnode: VNode<any, any>, prevVNode: VNode<any, any>) => void\nexport interface CustomDirective<B extends DirectiveBinding = DirectiveBinding> {\n created?: DirectiveHook<B>\n beforeMount?: DirectiveHook<B>\n mounted?: DirectiveHook<B>\n beforeUpdate?: DirectiveHook<B>\n updated?: DirectiveHook<B>\n beforeUnmount?: DirectiveHook<B>\n unmounted?: DirectiveHook<B>\n [CustomDirectiveSymbol]: true\n}\n\nexport function useDirectiveComponent <\n Binding extends DirectiveBinding,\n> (component: string | Component, props?: (binding: Binding) => Record<string, any>): CustomDirective<Binding>\nexport function useDirectiveComponent <\n C extends Component,\n Props = Omit<ComponentInstance<C>['$props'], ExcludeProps>\n> (component: string | C, props?: Record<string, any>): ObjectDirective<any, Props>\nexport function useDirectiveComponent (\n component: string | Component,\n props?: Record<string, any> | ((binding: DirectiveBinding) => Record<string, any>)\n): ObjectDirective | CustomDirective {\n const concreteComponent = (typeof component === 'string'\n ? resolveComponent(component)\n : component) as ConcreteComponent\n\n const hook = mountComponent(concreteComponent, props)\n\n return {\n mounted: hook,\n updated: hook,\n unmounted (el: HTMLElement) {\n render(null, el)\n },\n }\n}\n\nfunction mountComponent (component: ConcreteComponent, props?: Record<string, any> | ((binding: DirectiveBinding) => Record<string, any>)) {\n return function (el: HTMLElement, binding: DirectiveBinding, vnode: VNode) {\n const _props = typeof props === 'function' ? props(binding) : props\n const text = binding.value?.text ?? binding.value ?? _props?.text\n const value = isObject(binding.value) ? binding.value : {}\n\n // Get the children from the props or directive value, or the element's children\n const children = () => text ?? el.textContent\n\n // If vnode.ctx is the same as the instance, then we're bound to a plain element\n // and need to find the nearest parent component instance to inherit provides from\n const provides = (vnode.ctx === binding.instance!.$\n ? findComponentParent(vnode, binding.instance!.$)?.provides\n : vnode.ctx?.provides) ?? binding.instance!.$.provides\n\n const node = h(component, mergeProps(_props, value), children)\n node.appContext = Object.assign(\n Object.create(null),\n (binding.instance as ComponentPublicInstance).$.appContext,\n { provides }\n )\n\n render(node, el)\n }\n}\n\nfunction findComponentParent (vnode: VNode, root: ComponentInternalInstance): ComponentInternalInstance | null {\n // Walk the tree from root until we find the child vnode\n const stack = new Set<VNode>()\n const walk = (children: VNode[]): boolean => {\n for (const child of children) {\n if (!child) continue\n\n if (child === vnode) {\n return true\n }\n\n stack.add(child)\n let result\n if (child.suspense) {\n result = walk([child.ssContent!])\n } else if (Array.isArray(child.children)) {\n result = walk(child.children as VNode[])\n } else if (child.component?.vnode) {\n result = walk([child.component?.subTree])\n }\n if (result) {\n return result\n }\n stack.delete(child)\n }\n\n return false\n }\n if (!walk([root.subTree])) {\n throw new Error('Could not find original vnode')\n }\n\n // Return the first component parent\n const result = Array.from(stack).reverse()\n for (const child of result) {\n if (child.component) {\n return child.component\n }\n }\n return root\n}\n"],"mappings":"AAAA;AACA,SAASA,CAAC,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,KAAK;AAAA,SACpDC,QAAQ,6BAEjB;AA0CA,OAAO,SAASC,qBAAqBA,CACnCC,SAA6B,EAC7BC,KAAkF,EAC/C;EACnC,MAAMC,iBAAiB,GAAI,OAAOF,SAAS,KAAK,QAAQ,GACpDH,gBAAgB,CAACG,SAAS,CAAC,GAC3BA,SAA+B;EAEnC,MAAMG,IAAI,GAAGC,cAAc,CAACF,iBAAiB,EAAED,KAAK,CAAC;EAErD,OAAO;IACLI,OAAO,EAAEF,IAAI;IACb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EAAE;MACnB,OAAO8B,KAAK,CAAC9B,SAAS;IACxB;EACF;EACA,OAAO0B,IAAI;AACb","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  // Utilities
2
- import { computed, nextTick, onScopeDispose, resolveDynamicComponent, toRef } from 'vue';
2
+ import { computed, nextTick, onScopeDispose, reactive, resolveDynamicComponent, toRef } from 'vue';
3
3
  import { deepEqual, getCurrentInstance, hasEvent, IN_BROWSER, propsFactory } from "../util/index.mjs"; // Types
4
4
  export function useRoute() {
5
5
  const vm = getCurrentInstance('useRoute');
@@ -15,10 +15,14 @@ export function useLink(props, attrs) {
15
15
  return isLink?.value || hasEvent(attrs, 'click') || hasEvent(props, 'click');
16
16
  });
17
17
  if (typeof RouterLink === 'string' || !('useLink' in RouterLink)) {
18
+ const href = toRef(props, 'href');
18
19
  return {
19
20
  isLink,
20
21
  isClickable,
21
- href: toRef(props, 'href')
22
+ href,
23
+ linkProps: reactive({
24
+ href
25
+ })
22
26
  };
23
27
  }
24
28
  // vue-router useLink `to` prop needs to be reactive and useLink will crash if undefined
@@ -30,18 +34,24 @@ export function useLink(props, attrs) {
30
34
  // Actual link needs to be undefined when to prop is not used
31
35
  const link = computed(() => props.to ? routerLink : undefined);
32
36
  const route = useRoute();
37
+ const isActive = computed(() => {
38
+ if (!link.value) return false;
39
+ if (!props.exact) return link.value.isActive?.value ?? false;
40
+ if (!route.value) return link.value.isExactActive?.value ?? false;
41
+ return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query);
42
+ });
43
+ const href = computed(() => props.to ? link.value?.route.value.href : props.href);
33
44
  return {
34
45
  isLink,
35
46
  isClickable,
47
+ isActive,
36
48
  route: link.value?.route,
37
49
  navigate: link.value?.navigate,
38
- isActive: computed(() => {
39
- if (!link.value) return false;
40
- if (!props.exact) return link.value.isActive?.value ?? false;
41
- if (!route.value) return link.value.isExactActive?.value ?? false;
42
- return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query);
43
- }),
44
- href: computed(() => props.to ? link.value?.route.value.href : props.href)
50
+ href,
51
+ linkProps: reactive({
52
+ href,
53
+ 'aria-current': computed(() => isActive.value ? 'page' : undefined)
54
+ })
45
55
  };
46
56
  }
47
57
  export const makeRouterProps = propsFactory({
@@ -1 +1 @@
1
- {"version":3,"file":"router.mjs","names":["computed","nextTick","onScopeDispose","resolveDynamicComponent","toRef","deepEqual","getCurrentInstance","hasEvent","IN_BROWSER","propsFactory","useRoute","vm","proxy","$route","useRouter","$router","useLink","props","attrs","RouterLink","isLink","href","to","isClickable","value","linkProps","routerLink","link","undefined","route","navigate","isActive","exact","isExactActive","query","makeRouterProps","String","replace","Boolean","Object","inTransition","useBackButton","router","cb","popped","removeBefore","removeAfter","window","addEventListener","onPopstate","beforeEach","from","next","setTimeout","afterEach","removeEventListener","e","state","replaced"],"sources":["../../src/composables/router.tsx"],"sourcesContent":["// Utilities\nimport {\n computed,\n nextTick,\n onScopeDispose,\n resolveDynamicComponent,\n toRef,\n} from 'vue'\nimport { deepEqual, getCurrentInstance, hasEvent, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref, SetupContext } from 'vue'\nimport type {\n RouterLink as _RouterLink,\n useLink as _useLink,\n NavigationGuardNext,\n RouteLocationNormalizedLoaded,\n RouteLocationRaw,\n Router,\n UseLinkOptions,\n} from 'vue-router'\nimport type { EventProp } from '@/util'\n\nexport function useRoute (): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance('useRoute')\n\n return computed(() => vm?.proxy?.$route)\n}\n\nexport function useRouter (): Router | undefined {\n return getCurrentInstance('useRouter')?.proxy?.$router\n}\n\nexport interface LinkProps {\n href: string | undefined\n replace: boolean | undefined\n to: RouteLocationRaw | undefined\n exact: boolean | undefined\n}\n\nexport interface LinkListeners {\n onClick?: EventProp | undefined\n onClickOnce?: EventProp | undefined\n}\n\nexport interface UseLink extends Omit<Partial<ReturnType<typeof _useLink>>, 'href'> {\n isLink: ComputedRef<boolean>\n isClickable: ComputedRef<boolean>\n href: Ref<string | undefined>\n}\n\nexport function useLink (props: LinkProps & LinkListeners, attrs: SetupContext['attrs']): UseLink {\n const RouterLink = resolveDynamicComponent('RouterLink') as typeof _RouterLink | string\n\n const isLink = computed(() => !!(props.href || props.to))\n const isClickable = computed(() => {\n return isLink?.value || hasEvent(attrs, 'click') || hasEvent(props, 'click')\n })\n\n if (typeof RouterLink === 'string' || !('useLink' in RouterLink)) {\n return {\n isLink,\n isClickable,\n href: toRef(props, 'href'),\n }\n }\n // vue-router useLink `to` prop needs to be reactive and useLink will crash if undefined\n const linkProps = computed(() => ({\n ...props,\n to: toRef(() => props.to || ''),\n }))\n\n const routerLink = RouterLink.useLink(linkProps.value as UseLinkOptions)\n // Actual link needs to be undefined when to prop is not used\n const link = computed(() => props.to ? routerLink : undefined)\n const route = useRoute()\n\n return {\n isLink,\n isClickable,\n route: link.value?.route,\n navigate: link.value?.navigate,\n isActive: computed(() => {\n if (!link.value) return false\n if (!props.exact) return link.value.isActive?.value ?? false\n if (!route.value) return link.value.isExactActive?.value ?? false\n\n return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query)\n }),\n href: computed(() => props.to ? link.value?.route.value.href : props.href),\n }\n}\n\nexport const makeRouterProps = propsFactory({\n href: String,\n replace: Boolean,\n to: [String, Object] as PropType<RouteLocationRaw>,\n exact: Boolean,\n}, 'router')\n\nlet inTransition = false\nexport function useBackButton (router: Router | undefined, cb: (next: NavigationGuardNext) => void) {\n let popped = false\n let removeBefore: (() => void) | undefined\n let removeAfter: (() => void) | undefined\n\n if (IN_BROWSER) {\n nextTick(() => {\n window.addEventListener('popstate', onPopstate)\n removeBefore = router?.beforeEach((to, from, next) => {\n if (!inTransition) {\n setTimeout(() => popped ? cb(next) : next())\n } else {\n popped ? cb(next) : next()\n }\n inTransition = true\n })\n removeAfter = router?.afterEach(() => {\n inTransition = false\n })\n })\n onScopeDispose(() => {\n window.removeEventListener('popstate', onPopstate)\n removeBefore?.()\n removeAfter?.()\n })\n }\n\n function onPopstate (e: PopStateEvent) {\n if (e.state?.replaced) return\n\n popped = true\n setTimeout(() => (popped = false))\n }\n}\n"],"mappings":"AAAA;AACA,SACEA,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,uBAAuB,EACvBC,KAAK,QACA,KAAK;AAAA,SACHC,SAAS,EAAEC,kBAAkB,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,YAAY,6BAE1E;AAaA,OAAO,SAASC,QAAQA,CAAA,EAAoD;EAC1E,MAAMC,EAAE,GAAGL,kBAAkB,CAAC,UAAU,CAAC;EAEzC,OAAON,QAAQ,CAAC,MAAMW,EAAE,EAAEC,KAAK,EAAEC,MAAM,CAAC;AAC1C;AAEA,OAAO,SAASC,SAASA,CAAA,EAAwB;EAC/C,OAAOR,kBAAkB,CAAC,WAAW,CAAC,EAAEM,KAAK,EAAEG,OAAO;AACxD;AAoBA,OAAO,SAASC,OAAOA,CAAEC,KAAgC,EAAEC,KAA4B,EAAW;EAChG,MAAMC,UAAU,GAAGhB,uBAAuB,CAAC,YAAY,CAAgC;EAEvF,MAAMiB,MAAM,GAAGpB,QAAQ,CAAC,MAAM,CAAC,EAAEiB,KAAK,CAACI,IAAI,IAAIJ,KAAK,CAACK,EAAE,CAAC,CAAC;EACzD,MAAMC,WAAW,GAAGvB,QAAQ,CAAC,MAAM;IACjC,OAAOoB,MAAM,EAAEI,KAAK,IAAIjB,QAAQ,CAACW,KAAK,EAAE,OAAO,CAAC,IAAIX,QAAQ,CAACU,KAAK,EAAE,OAAO,CAAC;EAC9E,CAAC,CAAC;EAEF,IAAI,OAAOE,UAAU,KAAK,QAAQ,IAAI,EAAE,SAAS,IAAIA,UAAU,CAAC,EAAE;IAChE,OAAO;MACLC,MAAM;MACNG,WAAW;MACXF,IAAI,EAAEjB,KAAK,CAACa,KAAK,EAAE,MAAM;IAC3B,CAAC;EACH;EACA;EACA,MAAMQ,SAAS,GAAGzB,QAAQ,CAAC,O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1
+ {"version":3,"file":"router.mjs","names":["computed","nextTick","onScopeDispose","reactive","resolveDynamicComponent","toRef","deepEqual","getCurrentInstance","hasEvent","IN_BROWSER","propsFactory","useRoute","vm","proxy","$route","useRouter","$router","useLink","props","attrs","RouterLink","isLink","href","to","isClickable","value","linkProps","routerLink","link","undefined","route","isActive","exact","isExactActive","query","navigate","makeRouterProps","String","replace","Boolean","Object","inTransition","useBackButton","router","cb","popped","removeBefore","removeAfter","window","addEventListener","onPopstate","beforeEach","from","next","setTimeout","afterEach","removeEventListener","e","state","replaced"],"sources":["../../src/composables/router.tsx"],"sourcesContent":["// Utilities\nimport {\n computed,\n nextTick,\n onScopeDispose, reactive,\n resolveDynamicComponent,\n toRef,\n} from 'vue'\nimport { deepEqual, getCurrentInstance, hasEvent, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref, SetupContext } from 'vue'\nimport type {\n RouterLink as _RouterLink,\n useLink as _useLink,\n NavigationGuardNext,\n RouteLocationNormalizedLoaded,\n RouteLocationRaw,\n Router,\n UseLinkOptions,\n} from 'vue-router'\nimport type { EventProp } from '@/util'\n\nexport function useRoute (): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance('useRoute')\n\n return computed(() => vm?.proxy?.$route)\n}\n\nexport function useRouter (): Router | undefined {\n return getCurrentInstance('useRouter')?.proxy?.$router\n}\n\nexport interface LinkProps {\n href: string | undefined\n replace: boolean | undefined\n to: RouteLocationRaw | undefined\n exact: boolean | undefined\n}\n\nexport interface LinkListeners {\n onClick?: EventProp | undefined\n onClickOnce?: EventProp | undefined\n}\n\nexport interface UseLink extends Omit<Partial<ReturnType<typeof _useLink>>, 'href'> {\n isLink: ComputedRef<boolean>\n isClickable: ComputedRef<boolean>\n href: Ref<string | undefined>\n linkProps: Record<string, string | undefined>\n}\n\nexport function useLink (props: LinkProps & LinkListeners, attrs: SetupContext['attrs']): UseLink {\n const RouterLink = resolveDynamicComponent('RouterLink') as typeof _RouterLink | string\n\n const isLink = computed(() => !!(props.href || props.to))\n const isClickable = computed(() => {\n return isLink?.value || hasEvent(attrs, 'click') || hasEvent(props, 'click')\n })\n\n if (typeof RouterLink === 'string' || !('useLink' in RouterLink)) {\n const href = toRef(props, 'href')\n return {\n isLink,\n isClickable,\n href,\n linkProps: reactive({ href }),\n }\n }\n // vue-router useLink `to` prop needs to be reactive and useLink will crash if undefined\n const linkProps = computed(() => ({\n ...props,\n to: toRef(() => props.to || ''),\n }))\n\n const routerLink = RouterLink.useLink(linkProps.value as UseLinkOptions)\n // Actual link needs to be undefined when to prop is not used\n const link = computed(() => props.to ? routerLink : undefined)\n const route = useRoute()\n const isActive = computed(() => {\n if (!link.value) return false\n if (!props.exact) return link.value.isActive?.value ?? false\n if (!route.value) return link.value.isExactActive?.value ?? false\n\n return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query)\n })\n const href = computed(() => props.to ? link.value?.route.value.href : props.href)\n\n return {\n isLink,\n isClickable,\n isActive,\n route: link.value?.route,\n navigate: link.value?.navigate,\n href,\n linkProps: reactive({\n href,\n 'aria-current': computed(() => isActive.value ? 'page' : undefined),\n }),\n }\n}\n\nexport const makeRouterProps = propsFactory({\n href: String,\n replace: Boolean,\n to: [String, Object] as PropType<RouteLocationRaw>,\n exact: Boolean,\n}, 'router')\n\nlet inTransition = false\nexport function useBackButton (router: Router | undefined, cb: (next: NavigationGuardNext) => void) {\n let popped = false\n let removeBefore: (() => void) | undefined\n let removeAfter: (() => void) | undefined\n\n if (IN_BROWSER) {\n nextTick(() => {\n window.addEventListener('popstate', onPopstate)\n removeBefore = router?.beforeEach((to, from, next) => {\n if (!inTransition) {\n setTimeout(() => popped ? cb(next) : next())\n } else {\n popped ? cb(next) : next()\n }\n inTransition = true\n })\n removeAfter = router?.afterEach(() => {\n inTransition = false\n })\n })\n onScopeDispose(() => {\n window.removeEventListener('popstate', onPopstate)\n removeBefore?.()\n removeAfter?.()\n })\n }\n\n function onPopstate (e: P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GAAG,CAAC;MAChBC,WAAW,GAAG,CAAC;IACjB,CAAC,CAAC;EACJ;EAEA,SAASG,UAAUA,CAAEO,CAAgB,EAAE;IACrC,IAAIA,CAAC,CAACC,KAAK,EAAEC,QAAQ,EAAE;IAEvBd,MAAM,GAAG,IAAI;IACbS,UAAU,CAAC,MAAOT,MAAM,GAAG,KAAM,CAAC;EACpC;AACF","ignoreList":[]}
@@ -4,7 +4,7 @@ import { useDirectiveComponent } from "../../composables/directiveComponent.mjs"
4
4
  export const Tooltip = useDirectiveComponent(VTooltip, binding => {
5
5
  return {
6
6
  activator: 'parent',
7
- location: binding.arg?.replace('-', ' ') ?? 'top',
7
+ location: binding.arg?.replace('-', ' '),
8
8
  text: typeof binding.value === 'boolean' ? undefined : binding.value
9
9
  };
10
10
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["VTooltip","useDirectiveComponent","Tooltip","binding","activator","location","arg","replace","text","value","undefined"],"sources":["../../../src/directives/tooltip/index.ts"],"sourcesContent":["// Components\nimport { VTooltip } from '@/components/VTooltip'\n\n// Composables\nimport { useDirectiveComponent } from '@/composables/directiveComponent'\n\n// Types\nimport type { DirectiveBinding } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface TooltipDirectiveBinding extends Omit<DirectiveBinding<string>, 'arg' | 'value'> {\n arg?: { [T in Anchor]: T extends `${infer A} ${infer B}` ? `${A}-${B}` : T }[Anchor]\n value: boolean | string | Record<string, any>\n}\n\nexport const Tooltip = useDirectiveComponent<TooltipDirectiveBinding>(VTooltip, binding => {\n return {\n activator: 'parent',\n location: binding.arg?.replace('-', ' ') ?? 'top',\n text: typeof binding.value === 'boolean' ? undefined : binding.value,\n }\n})\n\nexport default Tooltip\n"],"mappings":"AAAA;AAAA,SACSA,QAAQ,+CAEjB;AAAA,SACSC,qBAAqB,oDAE9B;AASA,OAAO,MAAMC,OAAO,GAAGD,qBAAqB,CAA0BD,QAAQ,EAAEG,OAAO,IAAI;EACzF,OAAO;IACLC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAEF,OAAO,CAACG,GAAG,EAAEC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,KAAK;IACjDC,IAAI,EAAE,OAAOL,OAAO,CAACM,KAAK,KAAK,SAAS,GAAGC,SAAS,GAAGP,OAAO,CAACM;EACjE,CAAC;AACH,CAAC,CAAC;AAEF,eAAeP,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"index.mjs","names":["VTooltip","useDirectiveComponent","Tooltip","binding","activator","location","arg","replace","text","value","undefined"],"sources":["../../../src/directives/tooltip/index.ts"],"sourcesContent":["// Components\nimport { VTooltip } from '@/components/VTooltip'\n\n// Composables\nimport { useDirectiveComponent } from '@/composables/directiveComponent'\n\n// Types\nimport type { DirectiveBinding } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface TooltipDirectiveBinding extends Omit<DirectiveBinding<string>, 'arg' | 'value'> {\n arg?: { [T in Anchor]: T extends `${infer A} ${infer B}` ? `${A}-${B}` : T }[Anchor]\n value: boolean | string | Record<string, any>\n}\n\nexport const Tooltip = useDirectiveComponent<TooltipDirectiveBinding>(VTooltip, binding => {\n return {\n activator: 'parent',\n location: binding.arg?.replace('-', ' '),\n text: typeof binding.value === 'boolean' ? undefined : binding.value,\n }\n})\n\nexport default Tooltip\n"],"mappings":"AAAA;AAAA,SACSA,QAAQ,+CAEjB;AAAA,SACSC,qBAAqB,oDAE9B;AASA,OAAO,MAAMC,OAAO,GAAGD,qBAAqB,CAA0BD,QAAQ,EAAEG,OAAO,IAAI;EACzF,OAAO;IACLC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAEF,OAAO,CAACG,GAAG,EAAEC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;IACxCC,IAAI,EAAE,OAAOL,OAAO,CAACM,KAAK,KAAK,SAAS,GAAGC,SAAS,GAAGP,OAAO,CAACM;EACjE,CAAC;AACH,CAAC,CAAC;AAEF,eAAeP,OAAO","ignoreList":[]}
@@ -16,7 +16,7 @@ export const createVuetify = function () {
16
16
  ...options
17
17
  });
18
18
  };
19
- export const version = "3.7.1-master.2024-09-02";
19
+ export const version = "3.7.1-master.2024-09-03";
20
20
  createVuetify.version = version;
21
21
  export { blueprints, components, directives };
22
22
  export * from "./composables/index.mjs";
package/lib/framework.mjs CHANGED
@@ -97,7 +97,7 @@ export function createVuetify() {
97
97
  goTo
98
98
  };
99
99
  }
100
- export const version = "3.7.1-master.2024-09-02";
100
+ export const version = "3.7.1-master.2024-09-03";
101
101
  createVuetify.version = version;
102
102
 
103
103
  // Vue's inject() can only be used in setup
package/lib/index.d.mts CHANGED
@@ -486,24 +486,28 @@ declare module 'vue' {
486
486
  $children?: VNodeChild
487
487
  }
488
488
  export interface GlobalComponents {
489
- VAppBar: typeof import('vuetify/components')['VAppBar']
490
- VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
491
- VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
492
489
  VApp: typeof import('vuetify/components')['VApp']
490
+ VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
491
+ VAvatar: typeof import('vuetify/components')['VAvatar']
493
492
  VAlert: typeof import('vuetify/components')['VAlert']
494
493
  VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
495
- VAvatar: typeof import('vuetify/components')['VAvatar']
494
+ VAppBar: typeof import('vuetify/components')['VAppBar']
495
+ VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
496
+ VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
496
497
  VBanner: typeof import('vuetify/components')['VBanner']
497
498
  VBannerActions: typeof import('vuetify/components')['VBannerActions']
498
499
  VBannerText: typeof import('vuetify/components')['VBannerText']
499
- VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
500
500
  VBadge: typeof import('vuetify/components')['VBadge']
501
- VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
502
501
  VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
503
- VBtn: typeof import('vuetify/components')['VBtn']
504
502
  VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
505
503
  VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
506
504
  VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
505
+ VBtn: typeof import('vuetify/components')['VBtn']
506
+ VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
507
+ VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
508
+ VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
509
+ VCarousel: typeof import('vuetify/components')['VCarousel']
510
+ VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
507
511
  VCheckbox: typeof import('vuetify/components')['VCheckbox']
508
512
  VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
509
513
  VCard: typeof import('vuetify/components')['VCard']
@@ -512,25 +516,12 @@ declare module 'vue' {
512
516
  VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
513
517
  VCardText: typeof import('vuetify/components')['VCardText']
514
518
  VCardTitle: typeof import('vuetify/components')['VCardTitle']
515
- VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
516
- VCode: typeof import('vuetify/components')['VCode']
517
- VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
518
519
  VChip: typeof import('vuetify/components')['VChip']
519
- VCarousel: typeof import('vuetify/components')['VCarousel']
520
- VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
521
- VCombobox: typeof import('vuetify/components')['VCombobox']
520
+ VCode: typeof import('vuetify/components')['VCode']
522
521
  VColorPicker: typeof import('vuetify/components')['VColorPicker']
523
522
  VChipGroup: typeof import('vuetify/components')['VChipGroup']
524
- VDataTable: typeof import('vuetify/components')['VDataTable']
525
- VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
526
- VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
527
- VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
528
- VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
529
- VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
530
- VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
531
- VEmptyState: typeof import('vuetify/components')['VEmptyState']
523
+ VCombobox: typeof import('vuetify/components')['VCombobox']
532
524
  VCounter: typeof import('vuetify/components')['VCounter']
533
- VDialog: typeof import('vuetify/components')['VDialog']
534
525
  VDatePicker: typeof import('vuetify/components')['VDatePicker']
535
526
  VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
536
527
  VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
@@ -538,24 +529,35 @@ declare module 'vue' {
538
529
  VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
539
530
  VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
540
531
  VDivider: typeof import('vuetify/components')['VDivider']
532
+ VDataTable: typeof import('vuetify/components')['VDataTable']
533
+ VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
534
+ VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
535
+ VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
536
+ VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
537
+ VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
538
+ VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
541
539
  VFab: typeof import('vuetify/components')['VFab']
542
- VField: typeof import('vuetify/components')['VField']
543
- VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
540
+ VEmptyState: typeof import('vuetify/components')['VEmptyState']
541
+ VDialog: typeof import('vuetify/components')['VDialog']
544
542
  VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
545
543
  VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
546
544
  VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
547
545
  VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
548
- VFooter: typeof import('vuetify/components')['VFooter']
549
546
  VFileInput: typeof import('vuetify/components')['VFileInput']
547
+ VField: typeof import('vuetify/components')['VField']
548
+ VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
550
549
  VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
551
550
  VIcon: typeof import('vuetify/components')['VIcon']
552
551
  VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
553
552
  VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
554
553
  VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
555
554
  VClassIcon: typeof import('vuetify/components')['VClassIcon']
555
+ VItemGroup: typeof import('vuetify/components')['VItemGroup']
556
+ VItem: typeof import('vuetify/components')['VItem']
557
+ VFooter: typeof import('vuetify/components')['VFooter']
556
558
  VImg: typeof import('vuetify/components')['VImg']
557
- VInput: typeof import('vuetify/components')['VInput']
558
559
  VKbd: typeof import('vuetify/components')['VKbd']
560
+ VInput: typeof import('vuetify/components')['VInput']
559
561
  VList: typeof import('vuetify/components')['VList']
560
562
  VListGroup: typeof import('vuetify/components')['VListGroup']
561
563
  VListImg: typeof import('vuetify/components')['VListImg']
@@ -566,34 +568,26 @@ declare module 'vue' {
566
568
  VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
567
569
  VListSubheader: typeof import('vuetify/components')['VListSubheader']
568
570
  VLabel: typeof import('vuetify/components')['VLabel']
569
- VItemGroup: typeof import('vuetify/components')['VItemGroup']
570
- VItem: typeof import('vuetify/components')['VItem']
571
- VMain: typeof import('vuetify/components')['VMain']
572
- VMessages: typeof import('vuetify/components')['VMessages']
571
+ VMenu: typeof import('vuetify/components')['VMenu']
573
572
  VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
573
+ VMain: typeof import('vuetify/components')['VMain']
574
574
  VOtpInput: typeof import('vuetify/components')['VOtpInput']
575
- VMenu: typeof import('vuetify/components')['VMenu']
575
+ VMessages: typeof import('vuetify/components')['VMessages']
576
+ VOverlay: typeof import('vuetify/components')['VOverlay']
576
577
  VPagination: typeof import('vuetify/components')['VPagination']
577
578
  VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
578
- VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
579
- VOverlay: typeof import('vuetify/components')['VOverlay']
579
+ VRating: typeof import('vuetify/components')['VRating']
580
580
  VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
581
+ VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
581
582
  VSelect: typeof import('vuetify/components')['VSelect']
582
- VRating: typeof import('vuetify/components')['VRating']
583
- VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
584
583
  VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
584
+ VSheet: typeof import('vuetify/components')['VSheet']
585
+ VSlider: typeof import('vuetify/components')['VSlider']
586
+ VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
587
+ VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
585
588
  VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
586
589
  VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
587
- VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
588
- VSheet: typeof import('vuetify/components')['VSheet']
589
590
  VSnackbar: typeof import('vuetify/components')['VSnackbar']
590
- VSystemBar: typeof import('vuetify/components')['VSystemBar']
591
- VTable: typeof import('vuetify/components')['VTable']
592
- VTab: typeof import('vuetify/components')['VTab']
593
- VTabs: typeof import('vuetify/components')['VTabs']
594
- VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
595
- VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
596
- VSlider: typeof import('vuetify/components')['VSlider']
597
591
  VStepper: typeof import('vuetify/components')['VStepper']
598
592
  VStepperActions: typeof import('vuetify/components')['VStepperActions']
599
593
  VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
@@ -601,6 +595,13 @@ declare module 'vue' {
601
595
  VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
602
596
  VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
603
597
  VSwitch: typeof import('vuetify/components')['VSwitch']
598
+ VSystemBar: typeof import('vuetify/components')['VSystemBar']
599
+ VTextarea: typeof import('vuetify/components')['VTextarea']
600
+ VTable: typeof import('vuetify/components')['VTable']
601
+ VTab: typeof import('vuetify/components')['VTab']
602
+ VTabs: typeof import('vuetify/components')['VTabs']
603
+ VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
604
+ VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
604
605
  VTextField: typeof import('vuetify/components')['VTextField']
605
606
  VTimeline: typeof import('vuetify/components')['VTimeline']
606
607
  VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
@@ -610,10 +611,9 @@ declare module 'vue' {
610
611
  VTooltip: typeof import('vuetify/components')['VTooltip']
611
612
  VWindow: typeof import('vuetify/components')['VWindow']
612
613
  VWindowItem: typeof import('vuetify/components')['VWindowItem']
613
- VTextarea: typeof import('vuetify/components')['VTextarea']
614
614
  VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
615
- VDataIterator: typeof import('vuetify/components')['VDataIterator']
616
615
  VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
616
+ VDataIterator: typeof import('vuetify/components')['VDataIterator']
617
617
  VForm: typeof import('vuetify/components')['VForm']
618
618
  VContainer: typeof import('vuetify/components')['VContainer']
619
619
  VCol: typeof import('vuetify/components')['VCol']
@@ -632,8 +632,8 @@ declare module 'vue' {
632
632
  VSparkline: typeof import('vuetify/components')['VSparkline']
633
633
  VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
634
634
  VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
635
- VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
636
635
  VValidation: typeof import('vuetify/components')['VValidation']
636
+ VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
637
637
  VFabTransition: typeof import('vuetify/components')['VFabTransition']
638
638
  VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
639
639
  VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
@@ -650,21 +650,21 @@ declare module 'vue' {
650
650
  VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
651
651
  VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
652
652
  VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
653
+ VPicker: typeof import('vuetify/labs/components')['VPicker']
654
+ VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
655
+ VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
653
656
  VCalendar: typeof import('vuetify/labs/components')['VCalendar']
654
657
  VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
655
658
  VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
656
659
  VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
657
660
  VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
658
661
  VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
659
- VPicker: typeof import('vuetify/labs/components')['VPicker']
660
- VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
661
- VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
662
- VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
663
- VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
664
- VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
665
662
  VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
666
663
  VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
667
664
  VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
665
+ VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
666
+ VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
667
+ VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
668
668
  VTreeview: typeof import('vuetify/labs/components')['VTreeview']
669
669
  VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
670
670
  VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vuetify/nightly",
3
3
  "description": "Vue Material Component Framework",
4
- "version": "3.7.1-master.2024-09-02",
4
+ "version": "3.7.1-master.2024-09-03",
5
5
  "author": {
6
6
  "name": "John Leider",
7
7
  "email": "john@vuetifyjs.com"