@axtec/components 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PrimaryCard/PrimaryCard.d.ts +24 -0
- package/dist/components/PrimaryCard/index.d.ts +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +101 -0
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +123 -111
- package/dist/index.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index48.js +44 -56
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +56 -16
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +16 -65
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +62 -51
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +54 -37
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +37 -66
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +63 -19
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +19 -101
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +100 -64
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +206 -224
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +62 -96
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +233 -33
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +98 -14
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +35 -59
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +16 -59
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +57 -72
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +58 -106
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +70 -43
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +101 -40
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +44 -72
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +47 -53
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +70 -62
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +46 -28
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +67 -13
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +35 -2263
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +17 -0
- package/dist/index73.js.map +1 -0
- package/dist/index74.js +2267 -0
- package/dist/index74.js.map +1 -0
- package/package.json +1 -1
package/dist/index3.js
CHANGED
package/dist/index48.js
CHANGED
|
@@ -1,59 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
className: i(
|
|
46
|
-
"h-full rounded-full transition-all duration-300 ease-out",
|
|
47
|
-
u[o]
|
|
48
|
-
),
|
|
49
|
-
style: { width: `${n}%` }
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
] });
|
|
55
|
-
}
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "./index3.js";
|
|
3
|
+
const h = ({
|
|
4
|
+
icon: l,
|
|
5
|
+
title: o,
|
|
6
|
+
description: x,
|
|
7
|
+
buttonLabel: r,
|
|
8
|
+
onAction: a,
|
|
9
|
+
children: s,
|
|
10
|
+
size: m = "md",
|
|
11
|
+
className: i
|
|
12
|
+
}) => /* @__PURE__ */ p(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: t(
|
|
16
|
+
"rounded-xl bg-gradient-to-br from-primary-500 to-primary-500/80 text-white",
|
|
17
|
+
m === "sm" ? "p-3" : "p-4",
|
|
18
|
+
i
|
|
19
|
+
),
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ p("div", { className: t("flex items-center gap-2", (x || r || s) && "mb-2"), children: [
|
|
22
|
+
l && /* @__PURE__ */ e(l, { className: t(m === "sm" ? "h-4 w-4" : "h-5 w-5") }),
|
|
23
|
+
/* @__PURE__ */ e("span", { className: t("font-semibold", m === "sm" ? "text-xs" : "text-sm"), children: o })
|
|
24
|
+
] }),
|
|
25
|
+
x && /* @__PURE__ */ e("p", { className: t(
|
|
26
|
+
"text-white/90",
|
|
27
|
+
m === "sm" ? "text-[11px]" : "text-xs",
|
|
28
|
+
s || r && a ? m === "sm" ? "mb-2" : "mb-3" : ""
|
|
29
|
+
), children: x }),
|
|
30
|
+
s || (r && a ? /* @__PURE__ */ e(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
onClick: a,
|
|
34
|
+
className: t(
|
|
35
|
+
"w-full bg-white text-primary-600 rounded-lg font-semibold hover:bg-white/90 transition-colors cursor-pointer",
|
|
36
|
+
m === "sm" ? "px-2 py-1.5 text-xs" : "px-3 py-2 text-sm"
|
|
37
|
+
),
|
|
38
|
+
children: r
|
|
39
|
+
}
|
|
40
|
+
) : null)
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
56
44
|
export {
|
|
57
|
-
|
|
45
|
+
h as PrimaryCard
|
|
58
46
|
};
|
|
59
47
|
//# sourceMappingURL=index48.js.map
|
package/dist/index48.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index48.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index48.js","sources":["../src/components/PrimaryCard/PrimaryCard.tsx"],"sourcesContent":["import { type ReactNode, type ComponentType, type SVGProps } from 'react'\nimport { cn } from '@/lib/utils'\n\ntype HeroIcon = ComponentType<SVGProps<SVGSVGElement> & { title?: string; titleId?: string }>\n\nexport interface PrimaryCardProps {\n /** Icon displayed alongside the title */\n icon?: HeroIcon\n /** Card title */\n title: string\n /** Description text */\n description?: string\n /** Primary action button label */\n buttonLabel?: string\n /** Primary action click handler */\n onAction?: () => void\n /** Custom content rendered below the description (replaces the button) */\n children?: ReactNode\n /** Card size variant */\n size?: 'sm' | 'md'\n className?: string\n}\n\nexport const PrimaryCard = ({\n icon: Icon,\n title,\n description,\n buttonLabel,\n onAction,\n children,\n size = 'md',\n className,\n}: PrimaryCardProps) => {\n return (\n <div\n className={cn(\n 'rounded-xl bg-gradient-to-br from-primary-500 to-primary-500/80 text-white',\n size === 'sm' ? 'p-3' : 'p-4',\n className\n )}\n >\n <div className={cn('flex items-center gap-2', (description || buttonLabel || children) && 'mb-2')}>\n {Icon && <Icon className={cn(size === 'sm' ? 'h-4 w-4' : 'h-5 w-5')} />}\n <span className={cn('font-semibold', size === 'sm' ? 'text-xs' : 'text-sm')}>{title}</span>\n </div>\n {description && (\n <p className={cn(\n 'text-white/90',\n size === 'sm' ? 'text-[11px]' : 'text-xs',\n (children || (buttonLabel && onAction)) ? (size === 'sm' ? 'mb-2' : 'mb-3') : ''\n )}>\n {description}\n </p>\n )}\n {children ? (\n children\n ) : buttonLabel && onAction ? (\n <button\n onClick={onAction}\n className={cn(\n 'w-full bg-white text-primary-600 rounded-lg font-semibold hover:bg-white/90 transition-colors cursor-pointer',\n size === 'sm' ? 'px-2 py-1.5 text-xs' : 'px-3 py-2 text-sm'\n )}\n >\n {buttonLabel}\n </button>\n ) : null}\n </div>\n )\n}\n"],"names":["PrimaryCard","Icon","title","description","buttonLabel","onAction","children","size","className","jsxs","cn","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|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "./index3.js";
|
|
3
|
+
const c = {
|
|
4
|
+
sm: "h-1.5",
|
|
5
|
+
md: "h-2.5",
|
|
6
|
+
lg: "h-4"
|
|
7
|
+
}, u = {
|
|
8
|
+
default: "bg-primary-500",
|
|
9
|
+
success: "bg-green-500",
|
|
10
|
+
warning: "bg-yellow-500",
|
|
11
|
+
danger: "bg-red-500"
|
|
12
|
+
};
|
|
13
|
+
function g({
|
|
14
|
+
value: t,
|
|
15
|
+
max: r = 100,
|
|
16
|
+
size: d = "md",
|
|
17
|
+
variant: o = "default",
|
|
18
|
+
showLabel: l = !1,
|
|
19
|
+
label: e,
|
|
20
|
+
className: m
|
|
21
|
+
}) {
|
|
22
|
+
const n = Math.min(Math.max(t / r * 100, 0), 100);
|
|
23
|
+
return /* @__PURE__ */ a("div", { className: m, children: [
|
|
24
|
+
(l || e) && /* @__PURE__ */ a("div", { className: "flex justify-between mb-1.5", children: [
|
|
25
|
+
e && /* @__PURE__ */ s("span", { className: "text-sm font-medium text-slate-700", children: e }),
|
|
26
|
+
l && /* @__PURE__ */ a("span", { className: "text-sm text-slate-500", children: [
|
|
27
|
+
Math.round(n),
|
|
28
|
+
"%"
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ s(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: i(
|
|
35
|
+
"w-full bg-slate-200 rounded-full overflow-hidden",
|
|
36
|
+
c[d]
|
|
37
|
+
),
|
|
38
|
+
role: "progressbar",
|
|
39
|
+
"aria-valuenow": t,
|
|
40
|
+
"aria-valuemin": 0,
|
|
41
|
+
"aria-valuemax": r,
|
|
42
|
+
children: /* @__PURE__ */ s(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: i(
|
|
46
|
+
"h-full rounded-full transition-all duration-300 ease-out",
|
|
47
|
+
u[o]
|
|
48
|
+
),
|
|
49
|
+
style: { width: `${n}%` }
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
16
56
|
export {
|
|
17
|
-
|
|
57
|
+
g as Progress
|
|
18
58
|
};
|
|
19
59
|
//# sourceMappingURL=index49.js.map
|
package/dist/index49.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index49.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index49.js","sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nexport interface ProgressProps {\n value: number\n max?: number\n size?: 'sm' | 'md' | 'lg'\n variant?: 'default' | 'success' | 'warning' | 'danger'\n showLabel?: boolean\n label?: string\n className?: string\n}\n\nconst sizeStyles = {\n sm: 'h-1.5',\n md: 'h-2.5',\n lg: 'h-4',\n}\n\nconst variantStyles = {\n default: 'bg-primary-500',\n success: 'bg-green-500',\n warning: 'bg-yellow-500',\n danger: 'bg-red-500',\n}\n\nexport function Progress({\n value,\n max = 100,\n size = 'md',\n variant = 'default',\n showLabel = false,\n label,\n className,\n}: ProgressProps) {\n const percentage = Math.min(Math.max((value / max) * 100, 0), 100)\n\n return (\n <div className={className}>\n {(showLabel || label) && (\n <div className=\"flex justify-between mb-1.5\">\n {label && (\n <span className=\"text-sm font-medium text-slate-700\">{label}</span>\n )}\n {showLabel && (\n <span className=\"text-sm text-slate-500\">{Math.round(percentage)}%</span>\n )}\n </div>\n )}\n <div\n className={cn(\n 'w-full bg-slate-200 rounded-full overflow-hidden',\n sizeStyles[size]\n )}\n role=\"progressbar\"\n aria-valuenow={value}\n aria-valuemin={0}\n aria-valuemax={max}\n >\n <div\n className={cn(\n 'h-full rounded-full transition-all duration-300 ease-out',\n variantStyles[variant]\n )}\n style={{ width: `${percentage}%` }}\n />\n </div>\n </div>\n )\n}\n"],"names":["sizeStyles","variantStyles","Progress","value","max","size","variant","showLabel","label","className","percentage","jsxs","jsx","cn"],"mappings":";;AAYA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAgB;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAEO,SAASC,EAAS;AAAA,EACvB,OAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;AAChB,QAAMC,IAAa,KAAK,IAAI,KAAK,IAAKP,IAAQC,IAAO,KAAK,CAAC,GAAG,GAAG;AAEjE,SACE,gBAAAO,EAAC,SAAI,WAAAF,GACD,UAAA;AAAA,KAAAF,KAAaC,MACb,gBAAAG,EAAC,OAAA,EAAI,WAAU,+BACZ,UAAA;AAAA,MAAAH,KACC,gBAAAI,EAAC,QAAA,EAAK,WAAU,sCAAsC,UAAAJ,GAAM;AAAA,MAE7DD,KACC,gBAAAI,EAAC,QAAA,EAAK,WAAU,0BAA0B,UAAA;AAAA,QAAA,KAAK,MAAMD,CAAU;AAAA,QAAE;AAAA,MAAA,EAAA,CAAC;AAAA,IAAA,GAEtE;AAAA,IAEF,gBAAAE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC;AAAA,UACT;AAAA,UACAb,EAAWK,CAAI;AAAA,QAAA;AAAA,QAEjB,MAAK;AAAA,QACL,iBAAeF;AAAA,QACf,iBAAe;AAAA,QACf,iBAAeC;AAAA,QAEf,UAAA,gBAAAQ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC;AAAA,cACT;AAAA,cACAZ,EAAcK,CAAO;AAAA,YAAA;AAAA,YAEvB,OAAO,EAAE,OAAO,GAAGI,CAAU,IAAA;AAAA,UAAI;AAAA,QAAA;AAAA,MACnC;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
package/dist/index50.js
CHANGED
|
@@ -1,68 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
t === "vertical" ? "flex-col" : "flex-row flex-wrap",
|
|
17
|
-
m
|
|
18
|
-
),
|
|
19
|
-
role: "radiogroup",
|
|
20
|
-
children: d.map((e) => /* @__PURE__ */ s(
|
|
21
|
-
"label",
|
|
22
|
-
{
|
|
23
|
-
className: c(
|
|
24
|
-
"flex items-start gap-3 cursor-pointer group",
|
|
25
|
-
e.disabled && "opacity-50 cursor-not-allowed"
|
|
26
|
-
),
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
29
|
-
/* @__PURE__ */ r(
|
|
30
|
-
"input",
|
|
31
|
-
{
|
|
32
|
-
type: "radio",
|
|
33
|
-
name: i,
|
|
34
|
-
value: e.value,
|
|
35
|
-
checked: l === e.value,
|
|
36
|
-
onChange: () => a == null ? void 0 : a(e.value),
|
|
37
|
-
disabled: e.disabled,
|
|
38
|
-
className: "peer sr-only"
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ r(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
className: c(
|
|
45
|
-
"h-5 w-5 rounded-full border-2 transition-colors duration-200",
|
|
46
|
-
"flex items-center justify-center",
|
|
47
|
-
"peer-focus:ring-2 peer-focus:ring-primary-500 peer-focus:ring-offset-2",
|
|
48
|
-
l === e.value ? "border-primary-500" : "border-slate-300 group-hover:border-slate-400"
|
|
49
|
-
),
|
|
50
|
-
children: l === e.value && /* @__PURE__ */ r("div", { className: "h-2.5 w-2.5 rounded-full bg-primary-500" })
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] }),
|
|
54
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
55
|
-
/* @__PURE__ */ r("span", { className: "text-sm font-medium text-slate-900", children: e.label }),
|
|
56
|
-
e.description && /* @__PURE__ */ r("span", { className: "text-sm text-slate-500", children: e.description })
|
|
57
|
-
] })
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
e.value
|
|
61
|
-
))
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "./index3.js";
|
|
3
|
+
const p = ({
|
|
4
|
+
children: t,
|
|
5
|
+
bottom: o = 60,
|
|
6
|
+
right: r = 18,
|
|
7
|
+
className: i
|
|
8
|
+
}) => /* @__PURE__ */ m(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: s("fixed z-10", i),
|
|
12
|
+
style: { bottom: `${o}px`, right: `${r}px` },
|
|
13
|
+
children: t
|
|
14
|
+
}
|
|
15
|
+
);
|
|
65
16
|
export {
|
|
66
|
-
|
|
17
|
+
p as QuickActions
|
|
67
18
|
};
|
|
68
19
|
//# sourceMappingURL=index50.js.map
|
package/dist/index50.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index50.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index50.js","sources":["../src/components/QuickActions/QuickActions.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface QuickActionsProps {\n children: ReactNode\n bottom?: number\n right?: number\n className?: string\n}\n\nexport const QuickActions = ({\n children,\n bottom = 60,\n right = 18,\n className,\n}: QuickActionsProps) => {\n return (\n <div\n className={cn('fixed z-10', className)}\n style={{ bottom: `${bottom}px`, right: `${right}px` }}\n >\n {children}\n </div>\n )\n}\n"],"names":["QuickActions","children","bottom","right","className","jsx","cn"],"mappings":";;AAUO,MAAMA,IAAe,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,WAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,cAAcF,CAAS;AAAA,IACrC,OAAO,EAAE,QAAQ,GAAGF,CAAM,MAAM,OAAO,GAAGC,CAAK,KAAA;AAAA,IAE9C,UAAAF;AAAA,EAAA;AAAA;"}
|
package/dist/index51.js
CHANGED
|
@@ -1,57 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, b = (s) => {
|
|
23
|
-
t || m(s);
|
|
24
|
-
}, g = () => {
|
|
25
|
-
m(null);
|
|
26
|
-
}, v = i !== null ? i : d, u = y[p];
|
|
27
|
-
return /* @__PURE__ */ S("div", { className: r("flex flex-col", h), children: [
|
|
28
|
-
l && /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-slate-700 mb-2", children: l }),
|
|
29
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: Array.from({ length: a }, (s, f) => {
|
|
30
|
-
const o = f + 1, N = o <= v;
|
|
31
|
-
return /* @__PURE__ */ e(
|
|
32
|
-
"button",
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "./index3.js";
|
|
3
|
+
function o({
|
|
4
|
+
options: d,
|
|
5
|
+
value: l,
|
|
6
|
+
onChange: a,
|
|
7
|
+
name: i,
|
|
8
|
+
orientation: t = "vertical",
|
|
9
|
+
className: m
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: c(
|
|
15
|
+
"flex gap-3",
|
|
16
|
+
t === "vertical" ? "flex-col" : "flex-row flex-wrap",
|
|
17
|
+
m
|
|
18
|
+
),
|
|
19
|
+
role: "radiogroup",
|
|
20
|
+
children: d.map((e) => /* @__PURE__ */ s(
|
|
21
|
+
"label",
|
|
33
22
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onMouseLeave: g,
|
|
38
|
-
disabled: t,
|
|
39
|
-
className: r(
|
|
40
|
-
"p-0 border-0 bg-transparent",
|
|
41
|
-
t ? "cursor-default" : "cursor-pointer",
|
|
42
|
-
"transition-transform hover:scale-110",
|
|
43
|
-
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 rounded"
|
|
23
|
+
className: c(
|
|
24
|
+
"flex items-start gap-3 cursor-pointer group",
|
|
25
|
+
e.disabled && "opacity-50 cursor-not-allowed"
|
|
44
26
|
),
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ s("div", { className: "relative flex-shrink-0 mt-0.5", children: [
|
|
29
|
+
/* @__PURE__ */ r(
|
|
30
|
+
"input",
|
|
31
|
+
{
|
|
32
|
+
type: "radio",
|
|
33
|
+
name: i,
|
|
34
|
+
value: e.value,
|
|
35
|
+
checked: l === e.value,
|
|
36
|
+
onChange: () => a == null ? void 0 : a(e.value),
|
|
37
|
+
disabled: e.disabled,
|
|
38
|
+
className: "peer sr-only"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: c(
|
|
45
|
+
"h-5 w-5 rounded-full border-2 transition-colors duration-200",
|
|
46
|
+
"flex items-center justify-center",
|
|
47
|
+
"peer-focus:ring-2 peer-focus:ring-primary-500 peer-focus:ring-offset-2",
|
|
48
|
+
l === e.value ? "border-primary-500" : "border-slate-300 group-hover:border-slate-400"
|
|
49
|
+
),
|
|
50
|
+
children: l === e.value && /* @__PURE__ */ r("div", { className: "h-2.5 w-2.5 rounded-full bg-primary-500" })
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
55
|
+
/* @__PURE__ */ r("span", { className: "text-sm font-medium text-slate-900", children: e.label }),
|
|
56
|
+
e.description && /* @__PURE__ */ r("span", { className: "text-sm text-slate-500", children: e.description })
|
|
57
|
+
] })
|
|
58
|
+
]
|
|
47
59
|
},
|
|
48
|
-
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
60
|
+
e.value
|
|
61
|
+
))
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
54
65
|
export {
|
|
55
|
-
|
|
66
|
+
o as RadioGroup
|
|
56
67
|
};
|
|
57
68
|
//# sourceMappingURL=index51.js.map
|
package/dist/index51.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index51.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index51.js","sources":["../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\n\nexport interface RadioOption {\n value: string\n label: string\n description?: string\n disabled?: boolean\n}\n\nexport interface RadioGroupProps {\n options: RadioOption[]\n value?: string\n onChange?: (value: string) => void\n name: string\n orientation?: 'horizontal' | 'vertical'\n className?: string\n}\n\nexport function RadioGroup({\n options,\n value,\n onChange,\n name,\n orientation = 'vertical',\n className,\n}: RadioGroupProps) {\n return (\n <div\n className={cn(\n 'flex gap-3',\n orientation === 'vertical' ? 'flex-col' : 'flex-row flex-wrap',\n className\n )}\n role=\"radiogroup\"\n >\n {options.map((option) => (\n <label\n key={option.value}\n className={cn(\n 'flex items-start gap-3 cursor-pointer group',\n option.disabled && 'opacity-50 cursor-not-allowed'\n )}\n >\n <div className=\"relative flex-shrink-0 mt-0.5\">\n <input\n type=\"radio\"\n name={name}\n value={option.value}\n checked={value === option.value}\n onChange={() => onChange?.(option.value)}\n disabled={option.disabled}\n className=\"peer sr-only\"\n />\n <div\n className={cn(\n 'h-5 w-5 rounded-full border-2 transition-colors duration-200',\n 'flex items-center justify-center',\n 'peer-focus:ring-2 peer-focus:ring-primary-500 peer-focus:ring-offset-2',\n value === option.value\n ? 'border-primary-500'\n : 'border-slate-300 group-hover:border-slate-400'\n )}\n >\n {value === option.value && (\n <div className=\"h-2.5 w-2.5 rounded-full bg-primary-500\" />\n )}\n </div>\n </div>\n <div className=\"flex flex-col\">\n <span className=\"text-sm font-medium text-slate-900\">\n {option.label}\n </span>\n {option.description && (\n <span className=\"text-sm text-slate-500\">{option.description}</span>\n )}\n </div>\n </label>\n ))}\n </div>\n )\n}\n"],"names":["RadioGroup","options","value","onChange","name","orientation","className","jsx","cn","option","jsxs"],"mappings":";;AAkBO,SAASA,EAAW;AAAA,EACzB,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,WAAAC;AACF,GAAoB;AAClB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAH,MAAgB,aAAa,aAAa;AAAA,QAC1CC;AAAA,MAAA;AAAA,MAEF,MAAK;AAAA,MAEJ,UAAAL,EAAQ,IAAI,CAACQ,MACZ,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,WAAWF;AAAA,YACT;AAAA,YACAC,EAAO,YAAY;AAAA,UAAA;AAAA,UAGrB,UAAA;AAAA,YAAA,gBAAAC,EAAC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
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
)
|
|
1
|
+
import { jsxs as S, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M } from "react";
|
|
3
|
+
import { cn as r } from "./index3.js";
|
|
4
|
+
import { StarIcon as V } from "@heroicons/react/24/solid";
|
|
5
|
+
import { StarIcon as w } from "@heroicons/react/24/outline";
|
|
6
|
+
const y = {
|
|
7
|
+
sm: "w-4 h-4",
|
|
8
|
+
md: "w-6 h-6",
|
|
9
|
+
lg: "w-8 h-8"
|
|
10
|
+
}, E = ({
|
|
11
|
+
value: d = 0,
|
|
12
|
+
onChange: n,
|
|
13
|
+
max: a = 5,
|
|
14
|
+
size: p = "md",
|
|
15
|
+
readonly: t = !1,
|
|
16
|
+
label: l,
|
|
17
|
+
error: c,
|
|
18
|
+
className: h
|
|
19
|
+
}) => {
|
|
20
|
+
const [i, m] = M(null), x = (s) => {
|
|
21
|
+
!t && n && n(s);
|
|
22
|
+
}, b = (s) => {
|
|
23
|
+
t || m(s);
|
|
24
|
+
}, g = () => {
|
|
25
|
+
m(null);
|
|
26
|
+
}, v = i !== null ? i : d, u = y[p];
|
|
27
|
+
return /* @__PURE__ */ S("div", { className: r("flex flex-col", h), children: [
|
|
28
|
+
l && /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-slate-700 mb-2", children: l }),
|
|
29
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: Array.from({ length: a }, (s, f) => {
|
|
30
|
+
const o = f + 1, N = o <= v;
|
|
31
|
+
return /* @__PURE__ */ e(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
onClick: () => x(o),
|
|
36
|
+
onMouseEnter: () => b(o),
|
|
37
|
+
onMouseLeave: g,
|
|
38
|
+
disabled: t,
|
|
39
|
+
className: r(
|
|
40
|
+
"p-0 border-0 bg-transparent",
|
|
41
|
+
t ? "cursor-default" : "cursor-pointer",
|
|
42
|
+
"transition-transform hover:scale-110",
|
|
43
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 rounded"
|
|
44
|
+
),
|
|
45
|
+
"aria-label": `Rate ${o} out of ${a}`,
|
|
46
|
+
children: N ? /* @__PURE__ */ e(V, { className: r(u, "text-primary-500") }) : /* @__PURE__ */ e(w, { className: r(u, "text-slate-300") })
|
|
47
|
+
},
|
|
48
|
+
f
|
|
49
|
+
);
|
|
50
|
+
}) }),
|
|
51
|
+
c && /* @__PURE__ */ e("span", { className: "text-sm text-red-500 mt-1", children: c })
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
37
54
|
export {
|
|
38
|
-
|
|
55
|
+
E as Rating
|
|
39
56
|
};
|
|
40
57
|
//# sourceMappingURL=index52.js.map
|
package/dist/index52.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index52.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index52.js","sources":["../src/components/Rating/Rating.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { cn } from '@/lib/utils'\nimport { StarIcon as StarSolid } from '@heroicons/react/24/solid'\nimport { StarIcon as StarOutline } from '@heroicons/react/24/outline'\n\nexport interface RatingProps {\n value?: number\n onChange?: (rating: number) => void\n max?: number\n size?: 'sm' | 'md' | 'lg'\n readonly?: boolean\n label?: string\n error?: string\n className?: string\n}\n\nconst sizeStyles = {\n sm: 'w-4 h-4',\n md: 'w-6 h-6',\n lg: 'w-8 h-8',\n}\n\nexport const Rating = ({\n value = 0,\n onChange,\n max = 5,\n size = 'md',\n readonly = false,\n label,\n error,\n className,\n}: RatingProps) => {\n const [hoverValue, setHoverValue] = useState<number | null>(null)\n\n const handleClick = (rating: number) => {\n if (!readonly && onChange) {\n onChange(rating)\n }\n }\n\n const handleMouseEnter = (rating: number) => {\n if (!readonly) {\n setHoverValue(rating)\n }\n }\n\n const handleMouseLeave = () => {\n setHoverValue(null)\n }\n\n const displayValue = hoverValue !== null ? hoverValue : value\n const iconClass = sizeStyles[size]\n\n return (\n <div className={cn('flex flex-col', className)}>\n {label && (\n <span className=\"text-sm font-semibold text-slate-700 mb-2\">\n {label}\n </span>\n )}\n <div className=\"flex items-center gap-1\">\n {Array.from({ length: max }, (_, index) => {\n const starValue = index + 1\n const isFilled = starValue <= displayValue\n\n return (\n <button\n key={index}\n type=\"button\"\n onClick={() => handleClick(starValue)}\n onMouseEnter={() => handleMouseEnter(starValue)}\n onMouseLeave={handleMouseLeave}\n disabled={readonly}\n className={cn(\n 'p-0 border-0 bg-transparent',\n readonly ? 'cursor-default' : 'cursor-pointer',\n 'transition-transform hover:scale-110',\n 'focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 rounded'\n )}\n aria-label={`Rate ${starValue} out of ${max}`}\n >\n {isFilled ? (\n <StarSolid className={cn(iconClass, 'text-primary-500')} />\n ) : (\n <StarOutline className={cn(iconClass, 'text-slate-300')} />\n )}\n </button>\n )\n })}\n </div>\n {error && (\n <span className=\"text-sm text-red-500 mt-1\">{error}</span>\n )}\n </div>\n )\n}\n"],"names":["sizeStyles","Rating","value","onChange","max","size","readonly","label","error","className","hoverValue","setHoverValue","useState","handleClick","rating","handleMouseEnter","handleMouseLeave","displayValue","iconClass","cn","jsx","_","index","starValue","isFilled","StarSolid","StarOutline"],"mappings":";;;;;AAgBA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAS,CAAC;AAAA,EACrB,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AACF,MAAmB;AACjB,QAAM,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