Skip to content

Commit

Permalink
Merge branch 'main' into readonlyTimePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-chase authored Nov 7, 2022
2 parents 79ed298 + 01475a0 commit cf1eebe
Show file tree
Hide file tree
Showing 87 changed files with 1,140 additions and 422 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 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.17.0",
"version": "2.18.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down
19 changes: 19 additions & 0 deletions config/eslint-config-carbon/plugins/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ module.exports = {
],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
rules: {
'no-unused-vars': 'off', // Disabled in favor of @typescript-eslint/no-unused-vars
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-empty-function': 'off', // Disabled to support default empty functions used in PropTypes
'@typescript-eslint/no-explicit-any': 'off', // TODO: Enable once stricter typings of internal utilities are supported
},
},
// Sometimes we'll want to define a quick component in a story to use as a
// wrapper for a component we're documenting. For example:
//
Expand Down
8 changes: 5 additions & 3 deletions config/jest-config-carbon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'use strict';

module.exports = {
moduleFileExtensions: ['js', 'json', 'node'],
moduleFileExtensions: ['tsx', 'ts', 'js', 'json', 'node'],
moduleNameMapper: {
// This mapping is the result of updating to Jest 28. We currently require
// this as the version of uuid that gets resolved is ESM but we would like
Expand All @@ -27,9 +27,11 @@ module.exports = {
'<rootDir>/**/*-(spec|test).js?(x)',
],
transform: {
'^.+\\.(mjs|cjs|js|jsx)$': require.resolve('./transform/jsTransform.js'),
'^.+\\.(mjs|cjs|js|jsx|ts|tsx)$': require.resolve(
'./transform/jsTransform.js'
),
'^.+\\.s?css$': require.resolve('./transform/cssTransform.js'),
'^(?!.*\\.(js|jsx|css|json)$)': require.resolve(
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': require.resolve(
'./transform/fileTransform.js'
),
},
Expand Down
2 changes: 1 addition & 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": "1.4.0",
"version": "1.5.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions config/jest-config-carbon/transform/jsTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const babelOptions = {
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-proposal-class-properties',
Expand Down
7 changes: 7 additions & 0 deletions e2e/components/ComposedModal/ComposedModal-test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ test.describe('ComposedModal', () => {
theme,
});
});
test('full width modal @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ComposedModal',
id: 'components-composedmodal--full-width',
theme,
});
});
});
});

Expand Down
101 changes: 101 additions & 0 deletions e2e/components/ContainedList/ContainedList-test.e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/**
* Copyright IBM Corp. 2016, 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';

const { expect, test } = require('@playwright/test');
const { themes } = require('../../test-utils/env');
const { snapshotStory, visitStory } = require('../../test-utils/storybook');

test.describe('ContainedList', () => {
themes.forEach((theme) => {
test.describe(theme, () => {
test('default @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--default',
theme,
});
});

test('disclosed @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--disclosed',
theme,
});
});

test('with-actions @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--with-actions',
theme,
});
});

test('with-icons @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--with-icons',
theme,
});
});

test('with-interactive-items @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--with-interactive-items',
theme,
});
});

test('with-interactive-items-and-actions @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--with-interactive-items-and-actions',
theme,
});
});

test('with-layer @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--with-layer',
theme,
});
});

test('with-list-title-decorators @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--with-list-title-decorators',
theme,
});
});

test('playground @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'ContainedList',
id: 'components-containedlist--playground',
theme,
});
});
});
});

test('accessibility-checker @avt', async ({ page }) => {
await visitStory(page, {
component: 'ContainedList',
id: 'components-containedlist--default',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('ContainedList');
});
});
8 changes: 8 additions & 0 deletions e2e/components/Modal/Modal-test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ test.describe('Modal', () => {
theme,
});
});

test('full width modal @vrt', async ({ page }) => {
await snapshotStory(page, {
component: 'Modal',
id: 'components-modal--full-width',
theme,
});
});
});
});

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.19.0",
"version": "0.20.0-rc.1",
"scripts": {
"develop": "vite"
},
"devDependencies": {
"vite": "^2.8.0"
},
"dependencies": {
"@carbon/styles": "^1.16.0",
"@carbon/styles": "^1.17.0-rc.1",
"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.17.0",
"version": "0.18.0-rc.1",
"private": true,
"dependencies": {
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"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.17.0",
"version": "0.18.0-rc.1",
"private": true,
"dependencies": {
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"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.14.0",
"version": "0.15.0-rc.1",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"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.16.0",
"version": "0.17.0-rc.1",
"scripts": {
"build": "next build",
"dev": "next dev",
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"@carbon/icons-react": "^10.49.0",
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"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.14.0",
"version": "0.15.0-rc.1",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"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.16.0",
"version": "0.17.0-rc.1",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"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.14.0",
"version": "0.15.0-rc.1",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@carbon/react": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"postinstall": "husky install"
},
"resolutions": {
"@types/react": "~17.0.2",
"@types/prop-types": "15.7.4",
"ast-types": "^0.14.0",
"node-sass": "^6.0.0",
"react": "~17.0.2",
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.16.0",
"version": "8.17.0-rc.1",
"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.16.0",
"@carbon/styles": "^1.16.0",
"@carbon/react": "^1.17.0-rc.1",
"@carbon/styles": "^1.17.0-rc.1",
"@carbon/telemetry": "0.1.0"
},
"devDependencies": {
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.16.0",
"version": "11.17.0-rc.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down Expand Up @@ -40,7 +40,7 @@
"sass": "^1.33.0"
},
"dependencies": {
"@carbon/styles": "^1.16.0",
"@carbon/styles": "^1.17.0-rc.1",
"@carbon/telemetry": "0.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/colors/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/colors",
"description": "Colors for digital and software products using the Carbon Design System",
"version": "11.7.0",
"version": "11.7.1-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
1 change: 0 additions & 1 deletion packages/colors/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ async function build() {
properties: Object.keys(colors).map((key) => {
const swatch = paramCase(key);
return t.SassMapProperty({
quoted: true,
key: t.Identifier(swatch),
value: t.SassMap({
properties: Object.keys(colors[key]).map((grade) => {
Expand Down
Loading

0 comments on commit cf1eebe

Please sign in to comment.