Skip to content

Commit

Permalink
Docs updates
Browse files Browse the repository at this point in the history
Signed-off-by: gpbl <io@gpbl.dev>
  • Loading branch information
gpbl committed Feb 27, 2024
1 parent ba9e18d commit 43bc9a1
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 170 deletions.
4 changes: 2 additions & 2 deletions docs/accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
sort: 10
---

_Getting Started_
_Using DayPicker_

# Accessible Date Pickers
# Accessibility

DayPicker follows the ARIA guidelines for date pickers, including keyboard navigation, focus management, and labeling. However, as developer you will need to adapt DayPicker to your specific use cases.
9 changes: 9 additions & 0 deletions docs/changelog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sort: 20
---

_Introduction_

# Changelog

WIP.
2 changes: 0 additions & 2 deletions docs/guides/custom-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ _Advanced Guides_

# Custom Components

> Customize the components used internally by DayPicker.
Use the `components` prop to replace some of the internal components used by DayPicker with a custom implementation.

**TODO**: This section is still a draft.
2 changes: 1 addition & 1 deletion docs/guides/custom-modifiers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ _Advanced Guides_

# Custom Modifiers

> Modifiers allows to customize the appearance of the days in the calendar.
Modifiers allows to customize the appearance of the days in the calendar.

**TODO**: This section is still a draft.
2 changes: 0 additions & 2 deletions docs/guides/custom-selections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ _Advanced Guides_

# Custom Selections

> Implement different ways to select days.
**TODO**: This section is still a draft.
2 changes: 1 addition & 1 deletion docs/guides/localization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _Advanced Guides_

# Localization

> DayPicker can be localized in any language using the date-fns locale object.
DayPicker can be localized in any language using the date-fns locale objects.

## Change the Locale

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
sort: 5
---

_Getting Started_
_Using DayPicker_

# Styling

> 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 and it's designed to be easily customized.

## Importing the Default Style

Expand Down
1 change: 1 addition & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ section: Introduction
description: DayPicker is a React component to build date pickers, calendars, and date inputs for web applications.
navigationLabel: Introduction
sort: 1
toc: false
---

# React DayPicker
Expand Down
2 changes: 1 addition & 1 deletion docs/installing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sort: 2
navigationLabel: Installing
---

_Getting Started_
_Introduction_

# Installing DayPicker

Expand Down
2 changes: 1 addition & 1 deletion docs/props.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sort: 4
---

_Getting Started_
_Using DayPicker_

# DayPicker Props

Expand Down
2 changes: 1 addition & 1 deletion docs/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sort: 20
---

_Getting Started_
_Introduction_

# Upgrading

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
}
},
"./style.css": {
"default": "./src/style.css",
"types": "./src/style.d.ts"
"default": "./src/style.css"
},
"./style.module.css": {
"default": "./src/style.css",
Expand Down
2 changes: 1 addition & 1 deletion website/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started
## Using DayPicker

First, run the development server:

Expand Down
2 changes: 1 addition & 1 deletion website/components/DocHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function DocHeader({ doc }: { doc: Doc }) {
</Heading>
)}
{doc.description && (
<Text as="p" size="5" mt="2" mb="2" color="gray">
<Text as="p" size="5" mt="2" color="gray">
{doc.description}
</Text>
)}
Expand Down
113 changes: 0 additions & 113 deletions website/components/DocPage.tsx

This file was deleted.

13 changes: 8 additions & 5 deletions website/components/DocsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ export function DocsLayout(props: DocsLayoutProps) {

{/* Sidebar */}
<Box
className={`b-0 sm:shadow-sidebar pt-0transition-transform fixed top-header-full z-10 h-full w-full transform scroll-pb-32 overflow-auto bg-page-background p-4 duration-200 ease-in-out sm:w-sidebar xl:top-header xl:block xl:translate-x-0 xl:shadow-none ${sidebar.isOpen ? "translate-x-0" : "-translate-x-full"}`}
className={`b-0 sm:shadow-sidebar fixed top-header-full z-10 h-full w-full transform scroll-pb-32 overflow-auto bg-page-background transition-transform duration-200 ease-in-out sm:w-sidebar xl:top-header xl:block xl:translate-x-0 xl:shadow-none ${sidebar.isOpen ? "translate-x-0" : "-translate-x-full"}`}
style={{
height: "calc(100vh - var(--header-full))",
marginTop: 1,
}}
>
<Sidebar navigation={navigation} />
<Box p="4">
<Sidebar navigation={navigation} />
</Box>
</Box>

{/* Content */}
<Box className="mt-header-full xl:ms-sidebar xl:mt-header">
<Box
mx="auto"
className="max-w-screen-lg xl:max-w-screen-xl"
p={{ initial: "4", lg: "8", xl: "9" }}
asChild
style={{ maxWidth: "120ch" }}
Expand All @@ -51,7 +52,7 @@ export function DocsLayout(props: DocsLayoutProps) {
{/* Main content */}
<Box className="w-full flex-auto overflow-auto px-2 py-4 md:pe-8 xl:pe-12">
<DocHeader doc={doc} />
<Separator size="4" mt="6" mb="9" color="gray" />
<Separator size="4" mt="4" mb="6" color="gray" />
{props.children}
</Box>

Expand All @@ -64,7 +65,9 @@ export function DocsLayout(props: DocsLayoutProps) {
borderColor: "var(--gray-a5)",
}}
>
{toc && toc.length > 3 && <TableOfContent toc={toc} />}
{doc.toc && toc && toc.length > 3 && (
<TableOfContent toc={toc} />
)}
</Box>
</Box>
</Flex>
Expand Down
6 changes: 6 additions & 0 deletions website/components/codeBlockStyles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.figcaption {
}

.figcaption + div {
@apply mt-1;
}
Loading

0 comments on commit 43bc9a1

Please sign in to comment.