Skip to content

Commit

Permalink
fix: remove circular imports
Browse files Browse the repository at this point in the history
fixes #19852
  • Loading branch information
KaelWD committed May 23, 2024
1 parent 407585d commit 957b4bc
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Components
import { VExpansionPanelSymbol } from './VExpansionPanels'
import { VExpansionPanelSymbol } from './shared'
import { makeVExpansionPanelTextProps, VExpansionPanelText } from './VExpansionPanelText'
import { makeVExpansionPanelTitleProps, VExpansionPanelTitle } from './VExpansionPanelTitle'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Components
import { VExpansionPanelSymbol } from './VExpansionPanels'
import { VExpansionPanelSymbol } from './shared'
import { VExpandTransition } from '@/components/transitions'

// Composables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Components
import { VExpansionPanelSymbol } from './VExpansionPanels'
import { VExpansionPanelSymbol } from './shared'
import { VIcon } from '@/components/VIcon'

// Composables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import './VExpansionPanel.sass'

// Components
import { VExpansionPanelSymbol } from './shared'
import { makeVExpansionPanelProps } from './VExpansionPanel'

// Composables
Expand All @@ -14,10 +15,7 @@ import { computed, toRef } from 'vue'
import { genericComponent, propsFactory, useRender } from '@/util'

// Types
import type { InjectionKey, PropType } from 'vue'
import type { GroupItemProvide } from '@/composables/group'

export const VExpansionPanelSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-expansion-panel')
import type { PropType } from 'vue'

const allowedVariants = ['default', 'accordion', 'inset', 'popout'] as const

Expand Down
5 changes: 5 additions & 0 deletions packages/vuetify/src/components/VExpansionPanel/shared.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Types
import type { InjectionKey } from 'vue'
import type { GroupItemProvide } from '@/composables/group'

export const VExpansionPanelSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-expansion-panel')
6 changes: 2 additions & 4 deletions packages/vuetify/src/components/VStepper/VStepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import './VStepper.sass'

// Components
import { VStepperSymbol } from './shared'
import { makeVStepperActionsProps, VStepperActions } from './VStepperActions'
import { VStepperHeader } from './VStepperHeader'
import { VStepperItem } from './VStepperItem'
Expand All @@ -19,11 +20,8 @@ import { computed, toRefs } from 'vue'
import { genericComponent, getPropertyFromItem, only, propsFactory, useRender } from '@/util'

// Types
import type { InjectionKey, PropType } from 'vue'
import type { PropType } from 'vue'
import type { StepperItem, StepperItemSlot } from './VStepperItem'
import type { GroupItemProvide } from '@/composables/group'

export const VStepperSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-stepper')

export type VStepperSlot = {
prev: () => void
Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VStepper/VStepperItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Ripple } from '@/directives/ripple'

// Utilities
import { computed } from 'vue'
import { VStepperSymbol } from './VStepper'
import { VStepperSymbol } from './shared'
import { genericComponent, propsFactory, useRender } from '@/util'

// Types
Expand Down
7 changes: 1 addition & 6 deletions packages/vuetify/src/components/VStepper/VStepperWindow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Components
import { VStepperSymbol } from './shared'
import { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'

// Composables
Expand All @@ -8,12 +9,6 @@ import { useProxiedModel } from '@/composables/proxiedModel'
import { computed, inject } from 'vue'
import { genericComponent, omit, propsFactory, useRender } from '@/util'

// Types
import type { InjectionKey } from 'vue'
import type { GroupProvide } from '@/composables/group'

export const VStepperSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-stepper')

export const makeVStepperWindowProps = propsFactory({
...omit(makeVWindowProps(), ['continuous', 'nextIcon', 'prevIcon', 'showArrows', 'touch', 'mandatory']),
}, 'VStepperWindow')
Expand Down
5 changes: 5 additions & 0 deletions packages/vuetify/src/components/VStepper/shared.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Types
import type { InjectionKey } from 'vue'
import type { GroupProvide } from '@/composables/group'

export const VStepperSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-stepper')
4 changes: 3 additions & 1 deletion packages/vuetify/src/composables/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Utilities
import { computed, inject, provide, ref, shallowRef, unref, watchEffect } from 'vue'
import { getCurrentInstance, injectSelf, mergeDeep, toKebabCase } from '@/util'
import { getCurrentInstance } from '@/util/getCurrentInstance'
import { mergeDeep, toKebabCase } from '@/util/helpers'
import { injectSelf } from '@/util/injectSelf'

// Types
import type { ComputedRef, InjectionKey, Ref, VNode } from 'vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import './VStepperVerticalItem.sass'
import { VStepperVerticalActions } from './VStepperVerticalActions'
import { VAvatar } from '@/components/VAvatar/VAvatar'
import { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'
import { VExpansionPanel } from '@/components/VExpansionPanel'
import { makeVExpansionPanelProps } from '@/components/VExpansionPanel/VExpansionPanel'
import { makeVExpansionPanelProps, VExpansionPanel } from '@/components/VExpansionPanel/VExpansionPanel'
import { VIcon } from '@/components/VIcon/VIcon'
import { makeStepperItemProps } from '@/components/VStepper/VStepperItem'

Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/labs/VTreeview/VTreeviewItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import './VTreeviewItem.sass'
import { VBtn } from '@/components/VBtn'
import { VListItemAction } from '@/components/VList'
import { makeVListItemProps, VListItem } from '@/components/VList/VListItem'
import { VProgressCircular } from '@/components/VProgressCircular'

// Composables
import { IconValue } from '@/composables/icons'
Expand All @@ -16,7 +17,6 @@ import { genericComponent, propsFactory, useRender } from '@/util'

// Types
import { VTreeviewSymbol } from './shared'
import { VProgressCircular } from '../allComponents'
import type { VListItemSlots } from '@/components/VList/VListItem'

export const makeVTreeviewItemProps = propsFactory({
Expand Down

0 comments on commit 957b4bc

Please sign in to comment.