Skip to content

Commit

Permalink
Merge branch 'main' into 12896
Browse files Browse the repository at this point in the history
  • Loading branch information
janhassel authored Jan 19, 2023
2 parents a40ad57 + b568e8a commit d077a92
Show file tree
Hide file tree
Showing 49 changed files with 247 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-repo-stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
# Use latest release.
uses: jgehrcke/github-repo-stats@RELEASE
with:
ghtoken: ${{ secrets.ghrs_github_api_token }}
ghtoken: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Binary file not shown.
18 changes: 18 additions & 0 deletions config/eslint-config-carbon/plugins/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ module.exports = {
'react/jsx-no-useless-fragment': 2,
'react/no-typos': 2,
'react/sort-prop-types': 2,
'react/forbid-component-props': [
2,
{ forbid: [{ propName: 'style', message: 'Avoid using style prop' }] },
],
'react/forbid-dom-props': [
2,
{ forbid: [{ propName: 'style', message: 'Avoid using style prop' }] },
],

// react-hooks
'react-hooks/rules-of-hooks': 2,
Expand Down Expand Up @@ -77,6 +85,16 @@ module.exports = {
rules: {
'react/display-name': 0,
'react/prop-types': 0,
'react/forbid-component-props': 0,
'react/forbid-dom-props': 0,
},
},
// style prop is fine to be used in internal unit testing
{
files: ['*.e2e.js'],
rules: {
'react/forbid-component-props': 0,
'react/forbid-dom-props': 0,
},
},

Expand Down
13 changes: 12 additions & 1 deletion docs/guides/adding-component-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,19 @@ the repository. There is an issue tracking curring status of this effort,
- Change extension to `.tsx` via git (do not simply rename)
- e.g.
`git mv packages/react/src/components/ComponentName/ComponentName.js packages/react/src/components/ComponentName/ComponentName.tsx`
- Copying the proptypes def to above the component definition
- Copy the proptypes def to above the component definition
- Retool the proptypes to be a ts interface
- Look for any
[legacy types for the component, previously provided via DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/carbon-components-react/lib/components)
- Copy these legacy types over to your working file and use them as a starting
point.
- NOTE: If there are legacy types available, these were originally provided
for `[email protected]` and may be out of date.
- Even still, it would be best to have as much parity as possible between
legacy types for `[email protected]` and the new typings we're
providing for `@carbon/[email protected]`.
- After copying them over to your working file, ensure the legacy types don't
require any updates to match the current component proptypes specification.
- Fix errors as they appear
- Do not add types to internal components or functions that are not exported as
part of the Public API.
Expand Down
4 changes: 2 additions & 2 deletions examples/codesandbox-styles/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "codesandbox-styles",
"private": true,
"version": "0.23.0",
"version": "0.24.0-rc.0",
"scripts": {
"develop": "vite"
},
"devDependencies": {
"vite": "^2.8.0"
},
"dependencies": {
"@carbon/styles": "^1.20.0",
"@carbon/styles": "^1.21.0-rc.0",
"sass": "^1.51.0"
}
}
4 changes: 2 additions & 2 deletions examples/codesandbox-with-sass-compilation/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "codesandbox-with-sass-compilation",
"version": "0.21.0",
"version": "0.22.0-rc.0",
"private": true,
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/codesandbox/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "codesandbox",
"version": "0.21.0",
"version": "0.22.0-rc.0",
"private": true,
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/custom-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "custom-theme",
"private": true,
"version": "0.18.0",
"version": "0.19.0-rc.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/incremental-migration/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "incremental-migration",
"private": true,
"version": "0.20.0",
"version": "0.21.0-rc.0",
"scripts": {
"build": "next build",
"dev": "next dev",
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"@carbon/icons-react": "^10.49.0",
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"carbon-components": "^10.57.0",
"carbon-components-react": "^7.57.0",
"carbon-icons": "^7.0.7",
Expand Down
4 changes: 2 additions & 2 deletions examples/light-dark-mode/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "examples-light-dark",
"private": true,
"version": "0.18.0",
"version": "0.19.0-rc.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"next": "12.1.4",
"react": "18.0.0",
"react-dom": "18.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "examples-nextjs",
"private": true,
"version": "0.20.0",
"version": "0.21.0-rc.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"next": "12.1.4",
"react": "18.0.0",
"react-dom": "18.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "vite",
"private": true,
"version": "0.18.0",
"version": "0.19.0-rc.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"prettier": "^2.7.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.0",
"rimraf": "^4.0.0",
"stylelint": "^14.3.0"
},
"commitlint": {
Expand Down
8 changes: 4 additions & 4 deletions packages/carbon-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "carbon-components-react",
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences.",
"version": "8.20.0",
"version": "8.21.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -39,8 +39,8 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/react": "^1.20.0",
"@carbon/styles": "^1.20.0",
"@carbon/react": "^1.21.0-rc.0",
"@carbon/styles": "^1.21.0-rc.0",
"@carbon/telemetry": "0.1.0"
},
"devDependencies": {
Expand All @@ -61,7 +61,7 @@
"fs-extra": "^10.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/carbon-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "carbon-components",
"description": "The Carbon Design System is IBM’s open-source design system for products and experiences.",
"version": "11.20.0",
"version": "11.21.0-rc.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -40,13 +40,13 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/styles": "^1.20.0",
"@carbon/styles": "^1.21.0-rc.0",
"@carbon/telemetry": "0.1.0"
},
"devDependencies": {
"@carbon/test-utils": "^10.26.0",
"fs-extra": "^10.0.0",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"sass": "^1.51.0"
},
"sideEffects": [
Expand Down
2 changes: 1 addition & 1 deletion packages/colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@carbon/test-utils": "^10.26.0",
"change-case": "^4.1.1",
"fs-extra": "^10.0.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"sideEffects": false,
"eyeglass": {
Expand Down
8 changes: 4 additions & 4 deletions packages/elements/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/elements",
"description": "A collection of design elements in code for the IBM Design Language",
"version": "11.17.0",
"version": "11.18.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -37,17 +37,17 @@
"dependencies": {
"@carbon/colors": "^11.11.0",
"@carbon/grid": "^11.10.0",
"@carbon/icons": "^11.14.0",
"@carbon/icons": "^11.15.0-rc.0",
"@carbon/layout": "^11.10.0",
"@carbon/motion": "^11.8.0",
"@carbon/themes": "^11.15.0",
"@carbon/themes": "^11.16.0-rc.0",
"@carbon/type": "^11.14.0"
},
"devDependencies": {
"@carbon/cli": "^11.8.0",
"fs-extra": "^10.0.0",
"klaw-sync": "^6.0.0",
"replace-in-file": "^3.4.2",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/feature-flags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"change-case": "^4.1.2",
"fs-extra": "^10.0.0",
"js-yaml": "^3.14.0",
"rimraf": "^3.0.2",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@carbon/cli": "^11.8.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"eyeglass": {
"exports": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/icon-build-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"prop-types": "^15.6.2",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"rimraf": "^3.0.0",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"rollup-plugin-strip-banner": "^2.0.0",
"svg-parser": "^2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/icon-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"@carbon/cli": "^11.8.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
},
"sideEffects": false
}
6 changes: 3 additions & 3 deletions packages/icons-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/icons-react",
"description": "React components for icons in digital and software products using the Carbon Design System",
"version": "11.14.0",
"version": "11.15.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -42,8 +42,8 @@
},
"devDependencies": {
"@carbon/icon-build-helpers": "^1.9.0",
"@carbon/icons": "^11.14.0",
"rimraf": "^3.0.2"
"@carbon/icons": "^11.15.0-rc.0",
"rimraf": "^4.0.0"
},
"sideEffects": false
}
6 changes: 3 additions & 3 deletions packages/icons-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/icons-vue",
"description": "Vue components for icons in digital and software products using the Carbon Design System",
"version": "10.63.0",
"version": "10.64.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -32,10 +32,10 @@
},
"devDependencies": {
"@carbon/cli-reporter": "^10.5.0",
"@carbon/icons": "^11.14.0",
"@carbon/icons": "^11.15.0-rc.0",
"fs-extra": "^10.0.0",
"prettier": "^2.7.1",
"rimraf": "^3.0.0",
"rimraf": "^4.0.0",
"rollup": "^2.79.1",
"vue": "^2.6.8"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/icons",
"description": "Icons for digital and software products using the Carbon Design System",
"version": "11.14.0",
"version": "11.15.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -40,6 +40,6 @@
"devDependencies": {
"@carbon/cli": "^11.8.0",
"@carbon/icon-build-helpers": "^1.9.0",
"rimraf": "^3.0.2"
"rimraf": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"@carbon/scss-generator": "^10.15.0",
"@carbon/test-utils": "^10.26.0",
"core-js": "^3.16.0",
"rimraf": "^3.0.0"
"rimraf": "^4.0.0"
}
}
Loading

0 comments on commit d077a92

Please sign in to comment.