Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pixiv/charcoal into toshusai/fix-cl…
Browse files Browse the repository at this point in the history
…ickable-style
  • Loading branch information
toshusai committed Oct 31, 2023
2 parents 3398cb4 + 399bf17 commit a97b008
Show file tree
Hide file tree
Showing 54 changed files with 23,468 additions and 290 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
cache: yarn

- run: yarn install --immutable --inline-builds
- run: yarn test
- run: |
yarn test
yarn storyshots
env:
CI: 'true'
Expand Down
3 changes: 3 additions & 0 deletions __mocks__/file.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const file = 'test-file-stub'

export default file
1 change: 1 addition & 0 deletions __mocks__/mdx.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default ''
1 change: 1 addition & 0 deletions __mocks__/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {}
64 changes: 32 additions & 32 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,38 +162,38 @@ __metadata:
linkType: hard

"@charcoal-ui/foundation@file:../packages/foundation::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/foundation@file:../packages/foundation#../packages/foundation::hash=20ac71&locator=charcoal-web-docs%40workspace%3A."
checksum: caa7cd8dd3d0da231bd4f2f4bd572e85271d929e4cc87178e4de94b788d960e2e99979090c0f1e781f9145e9ef898d67c75d618f860f076edd1c51cb050ff25f
version: 3.3.0
resolution: "@charcoal-ui/foundation@file:../packages/foundation#../packages/foundation::hash=f171f8&locator=charcoal-web-docs%40workspace%3A."
checksum: c870992f52889299bf7f6822aea364ab5fda2eaa45aba8215ba84c3c26951cf153dd6b02bcc4ff2d7a70807ac962bbfd73f43cec707b7ed788e0b12b79ca7267
languageName: node
linkType: hard

"@charcoal-ui/icon-files@file:../packages/icon-files::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/icon-files@file:../packages/icon-files#../packages/icon-files::hash=d8f2a0&locator=charcoal-web-docs%40workspace%3A."
checksum: d5c66986fbf41ba3f1c2f2e34439ca5f081cca2c3d03a2d6682a132bcbe0264f85eb139a24cce28a849dca5b0488e1fe1ee3ebe64821f45adf7d5b295871f912
version: 3.3.0
resolution: "@charcoal-ui/icon-files@file:../packages/icon-files#../packages/icon-files::hash=238a46&locator=charcoal-web-docs%40workspace%3A."
checksum: e952e88fe1b29b068e768572119c4528647e1a192e53430dba9b775085b1dda0bcb98c36ed9d34638ffc01ebc28d24e36d251c88202ec7904a75f6039b5976e0
languageName: node
linkType: hard

"@charcoal-ui/icons@file:../packages/icons::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/icons@file:../packages/icons#../packages/icons::hash=2135a7&locator=charcoal-web-docs%40workspace%3A."
version: 3.3.0
resolution: "@charcoal-ui/icons@file:../packages/icons#../packages/icons::hash=155702&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/icon-files": ^3.3.0-beta.0
"@charcoal-ui/icon-files": ^3.3.0
dompurify: ^2.3.6
warning: ^4.0.3
checksum: adfcc7b8da8ddf01a046583b7043dce8587c53f06170b3178500c33b9693dcaf5b5681289a57ae04e1b695b9de50119160ce774a4f3a1256c228761569fee3f5
checksum: d04cb39342a02d5db3ef356f2d3858d77d7ff4bb4192dfe05c2a4cf1e263ba50d658534593b5fadd980cd752006d980065d9fec25f6acfb75083e330dbedd103
languageName: node
linkType: hard

"@charcoal-ui/react@file:../packages/react::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/react@file:../packages/react#../packages/react::hash=2f6a35&locator=charcoal-web-docs%40workspace%3A."
version: 3.3.0
resolution: "@charcoal-ui/react@file:../packages/react#../packages/react::hash=23a0de&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/icons": ^3.3.0-beta.0
"@charcoal-ui/styled": ^3.3.0-beta.0
"@charcoal-ui/theme": ^3.3.0-beta.0
"@charcoal-ui/utils": ^3.3.0-beta.0
"@charcoal-ui/icons": ^3.3.0
"@charcoal-ui/styled": ^3.3.0
"@charcoal-ui/theme": ^3.3.0
"@charcoal-ui/utils": ^3.3.0
"@react-aria/button": ^3.7.0
"@react-aria/checkbox": ^3.8.0
"@react-aria/dialog": ^3.5.0
Expand All @@ -215,43 +215,43 @@ __metadata:
peerDependencies:
react: ">=17.0.0"
styled-components: ">=5.1.1"
checksum: b04426a89e9825f5e8866ba79cfe844088fe6a94395eec3ed14d97e3f85fb3999464cab02235c1852b1d8a2d04f6c7135650def865fe76e30930b2bfaa1bc9ad
checksum: f7f12c16106c14b1f0c03a4211c5dd3b8028dd4c507437aa02459d23a692c30839741b09425b0677055a2bd5afe8963f7a2e3dd474901e11a02c215524f6e95a
languageName: node
linkType: hard

"@charcoal-ui/styled@file:../packages/styled::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/styled@file:../packages/styled#../packages/styled::hash=051221&locator=charcoal-web-docs%40workspace%3A."
version: 3.3.0
resolution: "@charcoal-ui/styled@file:../packages/styled#../packages/styled::hash=d4801e&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/foundation": ^3.3.0-beta.0
"@charcoal-ui/theme": ^3.3.0-beta.0
"@charcoal-ui/utils": ^3.3.0-beta.0
"@charcoal-ui/foundation": ^3.3.0
"@charcoal-ui/theme": ^3.3.0
"@charcoal-ui/utils": ^3.3.0
warning: ^4.0.3
peerDependencies:
react: ">=17.0.0"
styled-components: ">=5.1.1"
checksum: f16403e1e3230ad8ab71969746a6509697d65745fc3d7e9dda328cc3fc86df247fc37e882a50bd59f85cfa4b2e3fe05c2486da9aa722bc1a5401fb927d8fefd9
checksum: cdd2c78b97c17f6542a0d01554e8591514a424bfd4ad3ea5866361c3b727e6c30281f205b7ed42fcb971ca6fde8cc188979b4839488d2416bb88d5ed8b990870
languageName: node
linkType: hard

"@charcoal-ui/theme@file:../packages/theme::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/theme@file:../packages/theme#../packages/theme::hash=209188&locator=charcoal-web-docs%40workspace%3A."
version: 3.3.0
resolution: "@charcoal-ui/theme@file:../packages/theme#../packages/theme::hash=d3e7d3&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/foundation": ^3.3.0-beta.0
"@charcoal-ui/utils": ^3.3.0-beta.0
"@charcoal-ui/foundation": ^3.3.0
"@charcoal-ui/utils": ^3.3.0
polished: ^4.1.4
checksum: eb6373c38a1d5ebe66bf3c1a1017152ced38b3bd76681c545f5ec75927a8aede90428114eedb82a0b75fe5b0c542fe40a0ee96e82f569e9233af2be608401c9f
checksum: 647656c05f4b1edaa70f558f65c0757c9cbfd03cbf677ecb7b1f0d523ac4be0f86017249c984e56ac7db9a0966c93a5651d0f36e67a313be6700bdec36a78d28
languageName: node
linkType: hard

"@charcoal-ui/utils@file:../packages/utils::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0-beta.0
resolution: "@charcoal-ui/utils@file:../packages/utils#../packages/utils::hash=fe489f&locator=charcoal-web-docs%40workspace%3A."
version: 3.3.0
resolution: "@charcoal-ui/utils@file:../packages/utils#../packages/utils::hash=bd0f39&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/foundation": ^3.3.0-beta.0
"@charcoal-ui/foundation": ^3.3.0
polished: ^4.1.4
checksum: 01eb2b8969afe3487dfe2be3140650141398d32e01ce115ea06ff2a564d614b3b4ea7649a698dd4b4a58a3be19f6359c4e040a6f4367daf041be346f1fd831e8
checksum: 91fc0cdfcd4c6a0907c5d788c02ca94504876be29697af36592347d91d448fa1ca4d2b27da400701330df6cfbd84a63a42cd76a77089d86c93b46d5748ef361c
languageName: node
linkType: hard

Expand Down
23 changes: 23 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
import type { ReactNode } from 'react'

export {}

globalThis.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}))

window.matchMedia = jest.fn().mockImplementation((query: string) => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
}))

jest.mock('@react-aria/utils', () => ({
...jest.requireActual('@react-aria/utils'),
useId: () => 'test-id',
}))

jest.mock('@react-aria/overlays', () => ({
...jest.requireActual('@react-aria/overlays'),
Overlay: jest.fn(({ children }: { children: ReactNode }) => children),
}))
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build": "yarn workspaces foreach -vpt -j unlimited run build",
"clean": "yarn workspaces foreach -vp run clean",
"test": "jest",
"storyshots": "jest -c storyshots.config.mjs",
"test:strict": "USE_STRICT=1 jest",
"typecheck": "yarn workspaces foreach -vp run typecheck",
"typecheck:config": "tsc",
Expand All @@ -41,10 +42,12 @@
"@commitlint/config-lerna-scopes": "^16.0.0",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@storybook/addon-a11y": "^7.4.1",
"@storybook/addon-docs": "^7.5.1",
"@storybook/addon-essentials": "^7.4.1",
"@storybook/addon-interactions": "^7.4.1",
"@storybook/addon-links": "^7.4.1",
"@storybook/addon-onboarding": "^1.0.8",
"@storybook/addon-storyshots": "7.4.1",
"@storybook/addon-storysource": "^7.4.1",
"@storybook/addon-styling": "^1.3.7",
"@storybook/addon-styling-webpack": "^0.0.5",
Expand Down Expand Up @@ -84,6 +87,7 @@
"prettier": "^2.8.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "17.0.2",
"storybook": "^7.4.1",
"storybook-dark-mode": "^3.0.1",
"styled-components": "^5.3.3",
Expand All @@ -102,5 +106,8 @@
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS"
}
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"react-test-renderer": "17.0.2"
}
}
Loading

0 comments on commit a97b008

Please sign in to comment.