@axtec/components 0.1.5 → 0.1.6
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 +6 -0
- package/dist/components/OptionDivider/OptionDivider.d.ts +5 -0
- package/dist/components/OptionDivider/index.d.ts +1 -0
- package/dist/components/SelectionCard/SelectionCard.d.ts +12 -0
- package/dist/components/SelectionCard/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +106 -102
- package/dist/index.js.map +1 -1
- package/dist/index12.js +1 -1
- package/dist/index3.js +2 -2
- package/dist/index43.js +12 -14
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +11 -87
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +91 -69
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +68 -121
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +118 -36
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +40 -44
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +44 -56
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +56 -16
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +16 -65
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +62 -51
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +54 -37
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +37 -66
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +63 -19
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +19 -101
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +99 -213
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +58 -62
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +206 -224
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +62 -96
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +233 -33
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +98 -14
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +35 -59
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +16 -59
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +57 -72
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +58 -106
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +70 -43
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +101 -40
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +44 -72
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +47 -53
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +70 -62
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +46 -28
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +67 -13
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +35 -2263
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +17 -0
- package/dist/index75.js.map +1 -0
- package/dist/index76.js +2267 -0
- package/dist/index76.js.map +1 -0
- package/package.json +1 -1
package/dist/index58.js
CHANGED
|
@@ -1,71 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "./index3.js";
|
|
3
|
+
import { CheckIcon as c } from "@heroicons/react/20/solid";
|
|
4
|
+
const d = {
|
|
5
|
+
sm: "p-3",
|
|
6
|
+
md: "p-5",
|
|
7
|
+
lg: "p-6"
|
|
8
|
+
}, b = {
|
|
9
|
+
sm: "h-6 w-6",
|
|
10
|
+
md: "h-8 w-8",
|
|
11
|
+
lg: "h-10 w-10"
|
|
12
|
+
};
|
|
13
|
+
function f({
|
|
14
|
+
icon: a,
|
|
15
|
+
label: m,
|
|
16
|
+
description: s,
|
|
17
|
+
selected: r = !1,
|
|
18
|
+
onClick: n,
|
|
19
|
+
variant: l = "default",
|
|
20
|
+
size: i = "md",
|
|
21
|
+
className: p
|
|
8
22
|
}) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
height: typeof l == "number" ? `${l}px` : l
|
|
12
|
-
};
|
|
13
|
-
return /* @__PURE__ */ t(
|
|
14
|
-
"div",
|
|
23
|
+
return /* @__PURE__ */ o(
|
|
24
|
+
"button",
|
|
15
25
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
!l && e === "rectangular" && "h-20",
|
|
26
|
-
n
|
|
26
|
+
type: "button",
|
|
27
|
+
role: "radio",
|
|
28
|
+
"aria-checked": r,
|
|
29
|
+
onClick: n,
|
|
30
|
+
className: t(
|
|
31
|
+
"relative rounded-xl border-2 cursor-pointer transition-all text-center w-full",
|
|
32
|
+
d[i],
|
|
33
|
+
r ? "bg-primary-50 border-primary-300 ring-1 ring-primary-200" : l === "branded" ? "bg-primary-50/50 border-primary-200 hover:border-primary-300 hover:bg-primary-50" : "bg-slate-50 border-slate-200 hover:border-slate-300 hover:bg-slate-100",
|
|
34
|
+
p
|
|
27
35
|
),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
children: [
|
|
37
|
+
r && /* @__PURE__ */ e("span", { className: "absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary-500 text-white", children: /* @__PURE__ */ e(c, { className: "h-3.5 w-3.5" }) }),
|
|
38
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2", children: [
|
|
39
|
+
a && /* @__PURE__ */ e(
|
|
40
|
+
a,
|
|
41
|
+
{
|
|
42
|
+
className: t(
|
|
43
|
+
b[i],
|
|
44
|
+
r ? "text-primary-600" : l === "branded" ? "text-primary-400" : "text-slate-400"
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
className: t(
|
|
52
|
+
"font-semibold text-sm",
|
|
53
|
+
r ? "text-primary-600" : "text-slate-800"
|
|
54
|
+
),
|
|
55
|
+
children: m
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
s && /* @__PURE__ */ e("span", { className: "text-xs text-slate-500", children: s })
|
|
59
|
+
] })
|
|
60
|
+
]
|
|
50
61
|
}
|
|
51
62
|
);
|
|
52
63
|
}
|
|
53
|
-
function f({ className: e }) {
|
|
54
|
-
return /* @__PURE__ */ a("div", { className: u("p-4 border border-slate-200 rounded-xl", e), children: [
|
|
55
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
56
|
-
/* @__PURE__ */ t(s, {}),
|
|
57
|
-
/* @__PURE__ */ a("div", { className: "flex-1 space-y-2", children: [
|
|
58
|
-
/* @__PURE__ */ t(c, { variant: "text", width: "40%" }),
|
|
59
|
-
/* @__PURE__ */ t(c, { variant: "text", width: "20%" })
|
|
60
|
-
] })
|
|
61
|
-
] }),
|
|
62
|
-
/* @__PURE__ */ t(d, { lines: 3 })
|
|
63
|
-
] });
|
|
64
|
-
}
|
|
65
64
|
export {
|
|
66
|
-
|
|
67
|
-
s as SkeletonAvatar,
|
|
68
|
-
f as SkeletonCard,
|
|
69
|
-
d as SkeletonText
|
|
65
|
+
f as SelectionCard
|
|
70
66
|
};
|
|
71
67
|
//# sourceMappingURL=index58.js.map
|
package/dist/index58.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index58.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index58.js","sources":["../src/components/SelectionCard/SelectionCard.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport { CheckIcon } from '@heroicons/react/20/solid'\nimport type { ComponentType, SVGProps } from 'react'\n\nexport interface SelectionCardProps {\n icon?: ComponentType<SVGProps<SVGSVGElement>>\n label: string\n description?: string\n selected?: boolean\n onClick?: () => void\n variant?: 'default' | 'branded'\n size?: 'sm' | 'md' | 'lg'\n className?: string\n}\n\nconst sizeStyles = {\n sm: 'p-3',\n md: 'p-5',\n lg: 'p-6',\n}\n\nconst iconSizeStyles = {\n sm: 'h-6 w-6',\n md: 'h-8 w-8',\n lg: 'h-10 w-10',\n}\n\nexport function SelectionCard({\n icon: Icon,\n label,\n description,\n selected = false,\n onClick,\n variant = 'default',\n size = 'md',\n className,\n}: SelectionCardProps) {\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={selected}\n onClick={onClick}\n className={cn(\n 'relative rounded-xl border-2 cursor-pointer transition-all text-center w-full',\n sizeStyles[size],\n selected\n ? 'bg-primary-50 border-primary-300 ring-1 ring-primary-200'\n : variant === 'branded'\n ? 'bg-primary-50/50 border-primary-200 hover:border-primary-300 hover:bg-primary-50'\n : 'bg-slate-50 border-slate-200 hover:border-slate-300 hover:bg-slate-100',\n className\n )}\n >\n {selected && (\n <span className=\"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary-500 text-white\">\n <CheckIcon className=\"h-3.5 w-3.5\" />\n </span>\n )}\n\n <div className=\"flex flex-col items-center gap-2\">\n {Icon && (\n <Icon\n className={cn(\n iconSizeStyles[size],\n selected ? 'text-primary-600' : variant === 'branded' ? 'text-primary-400' : 'text-slate-400'\n )}\n />\n )}\n <span\n className={cn(\n 'font-semibold text-sm',\n selected ? 'text-primary-600' : 'text-slate-800'\n )}\n >\n {label}\n </span>\n {description && (\n <span className=\"text-xs text-slate-500\">{description}</span>\n )}\n </div>\n </button>\n )\n}\n"],"names":["sizeStyles","iconSizeStyles","SelectionCard","Icon","label","description","selected","onClick","variant","size","className","jsxs","cn","jsx","CheckIcon"],"mappings":";;;AAeA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAiB;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAASC,EAAc;AAAA,EAC5B,MAAMC;AAAA,EACN,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAuB;AACrB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,MAAK;AAAA,MACL,gBAAcL;AAAA,MACd,SAAAC;AAAA,MACA,WAAWK;AAAA,QACT;AAAA,QACAZ,EAAWS,CAAI;AAAA,QACfH,IACI,6DACAE,MAAY,YACV,qFACA;AAAA,QACNE;AAAA,MAAA;AAAA,MAGD,UAAA;AAAA,QAAAJ,KACC,gBAAAO,EAAC,UAAK,WAAU,0GACd,4BAACC,GAAA,EAAU,WAAU,eAAc,EAAA,CACrC;AAAA,QAGF,gBAAAH,EAAC,OAAA,EAAI,WAAU,oCACZ,UAAA;AAAA,UAAAR,KACC,gBAAAU;AAAA,YAACV;AAAA,YAAA;AAAA,cACC,WAAWS;AAAA,gBACTX,EAAeQ,CAAI;AAAA,gBACnBH,IAAW,qBAAqBE,MAAY,YAAY,qBAAqB;AAAA,cAAA;AAAA,YAC/E;AAAA,UAAA;AAAA,UAGJ,gBAAAK;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWD;AAAA,gBACT;AAAA,gBACAN,IAAW,qBAAqB;AAAA,cAAA;AAAA,cAGjC,UAAAF;AAAA,YAAA;AAAA,UAAA;AAAA,UAEFC,KACC,gBAAAQ,EAAC,QAAA,EAAK,WAAU,0BAA0B,UAAAR,EAAA,CAAY;AAAA,QAAA,EAAA,CAE1D;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/index59.js
CHANGED
|
@@ -1,239 +1,221 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
valueFormatter: h = Q,
|
|
17
|
-
title: o,
|
|
18
|
-
subtitle: x,
|
|
19
|
-
headerColor: n,
|
|
20
|
-
interactive: m = !1,
|
|
21
|
-
onHover: p,
|
|
22
|
-
minimal: t = !1,
|
|
23
|
-
emptyMessage: V = "No data available",
|
|
24
|
-
className: S
|
|
1
|
+
import { jsx as e, jsxs as m, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useContext as v, createContext as w } from "react";
|
|
3
|
+
import { cn as l } from "./index3.js";
|
|
4
|
+
import { ChevronRightIcon as N, ChevronLeftIcon as y } from "@heroicons/react/24/outline";
|
|
5
|
+
const g = w(null), p = () => {
|
|
6
|
+
const t = v(g);
|
|
7
|
+
if (!t) throw new Error("useSidebar must be used within a <Sidebar>");
|
|
8
|
+
return t;
|
|
9
|
+
}, O = ({
|
|
10
|
+
children: t,
|
|
11
|
+
defaultOpen: r = !0,
|
|
12
|
+
open: a,
|
|
13
|
+
onOpenChange: s,
|
|
14
|
+
inline: i = !1,
|
|
15
|
+
className: c
|
|
25
16
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tickLine: { stroke: "#e2e8f0" }
|
|
38
|
-
}, k = {
|
|
39
|
-
hide: !0
|
|
40
|
-
};
|
|
41
|
-
if (!a || a.length === 0)
|
|
42
|
-
return /* @__PURE__ */ s("div", { className: i("w-full", S), children: [
|
|
43
|
-
(o || n) && /* @__PURE__ */ s(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: i(
|
|
47
|
-
"px-5 py-4 rounded-t-2xl",
|
|
48
|
-
n ? "text-white" : "bg-slate-100"
|
|
49
|
-
),
|
|
50
|
-
style: n ? { backgroundColor: n } : void 0,
|
|
51
|
-
children: [
|
|
52
|
-
o && /* @__PURE__ */ e("h3", { className: "text-lg font-bold", children: o }),
|
|
53
|
-
x && /* @__PURE__ */ e("p", { className: i("text-xs", n ? "opacity-80" : "text-slate-500"), children: x })
|
|
54
|
-
]
|
|
55
|
-
}
|
|
17
|
+
const [o, d] = b(r), n = a !== void 0 ? a : o, x = (h) => {
|
|
18
|
+
s ? s(h) : d(h);
|
|
19
|
+
}, u = () => x(!n);
|
|
20
|
+
return /* @__PURE__ */ e(g.Provider, { value: { isOpen: n, setIsOpen: x, toggle: u }, children: /* @__PURE__ */ e(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: l(
|
|
24
|
+
"flex flex-col justify-between bg-slate-50 border-r border-slate-200 transition-all duration-300 ease-in-out",
|
|
25
|
+
i ? "relative h-full" : "hidden md:flex fixed top-0 left-0 z-10 h-screen",
|
|
26
|
+
n ? "w-64" : "w-16",
|
|
27
|
+
c
|
|
56
28
|
),
|
|
57
|
-
/* @__PURE__ */ e(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
29
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-col h-full", children: t })
|
|
30
|
+
}
|
|
31
|
+
) });
|
|
32
|
+
}, E = ({
|
|
33
|
+
children: t,
|
|
34
|
+
showToggle: r = !0,
|
|
35
|
+
className: a
|
|
36
|
+
}) => {
|
|
37
|
+
const { isOpen: s, toggle: i } = p();
|
|
38
|
+
return /* @__PURE__ */ m(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: l(
|
|
42
|
+
"flex items-center border-b border-slate-200 h-16",
|
|
43
|
+
s ? "px-4 justify-between" : "px-2 justify-center",
|
|
44
|
+
a
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
s && t,
|
|
48
|
+
r && /* @__PURE__ */ e(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
onClick: i,
|
|
52
|
+
className: "p-2 rounded-lg hover:bg-slate-200 transition-colors cursor-pointer flex-shrink-0",
|
|
53
|
+
"aria-label": s ? "Collapse sidebar" : "Expand sidebar",
|
|
54
|
+
children: s ? /* @__PURE__ */ e(y, { className: "h-5 w-5 text-slate-500" }) : /* @__PURE__ */ e(N, { className: "h-5 w-5 text-slate-500" })
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}, F = ({ children: t, className: r }) => /* @__PURE__ */ e("nav", { className: l("flex-1 py-4", r), children: /* @__PURE__ */ e("ul", { className: "flex flex-col space-y-1 px-2", children: t }) }), z = ({ label: t, children: r, className: a }) => {
|
|
61
|
+
const { isOpen: s } = p();
|
|
62
|
+
return /* @__PURE__ */ m("div", { className: l("mt-4 first:mt-0", a), children: [
|
|
63
|
+
t && s && /* @__PURE__ */ e("div", { className: "px-3 mb-2 text-xs font-semibold uppercase tracking-wider text-slate-400", children: t }),
|
|
64
|
+
!t && s && /* @__PURE__ */ e("div", { className: "border-t border-slate-200 mx-3 mb-2" }),
|
|
65
|
+
/* @__PURE__ */ e("ul", { className: "flex flex-col space-y-1", children: r })
|
|
66
|
+
] });
|
|
67
|
+
}, B = ({
|
|
68
|
+
label: t,
|
|
69
|
+
icon: r,
|
|
70
|
+
active: a = !1,
|
|
71
|
+
href: s,
|
|
72
|
+
onClick: i,
|
|
73
|
+
as: c,
|
|
74
|
+
badge: o,
|
|
75
|
+
className: d
|
|
76
|
+
}) => {
|
|
77
|
+
const { isOpen: n } = p(), x = l(
|
|
78
|
+
"flex items-center rounded-lg transition-all duration-200 cursor-pointer group w-full",
|
|
79
|
+
n ? "px-3 py-2.5" : "px-2 py-2.5 justify-center",
|
|
80
|
+
a ? "bg-accent-tint text-accent-tint-dark" : "text-slate-600 hover:bg-slate-200 hover:text-slate-900",
|
|
81
|
+
d
|
|
82
|
+
), u = /* @__PURE__ */ m(f, { children: [
|
|
83
|
+
r && /* @__PURE__ */ e(
|
|
84
|
+
r,
|
|
73
85
|
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
className: l(
|
|
87
|
+
"h-5 w-5 flex-shrink-0 transition-colors",
|
|
88
|
+
a ? "text-primary-500" : "text-slate-500 group-hover:text-slate-700"
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
n && /* @__PURE__ */ e(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
className: l(
|
|
96
|
+
"ml-3 text-sm font-medium truncate",
|
|
97
|
+
a ? "text-accent-tint-dark" : ""
|
|
98
|
+
),
|
|
99
|
+
children: t
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
n && o !== void 0 && /* @__PURE__ */ e("span", { className: "ml-auto text-xs font-semibold bg-accent-tint text-accent-tint-dark rounded-full px-2 py-0.5", children: o })
|
|
103
|
+
] });
|
|
104
|
+
return s && c ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(c, { href: s, className: x, title: n ? void 0 : t, children: u }) }) : s ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("a", { href: s, className: x, title: n ? void 0 : t, onClick: i, children: u }) }) : /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
105
|
+
"button",
|
|
106
|
+
{
|
|
107
|
+
onClick: i,
|
|
108
|
+
className: x,
|
|
109
|
+
title: n ? void 0 : t,
|
|
110
|
+
children: u
|
|
111
|
+
}
|
|
112
|
+
) });
|
|
113
|
+
}, G = ({
|
|
114
|
+
label: t,
|
|
115
|
+
icon: r,
|
|
116
|
+
active: a = !1,
|
|
117
|
+
defaultOpen: s = !1,
|
|
118
|
+
children: i,
|
|
119
|
+
className: c
|
|
120
|
+
}) => {
|
|
121
|
+
const { isOpen: o } = p(), [d, n] = b(s);
|
|
122
|
+
return /* @__PURE__ */ m("li", { className: c, children: [
|
|
123
|
+
/* @__PURE__ */ m(
|
|
124
|
+
"button",
|
|
125
|
+
{
|
|
126
|
+
onClick: () => n(!d),
|
|
127
|
+
className: l(
|
|
128
|
+
"flex items-center rounded-lg transition-all duration-200 cursor-pointer group w-full",
|
|
129
|
+
o ? "px-3 py-2.5" : "px-2 py-2.5 justify-center",
|
|
130
|
+
a ? "text-accent-tint-dark" : "text-slate-600 hover:bg-slate-200 hover:text-slate-900"
|
|
131
|
+
),
|
|
132
|
+
title: o ? void 0 : t,
|
|
78
133
|
children: [
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
y,
|
|
134
|
+
r && /* @__PURE__ */ e(
|
|
135
|
+
r,
|
|
82
136
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
interval: 0
|
|
137
|
+
className: l(
|
|
138
|
+
"h-5 w-5 flex-shrink-0 transition-colors",
|
|
139
|
+
a ? "text-primary-500" : "text-slate-500 group-hover:text-slate-700"
|
|
140
|
+
)
|
|
88
141
|
}
|
|
89
142
|
),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
border: "1px solid #e2e8f0",
|
|
100
|
-
borderRadius: "8px",
|
|
101
|
-
fontSize: "12px"
|
|
143
|
+
o && /* @__PURE__ */ m(f, { children: [
|
|
144
|
+
/* @__PURE__ */ e("span", { className: "ml-3 text-sm font-medium truncate", children: t }),
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
N,
|
|
147
|
+
{
|
|
148
|
+
className: l(
|
|
149
|
+
"ml-auto h-4 w-4 text-slate-400 transition-transform duration-200",
|
|
150
|
+
d && "rotate-90"
|
|
151
|
+
)
|
|
102
152
|
}
|
|
103
|
-
|
|
104
|
-
)
|
|
105
|
-
W && /* @__PURE__ */ e(L, {}),
|
|
106
|
-
/* @__PURE__ */ e(F, { dataKey: "value", radius: [4, 4, 0, 0], children: l.map((d, c) => /* @__PURE__ */ e(
|
|
107
|
-
P,
|
|
108
|
-
{
|
|
109
|
-
fill: m && $ === c ? j : v
|
|
110
|
-
},
|
|
111
|
-
`cell-${c}`
|
|
112
|
-
)) })
|
|
153
|
+
)
|
|
154
|
+
] })
|
|
113
155
|
]
|
|
114
156
|
}
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
type: "monotone",
|
|
158
|
-
dataKey: "secondary",
|
|
159
|
-
stroke: f,
|
|
160
|
-
strokeWidth: 2,
|
|
161
|
-
dot: { fill: f, strokeWidth: 2, r: 4 },
|
|
162
|
-
activeDot: { r: 6, stroke: f, strokeWidth: 2, fill: "#fff" }
|
|
163
|
-
}
|
|
164
|
-
)
|
|
165
|
-
] }) : /* @__PURE__ */ s(O, { data: l, margin: r, children: [
|
|
166
|
-
K && !t && /* @__PURE__ */ e(w, { strokeDasharray: "3 3", stroke: "#f1f5f9" }),
|
|
167
|
-
N && !t && /* @__PURE__ */ e(
|
|
168
|
-
y,
|
|
169
|
-
{
|
|
170
|
-
dataKey: "name",
|
|
171
|
-
...u,
|
|
172
|
-
angle: -45,
|
|
173
|
-
textAnchor: "end",
|
|
174
|
-
interval: 0
|
|
175
|
-
}
|
|
176
|
-
),
|
|
177
|
-
t && /* @__PURE__ */ e(y, { ...k }),
|
|
178
|
-
D && !t && /* @__PURE__ */ e(b, { ...u, tickFormatter: h }),
|
|
179
|
-
t && /* @__PURE__ */ e(b, { ...k }),
|
|
180
|
-
!t && /* @__PURE__ */ e(
|
|
181
|
-
T,
|
|
182
|
-
{
|
|
183
|
-
formatter: (d, c) => [
|
|
184
|
-
h(Number(d)),
|
|
185
|
-
c === "value" ? "Primary" : "Secondary"
|
|
186
|
-
],
|
|
187
|
-
contentStyle: {
|
|
188
|
-
backgroundColor: "white",
|
|
189
|
-
border: "1px solid #e2e8f0",
|
|
190
|
-
borderRadius: "8px",
|
|
191
|
-
fontSize: "12px"
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
),
|
|
195
|
-
W && /* @__PURE__ */ e(L, {}),
|
|
196
|
-
/* @__PURE__ */ e(F, { dataKey: "value", radius: [4, 4, 0, 0], children: l.map((d, c) => /* @__PURE__ */ e(
|
|
197
|
-
P,
|
|
198
|
-
{
|
|
199
|
-
fill: m && $ === c ? j : v
|
|
200
|
-
},
|
|
201
|
-
`cell-${c}`
|
|
202
|
-
)) }),
|
|
203
|
-
l.some((d) => d.secondary !== void 0) && /* @__PURE__ */ e(
|
|
204
|
-
z,
|
|
205
|
-
{
|
|
206
|
-
type: "monotone",
|
|
207
|
-
dataKey: "secondary",
|
|
208
|
-
stroke: f,
|
|
209
|
-
strokeWidth: 2,
|
|
210
|
-
dot: { fill: f, strokeWidth: 2, r: 4 },
|
|
211
|
-
activeDot: { r: 6, stroke: f, strokeWidth: 2, fill: "#fff" }
|
|
212
|
-
}
|
|
213
|
-
)
|
|
214
|
-
] });
|
|
215
|
-
};
|
|
216
|
-
return n ? /* @__PURE__ */ s(
|
|
217
|
-
"div",
|
|
218
|
-
{
|
|
219
|
-
className: i("rounded-2xl overflow-hidden border border-slate-200 shadow-sm", S),
|
|
220
|
-
children: [
|
|
221
|
-
/* @__PURE__ */ s("div", { className: "px-5 py-4", style: { backgroundColor: n }, children: [
|
|
222
|
-
o && /* @__PURE__ */ e("h3", { className: "text-lg font-bold text-white", children: o }),
|
|
223
|
-
x && /* @__PURE__ */ e("p", { className: "text-xs text-white/80", children: x })
|
|
224
|
-
] }),
|
|
225
|
-
/* @__PURE__ */ e("div", { className: "bg-white p-5", children: /* @__PURE__ */ e("div", { style: { height: g }, children: /* @__PURE__ */ e(M, { width: "100%", height: "100%", children: I() }) }) })
|
|
226
|
-
]
|
|
227
|
-
}
|
|
228
|
-
) : o ? /* @__PURE__ */ s("div", { className: i("w-full", S), children: [
|
|
229
|
-
/* @__PURE__ */ s("div", { className: "mb-4", children: [
|
|
230
|
-
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-slate-900", children: o }),
|
|
231
|
-
x && /* @__PURE__ */ e("p", { className: "text-sm text-slate-500", children: x })
|
|
157
|
+
),
|
|
158
|
+
o && d && /* @__PURE__ */ e("ul", { className: "mt-1 ml-4 pl-3 border-l border-slate-200 space-y-1", children: i })
|
|
159
|
+
] });
|
|
160
|
+
}, H = ({ children: t, className: r }) => /* @__PURE__ */ e("div", { className: l("p-3", r), children: t }), P = ({
|
|
161
|
+
icon: t,
|
|
162
|
+
title: r,
|
|
163
|
+
description: a,
|
|
164
|
+
buttonLabel: s,
|
|
165
|
+
onAction: i,
|
|
166
|
+
children: c,
|
|
167
|
+
className: o
|
|
168
|
+
}) => {
|
|
169
|
+
const { isOpen: d } = p();
|
|
170
|
+
if (!d)
|
|
171
|
+
return i ? /* @__PURE__ */ e(
|
|
172
|
+
"button",
|
|
173
|
+
{
|
|
174
|
+
onClick: i,
|
|
175
|
+
className: l(
|
|
176
|
+
"w-full p-2 rounded-lg bg-primary-500 text-white hover:bg-primary-600 transition-colors cursor-pointer flex items-center justify-center",
|
|
177
|
+
o
|
|
178
|
+
),
|
|
179
|
+
title: r,
|
|
180
|
+
children: t ? /* @__PURE__ */ e(t, { className: "h-5 w-5" }) : /* @__PURE__ */ e("span", { className: "text-xs font-bold", children: r.charAt(0) })
|
|
181
|
+
}
|
|
182
|
+
) : /* @__PURE__ */ e(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
className: l(
|
|
186
|
+
"w-full p-2 rounded-lg bg-primary-500 text-white flex items-center justify-center",
|
|
187
|
+
o
|
|
188
|
+
),
|
|
189
|
+
title: r,
|
|
190
|
+
children: t ? /* @__PURE__ */ e(t, { className: "h-5 w-5" }) : /* @__PURE__ */ e("span", { className: "text-xs font-bold", children: r.charAt(0) })
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
const n = c || s && i;
|
|
194
|
+
return /* @__PURE__ */ m("div", { className: l("p-4 rounded-xl bg-gradient-to-br from-primary-500 to-primary-500/80 text-white", o), children: [
|
|
195
|
+
/* @__PURE__ */ m("div", { className: l("flex items-center gap-2", (a || n) && "mb-2"), children: [
|
|
196
|
+
t && /* @__PURE__ */ e(t, { className: "h-5 w-5" }),
|
|
197
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-sm", children: r })
|
|
232
198
|
] }),
|
|
233
|
-
/* @__PURE__ */ e("
|
|
234
|
-
|
|
199
|
+
a && /* @__PURE__ */ e("p", { className: l("text-xs text-white/90", n && "mb-3"), children: a }),
|
|
200
|
+
c || (s && i ? /* @__PURE__ */ e(
|
|
201
|
+
"button",
|
|
202
|
+
{
|
|
203
|
+
onClick: i,
|
|
204
|
+
className: "w-full bg-white text-primary-600 px-3 py-2 rounded-lg font-semibold text-sm hover:bg-white/90 transition-colors cursor-pointer",
|
|
205
|
+
children: s
|
|
206
|
+
}
|
|
207
|
+
) : null)
|
|
208
|
+
] });
|
|
235
209
|
};
|
|
236
210
|
export {
|
|
237
|
-
|
|
211
|
+
O as Sidebar,
|
|
212
|
+
P as SidebarCard,
|
|
213
|
+
H as SidebarFooter,
|
|
214
|
+
G as SidebarGroup,
|
|
215
|
+
E as SidebarHeader,
|
|
216
|
+
B as SidebarItem,
|
|
217
|
+
F as SidebarNav,
|
|
218
|
+
z as SidebarSection,
|
|
219
|
+
p as useSidebar
|
|
238
220
|
};
|
|
239
221
|
//# sourceMappingURL=index59.js.map
|