Skip to content

Commit

Permalink
Merge branch 'nextui-org:canary' into adding_alert_component
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav700 authored Oct 20, 2024
2 parents 02dd710 + 765dac5 commit 0e6e8a8
Show file tree
Hide file tree
Showing 112 changed files with 3,622 additions and 3,255 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-trees-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

fix label placement in input and select
5 changes: 5 additions & 0 deletions .changeset/curly-zoos-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/listbox": patch
---

change ListboxItem key to optional (#3880)
5 changes: 5 additions & 0 deletions .changeset/dull-bags-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/select": patch
---

update label placement in Select to use `shouldLabelBeOutside` instead of `isOutsideLeft`, resolving multiline label placement issues (#3841).
5 changes: 5 additions & 0 deletions .changeset/forty-doors-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

remove the pseudo cancel btn from input (#3907)
5 changes: 5 additions & 0 deletions .changeset/giant-worms-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

replace the use of RTL-specific styles with logical properties.
5 changes: 5 additions & 0 deletions .changeset/tricky-fans-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

show margin only with label in Switch component (#3791)
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Closes # <!-- Github issue # here -->

## 📝 Description

> Add a brief description
<!--- Add a brief description -->

## ⛳️ Current behavior (updates)

> Please describe the current behavior that you are modifying
<!--- Please describe the current behavior that you are modifying -->

## 🚀 New behavior

> Please describe the behavior or changes this PR adds
<!--- Please describe the behavior or changes this PR adds -->

## 💣 Is this a breaking change (Yes/No):

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {Metadata} from "next";

import {notFound} from "next/navigation";
import {allBlogPosts} from "contentlayer/generated";
import {allBlogPosts} from "contentlayer2/generated";
import {Link, User} from "@nextui-org/react";
import {format, parseISO} from "date-fns";
import NextLink from "next/link";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {allBlogPosts} from "contentlayer/generated";
import {allBlogPosts} from "contentlayer2/generated";
import {compareDesc} from "date-fns";

import {BlogPostList} from "@/components/blog-post";
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
@@ -1,7 +1,7 @@
import type {Metadata} from "next";

import {notFound} from "next/navigation";
import {allDocs} from "contentlayer/generated";
import {allDocs} from "contentlayer2/generated";
import {Link} from "@nextui-org/react";

import {MDXContent} from "@/components/mdx-content";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/feed.xml/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Rss from "rss";
import {allBlogPosts} from "contentlayer/generated";
import {allBlogPosts} from "contentlayer2/generated";

import {siteConfig} from "@/config/site";
import {allCoreContent} from "@/libs/contentlayer";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/blog-post.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import {BlogPost} from "contentlayer/generated";
import {BlogPost} from "contentlayer2/generated";
import {Card, CardFooter, CardBody, CardHeader, Link, Avatar, Image} from "@nextui-org/react";
import Balancer from "react-wrap-balancer";
import {format, parseISO} from "date-fns";
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/components/code-window/code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jsx from "refractor/lang/jsx";
import bash from "refractor/lang/bash";
import css from "refractor/lang/css";
import diff from "refractor/lang/diff";
import hastToHtml from "hast-util-to-html";
import {toHtml} from "hast-util-to-html";
import rangeParser from "parse-numeric-range";
import {clsx} from "@nextui-org/shared-utils";

Expand Down Expand Up @@ -137,7 +137,7 @@ const CodeBlock = React.forwardRef<HTMLPreElement, CodeBlockProps>((_props, forw
result = highlightWord(result);

// convert to html
result = hastToHtml(result);
result = toHtml(result);

// TODO reset theme
const classes = `language-${language}`;
Expand Down
1 change: 1 addition & 0 deletions apps/docs/components/docs/components/codeblock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const Codeblock = forwardRef<HTMLPreElement, CodeblockProps>(
"scrollbar-hide overflow-x-scroll": hideScrollBar,
})}
style={style}
translate="no"
>
{tokens.map((line, i) => {
const lineProps = getLineProps({line, key: i});
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/mdx-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use client";
import type {MDXComponents as MDXComponentsType} from "mdx/types";

import {useMDXComponent} from "next-contentlayer/hooks";
import {useMDXComponent} from "next-contentlayer2/hooks";

import {MDXComponents} from "./mdx-components";

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/sandpack/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ReactDOM.createRoot(document.getElementById("root")).render(
<NextUIProvider>
<div className="w-screen h-screen p-8 flex items-start justify-center">
<App />
</div>
</div>
</NextUIProvider>
</React.StrictMode>
);`;
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const siteConfig = {
links: {
github: "https://github.com/nextui-org/nextui",
twitter: "https://x.com/getnextui",
docs: "https://nextui-docs-v2.vercel.app",
docs: "https://nextui.org",
discord: "https://discord.gg/9b6yyZKmH4",
sponsor: "https://patreon.com/jrgarciadev",
portfolio: "https://jrgarciadev.com",
Expand Down
20 changes: 20 additions & 0 deletions apps/docs/content/components/accordion/bordered-variant.raw.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {Accordion, AccordionItem} from "@nextui-org/react";

export default function App() {
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";

return (
<Accordion variant="bordered">
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}
21 changes: 1 addition & 20 deletions apps/docs/content/components/accordion/bordered-variant.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
const App = `import {Accordion, AccordionItem} from "@nextui-org/react";
export default function App() {
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
return (
<Accordion variant="bordered">
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}`;
import App from "./bordered-variant.raw.jsx?raw";

const react = {
"/App.jsx": App,
Expand Down
20 changes: 20 additions & 0 deletions apps/docs/content/components/accordion/compact.raw.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {Accordion, AccordionItem} from "@nextui-org/react";

export default function App() {
const defaultContent =
"Lorem Innei ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";

return (
<Accordion isCompact>
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}
21 changes: 1 addition & 20 deletions apps/docs/content/components/accordion/compact.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
const App = `import {Accordion, AccordionItem} from "@nextui-org/react";
export default function App() {
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
return (
<Accordion isCompact>
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}`;
import App from "./compact.raw.jsx?raw";

const react = {
"/App.jsx": App,
Expand Down
22 changes: 22 additions & 0 deletions apps/docs/content/components/accordion/controlled.raw.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
import {Accordion, AccordionItem} from "@nextui-org/react";

export default function App() {
const [selectedKeys, setSelectedKeys] = React.useState(new Set(["1"]));
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";

return (
<Accordion selectedKeys={selectedKeys} onSelectionChange={setSelectedKeys}>
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}
24 changes: 24 additions & 0 deletions apps/docs/content/components/accordion/controlled.raw.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type {Selection} from "@nextui-org/react";

import React from "react";
import {Accordion, AccordionItem} from "@nextui-org/react";

export default function App() {
const [selectedKeys, setSelectedKeys] = React.useState<Selection>(new Set(["1"]));
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";

return (
<Accordion selectedKeys={selectedKeys} onSelectionChange={setSelectedKeys}>
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}
53 changes: 2 additions & 51 deletions apps/docs/content/components/accordion/controlled.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,5 @@
const App = `import {Accordion, AccordionItem} from "@nextui-org/react";
export default function App() {
const [selectedKeys, setSelectedKeys] = React.useState(new Set(["1"]));
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
return (
<Accordion
selectedKeys={selectedKeys}
onSelectionChange={setSelectedKeys}
>
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}`;

const AppTs = `import type {Selection} from "@nextui-org/react";
import {Accordion, AccordionItem} from "@nextui-org/react";
export default function App() {
const [selectedKeys, setSelectedKeys] = React.useState<Selection>(new Set(["1"]));
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
return (
<Accordion
selectedKeys={selectedKeys}
onSelectionChange={setSelectedKeys}
>
<AccordionItem key="1" aria-label="Accordion 1" title="Accordion 1">
{defaultContent}
</AccordionItem>
<AccordionItem key="2" aria-label="Accordion 2" title="Accordion 2">
{defaultContent}
</AccordionItem>
<AccordionItem key="3" aria-label="Accordion 3" title="Accordion 3">
{defaultContent}
</AccordionItem>
</Accordion>
);
}`;
import App from "./controlled.raw.jsx?raw";
import AppTs from "./controlled.raw.tsx?raw";

const react = {
"/App.jsx": App,
Expand Down
Loading

0 comments on commit 0e6e8a8

Please sign in to comment.