react-day-picker 9.0.4 → 9.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/DayPicker.js +2 -6
  3. package/dist/cjs/DayPicker.js.map +1 -1
  4. package/dist/cjs/package.json +1 -0
  5. package/dist/cjs/selection/useRange.js +3 -19
  6. package/dist/cjs/selection/useRange.js.map +1 -1
  7. package/dist/cjs/utils/addToRange.d.ts +6 -2
  8. package/dist/cjs/utils/addToRange.js +68 -24
  9. package/dist/cjs/utils/addToRange.js.map +1 -1
  10. package/dist/esm/DayPicker.js +2 -6
  11. package/dist/esm/DayPicker.js.map +1 -1
  12. package/dist/esm/selection/useRange.js +3 -19
  13. package/dist/esm/selection/useRange.js.map +1 -1
  14. package/dist/esm/utils/addToRange.d.ts +6 -2
  15. package/dist/esm/utils/addToRange.js +68 -24
  16. package/dist/esm/utils/addToRange.js.map +1 -1
  17. package/examples/MultipleRequired.tsx +7 -0
  18. package/examples/RangeMinMax.test.tsx +5 -16
  19. package/examples/RangeMinMax.tsx +5 -6
  20. package/examples/RangeRequired.tsx +30 -0
  21. package/examples/RangeShiftKey.tsx +1 -3
  22. package/examples/__snapshots__/Range.test.tsx.snap +26 -0
  23. package/examples/__snapshots__/StylingCssModules.test.tsx.snap +11 -0
  24. package/examples/index.ts +2 -0
  25. package/package.json +7 -7
  26. package/src/DayPicker.tsx +12 -7
  27. package/src/selection/useRange.test.tsx +2 -2
  28. package/src/selection/useRange.tsx +3 -25
  29. package/src/style.css +11 -5
  30. package/src/style.module.css +12 -6
  31. package/src/utils/addToRange.test.ts +95 -97
  32. package/src/utils/addToRange.ts +64 -28
  33. package/website/docs/docs/accessibility.mdx +1 -1
  34. package/website/docs/docs/selection-modes.mdx +51 -75
  35. package/website/docs/guides/custom-components.mdx +16 -88
  36. package/website/docs/intro.mdx +1 -1
  37. package/website/docs/upgrading.mdx +4 -9
  38. package/website/README.md +0 -25
@@ -6,12 +6,9 @@ sidebar_position: 5
6
6
 
7
7
  This release includes important updates related to accessibility, styles, internationalization and performance. See the [changelog](./changelog.mdx) for the full list of changes.
8
8
 
9
- <details>
10
- <summary>**Upgrading from v7**</summary>
11
-
12
- If you are upgrading from v7, this guide is still valid for you. Read first the [migration guide from v7 to v8](#upgrade-from-v7-to-v8) and then follow the steps below.
9
+ #### Upgrading from v7
13
10
 
14
- </details>
11
+ If you are upgrading from v7, this guide is still valid for you. Read first the [migration guide from v7 to v8](../versioned_docs/version-8.10.1/upgrading.mdx) and then follow the steps below.
15
12
 
16
13
  ## Checklist
17
14
 
@@ -21,12 +18,10 @@ If you are upgrading from v7, this guide is still valid for you. Read first the
21
18
  npm install react-day-picker@latest
22
19
  ```
23
20
 
24
- Remove `date-fns` from your dependencies if you are not using it directly in your code.
25
-
26
- - Note: You still need `date-fns` if you need to use a [different locale](./docs/localization.mdx).
21
+ Remove `date-fns` from your dependencies if you are not using it directly in your code, like when using a [different locale](./docs/localization.mdx).
27
22
 
28
23
  ```bash npm2yarn
29
- npm uninstall date-fns
24
+ npm remove date-fns
30
25
  ```
31
26
 
32
27
  ### 2. Update your custom styles
package/website/README.md DELETED
@@ -1,25 +0,0 @@
1
- # DayPicker Website
2
-
3
- The DayPicker website hosted at https://daypicker.dev is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4
-
5
- ### Installation
6
-
7
- ```
8
- $ npm
9
- ```
10
-
11
- ### Local Development
12
-
13
- ```
14
- $ npm start
15
- ```
16
-
17
- This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18
-
19
- ### Build
20
-
21
- ```
22
- $ npm build
23
- ```
24
-
25
- This command generates static content into the `build` directory and can be served using any static contents hosting service.