@axtec/components 0.1.8 → 0.1.10
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 +1 -0
- package/dist/components/AgentChat/AgentChat.d.ts +32 -0
- package/dist/components/AgentChat/index.d.ts +1 -0
- package/dist/components/AgentPanel/AgentPanel.d.ts +44 -0
- package/dist/components/AgentPanel/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +161 -157
- package/dist/index.js.map +1 -1
- package/dist/index10.js +77 -99
- package/dist/index10.js.map +1 -1
- package/dist/index11.js +91 -36
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +97 -75
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +38 -24
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +76 -16
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +24 -38
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +18 -72
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +36 -47
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +73 -13
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +47 -151
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +12 -17
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +148 -40
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +18 -50
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +41 -74
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +46 -216
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +73 -46
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +212 -70
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +51 -23
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +74 -74
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +19 -28
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +62 -76
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +28 -55
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +87 -40
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +57 -45
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +40 -47
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +47 -27
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +52 -54
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +28 -49
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +54 -13
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +46 -79
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +13 -49
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +80 -17
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +48 -33
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +18 -17
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +34 -15
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +16 -89
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +15 -69
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +85 -116
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +69 -40
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +120 -42
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.js +39 -55
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +39 -11
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +53 -62
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +16 -54
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +64 -36
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +54 -66
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +37 -22
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +63 -101
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +16 -67
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +99 -213
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +1 -1
- package/dist/index60.js +67 -62
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +206 -224
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +62 -96
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +233 -33
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +98 -14
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +35 -59
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +16 -59
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +57 -72
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +58 -106
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +70 -43
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +157 -69
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +101 -40
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +44 -72
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +47 -53
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +70 -62
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +46 -28
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +67 -13
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +35 -2263
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +17 -0
- package/dist/index77.js.map +1 -0
- package/dist/index78.js +2267 -0
- package/dist/index78.js.map +1 -0
- package/dist/index8.js +377 -70
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +60 -77
- package/dist/index9.js.map +1 -1
- package/package.json +1 -1
package/dist/index19.js
CHANGED
|
@@ -1,157 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
sm: "
|
|
13
|
-
md: "
|
|
14
|
-
lg: "
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
padding: i = "md",
|
|
29
|
-
shadow: n = "sm",
|
|
30
|
-
rounded: m = "xl",
|
|
31
|
-
border: c = !0,
|
|
32
|
-
hover: o = !1,
|
|
33
|
-
stat: s,
|
|
34
|
-
action: e,
|
|
35
|
-
className: x
|
|
36
|
-
}) {
|
|
37
|
-
var b, p;
|
|
38
|
-
if (s) {
|
|
39
|
-
const d = ((b = s.trend) == null ? void 0 : b.direction) === "up" ? "text-green-600" : ((p = s.trend) == null ? void 0 : p.direction) === "down" ? "text-red-500" : "text-slate-500";
|
|
40
|
-
return /* @__PURE__ */ t(
|
|
41
|
-
"div",
|
|
42
|
-
{
|
|
43
|
-
className: r(
|
|
44
|
-
"bg-white",
|
|
45
|
-
h[i],
|
|
46
|
-
f[n],
|
|
47
|
-
u[m],
|
|
48
|
-
c && "border border-slate-200",
|
|
49
|
-
o && "hover:shadow-md transition-shadow",
|
|
50
|
-
x
|
|
51
|
-
),
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ t("div", { className: "flex justify-between items-start", children: [
|
|
54
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
55
|
-
/* @__PURE__ */ l("span", { className: "text-sm text-slate-500 font-medium mb-1", children: s.label }),
|
|
56
|
-
/* @__PURE__ */ l(
|
|
57
|
-
"span",
|
|
58
|
-
{
|
|
59
|
-
className: r(
|
|
60
|
-
"font-semibold text-primary-500 leading-tight",
|
|
61
|
-
w[s.size || "md"]
|
|
62
|
-
),
|
|
63
|
-
children: s.value
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
s.subtext && /* @__PURE__ */ l("span", { className: "text-xs text-slate-500 mt-1", children: s.subtext })
|
|
67
|
-
] }),
|
|
68
|
-
s.icon && /* @__PURE__ */ l("div", { className: "flex-shrink-0", children: s.icon })
|
|
69
|
-
] }),
|
|
70
|
-
s.trend && /* @__PURE__ */ t("div", { className: r("flex items-center gap-1 mt-2 text-xs font-medium", d), children: [
|
|
71
|
-
s.trend.direction === "up" && "↑",
|
|
72
|
-
s.trend.direction === "down" && "↓",
|
|
73
|
-
s.trend.direction === "stable" && "→",
|
|
74
|
-
s.trend.value && /* @__PURE__ */ l("span", { children: s.trend.value })
|
|
75
|
-
] }),
|
|
76
|
-
a
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
return e ? /* @__PURE__ */ t(
|
|
82
|
-
"div",
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { cn as b } from "./index3.js";
|
|
4
|
+
import { Loader as f } from "./index37.js";
|
|
5
|
+
const u = {
|
|
6
|
+
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus:ring-primary-500",
|
|
7
|
+
secondary: "bg-slate-100 text-slate-900 hover:bg-slate-200 active:bg-slate-300 focus:ring-slate-500",
|
|
8
|
+
outline: "border border-slate-300 bg-transparent text-slate-700 hover:bg-slate-50 active:bg-slate-100 focus:ring-slate-500",
|
|
9
|
+
ghost: "bg-transparent text-slate-700 hover:bg-slate-100 active:bg-slate-200 focus:ring-slate-500",
|
|
10
|
+
danger: "bg-red-500 text-white hover:bg-red-600 active:bg-red-700 focus:ring-red-500"
|
|
11
|
+
}, x = {
|
|
12
|
+
sm: "px-3 py-1.5 text-sm gap-1.5",
|
|
13
|
+
md: "px-4 py-2 text-base gap-2",
|
|
14
|
+
lg: "px-6 py-3 text-lg gap-2.5"
|
|
15
|
+
}, y = p(
|
|
16
|
+
({
|
|
17
|
+
className: o,
|
|
18
|
+
variant: i = "primary",
|
|
19
|
+
size: t = "md",
|
|
20
|
+
isLoading: r = !1,
|
|
21
|
+
leftIcon: s,
|
|
22
|
+
rightIcon: a,
|
|
23
|
+
disabled: n,
|
|
24
|
+
children: l,
|
|
25
|
+
...c
|
|
26
|
+
}, g) => /* @__PURE__ */ e(
|
|
27
|
+
"button",
|
|
83
28
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
x
|
|
29
|
+
ref: g,
|
|
30
|
+
className: b(
|
|
31
|
+
"inline-flex items-center justify-center font-semibold rounded-lg",
|
|
32
|
+
"transition-colors duration-200",
|
|
33
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
34
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
35
|
+
u[i],
|
|
36
|
+
x[t],
|
|
37
|
+
o
|
|
92
38
|
),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/* @__PURE__ */ l("span", { className: "text-slate-500", children: d.label }),
|
|
101
|
-
/* @__PURE__ */ l(
|
|
102
|
-
"span",
|
|
103
|
-
{
|
|
104
|
-
className: r("font-semibold", d.highlight ? "text-red-600" : "text-slate-900"),
|
|
105
|
-
children: d.value
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
] }, g)) }),
|
|
109
|
-
a && /* @__PURE__ */ l("div", { className: "flex-1", children: a }),
|
|
110
|
-
e.badges && e.badges.length > 0 && /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1.5 mb-4", children: e.badges.map((d, g) => /* @__PURE__ */ l(v, { variant: d.variant || "default", size: "sm", children: d.label }, g)) }),
|
|
111
|
-
e.ctaLabel && /* @__PURE__ */ l(
|
|
112
|
-
N,
|
|
113
|
-
{
|
|
114
|
-
onClick: e.onCtaClick,
|
|
115
|
-
disabled: e.ctaDisabled,
|
|
116
|
-
isLoading: e.ctaLoading,
|
|
117
|
-
leftIcon: e.ctaIcon,
|
|
118
|
-
className: "w-full mt-auto",
|
|
119
|
-
children: e.ctaLabel
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
]
|
|
39
|
+
disabled: n || r,
|
|
40
|
+
...c,
|
|
41
|
+
children: r ? /* @__PURE__ */ e(f, { size: t === "lg" ? "md" : "sm", color: "current" }) : /* @__PURE__ */ d(m, { children: [
|
|
42
|
+
s && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: s }),
|
|
43
|
+
l,
|
|
44
|
+
a && /* @__PURE__ */ e("span", { className: "flex-shrink-0", children: a })
|
|
45
|
+
] })
|
|
123
46
|
}
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
className: r(
|
|
128
|
-
"bg-white",
|
|
129
|
-
h[i],
|
|
130
|
-
f[n],
|
|
131
|
-
u[m],
|
|
132
|
-
c && "border border-slate-200",
|
|
133
|
-
o && "hover:shadow-md transition-shadow",
|
|
134
|
-
x
|
|
135
|
-
),
|
|
136
|
-
children: a
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
const y = {
|
|
141
|
-
1: "grid-cols-1",
|
|
142
|
-
2: "grid-cols-1 md:grid-cols-2",
|
|
143
|
-
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
144
|
-
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
145
|
-
}, S = {
|
|
146
|
-
sm: "gap-2",
|
|
147
|
-
md: "gap-3",
|
|
148
|
-
lg: "gap-4"
|
|
149
|
-
};
|
|
150
|
-
function B({ children: a, columns: i = 2, gap: n = "md", className: m }) {
|
|
151
|
-
return /* @__PURE__ */ l("div", { className: r("grid", y[i], S[n], m), children: a });
|
|
152
|
-
}
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
y.displayName = "Button";
|
|
153
50
|
export {
|
|
154
|
-
|
|
155
|
-
B as CardGrid
|
|
51
|
+
y as Button
|
|
156
52
|
};
|
|
157
53
|
//# sourceMappingURL=index19.js.map
|
package/dist/index19.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index19.js","sources":["../src/components/Card/Card.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '../Badge/Badge'\nimport { Button } from '../Button/Button'\n\n// Base card container props\nexport interface CardProps {\n children?: ReactNode\n padding?: 'none' | 'sm' | 'md' | 'lg'\n shadow?: 'none' | 'sm' | 'md' | 'lg'\n rounded?: 'none' | 'md' | 'lg' | 'xl' | '2xl'\n border?: boolean\n hover?: boolean\n className?: string\n}\n\n// Stat card props (for displaying a prominent value)\nexport interface CardStatProps {\n label: string\n value: string | number\n subtext?: string\n trend?: {\n direction: 'up' | 'down' | 'stable'\n value?: string\n }\n icon?: ReactNode\n size?: 'sm' | 'md' | 'lg'\n}\n\n// Metric row for action-style cards\nexport interface CardMetric {\n label: string\n value: string | number\n highlight?: boolean\n}\n\n// Action card props (for actionable items with CTAs)\nexport interface CardActionProps {\n title?: string\n status?: {\n label: string\n variant?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n }\n description?: string\n metrics?: CardMetric[]\n badges?: Array<{\n label: string\n variant?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n }>\n ctaLabel?: string\n onCtaClick?: () => void\n ctaLoading?: boolean\n ctaDisabled?: boolean\n ctaIcon?: ReactNode\n}\n\n// Combined card props\nexport type FullCardProps = CardProps & {\n stat?: CardStatProps\n action?: CardActionProps\n}\n\nconst paddingStyles = {\n none: '',\n sm: 'p-3',\n md: 'p-4',\n lg: 'p-6',\n}\n\nconst shadowStyles = {\n none: '',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n}\n\nconst roundedStyles = {\n none: '',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n}\n\nconst valueSizeStyles = {\n sm: 'text-base',\n md: 'text-xl',\n lg: 'text-2xl',\n}\n\nexport function Card({\n children,\n padding = 'md',\n shadow = 'sm',\n rounded = 'xl',\n border = true,\n hover = false,\n stat,\n action,\n className,\n}: FullCardProps) {\n // Stat card mode\n if (stat) {\n const trendColor =\n stat.trend?.direction === 'up'\n ? 'text-green-600'\n : stat.trend?.direction === 'down'\n ? 'text-red-500'\n : 'text-slate-500'\n\n return (\n <div\n className={cn(\n 'bg-white',\n paddingStyles[padding],\n shadowStyles[shadow],\n roundedStyles[rounded],\n border && 'border border-slate-200',\n hover && 'hover:shadow-md transition-shadow',\n className\n )}\n >\n <div className=\"flex justify-between items-start\">\n <div className=\"flex flex-col\">\n <span className=\"text-sm text-slate-500 font-medium mb-1\">{stat.label}</span>\n <span\n className={cn(\n 'font-semibold text-primary-500 leading-tight',\n valueSizeStyles[stat.size || 'md']\n )}\n >\n {stat.value}\n </span>\n {stat.subtext && <span className=\"text-xs text-slate-500 mt-1\">{stat.subtext}</span>}\n </div>\n {stat.icon && <div className=\"flex-shrink-0\">{stat.icon}</div>}\n </div>\n {stat.trend && (\n <div className={cn('flex items-center gap-1 mt-2 text-xs font-medium', trendColor)}>\n {stat.trend.direction === 'up' && '↑'}\n {stat.trend.direction === 'down' && '↓'}\n {stat.trend.direction === 'stable' && '→'}\n {stat.trend.value && <span>{stat.trend.value}</span>}\n </div>\n )}\n {children}\n </div>\n )\n }\n\n // Action card mode\n if (action) {\n return (\n <div\n className={cn(\n 'bg-white flex flex-col',\n paddingStyles[padding],\n shadowStyles[shadow],\n roundedStyles[rounded],\n border && 'border border-slate-200',\n hover && 'hover:shadow-md transition-shadow',\n className\n )}\n >\n {/* Header with title and status badge */}\n {(action.title || action.status) && (\n <div className=\"flex items-start justify-between gap-3 mb-3\">\n {action.title && (\n <h3 className=\"font-semibold text-base text-slate-900\">{action.title}</h3>\n )}\n {action.status && (\n <Badge variant={action.status.variant || 'default'} size=\"sm\">\n {action.status.label}\n </Badge>\n )}\n </div>\n )}\n\n {/* Description */}\n {action.description && (\n <p className=\"text-sm text-slate-600 mb-4 line-clamp-2 leading-relaxed\">\n {action.description}\n </p>\n )}\n\n {/* Metrics */}\n {action.metrics && action.metrics.length > 0 && (\n <div className=\"space-y-2 mb-4 flex-1\">\n {action.metrics.map((metric, idx) => (\n <div key={idx} className=\"flex justify-between text-sm\">\n <span className=\"text-slate-500\">{metric.label}</span>\n <span\n className={cn('font-semibold', metric.highlight ? 'text-red-600' : 'text-slate-900')}\n >\n {metric.value}\n </span>\n </div>\n ))}\n </div>\n )}\n\n {/* Custom content */}\n {children && <div className=\"flex-1\">{children}</div>}\n\n {/* Status badges */}\n {action.badges && action.badges.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5 mb-4\">\n {action.badges.map((badge, idx) => (\n <Badge key={idx} variant={badge.variant || 'default'} size=\"sm\">\n {badge.label}\n </Badge>\n ))}\n </div>\n )}\n\n {/* CTA Button */}\n {action.ctaLabel && (\n <Button\n onClick={action.onCtaClick}\n disabled={action.ctaDisabled}\n isLoading={action.ctaLoading}\n leftIcon={action.ctaIcon}\n className=\"w-full mt-auto\"\n >\n {action.ctaLabel}\n </Button>\n )}\n </div>\n )\n }\n\n // Basic card mode (original behavior)\n return (\n <div\n className={cn(\n 'bg-white',\n paddingStyles[padding],\n shadowStyles[shadow],\n roundedStyles[rounded],\n border && 'border border-slate-200',\n hover && 'hover:shadow-md transition-shadow',\n className\n )}\n >\n {children}\n </div>\n )\n}\n\n// Grid layout for cards\nexport interface CardGridProps {\n children: ReactNode\n columns?: 1 | 2 | 3 | 4\n gap?: 'sm' | 'md' | 'lg'\n className?: string\n}\n\nconst columnStyles = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-1 md:grid-cols-2',\n 3: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',\n 4: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',\n}\n\nconst gapStyles = {\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n}\n\nexport function CardGrid({ children, columns = 2, gap = 'md', className }: CardGridProps) {\n return (\n <div className={cn('grid', columnStyles[columns], gapStyles[gap], className)}>{children}</div>\n )\n}\n"],"names":["paddingStyles","shadowStyles","roundedStyles","valueSizeStyles","Card","children","padding","shadow","rounded","border","hover","stat","action","className","trendColor","_a","_b","jsxs","cn","jsx","Badge","metric","idx","badge","Button","columnStyles","gapStyles","CardGrid","columns","gap"],"mappings":";;;;AA8DA,MAAMA,IAAgB;AAAA,EACpB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAe;AAAA,EACnB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAgB;AAAA,EACpB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT,GAEMC,IAAkB;AAAA,EACtB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAASC,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;;AAEhB,MAAIF,GAAM;AACR,UAAMG,MACJC,IAAAJ,EAAK,UAAL,gBAAAI,EAAY,eAAc,OACtB,qBACAC,IAAAL,EAAK,UAAL,gBAAAK,EAAY,eAAc,SACxB,iBACA;AAER,WACE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC;AAAA,UACT;AAAA,UACAlB,EAAcM,CAAO;AAAA,UACrBL,EAAaM,CAAM;AAAA,UACnBL,EAAcM,CAAO;AAAA,UACrBC,KAAU;AAAA,UACVC,KAAS;AAAA,UACTG;AAAA,QAAA;AAAA,QAGF,UAAA;AAAA,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,YAAA,gBAAAA,EAAC,OAAA,EA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,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD;AAAA,QACT;AAAA,QACAlB,EAAcM,CAAO;AAAA,QACrBL,EAAaM,CAAM;AAAA,QACnBL,EAAcM,CAAO;AAAA,QACrBC,KAAU;AAAA,QACVC,KAAS;AAAA,QACTG;AAAA,MAAA;AAAA,MAGD,UAAAR;AAAA,IAAA;AAAA,EAAA;AAGP;AAUA,MAAMoB,IAAe;AAAA,EACnB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,GAEMC,IAAY;AAAA,EAChB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAASC,EAAS,EAAE,UAAAtB,GAAU,SAAAuB,IAAU,GAAG,KAAAC,IAAM,MAAM,WAAAhB,KAA4B;AACxF,SACE,gBAAAM,EAAC,OAAA,EAAI,WAAWD,EAAG,QAAQO,EAAaG,CAAO,GAAGF,EAAUG,CAAG,GAAGhB,CAAS,GAAI,UAAAR,EAAA,CAAS;AAE5F;"}
|
|
1
|
+
{"version":3,"file":"index19.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\nimport { Loader } from '../Loader/Loader'\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger'\n size?: 'sm' | 'md' | 'lg'\n isLoading?: boolean\n leftIcon?: ReactNode\n rightIcon?: ReactNode\n}\n\nconst variantStyles = {\n primary:\n 'bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus:ring-primary-500',\n secondary:\n 'bg-slate-100 text-slate-900 hover:bg-slate-200 active:bg-slate-300 focus:ring-slate-500',\n outline:\n 'border border-slate-300 bg-transparent text-slate-700 hover:bg-slate-50 active:bg-slate-100 focus:ring-slate-500',\n ghost:\n 'bg-transparent text-slate-700 hover:bg-slate-100 active:bg-slate-200 focus:ring-slate-500',\n danger:\n 'bg-red-500 text-white hover:bg-red-600 active:bg-red-700 focus:ring-red-500',\n}\n\nconst sizeStyles = {\n sm: 'px-3 py-1.5 text-sm gap-1.5',\n md: 'px-4 py-2 text-base gap-2',\n lg: 'px-6 py-3 text-lg gap-2.5',\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'primary',\n size = 'md',\n isLoading = false,\n leftIcon,\n rightIcon,\n disabled,\n children,\n ...props\n },\n ref\n ) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'inline-flex items-center justify-center font-semibold rounded-lg',\n 'transition-colors duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-offset-2',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n variantStyles[variant],\n sizeStyles[size],\n className\n )}\n disabled={disabled || isLoading}\n {...props}\n >\n {isLoading ? (\n <Loader size={size === 'lg' ? 'md' : 'sm'} color=\"current\" />\n ) : (\n <>\n {leftIcon && <span className=\"flex-shrink-0\">{leftIcon}</span>}\n {children}\n {rightIcon && <span className=\"flex-shrink-0\">{rightIcon}</span>}\n </>\n )}\n </button>\n )\n }\n)\n\nButton.displayName = 'Button'\n"],"names":["variantStyles","sizeStyles","Button","forwardRef","className","variant","size","isLoading","leftIcon","rightIcon","disabled","children","props","ref","jsx","cn","Loader","jsxs","Fragment"],"mappings":";;;;AAYA,MAAMA,IAAgB;AAAA,EACpB,SACE;AAAA,EACF,WACE;AAAA,EACF,SACE;AAAA,EACF,OACE;AAAA,EACF,QACE;AACJ,GAEMC,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAASC;AAAA,EACpB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,WAAAC,IAAY;AAAA,IACZ,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MAGE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAf,EAAcK,CAAO;AAAA,QACrBJ,EAAWK,CAAI;AAAA,QACfF;AAAA,MAAA;AAAA,MAEF,UAAUM,KAAYH;AAAA,MACrB,GAAGK;AAAA,MAEH,UAAAL,IACC,gBAAAO,EAACE,GAAA,EAAO,MAAMV,MAAS,OAAO,OAAO,MAAM,OAAM,UAAA,CAAU,IAE3D,gBAAAW,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAV,KAAY,gBAAAM,EAAC,QAAA,EAAK,WAAU,iBAAiB,UAAAN,GAAS;AAAA,QACtDG;AAAA,QACAF,KAAa,gBAAAK,EAAC,QAAA,EAAK,WAAU,iBAAiB,UAAAL,EAAA,CAAU;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA;AAKV;AAEAP,EAAO,cAAc;"}
|
package/dist/index20.js
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
),
|
|
14
|
-
children: t
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
2
|
+
import { cn as i } from "./index3.js";
|
|
3
|
+
const m = ({ buttons: o, className: e }) => /* @__PURE__ */ r("div", { className: i("flex flex-row items-center justify-end gap-1", e), children: o.map(({ icon: t, onClick: n, label: s }, a) => /* @__PURE__ */ r(
|
|
4
|
+
"button",
|
|
5
|
+
{
|
|
6
|
+
onClick: n,
|
|
7
|
+
"aria-label": s,
|
|
8
|
+
className: "cursor-pointer p-2 rounded-md hover:bg-slate-100 transition-colors",
|
|
9
|
+
children: t
|
|
10
|
+
},
|
|
11
|
+
`btnGroup_${a}`
|
|
12
|
+
)) });
|
|
18
13
|
export {
|
|
19
|
-
|
|
14
|
+
m as ButtonGroup
|
|
20
15
|
};
|
|
21
16
|
//# sourceMappingURL=index20.js.map
|
package/dist/index20.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index20.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index20.js","sources":["../src/components/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type ReactElement } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface ButtonGroupItem {\n icon: ReactElement\n onClick: () => void\n label?: string\n}\n\nexport interface ButtonGroupProps {\n buttons: ButtonGroupItem[]\n className?: string\n}\n\nexport const ButtonGroup = ({ buttons, className }: ButtonGroupProps) => {\n return (\n <div className={cn('flex flex-row items-center justify-end gap-1', className)}>\n {buttons.map(({ icon, onClick, label }, index) => (\n <button\n key={`btnGroup_${index}`}\n onClick={onClick}\n aria-label={label}\n className=\"cursor-pointer p-2 rounded-md hover:bg-slate-100 transition-colors\"\n >\n {icon}\n </button>\n ))}\n </div>\n )\n}\n"],"names":["ButtonGroup","buttons","className","jsx","cn","icon","onClick","label","index"],"mappings":";;AAcO,MAAMA,IAAc,CAAC,EAAE,SAAAC,GAAS,WAAAC,QAEnC,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAG,gDAAgDF,CAAS,GACzE,UAAAD,EAAQ,IAAI,CAAC,EAAE,MAAAI,GAAM,SAAAC,GAAS,OAAAC,EAAA,GAASC,MACtC,gBAAAL;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC,SAAAG;AAAA,IACA,cAAYC;AAAA,IACZ,WAAU;AAAA,IAET,UAAAF;AAAA,EAAA;AAAA,EALI,YAAYG,CAAK;AAAA,CAOzB,GACH;"}
|
package/dist/index21.js
CHANGED
|
@@ -1,49 +1,157 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as t, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { cn as r } from "./index3.js";
|
|
3
|
+
import { Badge as v } from "./index17.js";
|
|
4
|
+
import { Button as N } from "./index19.js";
|
|
5
|
+
const h = {
|
|
6
|
+
none: "",
|
|
7
|
+
sm: "p-3",
|
|
8
|
+
md: "p-4",
|
|
9
|
+
lg: "p-6"
|
|
10
|
+
}, f = {
|
|
11
|
+
none: "",
|
|
12
|
+
sm: "shadow-sm",
|
|
13
|
+
md: "shadow-md",
|
|
14
|
+
lg: "shadow-lg"
|
|
15
|
+
}, u = {
|
|
16
|
+
none: "",
|
|
17
|
+
md: "rounded-md",
|
|
18
|
+
lg: "rounded-lg",
|
|
19
|
+
xl: "rounded-xl",
|
|
20
|
+
"2xl": "rounded-2xl"
|
|
21
|
+
}, w = {
|
|
22
|
+
sm: "text-base",
|
|
23
|
+
md: "text-xl",
|
|
24
|
+
lg: "text-2xl"
|
|
25
|
+
};
|
|
26
|
+
function k({
|
|
27
|
+
children: a,
|
|
28
|
+
padding: i = "md",
|
|
29
|
+
shadow: n = "sm",
|
|
30
|
+
rounded: m = "xl",
|
|
31
|
+
border: c = !0,
|
|
32
|
+
hover: o = !1,
|
|
33
|
+
stat: s,
|
|
34
|
+
action: e,
|
|
35
|
+
className: x
|
|
36
|
+
}) {
|
|
37
|
+
var b, p;
|
|
38
|
+
if (s) {
|
|
39
|
+
const d = ((b = s.trend) == null ? void 0 : b.direction) === "up" ? "text-green-600" : ((p = s.trend) == null ? void 0 : p.direction) === "down" ? "text-red-500" : "text-slate-500";
|
|
40
|
+
return /* @__PURE__ */ t(
|
|
9
41
|
"div",
|
|
10
42
|
{
|
|
11
|
-
className:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children:
|
|
43
|
+
className: r(
|
|
44
|
+
"bg-white",
|
|
45
|
+
h[i],
|
|
46
|
+
f[n],
|
|
47
|
+
u[m],
|
|
48
|
+
c && "border border-slate-200",
|
|
49
|
+
o && "hover:shadow-md transition-shadow",
|
|
50
|
+
x
|
|
51
|
+
),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ t("div", { className: "flex justify-between items-start", children: [
|
|
54
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
55
|
+
/* @__PURE__ */ l("span", { className: "text-sm text-slate-500 font-medium mb-1", children: s.label }),
|
|
56
|
+
/* @__PURE__ */ l(
|
|
57
|
+
"span",
|
|
58
|
+
{
|
|
59
|
+
className: r(
|
|
60
|
+
"font-semibold text-primary-500 leading-tight",
|
|
61
|
+
w[s.size || "md"]
|
|
62
|
+
),
|
|
63
|
+
children: s.value
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
s.subtext && /* @__PURE__ */ l("span", { className: "text-xs text-slate-500 mt-1", children: s.subtext })
|
|
67
|
+
] }),
|
|
68
|
+
s.icon && /* @__PURE__ */ l("div", { className: "flex-shrink-0", children: s.icon })
|
|
69
|
+
] }),
|
|
70
|
+
s.trend && /* @__PURE__ */ t("div", { className: r("flex items-center gap-1 mt-2 text-xs font-medium", d), children: [
|
|
71
|
+
s.trend.direction === "up" && "↑",
|
|
72
|
+
s.trend.direction === "down" && "↓",
|
|
73
|
+
s.trend.direction === "stable" && "→",
|
|
74
|
+
s.trend.value && /* @__PURE__ */ l("span", { children: s.trend.value })
|
|
75
|
+
] }),
|
|
76
|
+
a
|
|
77
|
+
]
|
|
21
78
|
}
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
e
|
|
25
|
-
/* @__PURE__ */ l("div", { className: "text-sm font-semibold text-slate-900 mb-1", children: a.title }),
|
|
26
|
-
/* @__PURE__ */ s("div", { className: "text-sm text-slate-500", children: [
|
|
27
|
-
a.value,
|
|
28
|
-
a.percentage && /* @__PURE__ */ s("span", { className: "ml-1 text-slate-400", children: [
|
|
29
|
-
"(",
|
|
30
|
-
a.percentage,
|
|
31
|
-
")"
|
|
32
|
-
] })
|
|
33
|
-
] })
|
|
34
|
-
] }, d))
|
|
35
|
-
] }, r)) }), x = ({ items: c, className: t }) => /* @__PURE__ */ l("div", { className: n("flex items-center justify-center gap-6", t), children: c.map((e, r) => /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
36
|
-
/* @__PURE__ */ l(
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return e ? /* @__PURE__ */ t(
|
|
37
82
|
"div",
|
|
38
83
|
{
|
|
39
|
-
className:
|
|
40
|
-
|
|
84
|
+
className: r(
|
|
85
|
+
"bg-white flex flex-col",
|
|
86
|
+
h[i],
|
|
87
|
+
f[n],
|
|
88
|
+
u[m],
|
|
89
|
+
c && "border border-slate-200",
|
|
90
|
+
o && "hover:shadow-md transition-shadow",
|
|
91
|
+
x
|
|
92
|
+
),
|
|
93
|
+
children: [
|
|
94
|
+
(e.title || e.status) && /* @__PURE__ */ t("div", { className: "flex items-start justify-between gap-3 mb-3", children: [
|
|
95
|
+
e.title && /* @__PURE__ */ l("h3", { className: "font-semibold text-base text-slate-900", children: e.title }),
|
|
96
|
+
e.status && /* @__PURE__ */ l(v, { variant: e.status.variant || "default", size: "sm", children: e.status.label })
|
|
97
|
+
] }),
|
|
98
|
+
e.description && /* @__PURE__ */ l("p", { className: "text-sm text-slate-600 mb-4 line-clamp-2 leading-relaxed", children: e.description }),
|
|
99
|
+
e.metrics && e.metrics.length > 0 && /* @__PURE__ */ l("div", { className: "space-y-2 mb-4 flex-1", children: e.metrics.map((d, g) => /* @__PURE__ */ t("div", { className: "flex justify-between text-sm", children: [
|
|
100
|
+
/* @__PURE__ */ l("span", { className: "text-slate-500", children: d.label }),
|
|
101
|
+
/* @__PURE__ */ l(
|
|
102
|
+
"span",
|
|
103
|
+
{
|
|
104
|
+
className: r("font-semibold", d.highlight ? "text-red-600" : "text-slate-900"),
|
|
105
|
+
children: d.value
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }, g)) }),
|
|
109
|
+
a && /* @__PURE__ */ l("div", { className: "flex-1", children: a }),
|
|
110
|
+
e.badges && e.badges.length > 0 && /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1.5 mb-4", children: e.badges.map((d, g) => /* @__PURE__ */ l(v, { variant: d.variant || "default", size: "sm", children: d.label }, g)) }),
|
|
111
|
+
e.ctaLabel && /* @__PURE__ */ l(
|
|
112
|
+
N,
|
|
113
|
+
{
|
|
114
|
+
onClick: e.onCtaClick,
|
|
115
|
+
disabled: e.ctaDisabled,
|
|
116
|
+
isLoading: e.ctaLoading,
|
|
117
|
+
leftIcon: e.ctaIcon,
|
|
118
|
+
className: "w-full mt-auto",
|
|
119
|
+
children: e.ctaLabel
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
]
|
|
41
123
|
}
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
124
|
+
) : /* @__PURE__ */ l(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: r(
|
|
128
|
+
"bg-white",
|
|
129
|
+
h[i],
|
|
130
|
+
f[n],
|
|
131
|
+
u[m],
|
|
132
|
+
c && "border border-slate-200",
|
|
133
|
+
o && "hover:shadow-md transition-shadow",
|
|
134
|
+
x
|
|
135
|
+
),
|
|
136
|
+
children: a
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
const y = {
|
|
141
|
+
1: "grid-cols-1",
|
|
142
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
143
|
+
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
144
|
+
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
145
|
+
}, S = {
|
|
146
|
+
sm: "gap-2",
|
|
147
|
+
md: "gap-3",
|
|
148
|
+
lg: "gap-4"
|
|
149
|
+
};
|
|
150
|
+
function B({ children: a, columns: i = 2, gap: n = "md", className: m }) {
|
|
151
|
+
return /* @__PURE__ */ l("div", { className: r("grid", y[i], S[n], m), children: a });
|
|
152
|
+
}
|
|
45
153
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
154
|
+
k as Card,
|
|
155
|
+
B as CardGrid
|
|
48
156
|
};
|
|
49
157
|
//# sourceMappingURL=index21.js.map
|
package/dist/index21.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index21.js","sources":["../src/components/StatisticsLegend/StatisticsLegend.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nexport interface StatisticsLegendItem {\n label: string\n color: string\n data: {\n title: string\n value: string | number\n percentage?: string\n }[]\n}\n\nexport interface StatisticsLegendProps {\n items: StatisticsLegendItem[]\n className?: string\n}\n\nexport const StatisticsLegend = ({\n items,\n className,\n}: StatisticsLegendProps) => {\n return (\n <div className={cn('flex justify-center gap-8 p-5', className)}>\n {items.map((item, index) => (\n <div key={index} className=\"flex flex-col flex-1\">\n {/* Legend label */}\n <div className=\"flex items-center gap-2 mb-3\">\n <div\n className=\"w-5 h-2.5 rounded-full\"\n style={{ backgroundColor: item.color }}\n />\n <span\n className=\"text-sm font-medium\"\n style={{ color: item.color }}\n >\n {item.label}\n </span>\n </div>\n\n {/* Data items */}\n {item.data.map((dataItem, dataIndex) => (\n <div key={dataIndex} className=\"mb-2\">\n <div className=\"text-sm font-semibold text-slate-900 mb-1\">\n {dataItem.title}\n </div>\n <div className=\"text-sm text-slate-500\">\n {dataItem.value}\n {dataItem.percentage && (\n <span className=\"ml-1 text-slate-400\">\n ({dataItem.percentage})\n </span>\n )}\n </div>\n </div>\n ))}\n </div>\n ))}\n </div>\n )\n}\n\n// Simple color dot legend for charts\nexport interface ChartLegendProps {\n items: {\n label: string\n color: string\n }[]\n className?: string\n}\n\nexport const ChartLegend = ({ items, className }: ChartLegendProps) => {\n return (\n <div className={cn('flex items-center justify-center gap-6', className)}>\n {items.map((item, index) => (\n <div key={index} className=\"flex items-center gap-2\">\n <div\n className=\"w-3 h-3 rounded-full\"\n style={{ backgroundColor: item.color }}\n />\n <span className=\"text-sm text-slate-600\">{item.label}</span>\n </div>\n ))}\n </div>\n )\n}\n"],"names":["StatisticsLegend","items","className","jsx","cn","item","index","jsxs","dataItem","dataIndex","ChartLegend"],"mappings":";;AAiBO,MAAMA,IAAmB,CAAC;AAAA,EAC/B,OAAAC;AAAA,EACA,WAAAC;AACF,MAEI,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAG,iCAAiCF,CAAS,GAC1D,UAAAD,EAAM,IAAI,CAACI,GAAMC,MAChB,gBAAAC,EAAC,OAAA,EAAgB,WAAU,wBAEzB,UAAA;AAAA,EAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,gCACb,UAAA;AAAA,IAAA,gBAAAJ;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,iBAAiBE,EAAK,MAAA;AAAA,MAAM;AAAA,IAAA;AAAA,IAEvC,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,OAAOE,EAAK,MAAA;AAAA,QAEpB,UAAAA,EAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EACR,GACF;AAAA,EAGCA,EAAK,KAAK,IAAI,CAACG,GAAUC,MACxB,gBAAAF,EAAC,OAAA,EAAoB,WAAU,QAC7B,UAAA;AAAA,IAAA,gBAAAJ,EAAC,OAAA,EAAI,WAAU,6CACZ,UAAAK,EAAS,OACZ;AAAA,IACA,gBAAAD,EAAC,OAAA,EAAI,WAAU,0BACZ,UAAA;AAAA,MAAAC,EAAS;AAAA,MACTA,EAAS,cACR,gBAAAD,EAAC,QAAA,EAAK,WAAU,uBAAsB,UAAA;AAAA,QAAA;AAAA,QAClCC,EAAS;AAAA,QAAW;AAAA,MAAA,EAAA,CACxB;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,EAAA,GAXQC,CAYV,CACD;AAAA,KA9BOH,CA+BV,CACD,GACH,GAaSI,IAAc,CAAC,EAAE,OAAAT,GAAO,WAAAC,QAEjC,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAG,0CAA0CF,CAAS,GACnE,UAAAD,EAAM,IAAI,CAACI,GAAMC,MAChB,gBAAAC,EAAC,OAAA,EAAgB,WAAU,2BACzB,UAAA;AAAA,EAAA,gBAAAJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,iBAAiBE,EAAK,MAAA;AAAA,IAAM;AAAA,EAAA;AAAA,EAEvC,gBAAAF,EAAC,QAAA,EAAK,WAAU,0BAA0B,YAAK,MAAA,CAAM;AAAA,KAL7CG,CAMV,CACD,GACH;"}
|
|
1
|
+
{"version":3,"file":"index21.js","sources":["../src/components/Card/Card.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '../Badge/Badge'\nimport { Button } from '../Button/Button'\n\n// Base card container props\nexport interface CardProps {\n children?: ReactNode\n padding?: 'none' | 'sm' | 'md' | 'lg'\n shadow?: 'none' | 'sm' | 'md' | 'lg'\n rounded?: 'none' | 'md' | 'lg' | 'xl' | '2xl'\n border?: boolean\n hover?: boolean\n className?: string\n}\n\n// Stat card props (for displaying a prominent value)\nexport interface CardStatProps {\n label: string\n value: string | number\n subtext?: string\n trend?: {\n direction: 'up' | 'down' | 'stable'\n value?: string\n }\n icon?: ReactNode\n size?: 'sm' | 'md' | 'lg'\n}\n\n// Metric row for action-style cards\nexport interface CardMetric {\n label: string\n value: string | number\n highlight?: boolean\n}\n\n// Action card props (for actionable items with CTAs)\nexport interface CardActionProps {\n title?: string\n status?: {\n label: string\n variant?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n }\n description?: string\n metrics?: CardMetric[]\n badges?: Array<{\n label: string\n variant?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n }>\n ctaLabel?: string\n onCtaClick?: () => void\n ctaLoading?: boolean\n ctaDisabled?: boolean\n ctaIcon?: ReactNode\n}\n\n// Combined card props\nexport type FullCardProps = CardProps & {\n stat?: CardStatProps\n action?: CardActionProps\n}\n\nconst paddingStyles = {\n none: '',\n sm: 'p-3',\n md: 'p-4',\n lg: 'p-6',\n}\n\nconst shadowStyles = {\n none: '',\n sm: 'shadow-sm',\n md: 'shadow-md',\n lg: 'shadow-lg',\n}\n\nconst roundedStyles = {\n none: '',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n}\n\nconst valueSizeStyles = {\n sm: 'text-base',\n md: 'text-xl',\n lg: 'text-2xl',\n}\n\nexport function Card({\n children,\n padding = 'md',\n shadow = 'sm',\n rounded = 'xl',\n border = true,\n hover = false,\n stat,\n action,\n className,\n}: FullCardProps) {\n // Stat card mode\n if (stat) {\n const trendColor =\n stat.trend?.direction === 'up'\n ? 'text-green-600'\n : stat.trend?.direction === 'down'\n ? 'text-red-500'\n : 'text-slate-500'\n\n return (\n <div\n className={cn(\n 'bg-white',\n paddingStyles[padding],\n shadowStyles[shadow],\n roundedStyles[rounded],\n border && 'border border-slate-200',\n hover && 'hover:shadow-md transition-shadow',\n className\n )}\n >\n <div className=\"flex justify-between items-start\">\n <div className=\"flex flex-col\">\n <span className=\"text-sm text-slate-500 font-medium mb-1\">{stat.label}</span>\n <span\n className={cn(\n 'font-semibold text-primary-500 leading-tight',\n valueSizeStyles[stat.size || 'md']\n )}\n >\n {stat.value}\n </span>\n {stat.subtext && <span className=\"text-xs text-slate-500 mt-1\">{stat.subtext}</span>}\n </div>\n {stat.icon && <div className=\"flex-shrink-0\">{stat.icon}</div>}\n </div>\n {stat.trend && (\n <div className={cn('flex items-center gap-1 mt-2 text-xs font-medium', trendColor)}>\n {stat.trend.direction === 'up' && '↑'}\n {stat.trend.direction === 'down' && '↓'}\n {stat.trend.direction === 'stable' && '→'}\n {stat.trend.value && <span>{stat.trend.value}</span>}\n </div>\n )}\n {children}\n </div>\n )\n }\n\n // Action card mode\n if (action) {\n return (\n <div\n className={cn(\n 'bg-white flex flex-col',\n paddingStyles[padding],\n shadowStyles[shadow],\n roundedStyles[rounded],\n border && 'border border-slate-200',\n hover && 'hover:shadow-md transition-shadow',\n className\n )}\n >\n {/* Header with title and status badge */}\n {(action.title || action.status) && (\n <div className=\"flex items-start justify-between gap-3 mb-3\">\n {action.title && (\n <h3 className=\"font-semibold text-base text-slate-900\">{action.title}</h3>\n )}\n {action.status && (\n <Badge variant={action.status.variant || 'default'} size=\"sm\">\n {action.status.label}\n </Badge>\n )}\n </div>\n )}\n\n {/* Description */}\n {action.description && (\n <p className=\"text-sm text-slate-600 mb-4 line-clamp-2 leading-relaxed\">\n {action.description}\n </p>\n )}\n\n {/* Metrics */}\n {action.metrics && action.metrics.length > 0 && (\n <div className=\"space-y-2 mb-4 flex-1\">\n {action.metrics.map((metric, idx) => (\n <div key={idx} className=\"flex justify-between text-sm\">\n <span className=\"text-slate-500\">{metric.label}</span>\n <span\n className={cn('font-semibold', metric.highlight ? 'text-red-600' : 'text-slate-900')}\n >\n {metric.value}\n </span>\n </div>\n ))}\n </div>\n )}\n\n {/* Custom content */}\n {children && <div className=\"flex-1\">{children}</div>}\n\n {/* Status badges */}\n {action.badges && action.badges.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5 mb-4\">\n {action.badges.map((badge, idx) => (\n <Badge key={idx} variant={badge.variant || 'default'} size=\"sm\">\n {badge.label}\n </Badge>\n ))}\n </div>\n )}\n\n {/* CTA Button */}\n {action.ctaLabel && (\n <Button\n onClick={action.onCtaClick}\n disabled={action.ctaDisabled}\n isLoading={action.ctaLoading}\n leftIcon={action.ctaIcon}\n className=\"w-full mt-auto\"\n >\n {action.ctaLabel}\n </Button>\n )}\n </div>\n )\n }\n\n // Basic card mode (original behavior)\n return (\n <div\n className={cn(\n 'bg-white',\n paddingStyles[padding],\n shadowStyles[shadow],\n roundedStyles[rounded],\n border && 'border border-slate-200',\n hover && 'hover:shadow-md transition-shadow',\n className\n )}\n >\n {children}\n </div>\n )\n}\n\n// Grid layout for cards\nexport interface CardGridProps {\n children: ReactNode\n columns?: 1 | 2 | 3 | 4\n gap?: 'sm' | 'md' | 'lg'\n className?: string\n}\n\nconst columnStyles = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-1 md:grid-cols-2',\n 3: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',\n 4: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-4',\n}\n\nconst gapStyles = {\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n}\n\nexport function CardGrid({ children, columns = 2, gap = 'md', className }: CardGridProps) {\n return (\n <div className={cn('grid', columnStyles[columns], gapStyles[gap], className)}>{children}</div>\n )\n}\n"],"names":["paddingStyles","shadowStyles","roundedStyles","valueSizeStyles","Card","children","padding","shadow","rounded","border","hover","stat","action","className","trendColor","_a","_b","jsxs","cn","jsx","Badge","metric","idx","badge","Button","columnStyles","gapStyles","CardGrid","columns","gap"],"mappings":";;;;AA8DA,MAAMA,IAAgB;AAAA,EACpB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAe;AAAA,EACnB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAgB;AAAA,EACpB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,OAAO;AACT,GAEMC,IAAkB;AAAA,EACtB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,SAASC,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,Q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/index22.js
CHANGED
|
@@ -1,53 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
ref: p,
|
|
19
|
-
type: "checkbox",
|
|
20
|
-
id: a,
|
|
21
|
-
checked: o,
|
|
22
|
-
className: "peer sr-only",
|
|
23
|
-
...n
|
|
24
|
-
}
|
|
25
|
-
),
|
|
26
|
-
/* @__PURE__ */ r(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
className: i(
|
|
30
|
-
"h-5 w-5 rounded border-2 transition-colors duration-200",
|
|
31
|
-
"flex items-center justify-center",
|
|
32
|
-
"peer-focus:ring-2 peer-focus:ring-primary-500 peer-focus:ring-offset-2",
|
|
33
|
-
"peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",
|
|
34
|
-
o ? "bg-primary-500 border-primary-500" : "bg-white border-slate-300 group-hover:border-slate-400"
|
|
35
|
-
),
|
|
36
|
-
children: o && /* @__PURE__ */ r(l, { className: "h-3.5 w-3.5 text-white" })
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
] }),
|
|
40
|
-
(e || s) && /* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
41
|
-
e && /* @__PURE__ */ r("span", { className: "text-sm font-medium text-slate-900", children: e }),
|
|
42
|
-
s && /* @__PURE__ */ r("span", { className: "text-sm text-slate-500", children: s })
|
|
43
|
-
] })
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
f.displayName = "Checkbox";
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "./index3.js";
|
|
3
|
+
function n({
|
|
4
|
+
children: t,
|
|
5
|
+
className: e
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ r(
|
|
8
|
+
"h4",
|
|
9
|
+
{
|
|
10
|
+
className: m(
|
|
11
|
+
"text-base font-medium text-slate-900",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
children: t
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
50
18
|
export {
|
|
51
|
-
|
|
19
|
+
n as CardHeading
|
|
52
20
|
};
|
|
53
21
|
//# sourceMappingURL=index22.js.map
|
package/dist/index22.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index22.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index22.js","sources":["../src/components/Typography/CardHeading.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport type { ReactNode } from 'react'\n\nexport interface CardHeadingProps {\n children: ReactNode\n className?: string\n}\n\nexport function CardHeading({\n children,\n className,\n}: CardHeadingProps) {\n return (\n <h4\n className={cn(\n 'text-base font-medium text-slate-900',\n className\n )}\n >\n {children}\n </h4>\n )\n}\n"],"names":["CardHeading","children","className","jsx","cn"],"mappings":";;AAQO,SAASA,EAAY;AAAA,EAC1B,UAAAC;AAAA,EACA,WAAAC;AACF,GAAqB;AACnB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAGD,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|