Skip to content

Commit

Permalink
Merge branch 'master' into snippet-props
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored Feb 19, 2021
2 parents d304904 + f4f5ac5 commit 0d15fe0
Show file tree
Hide file tree
Showing 535 changed files with 17,838 additions and 69,055 deletions.
118 changes: 118 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,124 @@
"contributions": [
"code"
]
},
{
"login": "molyholy",
"name": "molyholy",
"avatar_url": "https://avatars2.githubusercontent.com/u/77503726?v=4",
"profile": "https://github.com/molyholy",
"contributions": [
"code"
]
},
{
"login": "scottdickerson",
"name": "Scott Dickerson",
"avatar_url": "https://avatars.githubusercontent.com/u/6663002?v=4",
"profile": "https://github.com/scottdickerson",
"contributions": [
"code"
]
},
{
"login": "epodgaetskiy",
"name": "Evgeniy Podgaetskiy",
"avatar_url": "https://avatars.githubusercontent.com/u/15031623?v=4",
"profile": "https://start.reactwarriors.com/join",
"contributions": [
"code"
]
},
{
"login": "CassidyJensen",
"name": "CassidyJensen",
"avatar_url": "https://avatars.githubusercontent.com/u/45407808?v=4",
"profile": "https://github.com/CassidyJensen",
"contributions": [
"code",
"a11y"
]
},
{
"login": "lattmann",
"name": "Zsolt Lattmann",
"avatar_url": "https://avatars.githubusercontent.com/u/1108945?v=4",
"profile": "https://github.com/lattmann",
"contributions": [
"code"
]
},
{
"login": "ConradSchmidt",
"name": "Conrad Schmidt",
"avatar_url": "https://avatars.githubusercontent.com/u/3808948?v=4",
"profile": "https://conrad.codes/",
"contributions": [
"code"
]
},
{
"login": "IgnacioBecerra",
"name": "Ignacio Becerra",
"avatar_url": "https://avatars.githubusercontent.com/u/24970122?v=4",
"profile": "https://github.com/IgnacioBecerra",
"contributions": [
"code"
]
},
{
"login": "swapnilpatil21",
"name": "Swapnil Patil",
"avatar_url": "https://avatars.githubusercontent.com/u/46713873?v=4",
"profile": "https://github.com/swapnilpatil21",
"contributions": [
"doc"
]
},
{
"login": "sophiiae",
"name": "Fei Z",
"avatar_url": "https://avatars.githubusercontent.com/u/18622886?v=4",
"profile": "https://github.com/sophiiae",
"contributions": [
"code"
]
},
{
"login": "IgnasA",
"name": "Ignas Ausiejus",
"avatar_url": "https://avatars.githubusercontent.com/u/7099068?v=4",
"profile": "https://github.com/IgnasA",
"contributions": [
"doc"
]
},
{
"login": "ryanomackey",
"name": "Ryan O. Mackey",
"avatar_url": "https://avatars.githubusercontent.com/u/17710824?v=4",
"profile": "https://ryanomackey.com/",
"contributions": [
"code"
]
},
{
"login": "skateman",
"name": "Dávid Halász",
"avatar_url": "https://avatars.githubusercontent.com/u/649130?v=4",
"profile": "http://www.skateman.eu/",
"contributions": [
"code"
]
},
{
"login": "guigueb",
"name": "Bill Guigue",
"avatar_url": "https://avatars1.githubusercontent.com/u/5973642?v=4",
"profile": "https://github.com/guigueb",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ git checkout -b {your-branch-name}
From the root directory of your fork, run:

```sh
# To install the project's dependies
yarn install --offline
# To install the project's dependencies
yarn install

# To build the project:
yarn build
Expand Down Expand Up @@ -164,7 +164,7 @@ all-contributors add <username> <contribution>
all-contributors add tw15egan code,doc
```

Then, you'll need to generate the updated `all-contibutors` table by running
Then, you'll need to generate the updated `all-contributors` table by running

```sh
all-contributors generate
Expand Down Expand Up @@ -205,7 +205,7 @@ For more information about how to write your commit message, view our commit
conventions detailed in a our
[developer handbook](https://github.com/carbon-design-system/carbon/blob/master/docs/developer-handbook.md#commit-conventions).

After your changes are commited, run:
After your changes are committed, run:

```sh
git push -u origin { YOUR_BRANCH_NAME }
Expand Down
19 changes: 1 addition & 18 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@ Workspaces:
- #carbon-components for questions about component styles
- #carbon-react for questions about our React components
If these resources don't work out, help us out by filling out a couple of
details below!
For non-IBMer's you can ask a question on our [Github Discussions board](https://github.com/carbon-design-system/carbon/discussions/new) or join [our Discord server](https://discord.gg/R7Hn2A96) to chat with Carbon maintainers and fellow community members.
-->

## What package(s) are you using?

<!--
Add an x in one of the options below, for example:
- [x] package name
-->

- [ ] `carbon-components`
- [ ] `carbon-components-react`

## Summary

## Relevant information

<!-- Provide as much useful information as you can -->
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/fsevents-patch-06bd254f51-f4e06c69cb.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/resolve-patch-bef242007a-ca4e21815c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,21 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
</tr>
<tr>
<td align="center"><a href="https://github.com/DavidSCChen"><img src="https://avatars1.githubusercontent.com/u/54974983?v=4?s=100" width="100px;" alt=""/><br /><sub><b>DavidSCChen</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=DavidSCChen" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/molyholy"><img src="https://avatars2.githubusercontent.com/u/77503726?v=4?s=100" width="100px;" alt=""/><br /><sub><b>molyholy</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=molyholy" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/scottdickerson"><img src="https://avatars.githubusercontent.com/u/6663002?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Scott Dickerson</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=scottdickerson" title="Code">💻</a></td>
<td align="center"><a href="https://start.reactwarriors.com/join"><img src="https://avatars.githubusercontent.com/u/15031623?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Evgeniy Podgaetskiy</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=epodgaetskiy" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/CassidyJensen"><img src="https://avatars.githubusercontent.com/u/45407808?v=4?s=100" width="100px;" alt=""/><br /><sub><b>CassidyJensen</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=CassidyJensen" title="Code">💻</a> <a href="#a11y-CassidyJensen" title="Accessibility">️️️️♿️</a></td>
<td align="center"><a href="https://github.com/lattmann"><img src="https://avatars.githubusercontent.com/u/1108945?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zsolt Lattmann</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=lattmann" title="Code">💻</a></td>
<td align="center"><a href="https://conrad.codes/"><img src="https://avatars.githubusercontent.com/u/3808948?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Conrad Schmidt</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ConradSchmidt" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/IgnacioBecerra"><img src="https://avatars.githubusercontent.com/u/24970122?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ignacio Becerra</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=IgnacioBecerra" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/swapnilpatil21"><img src="https://avatars.githubusercontent.com/u/46713873?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Swapnil Patil</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=swapnilpatil21" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/sophiiae"><img src="https://avatars.githubusercontent.com/u/18622886?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fei Z</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=sophiiae" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/IgnasA"><img src="https://avatars.githubusercontent.com/u/7099068?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ignas Ausiejus</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=IgnasA" title="Documentation">📖</a></td>
<td align="center"><a href="https://ryanomackey.com/"><img src="https://avatars.githubusercontent.com/u/17710824?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ryan O. Mackey</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ryanomackey" title="Code">💻</a></td>
<td align="center"><a href="http://www.skateman.eu/"><img src="https://avatars.githubusercontent.com/u/649130?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Halász Dávid</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=skateman" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/guigueb"><img src="https://avatars1.githubusercontent.com/u/5973642?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bill Guigue</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=guigueb" title="Code">💻</a></td>
</tr>
</table>

Expand Down
1 change: 1 addition & 0 deletions codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react"
],
"dependencies": {
"@babel/preset-env": "^7.12.13",
"jscodeshift": "^0.11.0"
}
}
6 changes: 5 additions & 1 deletion config/eslint-config-carbon/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

module.exports = {
parser: 'babel-eslint',
extends: ['eslint:recommended', require.resolve('./plugins/jsdoc')],
extends: [
'eslint:recommended',
require.resolve('./rules/best-practices'),
require.resolve('./plugins/jsdoc'),
],
rules: {
// Handle cases where we are destructuring but may not be using the initial
// variables
Expand Down
5 changes: 4 additions & 1 deletion config/eslint-config-carbon/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-config-carbon",
"description": "ESLint configuration for Carbon",
"version": "2.2.0",
"version": "2.3.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -42,5 +42,8 @@
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react-hooks": "^4.0.4",
"eslint-restricted-globals": "^0.2.0"
},
"devDependencies": {
"prettier": "^2.2.1"
}
}
15 changes: 15 additions & 0 deletions config/eslint-config-carbon/rules/best-practices.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Copyright IBM Corp. 2018, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';

module.exports = {
rules: {
// @see https://eslint.org/docs/rules/curly
curly: 'error',
},
};
6 changes: 5 additions & 1 deletion config/jest-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jest-config-carbon",
"private": true,
"description": "Jest configuration and preset for Carbon",
"version": "0.1.0",
"version": "0.2.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -35,5 +35,9 @@
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"jest-circus": "^26.0.1"
},
"devDependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
10 changes: 10 additions & 0 deletions config/storybook-preset-carbon/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright IBM Corp. 2021, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = {
presets: ['@babel/preset-env', '@babel/preset-react'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2018
* Copyright IBM Corp. 2021, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -36,10 +36,7 @@ const typeTokenDefaults = {
'productive-heading-04': '28-36',
};

/**
* Storybook add-on panel for Carbon theme switcher.
*/
export const CarbonThemesPanel = ({ api, active }) => {
export const CarbonThemePanel = ({ api, active }) => {
const [currentTheme, setCurrentTheme] = useState('white');
const handleChange = useCallback(
(event) => {
Expand Down Expand Up @@ -77,29 +74,31 @@ export const CarbonThemesPanel = ({ api, active }) => {
);
};

CarbonThemesPanel.propTypes = {
CarbonThemePanel.propTypes = {
/**
* `true` if this Storybook add-on panel is active.
*/
active: PropTypes.bool.isRequired,

/**
* The Storybook API object.
*/
api: PropTypes.shape({
getChannel: PropTypes.func,
}).isRequired,

/**
* `true` if this Storybook add-on panel is active.
*/
active: PropTypes.bool.isRequired,
};

/**
* Storybook add-on panel for Carbon type token switcher.
*/
export const CarbonTypePanel = ({ api, active }) => {
const [currentTypeTokens, setCurrentTypeTokens] = useState(typeTokenDefaults);
const handleTokenChange = useCallback(
(event) => {
const { name: tokenName, value: tokenValue } = event.target;
setCurrentTypeTokens({ ...currentTypeTokens, [tokenName]: tokenValue });
setCurrentTypeTokens((currentTypeTokens) => {
return {
...currentTypeTokens,
[tokenName]: tokenValue,
};
});
api.getChannel().emit(CARBON_TYPE_TOKEN, { tokenName, tokenValue });
},
[api]
Expand Down Expand Up @@ -131,15 +130,15 @@ export const CarbonTypePanel = ({ api, active }) => {
};

CarbonTypePanel.propTypes = {
/**
* `true` if this Storybook add-on panel is active.
*/
active: PropTypes.bool.isRequired,

/**
* The Storybook API object.
*/
api: PropTypes.shape({
getChannel: PropTypes.func,
}).isRequired,

/**
* `true` if this Storybook add-on panel is active.
*/
active: PropTypes.bool.isRequired,
};
14 changes: 14 additions & 0 deletions config/storybook-preset-carbon/carbon-theme-addon/src/preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Copyright IBM Corp. 2021, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';

module.exports = {
managerEntries(entry = []) {
return [...entry, require.resolve('./register')];
},
};
Loading

0 comments on commit 0d15fe0

Please sign in to comment.