-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 8911-percy-snaps
- Loading branch information
Showing
286 changed files
with
5,802 additions
and
1,118 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file added
BIN
+17.4 KB
.yarn/cache/@es-joy-jsdoccomment-npm-0.8.0-alpha.2-d987641165-cb6b06a836.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 removed
BIN
-10.3 KB
.yarn/cache/array.prototype.flatmap-npm-1.2.3-5a87b1ccec-d0f96793d3.zip
Binary file not shown.
Binary file added
BIN
+10.3 KB
.yarn/cache/array.prototype.flatmap-npm-1.2.4-77697fdbe6-1d32ec6747.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+62.6 KB
...query-npm-2.1.1-26d0ef1417-75626cdef3.zip → ...query-npm-2.2.0-6553738f52-96b8c7d807.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 renamed
BIN
+2.92 KB
...obals-npm-1.0.9-c5c9ec32d2-585f244fc0.zip → ...bals-npm-1.0.10-ecb768852b-7ccdc44c2c.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-5.61 KB
.yarn/cache/damerau-levenshtein-npm-1.0.5-8c317500ae-d15159bc73.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 removed
BIN
-27.8 KB
.yarn/cache/eslint-config-airbnb-base-npm-14.0.0-63c6ef8766-136596aecc.zip
Binary file not shown.
Binary file added
BIN
+29.3 KB
.yarn/cache/eslint-config-airbnb-base-npm-14.2.1-50131c00fb-858bea748a.zip
Binary file not shown.
Binary file removed
BIN
-22.4 KB
.yarn/cache/eslint-config-airbnb-npm-18.0.1-c51c64fcfa-58df7f039c.zip
Binary file not shown.
Binary file added
BIN
+23.4 KB
.yarn/cache/eslint-config-airbnb-npm-18.2.1-19125926b3-ea11cd0006.zip
Binary file not shown.
Binary file removed
BIN
-21.1 KB
.yarn/cache/eslint-config-prettier-npm-6.9.0-694692a385-9f0ea25534.zip
Binary file not shown.
Binary file added
BIN
+8.97 KB
.yarn/cache/eslint-config-prettier-npm-8.3.0-f540cd1f53-df4cea3032.zip
Binary file not shown.
Binary file removed
BIN
-4.16 KB
.yarn/cache/eslint-import-resolver-node-npm-0.3.3-9648418358-f373b986f1.zip
Binary file not shown.
Binary file added
BIN
+4.28 KB
.yarn/cache/eslint-import-resolver-node-npm-0.3.4-fa0173d267-a0db55ec26.zip
Binary file not shown.
Binary file removed
BIN
-11.7 KB
.yarn/cache/eslint-module-utils-npm-2.5.2-5962609579-5a76349a37.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+19.2 KB
...ress-npm-2.11.2-d1caa76747-b1e68f13d7.zip → ...ress-npm-2.11.3-c5cf5f6323-793286f62a.zip
Binary file not shown.
Binary file removed
BIN
-336 KB
.yarn/cache/eslint-plugin-import-npm-2.20.0-5384efc21f-175eb7b392.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-227 KB
.yarn/cache/eslint-plugin-jsdoc-npm-20.4.0-7a9463114f-dbf61faad1.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-200 KB
.yarn/cache/eslint-plugin-jsx-a11y-npm-6.2.3-7fdc63b66f-2e9f0ff285.zip
Binary file not shown.
Binary file added
BIN
+209 KB
.yarn/cache/eslint-plugin-jsx-a11y-npm-6.4.1-c0ffc3303a-3032627638.zip
Binary file not shown.
Binary file removed
BIN
-13.5 KB
.yarn/cache/eslint-plugin-prettier-npm-3.1.2-3a4770254f-f591459f69.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-29.8 KB
.yarn/cache/eslint-plugin-react-hooks-npm-4.0.4-5302161b89-b7f77abed6.zip
Binary file not shown.
Binary file added
BIN
+32.5 KB
.yarn/cache/eslint-plugin-react-hooks-npm-4.2.0-e09b1ea4ce-ead5c5be3d.zip
Binary file not shown.
Binary file removed
BIN
-194 KB
.yarn/cache/eslint-plugin-react-npm-7.18.0-f2c3c39e20-85bb93398f.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 renamed
BIN
+9.07 KB
...-keys-npm-1.1.0-58aec922ec-1cb5616063.zip → ...-keys-npm-1.3.0-c07780a0fb-37a19b712f.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 renamed
BIN
+6.1 KB
...curse-npm-4.2.1-9ebee4c3b1-3f05f9b650.zip → ...curse-npm-4.3.0-10b86a887a-ebc17b1a33.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 added
BIN
+86.2 KB
.yarn/cache/jsdoc-type-pratt-parser-npm-1.0.0-alpha.23-54067d727f-a174d04aee.zip
Binary file not shown.
Binary file added
BIN
+82.9 KB
.yarn/cache/jsdoc-type-pratt-parser-npm-1.0.8-6766196e7d-21f8c08918.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 added
BIN
+196 KB
.yarn/cache/language-subtag-registry-npm-0.3.21-b2d9abe624-5f794525a5.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 removed
BIN
-6.23 KB
.yarn/cache/object.entries-ponyfill-npm-1.0.1-bfe1b91103-c3edaf0c95.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 removed
BIN
-9 KB
.yarn/cache/regexp.prototype.flags-npm-1.3.0-656dcc7c37-b6b985a6d5.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 removed
BIN
-5.98 KB
.yarn/cache/spdx-expression-parse-npm-3.0.0-704f8535ae-308c8c4925.zip
Binary file not shown.
Binary file added
BIN
+5.97 KB
.yarn/cache/spdx-expression-parse-npm-3.0.1-b718cbb35a-a1c6e104a2.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-16.3 KB
.yarn/cache/string.prototype.matchall-npm-4.0.2-ee3186a639-c08c0db9aa.zip
Binary file not shown.
Binary file added
BIN
+16.5 KB
.yarn/cache/string.prototype.matchall-npm-4.0.5-d1090aaa50-0a9d64661e.zip
Binary file not shown.
Binary file added
BIN
+10.2 KB
.yarn/cache/string.prototype.trimend-npm-1.0.4-a656b8fe24-17e5aa45c3.zip
Binary file not shown.
Binary file removed
BIN
-8.54 KB
.yarn/cache/string.prototype.trimleft-npm-2.1.1-96b7e999e2-2581c73a37.zip
Binary file not shown.
Binary file removed
BIN
-8.58 KB
.yarn/cache/string.prototype.trimright-npm-2.1.1-6247e528ee-f02a1d15cd.zip
Binary file not shown.
Binary file added
BIN
+10.3 KB
.yarn/cache/string.prototype.trimstart-npm-1.0.4-b31f5e7c85-3fb06818d3.zip
Binary file not shown.
Binary file removed
BIN
-5.34 KB
.yarn/cache/stylelint-config-prettier-npm-8.0.1-8f42e5d899-663e7bba91.zip
Binary file not shown.
Binary file added
BIN
+7.77 KB
.yarn/cache/stylelint-config-prettier-npm-8.0.2-768ded0ce2-6a3bfdf840.zip
Binary file not shown.
Binary file removed
BIN
-3.8 KB
.yarn/cache/stylelint-config-recommended-npm-3.0.0-6b3f20fde3-8f02b2cd20.zip
Binary file not shown.
Binary file added
BIN
+4.02 KB
.yarn/cache/stylelint-config-recommended-npm-5.0.0-5268d1a05e-574468542e.zip
Binary file not shown.
Binary file removed
BIN
-7.5 KB
.yarn/cache/stylelint-config-standard-npm-20.0.0-a1b8c9cfbf-04d1a7d17c.zip
Binary file not shown.
Binary file added
BIN
+7.55 KB
.yarn/cache/stylelint-config-standard-npm-22.0.0-30e7e384f8-57497397c5.zip
Binary file not shown.
Binary file removed
BIN
-6.45 KB
.yarn/cache/stylelint-no-unsupported-browser-features-npm-4.0.0-332b8c6526-3cdc5afa4d.zip
Binary file not shown.
Binary file added
BIN
+4.55 KB
.yarn/cache/stylelint-no-unsupported-browser-features-npm-5.0.1-91f501ab91-9569911ff7.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 renamed
BIN
+80.4 KB
...args-npm-16.1.1-374a071ba7-0557e6fabb.zip → ...args-npm-16.2.0-547873d425-b14afbb51e.zip
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
122
packages/carbon-react/src/components/DatePicker/DatePicker.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 />; |
Oops, something went wrong.