@la-batcave/ui 3.1.2
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/README.md +95 -0
- package/dist/Alert.d.ts +27 -0
- package/dist/Alert.js +56 -0
- package/dist/Avatar.d.ts +20 -0
- package/dist/Avatar.js +40 -0
- package/dist/Badge.d.ts +56 -0
- package/dist/Badge.js +74 -0
- package/dist/Button.d.ts +53 -0
- package/dist/Button.js +66 -0
- package/dist/Card.d.ts +18 -0
- package/dist/Card.js +98 -0
- package/dist/CodeBlock.d.ts +45 -0
- package/dist/CodeBlock.js +306 -0
- package/dist/Collapse.d.ts +58 -0
- package/dist/Collapse.js +89 -0
- package/dist/Combobox.d.ts +44 -0
- package/dist/Combobox.js +409 -0
- package/dist/DarkMode.d.ts +59 -0
- package/dist/DarkMode.js +56 -0
- package/dist/DatePicker.d.ts +48 -0
- package/dist/DatePicker.js +2954 -0
- package/dist/Dialog.d.ts +119 -0
- package/dist/Dialog.js +337 -0
- package/dist/Drawer.d.ts +28 -0
- package/dist/Drawer.js +1126 -0
- package/dist/Dropdown.d.ts +23 -0
- package/dist/Dropdown.js +247 -0
- package/dist/EasyForm.d.ts +138 -0
- package/dist/EasyForm.js +286 -0
- package/dist/HoverCard.d.ts +10 -0
- package/dist/HoverCard.js +195 -0
- package/dist/Input.d.ts +230 -0
- package/dist/Input.js +2216 -0
- package/dist/LogViewer.d.ts +57 -0
- package/dist/LogViewer.js +120 -0
- package/dist/Menubar.d.ts +32 -0
- package/dist/Menubar.js +398 -0
- package/dist/Navbar.d.ts +20 -0
- package/dist/Navbar.js +31 -0
- package/dist/Pagination.d.ts +78 -0
- package/dist/Pagination.js +106 -0
- package/dist/Popover.d.ts +11 -0
- package/dist/Popover.js +28 -0
- package/dist/ProgressBar.d.ts +35 -0
- package/dist/ProgressBar.js +210 -0
- package/dist/Resizable.d.ts +23 -0
- package/dist/Resizable.js +1532 -0
- package/dist/Separator.d.ts +4 -0
- package/dist/Separator.js +46 -0
- package/dist/Sheet.d.ts +29 -0
- package/dist/Sheet.js +104 -0
- package/dist/Sidebar.d.ts +117 -0
- package/dist/Sidebar.js +237 -0
- package/dist/Skeleton.d.ts +57 -0
- package/dist/Skeleton.js +47 -0
- package/dist/Table.d.ts +71 -0
- package/dist/Table.js +94 -0
- package/dist/Tabs.d.ts +76 -0
- package/dist/Tabs.js +202 -0
- package/dist/Toast.d.ts +54 -0
- package/dist/Toast.js +827 -0
- package/dist/Tooltip.d.ts +29 -0
- package/dist/Tooltip.js +352 -0
- package/dist/Typography.d.ts +101 -0
- package/dist/Typography.js +123 -0
- package/dist/Widget.d.ts +133 -0
- package/dist/Widget.js +207 -0
- package/dist/_shared/Combination-D_l4PLF_.js +676 -0
- package/dist/_shared/index-B03TCNO5.js +142 -0
- package/dist/_shared/index-B1f-hyuh.js +31 -0
- package/dist/_shared/index-BC7vfx-u.js +13 -0
- package/dist/_shared/index-BrLJJgkl.js +67 -0
- package/dist/_shared/index-C0gNQvxa.js +269 -0
- package/dist/_shared/index-C3aZemLI.js +268 -0
- package/dist/_shared/index-CXeb1OMI.js +198 -0
- package/dist/_shared/index-CukUn3R0.js +626 -0
- package/dist/_shared/index-DLcqcWxM.js +29 -0
- package/dist/_shared/index-DlSuDb9N.js +283 -0
- package/dist/_shared/index-V-Ajw7Ac.js +79 -0
- package/dist/_shared/index-uPOYJZpG.js +34 -0
- package/dist/_shared/index-uu9PT5Nu.js +1588 -0
- package/dist/_shared/utils-eGXXUFl7.js +2935 -0
- package/dist/backgrounds/Aurora.d.ts +7 -0
- package/dist/backgrounds/Aurora.js +126 -0
- package/dist/backgrounds/Iridescence.d.ts +7 -0
- package/dist/backgrounds/Iridescence.js +77 -0
- package/dist/backgrounds/Lightning.d.ts +8 -0
- package/dist/backgrounds/Lightning.js +75 -0
- package/dist/backgrounds/LiquidChrome.d.ts +9 -0
- package/dist/backgrounds/LiquidChrome.js +89 -0
- package/dist/backgrounds/Particles.d.ts +15 -0
- package/dist/backgrounds/Particles.js +137 -0
- package/dist/backgrounds/PixelSnow.d.ts +9 -0
- package/dist/backgrounds/PixelSnow.js +52 -0
- package/dist/backgrounds/Silk.d.ts +8 -0
- package/dist/backgrounds/Silk.js +92 -0
- package/dist/backgrounds/Squares.d.ts +9 -0
- package/dist/backgrounds/Squares.js +75 -0
- package/dist/backgrounds/Threads.d.ts +7 -0
- package/dist/backgrounds/Threads.js +110 -0
- package/dist/backgrounds/Waves.d.ts +14 -0
- package/dist/backgrounds/Waves.js +139 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +318 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PaginationProps extends React.ComponentPropsWithoutRef<"nav"> {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Semantic `<nav>` wrapper for pagination controls.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <Pagination>
|
|
9
|
+
* <PaginationContent>
|
|
10
|
+
* <PaginationItem><PaginationPrevious href="#" /></PaginationItem>
|
|
11
|
+
* <PaginationItem><PaginationLink href="#">1</PaginationLink></PaginationItem>
|
|
12
|
+
* <PaginationItem><PaginationNext href="#" /></PaginationItem>
|
|
13
|
+
* </PaginationContent>
|
|
14
|
+
* </Pagination>
|
|
15
|
+
*/
|
|
16
|
+
declare function Pagination({ className, ...props }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export interface PaginationContentProps extends React.ComponentPropsWithoutRef<"ul"> {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Flex container (`<ul>`) for pagination items.
|
|
21
|
+
*/
|
|
22
|
+
declare const PaginationContent: React.ForwardRefExoticComponent<PaginationContentProps & React.RefAttributes<HTMLUListElement>>;
|
|
23
|
+
export interface PaginationItemProps extends React.ComponentPropsWithoutRef<"li"> {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* List item wrapper for a single pagination element.
|
|
27
|
+
*/
|
|
28
|
+
declare const PaginationItem: React.ForwardRefExoticComponent<PaginationItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
29
|
+
export interface PaginationLinkProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
30
|
+
/** Whether this link represents the current page. @default false */
|
|
31
|
+
isActive?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Button size controlling height and width.
|
|
34
|
+
* @default "md"
|
|
35
|
+
*/
|
|
36
|
+
size?: "sm" | "md" | "lg";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Individual page button. Styled as a ghost button by default, with an
|
|
40
|
+
* active state using `bg-primary/15 text-primary`.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <PaginationLink isActive>1</PaginationLink>
|
|
44
|
+
* <PaginationLink>2</PaginationLink>
|
|
45
|
+
*/
|
|
46
|
+
declare const PaginationLink: React.ForwardRefExoticComponent<PaginationLinkProps & React.RefAttributes<HTMLButtonElement>>;
|
|
47
|
+
export interface PaginationPreviousProps extends Omit<PaginationLinkProps, "children"> {
|
|
48
|
+
/** Label text next to the chevron icon. */
|
|
49
|
+
label?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* "Previous" pagination button with a left chevron icon.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <PaginationPrevious onClick={goPrev} />
|
|
56
|
+
*/
|
|
57
|
+
declare const PaginationPrevious: React.ForwardRefExoticComponent<PaginationPreviousProps & React.RefAttributes<HTMLButtonElement>>;
|
|
58
|
+
export interface PaginationNextProps extends Omit<PaginationLinkProps, "children"> {
|
|
59
|
+
/** Label text next to the chevron icon. */
|
|
60
|
+
label?: React.ReactNode;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* "Next" pagination button with a right chevron icon.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* <PaginationNext onClick={goNext} />
|
|
67
|
+
*/
|
|
68
|
+
declare const PaginationNext: React.ForwardRefExoticComponent<PaginationNextProps & React.RefAttributes<HTMLButtonElement>>;
|
|
69
|
+
export interface PaginationEllipsisProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Ellipsis indicator ("...") for skipped page ranges.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* <PaginationEllipsis />
|
|
76
|
+
*/
|
|
77
|
+
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis, };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { ChevronLeft as m, ChevronRight as d, MoreHorizontal as f } from "lucide-react";
|
|
4
|
+
import { c as r } from "./_shared/utils-eGXXUFl7.js";
|
|
5
|
+
function v({ className: a, ...e }) {
|
|
6
|
+
return /* @__PURE__ */ n(
|
|
7
|
+
"nav",
|
|
8
|
+
{
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
className: r("mx-auto flex w-full justify-center", a),
|
|
12
|
+
...e
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
const g = o.forwardRef(({ className: a, ...e }, i) => /* @__PURE__ */ n(
|
|
17
|
+
"ul",
|
|
18
|
+
{
|
|
19
|
+
ref: i,
|
|
20
|
+
className: r("flex flex-row items-center gap-1 list-none", a),
|
|
21
|
+
...e
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
g.displayName = "PaginationContent";
|
|
25
|
+
const p = o.forwardRef(
|
|
26
|
+
({ className: a, ...e }, i) => /* @__PURE__ */ n("li", { ref: i, className: r("", a), ...e })
|
|
27
|
+
);
|
|
28
|
+
p.displayName = "PaginationItem";
|
|
29
|
+
const u = {
|
|
30
|
+
sm: "h-7 min-w-7 text-xs",
|
|
31
|
+
md: "h-9 min-w-9 text-sm",
|
|
32
|
+
lg: "h-11 min-w-11 text-base"
|
|
33
|
+
}, l = o.forwardRef(
|
|
34
|
+
({ className: a, isActive: e = !1, size: i = "md", ...t }, c) => /* @__PURE__ */ n(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
ref: c,
|
|
38
|
+
type: "button",
|
|
39
|
+
"aria-current": e ? "page" : void 0,
|
|
40
|
+
className: r(
|
|
41
|
+
"inline-flex items-center justify-center rounded-md font-medium transition-colors cursor-pointer select-none",
|
|
42
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
43
|
+
"disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none",
|
|
44
|
+
u[i],
|
|
45
|
+
e ? "bg-primary/15 text-primary border border-primary/20" : "bg-transparent text-muted-foreground border border-transparent hover:bg-secondary/50 hover:text-foreground",
|
|
46
|
+
a
|
|
47
|
+
),
|
|
48
|
+
...t
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
l.displayName = "PaginationLink";
|
|
53
|
+
const x = o.forwardRef(({ className: a, label: e, ...i }, t) => /* @__PURE__ */ s(
|
|
54
|
+
l,
|
|
55
|
+
{
|
|
56
|
+
ref: t,
|
|
57
|
+
"aria-label": "Go to previous page",
|
|
58
|
+
className: r("gap-1 px-2.5", a),
|
|
59
|
+
...i,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ n(m, { className: "size-4" }),
|
|
62
|
+
e && /* @__PURE__ */ n("span", { children: e })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
));
|
|
66
|
+
x.displayName = "PaginationPrevious";
|
|
67
|
+
const b = o.forwardRef(({ className: a, label: e, ...i }, t) => /* @__PURE__ */ s(
|
|
68
|
+
l,
|
|
69
|
+
{
|
|
70
|
+
ref: t,
|
|
71
|
+
"aria-label": "Go to next page",
|
|
72
|
+
className: r("gap-1 px-2.5", a),
|
|
73
|
+
...i,
|
|
74
|
+
children: [
|
|
75
|
+
e && /* @__PURE__ */ n("span", { children: e }),
|
|
76
|
+
/* @__PURE__ */ n(d, { className: "size-4" })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
b.displayName = "PaginationNext";
|
|
81
|
+
function P({ className: a, ...e }) {
|
|
82
|
+
return /* @__PURE__ */ s(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
"aria-hidden": !0,
|
|
86
|
+
className: r(
|
|
87
|
+
"flex h-9 w-9 items-center justify-center text-muted-foreground",
|
|
88
|
+
a
|
|
89
|
+
),
|
|
90
|
+
...e,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ n(f, { className: "size-4" }),
|
|
93
|
+
/* @__PURE__ */ n("span", { className: "sr-only", children: "More pages" })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
v as Pagination,
|
|
100
|
+
g as PaginationContent,
|
|
101
|
+
P as PaginationEllipsis,
|
|
102
|
+
p as PaginationItem,
|
|
103
|
+
l as PaginationLink,
|
|
104
|
+
b as PaginationNext,
|
|
105
|
+
x as PaginationPrevious
|
|
106
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
7
|
+
/** Portal container. @default document.body */
|
|
8
|
+
container?: HTMLElement;
|
|
9
|
+
}
|
|
10
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverClose };
|
package/dist/Popover.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
|
+
import { P as c, C as i, R as p, a as m, T as l } from "./_shared/index-C3aZemLI.js";
|
|
5
|
+
import { c as f } from "./_shared/utils-eGXXUFl7.js";
|
|
6
|
+
const v = p, b = l, R = m, g = d.forwardRef(({ className: e, align: t = "center", sideOffset: a = 4, container: r, ...s }, n) => /* @__PURE__ */ o(c, { container: r, children: /* @__PURE__ */ o(
|
|
7
|
+
i,
|
|
8
|
+
{
|
|
9
|
+
ref: n,
|
|
10
|
+
align: t,
|
|
11
|
+
sideOffset: a,
|
|
12
|
+
className: f(
|
|
13
|
+
"z-50 bg-card border border-border rounded-lg shadow-lg p-4",
|
|
14
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
15
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
16
|
+
"outline-none",
|
|
17
|
+
e
|
|
18
|
+
),
|
|
19
|
+
...s
|
|
20
|
+
}
|
|
21
|
+
) }));
|
|
22
|
+
g.displayName = "PopoverContent";
|
|
23
|
+
export {
|
|
24
|
+
v as Popover,
|
|
25
|
+
R as PopoverClose,
|
|
26
|
+
g as PopoverContent,
|
|
27
|
+
b as PopoverTrigger
|
|
28
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Available color variants for the progress bar fill. */
|
|
3
|
+
export type ProgressBarVariant = 'gold' | 'success' | 'destructive' | 'info';
|
|
4
|
+
/** Available track height sizes for the progress bar. */
|
|
5
|
+
export type ProgressBarSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
export interface ProgressBarProps {
|
|
7
|
+
/** Current progress value (0-100). Clamped automatically. @default 0 */
|
|
8
|
+
value?: number;
|
|
9
|
+
/** Color variant for the filled portion. @default "gold" */
|
|
10
|
+
variant?: ProgressBarVariant;
|
|
11
|
+
/** Track height. @default "md" */
|
|
12
|
+
size?: ProgressBarSize;
|
|
13
|
+
/**
|
|
14
|
+
* Shows a full-width bar with a shimmer animation.
|
|
15
|
+
* Useful when the progress value is unknown.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
indeterminate?: boolean;
|
|
19
|
+
/** Optional label displayed above the bar with a percentage indicator. */
|
|
20
|
+
label?: React.ReactNode;
|
|
21
|
+
/** Additional CSS classes. */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Animated progress bar built on Radix UI Progress with color variants
|
|
26
|
+
* and an optional label showing the current percentage.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <ProgressBar value={75} variant="success" size="md" label="Upload progress" />
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <ProgressBar indeterminate variant="gold" label="Chargement..." />
|
|
33
|
+
*/
|
|
34
|
+
declare function ProgressBar({ value, variant, size, indeterminate, label, className }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { ProgressBar };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { jsx as l, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
import { c as R } from "./_shared/index-BrLJJgkl.js";
|
|
5
|
+
import { c as h } from "./_shared/utils-eGXXUFl7.js";
|
|
6
|
+
function V(e, r = []) {
|
|
7
|
+
let i = [];
|
|
8
|
+
function o(u, s) {
|
|
9
|
+
const n = c.createContext(s);
|
|
10
|
+
n.displayName = u + "Context";
|
|
11
|
+
const a = i.length;
|
|
12
|
+
i = [...i, s];
|
|
13
|
+
const d = (m) => {
|
|
14
|
+
const { scope: g, children: x, ...p } = m, I = g?.[e]?.[a] || n, E = c.useMemo(() => p, Object.values(p));
|
|
15
|
+
return /* @__PURE__ */ l(I.Provider, { value: E, children: x });
|
|
16
|
+
};
|
|
17
|
+
d.displayName = u + "Provider";
|
|
18
|
+
function N(m, g) {
|
|
19
|
+
const x = g?.[e]?.[a] || n, p = c.useContext(x);
|
|
20
|
+
if (p) return p;
|
|
21
|
+
if (s !== void 0) return s;
|
|
22
|
+
throw new Error(`\`${m}\` must be used within \`${u}\``);
|
|
23
|
+
}
|
|
24
|
+
return [d, N];
|
|
25
|
+
}
|
|
26
|
+
const t = () => {
|
|
27
|
+
const u = i.map((s) => c.createContext(s));
|
|
28
|
+
return function(n) {
|
|
29
|
+
const a = n?.[e] || u;
|
|
30
|
+
return c.useMemo(
|
|
31
|
+
() => ({ [`__scope${e}`]: { ...n, [e]: a } }),
|
|
32
|
+
[n, a]
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
return t.scopeName = e, [o, A(t, ...r)];
|
|
37
|
+
}
|
|
38
|
+
function A(...e) {
|
|
39
|
+
const r = e[0];
|
|
40
|
+
if (e.length === 1) return r;
|
|
41
|
+
const i = () => {
|
|
42
|
+
const o = e.map((t) => ({
|
|
43
|
+
useScope: t(),
|
|
44
|
+
scopeName: t.scopeName
|
|
45
|
+
}));
|
|
46
|
+
return function(u) {
|
|
47
|
+
const s = o.reduce((n, { useScope: a, scopeName: d }) => {
|
|
48
|
+
const m = a(u)[`__scope${d}`];
|
|
49
|
+
return { ...n, ...m };
|
|
50
|
+
}, {});
|
|
51
|
+
return c.useMemo(() => ({ [`__scope${r.scopeName}`]: s }), [s]);
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
return i.scopeName = r.scopeName, i;
|
|
55
|
+
}
|
|
56
|
+
var D = [
|
|
57
|
+
"a",
|
|
58
|
+
"button",
|
|
59
|
+
"div",
|
|
60
|
+
"form",
|
|
61
|
+
"h2",
|
|
62
|
+
"h3",
|
|
63
|
+
"img",
|
|
64
|
+
"input",
|
|
65
|
+
"label",
|
|
66
|
+
"li",
|
|
67
|
+
"nav",
|
|
68
|
+
"ol",
|
|
69
|
+
"p",
|
|
70
|
+
"select",
|
|
71
|
+
"span",
|
|
72
|
+
"svg",
|
|
73
|
+
"ul"
|
|
74
|
+
], $ = D.reduce((e, r) => {
|
|
75
|
+
const i = R(`Primitive.${r}`), o = c.forwardRef((t, u) => {
|
|
76
|
+
const { asChild: s, ...n } = t, a = s ? i : r;
|
|
77
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(a, { ...n, ref: u });
|
|
78
|
+
});
|
|
79
|
+
return o.displayName = `Primitive.${r}`, { ...e, [r]: o };
|
|
80
|
+
}, {}), P = "Progress", b = 100, [O] = V(P), [j, L] = O(P), y = c.forwardRef(
|
|
81
|
+
(e, r) => {
|
|
82
|
+
const {
|
|
83
|
+
__scopeProgress: i,
|
|
84
|
+
value: o = null,
|
|
85
|
+
max: t,
|
|
86
|
+
getValueLabel: u = k,
|
|
87
|
+
...s
|
|
88
|
+
} = e;
|
|
89
|
+
(t || t === 0) && !w(t) && console.error(T(`${t}`, "Progress"));
|
|
90
|
+
const n = w(t) ? t : b;
|
|
91
|
+
o !== null && !S(o, n) && console.error(B(`${o}`, "Progress"));
|
|
92
|
+
const a = S(o, n) ? o : null, d = v(a) ? u(a, n) : void 0;
|
|
93
|
+
return /* @__PURE__ */ l(j, { scope: i, value: a, max: n, children: /* @__PURE__ */ l(
|
|
94
|
+
$.div,
|
|
95
|
+
{
|
|
96
|
+
"aria-valuemax": n,
|
|
97
|
+
"aria-valuemin": 0,
|
|
98
|
+
"aria-valuenow": v(a) ? a : void 0,
|
|
99
|
+
"aria-valuetext": d,
|
|
100
|
+
role: "progressbar",
|
|
101
|
+
"data-state": M(a, n),
|
|
102
|
+
"data-value": a ?? void 0,
|
|
103
|
+
"data-max": n,
|
|
104
|
+
...s,
|
|
105
|
+
ref: r
|
|
106
|
+
}
|
|
107
|
+
) });
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
y.displayName = P;
|
|
111
|
+
var C = "ProgressIndicator", _ = c.forwardRef(
|
|
112
|
+
(e, r) => {
|
|
113
|
+
const { __scopeProgress: i, ...o } = e, t = L(C, i);
|
|
114
|
+
return /* @__PURE__ */ l(
|
|
115
|
+
$.div,
|
|
116
|
+
{
|
|
117
|
+
"data-state": M(t.value, t.max),
|
|
118
|
+
"data-value": t.value ?? void 0,
|
|
119
|
+
"data-max": t.max,
|
|
120
|
+
...o,
|
|
121
|
+
ref: r
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
_.displayName = C;
|
|
127
|
+
function k(e, r) {
|
|
128
|
+
return `${Math.round(e / r * 100)}%`;
|
|
129
|
+
}
|
|
130
|
+
function M(e, r) {
|
|
131
|
+
return e == null ? "indeterminate" : e === r ? "complete" : "loading";
|
|
132
|
+
}
|
|
133
|
+
function v(e) {
|
|
134
|
+
return typeof e == "number";
|
|
135
|
+
}
|
|
136
|
+
function w(e) {
|
|
137
|
+
return v(e) && !isNaN(e) && e > 0;
|
|
138
|
+
}
|
|
139
|
+
function S(e, r) {
|
|
140
|
+
return v(e) && !isNaN(e) && e <= r && e >= 0;
|
|
141
|
+
}
|
|
142
|
+
function T(e, r) {
|
|
143
|
+
return `Invalid prop \`max\` of value \`${e}\` supplied to \`${r}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${b}\`.`;
|
|
144
|
+
}
|
|
145
|
+
function B(e, r) {
|
|
146
|
+
return `Invalid prop \`value\` of value \`${e}\` supplied to \`${r}\`. The \`value\` prop must be:
|
|
147
|
+
- a positive number
|
|
148
|
+
- less than the value passed to \`max\` (or ${b} if no \`max\` prop is set)
|
|
149
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
150
|
+
|
|
151
|
+
Defaulting to \`null\`.`;
|
|
152
|
+
}
|
|
153
|
+
var G = y, z = _;
|
|
154
|
+
const F = {
|
|
155
|
+
gold: "bg-primary",
|
|
156
|
+
success: "bg-success",
|
|
157
|
+
destructive: "bg-destructive",
|
|
158
|
+
info: "bg-info"
|
|
159
|
+
}, H = {
|
|
160
|
+
sm: "h-1",
|
|
161
|
+
md: "h-1.5",
|
|
162
|
+
lg: "h-2"
|
|
163
|
+
};
|
|
164
|
+
function K({ value: e = 0, variant: r = "gold", size: i = "md", indeterminate: o = !1, label: t, className: u }) {
|
|
165
|
+
const s = Math.min(100, Math.max(0, e));
|
|
166
|
+
return /* @__PURE__ */ f("div", { className: h("w-full", u), children: [
|
|
167
|
+
t && /* @__PURE__ */ f("div", { className: "flex items-center justify-between mb-2", children: [
|
|
168
|
+
/* @__PURE__ */ l("span", { className: "text-sm text-muted-foreground", children: t }),
|
|
169
|
+
!o && /* @__PURE__ */ f("span", { className: "text-xs font-mono text-muted-foreground", children: [
|
|
170
|
+
s,
|
|
171
|
+
"%"
|
|
172
|
+
] })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ f(
|
|
175
|
+
G,
|
|
176
|
+
{
|
|
177
|
+
value: o ? 100 : s,
|
|
178
|
+
className: h(
|
|
179
|
+
"relative w-full overflow-hidden rounded-full bg-secondary",
|
|
180
|
+
H[i]
|
|
181
|
+
),
|
|
182
|
+
children: [
|
|
183
|
+
/* @__PURE__ */ l(
|
|
184
|
+
z,
|
|
185
|
+
{
|
|
186
|
+
className: h(
|
|
187
|
+
"h-full rounded-full transition-[width] duration-500 ease-out",
|
|
188
|
+
F[r]
|
|
189
|
+
),
|
|
190
|
+
style: { width: o ? "100%" : `${s}%` }
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
o && /* @__PURE__ */ l(
|
|
194
|
+
"div",
|
|
195
|
+
{
|
|
196
|
+
className: "absolute inset-0 rounded-full",
|
|
197
|
+
style: {
|
|
198
|
+
background: "linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%)",
|
|
199
|
+
animation: "shimmer 1.5s ease-in-out infinite"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] });
|
|
207
|
+
}
|
|
208
|
+
export {
|
|
209
|
+
K as ProgressBar
|
|
210
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLImageElement | HTMLSpanElement | HTMLButtonElement | HTMLFormElement | HTMLTextAreaElement | HTMLPreElement | HTMLInputElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLTitleElement | HTMLAudioElement | HTMLSourceElement | HTMLLinkElement | HTMLMapElement | HTMLDialogElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLLabelElement | HTMLMeterElement | HTMLProgressElement | HTMLEmbedElement | HTMLHtmlElement | HTMLAnchorElement | HTMLAreaElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLIFrameElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLScriptElement | HTMLSelectElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
collapsedSize?: number | undefined;
|
|
6
|
+
collapsible?: boolean | undefined;
|
|
7
|
+
defaultSize?: number | undefined;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
maxSize?: number | undefined;
|
|
10
|
+
minSize?: number | undefined;
|
|
11
|
+
onCollapse?: ResizablePrimitive.PanelOnCollapse | undefined;
|
|
12
|
+
onExpand?: ResizablePrimitive.PanelOnExpand | undefined;
|
|
13
|
+
onResize?: ResizablePrimitive.PanelOnResize | undefined;
|
|
14
|
+
order?: number | undefined;
|
|
15
|
+
style?: object | undefined;
|
|
16
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
children?: import("react").ReactNode;
|
|
19
|
+
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
20
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
21
|
+
withHandle?: boolean;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|