Skip to content

Commit 4d82d83

Browse files
committed
Organize the styleguide
1 parent 047cd06 commit 4d82d83

File tree

4 files changed

+39
-46
lines changed

4 files changed

+39
-46
lines changed

packages/components/src/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ export { default as Stack } from "./primitives/Stack"
2020
export { default as Text, textStyles } from "./primitives/Text"
2121
export { default as VisuallyHidden } from "./primitives/HiddenVisually"
2222
export * from "./primitives/Page"
23-
export { default as InteractiveComponentStates } from "./InteractiveComponentStates"
23+
export { default as InteractiveComponentStates } from "./interactiveComponentStates"
2424

2525
export { default as theme } from "./theme"
2626

27-
export type SystemCSSObject<T> = T &
28-
{
29-
[K in CSS.Pseudos]?: T
30-
}
27+
export type SystemCSSObject<T> = T & {
28+
[K in CSS.Pseudos]?: T
29+
}
3130

3231
export type CssProperties = {
3332
[K in keyof StandardCSSProperties]: StandardCSSProperties[K]
File renamed without changes.

styleguide.config.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
const path = require("path")
22
const findUp = require("find-up")
33

4-
const packages = ["react-design-tokens", "react-focus-within", "with-selector", "mixins"]
4+
const packages = [
5+
"components",
6+
"react-design-tokens",
7+
"react-focus-within",
8+
"with-selector",
9+
"mixins"
10+
]
511

612
const file = (filepath) => path.join(__dirname, filepath)
713

@@ -11,15 +17,11 @@ module.exports = {
1117
name: "Introduction",
1218
content: "./Readme.md"
1319
},
14-
{
15-
name: "Components",
16-
components: `packages/components/**/[A-Z]*.tsx`
17-
},
1820
{
1921
name: "Packages",
2022
sections: packages.map((pkg) => ({
2123
name: pkg,
22-
components: `packages/${pkg}/src/[A-Z]*.{js,ts,jsx,tsx}`
24+
components: `packages/${pkg}/**/[A-Z]*.{js,ts,jsx,tsx}`
2325
})),
2426
sectionDepth: 1
2527
}
@@ -73,6 +75,7 @@ module.exports = {
7375
const pkgPath = findUp.sync("package.json", { cwd: componentPath })
7476
if (!pkgPath) {
7577
console.error(`Could not find \`package.json\` for ${componentName}`)
78+
return ""
7679
}
7780
const { name } = require(pkgPath)
7881
return `import { ${componentName} } from ${name}`

yarn.lock

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@
7272
jsesc "^2.5.1"
7373
source-map "^0.5.0"
7474

75+
"@babel/helper-annotate-as-pure@^7.0.0":
76+
version "7.16.7"
77+
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862"
78+
integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==
79+
dependencies:
80+
"@babel/types" "^7.16.7"
81+
7582
"@babel/helper-annotate-as-pure@^7.12.13":
7683
version "7.12.13"
7784
resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz"
@@ -369,6 +376,11 @@
369376
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389"
370377
integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==
371378

379+
"@babel/helper-validator-identifier@^7.16.7":
380+
version "7.16.7"
381+
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"
382+
integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==
383+
372384
"@babel/helper-validator-option@^7.12.17":
373385
version "7.12.17"
374386
resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz"
@@ -1073,6 +1085,14 @@
10731085
"@babel/helper-validator-identifier" "^7.15.7"
10741086
to-fast-properties "^2.0.0"
10751087

1088+
"@babel/types@^7.16.7":
1089+
version "7.17.0"
1090+
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
1091+
integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==
1092+
dependencies:
1093+
"@babel/helper-validator-identifier" "^7.16.7"
1094+
to-fast-properties "^2.0.0"
1095+
10761096
"@changesets/apply-release-plan@^2.0.1":
10771097
version "2.0.1"
10781098
resolved "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-2.0.1.tgz"
@@ -1923,11 +1943,6 @@
19231943
resolved "https://registry.npmjs.org/@types/node/-/node-12.12.37.tgz"
19241944
integrity sha512-4mXKoDptrXAwZErQHrLzpe0FN/0Wmf5JRniSVIdwUrtDf9wnmEV1teCNLBo/TwuXhkK/bVegoEn/wmb+x0AuPg==
19251945

1926-
"@types/normalize-package-data@^2.4.0":
1927-
version "2.4.0"
1928-
resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz"
1929-
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
1930-
19311946
"@types/parse-json@^4.0.0":
19321947
version "4.0.0"
19331948
resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz"
@@ -4736,7 +4751,7 @@ find-up@^4.0.0, find-up@^4.1.0:
47364751

47374752
find-up@^5.0.0:
47384753
version "5.0.0"
4739-
resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz"
4754+
resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
47404755
integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
47414756
dependencies:
47424757
locate-path "^6.0.0"
@@ -6364,7 +6379,7 @@ locate-path@^5.0.0:
63646379

63656380
locate-path@^6.0.0:
63666381
version "6.0.0"
6367-
resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz"
6382+
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
63686383
integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
63696384
dependencies:
63706385
p-locate "^5.0.0"
@@ -6941,7 +6956,7 @@ node-releases@^1.1.29, node-releases@^1.1.53:
69416956
resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.53.tgz"
69426957
integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ==
69436958

6944-
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0:
6959+
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
69456960
version "2.5.0"
69466961
resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz"
69476962
integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
@@ -7260,7 +7275,7 @@ p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.2.2:
72607275

72617276
p-limit@^3.0.2:
72627277
version "3.1.0"
7263-
resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz"
7278+
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
72647279
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
72657280
dependencies:
72667281
yocto-queue "^0.1.0"
@@ -7288,7 +7303,7 @@ p-locate@^4.1.0:
72887303

72897304
p-locate@^5.0.0:
72907305
version "5.0.0"
7291-
resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz"
7306+
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
72927307
integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
72937308
dependencies:
72947309
p-limit "^3.0.2"
@@ -8009,15 +8024,6 @@ read-pkg-up@^3.0.0:
80098024
find-up "^2.0.0"
80108025
read-pkg "^3.0.0"
80118026

8012-
read-pkg-up@^7.0.1:
8013-
version "7.0.1"
8014-
resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz"
8015-
integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==
8016-
dependencies:
8017-
find-up "^4.1.0"
8018-
read-pkg "^5.2.0"
8019-
type-fest "^0.8.1"
8020-
80218027
read-pkg@^3.0.0:
80228028
version "3.0.0"
80238029
resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz"
@@ -8027,16 +8033,6 @@ read-pkg@^3.0.0:
80278033
normalize-package-data "^2.3.2"
80288034
path-type "^3.0.0"
80298035

8030-
read-pkg@^5.2.0:
8031-
version "5.2.0"
8032-
resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz"
8033-
integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==
8034-
dependencies:
8035-
"@types/normalize-package-data" "^2.4.0"
8036-
normalize-package-data "^2.5.0"
8037-
parse-json "^5.0.0"
8038-
type-fest "^0.6.0"
8039-
80408036
read-yaml-file@^1.1.0:
80418037
version "1.1.0"
80428038
resolved "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz"
@@ -9442,11 +9438,6 @@ type-fest@^0.11.0:
94429438
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz"
94439439
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
94449440

9445-
type-fest@^0.6.0:
9446-
version "0.6.0"
9447-
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz"
9448-
integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
9449-
94509441
type-fest@^0.8.1:
94519442
version "0.8.1"
94529443
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz"
@@ -10099,5 +10090,5 @@ yargs@^15.1.0:
1009910090

1010010091
yocto-queue@^0.1.0:
1010110092
version "0.1.0"
10102-
resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz"
10093+
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
1010310094
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

0 commit comments

Comments
 (0)