forked from Skyscanner/backpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KOA-4741]: Enable calendar range support (Skyscanner#2268)
* [skip ci][KOA-4741]: Adding calendar range support * [KOA-4759]: Add new props to support ranges (Skyscanner#2269) * [KOA 4760] range logic implementation (Skyscanner#2280) * [KOA-4759]: Add new props to support ranges (Skyscanner#2269) * [KOA-4760]: Add range logic implementation to calendar * [KOA-4761]: Implement range styles (Skyscanner#2282) * [KOA-4761]: Implement range styles for Calendar * [KOA-4761]: Updating snapshots for calendar and adjusting regex * Fixing widths being of fixed size * [KOA-4761]: Cleaning up changes as part of range implementation (Skyscanner#2289) * [KOA-4761]: Implement range styles for Calendar * [KOA-4761]: Updating snapshots for calendar and adjusting regex * Fixing widths being of fixed size * [KOA-4761]: Cleaning up changes as part of range implementation * Adding updated snapshot tests
- Loading branch information
1 parent
0c3af4c
commit 04e8372
Showing
58 changed files
with
4,065 additions
and
2,786 deletions.
There are no files selected for viewing
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
Binary file modified
BIN
-291 Bytes
(99%)
..._/storyshots-test-js-visual-tests-bpk-component-calendar-visual-test-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.1 KB
...yshots-test-js-visual-tests-bpk-component-calendar-visual-test-range-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-124 Bytes
(100%)
...storyshots-test-js-visual-tests-bpk-component-datepicker-visual-test-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.2 KB
...hots-test-js-visual-tests-bpk-component-datepicker-visual-test-range-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.38 KB
(91%)
...s-test-js-visual-tests-bpk-component-scrollable-calendar-visual-test-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+27.9 KB
...-js-visual-tests-bpk-component-scrollable-calendar-visual-test-range-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,30 @@ | ||
**Breaking:** | ||
|
||
- bpk-component-calendar: | ||
- bpk-component-datepicker: | ||
- bpk-component-scrollable-calendar: | ||
- Added range support to BpkCalendar | ||
- Added new `selectionConfiguration` property to Backpack calendar to allow for range support. | ||
- `selectedDate` has been deprecated in favour of `selectionConfiguration`. instead of passing `selectedDate` you would now provide the following | ||
```js | ||
selectedConfiguration: { | ||
type: CALENDAR_SELECTION_TYPE.single, | ||
date: new Date() // or the value you passed to `selectedDate`. | ||
} | ||
``` | ||
- `selectionStart` and `selectionEnd` has been deprecated in favour of `selectionConfiguration`. instead of passing `selectionStart` and `selectionEnd` you would now provide the following | ||
```js | ||
selectedConfiguration: { | ||
type: CALENDAR_SELECTION_TYPE.range, | ||
startDate: new Date() // or the value you passed to `selectionStart`. | ||
endDate: new Date() // or the value you passed to `selectionEnd`. | ||
} | ||
``` | ||
- Added styles to support range logic. | ||
- Updated calendar to Figma styles. | ||
- `showWeekendSeparator` prop has now been deprecated as its no longer part of the calendar design so can be removed. | ||
|
||
**Fixed:** | ||
|
||
- bpk-component-scrollable-calendar: | ||
- Fixed a reintroduced functionality of auto scrolling the calendar when a date is clicked, when the library was changed from `react-window` to `react-virtualized` |
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.