Skip to content

Commit

Permalink
Merge branch 'main' into 8911-percy-snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jun 24, 2021
2 parents cc4ecd2 + f2b5084 commit 5435207
Show file tree
Hide file tree
Showing 286 changed files with 5,802 additions and 1,118 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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file 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/lcid-npm-2.0.0-504d7cb4c6-278e27b5a0.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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 12 additions & 12 deletions 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.5.0",
"version": "2.6.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -29,20 +29,20 @@
"access": "public"
},
"peerDependencies": {
"eslint": "^6.0.0"
"eslint": "^6.0.0 || ^7.0.0"
},
"dependencies": {
"babel-eslint": "^10.1.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-jsdoc": "^20.3.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react-hooks": "^4.0.4",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^35.3.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-restricted-globals": "^0.2.0"
},
"devDependencies": {
Expand Down
13 changes: 12 additions & 1 deletion config/jest-config-carbon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

module.exports = {
moduleFileExtensions: ['js', 'json', 'node'],
modulePathIgnorePatterns: ['/build/', '/es/', '/lib/', '/umd/', '/examples/'],
reporters: ['default'],
setupFiles: [require.resolve('./setup/setup.js')],
setupFilesAfterEnv: [require.resolve('./setup/setupAfterEnv.js')],
Expand Down Expand Up @@ -36,7 +37,13 @@ module.exports = {
'examples',
'/umd/',
],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
transformIgnorePatterns: [
'/build/',
'/es/',
'/lib/',
'/umd/',
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$',
],
watchPathIgnorePatterns: [
'/cjs/',
'/dist/',
Expand All @@ -46,4 +53,8 @@ module.exports = {
'/storybook/',
'/results/',
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};
9 changes: 5 additions & 4 deletions 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.4.0",
"version": "0.5.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand All @@ -28,13 +28,14 @@
"@babel/preset-react": "^7.13.13",
"@babel/runtime": "^7.14.0",
"accessibility-checker": "^3.1.1",
"axe-core": "^4.1.1",
"axe-core": "^4.2.2",
"babel-jest": "^26.6.3",
"chalk": "^4.1.0",
"chalk": "^4.1.1",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"jest-circus": "^26.0.1"
"jest-circus": "^26.0.1",
"jest-watch-typeahead": "^0.6.4"
},
"devDependencies": {
"react": "^17.0.1",
Expand Down
14 changes: 7 additions & 7 deletions config/stylelint-config-carbon/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stylelint-config-carbon",
"description": "Stylelint configuration for Carbon",
"version": "1.6.0",
"version": "1.7.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand All @@ -27,15 +27,15 @@
},
"dependencies": {
"stylelint-config-idiomatic-order": "^8.1.0",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-no-unsupported-browser-features": "^4.0.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"stylelint-no-unsupported-browser-features": "^5.0.1",
"stylelint-order": "^4.1.0",
"stylelint-prettier": "^1.1.2",
"stylelint-scss": "^3.13.0"
"stylelint-prettier": "^1.2.0",
"stylelint-scss": "^3.19.0"
},
"devDependencies": {
"prettier": "^2.2.1",
"stylelint": "^13.6.0"
"stylelint": "^13.13.1"
}
}
19 changes: 19 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* 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 = {
preset: 'jest-config-carbon',
collectCoverageFrom: [
'packages/**/src/**/*.js',
'!packages/{cli,components,sketch}/**',
'!packages/**/{examples,stories}/**',
'!**/*-story.js',
],
reporters: ['default', 'jest-junit'],
};
26 changes: 26 additions & 0 deletions jest.e2e.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* 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 = {
preset: 'jest-config-carbon',
collectCoverageFrom: [
'packages/**/src/**/*.js',
'!packages/{cli,components,sketch}/**',
'!packages/**/{examples,stories}/**',
'!**/*-story.js',
],
testMatch: ['<rootDir>/e2e/**/*-test.js'],
testPathIgnorePatterns: [
'examples',
'/packages/components/',
'/packages/react/',
],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
reporters: ['default', 'jest-junit'],
};
17 changes: 2 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint:styles": "stylelint '**/*.{css,scss}' --report-needless-disables --report-invalid-scope-disables",
"sync": "carbon-cli sync",
"test": "cross-env BABEL_ENV=test jest",
"test:e2e": "cross-env BABEL_ENV=test jest --testPathPattern='e2e/' --testPathIgnorePatterns='examples,/packages/components/,/packages/react/'"
"test:e2e": "cross-env BABEL_ENV=test jest -c jest.e2e.config.js"
},
"resolutions": {
"ast-types": "^0.14.0",
Expand Down Expand Up @@ -55,7 +55,7 @@
"cross-env": "^5.2.0",
"cross-spawn": "^6.0.5",
"doctoc": "^1.4.0",
"eslint": "^6.8.0",
"eslint": "^7.28.0",
"fs-extra": "^8.1.0",
"glob": "^7.1.4",
"husky": "^4.0.10",
Expand Down Expand Up @@ -140,18 +140,5 @@
"extends": [
"./config/stylelint-config-carbon"
]
},
"jest": {
"preset": "jest-config-carbon",
"collectCoverageFrom": [
"packages/**/src/**/*.js",
"!packages/{cli,components,sketch}/**",
"!packages/**/{examples,stories}/**",
"!**/*-story.js"
],
"reporters": [
"default",
"jest-junit"
]
}
}
1 change: 1 addition & 0 deletions packages/carbon-react/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
storybook-static
8 changes: 8 additions & 0 deletions packages/carbon-react/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ module.exports = {
],
});

if (process.env.NODE_ENV === 'production') {
config.plugins.push(
new MiniCssExtractPlugin({
filename: '[name].[contenthash].css',
})
);
}

return config;
},
};
12 changes: 6 additions & 6 deletions packages/carbon-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@carbon/react",
"private": true,
"description": "React components for the Carbon Design System",
"version": "0.5.1",
"version": "0.6.0-rc.0",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -41,11 +41,11 @@
},
"dependencies": {
"@carbon/feature-flags": "^0.5.0",
"@carbon/icons-react": "^10.33.0",
"@carbon/styles": "^0.8.0",
"@carbon/icons-react": "^10.34.0-rc.0",
"@carbon/styles": "^0.9.0-rc.0",
"@carbon/telemetry": "0.0.0-alpha.6",
"@ibm/plex": "6.0.0-next.6",
"carbon-components-react": "^7.37.1"
"carbon-components-react": "^7.38.0-rc.0"
},
"devDependencies": {
"@babel/core": "^7.14.2",
Expand All @@ -55,8 +55,8 @@
"@babel/plugin-transform-react-constant-elements": "^7.13.13",
"@babel/preset-env": "^7.14.2",
"@babel/preset-react": "^7.13.13",
"@carbon/styles": "^0.8.0-rc.0",
"@carbon/themes": "^10.36.0",
"@carbon/styles": "^0.9.0-rc.0",
"@carbon/themes": "^10.37.0-rc.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
Expand Down
7 changes: 7 additions & 0 deletions packages/carbon-react/src/components/Accordion/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/**
* 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.
*/

export { Accordion, AccordionItem } from 'carbon-components-react';
122 changes: 122 additions & 0 deletions packages/carbon-react/src/components/DatePicker/DatePicker.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/**
* 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.
*/

import React from 'react';
import { action } from '@storybook/addon-actions';
import {
DatePicker,
DatePickerInput,
DatePickerSkeleton,
} from 'carbon-components-react';

// const patterns = {
// 'Short (d{1,2}/d{4})': '\\d{1,2}/\\d{4}',
// 'Regular (d{1,2}/d{1,2}/d{4})': '\\d{1,2}/\\d{1,2}/\\d{4}',
// };

// const sizes = {
// 'Small (sm)': 'sm',
// 'Medium (md) - default': undefined,
// 'Large (lg)': 'lg',
// };

// const types = {
// Simple: 'simple',
// Single: 'single',
// Range: 'range',
// };

const props = {
datePicker: () => ({
dateFormat: 'm/d/Y',
id: 'date-picker',
light: false,
datePickerType: 'single',
minDate: '11/15/2020',
maxDate: '11/01/2040',
disable: ['07/15/2021'],
onClose: action('onClose'),
onOpen: action('onOpen'),
}),
datePickerInput: () => ({
id: 'date-picker-input-id',
className: 'some-class',
size: undefined,
labelText: 'Date Picker label',
pattern: 'd{1,2}/d{4}',
placeholder: 'mm/dd/yyyy',
disabled: false,
invalid: false,
invalidText: 'A valid date is required',
warn: false,
warnText: 'Selected dates may cause conflicts',
iconDescription: 'Icon description',
}),
};

export default {
title: 'Components/DatePicker',

parameters: {
component: DatePicker,

subcomponents: {
DatePickerInput,
DatePickerSkeleton,
},
},
};

export const Simple = () => (
<DatePicker datePickerType="simple">
<DatePickerInput
placeholder="mm/dd/yyyy"
labelText="Date Picker label"
id="date-picker-simple"
/>
</DatePicker>
);

export const SingleWithCalendar = () => (
<DatePicker datePickerType="single">
<DatePickerInput
placeholder="mm/dd/yyyy"
labelText="Date Picker label"
id="date-picker-single"
/>
</DatePicker>
);

export const RangeWithCalendar = () => {
return (
<DatePicker datePickerType="range">
<DatePickerInput
id="date-picker-input-id-start"
placeholder="mm/dd/yyyy"
labelText="Start date"
/>
<DatePickerInput
id="date-picker-input-id-finish"
placeholder="mm/dd/yyyy"
labelText="End date"
/>
</DatePicker>
);
};

/* eslint-disable react/prop-types */
export const DatePickerPlayground = () => (
<DatePicker {...props.datePicker()}>
<DatePickerInput {...props.datePickerInput()} />
{props.datePicker().datePickerType === 'range' && (
<DatePickerInput {...props.datePickerInput()} id="date-picker-input-2" />
)}
</DatePicker>
);
/* eslint-enable react/prop-types */

export const Skeleton = () => <DatePickerSkeleton range />;
Loading

0 comments on commit 5435207

Please sign in to comment.