Skip to content

Commit

Permalink
Merge branch 'canary' into pr/3477
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Oct 5, 2024
2 parents 6f92cdb + 780ba43 commit e471830
Show file tree
Hide file tree
Showing 279 changed files with 18,023 additions and 12,749 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-moles-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/autocomplete": patch
---

Clicking the clear button clears the selected value without closing the dropdown. (#3788)
5 changes: 5 additions & 0 deletions .changeset/fast-horses-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

fix the fullWidth variant in input and select component. (#3745)
5 changes: 5 additions & 0 deletions .changeset/flat-pants-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/date-picker": patch
---

Fixes getCalendarProps to propagate the classNames in the calendarProps. (#3769)
5 changes: 5 additions & 0 deletions .changeset/mighty-birds-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/autocomplete": patch
---

Return null if there are items for exit animation on popover close to work
5 changes: 5 additions & 0 deletions .changeset/popular-pigs-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/autocomplete": patch
---

automatically focus first non-disabled item
5 changes: 5 additions & 0 deletions .changeset/shy-mails-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/image": patch
---

add missing `w` to `getWrapperProps` dependency (#3801)
4 changes: 4 additions & 0 deletions .changeset/slimy-cats-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

Update Twitter logo, links, and named references to X. Removed Twitter logo from social based on review feedback.
5 changes: 5 additions & 0 deletions .changeset/two-waves-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/input": patch
---

clear button should not receive focus when input is disabled.
5 changes: 5 additions & 0 deletions .changeset/witty-socks-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

add missing `data-[hover=true]:` for ghost button with danger color
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ body:
- "Safari"
- "Edge"
- "Opera"
- "Other (add additonal context)"
- "Other (add additional context)"
validations:
required: true
required: true
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ contact_links:
- name: 💬 Discord Community Chat
url: https://discord.gg/9b6yyZKmH4
about: Ask quick questions or simply chat on the `NextUI` community Discord server.
- name: 💬 New Updates (Twitter)
url: https://twitter.com/getnextui
about: Link to our twitter account if you want to follow us and stay up to date with NextUI news
- name: 💬 New Updates (X)
url: https://x.com/getnextui
about: Link to our X account if you want to follow us and stay up to date with NextUI news
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.x
v20.16.0
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ pnpm build
npm run build
```

> Note: ensure your version of Node is 16 or higher to run scripts
> Note: ensure that you have at least Node.js 20.16.0 as well as pnpm 9.6.0 or higher installed on your machine to run the scripts
6. Send your pull request:

Expand Down
22 changes: 0 additions & 22 deletions apps/docs/.sponsorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -309,28 +309,6 @@
"github": null,
"website": "https://encur.me/"
},
{
"MemberId": 569973,
"createdAt": "2024-05-29 17:51",
"type": "USER",
"role": "BACKER",
"tier": "Gold Sponsor 🥇",
"isActive": true,
"totalAmountDonated": 100,
"currency": "USD",
"lastTransactionAt": "2024-05-29 17:51",
"lastTransactionAmount": 100,
"profile": "https://opencollective.com/maxprilutskiy",
"name": "Replexica",
"company": "",
"description": null,
"image": "/sponsors/569973.jpg",
"email": null,
"newsletterOptIn": null,
"twitter": null,
"github": null,
"website": "https://replexica.com/?utm_source=nextui&utm_marketing=oss"
},
{
"MemberId": 571230,
"createdAt": "2024-06-01 18:47",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/components/docs/components/code-demo/code-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const CodeDemo: React.FC<CodeDemoProps> = ({
isPreviewCentered = false,
// when false .js files will be used
typescriptStrict = false,
showOpenInCodeSandbox,
showOpenInCodeSandbox = true,
isGradientBox = false,
previewHeight = "auto",
overflow = "visible",
Expand Down Expand Up @@ -139,7 +139,7 @@ export const CodeDemo: React.FC<CodeDemoProps> = ({
files={files}
highlightedLines={highlightedLines}
showEditor={showEditor}
showOpenInCodeSandbox={showOpenInCodeSandbox || showPreview}
showOpenInCodeSandbox={showOpenInCodeSandbox}
showPreview={showSandpackPreview}
typescriptStrict={typescriptStrict}
/>
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/components/icons/social.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ const DiscordIcon: React.FC<IconSvgProps> = ({size = 24, width, height, ...props
);
};

const TwitterIcon: React.FC<IconSvgProps> = ({size = 24, width, height, ...props}) => {
const XIcon: React.FC<IconSvgProps> = ({size = 20, width, height, ...props}) => {
return (
<svg height={size || height} viewBox="0 0 24 24" width={size || width} {...props}>
<path
d="M19.633 7.997c.013.175.013.349.013.523 0 5.325-4.053 11.461-11.46 11.461-2.282 0-4.402-.661-6.186-1.809.324.037.636.05.973.05a8.07 8.07 0 0 0 5.001-1.721 4.036 4.036 0 0 1-3.767-2.793c.249.037.499.062.761.062.361 0 .724-.05 1.061-.137a4.027 4.027 0 0 1-3.23-3.953v-.05c.537.299 1.16.486 1.82.511a4.022 4.022 0 0 1-1.796-3.354c0-.748.199-1.434.548-2.032a11.457 11.457 0 0 0 8.306 4.215c-.062-.3-.1-.611-.1-.923a4.026 4.026 0 0 1 4.028-4.028c1.16 0 2.207.486 2.943 1.272a7.957 7.957 0 0 0 2.556-.973 4.02 4.02 0 0 1-1.771 2.22 8.073 8.073 0 0 0 2.319-.624 8.645 8.645 0 0 1-2.019 2.083z"
d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
fill="currentColor"
/>
</svg>
Expand Down Expand Up @@ -454,7 +454,7 @@ const TypescriptIcon: React.FC<IconSvgProps> = ({width = "1em", height = "1em",
};

export {
TwitterIcon,
XIcon,
DiscordIcon,
GithubIcon,
OpenCollectiveIcon,
Expand Down
338 changes: 314 additions & 24 deletions apps/docs/components/icons/sponsors.tsx

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions apps/docs/components/marketing/a11y-otb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Link as NextUILink,
Dropdown,
DropdownSection,
DropdownTrigger,
DropdownMenu,
DropdownItem,
Tooltip,
Expand All @@ -22,7 +21,7 @@ import {
} from "@nextui-org/shared-icons";
import Link from "next/link";
import dynamic from "next/dynamic";
import {useEffect, useRef, useState} from "react";
import {Fragment, useEffect, useRef, useState} from "react";

import {FeaturesGrid} from "./features-grid";

Expand Down Expand Up @@ -79,6 +78,8 @@ export const A11yOtb = () => {

const ref = useRef<any>(null);

const triggerRef = useRef<HTMLButtonElement>(null);

const isMobile = useIsMobile();

const isInView = useInView(ref, {
Expand Down Expand Up @@ -155,6 +156,15 @@ export const A11yOtb = () => {
<InfoBoldIcon className="rotate-180" />
</Button>
</Tooltip>
<Button
ref={triggerRef}
className="bg-success-50"
color="success"
variant="flat"
onPress={() => setIsDropdownOpen((prevOpenState) => !prevOpenState)}
>
{isMobile ? "Click me" : "Actions"}
</Button>
{ref.current && (
<Dropdown
className="shadow-xl"
Expand All @@ -164,13 +174,9 @@ export const A11yOtb = () => {
portalContainer={ref.current}
shouldBlockScroll={false}
shouldFlip={isMobile}
onOpenChange={(open) => setIsDropdownOpen(open)}
triggerRef={triggerRef}
>
<DropdownTrigger>
<Button className="bg-success-50" color="success" variant="flat">
{isMobile ? "Click me" : "Actions"}
</Button>
</DropdownTrigger>
<Fragment />
<DropdownMenu
aria-label="Actions"
closeOnSelect={true}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/marketing/features-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const FeaturesGrid: React.FC<FeaturesGridProps> = ({features, classNames,
<CardHeader className={slots.header({class: classNames?.header})}>
<div className={slots.iconWrapper({class: classNames?.iconWrapper})}>{feat.icon}</div>
<p className={slots.title({class: classNames?.title})}>{feat.title}</p>
{feat.isExternal && <LinkIcon className="text-white" height={18} width={18} />}
{feat.isExternal && <LinkIcon height={18} width={18} />}
</CardHeader>
{feat.description ? (
<CardBody className={slots.body({class: classNames?.body})}>
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/components/marketing/hero/floating-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const FloatingComponents: React.FC<{}> = () => {
/>

<Input
className="absolute -top-[130px] -right-[120px] animate-[levitate_10s_ease_infinite] w-[200px]"
className="absolute -top-[60px] -right-[80px] animate-[levitate_10s_ease_infinite] w-[200px]"
color="secondary"
defaultValue="NextUI"
label="Input"
Expand All @@ -61,7 +61,7 @@ export const FloatingComponents: React.FC<{}> = () => {

<Card
isFooterBlurred
className="absolute -top-[260px] right-[100px] h-[120px] animate-[levitate_12s_ease_infinite_1s] z-0 max-w-fit"
className="absolute -top-[270px] right-[100px] h-[120px] animate-[levitate_12s_ease_infinite_1s] z-0 max-w-fit"
>
<Image
alt="Professional camera"
Expand All @@ -79,18 +79,18 @@ export const FloatingComponents: React.FC<{}> = () => {

<FloatingTabs />

<UserTwitterCard className="absolute left-[80px] -top-[80px] animate-[levitate_16s_ease_infinite] border-none" />
<UserTwitterCard className="absolute left-[30px] -top-[80px] animate-[levitate_16s_ease_infinite] border-none" />

<Card
className="absolute right-[110px] -top-[60px] animate-[levitate_18s_ease_infinite] z-10 max-w-fit border-none"
className="absolute right-[150px] -top-[50px] animate-[levitate_18s_ease_infinite] z-10 max-w-fit border-none"
shadow="lg"
>
<CardBody>
<NextUILogo small size={60} />
</CardBody>
</Card>

<div className="absolute z-10 -top-[40px] -right-[230px] animate-[levitate_14s_ease_infinite_1s]">
<div className="absolute z-10 -top-[120px] -right-[90px] animate-[levitate_14s_ease_infinite_1s]">
<Pagination
isCompact
showControls
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components/marketing/hero/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const Hero = () => {
});
}}
>
Github
GitHub
</Button>
</div>
</div>
Expand Down
7 changes: 1 addition & 6 deletions apps/docs/components/marketing/sponsors.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Button, Link} from "@nextui-org/react";

import {sectionWrapper} from "@/components/primitives";
import {Story2DesignLogo, ReplexicaLogo, CodeRabbitLogo, ScrumbuissLogo} from "@/components/icons/sponsors";
import {Story2DesignLogo, CodeRabbitLogo, ScrumbuissLogo} from "@/components/icons/sponsors";
import {HeartFilledIcon} from "@/components/icons";
import {siteConfig} from "@/config/site";
import {Sponsor, SponsorItem} from "@/components/marketing/sponsor-item";
Expand All @@ -12,11 +12,6 @@ const sponsors: Sponsor[] = [
href: "https://story.to.design?utm_source=nextui&utm_marketing=partnership",
logo: <Story2DesignLogo className="pt-1" />,
},
{
name: "Replexica",
href: "https://replexica.com/?utm_source=nextui&utm_marketing=oss",
logo: <ReplexicaLogo />,
},
{
name: "CodeRabbit",
href: "https://coderabbit.ai/?utm_source=nextui&utm_marketing=oss",
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {currentVersion} from "@/utils/version";
import {siteConfig} from "@/config/site";
import {Route} from "@/libs/docs/page";
import {LargeLogo, SmallLogo, ThemeSwitch} from "@/components";
import {TwitterIcon, GithubIcon, DiscordIcon, SearchLinearIcon} from "@/components/icons";
import {XIcon, GithubIcon, DiscordIcon, SearchLinearIcon} from "@/components/icons";
import {useIsMounted} from "@/hooks/use-is-mounted";
import {DocsSidebar} from "@/components/docs/sidebar";
import {useCmdkStore} from "@/components/cmdk";
Expand Down Expand Up @@ -209,8 +209,8 @@ export const Navbar: FC<NavbarProps> = ({children, routes, mobileRoutes = [], sl
className={navLinkClasses}
color="foreground"
data-active={includes(pathname, "components")}
href="/docs/components/avatar"
onClick={() => handlePressNavbarItem("Components", "/docs/components/avatar")}
href="/docs/components/accordion"
onClick={() => handlePressNavbarItem("Components", "/docs/components/accordion")}
>
Components
</NextLink>
Expand Down Expand Up @@ -325,12 +325,12 @@ export const Navbar: FC<NavbarProps> = ({children, routes, mobileRoutes = [], sl
<NavbarItem className="hidden sm:flex">
<Link
isExternal
aria-label="Twitter"
aria-label="X"
className="p-1"
href={siteConfig.links.twitter}
onPress={() => handlePressNavbarItem("Twitter", siteConfig.links.twitter)}
>
<TwitterIcon className="text-default-600 dark:text-default-500" />
<XIcon className="text-default-600 dark:text-default-500" />
</Link>
<Link
isExternal
Expand Down
8 changes: 6 additions & 2 deletions apps/docs/components/sandpack/use-sandpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,17 @@ export const useSandpack = ({
let fileContent = files[key] as string;

// Check if the file content includes 'React' import statements, if not, add it
if (!fileContent.includes("from 'react'") && !fileContent.includes('from "react"')) {
if (
fileContent.includes("React.") &&
!fileContent.includes("from 'react'") &&
!fileContent.includes('from "react"')
) {
fileContent = `${importReact}\n${fileContent}\n`;
}

// Check if file content includes any other dependencies, if yes, add it to dependencies
const importRegex = /import .* from ["'](.*)["']/g;
let match;
let match: RegExpExecArray | null;

while ((match = importRegex.exec(fileContent)) !== null) {
const dependencyName = match[1];
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 @@ -32,7 +32,7 @@ export const siteConfig = {
},
links: {
github: "https://github.com/nextui-org/nextui",
twitter: "https://twitter.com/getnextui",
twitter: "https://x.com/getnextui",
docs: "https://nextui-docs-v2.vercel.app",
discord: "https://discord.gg/9b6yyZKmH4",
sponsor: "https://patreon.com/jrgarciadev",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/blog/nextui-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: ["nextui", "tailwindcss", "react", "nextjs", "react-server-components"]
author:
name: "Junior Garcia"
username: "@jrgarciadev"
link: "https://twitter.com/jrgarciadev"
link: "https://x.com/jrgarciadev"
avatar: "/avatars/junior-garcia.jpeg"
---

Expand Down Expand Up @@ -91,7 +91,7 @@ Thanks to the switch to TailwindCSS, **NextUI v2.0** now supports React Server C
improves performance and allows you to use it with the latest versions of [React](https://reactjs.org/) and
[Next.js](https://nextjs.org/).

NextUI components already include the `use client;` directive so you can import them directly
NextUI components already include the `use client;` directive so you can import them directly
in your React Server Components (RSC).

```jsx
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/blog/v2.1.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: ["nextui", "select", "listbox", "scroll-shadow", "multi-select"]
author:
name: "Junior Garcia"
username: "@jrgarciadev"
link: "https://twitter.com/jrgarciadev"
link: "https://x.com/jrgarciadev"
avatar: "/avatars/junior-garcia.jpeg"
---

Expand Down Expand Up @@ -124,7 +124,7 @@ The new **Listbox** component includes:

### Custom Styles

The Listbox components offers multiple customization options.
The Listbox components offers multiple customization options.

<CodeDemo title="Custom Styles" files={listboxContent.customStyles} />

Expand Down
Loading

0 comments on commit e471830

Please sign in to comment.