@acronis-platform/shadcn-uikit 0.23.4 → 0.24.0
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.
|
@@ -10,6 +10,7 @@ declare const sheetVariants: (props?: ({
|
|
|
10
10
|
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
11
11
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
12
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
portal?: boolean;
|
|
13
14
|
}
|
|
14
15
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
16
|
declare const SheetHeader: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as o, jsxs as n, Fragment as p } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { X as
|
|
4
|
+
import { cva as h } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import { X as g } from "lucide-react";
|
|
6
6
|
import { cn as i } from "../../lib/utils.js";
|
|
7
|
-
const
|
|
7
|
+
const D = e.Root, j = e.Trigger, k = e.Close, u = e.Portal, l = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
8
8
|
e.Overlay,
|
|
9
9
|
{
|
|
10
10
|
className: i(
|
|
@@ -15,8 +15,8 @@ const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({
|
|
|
15
15
|
ref: s
|
|
16
16
|
}
|
|
17
17
|
));
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
l.displayName = e.Overlay.displayName;
|
|
19
|
+
const y = h(
|
|
20
20
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
@@ -31,28 +31,31 @@ const h = c(
|
|
|
31
31
|
side: "right"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
34
|
+
), x = r.forwardRef(({ side: t = "right", className: a, children: s, portal: m = !0, ...c }, f) => {
|
|
35
|
+
const d = /* @__PURE__ */ n(p, { children: [
|
|
36
|
+
/* @__PURE__ */ o(l, {}),
|
|
37
|
+
/* @__PURE__ */ n(e.Content, { ref: f, className: i(y({ side: t }), a), ...c, children: [
|
|
38
|
+
s,
|
|
39
|
+
/* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
40
|
+
/* @__PURE__ */ o(g, { className: "h-4 w-4" }),
|
|
41
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
42
|
+
] })
|
|
41
43
|
] })
|
|
42
|
-
] })
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
] });
|
|
45
|
+
return m ? /* @__PURE__ */ o(u, { children: d }) : d;
|
|
46
|
+
});
|
|
47
|
+
x.displayName = e.Content.displayName;
|
|
48
|
+
const N = ({ className: t, ...a }) => /* @__PURE__ */ o("div", { className: i("flex flex-col space-y-2 text-center sm:text-left", t), ...a });
|
|
49
|
+
N.displayName = "SheetHeader";
|
|
50
|
+
const b = ({ className: t, ...a }) => /* @__PURE__ */ o(
|
|
48
51
|
"div",
|
|
49
52
|
{
|
|
50
53
|
className: i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t),
|
|
51
54
|
...a
|
|
52
55
|
}
|
|
53
56
|
);
|
|
54
|
-
|
|
55
|
-
const
|
|
57
|
+
b.displayName = "SheetFooter";
|
|
58
|
+
const S = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
56
59
|
e.Title,
|
|
57
60
|
{
|
|
58
61
|
ref: s,
|
|
@@ -60,8 +63,8 @@ const x = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
|
60
63
|
...a
|
|
61
64
|
}
|
|
62
65
|
));
|
|
63
|
-
|
|
64
|
-
const
|
|
66
|
+
S.displayName = e.Title.displayName;
|
|
67
|
+
const v = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
65
68
|
e.Description,
|
|
66
69
|
{
|
|
67
70
|
ref: s,
|
|
@@ -69,17 +72,17 @@ const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
|
69
72
|
...a
|
|
70
73
|
}
|
|
71
74
|
));
|
|
72
|
-
|
|
75
|
+
v.displayName = e.Description.displayName;
|
|
73
76
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
D as Sheet,
|
|
78
|
+
k as SheetClose,
|
|
79
|
+
x as SheetContent,
|
|
80
|
+
v as SheetDescription,
|
|
81
|
+
b as SheetFooter,
|
|
82
|
+
N as SheetHeader,
|
|
83
|
+
l as SheetOverlay,
|
|
84
|
+
u as SheetPortal,
|
|
85
|
+
S as SheetTitle,
|
|
86
|
+
j as SheetTrigger
|
|
84
87
|
};
|
|
85
88
|
//# sourceMappingURL=sheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","sources":["../../../src/components/ui/sheet.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { X } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n {\n variants: {\n side: {\n top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',\n bottom:\n 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',\n right:\n 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n }\n)\n\ninterface SheetContentProps\n extends\n
|
|
1
|
+
{"version":3,"file":"sheet.js","sources":["../../../src/components/ui/sheet.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { X } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n {\n variants: {\n side: {\n top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',\n bottom:\n 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',\n right:\n 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n }\n)\n\ninterface SheetContentProps\n extends\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {\n portal?: boolean\n}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = 'right', className, children, portal = true, ...props }, ref) => {\n const element = (\n <>\n <SheetOverlay />\n <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </>\n )\n\n return portal ? <SheetPortal>{element}</SheetPortal> : element\n})\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />\n)\nSheetHeader.displayName = 'SheetHeader'\n\nconst SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nSheetFooter.displayName = 'SheetFooter'\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n"],"names":["Sheet","SheetPrimitive","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","React","className","props","ref","jsx","cn","sheetVariants","cva","SheetContent","side","children","portal","element","jsxs","Fragment","X","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"mappings":";;;;;;AASA,MAAMA,IAAQC,EAAe,MAEvBC,IAAeD,EAAe,SAE9BE,IAAaF,EAAe,OAE5BG,IAAcH,EAAe,QAE7BI,IAAeC,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACT,EAAe;AAAA,EAAf;AAAA,IACC,WAAWU;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IACJ,KAAAC;AAAA,EAAA;AACF,CACD;AACDJ,EAAa,cAAcJ,EAAe,QAAQ;AAElD,MAAMW,IAAgBC;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,KAAK;AAAA,QACL,QACE;AAAA,QACF,MAAM;AAAA,QACN,OACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GASMC,IAAeR,EAAM,WAGzB,CAAC,EAAE,MAAAS,IAAO,SAAS,WAAAR,GAAW,UAAAS,GAAU,QAAAC,IAAS,IAAM,GAAGT,EAAA,GAASC,MAAQ;AAC3E,QAAMS,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAV,EAACL,GAAA,EAAa;AAAA,IACd,gBAAAc,EAAClB,EAAe,SAAf,EAAuB,KAAAQ,GAAU,WAAWE,EAAGC,EAAc,EAAE,MAAAG,GAAM,GAAGR,CAAS,GAAI,GAAGC,GACtF,UAAA;AAAA,MAAAQ;AAAA,MACD,gBAAAG,EAAClB,EAAe,OAAf,EAAqB,WAAU,4OAC9B,UAAA;AAAA,QAAA,gBAAAS,EAACW,GAAA,EA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