Skip to content

Commit

Permalink
Merge branch 'canary' into canary
Browse files Browse the repository at this point in the history
  • Loading branch information
1amageek authored Dec 24, 2024
2 parents 215eb51 + 388b2ed commit fdc5337
Show file tree
Hide file tree
Showing 222 changed files with 2,441 additions and 741 deletions.
5 changes: 0 additions & 5 deletions .changeset/clever-teachers-live.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/famous-avocados-run.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/little-apricots-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/drawer": patch
---

use top-level type-only import instead of inline type specifiers
5 changes: 0 additions & 5 deletions .changeset/twelve-ducks-thank.md

This file was deleted.

12 changes: 10 additions & 2 deletions apps/docs/app/blog/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ export default function DocsLayout({children}: DocsLayoutProps) {
aria-hidden="true"
className="fixed hidden dark:md:block dark:opacity-70 -bottom-[40%] -left-[20%] z-0"
>
<Image removeWrapper alt="docs left background" src="/gradients/docs-left.png" />
<Image
removeWrapper
alt="docs left background"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/docs-left.png"
/>
</div>
<div
aria-hidden="true"
className="fixed hidden dark:md:block dark:opacity-70 -top-[80%] -right-[60%] 2xl:-top-[60%] 2xl:-right-[45%] z-0 rotate-12"
>
<Image removeWrapper alt="docs right background" src="/gradients/docs-right.png" />
<Image
removeWrapper
alt="docs right background"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/docs-right.png"
/>
</div>

<ScriptProviders />
Expand Down
1 change: 1 addition & 0 deletions apps/docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default async function DocPage({params}: DocPageProps) {
if (!doc) {
notFound();
}

const editUrl = `${GITHUB_URL}/${REPO_NAME}/edit/${TAG}${CONTENT_PATH}${currentRoute?.path}`;

return (
Expand Down
16 changes: 12 additions & 4 deletions apps/docs/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@ export default function DocsLayout({children}: DocsLayoutProps) {
</main>
<div
aria-hidden="true"
className="fixed hidden dark:md:block dark:opacity-70 -bottom-[40%] -left-[20%] z-0"
className="fixed hidden dark:md:block dark:opacity-100 -bottom-[30%] -left-[30%] z-0"
>
<Image removeWrapper alt="docs left background" src="/gradients/docs-left.png" />
<Image
removeWrapper
alt="docs left background"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/docs-left.png"
/>
</div>
<div
aria-hidden="true"
className="fixed hidden dark:md:block dark:opacity-70 -top-[80%] -right-[60%] 2xl:-top-[60%] 2xl:-right-[45%] z-0 rotate-12"
className="fixed hidden dark:md:block dark:opacity-70 -top-[50%] -right-[60%] 2xl:-top-[60%] 2xl:-right-[45%] z-0 rotate-12"
>
<Image removeWrapper alt="docs right background" src="/gradients/docs-right.png" />
<Image
removeWrapper
alt="docs right background"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/docs-right.png"
/>
</div>

<ScriptProviders />
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/examples/modal/placement/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function Page() {
</p>
</ModalBody>
<ModalFooter>
<Button color="danger" variant="light" onClick={onClose}>
<Button color="danger" variant="light" onPress={onClose}>
Close
</Button>
<Button color="primary" onPress={onClose}>
Expand Down
12 changes: 1 addition & 11 deletions apps/docs/app/examples/navbar/bordered/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"use client";

import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Button,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;
import {Navbar, NavbarBrand, NavbarContent, NavbarItem, Link, Button} from "@nextui-org/react";

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/app/examples/navbar/controlled-menu/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ import {
NavbarMenuItem,
NavbarMenuToggle,
Button,
Link as NextUiLink,
LinkProps,
Link,
} from "@nextui-org/react";
import React from "react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
<path
Expand Down
12 changes: 1 addition & 11 deletions apps/docs/app/examples/navbar/custom-active-item/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"use client";

import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Button,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;
import {Navbar, NavbarBrand, NavbarContent, NavbarItem, Link, Button} from "@nextui-org/react";

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import {
NavbarContent,
NavbarItem,
Button,
Link as NextUiLink,
LinkProps,
Link,
NavbarMenu,
NavbarMenuItem,
NavbarMenuToggle,
} from "@nextui-org/react";
import React from "react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
<path
Expand Down
12 changes: 1 addition & 11 deletions apps/docs/app/examples/navbar/disabled-blur/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"use client";

import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Button,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;
import {Navbar, NavbarBrand, NavbarContent, NavbarItem, Link, Button} from "@nextui-org/react";

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
Expand Down
12 changes: 1 addition & 11 deletions apps/docs/app/examples/navbar/hide-on-scroll/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"use client";

import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Button,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;
import {Navbar, NavbarBrand, NavbarContent, NavbarItem, Link, Button} from "@nextui-org/react";

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
Expand Down
12 changes: 1 addition & 11 deletions apps/docs/app/examples/navbar/static/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"use client";

import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Button,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;
import {Navbar, NavbarBrand, NavbarContent, NavbarItem, Link, Button} from "@nextui-org/react";

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
Expand Down
12 changes: 1 addition & 11 deletions apps/docs/app/examples/navbar/usage/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
"use client";

import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Button,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;
import {Navbar, NavbarBrand, NavbarContent, NavbarItem, Link, Button} from "@nextui-org/react";

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/app/examples/navbar/with-avatar/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ import {
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Link,
DropdownItem,
DropdownTrigger,
Dropdown,
DropdownMenu,
Avatar,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
<path
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/app/examples/navbar/with-dropdown-menu/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Link,
Button,
DropdownItem,
DropdownTrigger,
Expand All @@ -15,8 +14,6 @@ import {
} from "@nextui-org/react";
import {ChevronDown, Lock, Activity, Flash, Server, TagUser, Scale} from "@nextui-org/shared-icons";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
<path
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/app/examples/navbar/with-menu/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ import {
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Link,
Button,
NavbarMenuToggle,
NavbarMenu,
NavbarMenuItem,
} from "@nextui-org/react";
import React from "react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;

const AcmeLogo = () => (
<svg fill="none" height="36" viewBox="0 0 32 32" width="36">
<path
Expand Down
5 changes: 1 addition & 4 deletions apps/docs/app/examples/navbar/with-search-input/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {
NavbarBrand,
NavbarContent,
NavbarItem,
Link as NextUiLink,
LinkProps,
Link,
Input,
DropdownItem,
DropdownTrigger,
Expand All @@ -15,8 +14,6 @@ import {
Avatar,
} from "@nextui-org/react";

const Link = (props: LinkProps) => <NextUiLink {...props} onClick={(e) => e.preventDefault()} />;

import {SearchLinearIcon} from "@/components/icons";

const AcmeLogo = () => (
Expand Down
12 changes: 10 additions & 2 deletions apps/docs/app/figma/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ export default function FigmaPage() {
aria-hidden="true"
className="fixed hidden dark:md:block dark:opacity-70 -bottom-[40%] -left-[20%] z-0"
>
<Image removeWrapper alt="docs left background" src="/gradients/docs-left.png" />
<Image
removeWrapper
alt="docs left background"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/docs-left.png"
/>
</div>
<div
aria-hidden="true"
className="fixed hidden dark:md:block dark:opacity-70 -top-[80%] -right-[60%] 2xl:-top-[60%] 2xl:-right-[45%] z-0 rotate-12"
>
<Image removeWrapper alt="docs right background" src="/gradients/docs-right.png" />
<Image
removeWrapper
alt="docs right background"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/docs-right.png "
/>
</div>

<ScriptProviders />
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Community} from "@/components/marketing/community";
import Support from "@/components/marketing/support";
import landingContent from "@/content/landing";
import {Sponsors} from "@/components/marketing/sponsors";
import {NextUIProSection} from "@/components/marketing/nextui-pro-section";
import {NextUIProSection} from "@/components/marketing/nextui-pro-section/nextui-pro-section";

export default async function Home() {
return (
Expand Down
37 changes: 19 additions & 18 deletions apps/docs/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,27 @@ export interface ProvidersProps {
themeProps?: ThemeProviderProps;
}

export function Providers({children, themeProps}: ProvidersProps) {
const router = useRouter();

const ProviderWrapper = ({children}: {children: ReactNode}) => {
useEffect(() => {
if (typeof window !== "undefined" && __PROD__) {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
api_host: "/ingest",
person_profiles: "identified_only",
ui_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
});
}
}, []);

if (__PROD__) {
return <PostHogProvider client={posthog}>{children}</PostHogProvider>;
const ProviderWrapper = ({children}: {children: ReactNode}) => {
useEffect(() => {
// Initialize PostHog only once when the app starts
if (typeof window !== "undefined" && __PROD__ && !posthog.isFeatureEnabled("capture")) {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
api_host: "/ingest",
person_profiles: "identified_only",
ui_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
});
}
}, []);

if (__PROD__) {
return <PostHogProvider client={posthog}>{children}</PostHogProvider>;
}

return children;
};
return children;
};

export function Providers({children, themeProps}: ProvidersProps) {
const router = useRouter();

return (
<ProviderWrapper>
Expand Down
Loading

0 comments on commit fdc5337

Please sign in to comment.