Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 41209a6

Browse files
committed
build(icon): fix dependency cycle
1 parent 9669276 commit 41209a6

File tree

12 files changed

+14
-23
lines changed

12 files changed

+14
-23
lines changed

packages/c-accordion/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types"
2020
},
2121
"dependencies": {
22-
"@chakra-ui/vue-system": "1.0.0"
22+
"@chakra-ui/vue-system": "*"
2323
}
2424
}

packages/c-alert/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
},
2626
"dependencies": {
2727
"@chakra-ui/styled-system": "^1.4.1",
28-
"@chakra-ui/vue-system": "1.0.0"
28+
"@chakra-ui/vue-system": "*"
2929
}
3030
}

packages/c-button/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types"
2020
},
2121
"dependencies": {
22-
"@chakra-ui/vue-system": "1.0.0"
22+
"@chakra-ui/vue-system": "*"
2323
}
2424
}

packages/c-icon/src/icon.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import { h, defineComponent, PropType, computed, inject } from 'vue'
2-
import {
3-
chakra,
4-
DOMElements,
5-
StyleAndHTMLAttibutes,
6-
} from '@chakra-ui/vue-system'
7-
import { InternalIcon } from './icon.internals'
8-
import internalIcons from './icon.internals'
2+
import { chakra, DOMElements } from '@chakra-ui/vue-system'
93

10-
const fallbackIcon: InternalIcon = {
4+
const fallbackIcon = {
115
path: `
126
<g stroke="currentColor" strokeWidth="1.5">
137
<path
@@ -43,7 +37,7 @@ export const CIcon = defineComponent({
4337
setup(props, { slots, attrs }) {
4438
const icons = inject<Record<string, any>>('$chakraIcons')
4539
const icon = computed(() => icons?.[props?.name as string] || fallbackIcon)
46-
const vnodeProps = computed<StyleAndHTMLAttibutes>(() => ({
40+
const vnodeProps = computed(() => ({
4741
w: props.size,
4842
h: props.size,
4943
display: 'inline-block',

packages/c-icon/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
export * from './icon'
2-
export { default as internalIcons } from './icon.internals'
3-
export * from './icon.internals'

packages/c-theme-provider/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"watch:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types --watch"
2424
},
2525
"dependencies": {
26-
"@chakra-ui/vue-next": "^1.0.0"
26+
"@chakra-ui/vue-next": "*"
2727
}
2828
}

packages/core/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
},
2525
"dependencies": {
2626
"@chakra-ui/vue-theme": "*",
27-
"@chakra-ui/vue-utils": "*",
28-
"@chakra-ui/c-icon": "*"
27+
"@chakra-ui/vue-utils": "*"
2928
}
3029
}

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Plugin } from 'vue'
22
import defaultTheme, { ColorMode } from '@chakra-ui/vue-theme'
3-
import { internalIcons } from '@chakra-ui/c-icon'
3+
import internalIcons from './icon.internals'
44
import { extendTheme, ThemeOverride } from './extend-theme'
55
import { MergedIcons, parseIcons } from './parse-icons'
66

packages/system/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
},
2222
"dependencies": {
2323
"@chakra-ui/styled-system": "^1.4.1",
24-
"@chakra-ui/vue-next": "^1.0.0",
25-
"@chakra-ui/vue-theme": "^1.0.0",
26-
"@chakra-ui/vue-utils": "^1.0.0",
24+
"@chakra-ui/vue-next": "*",
25+
"@chakra-ui/vue-theme": "*",
26+
"@chakra-ui/vue-utils": "*",
2727
"lodash.camelcase": "^4.3.0",
2828
"lodash.kebabcase": "^4.1.1"
2929
},

0 commit comments

Comments
 (0)