Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pixiv/charcoal into toshusai/add-po…
Browse files Browse the repository at this point in the history
…pover
  • Loading branch information
toshusai committed Nov 14, 2023
2 parents 6972f38 + 63ae6f3 commit fad193d
Show file tree
Hide file tree
Showing 71 changed files with 23,478 additions and 482 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
resolution: "@charcoal-ui/foundation@file:../packages/foundation#../packages/foundation::hash=f171f8&locator=charcoal-web-docs%40workspace%3A."
checksum: c870992f52889299bf7f6822aea364ab5fda2eaa45aba8215ba84c3c26951cf153dd6b02bcc4ff2d7a70807ac962bbfd73f43cec707b7ed788e0b12b79ca7267
version: 3.4.0
resolution: "@charcoal-ui/foundation@file:../packages/foundation#../packages/foundation::hash=3039ca&locator=charcoal-web-docs%40workspace%3A."
checksum: cb7e4049b9b706cd6cf0ddcc3b8151d47e91bc7b91d2203ab1d410a6fe9320dd8f30445b257985dbb3330a312959f89a3cd7d418db5be5ac38eb6f575a080f38
languageName: node
linkType: hard

"@charcoal-ui/icon-files@file:../packages/icon-files::locator=charcoal-web-docs%40workspace%3A.":
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
version: 3.4.0
resolution: "@charcoal-ui/icon-files@file:../packages/icon-files#../packages/icon-files::hash=53fd85&locator=charcoal-web-docs%40workspace%3A."
checksum: 5762e5d62db05edaa6023288a8af79c64637d9c6cf99b0d97bbcac77533eff192c43678bd9956c4786f1e11f1491e819a19ae7a9151752ad682f930757946b75
languageName: node
linkType: hard

"@charcoal-ui/icons@file:../packages/icons::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0
resolution: "@charcoal-ui/icons@file:../packages/icons#../packages/icons::hash=133bde&locator=charcoal-web-docs%40workspace%3A."
version: 3.4.0
resolution: "@charcoal-ui/icons@file:../packages/icons#../packages/icons::hash=d9757e&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/icon-files": ^3.3.0
"@charcoal-ui/icon-files": ^3.4.0
dompurify: ^2.3.6
warning: ^4.0.3
checksum: c215e4257abda94f58f8854a3c303170176183a6d3f708f42674e496b3e13399b4f0aba155571da50d2da84a904ec4b76f6d050563e18a246cb57fb4c4286959
checksum: 0a54af0ecfe99ed71c8c657470f9128953f5d28f708da0fec6ce64186b98a2a2b297a5b27fc8961478a796ce28d5f929732b665ab02e9b80255f5200afacd69f
languageName: node
linkType: hard

"@charcoal-ui/react@file:../packages/react::locator=charcoal-web-docs%40workspace%3A.":
version: 3.3.0
resolution: "@charcoal-ui/react@file:../packages/react#../packages/react::hash=cbff5d&locator=charcoal-web-docs%40workspace%3A."
version: 3.4.0
resolution: "@charcoal-ui/react@file:../packages/react#../packages/react::hash=cee995&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/icons": ^3.3.0
"@charcoal-ui/styled": ^3.3.0
"@charcoal-ui/theme": ^3.3.0
"@charcoal-ui/utils": ^3.3.0
"@charcoal-ui/icons": ^3.4.0
"@charcoal-ui/styled": ^3.4.0
"@charcoal-ui/theme": ^3.4.0
"@charcoal-ui/utils": ^3.4.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: fb09a1770b3bbb63089765eb8124c3e6ae89997d43a9eef9cf04cf915475921ef89ae1ab0fd2c63191170aca2e3e432d6134780af99edc2343f393f93ba36aba
checksum: 7489604933439ca511a04e4979e8a5a1b8dc548276631defa2511f27915321698a40f8065dd7ad955853f0fb28158409735bd624b6b649d73990b17f7ea9b1d0
languageName: node
linkType: hard

"@charcoal-ui/styled@file:../packages/styled::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."
version: 3.4.0
resolution: "@charcoal-ui/styled@file:../packages/styled#../packages/styled::hash=3defa7&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/foundation": ^3.3.0
"@charcoal-ui/theme": ^3.3.0
"@charcoal-ui/utils": ^3.3.0
"@charcoal-ui/foundation": ^3.4.0
"@charcoal-ui/theme": ^3.4.0
"@charcoal-ui/utils": ^3.4.0
warning: ^4.0.3
peerDependencies:
react: ">=17.0.0"
styled-components: ">=5.1.1"
checksum: cdd2c78b97c17f6542a0d01554e8591514a424bfd4ad3ea5866361c3b727e6c30281f205b7ed42fcb971ca6fde8cc188979b4839488d2416bb88d5ed8b990870
checksum: 9f66d1d6ee56fac0d4b7a0f38066b3bcb7453a2a7feb4aa862aaff754fc3e0b542c53af78fbf792afa789602ad37f72cb38637bcc8350f4fbfb76a025bb712f3
languageName: node
linkType: hard

"@charcoal-ui/theme@file:../packages/theme::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."
version: 3.4.0
resolution: "@charcoal-ui/theme@file:../packages/theme#../packages/theme::hash=096d54&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/foundation": ^3.3.0
"@charcoal-ui/utils": ^3.3.0
"@charcoal-ui/foundation": ^3.4.0
"@charcoal-ui/utils": ^3.4.0
polished: ^4.1.4
checksum: 647656c05f4b1edaa70f558f65c0757c9cbfd03cbf677ecb7b1f0d523ac4be0f86017249c984e56ac7db9a0966c93a5651d0f36e67a313be6700bdec36a78d28
checksum: ed797d242073ac8f218053f30d76dfc3a032cf8141ec3af5b938fd190d1c9be5e2fda0ecab38797ab2aa79be8c4e1db408299f29b677560750fe4733e694c379
languageName: node
linkType: hard

"@charcoal-ui/utils@file:../packages/utils::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."
version: 3.4.0
resolution: "@charcoal-ui/utils@file:../packages/utils#../packages/utils::hash=9fb075&locator=charcoal-web-docs%40workspace%3A."
dependencies:
"@charcoal-ui/foundation": ^3.3.0
"@charcoal-ui/foundation": ^3.4.0
polished: ^4.1.4
checksum: 91fc0cdfcd4c6a0907c5d788c02ca94504876be29697af36592347d91d448fa1ca4d2b27da400701330df6cfbd84a63a42cd76a77089d86c93b46d5748ef361c
checksum: e515ae50c86967485fa7c6cc79b125c3f64bbcdd8be461e99143f2aafe7531c81aecba12d41aa00c8f90e22bd69e4f4fe9437a7a5417024dfacc9853ccc5d7b3
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),
}))
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@
"packages": [
"packages/*"
],
"version": "3.3.0"
"version": "3.4.0"
}
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"
}
}
2 changes: 1 addition & 1 deletion packages/foundation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@charcoal-ui/foundation",
"version": "3.3.0",
"version": "3.4.0",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/icon-files/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@charcoal-ui/icon-files",
"version": "3.3.0",
"version": "3.4.0",
"license": "Apache-2.0",
"type": "module",
"main": "./src/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/icons-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@charcoal-ui/icons-cli",
"version": "3.3.0",
"version": "3.4.0",
"license": "Apache-2.0",
"bin": "./dist/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@charcoal-ui/icons",
"version": "3.3.0",
"version": "3.4.0",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
Expand Down Expand Up @@ -30,7 +30,7 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@charcoal-ui/icon-files": "^3.3.0",
"@charcoal-ui/icon-files": "^3.4.0",
"dompurify": "^2.3.6",
"warning": "^4.0.3"
},
Expand Down
Loading

0 comments on commit fad193d

Please sign in to comment.