diff --git a/CHANGELOG.md b/CHANGELOG.md index a0ff3e7855..833f8415ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ # Changelog -Full release notes at https://github.com/gpbl/react-day-picker/releases +See [Releases on Github](https://github.com/gpbl/react-day-picker/releases). diff --git a/docs/guides/custom-components.mdx b/docs/advanced-guides/custom-components.mdx similarity index 100% rename from docs/guides/custom-components.mdx rename to docs/advanced-guides/custom-components.mdx diff --git a/docs/guides/custom-modifiers.mdx b/docs/advanced-guides/custom-modifiers.mdx similarity index 100% rename from docs/guides/custom-modifiers.mdx rename to docs/advanced-guides/custom-modifiers.mdx diff --git a/docs/guides/custom-selections.mdx b/docs/advanced-guides/custom-selections.mdx similarity index 100% rename from docs/guides/custom-selections.mdx rename to docs/advanced-guides/custom-selections.mdx diff --git a/docs/guides/input-fields.mdx b/docs/advanced-guides/input-fields.mdx similarity index 54% rename from docs/guides/input-fields.mdx rename to docs/advanced-guides/input-fields.mdx index 68d1b32bc0..31bb827e10 100644 --- a/docs/guides/input-fields.mdx +++ b/docs/advanced-guides/input-fields.mdx @@ -10,36 +10,6 @@ DayPicker follows the ARIA guidelines for date pickers, including keyboard navig See the following examples for guidance on how to create accessible date pickers with DayPicker. -## Examples - -### Date Picker inline - -In this scenario, you can use the `application` role. - ```tsx caption="render:DatePickerModal" ``` - -#### Explanation - -TODO - -### Date Picker in a Popover - -TODO - -#### Explanation - -TODO - -### Modal Dialog with Input Field - -In this scenario, an input field precedes date selection within a modal dialog: - -```tsx - -``` - -#### Explanation - -TODO diff --git a/docs/changelog.mdx b/docs/changelog.mdx deleted file mode 100644 index 3064c971e5..0000000000 --- a/docs/changelog.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -sort: 20 ---- - -_Introduction_ - -# Changelog - -WIP. diff --git a/docs/index.mdx b/docs/index.mdx index e1986d2c08..b5b1e61962 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -37,14 +37,22 @@ Use React DayPicker to create date pickers, calendars, and date inputs in your [ - **Flexible**: DayPicker is designed to be flexible and to fit your needs. You can use it to build date pickers, calendars, and date inputs. - **Modern**: DayPicker is built with modern technologies and follows the latest best practices in web development. -## Community - -Ask for help and share your experience with DayPicker in the [GitHub Discussions](/). +--- ## License DayPicker is released under the [MIT License](./development/license). +## Community + +Ask for help and share your experience with DayPicker. + +- [Discuss the project on GitHub](https://github.com/gpbl/react-day-picker/discussions) +- [Report an issue on GitHub](https://github.com/gpbl/react-day-picker/issues/new/choose) +- [Contribute to the project](./development/contributing) + ## Funding -Consider supporting DayPicker with a donation. DayPicker is an open-source project that is developed and maintained by one person. If you find it useful, please consider sponsoring the project. +Consider supporting DayPicker's maintainer with a donation. Your support helps to keep the project alive and keep it updated. + +- [Sponsor DayPicker on GitHub](https://github.com/sponsors/gpbl) diff --git a/docs/installing.mdx b/docs/installing.mdx deleted file mode 100644 index c8990c5a0b..0000000000 --- a/docs/installing.mdx +++ /dev/null @@ -1,38 +0,0 @@ ---- -sort: 2 -navigationLabel: Installing ---- - -_Introduction_ - -# Installing DayPicker - -## Install from npm - -DayPicker is available as an npm package and requires [date-fns](https://date-fns.org) as a peer dependency. - -```sh -npm install react-day-picker date-fns -``` - -## Basic Usage - -- To use DayPicker, import the `` component and its default style. -- Use the `mode` prop to enable the [selection mode](./selecting-days). - -```tsx title="App.jsx" caption="render:Start" -import "react-day-picker/style.css"; // Import the default style -import { DayPicker } from "react-day-picker"; - -import { useState } from "react"; - -export function App() { - const [selected, setSelected] = useState(); - - return ( -
- -
- ); -} -``` diff --git a/docs/releases.mdx b/docs/releases.mdx new file mode 100644 index 0000000000..df1420fca6 --- /dev/null +++ b/docs/releases.mdx @@ -0,0 +1,9 @@ +--- +sort: 10 +section: Introduction +title: Changelog +--- + +This page is a work in progress + +%include ../CHANGELOG.md diff --git a/docs/start.mdx b/docs/start.mdx new file mode 100644 index 0000000000..e555577ced --- /dev/null +++ b/docs/start.mdx @@ -0,0 +1,64 @@ +--- +sort: 2 +--- + +_Introduction_ + +# Installation + +DayPicker is available as `react-day-picker` npm package. It requires [date-fns](https://date-fns.org) as a peer dependency. + + + There's an [ongoing + discussion](https://github.com/gpbl/react-day-picker/discussions/1087) to + support other date libraries. + + +## Install from npm + +```sh +$ npm install react-day-picker date-fns +``` + +## Basic Usage + +To start using DayPicker, import the `` component and its default style. Assign the `selected` and `onSelect` props to manage the selected date. + +```tsx title="App.jsx" caption="render:Start" +import "react-day-picker/style.css"; // Import the default style +import { DayPicker } from "react-day-picker"; + +import { useState } from "react"; + +export function App() { + const [selected, setSelected] = useState(); + + return ( +
+ +
+ ); +} +``` + +## Getting Started + +Get started with DayPicker by reading the following guides. + +- [DayPicker Anatomy](/docs/using-daypicker/anatomy) - Learn about the different parts of the DayPicker component. + +### Using DayPicker + +- [Customization Props](/docs/using-daypicker/customization-props) - Read about the options available to customize the calendar and the months navigation. +- [Selection Modes](/docs/using-daypicker/selection-modes) - Allow users to select days by enabling single, multiple or range selections. +- [Styling](/docs/using-daypicker/styling) - Change the style to make DayPicker match your app's look and feel. +- [Localization](/docs/using-daypicker/localization) - Configure DayPicker to display the calendar in different languages and date formats. +- [Accessible Date Pickers](/accessibility) - Make your date picker accessible to all users, including those using screen readers. +- [DayPicker Playground](/playground) - Play with the props to try the different customization options. + +### Advanced Guides + +- [Input Fields](/advanced-guides/input-fields) - Learn how to use DayPicker with input fields and form libraries. +- [Custom Selections](/advanced-guides/custom-selections) - Create custom selection rules. +- [Custom Components](/advanced-guides/custom-components) - Use custom components to create a fully customized date picker. +- [Custom Modifiers](/advanced-guides/custom-modifiers) - Create custom modifiers to highlight specific days in the calendar. diff --git a/docs/accessibility.mdx b/docs/using-daypicker/accessibility.mdx similarity index 96% rename from docs/accessibility.mdx rename to docs/using-daypicker/accessibility.mdx index 569dbd8274..ca4e62eba4 100644 --- a/docs/accessibility.mdx +++ b/docs/using-daypicker/accessibility.mdx @@ -1,5 +1,5 @@ --- -sort: 10 +sort: 6 --- _Using DayPicker_ diff --git a/docs/using-daypicker/anatomy.mdx b/docs/using-daypicker/anatomy.mdx new file mode 100644 index 0000000000..849bd9db79 --- /dev/null +++ b/docs/using-daypicker/anatomy.mdx @@ -0,0 +1,13 @@ +--- +sort: 1 +--- + +_Using DayPicker_ + +# DayPicker Anatomy + +DayPicker is a user interface component that allows users to select dates from a calendar. This section provides an overview of the main UI elements that constitute DayPicker. + +## Key Elements + +> TODO: Add a diagram of DayPicker with callouts. diff --git a/docs/props.mdx b/docs/using-daypicker/customization-props.mdx similarity index 51% rename from docs/props.mdx rename to docs/using-daypicker/customization-props.mdx index c2b718480f..930887bc40 100644 --- a/docs/props.mdx +++ b/docs/using-daypicker/customization-props.mdx @@ -1,27 +1,15 @@ --- -sort: 4 +sort: 3 --- _Using DayPicker_ -# DayPicker Props +# Customization Props ## Calendar Options -TODO - ## Months Navigation -## Selection Modes - -### Single - -### Multiple - -### Range - -### Custom - ## Internationalization ## Styling diff --git a/docs/guides/localization.mdx b/docs/using-daypicker/localization.mdx similarity index 96% rename from docs/guides/localization.mdx rename to docs/using-daypicker/localization.mdx index 55b02d32ba..8c67c09b4a 100644 --- a/docs/guides/localization.mdx +++ b/docs/using-daypicker/localization.mdx @@ -1,12 +1,12 @@ --- -sort: 3 +sort: 5 --- -_Advanced Guides_ +_Using DayPicker_ # Localization -DayPicker can be localized in any language using the date-fns locale objects. +## Localization Props ## Change the Locale diff --git a/docs/using-daypicker/selection-modes.mdx b/docs/using-daypicker/selection-modes.mdx new file mode 100644 index 0000000000..587c3cc092 --- /dev/null +++ b/docs/using-daypicker/selection-modes.mdx @@ -0,0 +1,19 @@ +--- +sort: 4 +--- + +_Using DayPicker_ + +# Selection Modes + +## Single Selections + +## Multiple Selections + +## Range Selections + +## Custom Selections + +Create custom selection rules to allow or disallow specific dates. + +- See [Custom Selections](/advanced-guides/custom-selections) in the Advanced Guides diff --git a/docs/guides/styling.mdx b/docs/using-daypicker/styling.mdx similarity index 62% rename from docs/guides/styling.mdx rename to docs/using-daypicker/styling.mdx index 4b3d3a90bf..8f6fa17c52 100644 --- a/docs/guides/styling.mdx +++ b/docs/using-daypicker/styling.mdx @@ -1,18 +1,21 @@ --- -sort: 5 +sort: 2 --- _Using DayPicker_ -# Styling +# Styling and CSS -DayPicker comes with a minimal style inspired by MacOS date pickers and it's designed to be easily customized. +DayPicker comes with a minimal style inspired by MacOS date pickers, designed to be extended and customized. -## Importing the Default Style +You can also use your own styles, or use a CSS framework like [Tailwind CSS](https://tailwindcss.com) or [Bootstrap](https://getbootstrap.com) to style the calendar. -To start with the included style, import `react-day-picker/style.css` into your app. This will add the `.rdp` class names used by DayPicker. +## Using the Default Styles -### Using a React framework +To start with the included styles, import `react-day-picker/style.css` into your app. This will add the `.rdp` class names used by DayPicker. + +
+Using a bundler or a React framework If you are using a React framework, such as [Next.js](http://nextjs.org) or [Gatsby](https://www.gatsbyjs.com), or a bundler like Webpack with [css-loader](https://webpack.js.org/loaders/css-loader/), import the CSS file from your app's main JavaScript or TypeScript file: @@ -20,7 +23,10 @@ If you are using a React framework, such as [Next.js](http://nextjs.org) or [Gat import "react-day-picker/style.css"; ``` -### From a CDN +
+ +
+Importing from a CDN If you are using a CDN, add the following link to your HTML file: @@ -28,7 +34,10 @@ If you are using a CDN, add the following link to your HTML file: ``` -### Usage with CSS Modules +
+ +
+Importing the CSS Module When using CSS modules, you can import `style.module.css`. Pass the class names to the `classNames` prop. @@ -41,13 +50,13 @@ export function DatePicker() { } ``` -From here, you have different options to customize the appearance of the calendar, depending on your project setup. +
-## Setting a Dark or a Light Mode +### Dark/Light Mode > TODO: this section is still incomplete. -## Using the `rdp-` CSS Variables +### CSS Variables The default styles use CSS variables to make it easier to customize the base appearance of the calendar. You can override the CSS variables to change the appearance of the calendar. @@ -62,33 +71,19 @@ The following table lists the CSS variables used by DayPicker: > TODO: this section is still incomplete. -## Overriding the Style via CSS +--- -To further customize the styles, override the DayPicker CSS. For example, to change the background color of the day cells, add this style sheet to your `global.css` or `app.css`. +## Custom Styles -```css title="global.css" -/* Change the background color of the day cell. */ -.rdp-day { - background-color: #f0f0f0; -} -``` +Use the `classNames` prop to use other classnames instead of the default ones. -## Integration with Tailwind CSS +### Tailwind CSS > TODO: this section is still incomplete. -```tsx filename="App.tsx" {4} -import { DayPicker } from "react-day-picker"; -import "react-day-picker/style.css"; - -import "./App.css"; // Import your custom styles to override the default CSS - -function App() { - return ; -} -``` +### Custom CSS -## Basic Inline Styles Support +### Inline Styles To change the appearance of any DayPicker element via inline-styles use the `styles` prop. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e492c1d54..c85b4200f2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -122,6 +122,9 @@ importers: website: dependencies: + '@hashicorp/remark-plugins': + specifier: ^4.1.1 + version: 4.1.1 '@jsdevtools/rehype-toc': specifier: ^3.0.2 version: 3.0.2 @@ -169,7 +172,7 @@ importers: version: 10.0.1(esbuild@0.20.0) next: specifier: 14.1.0 - version: 14.1.0(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 14.1.0(@babel/core@7.12.9)(react-dom@18.2.0)(react@18.2.0) next-themes: specifier: ^0.2.1 version: 0.2.1(next@14.1.0)(react-dom@18.2.0)(react@18.2.0) @@ -203,9 +206,18 @@ importers: remark-gfm: specifier: ^4.0.0 version: 4.0.0 + remark-github: + specifier: ^12.0.0 + version: 12.0.0 + remark-include: + specifier: ^2.0.0 + version: 2.0.0 shiki: specifier: ^1.1.7 version: 1.1.7 + unist-util-visit: + specifier: ^5.0.0 + version: 5.0.0 devDependencies: '@types/node': specifier: ^20.11.20 @@ -231,6 +243,9 @@ importers: prettier-plugin-tailwindcss: specifier: ^0.5.11 version: 0.5.11(prettier-plugin-jsdoc@1.3.0)(prettier-plugin-organize-imports@3.2.4)(prettier@3.2.5) + remark: + specifier: ^15.0.1 + version: 15.0.1 tailwindcss: specifier: ^3.4.1 version: 3.4.1(ts-node@10.9.2) @@ -259,6 +274,7 @@ packages: dependencies: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 + dev: true /@babel/code-frame@7.22.13: resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} @@ -278,6 +294,31 @@ packages: /@babel/compat-data@7.23.2: resolution: {integrity: sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==} engines: {node: '>=6.9.0'} + dev: true + + /@babel/core@7.12.9: + resolution: {integrity: sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.0 + '@babel/helper-module-transforms': 7.23.0(@babel/core@7.12.9) + '@babel/helpers': 7.23.2 + '@babel/parser': 7.23.0 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.2 + '@babel/types': 7.23.0 + convert-source-map: 1.9.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + lodash: 4.17.21 + resolve: 1.22.8 + semver: 5.7.2 + source-map: 0.5.7 + transitivePeerDependencies: + - supports-color + dev: false /@babel/core@7.23.2: resolution: {integrity: sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==} @@ -300,6 +341,7 @@ packages: semver: 6.3.1 transitivePeerDependencies: - supports-color + dev: true /@babel/generator@7.23.0: resolution: {integrity: sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==} @@ -319,6 +361,7 @@ packages: browserslist: 4.22.3 lru-cache: 5.1.1 semver: 6.3.1 + dev: true /@babel/helper-environment-visitor@7.22.20: resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} @@ -343,6 +386,20 @@ packages: dependencies: '@babel/types': 7.23.0 + /@babel/helper-module-transforms@7.23.0(@babel/core@7.12.9): + resolution: {integrity: sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.12.9 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: false + /@babel/helper-module-transforms@7.23.0(@babel/core@7.23.2): resolution: {integrity: sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==} engines: {node: '>=6.9.0'} @@ -355,11 +412,15 @@ packages: '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 + dev: true + + /@babel/helper-plugin-utils@7.10.4: + resolution: {integrity: sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==} + dev: false /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} - dev: true /@babel/helper-simple-access@7.22.5: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} @@ -384,6 +445,7 @@ packages: /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} + dev: true /@babel/helpers@7.23.2: resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} @@ -420,6 +482,18 @@ packages: dependencies: '@babel/types': 7.23.0 + /@babel/plugin-proposal-object-rest-spread@7.12.1(@babel/core@7.12.9): + resolution: {integrity: sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.12.9 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.12.9) + '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.12.9) + dev: false + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.23.2): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -465,6 +539,15 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true + /@babel/plugin-syntax-jsx@7.12.1(@babel/core@7.12.9): + resolution: {integrity: sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.12.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: false + /@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.23.2): resolution: {integrity: sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==} engines: {node: '>=6.9.0'} @@ -502,6 +585,15 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.12.9): + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.12.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: false + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.2): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: @@ -549,6 +641,16 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true + /@babel/plugin-transform-parameters@7.23.3(@babel/core@7.12.9): + resolution: {integrity: sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.12.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: false + /@babel/runtime@7.23.5: resolution: {integrity: sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==} engines: {node: '>=6.9.0'} @@ -888,6 +990,22 @@ packages: resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} dev: false + /@hashicorp/remark-plugins@4.1.1: + resolution: {integrity: sha512-4BO5ZyS2U9H4CIJVUUb1rYzn6ZT5zRYOHDTv27EDAwhjS3YHgK/23otdMsxLhan7A4laYPC95d8a8SuP4Djnuw==} + dependencies: + '@mdx-js/util': 1.6.22 + github-slugger: 1.5.0 + remark: 12.0.1 + remark-mdx: 1.6.22 + to-vfile: 6.1.0 + unist-util-flatmap: 1.0.0 + unist-util-is: 4.1.0 + unist-util-map: 2.0.1 + unist-util-visit: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: false + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -1259,6 +1377,10 @@ packages: react: 18.2.0 dev: false + /@mdx-js/util@1.6.22: + resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==} + dev: false + /@next/env@14.1.0: resolution: {integrity: sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw==} dev: false @@ -2774,6 +2896,12 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true + /@types/mdast@3.0.15: + resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + dependencies: + '@types/unist': 2.0.10 + dev: false + /@types/mdast@4.0.3: resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==} dependencies: @@ -3565,9 +3693,12 @@ packages: babel-preset-current-node-syntax: 1.0.1(@babel/core@7.23.2) dev: true + /bail@1.0.5: + resolution: {integrity: sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==} + dev: false + /bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} - dev: false /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -3661,6 +3792,10 @@ packages: /caniuse-lite@1.0.30001583: resolution: {integrity: sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q==} + /ccount@1.1.0: + resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} + dev: false + /ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false @@ -3694,17 +3829,33 @@ packages: engines: {node: '>=10'} dev: true + /character-entities-html4@1.1.4: + resolution: {integrity: sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==} + dev: false + /character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} dev: false + /character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + dev: false + /character-entities-legacy@3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} dev: false + /character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + dev: false + /character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + /character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + dev: false + /character-reference-invalid@2.0.1: resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} dev: false @@ -3759,6 +3910,10 @@ packages: engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} dev: true + /collapse-white-space@1.0.6: + resolution: {integrity: sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==} + dev: false + /collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} dev: false @@ -3812,8 +3967,13 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /convert-source-map@1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + dev: false + /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + dev: true /create-jest@29.7.0(@types/node@20.11.20)(ts-node@10.9.2): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} @@ -4797,7 +4957,6 @@ packages: /extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - dev: false /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -4999,6 +5158,10 @@ packages: resolve-pkg-maps: 1.0.0 dev: true + /github-slugger@1.5.0: + resolution: {integrity: sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==} + dev: false + /github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} dev: false @@ -5352,7 +5515,6 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /inline-style-parser@0.1.1: resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} @@ -5377,10 +5539,26 @@ packages: loose-envify: 1.4.0 dev: false + /is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + dev: false + /is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} dev: false + /is-alphanumeric@1.0.0: + resolution: {integrity: sha512-ZmRL7++ZkcMOfDuWZuMJyIVLr2keE1o/DeNWh1EmgqGhUcV+9BIVsx0BcSBOHTZqzjs4+dISzr2KAeBEWGgXeA==} + engines: {node: '>=0.10.0'} + dev: false + + /is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + dev: false + /is-alphanumerical@2.0.1: resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} dependencies: @@ -5435,6 +5613,15 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + dev: false + + /is-buffer@2.0.5: + resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} + engines: {node: '>=4'} + dev: false + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -5452,6 +5639,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + dev: false + /is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} dev: false @@ -5493,6 +5684,10 @@ packages: dependencies: is-extglob: 2.1.1 + /is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + dev: false + /is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} dev: false @@ -5522,6 +5717,11 @@ packages: engines: {node: '>=8'} dev: true + /is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + dev: false + /is-plain-obj@3.0.0: resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} engines: {node: '>=10'} @@ -5530,7 +5730,6 @@ packages: /is-plain-obj@4.1.0: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - dev: false /is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -5603,6 +5802,14 @@ packages: get-intrinsic: 1.2.2 dev: true + /is-whitespace-character@1.0.4: + resolution: {integrity: sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==} + dev: false + + /is-word-character@1.0.4: + resolution: {integrity: sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==} + dev: false + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -6324,11 +6531,13 @@ packages: /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true + + /longest-streak@2.0.4: + resolution: {integrity: sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==} + dev: false /longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} - dev: false /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} @@ -6344,6 +6553,7 @@ packages: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: yallist: 3.1.1 + dev: true /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} @@ -6377,11 +6587,21 @@ packages: tmpl: 1.0.5 dev: true + /markdown-escapes@1.0.4: + resolution: {integrity: sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==} + dev: false + /markdown-extensions@2.0.0: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} dev: false + /markdown-table@2.0.0: + resolution: {integrity: sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==} + dependencies: + repeat-string: 1.6.1 + dev: false + /markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} dev: false @@ -6392,6 +6612,12 @@ packages: hasBin: true dev: false + /mdast-util-compact@2.0.1: + resolution: {integrity: sha512-7GlnT24gEwDrdAwEHrU4Vv5lLWrEer4KOkAiKT9nYstsTad7Oc1TwqT2zIMKRdZF7cTuaf+GA1E4Kv7jJh8mPA==} + dependencies: + unist-util-visit: 2.0.3 + dev: false + /mdast-util-find-and-replace@3.0.1: resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} dependencies: @@ -6564,7 +6790,6 @@ packages: dependencies: '@types/mdast': 4.0.3 unist-util-is: 6.0.0 - dev: false /mdast-util-to-hast@13.1.0: resolution: {integrity: sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==} @@ -6591,7 +6816,6 @@ packages: micromark-util-decode-string: 2.0.0 unist-util-visit: 5.0.0 zwitch: 2.0.4 - dev: false /mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} @@ -7033,12 +7257,12 @@ packages: react: '*' react-dom: '*' dependencies: - next: 14.1.0(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + next: 14.1.0(@babel/core@7.12.9)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /next@14.1.0(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0): + /next@14.1.0(@babel/core@7.12.9)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q==} engines: {node: '>=18.17.0'} hasBin: true @@ -7061,7 +7285,7 @@ packages: postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.12.9)(react@18.2.0) optionalDependencies: '@next/swc-darwin-arm64': 14.1.0 '@next/swc-darwin-x64': 14.1.0 @@ -7247,6 +7471,17 @@ packages: callsites: 3.1.0 dev: true + /parse-entities@2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + dev: false + /parse-entities@4.0.1: resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} dependencies: @@ -7798,6 +8033,23 @@ packages: - supports-color dev: false + /remark-github@12.0.0: + resolution: {integrity: sha512-ByefQKFN184LeiGRCabfl7zUJsdlMYWEhiLX1gpmQ11yFg6xSuOTW7LVCv0oc1x+YvUMJW23NU36sJX2RWGgvg==} + dependencies: + '@types/mdast': 4.0.3 + mdast-util-find-and-replace: 3.0.1 + mdast-util-to-string: 4.0.0 + to-vfile: 8.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + dev: false + + /remark-include@2.0.0: + resolution: {integrity: sha512-KA7zJwIJtbynyrhhPGMUOZVthxhr5TkRCjutB5lg3bCCU2ecmIMAh4i1y+qolQ9f1P76V4tb0TWfo/TCgYNjkQ==} + dependencies: + vfile: 2.3.0 + dev: false + /remark-mdx-frontmatter@4.0.0: resolution: {integrity: sha512-PZzAiDGOEfv1Ua7exQ8S5kKxkD8CDaSb4nM+1Mprs6u8dyvQifakh+kCj6NovfGXW+bTvrhjaR3srzjS2qJHKg==} dependencies: @@ -7809,6 +8061,21 @@ packages: yaml: 2.3.4 dev: false + /remark-mdx@1.6.22: + resolution: {integrity: sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ==} + dependencies: + '@babel/core': 7.12.9 + '@babel/helper-plugin-utils': 7.10.4 + '@babel/plugin-proposal-object-rest-spread': 7.12.1(@babel/core@7.12.9) + '@babel/plugin-syntax-jsx': 7.12.1(@babel/core@7.12.9) + '@mdx-js/util': 1.6.22 + is-alphabetical: 1.0.4 + remark-parse: 8.0.3 + unified: 9.2.0 + transitivePeerDependencies: + - supports-color + dev: false + /remark-mdx@3.0.0: resolution: {integrity: sha512-O7yfjuC6ra3NHPbRVxfflafAj3LTwx3b73aBvkEFU5z4PsD6FD4vrqJAkE5iNGLz71GdjXfgRqm3SQ0h0VuE7g==} dependencies: @@ -7827,6 +8094,26 @@ packages: unified: 11.0.4 transitivePeerDependencies: - supports-color + + /remark-parse@8.0.3: + resolution: {integrity: sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==} + dependencies: + ccount: 1.1.0 + collapse-white-space: 1.0.6 + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + is-whitespace-character: 1.0.4 + is-word-character: 1.0.4 + markdown-escapes: 1.0.4 + parse-entities: 2.0.0 + repeat-string: 1.6.1 + state-toggle: 1.0.3 + trim: 0.0.1 + trim-trailing-lines: 1.1.4 + unherit: 1.1.3 + unist-util-remove-position: 2.0.1 + vfile-location: 3.2.0 + xtend: 4.0.2 dev: false /remark-rehype@11.1.0: @@ -7845,6 +8132,53 @@ packages: '@types/mdast': 4.0.3 mdast-util-to-markdown: 2.1.0 unified: 11.0.4 + + /remark-stringify@8.1.1: + resolution: {integrity: sha512-q4EyPZT3PcA3Eq7vPpT6bIdokXzFGp9i85igjmhRyXWmPs0Y6/d2FYwUNotKAWyLch7g0ASZJn/KHHcHZQ163A==} + dependencies: + ccount: 1.1.0 + is-alphanumeric: 1.0.0 + is-decimal: 1.0.4 + is-whitespace-character: 1.0.4 + longest-streak: 2.0.4 + markdown-escapes: 1.0.4 + markdown-table: 2.0.0 + mdast-util-compact: 2.0.1 + parse-entities: 2.0.0 + repeat-string: 1.6.1 + state-toggle: 1.0.3 + stringify-entities: 3.1.0 + unherit: 1.1.3 + xtend: 4.0.2 + dev: false + + /remark@12.0.1: + resolution: {integrity: sha512-gS7HDonkdIaHmmP/+shCPejCEEW+liMp/t/QwmF0Xt47Rpuhl32lLtDV1uKWvGoq+kxr5jSgg5oAIpGuyULjUw==} + dependencies: + remark-parse: 8.0.3 + remark-stringify: 8.1.1 + unified: 9.2.2 + dev: false + + /remark@15.0.1: + resolution: {integrity: sha512-Eht5w30ruCXgFmxVUSlNWQ9iiimq07URKeFS3hNc8cUWy1llX4KDWfyEDZRycMc+znsN9Ux5/tJ/BFdgdOwA3A==} + dependencies: + '@types/mdast': 4.0.3 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + unified: 11.0.4 + transitivePeerDependencies: + - supports-color + dev: true + + /repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + dev: false + + /replace-ext@1.0.0: + resolution: {integrity: sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==} + engines: {node: '>= 0.10'} dev: false /require-directory@2.1.1: @@ -7970,9 +8304,15 @@ packages: kind-of: 6.0.3 dev: false + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + dev: false + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + dev: true /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} @@ -8075,6 +8415,11 @@ packages: source-map: 0.6.1 dev: false + /source-map@0.5.7: + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} + engines: {node: '>=0.10.0'} + dev: false + /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -8098,6 +8443,10 @@ packages: escape-string-regexp: 2.0.0 dev: true + /state-toggle@1.0.3: + resolution: {integrity: sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==} + dev: false + /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -8173,6 +8522,14 @@ packages: es-abstract: 1.22.3 dev: true + /stringify-entities@3.1.0: + resolution: {integrity: sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==} + dependencies: + character-entities-html4: 1.1.4 + character-entities-legacy: 1.1.4 + xtend: 4.0.2 + dev: false + /stringify-entities@4.0.3: resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==} dependencies: @@ -8236,7 +8593,7 @@ packages: inline-style-parser: 0.2.2 dev: false - /styled-jsx@5.1.1(@babel/core@7.23.2)(react@18.2.0): + /styled-jsx@5.1.1(@babel/core@7.12.9)(react@18.2.0): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -8249,7 +8606,7 @@ packages: babel-plugin-macros: optional: true dependencies: - '@babel/core': 7.23.2 + '@babel/core': 7.12.9 client-only: 0.0.1 react: 18.2.0 dev: false @@ -8410,6 +8767,19 @@ packages: dependencies: is-number: 7.0.0 + /to-vfile@6.1.0: + resolution: {integrity: sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw==} + dependencies: + is-buffer: 2.0.5 + vfile: 4.2.1 + dev: false + + /to-vfile@8.0.0: + resolution: {integrity: sha512-IcmH1xB5576MJc9qcfEC/m/nQCFt3fzMHz45sSlgJyTWjRbKW1HAkJpuf3DgE57YzIlZcwcBZA5ENQbBo4aLkg==} + dependencies: + vfile: 6.0.1 + dev: false + /toml@3.0.0: resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} dev: false @@ -8435,9 +8805,21 @@ packages: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} dev: false + /trim-trailing-lines@1.1.4: + resolution: {integrity: sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==} + dev: false + + /trim@0.0.1: + resolution: {integrity: sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==} + deprecated: Use String.prototype.trim() instead + dev: false + + /trough@1.0.5: + resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} + dev: false + /trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} - dev: false /ts-api-utils@1.0.3(typescript@5.3.3): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} @@ -8650,6 +9032,13 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /unherit@1.1.3: + resolution: {integrity: sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==} + dependencies: + inherits: 2.0.4 + xtend: 4.0.2 + dev: false + /unified@11.0.4: resolution: {integrity: sha512-apMPnyLjAX+ty4OrNap7yumyVAMlKx5IWU2wlzzUdYJO9A8f1p9m/gywF/GM2ZDFcjQPrx59Mc90KwmxsoklxQ==} dependencies: @@ -8660,6 +9049,37 @@ packages: is-plain-obj: 4.1.0 trough: 2.1.0 vfile: 6.0.1 + + /unified@9.2.0: + resolution: {integrity: sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==} + dependencies: + '@types/unist': 2.0.10 + bail: 1.0.5 + extend: 3.0.2 + is-buffer: 2.0.5 + is-plain-obj: 2.1.0 + trough: 1.0.5 + vfile: 4.2.1 + dev: false + + /unified@9.2.2: + resolution: {integrity: sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==} + dependencies: + '@types/unist': 2.0.10 + bail: 1.0.5 + extend: 3.0.2 + is-buffer: 2.0.5 + is-plain-obj: 2.1.0 + trough: 1.0.5 + vfile: 4.2.1 + dev: false + + /unist-util-flatmap@1.0.0: + resolution: {integrity: sha512-IG32jcKJlhARCYT2LsYPJWdoXYkzz3ESAdl1aa2hn9Auh+cgUmU6wgkII4yCc/1GgeWibRdELdCZh/p3QKQ1dQ==} + dev: false + + /unist-util-is@4.1.0: + resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} dev: false /unist-util-is@5.2.1: @@ -8672,6 +9092,12 @@ packages: resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} dependencies: '@types/unist': 3.0.2 + + /unist-util-map@2.0.1: + resolution: {integrity: sha512-VdNvk4BQUUU9Rgr8iUOvclHa/iN9O+6Dt66FKij8l9OVezGG37gGWCPU5KSax1R2degqXFvl3kWTkvzL79e9tQ==} + dependencies: + '@types/mdast': 3.0.15 + object-assign: 4.1.1 dev: false /unist-util-position-from-estree@2.0.0: @@ -8686,6 +9112,12 @@ packages: '@types/unist': 3.0.2 dev: false + /unist-util-remove-position@2.0.1: + resolution: {integrity: sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==} + dependencies: + unist-util-visit: 2.0.3 + dev: false + /unist-util-remove-position@5.0.0: resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==} dependencies: @@ -8693,11 +9125,28 @@ packages: unist-util-visit: 5.0.0 dev: false + /unist-util-stringify-position@1.1.2: + resolution: {integrity: sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==} + dev: false + + /unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + dependencies: + '@types/unist': 2.0.10 + dev: false + /unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} dependencies: '@types/unist': 3.0.2 + /unist-util-visit-parents@3.1.1: + resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} + dependencies: + '@types/unist': 2.0.10 + unist-util-is: 4.1.0 + dev: false + /unist-util-visit-parents@5.1.3: resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} dependencies: @@ -8710,6 +9159,13 @@ packages: dependencies: '@types/unist': 3.0.2 unist-util-is: 6.0.0 + + /unist-util-visit@2.0.3: + resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} + dependencies: + '@types/unist': 2.0.10 + unist-util-is: 4.1.0 + unist-util-visit-parents: 3.1.1 dev: false /unist-util-visit@4.1.2: @@ -8726,7 +9182,6 @@ packages: '@types/unist': 3.0.2 unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 - dev: false /universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} @@ -8806,6 +9261,10 @@ packages: convert-source-map: 2.0.0 dev: true + /vfile-location@3.2.0: + resolution: {integrity: sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA==} + dev: false + /vfile-location@5.0.2: resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==} dependencies: @@ -8813,11 +9272,41 @@ packages: vfile: 6.0.1 dev: false + /vfile-message@1.1.1: + resolution: {integrity: sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==} + dependencies: + unist-util-stringify-position: 1.1.2 + dev: false + + /vfile-message@2.0.4: + resolution: {integrity: sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==} + dependencies: + '@types/unist': 2.0.10 + unist-util-stringify-position: 2.0.3 + dev: false + /vfile-message@4.0.2: resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} dependencies: '@types/unist': 3.0.2 unist-util-stringify-position: 4.0.0 + + /vfile@2.3.0: + resolution: {integrity: sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==} + dependencies: + is-buffer: 1.1.6 + replace-ext: 1.0.0 + unist-util-stringify-position: 1.1.2 + vfile-message: 1.1.1 + dev: false + + /vfile@4.2.1: + resolution: {integrity: sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==} + dependencies: + '@types/unist': 2.0.10 + is-buffer: 2.0.5 + unist-util-stringify-position: 2.0.3 + vfile-message: 2.0.4 dev: false /vfile@6.0.1: @@ -8826,7 +9315,6 @@ packages: '@types/unist': 3.0.2 unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - dev: false /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} @@ -9036,6 +9524,11 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} dev: true + /xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -9043,6 +9536,7 @@ packages: /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + dev: true /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -9081,4 +9575,3 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - dev: false diff --git a/src/components/utils/getWeekdays.ts b/src/components/utils/getWeekdays.ts index b437f035cf..660d9f1ffe 100644 --- a/src/components/utils/getWeekdays.ts +++ b/src/components/utils/getWeekdays.ts @@ -1,5 +1,5 @@ import { addDays } from "date-fns/addDays"; -import type { Locale } from "date-fns/locale/types"; +import type { Locale } from "date-fns"; import { startOfISOWeek } from "date-fns/startOfISOWeek"; import { startOfWeek } from "date-fns/startOfWeek"; diff --git a/src/contexts/CalendarContext/utils/getDropdownMonths.ts b/src/contexts/CalendarContext/utils/getDropdownMonths.ts index 2c85267879..aadf8445a9 100644 --- a/src/contexts/CalendarContext/utils/getDropdownMonths.ts +++ b/src/contexts/CalendarContext/utils/getDropdownMonths.ts @@ -1,7 +1,7 @@ import { addMonths } from "date-fns/addMonths"; import { isBefore } from "date-fns/isBefore"; import { startOfMonth } from "date-fns/startOfMonth"; -import type { Month } from "date-fns/types"; +import type { Month } from "date-fns"; import type { DropdownOption } from "../../../components/custom-components"; import type { Formatters, Mode } from "../../../types"; diff --git a/src/formatters/formatMonthDropdown.ts b/src/formatters/formatMonthDropdown.ts index 1588281a2e..b25989bd3e 100644 --- a/src/formatters/formatMonthDropdown.ts +++ b/src/formatters/formatMonthDropdown.ts @@ -1,5 +1,5 @@ import { enUS } from "date-fns/locale/en-US"; -import type { Month } from "date-fns/types"; +import type { Month } from "date-fns"; /** The default formatter for the month dropdown value. */ export function formatMonthDropdown(monthNumber: Month, locale = enUS): string { diff --git a/src/types/props.ts b/src/types/props.ts index 54fe522aca..a7ba7e47e4 100644 --- a/src/types/props.ts +++ b/src/types/props.ts @@ -1,6 +1,6 @@ import type { KeyboardEvent, MouseEvent } from "react"; -import type { Locale } from "date-fns/types"; +import type { Locale } from "date-fns"; import * as components from "../components/custom-components"; diff --git a/website/app/globals.css b/website/app/globals.css index 76ca46b159..f837a60c58 100644 --- a/website/app/globals.css +++ b/website/app/globals.css @@ -3,10 +3,10 @@ @tailwind utilities; :root { - --breadcrumbs-height: 48px; --header-height: 48px; - --header-full: 96px; /* Includes breadcrumbs */ --sidebar-width: 256px; + --article-max-width: 80ch; + --toc-width: 14rem; } code { diff --git a/website/components/Breadcrumbs.tsx b/website/components/Breadcrumbs.tsx deleted file mode 100644 index c9c41b5597..0000000000 --- a/website/components/Breadcrumbs.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { Doc } from "@/lib/docs"; -import { useSidebar } from "@/lib/sidebar"; -import { - ChevronRightIcon, - Cross1Icon, - HamburgerMenuIcon, -} from "@radix-ui/react-icons"; -import { Flex, IconButton, Text } from "@radix-ui/themes"; - -export interface DocBreadcrumbsProps { - doc: Doc; -} - -export function Breadcrumbs(props: DocBreadcrumbsProps) { - const sidebar = useSidebar(); - return ( - - - - ); -} diff --git a/website/components/Callout.tsx b/website/components/Callout.tsx index 58c1974d78..15bc148b7c 100644 --- a/website/components/Callout.tsx +++ b/website/components/Callout.tsx @@ -1,15 +1,28 @@ -import { PropsWithChildren } from "react"; - -import { InfoCircledIcon } from "@radix-ui/react-icons"; +import { CodeIcon, InfoCircledIcon } from "@radix-ui/react-icons"; import { Box, Callout as RadixCallout } from "@radix-ui/themes"; import styles from "./Callout.module.css"; -export function Callout(props: PropsWithChildren<{ icon?: "info" }>) { +interface CalloutProps { + type: "info" | "warning"; + children: React.ReactNode; +} + +const iconsMap = { + info: InfoCircledIcon, + warning: CodeIcon, +}; + +export function Callout(props: CalloutProps) { + const { type = "info" } = props; + const Icon = iconsMap[type]; return ( - + - + {props.children} diff --git a/website/components/DocsLayout.tsx b/website/components/DocsLayout.tsx index 6d935a9f2e..1f91292940 100644 --- a/website/components/DocsLayout.tsx +++ b/website/components/DocsLayout.tsx @@ -1,9 +1,9 @@ import { DocsStaticProps } from "@/pages/docs/[[...slug]]"; -import { Box, Flex, Separator } from "@radix-ui/themes"; +import { Box, Separator } from "@radix-ui/themes"; import { useSidebar } from "@/lib/sidebar"; -import { Breadcrumbs } from "./Breadcrumbs"; import { DocHeader } from "./DocHeader"; +import { Pagination } from "./Pagination"; import { Sidebar } from "./Sidebar"; import { TableOfContent } from "./TableOfContent"; @@ -16,21 +16,21 @@ export function DocsLayout(props: DocsLayoutProps) { const sidebar = useSidebar(); + // Flat the navigation object to an array + const flatNavigation = Object.values(navigation).flat(); + + // Find the index of the current doc in the navigation + const docIndex = flatNavigation.findIndex((item) => item.path === doc.path); + const nextDoc = flatNavigation[docIndex + 1]; + const previousDoc = flatNavigation[docIndex - 1]; + return ( - {/* Breadcrumbs */} - - - - {/* Sidebar */} @@ -40,39 +40,33 @@ export function DocsLayout(props: DocsLayoutProps) { {/* Content */} - - -
- - {/* Main content */} - - - - {props.children} - + +
+ + +
{props.children}
+ {doc.pagination && ( + <> + + + + )} +
+
- {/* toc */} - - - {doc.toc && toc && toc.length > 3 && ( - - )} - - -
-
-
+ {/* toc */} + + {doc.toc && toc && toc.length > 1 && }
); diff --git a/website/components/Header.tsx b/website/components/Header.tsx index 2bffd90f18..4723da885a 100644 --- a/website/components/Header.tsx +++ b/website/components/Header.tsx @@ -3,83 +3,82 @@ import NextLink from "next/link"; import { useVersion } from "@/lib/versions"; -import { GitHubLogoIcon } from "@radix-ui/react-icons"; -import { Box, Flex, IconButton, Link, Text, Tooltip } from "@radix-ui/themes"; +import { + Cross1Icon, + GitHubLogoIcon, + HamburgerMenuIcon, +} from "@radix-ui/react-icons"; +import { Flex, IconButton, Text } from "@radix-ui/themes"; -import { Logo } from "./Logo"; +import { useSidebar } from "@/lib/sidebar"; +import { Navigation } from "./Navigation"; import { ThemeToggle } from "./ThemeToggle"; import { VersionDropdown } from "./VersionDropdown"; export function Header() { const { version } = useVersion(); + const sidebar = useSidebar(); return ( - - + ); } diff --git a/website/components/LinkCard.tsx b/website/components/LinkCard.tsx index 8be8c2f46c..a6d37bfde4 100644 --- a/website/components/LinkCard.tsx +++ b/website/components/LinkCard.tsx @@ -1,4 +1,4 @@ -import { Text } from "@radix-ui/themes"; +import { Card, Heading, Text } from "@radix-ui/themes"; import Link from "next/link"; export function LinkCard(props: { @@ -7,9 +7,15 @@ export function LinkCard(props: { description: string; }) { return ( - - {props.title} || x - {props.description} - + + + + {props.title} + + + {props.description} + + + ); } diff --git a/website/components/Navigation.tsx b/website/components/Navigation.tsx new file mode 100644 index 0000000000..5e9f0aafde --- /dev/null +++ b/website/components/Navigation.tsx @@ -0,0 +1,31 @@ +"use client"; +import { Link } from "@radix-ui/themes"; +import NextLink from "next/link"; + +export function Navigation() { + return ( + <> + + + Documentation + + + + + API reference + + + + + Playground + + + + ); +} diff --git a/website/components/Pagination.tsx b/website/components/Pagination.tsx new file mode 100644 index 0000000000..9ba2a7b66c --- /dev/null +++ b/website/components/Pagination.tsx @@ -0,0 +1,71 @@ +import { Doc } from "@/lib/docs"; +import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons"; +import { Box, Card, Flex, Link, Text } from "@radix-ui/themes"; + +export interface PaginationProps { + currentDoc: Doc; + previousDoc: Doc | undefined; + nextDoc: Doc | undefined; +} + +export function Pagination(props: PaginationProps) { + const { previousDoc, nextDoc } = props; + const prevPageTitle = previousDoc?.navigationLabel || previousDoc?.title; + const nextPageTitle = nextDoc?.navigationLabel || nextDoc?.title; + + return ( + +
+ + {previousDoc?.path && ( + + + + + + Previous + + + + {prevPageTitle} + + + + )} + + + {nextDoc?.path && ( + + + + + Next + + + + + {nextPageTitle} + + + + )} + +
+
+ ); +} diff --git a/website/components/ReleaseNotes.tsx b/website/components/ReleaseNotes.tsx new file mode 100644 index 0000000000..4ddd4d37c6 --- /dev/null +++ b/website/components/ReleaseNotes.tsx @@ -0,0 +1,27 @@ +import { useEffect, useState } from "react"; + +export function ReleaseNotes() { + const [releaseNotes, setReleaseNotes] = useState(""); + + useEffect(() => { + // Fetch the CHANGELOG.md file from react-day-picker GitHub repo. + fetch("https://raw.githubusercontent.com/gpbl/react-day-picker/releasees") + .then((response) => response.text()) + .then((data) => { + // If necessary, here you can parse markdown to HTML + setReleaseNotes(data); + }) + .catch((error) => { + console.error("Error fetching release notes:", error); + setReleaseNotes("Failed to load release notes."); + }); + }, []); + + return ( +
+

React Day Picker Release Notes

+ {/* Add a preformatted block to preserve the markdown formatting */} +
{releaseNotes}
+
+ ); +} diff --git a/website/components/Sidebar.tsx b/website/components/Sidebar.tsx index 19b8acb1ea..333c4648f9 100644 --- a/website/components/Sidebar.tsx +++ b/website/components/Sidebar.tsx @@ -1,6 +1,7 @@ import { Doc } from "@/lib/docs"; import { useSidebar } from "@/lib/sidebar"; -import { Box, Heading, Text } from "@radix-ui/themes"; +import { Box, Flex, Heading, Separator, Text } from "@radix-ui/themes"; +import NextLink from "next/link"; import { usePathname } from "next/navigation"; import { SidebarLink } from "./SidebarLink"; @@ -10,9 +11,65 @@ export interface SidebarProps { export function Sidebar(props: SidebarProps) { const pathName = usePathname()?.replace(/^\//, "") ?? ""; + const isDocumentation = + pathName.startsWith("docs") && !pathName.includes("/api/"); + + const isApi = pathName.includes("/api/"); + const isPlayground = pathName.startsWith("playground"); + const { id } = useSidebar(); return ( - + <> + + + + + + Documentation + + + + + + + API reference + + + + + + + Playground + + + + + +
    {Object.keys(props.navigation).map((section, i) => { return ( @@ -46,6 +103,6 @@ export function Sidebar(props: SidebarProps) { ); })}
-
+ ); } diff --git a/website/components/ThemeToggle.tsx b/website/components/ThemeToggle.tsx index 09610c75bf..9b47ee48c5 100644 --- a/website/components/ThemeToggle.tsx +++ b/website/components/ThemeToggle.tsx @@ -42,13 +42,13 @@ export function ThemeToggle() { onClick={() => setTheme(theme === "dark" ? "light" : "dark")} > diff --git a/website/components/mdx-components.tsx b/website/components/mdx-components.tsx index 7bf83e9547..f38fecdee7 100644 --- a/website/components/mdx-components.tsx +++ b/website/components/mdx-components.tsx @@ -22,6 +22,7 @@ import { Code, Em, Flex, + Grid, Heading, Kbd, Separator, @@ -48,6 +49,7 @@ export const components: MDXComponents = { Text, Flex, Card, + Grid, Box, Tabs: Tabs.Root, TabsList: Tabs.List, @@ -165,7 +167,7 @@ export const components: MDXComponents = { h2: (props) => { const { children, id } = props; return ( - +

{id ? {children} : children}

); diff --git a/website/examples/DatePickerModal.tsx b/website/examples/DatePickerModal.tsx index 397d065d46..49dd19cead 100644 --- a/website/examples/DatePickerModal.tsx +++ b/website/examples/DatePickerModal.tsx @@ -80,13 +80,13 @@ export function DatePickerModal() { )} setIsDialogOpen(false)} ref={dialogRef} - role="dialog" - aria-model="true" + id={dialogId} className="rounded-md p-6" + role="dialog" + aria-modal aria-labelledby={headerId} + onClose={() => setIsDialogOpen(false)} > diff --git a/website/lib/docs.ts b/website/lib/docs.ts index c3c6d14481..a16c8e094e 100644 --- a/website/lib/docs.ts +++ b/website/lib/docs.ts @@ -18,6 +18,7 @@ export type Frontmatter = { description?: string; sort?: string; toc?: boolean; + pagination?: boolean; navigationLabel?: string; section?: string; }; @@ -37,6 +38,7 @@ export type Doc = { description: string; section: string; toc: boolean; + pagination: boolean; sort: number; path: string; }; @@ -86,6 +88,7 @@ export function getDocs(): Doc[] { const doc: Doc = { toc: data.toc ?? true, + pagination: data.pagination ?? true, sort: data.sort ? parseInt(data.sort) : 100, section: data.section ?? section ?? slug[0], description: data.description ?? description ?? "", diff --git a/website/lib/mdx.ts b/website/lib/mdx.ts index c736b4bafd..d9f4e7a08f 100644 --- a/website/lib/mdx.ts +++ b/website/lib/mdx.ts @@ -1,14 +1,18 @@ import fs from "node:fs"; import path from "node:path"; -import { autoFrontmatterRegExp } from "@/lib/docs"; -import rehypeToc from "@stefanprobst/rehype-extract-toc"; -import rehypeTocExport from "@stefanprobst/rehype-extract-toc/mdx"; import { bundleMDX } from "mdx-bundler"; import { getMDXExport } from "mdx-bundler/client"; import rehypePrettyCode from "rehype-pretty-code"; + import rehypeSlug from "rehype-slug"; import remarkGfm from "remark-gfm"; +import remarkGithub from "remark-github"; +import remarkInclude from "./remark-include.mjs"; + +import { autoFrontmatterRegExp } from "@/lib/docs"; +import rehypeToc from "@stefanprobst/rehype-extract-toc"; +import rehypeTocExport from "@stefanprobst/rehype-extract-toc/mdx"; export const DOCS_PATH = path.join(process.cwd(), "../docs"); @@ -32,11 +36,15 @@ export async function getMdxBySlug(slug: string[] | undefined) { // Remove content that is already in the frontmatter const sourceWithoutFrontmatter = source.replace(autoFrontmatterRegExp, ""); - const mdx = await bundleMDX({ source: sourceWithoutFrontmatter, mdxOptions: (options) => { - options.remarkPlugins = [...(options.remarkPlugins || []), [remarkGfm]]; + options.remarkPlugins = [ + ...(options.remarkPlugins || []), + remarkInclude, + [remarkGithub, { repository: "gpbl/react-day-picker" }], + remarkGfm, + ]; options.rehypePlugins = [ ...(options.rehypePlugins || []), [rehypeSlug, { behavior: "append" }], @@ -47,7 +55,7 @@ export async function getMdxBySlug(slug: string[] | undefined) { { keepBackground: false, theme: { - dark: "github-dark-dimmed", + dark: "github-dark", light: "github-light", }, filterMetaString: (string: string) => diff --git a/website/lib/remark-include.mjs b/website/lib/remark-include.mjs new file mode 100644 index 0000000000..8f26f1ddf6 --- /dev/null +++ b/website/lib/remark-include.mjs @@ -0,0 +1,35 @@ +import fs from "node:fs"; +import path from "node:path"; +import { remark } from "remark"; +import { visitParents } from "unist-util-visit-parents"; +export default function remarkIncludeContent() { + return function transformer(tree) { + // Process the tree + visitParents(tree, "text", (node, ancestors) => { + if (typeof node.value === "string" && node.value.startsWith("%include")) { + const match = node.value.match(/^%include (.+)/); + const filePath = path.resolve(match[1].trim()); + try { + // Read the content of the included file. + let content = fs.readFileSync(filePath, "utf8"); + content = content.replace(/^#.*\n?/, ""); + + // Parse the content into an AST. + const ast = remark().parse(content); + + // Get the parent and grandparent of the current node. + const parentNode = ancestors[ancestors.length - 1]; + const grandParentNode = ancestors[ancestors.length - 2]; + + // Find the index of the parent node in the grandparent's children array. + const parentIndex = grandParentNode.children.indexOf(parentNode); + + // Replace the parent node with the AST of the included content. + grandParentNode.children.splice(parentIndex, 1, ...ast.children); + } catch (error) { + console.error(`Unable to read file: ${filePath}. ${error.message}`); + } + } + }); + }; +} diff --git a/website/lib/sidebar.tsx b/website/lib/sidebar.tsx index 6b5f788899..839dd6a75d 100644 --- a/website/lib/sidebar.tsx +++ b/website/lib/sidebar.tsx @@ -27,10 +27,10 @@ export function SidebarProvider({ children }: PropsWithChildren) { useEffect(() => { const close = () => setIsOpen(false); - router.events.on("routeChangeStart", close); + router.events.on("routeChangeComplete", close); window.addEventListener("resize", close); return () => { - router.events.off("routeChangeStart", close); + router.events.off("routeChangeComplete", close); window.removeEventListener("resize", close); }; }, [router.events]); diff --git a/website/package.json b/website/package.json index 8addb82bd8..882830aa29 100644 --- a/website/package.json +++ b/website/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@hashicorp/remark-plugins": "^4.1.1", "@jsdevtools/rehype-toc": "^3.0.2", "@mdx-js/loader": "^3.0.1", "@mdx-js/react": "^3.0.1", @@ -36,7 +37,10 @@ "rehype-slug": "^6.0.0", "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.0", - "shiki": "^1.1.7" + "remark-github": "^12.0.0", + "remark-include": "^2.0.0", + "shiki": "^1.1.7", + "unist-util-visit": "^5.0.0" }, "devDependencies": { "@types/node": "^20.11.20", @@ -47,6 +51,7 @@ "eslint-config-next": "14.1.0", "prettier-plugin-organize-imports": "^3.2.4", "prettier-plugin-tailwindcss": "^0.5.11", + "remark": "^15.0.1", "tailwindcss": "^3.4.1", "typescript": "^5.3.3" } diff --git a/website/tailwind.config.ts b/website/tailwind.config.ts index 35599dacb2..955ec7b002 100644 --- a/website/tailwind.config.ts +++ b/website/tailwind.config.ts @@ -7,10 +7,11 @@ export default { theme: { extend: { spacing: { + "article-max-w": "var(--article-max-width)", header: "var(--header-height)", sidebar: "var(--sidebar-width)", - "header-full": "var(--header-full)", breadcrumbs: "var(--breadcrumbs-height)", + "toc-width": "var(--toc-width)", }, colors: { border: "hsl(var(--border))",