@axtec/components 0.1.7 → 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/OptionDivider/OptionDivider.d.ts +2 -1
- 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 +17 -11
- 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/index49.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index49.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index49.js","sources":["../src/components/PhotoLibrary/PhotoLibrary.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { cn } from '@/lib/utils'\nimport { EmptyData } from '../EmptyData/EmptyData'\nimport { Dialog, DialogPanel } from '@headlessui/react'\nimport { XMarkIcon, ChevronLeftIcon, ChevronRightIcon, TrashIcon } from '@heroicons/react/24/outline'\n\nexport interface PhotoLibraryImage {\n url: string\n alt?: string\n id?: string\n}\n\nexport interface PhotoLibraryProps {\n images: PhotoLibraryImage[]\n columns?: 3 | 4 | 5 | 6\n gap?: number\n emptyMessage?: string\n onDelete?: (image: PhotoLibraryImage, index: number) => void\n className?: string\n}\n\nexport const PhotoLibrary = ({\n images,\n columns = 4,\n gap = 16,\n emptyMessage = 'To add images, upload them directly or import from another source.',\n onDelete,\n className,\n}: PhotoLibraryProps) => {\n const [previewIndex, setPreviewIndex] = useState<number | null>(null)\n\n const columnClasses = {\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 5: 'grid-cols-5',\n 6: 'grid-cols-6',\n }\n\n const handlePrevious = () => {\n if (previewIndex !== null && previewIndex > 0) {\n setPreviewIndex(previewIndex - 1)\n }\n }\n\n const handleNext = () => {\n if (previewIndex !== null && previewIndex < images.length - 1) {\n setPreviewIndex(previewIndex + 1)\n }\n }\n\n const handleDelete = () => {\n if (previewIndex !== null && onDelete) {\n onDelete(images[previewIndex], previewIndex)\n if (images.length === 1) {\n setPreviewIndex(null)\n } else if (previewIndex >= images.length - 1) {\n setPreviewIndex(images.length - 2)\n }\n }\n }\n\n if (images.length === 0) {\n return (\n <EmptyData\n fullBlock\n message={emptyMessage}\n className={className}\n />\n )\n }\n\n return (\n <>\n <div\n className={cn('grid', columnClasses[columns], className)}\n style={{ gap: `${gap}px` }}\n >\n {images.map((image, index) => (\n <div\n key={image.id || image.url}\n className=\"aspect-square rounded-lg overflow-hidden cursor-pointer bg-slate-200 hover:opacity-90 transition-opacity\"\n onClick={() => setPreviewIndex(index)}\n >\n <img\n src={image.url}\n alt={image.alt || `Image ${index + 1}`}\n className=\"w-full h-full object-cover\"\n />\n </div>\n ))}\n </div>\n\n {/* Preview Modal */}\n <Dialog\n open={previewIndex !== null}\n onClose={() => setPreviewIndex(null)}\n className=\"relative z-50\"\n >\n <div className=\"fixed inset-0 bg-black\" aria-hidden=\"true\" />\n\n <div className=\"fixed inset-0 flex items-center justify-center\">\n <DialogPanel className=\"relative w-full h-full flex items-center justify-center\">\n {/* Close button */}\n <button\n onClick={() => setPreviewIndex(null)}\n className=\"absolute top-8 left-8 p-2 rounded-full bg-white hover:bg-slate-100 transition-colors z-10\"\n aria-label=\"Close preview\"\n >\n <XMarkIcon className=\"w-6 h-6 text-slate-700\" />\n </button>\n\n {/* Delete button */}\n {onDelete && (\n <button\n onClick={handleDelete}\n className=\"absolute top-8 right-8 p-2 rounded-full bg-white hover:bg-red-50 transition-colors z-10\"\n aria-label=\"Delete image\"\n >\n <TrashIcon className=\"w-6 h-6 text-red-500\" />\n </button>\n )}\n\n {/* Navigation */}\n {previewIndex !== null && previewIndex > 0 && (\n <button\n onClick={handlePrevious}\n className=\"absolute left-8 p-3 rounded-full bg-white/80 hover:bg-white transition-colors z-10\"\n aria-label=\"Previous image\"\n >\n <ChevronLeftIcon className=\"w-6 h-6 text-slate-700\" />\n </button>\n )}\n\n {previewIndex !== null && previewIndex < images.length - 1 && (\n <button\n onClick={handleNext}\n className=\"absolute right-8 p-3 rounded-full bg-white/80 hover:bg-white transition-colors z-10\"\n aria-label=\"Next image\"\n >\n <ChevronRightIcon className=\"w-6 h-6 text-slate-700\" />\n </button>\n )}\n\n {/* Image */}\n {previewIndex !== null && (\n <img\n src={images[previewIndex].url}\n alt={images[previewIndex].alt || `Image ${previewIndex + 1}`}\n className=\"max-w-full max-h-full object-contain\"\n />\n )}\n\n {/* Counter */}\n {previewIndex !== null && (\n <div className=\"absolute bottom-8 left-1/2 -translate-x-1/2 px-4 py-2 rounded-full bg-white/80 text-sm font-medium\">\n {previewIndex + 1} / {images.length}\n </div>\n )}\n </DialogPanel>\n </div>\n </Dialog>\n </>\n )\n}\n"],"names":["PhotoLibrary","images","columns","gap","emptyMessage","onDelete","className","previewIndex","setPreviewIndex","useState","columnClasses","handlePrevious","handleNext","handleDelete","jsx","EmptyData","jsxs","Fragment","cn","image","index","Dialog","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MAAiB,QAAQA,IAAeN,EAAO,SAAS,KACvD,gBAAAa;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,SAASF;AAAA,gBACT,WAAU;AAAA,gBACV,cAAW;AAAA,gBAEX,UAAA,gBAAAE,EAACY,GAAA,EAAiB,WAAU,yBAAA,CAAyB;AAAA,cAAA;AAAA,YAAA;AAAA,YAKxDnB,MAAiB,QAChB,gBAAAO;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,KAAKb,EAAOM,CAAY,EAAE;AAAA,gBAC1B,KAAKN,EAAOM,CAAY,EAAE,OAAO,SAASA,IAAe,CAAC;AAAA,gBAC1D,WAAU;AAAA,cAAA;AAAA,YAAA;AAAA,YAKbA,MAAiB,QAChB,gBAAAS,EAAC,OAAA,EAAI,WAAU,sGACZ,UAAA;AAAA,cAAAT,IAAe;AAAA,cAAE;AAAA,cAAIN,EAAO;AAAA,YAAA,EAAA,CAC/B;AAAA,UAAA,EAAA,CAEJ,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
package/dist/index5.js
CHANGED
package/dist/index50.js
CHANGED
|
@@ -1,59 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "./index3.js";
|
|
3
|
+
const p = {
|
|
4
|
+
default: "bg-slate-100 text-slate-700",
|
|
5
|
+
primary: "bg-primary-500 text-white",
|
|
6
|
+
success: "bg-green-100 text-green-700",
|
|
7
|
+
warning: "bg-amber-100 text-amber-700",
|
|
8
|
+
danger: "bg-red-100 text-red-700",
|
|
9
|
+
info: "bg-blue-100 text-blue-700"
|
|
10
|
+
}, x = {
|
|
11
|
+
sm: "px-2 py-0.5 text-xs",
|
|
12
|
+
md: "px-2.5 py-1 text-sm",
|
|
13
|
+
lg: "px-3 py-1.5 text-base"
|
|
14
|
+
}, y = ({
|
|
15
|
+
label: n,
|
|
16
|
+
variant: i = "default",
|
|
17
|
+
size: a = "md",
|
|
18
|
+
className: l,
|
|
19
|
+
onClick: e,
|
|
20
|
+
backgroundColor: t,
|
|
21
|
+
textColor: r
|
|
22
|
+
}) => {
|
|
23
|
+
const s = t || r ? { backgroundColor: t, color: r } : void 0;
|
|
24
|
+
return /* @__PURE__ */ m(
|
|
25
|
+
"span",
|
|
26
|
+
{
|
|
27
|
+
onClick: e,
|
|
28
|
+
className: o(
|
|
29
|
+
"inline-flex items-center rounded-full font-medium whitespace-nowrap",
|
|
30
|
+
!s && p[i],
|
|
31
|
+
x[a],
|
|
32
|
+
e && "cursor-pointer hover:opacity-80 transition-opacity",
|
|
33
|
+
l
|
|
34
|
+
),
|
|
35
|
+
style: s,
|
|
36
|
+
children: n
|
|
37
|
+
}
|
|
38
|
+
);
|
|
12
39
|
};
|
|
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
|
-
}
|
|
56
40
|
export {
|
|
57
|
-
|
|
41
|
+
y as Pill
|
|
58
42
|
};
|
|
59
43
|
//# 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/Pill/Pill.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface PillProps {\n label: ReactNode\n variant?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n size?: 'sm' | 'md' | 'lg'\n className?: string\n onClick?: (event: React.MouseEvent) => void\n backgroundColor?: string\n textColor?: string\n}\n\nconst variantStyles = {\n default: 'bg-slate-100 text-slate-700',\n primary: 'bg-primary-500 text-white',\n success: 'bg-green-100 text-green-700',\n warning: 'bg-amber-100 text-amber-700',\n danger: 'bg-red-100 text-red-700',\n info: 'bg-blue-100 text-blue-700',\n}\n\nconst sizeStyles = {\n sm: 'px-2 py-0.5 text-xs',\n md: 'px-2.5 py-1 text-sm',\n lg: 'px-3 py-1.5 text-base',\n}\n\nexport const Pill = ({\n label,\n variant = 'default',\n size = 'md',\n className,\n onClick,\n backgroundColor,\n textColor,\n}: PillProps) => {\n const customStyles = backgroundColor || textColor\n ? { backgroundColor, color: textColor }\n : undefined\n\n return (\n <span\n onClick={onClick}\n className={cn(\n 'inline-flex items-center rounded-full font-medium whitespace-nowrap',\n !customStyles && variantStyles[variant],\n sizeStyles[size],\n onClick && 'cursor-pointer hover:opacity-80 transition-opacity',\n className\n )}\n style={customStyles}\n >\n {label}\n </span>\n )\n}\n"],"names":["variantStyles","sizeStyles","Pill","label","variant","size","className","onClick","backgroundColor","textColor","customStyles","jsx","cn"],"mappings":";;AAaA,MAAMA,IAAgB;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AACR,GAEMC,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAO,CAAC;AAAA,EACnB,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AACF,MAAiB;AACf,QAAMC,IAAeF,KAAmBC,IACpC,EAAE,iBAAAD,GAAiB,OAAOC,MAC1B;AAEJ,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAAJ;AAAA,MACA,WAAWK;AAAA,QACT;AAAA,QACA,CAACF,KAAgBV,EAAcI,CAAO;AAAA,QACtCH,EAAWI,CAAI;AAAA,QACfE,KAAW;AAAA,QACXD;AAAA,MAAA;AAAA,MAEF,OAAOI;AAAA,MAEN,UAAAP;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/index51.js
CHANGED
|
@@ -1,19 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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",
|
|
7
11
|
className: i
|
|
8
|
-
}) => /* @__PURE__ */
|
|
12
|
+
}) => /* @__PURE__ */ p(
|
|
9
13
|
"div",
|
|
10
14
|
{
|
|
11
|
-
className:
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
]
|
|
14
42
|
}
|
|
15
43
|
);
|
|
16
44
|
export {
|
|
17
|
-
|
|
45
|
+
h as PrimaryCard
|
|
18
46
|
};
|
|
19
47
|
//# 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/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","jsx"],"mappings":";;AAuBO,MAAMA,IAAc,CAAC;AAAA,EAC1B,MAAMC;AAAA,EACN,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAH,MAAS,OAAO,QAAQ;AAAA,MACxBC;AAAA,IAAA;AAAA,IAGF,UAAA;AAAA,MAAA,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAG,4BAA4BP,KAAeC,KAAeE,MAAa,MAAM,GAC7F,UAAA;AAAA,QAAAL,KAAQ,gBAAAU,EAACV,KAAK,WAAWS,EAAGH,MAAS,OAAO,YAAY,SAAS,GAAG;AAAA,QACrE,gBAAAI,EAAC,QAAA,EAAK,WAAWD,EAAG,iBAAiBH,MAAS,OAAO,YAAY,SAAS,GAAI,UAAAL,EAAA,CAAM;AAAA,MAAA,GACtF;AAAA,MACCC,KACC,gBAAAQ,EAAC,KAAA,EAAE,WAAWD;AAAA,QACZ;AAAA,QACAH,MAAS,OAAO,gBAAgB;AAAA,QAC/BD,KAAaF,KAAeC,IAAcE,MAAS,OAAO,SAAS,SAAU;AAAA,MAAA,GAE7E,UAAAJ,GACH;AAAA,MAEDG,MAEGF,KAAeC,IACjB,gBAAAM;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAASN;AAAA,UACT,WAAWK;AAAA,YACT;AAAA,YACAH,MAAS,OAAO,wBAAwB;AAAA,UAAA;AAAA,UAGzC,UAAAH;AAAA,QAAA;AAAA,MAAA,IAED;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|
package/dist/index52.js
CHANGED
|
@@ -1,68 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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,
|
|
9
20
|
className: m
|
|
10
21
|
}) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
className:
|
|
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
|
-
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
|
-
);
|
|
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
|
+
] });
|
|
64
55
|
}
|
|
65
56
|
export {
|
|
66
|
-
|
|
57
|
+
g as Progress
|
|
67
58
|
};
|
|
68
59
|
//# 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/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","c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53.js
CHANGED
|
@@ -1,57 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
};
|
|
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
|
+
);
|
|
54
16
|
export {
|
|
55
|
-
|
|
17
|
+
p as QuickActions
|
|
56
18
|
};
|
|
57
19
|
//# sourceMappingURL=index53.js.map
|
package/dist/index53.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index53.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index53.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/index54.js
CHANGED
|
@@ -1,40 +1,68 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { cn as c } from "./index3.js";
|
|
3
|
-
|
|
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
|
-
)
|
|
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",
|
|
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
|
+
}
|
|
37
65
|
export {
|
|
38
|
-
|
|
66
|
+
o as RadioGroup
|
|
39
67
|
};
|
|
40
68
|
//# sourceMappingURL=index54.js.map
|