Skip to content

Commit 9c83c19

Browse files
authored
Merge pull request #14931 from TylerAPfledderer/refactor/remove-chakra-all
[ShadCN]: remove Chakra Provider and Dependencies
2 parents 9a82216 + c9666c5 commit 9c83c19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+25
-4010
lines changed

.eslintrc.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
// Packages. `react` related packages come first.
2424
// Also, put `react-icons` in sorting order not with `react`
2525
["^react(?!-.)$", "^\\w", "^@\\w"],
26-
// The Chakra theme directory if imported to story file or other places
27-
["^@/@chakra-ui"],
2826
// From the `types` directory.
2927
["^@/lib/types", "^@/lib/interfaces"],
3028
// From the `components` directory.

.github/workflows/chromatic.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- "src/components/**/*"
1616
- "src/pages/**/*"
1717
- "src/layouts/**/*"
18-
- "src/@chakra-ui/**/*"
1918
- ".storybook/**/*"
2019
- "tailwind.config.ts"
2120
- "src/styles/**/*"

.storybook/ChakraDecorator.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

.storybook/main.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin"
2-
import { propNames } from "@chakra-ui/react"
32
import type { StorybookConfig } from "@storybook/nextjs"
43

54
/**
@@ -41,11 +40,6 @@ const config: StorybookConfig = {
4140
docs: {
4241
autodocs: "tag",
4342
},
44-
refs: {
45-
"@chakra-ui/react": {
46-
disable: true,
47-
},
48-
},
4943
webpackFinal: async (config) => {
5044
config.module = config.module || {}
5145
config.module.rules = config.module.rules || []
@@ -79,23 +73,6 @@ const config: StorybookConfig = {
7973
typescript: {
8074
reactDocgenTypescriptOptions: {
8175
shouldExtractLiteralValuesFromEnum: true,
82-
/**
83-
* For handling bloated controls table of Chakra Props
84-
*
85-
* https://github.com/chakra-ui/chakra-ui/issues/2009#issuecomment-852793946
86-
*/
87-
propFilter: (prop) => {
88-
const excludedPropNames = propNames.concat([
89-
"as",
90-
"apply",
91-
"sx",
92-
"__css",
93-
])
94-
const isStyledSystemProp = excludedPropNames.includes(prop.name)
95-
const isHTMLElementProp =
96-
prop.parent?.fileName.includes("node_modules") ?? false
97-
return !(isStyledSystemProp || isHTMLElementProp)
98-
},
9976
},
10077

10178
reactDocgen: "react-docgen-typescript",

.storybook/types.ts

Lines changed: 0 additions & 83 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"private": true,
66
"scripts": {
77
"dev": "next dev",
8-
"postinstall": "yarn theme",
98
"build": "next build",
109
"postbuild": "next-sitemap",
1110
"start": "next start",
@@ -23,16 +22,11 @@
2322
"markdown-checker": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/markdownChecker.ts",
2423
"events-import": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/events-import.ts",
2524
"crowdin-needs-review": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/crowdin/reports/generateReviewReport.ts",
26-
"theme": "chakra-cli tokens ./src/@chakra-ui/theme.ts",
27-
"theme:watch": "chakra-cli tokens ./src/@chakra-ui/theme.ts --watch",
2825
"prepare": "husky"
2926
},
3027
"dependencies": {
31-
"@chakra-ui/react": "^2.8.0",
3228
"@crowdin/crowdin-api-client": "^1.25.0",
3329
"@docsearch/react": "^3.5.2",
34-
"@emotion/react": "^11.11.1",
35-
"@emotion/styled": "^11.11.0",
3630
"@hookform/resolvers": "^3.8.0",
3731
"@next/bundle-analyzer": "^14.2.5",
3832
"@radix-ui/react-accordion": "^1.2.0",
@@ -96,7 +90,6 @@
9690
"yaml-loader": "^0.8.0"
9791
},
9892
"devDependencies": {
99-
"@chakra-ui/cli": "^2.4.1",
10093
"@chromatic-com/storybook": "1.5.0",
10194
"@netlify/plugin-nextjs": "^5.8.0",
10295
"@storybook/addon-essentials": "8.1.10",
@@ -150,4 +143,4 @@
150143
"jackspeak": "2.1.1",
151144
"sharp": "0.32.6"
152145
}
153-
}
146+
}

src/@chakra-ui/components/Accordion.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/@chakra-ui/components/Avatar.ts

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)