Skip to content

Commit 6db0256

Browse files
authored
Merge branch 'dev' into patch-1
2 parents f6bc457 + d643373 commit 6db0256

File tree

415 files changed

+19136
-9142
lines changed

Some content is hidden

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

415 files changed

+19136
-9142
lines changed

.all-contributorsrc

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9828,6 +9828,169 @@
98289828
"contributions": [
98299829
"content"
98309830
]
9831+
},
9832+
{
9833+
"login": "danceratopz",
9834+
"name": "Dan",
9835+
"avatar_url": "https://avatars.githubusercontent.com/u/91727015?v=4",
9836+
"profile": "https://github.com/danceratopz",
9837+
"contributions": [
9838+
"content"
9839+
]
9840+
},
9841+
{
9842+
"login": "Dev-Liz",
9843+
"name": "Elizabeth Bassey",
9844+
"avatar_url": "https://avatars.githubusercontent.com/u/40176275?v=4",
9845+
"profile": "https://dribbble.com/Liz-B",
9846+
"contributions": [
9847+
"content"
9848+
]
9849+
},
9850+
{
9851+
"login": "mihaic01",
9852+
"name": "mihaic01",
9853+
"avatar_url": "https://avatars.githubusercontent.com/u/108999659?v=4",
9854+
"profile": "https://github.com/mihaic01",
9855+
"contributions": [
9856+
"content"
9857+
]
9858+
},
9859+
{
9860+
"login": "qiuhaohao",
9861+
"name": "qiuhaohao",
9862+
"avatar_url": "https://avatars.githubusercontent.com/u/22148367?v=4",
9863+
"profile": "https://github.com/qiuhaohao",
9864+
"contributions": [
9865+
"content"
9866+
]
9867+
},
9868+
{
9869+
"login": "debeldami",
9870+
"name": "damilola debel",
9871+
"avatar_url": "https://avatars.githubusercontent.com/u/44111962?v=4",
9872+
"profile": "https://github.com/debeldami",
9873+
"contributions": [
9874+
"content"
9875+
]
9876+
},
9877+
{
9878+
"login": "SaratAngajalaoffl",
9879+
"name": "Sarat Angajala",
9880+
"avatar_url": "https://avatars.githubusercontent.com/u/60383339?v=4",
9881+
"profile": "https://github.com/SaratAngajalaoffl",
9882+
"contributions": [
9883+
"doc"
9884+
]
9885+
},
9886+
{
9887+
"login": "questions",
9888+
"name": "questions",
9889+
"avatar_url": "https://avatars.githubusercontent.com/u/3233328?v=4",
9890+
"profile": "https://github.com/Questions",
9891+
"contributions": [
9892+
"projectManagement",
9893+
"question"
9894+
]
9895+
},
9896+
{
9897+
"login": "machin3boy",
9898+
"name": "machin3boy",
9899+
"avatar_url": "https://avatars.githubusercontent.com/u/78896694?v=4",
9900+
"profile": "https://github.com/machin3boy",
9901+
"contributions": [
9902+
"content"
9903+
]
9904+
},
9905+
{
9906+
"login": "nsexer",
9907+
"name": "nethan",
9908+
"avatar_url": "https://avatars.githubusercontent.com/u/30265113?v=4",
9909+
"profile": "https://github.com/nsexer",
9910+
"contributions": [
9911+
"content"
9912+
]
9913+
},
9914+
{
9915+
"login": "MrJithil",
9916+
"name": "Jithil P Ponnan",
9917+
"avatar_url": "https://avatars.githubusercontent.com/u/26359740?v=4",
9918+
"profile": "https://www.linkedin.com/in/jithil",
9919+
"contributions": [
9920+
"doc"
9921+
]
9922+
},
9923+
{
9924+
"login": "chocolatesuit",
9925+
"name": "chocolatesuit",
9926+
"avatar_url": "https://avatars.githubusercontent.com/u/120116662?v=4",
9927+
"profile": "https://github.com/chocolatesuit",
9928+
"contributions": [
9929+
"content"
9930+
]
9931+
},
9932+
{
9933+
"login": "apinanyogaratnam",
9934+
"name": "Apinan Yogaratnam",
9935+
"avatar_url": "https://avatars.githubusercontent.com/u/72412733?v=4",
9936+
"profile": "http://apinanyogaratnam.github.io/my-personal-website-v2.0/",
9937+
"contributions": [
9938+
"content"
9939+
]
9940+
},
9941+
{
9942+
"login": "trevorsc19",
9943+
"name": "trevorsc19",
9944+
"avatar_url": "https://avatars.githubusercontent.com/u/30576577?v=4",
9945+
"profile": "http://trevorscanlon.eth.xyz",
9946+
"contributions": [
9947+
"content"
9948+
]
9949+
},
9950+
{
9951+
"login": "thouravi",
9952+
"name": "ImThour",
9953+
"avatar_url": "https://avatars.githubusercontent.com/u/15676184?v=4",
9954+
"profile": "https://github.com/thouravi",
9955+
"contributions": [
9956+
"code"
9957+
]
9958+
},
9959+
{
9960+
"login": "nvitorovic",
9961+
"name": "Nenad Vitorović",
9962+
"avatar_url": "https://avatars.githubusercontent.com/u/3808837?v=4",
9963+
"profile": "https://github.com/nvitorovic",
9964+
"contributions": [
9965+
"content"
9966+
]
9967+
},
9968+
{
9969+
"login": "danierod",
9970+
"name": "danierod",
9971+
"avatar_url": "https://avatars.githubusercontent.com/u/12255235?v=4",
9972+
"profile": "https://github.com/danierod",
9973+
"contributions": [
9974+
"code"
9975+
]
9976+
},
9977+
{
9978+
"login": "siddtheone",
9979+
"name": "siddtheone",
9980+
"avatar_url": "https://avatars.githubusercontent.com/u/45398971?v=4",
9981+
"profile": "https://github.com/siddtheone",
9982+
"contributions": [
9983+
"content"
9984+
]
9985+
},
9986+
{
9987+
"login": "ShawkiS",
9988+
"name": "Shawki Sukkar",
9989+
"avatar_url": "https://avatars.githubusercontent.com/u/57439827?v=4",
9990+
"profile": "http://shawkisukkar.com/",
9991+
"contributions": [
9992+
"content"
9993+
]
98319994
}
98329995
],
98339996
"contributorsPerLine": 7,

.storybook/main.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
const { propNames } = require("@chakra-ui/react")
2+
3+
module.exports = {
4+
stories: [
5+
{
6+
directory: "../src/components",
7+
titlePrefix: "Components",
8+
files: "**/*.stories.tsx",
9+
},
10+
],
11+
addons: [
12+
"@storybook/addon-links",
13+
"@storybook/addon-essentials",
14+
"@storybook/addon-interactions",
15+
// https://storybook.js.org/addons/@storybook/addon-a11y/
16+
"@storybook/addon-a11y",
17+
"@chakra-ui/storybook-addon",
18+
],
19+
framework: "@storybook/react",
20+
refs: {
21+
"@chakra-ui/react": {
22+
disable: true,
23+
},
24+
},
25+
core: {
26+
builder: "webpack5",
27+
},
28+
features: {
29+
storyStoreV7: true,
30+
emotionAlias: false,
31+
},
32+
webpackFinal: async (config) => {
33+
// Transpile Gatsby module because Gatsby includes un-transpiled ES6 code.
34+
config.module.rules[0].exclude = [
35+
/node_modules\/(?!(gatsby|gatsby-script)\/)/,
36+
]
37+
// Remove core-js to prevent issues with Storybook
38+
config.module.rules[0].exclude = [/core-js/]
39+
// Use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
40+
config.module.rules[0].use[0].options.plugins.push(
41+
require.resolve("babel-plugin-remove-graphql-queries")
42+
)
43+
config.resolve.mainFields = ["browser", "module", "main"]
44+
return config
45+
},
46+
typescript: {
47+
check: false,
48+
checkOptions: {},
49+
reactDocgen: "react-docgen-typescript",
50+
reactDocgenTypescriptOptions: {
51+
compilerOptions: {
52+
allowSyntheticDefaultImports: false,
53+
esModuleInterop: false,
54+
},
55+
shouldExtractLiteralValuesFromEnum: true,
56+
/**
57+
* For handling bloated controls table of Chakra Props
58+
*
59+
* https://github.com/chakra-ui/chakra-ui/issues/2009#issuecomment-852793946
60+
*/
61+
propFilter: (prop) => {
62+
const excludedPropNames = propNames.concat([
63+
"as",
64+
"apply",
65+
"sx",
66+
"__css",
67+
])
68+
const isStyledSystemProp = excludedPropNames.includes(prop.name)
69+
const isHTMLElementProp =
70+
prop.parent?.fileName.includes("node_modules") ?? false
71+
return !(isStyledSystemProp || isHTMLElementProp)
72+
},
73+
},
74+
},
75+
}

.storybook/preview.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { action } from "@storybook/addon-actions"
2+
import theme from "../src/@chakra-ui/gatsby-plugin/theme"
3+
import { theme as DefaultChakraTheme } from "@chakra-ui/react"
4+
5+
const chakraBreakpointArray = Object.entries(DefaultChakraTheme.breakpoints)
6+
7+
// Gatsby's Link overrides:
8+
// Gatsby Link calls the `enqueue` & `hovering` methods on the global variable ___loader.
9+
// This global object isn't set in storybook context, requiring you to override it to empty functions (no-op),
10+
// so Gatsby Link doesn't throw errors.
11+
global.___loader = {
12+
enqueue: () => {},
13+
hovering: () => {},
14+
}
15+
// This global variable prevents the "__BASE_PATH__ is not defined" error inside Storybook.
16+
global.__BASE_PATH__ = "/"
17+
18+
// Navigating through a gatsby app using gatsby-link or any other gatsby component will use the `___navigate` method.
19+
// In Storybook, it makes more sense to log an action than doing an actual navigate. Check out the actions addon docs for more info: https://storybook.js.org/docs/react/essentials/actions
20+
21+
// @ts-ignore
22+
window.___navigate = (pathname) => {
23+
action("NavigateTo:")(pathname)
24+
}
25+
26+
export const parameters = {
27+
actions: { argTypesRegex: "^on[A-Z].*" },
28+
controls: {
29+
matchers: {
30+
color: /(background|color)$/i,
31+
date: /Date$/,
32+
},
33+
},
34+
chakra: {
35+
theme,
36+
},
37+
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints)
38+
viewport: {
39+
viewports: chakraBreakpointArray.reduce((prevVal, currVal) => {
40+
const [token, key] = currVal
41+
42+
// Unnecessary breakpoint
43+
if (token === "base") return { ...prevVal }
44+
45+
return {
46+
...prevVal,
47+
[token]: {
48+
name: token,
49+
styles: {
50+
width: key,
51+
height: "600px",
52+
},
53+
},
54+
}
55+
}, {}),
56+
},
57+
}

0 commit comments

Comments
 (0)