From 4595df9b0eed61427755b61feb654d48364c6106 Mon Sep 17 00:00:00 2001 From: renovate <29139614+renovate@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:28:42 +0000 Subject: [PATCH] chore: bump up react-day-picker version to v9 (#7559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-day-picker](https://daypicker.dev) ([source](https://redirect.github.com/gpbl/react-day-picker)) | [`^8.10.1` -> `^9.0.0`](https://renovatebot.com/diffs/npm/react-day-picker/8.10.1/9.0.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-day-picker/9.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-day-picker/9.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-day-picker/8.10.1/9.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-day-picker/8.10.1/9.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
gpbl/react-day-picker (react-day-picker) ### [`v9.0.8`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.8) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.7...v9.0.8) This release fixes a regression in v9.0.7 affecting range mode. #### What's Changed - fix: update the displayed month only if start/end month change by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2358](https://redirect.github.com/gpbl/react-day-picker/pull/2358) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.7...v9.0.8 ### [`v9.0.7`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.7) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.6...v9.0.7) This release improves compatibility with v8 and fix an issue with the calendar navigation. #### What's Changed - fix: update calendar state when `startMonth` or `endMonth` change by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2343](https://redirect.github.com/gpbl/react-day-picker/pull/2343) - feat: allow partial locales, export `defaultLocale` by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2348](https://redirect.github.com/gpbl/react-day-picker/pull/2348) - feat: allow `undefined` as initially selected value, as it was in v8 by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2341](https://redirect.github.com/gpbl/react-day-picker/pull/2341) - docs: changed class name `calendar` to `root` in the examples by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2347](https://redirect.github.com/gpbl/react-day-picker/pull/2347) - docs: replaced deprecated props by [@​josephmarkus](https://redirect.github.com/josephmarkus) in [https://github.com/gpbl/react-day-picker/pull/2336](https://redirect.github.com/gpbl/react-day-picker/pull/2336)\* #### New Contributors - [@​josephmarkus](https://redirect.github.com/josephmarkus) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2336](https://redirect.github.com/gpbl/react-day-picker/pull/2336) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.6...v9.0.7 ### [`v9.0.6`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.6) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.5...v9.0.6) This release addresses the failed import of the common-js module for some app builder and add new `data-` attributes to help the integration with Tailwind. Thanks for your feedback! #### What's Changed - fix(build): add package.json to dist/cjs module by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2330](https://redirect.github.com/gpbl/react-day-picker/pull/2330) - feat: add new data-attributes to the day cells by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2331](https://redirect.github.com/gpbl/react-day-picker/pull/2331) #### New Contributors - [@​lesleh](https://redirect.github.com/lesleh) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2329](https://redirect.github.com/gpbl/react-day-picker/pull/2329) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.5...v9.0.6 ### [`v9.0.5`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.5) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.4...v9.0.5) This release improves the range mode behavior (see the [updated docs](https://daypicker.dev/docs/selection-modes#range-mode)) and address some styling issues. #### What's Changed - fix: improved range mode to work with min / required props by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2326](https://redirect.github.com/gpbl/react-day-picker/pull/2326) - fix(style): typo in css rdp-hidden module css breaking CSS builds by [@​ayuhito](https://redirect.github.com/ayuhito) in [https://github.com/gpbl/react-day-picker/pull/2307](https://redirect.github.com/gpbl/react-day-picker/pull/2307) - fix(style): borders grid are not collapsed by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2323](https://redirect.github.com/gpbl/react-day-picker/pull/2323) - fix(style): week numbers are now centered by [@​gpbl](https://redirect.github.com/gpbl) in https://github.com/gpbl/react-day-picker/commit/c919ad829c042c7af70b6a88d22c163e697b40d7 #### New Contributors - [@​ayuhito](https://redirect.github.com/ayuhito) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2307](https://redirect.github.com/gpbl/react-day-picker/pull/2307) - [@​rishabh-ink](https://redirect.github.com/rishabh-ink) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2311](https://redirect.github.com/gpbl/react-day-picker/pull/2311) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.4...v9.0.5 ### [`v9.0.4`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.4) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.3...v9.0.4) This release fixes some bugs and improves compatibility with v8.10. Thanks for your feedback and patience! πŸ€– #### What's Changed - fix(css): typo in `.rdp-range_end` by [@​AlessioDP](https://redirect.github.com/AlessioDP) in [https://github.com/gpbl/react-day-picker/pull/2298](https://redirect.github.com/gpbl/react-day-picker/pull/2298) - fix(css): dropdown is transparent in Windows OS by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2300](https://redirect.github.com/gpbl/react-day-picker/pull/2300) - fix: `endMonth` date not working as expected by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2301](https://redirect.github.com/gpbl/react-day-picker/pull/2301) - feat: added back `onDayMouseEnter` and `onDayMouseLeave` by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2304](https://redirect.github.com/gpbl/react-day-picker/pull/2304) #### New Contributors - [@​AlessioDP](https://redirect.github.com/AlessioDP) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2298](https://redirect.github.com/gpbl/react-day-picker/pull/2298) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.3...v9.0.4 ### [`v9.0.3`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.3) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.2...v9.0.3) This release fixes two issues found with the grid style and the range mode. #### What's Changed - fix: alignment of grid elements by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2294](https://redirect.github.com/gpbl/react-day-picker/pull/2294) - fix: range mode not updating when selected prop changes by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2295](https://redirect.github.com/gpbl/react-day-picker/pull/2295) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.2...v9.0.3 ### [`v9.0.2`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.2) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.1...v9.0.2) This update improves backward compatibility with v8.10.1 for range selection mode. #### What's Changed - feat: add `excludeDisabled` prop for range mode by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2290](https://redirect.github.com/gpbl/react-day-picker/pull/2290) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.1...v9.0.2 ### [`v9.0.1`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.1) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.0.0...v9.0.1) This update improves backward compatibility with v8.10.1. #### What's Changed - fix: prop types not being correctly interpreted by TS by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2283](https://redirect.github.com/gpbl/react-day-picker/pull/2283) - feat: add `DeprecatedUI` enum by [@​gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2284](https://redirect.github.com/gpbl/react-day-picker/pull/2284) **Full Changelog**: https://github.com/gpbl/react-day-picker/compare/v9.0.0...v9.0.1 ### [`v9.0.0`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.0.0) [Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v8.10.1...v9.0.0) DayPicker v9 is a major release including significant updates related to accessibility, customization and localization. - See the updated docs at https://daypicker.dev and the [upgrading Guide](https://daypicker.dev/upgrading) for more details. ##### Install the Latest Version ```bash npm install react-day-picker@latest ``` #### What’s New - Moved `date-fns` from peer dependencies to dependencies. - Added support for [UTC dates](https://daypicker.dev/docs/localization#utc-dates) and [Jalali Calendar](https://daypicker.dev/docs/localization#jalali-calendar). - [Enhanced accessibility](https://daypicker.dev/docs/accessibility) to better comply with [WCAG 2.1](https://www.w3.org/TR/WCAG21/) recommendations. - [Simplified styles](https://daypicker.dev/docs/styling) and new CSS variables for easier customization. - Improved selection logic for [range mode](https://daypicker.dev/docs/selection-modes.mdx). - New `dropdown-years` and `dropdown-months` caption layouts. - New `hideWeekdayRow` and `hideNavigation` props. - Updated for a complete [custom components](https://daypicker.dev/guides/custom-components) support. - Improved typings and props for better compatibility in TypeScript `strict` mode. #### Breaking Changes While we tried to keep the API as stable as possible, some breaking changes were necessary to improve the library: - The updated ARIA labels could require new translations or updated unit tests selectors. - Custom CSS styles will likely break, due to the updated CSS classes and simplified styles. - Custom Components have new API and may break. - Some typings have been renamed or deprecated. - The `useInput` hook has been removed. See [Input fields](https://daypicker.dev/guides/input-fields) guide for more details. - `onWeekNumberClick` has been removed. Use a custom component to handle week number clicks. - The updated build system to ESM and CommonJS could break some custom bundler. ##### Upgrading Guide We prepared a [Upgrading guide](https://daypicker.dev/upgrading) for help upgrading your app to v9. We welcome [feedback](https://redirect.github.com/gpbl/react-day-picker/discussions) about the upgrade process, to ensure it's smooth for everyone. #### Compatibility DayPicker v9 is compatible with React 16.8+. #### Get Support and Report Issues Get support, report issues, and provide feedback on the [Discussion forums](https://redirect.github.com/gpbl/react-day-picker/discussions). Thanks. #### New Contributors - [@​grzegorzpokorski](https://redirect.github.com/grzegorzpokorski) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2124](https://redirect.github.com/gpbl/react-day-picker/pull/2124) - [@​zaaakher](https://redirect.github.com/zaaakher) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2137](https://redirect.github.com/gpbl/react-day-picker/pull/2137) - [@​ArthurGoupil](https://redirect.github.com/ArthurGoupil) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2230](https://redirect.github.com/gpbl/react-day-picker/pull/2230) - [@​johnnysedh3lllo](https://redirect.github.com/johnnysedh3lllo) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2252](https://redirect.github.com/gpbl/react-day-picker/pull/2252) - [@​xardit](https://redirect.github.com/xardit) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2254](https://redirect.github.com/gpbl/react-day-picker/pull/2254) - [@​dave-meyer](https://redirect.github.com/dave-meyer) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2231](https://redirect.github.com/gpbl/react-day-picker/pull/2231) - [@​benasher44](https://redirect.github.com/benasher44) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2249](https://redirect.github.com/gpbl/react-day-picker/pull/2249) - [@​RyanCavanaugh](https://redirect.github.com/RyanCavanaugh) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2275](https://redirect.github.com/gpbl/react-day-picker/pull/2275) - [@​kesoji](https://redirect.github.com/kesoji) made their first contribution in [https://github.com/gpbl/react-day-picker/pull/2281](https://redirect.github.com/gpbl/react-day-picker/pull/2281)
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). --- packages/frontend/admin/package.json | 2 +- .../frontend/admin/src/components/ui/calendar.tsx | 13 ++++++++++--- yarn.lock | 15 ++++++++------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/frontend/admin/package.json b/packages/frontend/admin/package.json index a0fede15a2..dec637f26b 100644 --- a/packages/frontend/admin/package.json +++ b/packages/frontend/admin/package.json @@ -42,7 +42,7 @@ "lucide-react": "^0.438.0", "next-themes": "^0.3.0", "react": "^18.3.1", - "react-day-picker": "^8.10.1", + "react-day-picker": "^9.0.0", "react-dom": "^18.3.1", "react-hook-form": "^7.52.0", "react-resizable-panels": "^2.0.19", diff --git a/packages/frontend/admin/src/components/ui/calendar.tsx b/packages/frontend/admin/src/components/ui/calendar.tsx index 19f412500a..9b96b3eace 100644 --- a/packages/frontend/admin/src/components/ui/calendar.tsx +++ b/packages/frontend/admin/src/components/ui/calendar.tsx @@ -2,7 +2,7 @@ import { buttonVariants } from '@affine/admin/components/ui/button'; import { cn } from '@affine/admin/utils'; import { ChevronLeft, ChevronRight } from 'lucide-react'; import type * as React from 'react'; -import { DayPicker } from 'react-day-picker'; +import { Chevron, DayPicker } from 'react-day-picker'; export type CalendarProps = React.ComponentProps; @@ -51,8 +51,15 @@ function Calendar({ ...classNames, }} components={{ - IconLeft: () => , - IconRight: () => , + Chevron: props => { + if (props.orientation === 'left') { + return ; + } + if (props.orientation === 'right') { + return ; + } + return ; + }, }} {...props} /> diff --git a/yarn.lock b/yarn.lock index 54150c00b8..a879ecd1b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -205,7 +205,7 @@ __metadata: lucide-react: "npm:^0.438.0" next-themes: "npm:^0.3.0" react: "npm:^18.3.1" - react-day-picker: "npm:^8.10.1" + react-day-picker: "npm:^9.0.0" react-dom: "npm:^18.3.1" react-hook-form: "npm:^7.52.0" react-resizable-panels: "npm:^2.0.19" @@ -30838,13 +30838,14 @@ __metadata: languageName: node linkType: hard -"react-day-picker@npm:^8.10.1": - version: 8.10.1 - resolution: "react-day-picker@npm:8.10.1" +"react-day-picker@npm:^9.0.0": + version: 9.0.8 + resolution: "react-day-picker@npm:9.0.8" + dependencies: + date-fns: "npm:^3.6.0" peerDependencies: - date-fns: ^2.28.0 || ^3.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10/374056dca7fed70a154a3b0e98c6c746c26b4fc868548fa8f285ef3cab9679537e84c0c21ba7b6db67b3f7f54cc562f5d83efba2c7f2c7bd3705ac8992869607 + react: ">=16.8.0" + checksum: 10/8a941b71e29a07a6ef40e35e5f6f46a332537184b4d67d90093415c4ade6c66dc787c0f26ca0841b4ee8bca40b05fa881cd73d69a263720c4c3da1e3c0a7bb37 languageName: node linkType: hard