Skip to content

Commit

Permalink
Merge branch 'main' into pr/2265
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Apr 22, 2024
2 parents a0c14e8 + 1dacf52 commit 9bd84cf
Show file tree
Hide file tree
Showing 739 changed files with 35,635 additions and 9,219 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-bugs-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/table": patch
---

Add missing export of TableRowProps type
5 changes: 5 additions & 0 deletions .changeset/large-dogs-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/use-aria-accordion": patch
---

Fixes ctrl+a keyboard shortcut enabled inside Accordion with `selectionMode="multiple"` (#2055)
5 changes: 5 additions & 0 deletions .changeset/lemon-kiwis-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

Improved styling for radio button labels, including adjustments for different screen sizes and support for right-to-left (RTL) languages. (#2507)
5 changes: 5 additions & 0 deletions .changeset/long-pets-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

Fixed slider component vertical mark y position focus (#2658)
6 changes: 0 additions & 6 deletions .changeset/metal-weeks-vanish.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/orange-waves-speak.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/selfish-ties-enjoy.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/short-trainers-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

Fix custom slot styling with twMerge set to true (#2153)
5 changes: 5 additions & 0 deletions .changeset/two-bananas-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/input": patch
---

Fix #2069 keep input component's position steady
5 changes: 0 additions & 5 deletions .changeset/wise-snails-sing.md

This file was deleted.

22 changes: 22 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: "en"
early_access: false
reviews:
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
- 'ci(changesets)'
drafts: false
base_branches:
- "main"
- "develop"
- "fix/.*"
- "chore/.*"
- "feat/.*"
chat:
auto_reply: true
40 changes: 27 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,21 @@ We use [Turbo Repo](https://turborepo.org/) for the project management.

```bash
## Start the dev babel server of NextUI core components
pnpm dev:nextui
pnpm dev

## optional
pnpm dev:docs ## this will start the documentation next.js server and it will automatically detect the changes in the components.

pnpm start:sb ## this will start the storybook server for a faster development and testing.
pnpm sb ## this will start the storybook server for a faster development and testing.

pnpm dev:docs ## this will start the documentation next.js server and it will automatically detect the changes in the components.
```

- If you will be working just on the documentation source code / mdx, you can use the following commands to build
NextUI components and then start the next.js dev server:

```bash
## Build NextUI source components
pnpm build:nextui
pnpm build

## Start the next.js documentation dev server
pnpm dev:docs
Expand All @@ -141,10 +142,6 @@ pnpm dev:docs

```bash
pnpm sb

#or

pnpm start:sb
```

Remember that these commands must be executed in the root folder of the project.
Expand All @@ -166,20 +163,37 @@ git checkout -b fix/something
All commits that fix bugs or add features need a test.
You can run the nest command for component specific tests.

```
```bash
# Test current code
pnpm test:update # or npm run test:update

pnpm test

# or

npm run test
```

```bash
# Test isolated component code
pnpm test:update src/button # or npm run test:update src/button

pnpm test button

# or

npm run test button

```

5. Be sure the package builds.

```
```bash
# Build current code
pnpm build # or npm run build

pnpm build

# or

npm run build
```

> Note: ensure your version of Node is 16 or higher to run scripts
Expand Down
6 changes: 5 additions & 1 deletion apps/docs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ IS_PREVIEW=true/false
ANALYZE_BUNDLE=true/false

# Vercel preview env (is used for taking the docs directly from the project files)
NEXT_PUBLIC_PREVIEW=true/false
NEXT_PUBLIC_PREVIEW=true/false

## Featurebase
NEXT_PUBLIC_FB_FEEDBACK_ORG=
NEXT_PUBLIC_FB_FEEDBACK_URL=
2 changes: 1 addition & 1 deletion apps/docs/.sponsorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"email": null,
"twitter": null,
"github": "https://github.com/HighError",
"website": "https://higherror.github.io/"
"website": null
},
{
"MemberId": 409558,
Expand Down
7 changes: 6 additions & 1 deletion apps/docs/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {format, parseISO} from "date-fns";
import NextLink from "next/link";
import {Balancer} from "react-wrap-balancer";

import {__DEV__, __PREVIEW__} from "@/utils";
import {MDXContent} from "@/components/mdx-content";
import {siteConfig} from "@/config/site";
import {Route} from "@/libs/docs/page";
Expand All @@ -18,6 +19,8 @@ interface BlogPostProps {
};
}

const isDraftVisible = __DEV__ || __PREVIEW__;

async function getBlogPostFromParams({params}: BlogPostProps) {
const slug = params.slug || "";
const post = allBlogPosts.find((post) => post.slugAsParams === slug);
Expand Down Expand Up @@ -78,7 +81,7 @@ export async function generateStaticParams(): Promise<BlogPostProps["params"][]>
export default async function DocPage({params}: BlogPostProps) {
const {post} = await getBlogPostFromParams({params});

if (!post) {
if (!post || (post.draft && !isDraftVisible)) {
notFound();
}

Expand All @@ -96,6 +99,7 @@ export default async function DocPage({params}: BlogPostProps) {
<ChevronRightLinearIcon className="rotate-180 inline-block mr-1" size={15} />
Back to blog
</Link>

<time className="block text-small mb-2 text-default-500" dateTime={post.date}>
{format(parseISO(post.date), "LLLL d, yyyy")}
</time>
Expand All @@ -119,6 +123,7 @@ export default async function DocPage({params}: BlogPostProps) {
</div>
<h1 className="mb-2 font-bold text-4xl">
<Balancer>{post.title}</Balancer>
<strong className="text-default-300">{post?.draft && " (Draft)"}</strong>
</h1>
<MDXContent code={post.body.code} />
</div>
Expand Down
13 changes: 12 additions & 1 deletion apps/docs/app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ import {allBlogPosts} from "contentlayer/generated";
import {compareDesc} from "date-fns";

import {BlogPostList} from "@/components/blog-post";
import {__DEV__, __PREVIEW__} from "@/utils";

const isDraftVisible = __DEV__ || __PREVIEW__;

export default function Blog() {
const posts = allBlogPosts.sort((a, b) => compareDesc(new Date(a.date), new Date(b.date)));
const posts = allBlogPosts
.sort((a, b) => compareDesc(new Date(a.date), new Date(b.date)))
?.filter((post) => {
if (post.draft && !isDraftVisible) {
return false;
}

return true;
});

return (
<div className="w-full lg:px-16 mt-12">
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default async function DocPage({params}: DocPageProps) {
if (!doc) {
notFound();
}
const editUrl = `${GITHUB_URL}/${REPO_NAME}/edit/${TAG}/${CONTENT_PATH}${currentRoute?.path}`;
const editUrl = `${GITHUB_URL}/${REPO_NAME}/edit/${TAG}${CONTENT_PATH}${currentRoute?.path}`;

return (
<>
Expand Down
24 changes: 9 additions & 15 deletions apps/docs/app/examples/navbar/controlled-menu/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,26 @@ export default function Page() {
];

return (
<Navbar isBordered onMenuOpenChange={setIsMenuOpen}>
<NavbarContent className="sm:hidden" justify="start">
<NavbarMenuToggle aria-label={isMenuOpen ? "Close menu" : "Open menu"} />
</NavbarContent>

<NavbarContent className="sm:hidden pr-3" justify="center">
<Navbar onMenuOpenChange={setIsMenuOpen}>
<NavbarContent>
<NavbarMenuToggle
aria-label={isMenuOpen ? "Close menu" : "Open menu"}
className="sm:hidden"
/>
<NavbarBrand>
<AcmeLogo />
<p className="font-bold text-inherit">ACME</p>
</NavbarBrand>
</NavbarContent>

<NavbarContent className="hidden sm:flex gap-4" justify="center">
<NavbarBrand>
<AcmeLogo />
<p className="font-bold text-inherit">ACME</p>
</NavbarBrand>
<NavbarItem>
<Link color="foreground" href="#">
Features
</Link>
</NavbarItem>
<NavbarItem isActive>
<Link aria-current="page" color="warning" href="#">
<Link aria-current="page" href="#">
Customers
</Link>
</NavbarItem>
Expand All @@ -77,25 +73,23 @@ export default function Page() {
</Link>
</NavbarItem>
</NavbarContent>

<NavbarContent justify="end">
<NavbarItem className="hidden lg:flex">
<Link href="#">Login</Link>
</NavbarItem>
<NavbarItem>
<Button as={Link} color="warning" href="#" variant="flat">
<Button as={Link} color="primary" href="#" variant="flat">
Sign Up
</Button>
</NavbarItem>
</NavbarContent>

<NavbarMenu>
{menuItems.map((item, index) => (
<NavbarMenuItem key={`${item}-${index}`}>
<Link
className="w-full"
color={
index === 2 ? "warning" : index === menuItems.length - 1 ? "danger" : "foreground"
index === 2 ? "primary" : index === menuItems.length - 1 ? "danger" : "foreground"
}
href="#"
size="lg"
Expand Down
26 changes: 11 additions & 15 deletions apps/docs/app/examples/navbar/disable-menu-animation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const AcmeLogo = () => (
);

export default function Page() {
const [isMenuOpen, setIsMenuOpen] = React.useState<boolean | undefined>(false);

const menuItems = [
"Profile",
"Dashboard",
Expand All @@ -42,30 +44,26 @@ export default function Page() {
];

return (
<Navbar disableAnimation isBordered>
<NavbarContent className="sm:hidden" justify="start">
<NavbarMenuToggle />
</NavbarContent>

<NavbarContent className="sm:hidden pr-3" justify="center">
<Navbar disableAnimation onMenuOpenChange={setIsMenuOpen}>
<NavbarContent>
<NavbarMenuToggle
aria-label={isMenuOpen ? "Close menu" : "Open menu"}
className="sm:hidden"
/>
<NavbarBrand>
<AcmeLogo />
<p className="font-bold text-inherit">ACME</p>
</NavbarBrand>
</NavbarContent>

<NavbarContent className="hidden sm:flex gap-4" justify="center">
<NavbarBrand>
<AcmeLogo />
<p className="font-bold text-inherit">ACME</p>
</NavbarBrand>
<NavbarItem>
<Link color="foreground" href="#">
Features
</Link>
</NavbarItem>
<NavbarItem isActive>
<Link aria-current="page" color="warning" href="#">
<Link aria-current="page" href="#">
Customers
</Link>
</NavbarItem>
Expand All @@ -75,25 +73,23 @@ export default function Page() {
</Link>
</NavbarItem>
</NavbarContent>

<NavbarContent justify="end">
<NavbarItem className="hidden lg:flex">
<Link href="#">Login</Link>
</NavbarItem>
<NavbarItem>
<Button as={Link} color="warning" href="#" variant="flat">
<Button as={Link} color="primary" href="#" variant="flat">
Sign Up
</Button>
</NavbarItem>
</NavbarContent>

<NavbarMenu>
{menuItems.map((item, index) => (
<NavbarMenuItem key={`${item}-${index}`}>
<Link
className="w-full"
color={
index === 2 ? "warning" : index === menuItems.length - 1 ? "danger" : "foreground"
index === 2 ? "primary" : index === menuItems.length - 1 ? "danger" : "foreground"
}
href="#"
size="lg"
Expand Down
Loading

0 comments on commit 9bd84cf

Please sign in to comment.