@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/index28.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const n = o.target.files;
|
|
17
|
-
n && n.length > 0 && u(Array.from(n)), r.current && (r.current.value = "");
|
|
18
|
-
}, f = () => {
|
|
19
|
-
var o;
|
|
20
|
-
(o = r.current) == null || o.click();
|
|
21
|
-
};
|
|
22
|
-
return p === "dropzone" ? /* @__PURE__ */ l("div", { className: i("relative", m), children: [
|
|
23
|
-
/* @__PURE__ */ l(
|
|
24
|
-
"div",
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as l } from "react";
|
|
3
|
+
import { Menu as d, MenuButton as m, Transition as f, MenuItems as p, MenuItem as h } from "@headlessui/react";
|
|
4
|
+
import { ChevronDownIcon as g } from "@heroicons/react/20/solid";
|
|
5
|
+
import { cn as o } from "./index3.js";
|
|
6
|
+
function N({
|
|
7
|
+
trigger: r,
|
|
8
|
+
items: n,
|
|
9
|
+
align: i = "left",
|
|
10
|
+
className: c
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ a(d, { as: "div", className: o("relative inline-block text-left", c), children: [
|
|
13
|
+
/* @__PURE__ */ t(m, { as: l, children: r }),
|
|
14
|
+
/* @__PURE__ */ t(
|
|
15
|
+
f,
|
|
25
16
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
),
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
"input",
|
|
66
|
-
{
|
|
67
|
-
ref: r,
|
|
68
|
-
type: "file",
|
|
69
|
-
accept: s,
|
|
70
|
-
multiple: c,
|
|
71
|
-
onChange: d,
|
|
72
|
-
disabled: t,
|
|
73
|
-
className: "hidden"
|
|
17
|
+
as: l,
|
|
18
|
+
enter: "transition ease-out duration-100",
|
|
19
|
+
enterFrom: "transform opacity-0 scale-95",
|
|
20
|
+
enterTo: "transform opacity-100 scale-100",
|
|
21
|
+
leave: "transition ease-in duration-75",
|
|
22
|
+
leaveFrom: "transform opacity-100 scale-100",
|
|
23
|
+
leaveTo: "transform opacity-0 scale-95",
|
|
24
|
+
children: /* @__PURE__ */ t(
|
|
25
|
+
p,
|
|
26
|
+
{
|
|
27
|
+
className: o(
|
|
28
|
+
"absolute z-10 mt-2 w-56 origin-top-right",
|
|
29
|
+
"bg-white rounded-lg border border-slate-200 shadow-lg",
|
|
30
|
+
"py-1 focus:outline-none",
|
|
31
|
+
i === "right" ? "right-0" : "left-0"
|
|
32
|
+
),
|
|
33
|
+
children: n.map((e) => /* @__PURE__ */ t(h, { disabled: e.disabled, children: ({ active: u, disabled: s }) => /* @__PURE__ */ a(
|
|
34
|
+
"button",
|
|
35
|
+
{
|
|
36
|
+
type: "button",
|
|
37
|
+
onClick: e.onClick,
|
|
38
|
+
disabled: s,
|
|
39
|
+
className: o(
|
|
40
|
+
"w-full flex items-center gap-2 px-4 py-2 text-sm text-left",
|
|
41
|
+
"transition-colors duration-150",
|
|
42
|
+
u && "bg-slate-50",
|
|
43
|
+
s && "opacity-50 cursor-not-allowed",
|
|
44
|
+
e.danger ? "text-red-600 hover:bg-red-50" : "text-slate-700"
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
e.icon && /* @__PURE__ */ t("span", { className: "flex-shrink-0 w-5 h-5", children: e.icon }),
|
|
48
|
+
e.label
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
) }, e.key))
|
|
52
|
+
}
|
|
53
|
+
)
|
|
74
54
|
}
|
|
75
55
|
)
|
|
76
56
|
] });
|
|
77
|
-
}
|
|
57
|
+
}
|
|
58
|
+
function k({ children: r, className: n }) {
|
|
59
|
+
return /* @__PURE__ */ a(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
className: o(
|
|
64
|
+
"inline-flex items-center gap-2 px-4 py-2",
|
|
65
|
+
"bg-white border border-slate-300 rounded-lg",
|
|
66
|
+
"text-sm font-medium text-slate-700",
|
|
67
|
+
"hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",
|
|
68
|
+
n
|
|
69
|
+
),
|
|
70
|
+
children: [
|
|
71
|
+
r,
|
|
72
|
+
/* @__PURE__ */ t(g, { className: "h-5 w-5 text-slate-400" })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
N as Dropdown,
|
|
79
|
+
k as DropdownButton
|
|
80
80
|
};
|
|
81
81
|
//# sourceMappingURL=index28.js.map
|
package/dist/index28.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index28.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index28.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import { Fragment, type ReactNode } from 'react'\nimport { Menu, MenuButton, MenuItems, MenuItem, Transition } from '@headlessui/react'\nimport { ChevronDownIcon } from '@heroicons/react/20/solid'\nimport { cn } from '@/lib/utils'\n\nexport interface DropdownItem {\n key: string\n label: ReactNode\n onClick?: () => void\n icon?: ReactNode\n disabled?: boolean\n danger?: boolean\n}\n\nexport interface DropdownProps {\n trigger: ReactNode\n items: DropdownItem[]\n align?: 'left' | 'right'\n className?: string\n}\n\nexport function Dropdown({\n trigger,\n items,\n align = 'left',\n className,\n}: DropdownProps) {\n return (\n <Menu as=\"div\" className={cn('relative inline-block text-left', className)}>\n <MenuButton as={Fragment}>{trigger}</MenuButton>\n <Transition\n as={Fragment}\n enter=\"transition ease-out duration-100\"\n enterFrom=\"transform opacity-0 scale-95\"\n enterTo=\"transform opacity-100 scale-100\"\n leave=\"transition ease-in duration-75\"\n leaveFrom=\"transform opacity-100 scale-100\"\n leaveTo=\"transform opacity-0 scale-95\"\n >\n <MenuItems\n className={cn(\n 'absolute z-10 mt-2 w-56 origin-top-right',\n 'bg-white rounded-lg border border-slate-200 shadow-lg',\n 'py-1 focus:outline-none',\n align === 'right' ? 'right-0' : 'left-0'\n )}\n >\n {items.map((item) => (\n <MenuItem key={item.key} disabled={item.disabled}>\n {({ active, disabled }) => (\n <button\n type=\"button\"\n onClick={item.onClick}\n disabled={disabled}\n className={cn(\n 'w-full flex items-center gap-2 px-4 py-2 text-sm text-left',\n 'transition-colors duration-150',\n active && 'bg-slate-50',\n disabled && 'opacity-50 cursor-not-allowed',\n item.danger\n ? 'text-red-600 hover:bg-red-50'\n : 'text-slate-700'\n )}\n >\n {item.icon && (\n <span className=\"flex-shrink-0 w-5 h-5\">{item.icon}</span>\n )}\n {item.label}\n </button>\n )}\n </MenuItem>\n ))}\n </MenuItems>\n </Transition>\n </Menu>\n )\n}\n\n// Convenience component for the default dropdown button trigger\nexport interface DropdownButtonProps {\n children: ReactNode\n className?: string\n}\n\nexport function DropdownButton({ children, className }: DropdownButtonProps) {\n return (\n <button\n type=\"button\"\n className={cn(\n 'inline-flex items-center gap-2 px-4 py-2',\n 'bg-white border border-slate-300 rounded-lg',\n 'text-sm font-medium text-slate-700',\n 'hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2',\n className\n )}\n >\n {children}\n <ChevronDownIcon className=\"h-5 w-5 text-slate-400\" />\n </button>\n )\n}\n"],"names":["Dropdown","trigger","items","align","className","jsxs","Menu","cn","jsx","MenuButton","Fragment","Transition","MenuItems","item","MenuItem","active","disabled","DropdownButton","children","ChevronDownIcon"],"mappings":";;;;;AAqBO,SAASA,EAAS;AAAA,EACvB,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AACF,GAAkB;AAChB,SACE,gBAAAC,EAACC,KAAK,IAAG,OAAM,WAAWC,EAAG,mCAAmCH,CAAS,GACvE,UAAA;AAAA,IAAA,gBAAAI,EAACC,GAAA,EAAW,IAAIC,GAAW,UAAAT,GAAQ;AAAA,IACnC,gBAAAO;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,IAAID;AAAA,QACJ,OAAM;AAAA,QACN,WAAU;AAAA,QACV,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,WAAU;AAAA,QACV,SAAQ;AAAA,QAER,UAAA,gBAAAF;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,WAAWL;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACAJ,MAAU,UAAU,YAAY;AAAA,YAAA;AAAA,YAGjC,UAAAD,EAAM,IAAI,CAACW,MACV,gBAAAL,EAACM,GAAA,EAAwB,UAAUD,EAAK,UACrC,UAAA,CAAC,EAAE,QAAAE,GAAQ,UAAAC,QACV,gBAAAX;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAASQ,EAAK;AAAA,gBACd,UAAAG;AAAA,gBACA,WAAWT;AAAA,kBACT;AAAA,kBACA;AAAA,kBACAQ,KAAU;AAAA,kBACVC,KAAY;AAAA,kBACZH,EAAK,SACD,iCACA;AAAA,gBAAA;AAAA,gBAGL,UAAA;AAAA,kBAAAA,EAAK,QACJ,gBAAAL,EAAC,QAAA,EAAK,WAAU,yBAAyB,YAAK,MAAK;AAAA,kBAEpDK,EAAK;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA,EACR,GApBWA,EAAK,GAsBpB,CACD;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;AAQO,SAASI,EAAe,EAAE,UAAAC,GAAU,WAAAd,KAAkC;AAC3E,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAH;AAAA,MAAA;AAAA,MAGD,UAAA;AAAA,QAAAc;AAAA,QACD,gBAAAV,EAACW,GAAA,EAAgB,WAAU,yBAAA,CAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1D;"}
|
package/dist/index29.js
CHANGED
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
lg: "w-12 h-12"
|
|
7
|
-
}, l = {
|
|
8
|
-
default: "bg-transparent text-slate-700 hover:bg-slate-100 hover:text-slate-900",
|
|
9
|
-
primary: "bg-primary-500 text-white hover:bg-primary-600",
|
|
10
|
-
ghost: "bg-transparent text-slate-500 hover:text-slate-700"
|
|
11
|
-
}, d = ({
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "./index3.js";
|
|
3
|
+
const n = ({
|
|
4
|
+
message: s,
|
|
5
|
+
title: r = "There's Nothing Here!",
|
|
12
6
|
icon: t,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}) => /* @__PURE__ */ s(
|
|
18
|
-
"button",
|
|
7
|
+
fullBlock: m = !1,
|
|
8
|
+
className: l
|
|
9
|
+
}) => /* @__PURE__ */ a(
|
|
10
|
+
"div",
|
|
19
11
|
{
|
|
20
|
-
className:
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
25
|
-
i[e],
|
|
26
|
-
l[r],
|
|
27
|
-
o
|
|
12
|
+
className: x(
|
|
13
|
+
"flex flex-col items-center justify-center py-12 px-6",
|
|
14
|
+
m && "min-h-[400px]",
|
|
15
|
+
l
|
|
28
16
|
),
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
children: [
|
|
18
|
+
t && /* @__PURE__ */ e("div", { className: "w-16 h-16 text-primary-200 mb-4", children: t }),
|
|
19
|
+
/* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-slate-400 mb-2", children: r }),
|
|
20
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-slate-400 text-center max-w-[75%]", children: s })
|
|
21
|
+
]
|
|
31
22
|
}
|
|
32
23
|
);
|
|
33
24
|
export {
|
|
34
|
-
|
|
25
|
+
n as EmptyData
|
|
35
26
|
};
|
|
36
27
|
//# sourceMappingURL=index29.js.map
|
package/dist/index29.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index29.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index29.js","sources":["../src/components/EmptyData/EmptyData.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface EmptyDataProps {\n message: string\n title?: string\n icon?: ReactNode\n fullBlock?: boolean\n className?: string\n}\n\nexport const EmptyData = ({\n message,\n title = \"There's Nothing Here!\",\n icon,\n fullBlock = false,\n className,\n}: EmptyDataProps) => {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center py-12 px-6',\n fullBlock && 'min-h-[400px]',\n className\n )}\n >\n {icon && (\n <div className=\"w-16 h-16 text-primary-200 mb-4\">\n {icon}\n </div>\n )}\n\n <h3 className=\"text-lg font-semibold text-slate-400 mb-2\">\n {title}\n </h3>\n\n <p className=\"text-sm text-slate-400 text-center max-w-[75%]\">\n {message}\n </p>\n </div>\n )\n}\n"],"names":["EmptyData","message","title","icon","fullBlock","className","jsxs","cn","jsx"],"mappings":";;AAWO,MAAMA,IAAY,CAAC;AAAA,EACxB,SAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AACF,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAH,KAAa;AAAA,MACbC;AAAA,IAAA;AAAA,IAGD,UAAA;AAAA,MAAAF,KACC,gBAAAK,EAAC,OAAA,EAAI,WAAU,mCACZ,UAAAL,GACH;AAAA,MAGF,gBAAAK,EAAC,MAAA,EAAG,WAAU,6CACX,UAAAN,GACH;AAAA,MAEA,gBAAAM,EAAC,KAAA,EAAE,WAAU,kDACV,UAAAP,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|
package/dist/index3.js
CHANGED
package/dist/index30.js
CHANGED
|
@@ -1,95 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h } from "react";
|
|
3
3
|
import { cn as i } from "./index3.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
alt: o = "",
|
|
15
|
-
fallbackSrc: f = "/png/No_Img.png",
|
|
16
|
-
enablePreview: t = !0,
|
|
17
|
-
aspectRatio: u = "auto",
|
|
18
|
-
objectFit: s = "cover",
|
|
19
|
-
className: d,
|
|
20
|
-
imageClassName: p,
|
|
21
|
-
children: h
|
|
4
|
+
import { CloudArrowUpIcon as x, PlusIcon as v } from "@heroicons/react/24/outline";
|
|
5
|
+
import { Button as y } from "./index19.js";
|
|
6
|
+
const w = ({
|
|
7
|
+
onFilesSelected: u,
|
|
8
|
+
accept: s,
|
|
9
|
+
multiple: c = !0,
|
|
10
|
+
label: a = "Add document",
|
|
11
|
+
variant: p = "button",
|
|
12
|
+
disabled: t = !1,
|
|
13
|
+
className: m
|
|
22
14
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
const r = h(null), d = (o) => {
|
|
16
|
+
const n = o.target.files;
|
|
17
|
+
n && n.length > 0 && u(Array.from(n)), r.current && (r.current.value = "");
|
|
18
|
+
}, f = () => {
|
|
19
|
+
var o;
|
|
20
|
+
(o = r.current) == null || o.click();
|
|
27
21
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
22
|
+
return p === "dropzone" ? /* @__PURE__ */ l("div", { className: i("relative", m), children: [
|
|
23
|
+
/* @__PURE__ */ l(
|
|
30
24
|
"div",
|
|
31
25
|
{
|
|
26
|
+
onClick: f,
|
|
32
27
|
className: i(
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
"flex flex-col items-center justify-center",
|
|
29
|
+
"border-2 border-dashed border-slate-300 rounded-lg",
|
|
30
|
+
"py-12 px-6 cursor-pointer",
|
|
31
|
+
"hover:border-primary-500 hover:bg-primary-50/50",
|
|
32
|
+
"transition-colors",
|
|
33
|
+
t && "opacity-50 cursor-not-allowed"
|
|
37
34
|
),
|
|
38
|
-
onClick: N,
|
|
39
35
|
children: [
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
src: n,
|
|
44
|
-
alt: o,
|
|
45
|
-
onError: x,
|
|
46
|
-
className: i(
|
|
47
|
-
"w-full h-full",
|
|
48
|
-
s === "cover" && "object-cover",
|
|
49
|
-
s === "contain" && "object-contain",
|
|
50
|
-
s === "fill" && "object-fill",
|
|
51
|
-
s === "none" && "object-none",
|
|
52
|
-
p
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
h
|
|
36
|
+
/* @__PURE__ */ e(x, { className: "w-16 h-16 text-slate-400 mb-4" }),
|
|
37
|
+
/* @__PURE__ */ e("span", { className: "text-slate-600 font-medium", children: a }),
|
|
38
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-slate-400 mt-1", children: "Click to browse files" })
|
|
57
39
|
]
|
|
58
40
|
}
|
|
59
41
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
"input",
|
|
62
44
|
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
45
|
+
ref: r,
|
|
46
|
+
type: "file",
|
|
47
|
+
accept: s,
|
|
48
|
+
multiple: c,
|
|
49
|
+
onChange: d,
|
|
50
|
+
disabled: t,
|
|
51
|
+
className: "hidden"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] }) : /* @__PURE__ */ l("div", { className: i("relative inline-block", m), children: [
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
y,
|
|
57
|
+
{
|
|
58
|
+
onClick: f,
|
|
59
|
+
disabled: t,
|
|
60
|
+
leftIcon: /* @__PURE__ */ e(v, { className: "w-5 h-5" }),
|
|
61
|
+
children: a
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ e(
|
|
65
|
+
"input",
|
|
66
|
+
{
|
|
67
|
+
ref: r,
|
|
68
|
+
type: "file",
|
|
69
|
+
accept: s,
|
|
70
|
+
multiple: c,
|
|
71
|
+
onChange: d,
|
|
72
|
+
disabled: t,
|
|
73
|
+
className: "hidden"
|
|
88
74
|
}
|
|
89
75
|
)
|
|
90
76
|
] });
|
|
91
77
|
};
|
|
92
78
|
export {
|
|
93
|
-
|
|
79
|
+
w as FileUploader
|
|
94
80
|
};
|
|
95
81
|
//# sourceMappingURL=index30.js.map
|
package/dist/index30.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index30.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index30.js","sources":["../src/components/FileUploader/FileUploader.tsx"],"sourcesContent":["import { useRef, type ChangeEvent } from 'react'\nimport { cn } from '@/lib/utils'\nimport { CloudArrowUpIcon, PlusIcon } from '@heroicons/react/24/outline'\nimport { Button } from '../Button/Button'\n\nexport interface FileUploaderProps {\n onFilesSelected: (files: File[]) => void\n accept?: string\n multiple?: boolean\n label?: string\n variant?: 'button' | 'dropzone'\n disabled?: boolean\n className?: string\n}\n\nexport const FileUploader = ({\n onFilesSelected,\n accept,\n multiple = true,\n label = 'Add document',\n variant = 'button',\n disabled = false,\n className,\n}: FileUploaderProps) => {\n const inputRef = useRef<HTMLInputElement>(null)\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const files = e.target.files\n if (files && files.length > 0) {\n onFilesSelected(Array.from(files))\n }\n // Reset input so the same file can be selected again\n if (inputRef.current) {\n inputRef.current.value = ''\n }\n }\n\n const handleClick = () => {\n inputRef.current?.click()\n }\n\n if (variant === 'dropzone') {\n return (\n <div className={cn('relative', className)}>\n <div\n onClick={handleClick}\n className={cn(\n 'flex flex-col items-center justify-center',\n 'border-2 border-dashed border-slate-300 rounded-lg',\n 'py-12 px-6 cursor-pointer',\n 'hover:border-primary-500 hover:bg-primary-50/50',\n 'transition-colors',\n disabled && 'opacity-50 cursor-not-allowed'\n )}\n >\n <CloudArrowUpIcon className=\"w-16 h-16 text-slate-400 mb-4\" />\n <span className=\"text-slate-600 font-medium\">{label}</span>\n <span className=\"text-sm text-slate-400 mt-1\">\n Click to browse files\n </span>\n </div>\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n onChange={handleChange}\n disabled={disabled}\n className=\"hidden\"\n />\n </div>\n )\n }\n\n return (\n <div className={cn('relative inline-block', className)}>\n <Button\n onClick={handleClick}\n disabled={disabled}\n leftIcon={<PlusIcon className=\"w-5 h-5\" />}\n >\n {label}\n </Button>\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n onChange={handleChange}\n disabled={disabled}\n className=\"hidden\"\n />\n </div>\n )\n}\n"],"names":["FileUploader","onFilesSelected","accept","multiple","label","variant","disabled","className","inputRef","useRef","handleChange","e","files","handleClick","_a","cn","jsxs","jsx","CloudArrowUpIcon","Button","PlusIcon"],"mappings":";;;;;AAeO,MAAMA,IAAe,CAAC;AAAA,EAC3B,iBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,WAAAC;AACF,MAAyB;AACvB,QAAMC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAqC;AACzD,UAAMC,IAAQD,EAAE,OAAO;AACvB,IAAIC,KAASA,EAAM,SAAS,KAC1BX,EAAgB,MAAM,KAAKW,CAAK,CAAC,GAG/BJ,EAAS,YACXA,EAAS,QAAQ,QAAQ;AAAA,EAE7B,GAEMK,IAAc,MAAM;;AACxB,KAAAC,IAAAN,EAAS,YAAT,QAAAM,EAAkB;AAAA,EACpB;AAEA,SAAIT,MAAY,+BAEX,OAAA,EAAI,WAAWU,EAAG,YAAYR,CAAS,GACtC,UAAA;AAAA,IAAA,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASH;AAAA,QACT,WAAWE;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACAT,KAAY;AAAA,QAAA;AAAA,QAGd,UAAA;AAAA,UAAA,gBAAAW,EAACC,GAAA,EAAiB,WAAU,gCAAA,CAAgC;AAAA,UAC5D,gBAAAD,EAAC,QAAA,EAAK,WAAU,8BAA8B,UAAAb,GAAM;AAAA,UACpD,gBAAAa,EAAC,QAAA,EAAK,WAAU,+BAA8B,UAAA,wBAAA,CAE9C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKT;AAAA,QACL,MAAK;AAAA,QACL,QAAAN;AAAA,QACA,UAAAC;AAAA,QACA,UAAUO;AAAA,QACV,UAAAJ;AAAA,QACA,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF,sBAKD,OAAA,EAAI,WAAWS,EAAG,yBAAyBR,CAAS,GACnD,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,SAASN;AAAA,QACT,UAAAP;AAAA,QACA,UAAU,gBAAAW,EAACG,GAAA,EAAS,WAAU,UAAA,CAAU;AAAA,QAEvC,UAAAhB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAa;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKT;AAAA,QACL,MAAK;AAAA,QACL,QAAAN;AAAA,QACA,UAAAC;AAAA,QACA,UAAUO;AAAA,QACV,UAAAJ;AAAA,QACA,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;"}
|
package/dist/index31.js
CHANGED
|
@@ -1,63 +1,36 @@
|
|
|
1
|
-
import { jsx as s
|
|
2
|
-
import { cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"flex items-center justify-center",
|
|
18
|
-
e ? "bg-primary-50" : "bg-slate-200"
|
|
19
|
-
),
|
|
20
|
-
style: l && !e ? { backgroundImage: `url(${l})` } : void 0,
|
|
21
|
-
onClick: n,
|
|
22
|
-
children: e && /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2", children: [
|
|
23
|
-
/* @__PURE__ */ s(m, { className: "w-8 h-8 text-primary-500" }),
|
|
24
|
-
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-slate-900", children: r })
|
|
25
|
-
] })
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
return t && !e ? /* @__PURE__ */ s("li", { className: "flex flex-col", children: /* @__PURE__ */ c("a", { href: t, className: "no-underline", children: [
|
|
29
|
-
o,
|
|
30
|
-
/* @__PURE__ */ s("span", { className: "text-sm font-semibold text-slate-900 truncate", children: r })
|
|
31
|
-
] }) }) : /* @__PURE__ */ c("li", { className: "flex flex-col", children: [
|
|
32
|
-
o,
|
|
33
|
-
!e && /* @__PURE__ */ s("span", { className: "text-sm font-semibold text-slate-900 truncate", children: r })
|
|
34
|
-
] });
|
|
35
|
-
}, u = ({
|
|
36
|
-
items: a,
|
|
37
|
-
columns: n = 4,
|
|
38
|
-
gap: r = 36,
|
|
39
|
-
onItemClick: l,
|
|
40
|
-
className: t
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as a } from "./index3.js";
|
|
3
|
+
const i = {
|
|
4
|
+
sm: "w-8 h-8",
|
|
5
|
+
md: "w-10 h-10",
|
|
6
|
+
lg: "w-12 h-12"
|
|
7
|
+
}, l = {
|
|
8
|
+
default: "bg-transparent text-slate-700 hover:bg-slate-100 hover:text-slate-900",
|
|
9
|
+
primary: "bg-primary-500 text-white hover:bg-primary-600",
|
|
10
|
+
ghost: "bg-transparent text-slate-500 hover:text-slate-700"
|
|
11
|
+
}, d = ({
|
|
12
|
+
icon: t,
|
|
13
|
+
size: e = "md",
|
|
14
|
+
variant: r = "default",
|
|
15
|
+
className: o,
|
|
16
|
+
...n
|
|
41
17
|
}) => /* @__PURE__ */ s(
|
|
42
|
-
"
|
|
18
|
+
"button",
|
|
43
19
|
{
|
|
44
|
-
className:
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
className: a(
|
|
21
|
+
"inline-flex items-center justify-center rounded-full",
|
|
22
|
+
"border-none cursor-pointer transition-colors duration-200",
|
|
23
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",
|
|
24
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
25
|
+
i[e],
|
|
26
|
+
l[r],
|
|
27
|
+
o
|
|
48
28
|
),
|
|
49
|
-
|
|
50
|
-
children:
|
|
51
|
-
p,
|
|
52
|
-
{
|
|
53
|
-
item: e,
|
|
54
|
-
onClick: () => l == null ? void 0 : l(e)
|
|
55
|
-
},
|
|
56
|
-
e.id || e.name
|
|
57
|
-
))
|
|
29
|
+
...n,
|
|
30
|
+
children: t
|
|
58
31
|
}
|
|
59
32
|
);
|
|
60
33
|
export {
|
|
61
|
-
|
|
34
|
+
d as IconButton
|
|
62
35
|
};
|
|
63
36
|
//# sourceMappingURL=index31.js.map
|
package/dist/index31.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index31.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index31.js","sources":["../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import { type ReactElement, type ButtonHTMLAttributes } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n icon: ReactElement\n size?: 'sm' | 'md' | 'lg'\n variant?: 'default' | 'primary' | 'ghost'\n}\n\nconst sizeStyles = {\n sm: 'w-8 h-8',\n md: 'w-10 h-10',\n lg: 'w-12 h-12',\n}\n\nconst variantStyles = {\n default: 'bg-transparent text-slate-700 hover:bg-slate-100 hover:text-slate-900',\n primary: 'bg-primary-500 text-white hover:bg-primary-600',\n ghost: 'bg-transparent text-slate-500 hover:text-slate-700',\n}\n\nexport const IconButton = ({\n icon,\n size = 'md',\n variant = 'default',\n className,\n ...props\n}: IconButtonProps) => {\n return (\n <button\n className={cn(\n 'inline-flex items-center justify-center rounded-full',\n 'border-none cursor-pointer transition-colors duration-200',\n 'focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n sizeStyles[size],\n variantStyles[variant],\n className\n )}\n {...props}\n >\n {icon}\n </button>\n )\n}\n"],"names":["sizeStyles","variantStyles","IconButton","icon","size","variant","className","props","jsx","cn"],"mappings":";;AASA,MAAMA,IAAa;AAAA,EACjB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAgB;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT,GAEaC,IAAa,CAAC;AAAA,EACzB,MAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACAT,EAAWI,CAAI;AAAA,MACfH,EAAcI,CAAO;AAAA,MACrBC;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEH,UAAAJ;AAAA,EAAA;AAAA;"}
|