@arch-cadre/ui 0.0.44 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.js +18 -0
- package/dist/components/alert-dialog.js +39 -0
- package/dist/components/alert.js +24 -0
- package/dist/components/aspect-ratio.js +7 -0
- package/dist/components/avatar.js +14 -0
- package/dist/components/badge.js +22 -0
- package/dist/components/breadcrumb.js +30 -0
- package/dist/components/button-group.js +28 -0
- package/dist/components/button.js +33 -0
- package/dist/components/calendar.js +76 -0
- package/dist/components/card.js +24 -0
- package/dist/components/checkbox.js +9 -0
- package/dist/components/collapsible.js +13 -0
- package/dist/components/command.js +34 -0
- package/dist/components/context-menu.js +51 -0
- package/dist/components/dialog.js +36 -0
- package/dist/components/drawer.js +35 -0
- package/dist/components/dropdown-menu.js +51 -0
- package/dist/components/empty.js +33 -0
- package/dist/components/field.js +78 -0
- package/dist/components/form.js +59 -0
- package/dist/components/hover-card.js +14 -0
- package/dist/components/input-group.js +63 -0
- package/dist/components/input-otp.js +21 -0
- package/dist/components/input.js +6 -0
- package/dist/components/item.js +66 -0
- package/dist/components/kbd.js +9 -0
- package/dist/components/label.js +8 -0
- package/dist/components/language-switcher.js +20 -0
- package/dist/components/menubar.js +54 -0
- package/dist/components/navigation-menu.js +31 -0
- package/dist/components/pagination.js +31 -0
- package/dist/components/popover.js +17 -0
- package/dist/components/progress.js +8 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/scroll-area.js +13 -0
- package/dist/components/select.js +38 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/sheet.js +40 -0
- package/dist/components/sidebar.js +213 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.js +21 -0
- package/dist/components/spinner.js +7 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/table.js +28 -0
- package/dist/components/tabs.js +17 -0
- package/dist/components/textarea.js +6 -0
- package/dist/components/toggle-group.js +22 -0
- package/dist/components/toggle.js +26 -0
- package/dist/components/tooltip.js +17 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-user.js +25 -0
- package/dist/lib/{utils.mjs → utils.js} +1 -1
- package/dist/logo.js +28 -0
- package/dist/postcss.config.mjs +1 -2
- package/dist/providers/auth-provider.js +27 -0
- package/dist/providers/index.js +23 -0
- package/dist/shared/access-denied.js +6 -0
- package/dist/shared/loader.js +41 -0
- package/dist/shared/page-loader.js +6 -0
- package/dist/shared/scroll-fade-effect.js +5 -0
- package/package.json +17 -20
- package/build.config.ts +0 -23
- package/components.json +0 -20
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.d.ts +0 -7
- package/dist/components/accordion.mjs +0 -58
- package/dist/components/alert-dialog.d.ts +0 -14
- package/dist/components/alert-dialog.mjs +0 -144
- package/dist/components/alert.d.ts +0 -9
- package/dist/components/alert.mjs +0 -62
- package/dist/components/aspect-ratio.d.ts +0 -4
- package/dist/components/aspect-ratio.mjs +0 -9
- package/dist/components/avatar.d.ts +0 -6
- package/dist/components/avatar.mjs +0 -50
- package/dist/components/badge.d.ts +0 -9
- package/dist/components/badge.mjs +0 -37
- package/dist/components/breadcrumb.d.ts +0 -11
- package/dist/components/breadcrumb.mjs +0 -105
- package/dist/components/button-group.d.ts +0 -13
- package/dist/components/button-group.mjs +0 -76
- package/dist/components/button.d.ts +0 -10
- package/dist/components/button.mjs +0 -51
- package/dist/components/calendar.d.ts +0 -8
- package/dist/components/calendar.mjs +0 -191
- package/dist/components/card.d.ts +0 -9
- package/dist/components/card.mjs +0 -90
- package/dist/components/checkbox.d.ts +0 -4
- package/dist/components/checkbox.mjs +0 -30
- package/dist/components/collapsible.d.ts +0 -6
- package/dist/components/collapsible.mjs +0 -31
- package/dist/components/command.d.ts +0 -18
- package/dist/components/command.mjs +0 -169
- package/dist/components/context-menu.d.ts +0 -25
- package/dist/components/context-menu.mjs +0 -218
- package/dist/components/dialog.d.ts +0 -15
- package/dist/components/dialog.mjs +0 -130
- package/dist/components/drawer.d.ts +0 -13
- package/dist/components/drawer.mjs +0 -124
- package/dist/components/dropdown-menu.d.ts +0 -25
- package/dist/components/dropdown-menu.mjs +0 -226
- package/dist/components/empty.d.ts +0 -12
- package/dist/components/empty.mjs +0 -102
- package/dist/components/field.d.ts +0 -25
- package/dist/components/field.mjs +0 -228
- package/dist/components/form.d.ts +0 -23
- package/dist/components/form.mjs +0 -123
- package/dist/components/hover-card.d.ts +0 -6
- package/dist/components/hover-card.mjs +0 -35
- package/dist/components/input-group.d.ts +0 -16
- package/dist/components/input-group.mjs +0 -155
- package/dist/components/input-otp.d.ts +0 -11
- package/dist/components/input-otp.mjs +0 -59
- package/dist/components/input.d.ts +0 -3
- package/dist/components/input.mjs +0 -19
- package/dist/components/item.d.ts +0 -23
- package/dist/components/item.mjs +0 -187
- package/dist/components/kbd.d.ts +0 -4
- package/dist/components/kbd.mjs +0 -28
- package/dist/components/label.d.ts +0 -4
- package/dist/components/label.mjs +0 -21
- package/dist/components/language-switcher.d.ts +0 -2
- package/dist/components/language-switcher.mjs +0 -30
- package/dist/components/menubar.d.ts +0 -26
- package/dist/components/menubar.mjs +0 -246
- package/dist/components/navigation-menu.d.ts +0 -14
- package/dist/components/navigation-menu.mjs +0 -166
- package/dist/components/pagination.d.ts +0 -15
- package/dist/components/pagination.mjs +0 -116
- package/dist/components/popover.d.ts +0 -7
- package/dist/components/popover.mjs +0 -40
- package/dist/components/progress.d.ts +0 -4
- package/dist/components/progress.mjs +0 -30
- package/dist/components/radio-group.d.ts +0 -5
- package/dist/components/radio-group.mjs +0 -43
- package/dist/components/scroll-area.d.ts +0 -7
- package/dist/components/scroll-area.mjs +0 -59
- package/dist/components/select.d.ts +0 -15
- package/dist/components/select.mjs +0 -173
- package/dist/components/separator.d.ts +0 -4
- package/dist/components/separator.mjs +0 -25
- package/dist/components/sheet.d.ts +0 -13
- package/dist/components/sheet.mjs +0 -119
- package/dist/components/sidebar.d.ts +0 -69
- package/dist/components/sidebar.mjs +0 -635
- package/dist/components/skeleton.d.ts +0 -3
- package/dist/components/skeleton.mjs +0 -13
- package/dist/components/slider.d.ts +0 -4
- package/dist/components/slider.mjs +0 -59
- package/dist/components/sonner.d.ts +0 -4
- package/dist/components/sonner.mjs +0 -36
- package/dist/components/spinner.d.ts +0 -3
- package/dist/components/spinner.mjs +0 -15
- package/dist/components/switch.d.ts +0 -4
- package/dist/components/switch.mjs +0 -30
- package/dist/components/table.d.ts +0 -10
- package/dist/components/table.mjs +0 -115
- package/dist/components/tabs.d.ts +0 -7
- package/dist/components/tabs.mjs +0 -63
- package/dist/components/textarea.d.ts +0 -3
- package/dist/components/textarea.mjs +0 -16
- package/dist/components/toggle-group.d.ts +0 -9
- package/dist/components/toggle-group.mjs +0 -65
- package/dist/components/toggle.d.ts +0 -9
- package/dist/components/toggle.mjs +0 -41
- package/dist/components/tooltip.d.ts +0 -7
- package/dist/components/tooltip.mjs +0 -49
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.mjs +0 -17
- package/dist/hooks/use-user.d.ts +0 -12
- package/dist/hooks/use-user.mjs +0 -12
- package/dist/index.mjs +0 -15
- package/dist/lib/utils.d.ts +0 -2
- package/dist/logo.d.ts +0 -15
- package/dist/logo.mjs +0 -32
- package/dist/postcss.config.d.mts +0 -3
- package/dist/providers/auth-provider.d.ts +0 -15
- package/dist/providers/auth-provider.mjs +0 -37
- package/dist/providers/index.d.ts +0 -7
- package/dist/providers/index.mjs +0 -33
- package/dist/shared/access-denied.d.ts +0 -2
- package/dist/shared/access-denied.mjs +0 -12
- package/dist/shared/loader.d.ts +0 -11
- package/dist/shared/loader.mjs +0 -98
- package/dist/shared/page-loader.d.ts +0 -7
- package/dist/shared/page-loader.mjs +0 -6
- package/dist/shared/scroll-fade-effect.d.ts +0 -4
- package/dist/shared/scroll-fade-effect.mjs +0 -20
- package/dist/styles/globals.css +0 -1
- package/postcss.config.mjs +0 -6
- package/scripts/switchToDist.js +0 -55
- package/scripts/switchToSrc.js +0 -52
- package/src/components/.gitkeep +0 -0
- package/src/components/accordion.tsx +0 -66
- package/src/components/alert-dialog.tsx +0 -157
- package/src/components/alert.tsx +0 -66
- package/src/components/aspect-ratio.tsx +0 -12
- package/src/components/avatar.tsx +0 -53
- package/src/components/badge.tsx +0 -46
- package/src/components/breadcrumb.tsx +0 -111
- package/src/components/button-group.tsx +0 -86
- package/src/components/button.tsx +0 -62
- package/src/components/calendar.tsx +0 -220
- package/src/components/card.tsx +0 -92
- package/src/components/checkbox.tsx +0 -32
- package/src/components/collapsible.tsx +0 -34
- package/src/components/command.tsx +0 -184
- package/src/components/context-menu.tsx +0 -252
- package/src/components/dialog.tsx +0 -143
- package/src/components/drawer.tsx +0 -135
- package/src/components/dropdown-menu.tsx +0 -257
- package/src/components/empty.tsx +0 -105
- package/src/components/field.tsx +0 -251
- package/src/components/form.tsx +0 -170
- package/src/components/hover-card.tsx +0 -44
- package/src/components/input-group.tsx +0 -170
- package/src/components/input-otp.tsx +0 -77
- package/src/components/input.tsx +0 -21
- package/src/components/item.tsx +0 -193
- package/src/components/kbd.tsx +0 -29
- package/src/components/label.tsx +0 -24
- package/src/components/language-switcher.tsx +0 -49
- package/src/components/menubar.tsx +0 -276
- package/src/components/navigation-menu.tsx +0 -168
- package/src/components/pagination.tsx +0 -130
- package/src/components/popover.tsx +0 -48
- package/src/components/progress.tsx +0 -31
- package/src/components/radio-group.tsx +0 -45
- package/src/components/scroll-area.tsx +0 -67
- package/src/components/select.tsx +0 -190
- package/src/components/separator.tsx +0 -28
- package/src/components/sheet.tsx +0 -139
- package/src/components/sidebar.tsx +0 -726
- package/src/components/skeleton.tsx +0 -14
- package/src/components/slider.tsx +0 -63
- package/src/components/sonner.tsx +0 -41
- package/src/components/spinner.tsx +0 -17
- package/src/components/switch.tsx +0 -31
- package/src/components/table.tsx +0 -116
- package/src/components/tabs.tsx +0 -66
- package/src/components/textarea.tsx +0 -18
- package/src/components/toggle-group.tsx +0 -83
- package/src/components/toggle.tsx +0 -47
- package/src/components/tooltip.tsx +0 -61
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/use-mobile.ts +0 -21
- package/src/hooks/use-user.ts +0 -27
- package/src/index.ts +0 -15
- package/src/lib/utils.ts +0 -6
- package/src/logo.tsx +0 -49
- package/src/postcss.config.mjs +0 -6
- package/src/providers/auth-provider.tsx +0 -66
- package/src/providers/index.tsx +0 -50
- package/src/shared/access-denied.tsx +0 -31
- package/src/shared/loader.tsx +0 -109
- package/src/shared/page-loader.tsx +0 -24
- package/src/shared/scroll-fade-effect.tsx +0 -23
- package/src/styles/globals.css +0 -314
- package/tsconfig.json +0 -24
- /package/dist/{index.d.ts → index.js} +0 -0
package/dist/logo.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
|
-
import Image from "next/image";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { cn } from "./lib/utils.mjs";
|
|
6
|
-
const variants = cva("", {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "stroke-primary fill-primary",
|
|
10
|
-
primary: "stroke-primary fill-primary"
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
default: "",
|
|
14
|
-
sm: "h-auto w-10",
|
|
15
|
-
md: "h-auto w-16"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
defaultVariants: {
|
|
19
|
-
variant: "default",
|
|
20
|
-
size: "sm"
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
function Logo({
|
|
24
|
-
className,
|
|
25
|
-
asChild = false,
|
|
26
|
-
...props
|
|
27
|
-
}) {
|
|
28
|
-
const Comp = asChild ? Slot : "div";
|
|
29
|
-
return /* @__PURE__ */ React.createElement(Comp, { ...props, className: cn("flex items-center space-x-2", className) }, /* @__PURE__ */ React.createElement(Image, { src: "/logo.svg", alt: "alt", height: 24.69, width: 164 }));
|
|
30
|
-
}
|
|
31
|
-
Logo.displayName = "Logo";
|
|
32
|
-
export { Logo, variants };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AuthSession } from "@arch-cadre/core";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { type ReactNode } from "react";
|
|
4
|
-
export declare const AuthContext: React.Context<{
|
|
5
|
-
user: AuthSession["user"] | null | undefined;
|
|
6
|
-
session: AuthSession["session"] | null | undefined;
|
|
7
|
-
kryoPrefix: string;
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
refetchUser: () => Promise<void>;
|
|
10
|
-
} | undefined>;
|
|
11
|
-
export default function AuthProvider({ children, initialSession, kryoPrefix, }: {
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
initialSession?: AuthSession;
|
|
14
|
-
kryoPrefix?: string;
|
|
15
|
-
}): React.JSX.Element;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { createContext, useEffect, useState } from "react";
|
|
4
|
-
import { mutate } from "swr";
|
|
5
|
-
import { PageLoader } from "../shared/page-loader.mjs";
|
|
6
|
-
export const AuthContext = createContext(void 0);
|
|
7
|
-
export default function AuthProvider({
|
|
8
|
-
children,
|
|
9
|
-
initialSession,
|
|
10
|
-
kryoPrefix = "/kryo"
|
|
11
|
-
}) {
|
|
12
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
13
|
-
const refetchUser = async () => {
|
|
14
|
-
mutate("user");
|
|
15
|
-
};
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
setTimeout(() => {
|
|
18
|
-
setIsLoading(false);
|
|
19
|
-
}, 800);
|
|
20
|
-
}, []);
|
|
21
|
-
if (isLoading) {
|
|
22
|
-
return /* @__PURE__ */ React.createElement(PageLoader, { text: "User checking" });
|
|
23
|
-
}
|
|
24
|
-
return /* @__PURE__ */ React.createElement(
|
|
25
|
-
AuthContext.Provider,
|
|
26
|
-
{
|
|
27
|
-
value: {
|
|
28
|
-
user: initialSession?.user,
|
|
29
|
-
session: initialSession?.session,
|
|
30
|
-
kryoPrefix,
|
|
31
|
-
isLoading,
|
|
32
|
-
refetchUser
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
children
|
|
36
|
-
);
|
|
37
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AuthSession } from "@arch-cadre/core";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
export declare const AppProvider: ({ children, initialSession, kryoPrefix, }: {
|
|
4
|
-
children: React.ReactElement;
|
|
5
|
-
initialSession?: AuthSession;
|
|
6
|
-
kryoPrefix?: string;
|
|
7
|
-
}) => React.JSX.Element;
|
package/dist/providers/index.mjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
import { SWRConfig } from "swr";
|
|
5
|
-
import { Toaster } from "../components/sonner.mjs";
|
|
6
|
-
import { TooltipProvider } from "../components/tooltip.mjs";
|
|
7
|
-
import { PageLoader } from "../shared/page-loader.mjs";
|
|
8
|
-
import AuthProvider from "./auth-provider.mjs";
|
|
9
|
-
export const AppProvider = ({
|
|
10
|
-
children,
|
|
11
|
-
initialSession,
|
|
12
|
-
kryoPrefix
|
|
13
|
-
}) => {
|
|
14
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
setTimeout(() => {
|
|
17
|
-
setIsLoading(false);
|
|
18
|
-
}, 800);
|
|
19
|
-
}, []);
|
|
20
|
-
if (isLoading) {
|
|
21
|
-
return /* @__PURE__ */ React.createElement(PageLoader, { text: "Initializing" });
|
|
22
|
-
}
|
|
23
|
-
return /* @__PURE__ */ React.createElement(
|
|
24
|
-
SWRConfig,
|
|
25
|
-
{
|
|
26
|
-
value: {
|
|
27
|
-
fetcher: (url) => fetch(url).then((response) => responseon()),
|
|
28
|
-
revalidateIfStale: true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
/* @__PURE__ */ React.createElement(AuthProvider, { initialSession, kryoPrefix }, /* @__PURE__ */ React.createElement(TooltipProvider, null, children, /* @__PURE__ */ React.createElement(Toaster, { position: "top-right", expand: true })))
|
|
32
|
-
);
|
|
33
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Icon } from "@iconify/react";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Button } from "../components/button.mjs";
|
|
4
|
-
export function AccessDenied() {
|
|
5
|
-
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center min-h-[60vh] text-center space-y-6 p-4" }, /* @__PURE__ */ React.createElement("div", { className: "bg-destructive/10 p-6 rounded-full" }, /* @__PURE__ */ React.createElement(
|
|
6
|
-
Icon,
|
|
7
|
-
{
|
|
8
|
-
icon: "solar:shield-warning-bold-duotone",
|
|
9
|
-
className: "size-16 text-destructive"
|
|
10
|
-
}
|
|
11
|
-
)), /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("h2", { className: "text-2xl font-bold tracking-tight" }, "Access Denied"), /* @__PURE__ */ React.createElement("p", { className: "text-muted-foreground max-w-[400px]" }, "You do not have the required permissions to access this area. Please contact your administrator if you believe this is an error.")), /* @__PURE__ */ React.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React.createElement(Button, { asChild: true, variant: "outline" }, /* @__PURE__ */ React.createElement("a", { href: "/" }, "Go back home")), /* @__PURE__ */ React.createElement(Button, { asChild: true }, /* @__PURE__ */ React.createElement("a", { href: "/signin" }, "Sign in with another account"))));
|
|
12
|
-
}
|
package/dist/shared/loader.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { VariantProps } from "class-variance-authority";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const loaderVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "secondary" | "ghost" | "dark" | null | undefined;
|
|
5
|
-
size?: "default" | "md" | "lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof loaderVariants> {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare function Loader({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof loaderVariants> & LoaderProps): React.JSX.Element;
|
|
11
|
-
export { Loader, loaderVariants };
|
package/dist/shared/loader.mjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { cn } from "../lib/utils.mjs";
|
|
5
|
-
const loaderVariants = cva("spinner", {
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: "stroke-primary",
|
|
9
|
-
dark: "stroke-white",
|
|
10
|
-
destructive: "stroke-destructive",
|
|
11
|
-
secondary: "stroke-secondary",
|
|
12
|
-
ghost: "stroke-accent"
|
|
13
|
-
},
|
|
14
|
-
size: {
|
|
15
|
-
default: "h-5 w-5",
|
|
16
|
-
md: "h-10 w-10",
|
|
17
|
-
lg: "h-60 w-60"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
variant: "default",
|
|
22
|
-
size: "default"
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
function Loader({
|
|
26
|
-
className,
|
|
27
|
-
variant,
|
|
28
|
-
size,
|
|
29
|
-
asChild = false,
|
|
30
|
-
...props
|
|
31
|
-
}) {
|
|
32
|
-
const Comp = asChild ? Slot : "div";
|
|
33
|
-
return /* @__PURE__ */ React.createElement(Comp, { className: "flex items-center justify-center", ...props }, /* @__PURE__ */ React.createElement("style", null, `
|
|
34
|
-
.spinner {
|
|
35
|
-
animation: animate-rotate 2s linear infinite;
|
|
36
|
-
z-index: 2;
|
|
37
|
-
max-width: 5rem;
|
|
38
|
-
max-height: 5rem;
|
|
39
|
-
|
|
40
|
-
.path {
|
|
41
|
-
stroke-linecap: round;
|
|
42
|
-
animation: animate-dash 1.75s ease-in-out infinite;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
`), /* @__PURE__ */ React.createElement(
|
|
46
|
-
"svg",
|
|
47
|
-
{
|
|
48
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
-
viewBox: "0 0 24 24",
|
|
50
|
-
className: cn(loaderVariants({ variant, size, className }))
|
|
51
|
-
},
|
|
52
|
-
/* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement(
|
|
53
|
-
"circle",
|
|
54
|
-
{
|
|
55
|
-
cx: 12,
|
|
56
|
-
cy: 12,
|
|
57
|
-
r: 9.5,
|
|
58
|
-
fill: "none",
|
|
59
|
-
strokeLinecap: "round",
|
|
60
|
-
strokeWidth: 3
|
|
61
|
-
},
|
|
62
|
-
/* @__PURE__ */ React.createElement(
|
|
63
|
-
"animate",
|
|
64
|
-
{
|
|
65
|
-
attributeName: "stroke-dasharray",
|
|
66
|
-
calcMode: "spline",
|
|
67
|
-
dur: "1.5s",
|
|
68
|
-
keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
|
|
69
|
-
keyTimes: "0;0.475;0.95;1",
|
|
70
|
-
repeatCount: "indefinite",
|
|
71
|
-
values: "0 150;42 150;42 150;42 150"
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
/* @__PURE__ */ React.createElement(
|
|
75
|
-
"animate",
|
|
76
|
-
{
|
|
77
|
-
attributeName: "stroke-dashoffset",
|
|
78
|
-
calcMode: "spline",
|
|
79
|
-
dur: "1.5s",
|
|
80
|
-
keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
|
|
81
|
-
keyTimes: "0;0.475;0.95;1",
|
|
82
|
-
repeatCount: "indefinite",
|
|
83
|
-
values: "0;-16;-59;-59"
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
), /* @__PURE__ */ React.createElement(
|
|
87
|
-
"animateTransform",
|
|
88
|
-
{
|
|
89
|
-
attributeName: "transform",
|
|
90
|
-
dur: "2s",
|
|
91
|
-
repeatCount: "indefinite",
|
|
92
|
-
type: "rotate",
|
|
93
|
-
values: "0 12 12;360 12 12"
|
|
94
|
-
}
|
|
95
|
-
))
|
|
96
|
-
));
|
|
97
|
-
}
|
|
98
|
-
export { Loader, loaderVariants };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Logo } from "../logo.mjs";
|
|
3
|
-
import { Loader } from "./loader.mjs";
|
|
4
|
-
export function PageLoader({ withLogo = true, text }) {
|
|
5
|
-
return /* @__PURE__ */ React.createElement("div", { className: "bg-background absolute inset-0 flex flex-col items-center justify-center space-y-6" }, withLogo && /* @__PURE__ */ React.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React.createElement(Logo, null)), /* @__PURE__ */ React.createElement(Loader, null), text && /* @__PURE__ */ React.createElement("div", { className: "text-xs lowercase" }, text));
|
|
6
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "../lib/utils.mjs";
|
|
3
|
-
export function ScrollFadeEffect({
|
|
4
|
-
className,
|
|
5
|
-
orientation = "vertical",
|
|
6
|
-
...props
|
|
7
|
-
}) {
|
|
8
|
-
return /* @__PURE__ */ React.createElement(
|
|
9
|
-
"div",
|
|
10
|
-
{
|
|
11
|
-
"data-orientation": orientation,
|
|
12
|
-
className: cn(
|
|
13
|
-
"data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto",
|
|
14
|
-
"data-[orientation=horizontal]:scroll-fade-effect-x data-[orientation=vertical]:scroll-fade-effect-y",
|
|
15
|
-
className
|
|
16
|
-
),
|
|
17
|
-
...props
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
}
|
package/dist/styles/globals.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";@source "../../../apps/**/*.{ts,tsx}";@source "../../../components/**/*.{ts,tsx}";@source "../**/*.{ts,tsx}";@import "tw-animate-css";@custom-variant dark (&:is(.dark *));@theme inline{--container:1024px;--color-background:var(--background);--color-foreground:var(--foreground);--font-sans:var(--font-syne-sans);--font-mono:var(--font-syne-mono);--color-sidebar-ring:var(--sidebar-ring);--color-sidebar-border:var(--sidebar-border);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar:var(--sidebar);--color-chart-5:var(--chart-5);--color-chart-4:var(--chart-4);--color-chart-3:var(--chart-3);--color-chart-2:var(--chart-2);--color-chart-1:var(--chart-1);--color-ring:var(--ring);--color-input:var(--input);--color-border:var(--border);--color-destructive:var(--destructive);--color-accent-foreground:var(--accent-foreground);--color-accent:var(--accent);--color-muted-foreground:var(--muted-foreground);--color-muted:var(--muted);--color-secondary-foreground:var(--secondary-foreground);--color-secondary:var(--secondary);--color-primary-foreground:var(--primary-foreground);--color-primary:var(--primary);--color-popover-foreground:var(--popover-foreground);--color-popover:var(--popover);--color-card-foreground:var(--card-foreground);--color-card:var(--card);--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--radius-2xl:calc(var(--radius) + 8px);--radius-3xl:calc(var(--radius) + 12px);--radius-4xl:calc(var(--radius) + 16px)}:root{--radius:0.5rem;--background:oklch(0.985 0 0);--foreground:oklch(0.24 0.06 245.57);--card:oklch(1 0 0);--card-foreground:oklch(0.24 0.06 245.57);--popover:oklch(1 0 0);--popover-foreground:oklch(0.24 0.06 245.57);--primary:oklch(0.24 0.06 245.57);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(0.97 0 0);--secondary-foreground:oklch(0.24 0.06 245.57);--muted:oklch(0.97 0 0);--muted-foreground:oklch(0.556 0 0);--accent:oklch(0.97 0 0);--accent-foreground:oklch(0.24 0.06 245.57);--destructive:oklch(0.577 0.245 27.325);--border:oklch(0.922 0 0);--input:oklch(0.922 0 0);--ring:oklch(0.708 0 0);--chart-1:oklch(0.646 0.222 41.116);--chart-2:oklch(0.6 0.118 184.704);--chart-3:oklch(0.398 0.07 227.392);--chart-4:oklch(0.828 0.189 84.429);--chart-5:oklch(0.769 0.188 70.08);--sidebar:oklch(1 0 0);--sidebar-foreground:oklch(0.24 0.06 245.57);--sidebar-primary:oklch(0.24 0.06 245.57);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.97 0 0);--sidebar-accent-foreground:oklch(0.24 0.06 245.57);--sidebar-border:oklch(0.922 0 0);--sidebar-ring:oklch(0.708 0 0)}.dark{--background:oklch(0.145 0 0);--foreground:oklch(0.985 0 0);--card:oklch(0.205 0 0);--card-foreground:oklch(0.985 0 0);--popover:oklch(0.205 0 0);--popover-foreground:oklch(0.985 0 0);--primary:oklch(0.922 0 0);--primary-foreground:oklch(0.205 0 0);--secondary:oklch(0.269 0 0);--secondary-foreground:oklch(0.985 0 0);--muted:oklch(0.269 0 0);--muted-foreground:oklch(0.708 0 0);--accent:oklch(0.269 0 0);--accent-foreground:oklch(0.985 0 0);--destructive:oklch(0.704 0.191 22.216);--border:oklch(1 0 0/10%);--input:oklch(1 0 0/15%);--ring:oklch(0.556 0 0);--chart-1:oklch(0.488 0.243 264.376);--chart-2:oklch(0.696 0.17 162.48);--chart-3:oklch(0.769 0.188 70.08);--chart-4:oklch(0.627 0.265 303.9);--chart-5:oklch(0.645 0.246 16.439);--sidebar:oklch(0.205 0 0);--sidebar-foreground:oklch(0.985 0 0);--sidebar-primary:oklch(0.488 0.243 264.376);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.269 0 0);--sidebar-accent-foreground:oklch(0.985 0 0);--sidebar-border:oklch(1 0 0/10%);--sidebar-ring:oklch(0.556 0 0)}@layer utilities{.squircle{border-radius:1rem}@supports (corner-shape:squircle){.squircle{border-radius:2rem;corner-shape:squircle}}}@layer base{*{@apply border-border outline-ring/50}body{@apply bg-background text-foreground}body:before{z-index:1}[data-slot=sidebar-wrapper]:before,body:before{background:#000;content:"";filter:url(#grain);height:100%;left:0;opacity:.1;pointer-events:none;position:fixed;top:0;width:100%}[data-slot=sidebar-wrapper]:before{z-index:51}svg.grain-noise{height:0;position:absolute;width:0;z-index:-1}.container{margin:0 auto;max-width:var(--container);@apply px-4 sm:px-6 lg:px-8}@keyframes show-top-mask{to{--top-mask-height:var(--mask-height)}}@keyframes hide-bottom-mask{to{--bottom-mask-height:0px}}@keyframes show-left-mask{to{--left-mask-width:var(--mask-width)}}@keyframes hide-right-mask{to{--right-mask-width:0px}}}@property --top-mask-height{syntax:"<length>";inherits:true;initial-value:0}@property --bottom-mask-height{syntax:"<length>";inherits:true;initial-value:64px}@property --left-mask-width{syntax:"<length>";inherits:true;initial-value:0}@property --right-mask-width{syntax:"<length>";inherits:true;initial-value:64px}@utility scroll-fade-effect-y{--mask-height:64px;--mask-offset-top:0px;--mask-offset-bottom:0px;--scroll-buffer:2rem;animation-fill-mode:both;animation-name:show-top-mask,hide-bottom-mask;animation-range:0 var(--scroll-buffer),calc(100% - var(--scroll-buffer)) 100%;animation-timeline:scroll(self),scroll(self);-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-image:linear-gradient(0deg,transparent,#000 90%),linear-gradient(180deg,transparent 0,#000),linear-gradient(#000,#000);mask-image:linear-gradient(0deg,transparent,#000 90%),linear-gradient(180deg,transparent 0,#000),linear-gradient(#000,#000);-webkit-mask-position:0 var(--mask-offset-top),0 calc(100% - var(--mask-offset-bottom)),0 0;mask-position:0 var(--mask-offset-top),0 calc(100% - var(--mask-offset-bottom)),0 0;-webkit-mask-repeat:no-repeat,no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat,no-repeat;-webkit-mask-size:100% var(--top-mask-height),100% var(--bottom-mask-height),100% 100%;mask-size:100% var(--top-mask-height),100% var(--bottom-mask-height),100% 100%}@utility scroll-fade-effect-x{--mask-width:64px;--mask-offset-left:0px;--mask-offset-right:0px;--scroll-buffer:2rem;animation-fill-mode:both;animation-name:show-left-mask,hide-right-mask;animation-range:0 var(--scroll-buffer),calc(100% - var(--scroll-buffer)) 100%;animation-timeline:scroll(self inline),scroll(self inline);-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-image:linear-gradient(270deg,transparent,#000 90%),linear-gradient(90deg,transparent 0,#000),linear-gradient(#000,#000);mask-image:linear-gradient(270deg,transparent,#000 90%),linear-gradient(90deg,transparent 0,#000),linear-gradient(#000,#000);-webkit-mask-position:var(--mask-offset-left) 0,calc(100% - var(--mask-offset-right)) 0,0 0;mask-position:var(--mask-offset-left) 0,calc(100% - var(--mask-offset-right)) 0,0 0;-webkit-mask-repeat:no-repeat,no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat,no-repeat;-webkit-mask-size:var(--left-mask-width) 100%,var(--right-mask-width) 100%,100% 100%;mask-size:var(--left-mask-width) 100%,var(--right-mask-width) 100%,100% 100%}@keyframes progress-fast{0%{transform:translateX(-100%)}50%{transform:translateX(-20%)}to{transform:translateX(100%)}}.animate-progress-fast{animation:progress-fast 1.5s linear infinite}
|
package/postcss.config.mjs
DELETED
package/scripts/switchToDist.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = path.dirname(__filename);
|
|
7
|
-
|
|
8
|
-
const packagePath = path.resolve(__dirname, "../package.json");
|
|
9
|
-
const pkg = JSON.parse(fs.readFileSync(packagePath, "utf-8"));
|
|
10
|
-
|
|
11
|
-
pkg.main = "./dist/index.mjs";
|
|
12
|
-
|
|
13
|
-
pkg.exports = {
|
|
14
|
-
"./package.json": "./package.json",
|
|
15
|
-
"./globals.css": "./dist/styles/globals.css",
|
|
16
|
-
"./postcss.config": "./postcss.config.mjs",
|
|
17
|
-
".": {
|
|
18
|
-
types: "./dist/index.d.ts",
|
|
19
|
-
import: "./dist/index.mjs",
|
|
20
|
-
require: "./dist/index.cjs",
|
|
21
|
-
},
|
|
22
|
-
"./providers": {
|
|
23
|
-
types: "./dist/providers/index.d.ts",
|
|
24
|
-
import: "./dist/providers/index.mjs",
|
|
25
|
-
require: "./dist/providers/index.cjs",
|
|
26
|
-
},
|
|
27
|
-
"./brand/logo": {
|
|
28
|
-
types: "./dist/logo.d.ts",
|
|
29
|
-
import: "./dist/logo.mjs",
|
|
30
|
-
require: "./dist/logo.cjs",
|
|
31
|
-
},
|
|
32
|
-
"./shared/*": {
|
|
33
|
-
types: "./dist/shared/*.d.ts",
|
|
34
|
-
import: "./dist/shared/*.mjs",
|
|
35
|
-
require: "./dist/shared/*.cjs",
|
|
36
|
-
},
|
|
37
|
-
"./lib/*": {
|
|
38
|
-
types: "./dist/lib/*.d.ts",
|
|
39
|
-
import: "./dist/lib/*.mjs",
|
|
40
|
-
require: "./dist/lib/*.cjs",
|
|
41
|
-
},
|
|
42
|
-
"./components/*": {
|
|
43
|
-
types: "./dist/components/*.d.ts",
|
|
44
|
-
import: "./dist/components/*.mjs",
|
|
45
|
-
require: "./dist/components/*.cjs",
|
|
46
|
-
},
|
|
47
|
-
"./hooks/*": {
|
|
48
|
-
types: "./dist/hooks/*.d.ts",
|
|
49
|
-
import: "./dist/hooks/*.mjs",
|
|
50
|
-
require: "./dist/hooks/*.cjs",
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2));
|
|
55
|
-
console.log("Switched exports to use dist for production");
|
package/scripts/switchToSrc.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = path.dirname(__filename);
|
|
7
|
-
|
|
8
|
-
const packagePath = path.resolve(__dirname, "../package.json");
|
|
9
|
-
|
|
10
|
-
// Leer el archivo package.json
|
|
11
|
-
const pkg = JSON.parse(fs.readFileSync(packagePath, "utf-8"));
|
|
12
|
-
|
|
13
|
-
pkg.main = "./src/index.ts";
|
|
14
|
-
|
|
15
|
-
// Modificar los exports
|
|
16
|
-
pkg.exports = {
|
|
17
|
-
"./package.json": "./package.json",
|
|
18
|
-
"./globals.css": "./src/styles/globals.css",
|
|
19
|
-
"./postcss.config": "./postcss.config.mjs",
|
|
20
|
-
".": {
|
|
21
|
-
import: "./src/index.ts",
|
|
22
|
-
require: "./dist/index.cjs",
|
|
23
|
-
},
|
|
24
|
-
"./providers": {
|
|
25
|
-
import: "./src/providers/index.tsx",
|
|
26
|
-
require: "./dist/providers/index.cjs",
|
|
27
|
-
},
|
|
28
|
-
"./brand/logo": {
|
|
29
|
-
import: "./src/logo.tsx",
|
|
30
|
-
require: "./dist/logo.cjs",
|
|
31
|
-
},
|
|
32
|
-
"./shared/*": {
|
|
33
|
-
import: "./src/shared/*.tsx",
|
|
34
|
-
require: "./dist/shared/*.cjs",
|
|
35
|
-
},
|
|
36
|
-
"./lib/*": {
|
|
37
|
-
import: "./src/lib/*.ts",
|
|
38
|
-
require: "./dist/lib/*.cjs",
|
|
39
|
-
},
|
|
40
|
-
"./components/*": {
|
|
41
|
-
import: "./src/components/*.tsx",
|
|
42
|
-
require: "./dist/components/*.cjs",
|
|
43
|
-
},
|
|
44
|
-
"./hooks/*": {
|
|
45
|
-
import: "./src/hooks/*.ts",
|
|
46
|
-
require: "./dist/hooks/*.cjs",
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// Guardar los cambios en package.json
|
|
51
|
-
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2));
|
|
52
|
-
console.log("Switched exports to use src for development");
|
package/src/components/.gitkeep
DELETED
|
File without changes
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
-
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
|
|
9
|
-
function Accordion({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
12
|
-
return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function AccordionItem({
|
|
16
|
-
className,
|
|
17
|
-
...props
|
|
18
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
19
|
-
return (
|
|
20
|
-
<AccordionPrimitive.Item
|
|
21
|
-
data-slot="accordion-item"
|
|
22
|
-
className={cn("border-b last:border-b-0", className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function AccordionTrigger({
|
|
29
|
-
className,
|
|
30
|
-
children,
|
|
31
|
-
...props
|
|
32
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
33
|
-
return (
|
|
34
|
-
<AccordionPrimitive.Header className="flex">
|
|
35
|
-
<AccordionPrimitive.Trigger
|
|
36
|
-
data-slot="accordion-trigger"
|
|
37
|
-
className={cn(
|
|
38
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
39
|
-
className,
|
|
40
|
-
)}
|
|
41
|
-
{...props}
|
|
42
|
-
>
|
|
43
|
-
{children}
|
|
44
|
-
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
|
|
45
|
-
</AccordionPrimitive.Trigger>
|
|
46
|
-
</AccordionPrimitive.Header>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function AccordionContent({
|
|
51
|
-
className,
|
|
52
|
-
children,
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
55
|
-
return (
|
|
56
|
-
<AccordionPrimitive.Content
|
|
57
|
-
data-slot="accordion-content"
|
|
58
|
-
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
|
|
59
|
-
{...props}
|
|
60
|
-
>
|
|
61
|
-
<div className={cn("pt-0 pb-4", className)}>{children}</div>
|
|
62
|
-
</AccordionPrimitive.Content>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../lib/utils";
|
|
7
|
-
import { buttonVariants } from "./button";
|
|
8
|
-
|
|
9
|
-
function AlertDialog({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
12
|
-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function AlertDialogTrigger({
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
18
|
-
return (
|
|
19
|
-
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function AlertDialogPortal({
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
26
|
-
return (
|
|
27
|
-
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function AlertDialogOverlay({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
35
|
-
return (
|
|
36
|
-
<AlertDialogPrimitive.Overlay
|
|
37
|
-
data-slot="alert-dialog-overlay"
|
|
38
|
-
className={cn(
|
|
39
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function AlertDialogContent({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
51
|
-
return (
|
|
52
|
-
<AlertDialogPortal>
|
|
53
|
-
<AlertDialogOverlay />
|
|
54
|
-
<AlertDialogPrimitive.Content
|
|
55
|
-
data-slot="alert-dialog-content"
|
|
56
|
-
className={cn(
|
|
57
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
58
|
-
className,
|
|
59
|
-
)}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
</AlertDialogPortal>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function AlertDialogHeader({
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: React.ComponentProps<"div">) {
|
|
70
|
-
return (
|
|
71
|
-
<div
|
|
72
|
-
data-slot="alert-dialog-header"
|
|
73
|
-
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function AlertDialogFooter({
|
|
80
|
-
className,
|
|
81
|
-
...props
|
|
82
|
-
}: React.ComponentProps<"div">) {
|
|
83
|
-
return (
|
|
84
|
-
<div
|
|
85
|
-
data-slot="alert-dialog-footer"
|
|
86
|
-
className={cn(
|
|
87
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
88
|
-
className,
|
|
89
|
-
)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function AlertDialogTitle({
|
|
96
|
-
className,
|
|
97
|
-
...props
|
|
98
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
99
|
-
return (
|
|
100
|
-
<AlertDialogPrimitive.Title
|
|
101
|
-
data-slot="alert-dialog-title"
|
|
102
|
-
className={cn("text-lg font-semibold", className)}
|
|
103
|
-
{...props}
|
|
104
|
-
/>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function AlertDialogDescription({
|
|
109
|
-
className,
|
|
110
|
-
...props
|
|
111
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
112
|
-
return (
|
|
113
|
-
<AlertDialogPrimitive.Description
|
|
114
|
-
data-slot="alert-dialog-description"
|
|
115
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
116
|
-
{...props}
|
|
117
|
-
/>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function AlertDialogAction({
|
|
122
|
-
className,
|
|
123
|
-
...props
|
|
124
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
125
|
-
return (
|
|
126
|
-
<AlertDialogPrimitive.Action
|
|
127
|
-
className={cn(buttonVariants(), className)}
|
|
128
|
-
{...props}
|
|
129
|
-
/>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function AlertDialogCancel({
|
|
134
|
-
className,
|
|
135
|
-
...props
|
|
136
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
137
|
-
return (
|
|
138
|
-
<AlertDialogPrimitive.Cancel
|
|
139
|
-
className={cn(buttonVariants({ variant: "outline" }), className)}
|
|
140
|
-
{...props}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export {
|
|
146
|
-
AlertDialog,
|
|
147
|
-
AlertDialogPortal,
|
|
148
|
-
AlertDialogOverlay,
|
|
149
|
-
AlertDialogTrigger,
|
|
150
|
-
AlertDialogContent,
|
|
151
|
-
AlertDialogHeader,
|
|
152
|
-
AlertDialogFooter,
|
|
153
|
-
AlertDialogTitle,
|
|
154
|
-
AlertDialogDescription,
|
|
155
|
-
AlertDialogAction,
|
|
156
|
-
AlertDialogCancel,
|
|
157
|
-
};
|