-
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.
feat(FluidDatePicker): implement
FluidDatePicker
(#12247)
* feat(FluidDatePicker): scaffold out initial react files * feat(FluidDatePicker): scaffold out more files * style(FluidDatePicker): add more styles for FluidDatePicker * style(FluidDatePicker): add single invalid styles * style(FluidDatePicker): clean up invalid, warn states on all variants * fix(FluidDatePicker): always show range icon in fluid state * fix(FluidDatePicker): add invalid, warn icons to simple fluiddatepicker * feat(FluidDatePicker): add invalid state to DatePicker * test(FluidDatePicker): add e2e tests, update snapshots * chore(FluidDatePicker): fix avt test name * test(FluidDatePicker): add API tests * chore(FluidForm): add FluidDatePicker to FluidForm story, style fixes * chore(storybook): fix playground, remove test examples * test(e2e): update id * Update packages/react/src/components/FluidDatePicker/FluidDatePicker.stories.js Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> * Update packages/react/src/components/FluidDatePicker/FluidDatePicker.stories.js Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> * Update packages/react/src/components/FluidDatePicker/FluidDatePicker.stories.js Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c51ce37
commit 5ee80eb
Showing
26 changed files
with
998 additions
and
6 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
e2e/components/FluidDatePicker/FluidDatePicker-test.e2e.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,67 @@ | ||
/** | ||
* Copyright IBM Corp. 2022 | ||
* | ||
* 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('FluidDatePicker', () => { | ||
themes.forEach((theme) => { | ||
test.describe(theme, () => { | ||
test('fluid date picker (range) @vrt', async ({ page }) => { | ||
await snapshotStory(page, { | ||
component: 'FluidDatePicker', | ||
id: 'experimental-unstable-fluiddatepicker--range-with-calendar', | ||
theme, | ||
}); | ||
}); | ||
|
||
test('fluid date picker (single) @vrt', async ({ page }) => { | ||
await snapshotStory(page, { | ||
component: 'FluidDatePicker', | ||
id: 'experimental-unstable-fluiddatepicker--single', | ||
theme, | ||
}); | ||
}); | ||
|
||
test('fluid date picker (simple) @vrt', async ({ page }) => { | ||
await snapshotStory(page, { | ||
component: 'FluidDatePicker', | ||
id: 'experimental-unstable-fluiddatepicker--simple', | ||
theme, | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
test('accessibility-checker @avt', async ({ page }) => { | ||
await visitStory(page, { | ||
component: 'FluidDatePicker', | ||
id: 'experimental-unstable-fluiddatepicker--range-with-calendar', | ||
globals: { | ||
theme: 'white', | ||
}, | ||
}); | ||
await visitStory(page, { | ||
component: 'FluidDatePicker', | ||
id: 'experimental-unstable-fluiddatepicker--single', | ||
globals: { | ||
theme: 'white', | ||
}, | ||
}); | ||
await visitStory(page, { | ||
component: 'FluidDatePicker', | ||
id: 'experimental-unstable-fluiddatepicker--simple', | ||
globals: { | ||
theme: 'white', | ||
}, | ||
}); | ||
await expect(page).toHaveNoACViolations('FluidDatePicker'); | ||
}); | ||
}); |
9 changes: 9 additions & 0 deletions
9
packages/carbon-components-react/scss/components/fluid-date-picker/_fluid-date-picker.scss
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,9 @@ | ||
// Code generated by carbon-components-react. DO NOT EDIT. | ||
// | ||
// 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. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/fluid-date-picker/fluid-date-picker'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-components-react/scss/components/fluid-date-picker/_index.scss
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,9 @@ | ||
// Code generated by carbon-components-react. DO NOT EDIT. | ||
// | ||
// 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. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/fluid-date-picker'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-components/scss/components/fluid-date-picker/_fluid-date-picker.scss
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,9 @@ | ||
// Code generated by carbon-components. DO NOT EDIT. | ||
// | ||
// 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. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/fluid-date-picker/fluid-date-picker'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-components/scss/components/fluid-date-picker/_index.scss
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,9 @@ | ||
// Code generated by carbon-components. DO NOT EDIT. | ||
// | ||
// 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. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/fluid-date-picker'; |
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
9 changes: 9 additions & 0 deletions
9
packages/react/scss/components/fluid-date-picker/_fluid-date-picker.scss
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,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// 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. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/fluid-date-picker/fluid-date-picker'; |
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,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// 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. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/fluid-date-picker'; |
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
Oops, something went wrong.