Skip to content

Commit 5b7b092

Browse files
committed
Merge branch 'dev' into pr/8726
2 parents 852a938 + ae99e17 commit 5b7b092

File tree

751 files changed

+56298
-27115
lines changed

Some content is hidden

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

751 files changed

+56298
-27115
lines changed

.all-contributorsrc

Lines changed: 194 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7313,7 +7313,8 @@
73137313
"avatar_url": "https://avatars.githubusercontent.com/u/70309026?v=4",
73147314
"profile": "https://github.com/LuozhuZhang",
73157315
"contributions": [
7316-
"doc"
7316+
"doc",
7317+
"ideas"
73177318
]
73187319
},
73197320
{
@@ -9662,6 +9663,198 @@
96629663
"contributions": [
96639664
"doc"
96649665
]
9666+
},
9667+
{
9668+
"login": "armgp",
9669+
"name": "Abhiram G P",
9670+
"avatar_url": "https://avatars.githubusercontent.com/u/49094298?v=4",
9671+
"profile": "https://github.com/armgp",
9672+
"contributions": [
9673+
"code"
9674+
]
9675+
},
9676+
{
9677+
"login": "aelmanaa",
9678+
"name": "Amine E.",
9679+
"avatar_url": "https://avatars.githubusercontent.com/u/4503543?v=4",
9680+
"profile": "https://github.com/aelmanaa",
9681+
"contributions": [
9682+
"doc"
9683+
]
9684+
},
9685+
{
9686+
"login": "Roshan-R",
9687+
"name": "Roshan R Chandar",
9688+
"avatar_url": "https://avatars.githubusercontent.com/u/43182697?v=4",
9689+
"profile": "https://roshan.ml/",
9690+
"contributions": [
9691+
"doc"
9692+
]
9693+
},
9694+
{
9695+
"login": "mossow",
9696+
"name": "mossow",
9697+
"avatar_url": "https://avatars.githubusercontent.com/u/9072132?v=4",
9698+
"profile": "https://github.com/mossow",
9699+
"contributions": [
9700+
"doc"
9701+
]
9702+
},
9703+
{
9704+
"login": "OpenWJY",
9705+
"name": "yujingwei",
9706+
"avatar_url": "https://avatars.githubusercontent.com/u/29328336?v=4",
9707+
"profile": "https://github.com/OpenWJY",
9708+
"contributions": [
9709+
"doc"
9710+
]
9711+
},
9712+
{
9713+
"login": "Olshansk",
9714+
"name": "Daniel Olshansky",
9715+
"avatar_url": "https://avatars.githubusercontent.com/u/1892194?v=4",
9716+
"profile": "http://olshansky.info",
9717+
"contributions": [
9718+
"doc",
9719+
"ideas"
9720+
]
9721+
},
9722+
{
9723+
"login": "aguzmant103",
9724+
"name": "aguzmant103",
9725+
"avatar_url": "https://avatars.githubusercontent.com/u/67167307?v=4",
9726+
"profile": "https://github.com/aguzmant103",
9727+
"contributions": [
9728+
"doc"
9729+
]
9730+
},
9731+
{
9732+
"login": "soheil555",
9733+
"name": "Soheil",
9734+
"avatar_url": "https://avatars.githubusercontent.com/u/22212139?v=4",
9735+
"profile": "https://soheil.vercel.app/",
9736+
"contributions": [
9737+
"code"
9738+
]
9739+
},
9740+
{
9741+
"login": "metadiver",
9742+
"name": "metadiver.eth",
9743+
"avatar_url": "https://avatars.githubusercontent.com/u/75746881?v=4",
9744+
"profile": "http://linktr.ee/metadiver",
9745+
"contributions": [
9746+
"code"
9747+
]
9748+
},
9749+
{
9750+
"login": "nuclearfalcon",
9751+
"name": "Jacob",
9752+
"avatar_url": "https://avatars.githubusercontent.com/u/12568736?v=4",
9753+
"profile": "https://github.com/nuclearfalcon",
9754+
"contributions": [
9755+
"ideas",
9756+
"doc"
9757+
]
9758+
},
9759+
{
9760+
"login": "theSamPadilla",
9761+
"name": "Sam Padilla",
9762+
"avatar_url": "https://avatars.githubusercontent.com/u/35386211?v=4",
9763+
"profile": "https://github.com/theSamPadilla",
9764+
"contributions": [
9765+
"doc"
9766+
]
9767+
},
9768+
{
9769+
"login": "terasum",
9770+
"name": "Chen Quan",
9771+
"avatar_url": "https://avatars.githubusercontent.com/u/20042193?v=4",
9772+
"profile": "https://chenquan.me",
9773+
"contributions": [
9774+
"doc",
9775+
"translation"
9776+
]
9777+
},
9778+
{
9779+
"login": "Marcelixoo",
9780+
"name": "Marcelo T. dos Santos",
9781+
"avatar_url": "https://avatars.githubusercontent.com/u/29285152?v=4",
9782+
"profile": "http://marcelixoo.com",
9783+
"contributions": [
9784+
"code"
9785+
]
9786+
},
9787+
{
9788+
"login": "NoahSchick",
9789+
"name": "NoahSchick",
9790+
"avatar_url": "https://avatars.githubusercontent.com/u/43729013?v=4",
9791+
"profile": "https://github.com/NoahSchick",
9792+
"contributions": [
9793+
"ideas"
9794+
]
9795+
},
9796+
{
9797+
"login": "Joeysantoro",
9798+
"name": "Joey",
9799+
"avatar_url": "https://avatars.githubusercontent.com/u/31974730?v=4",
9800+
"profile": "https://github.com/Joeysantoro",
9801+
"contributions": [
9802+
"content"
9803+
]
9804+
},
9805+
{
9806+
"login": "AnnaNodes",
9807+
"name": "AnnaNodes",
9808+
"avatar_url": "https://avatars.githubusercontent.com/u/117726964?v=4",
9809+
"profile": "https://github.com/AnnaNodes",
9810+
"contributions": [
9811+
"content"
9812+
]
9813+
},
9814+
{
9815+
"login": "yash251",
9816+
"name": "Yash Jagtap",
9817+
"avatar_url": "https://avatars.githubusercontent.com/u/47234407?v=4",
9818+
"profile": "https://yashjagtap.netlify.app",
9819+
"contributions": [
9820+
"content"
9821+
]
9822+
},
9823+
{
9824+
"login": "gzanitti",
9825+
"name": "Gastón Zanitti",
9826+
"avatar_url": "https://avatars.githubusercontent.com/u/1610461?v=4",
9827+
"profile": "https://github.com/gzanitti",
9828+
"contributions": [
9829+
"content"
9830+
]
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+
]
96659858
}
96669859
],
96679860
"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)