prometeo-design-system 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar.d.ts +4 -0
- package/dist/Avatar.es.js +52 -0
- package/dist/Button.d.ts +6 -0
- package/dist/Button.es.js +147 -0
- package/dist/CardProfile-BZajBGbO.js +253 -0
- package/dist/CardProfile.d.ts +2 -0
- package/dist/CardProfile.es.js +4 -0
- package/dist/CheckBox.d.ts +6 -0
- package/dist/CheckBox.es.js +105 -0
- package/dist/CheckboxFormik.d.ts +6 -0
- package/dist/CheckboxFormik.es.js +88 -0
- package/dist/DialogModal.d.ts +6 -0
- package/dist/DialogModal.es.js +52 -0
- package/dist/DrawerDesktop.d.ts +6 -0
- package/dist/DrawerDesktop.es.js +67 -0
- package/dist/DrawerMobile.d.ts +6 -0
- package/dist/DrawerMobile.es.js +43 -0
- package/dist/DropZone.d.ts +2 -0
- package/dist/DropZone.es.js +86 -0
- package/dist/Header.d.ts +6 -0
- package/dist/Header.es.js +23 -0
- package/dist/Icons.d.ts +2 -0
- package/dist/Icons.es.js +516 -0
- package/dist/Input.d.ts +6 -0
- package/dist/Input.es.js +200 -0
- package/dist/InputFormik.d.ts +6 -0
- package/dist/InputFormik.es.js +95 -0
- package/dist/LayoutGeneric-jDE96L2N.js +24 -0
- package/dist/LayoutGeneric.d.ts +6 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.d.ts +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/Menu.d.ts +2 -0
- package/dist/Menu.es.js +76 -0
- package/dist/OtpInput.d.ts +6 -0
- package/dist/OtpInput.es.js +244 -0
- package/dist/Pagination.d.ts +6 -0
- package/dist/Pagination.es.js +97 -0
- package/dist/ProgressBar.d.ts +6 -0
- package/dist/ProgressBar.es.js +27 -0
- package/dist/Select.d.ts +6 -0
- package/dist/Select.es.js +203 -0
- package/dist/Spinner.d.ts +6 -0
- package/dist/Spinner.es.js +52 -0
- package/dist/SwipeContainer.d.ts +4 -0
- package/dist/SwipeContainer.es.js +185 -0
- package/dist/TabLinks.d.ts +4 -0
- package/dist/TabLinks.es.js +83 -0
- package/dist/Table.d.ts +2 -0
- package/dist/Table.es.js +121 -0
- package/dist/TextArea.d.ts +4 -0
- package/dist/TextArea.es.js +52 -0
- package/dist/Tooltip.d.ts +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/cn-B6yFEsav.js +8 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/exports/Avatar.d.ts +1 -0
- package/dist/exports/Button.d.ts +2 -0
- package/dist/exports/CardProfile.d.ts +2 -0
- package/dist/exports/CheckBox.d.ts +2 -0
- package/dist/exports/CheckboxFormik.d.ts +2 -0
- package/dist/exports/DialogModal.d.ts +2 -0
- package/dist/exports/DrawerDesktop.d.ts +2 -0
- package/dist/exports/DrawerMobile.d.ts +2 -0
- package/dist/exports/DropZone.d.ts +1 -0
- package/dist/exports/Header.d.ts +2 -0
- package/dist/exports/Icons.d.ts +1 -0
- package/dist/exports/Input.d.ts +2 -0
- package/dist/exports/InputFormik.d.ts +2 -0
- package/dist/exports/LayoutGeneric.d.ts +2 -0
- package/dist/exports/Logo.d.ts +1 -0
- package/dist/exports/Menu.d.ts +2 -0
- package/dist/exports/OtpInput.d.ts +2 -0
- package/dist/exports/Pagination.d.ts +2 -0
- package/dist/exports/ProgressBar.d.ts +2 -0
- package/dist/exports/Select.d.ts +2 -0
- package/dist/exports/Spinner.d.ts +2 -0
- package/dist/exports/SwipeContainer.d.ts +1 -0
- package/dist/exports/TabLinks.d.ts +1 -0
- package/dist/exports/Table.d.ts +1 -0
- package/dist/exports/TextArea.d.ts +1 -0
- package/dist/exports/Tooltip.d.ts +2 -0
- package/dist/index-BOQuZ0gG.js +34 -0
- package/dist/jsx-runtime-ByW6EXIE.js +283 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +1866 -4935
- package/package.json +119 -4
- package/dist/prometeo-design-system.umd.js +0 -113
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { useState as d, useRef as D, useEffect as L } from "react";
|
|
4
|
+
const O = ({
|
|
5
|
+
children: x,
|
|
6
|
+
className: P,
|
|
7
|
+
showIndicators: R = !0,
|
|
8
|
+
showControls: W = !0,
|
|
9
|
+
// Por defecto mostrar controles
|
|
10
|
+
autoPlay: k = !1,
|
|
11
|
+
autoPlayInterval: $ = 3e3,
|
|
12
|
+
onSwipe: m,
|
|
13
|
+
threshold: Y = 50,
|
|
14
|
+
disabled: l = !1,
|
|
15
|
+
cardWidth: f,
|
|
16
|
+
// Ancho personalizado de tarjetas
|
|
17
|
+
visibleCards: r,
|
|
18
|
+
// Número de tarjetas visibles
|
|
19
|
+
width: p = "100%",
|
|
20
|
+
// Ancho por defecto
|
|
21
|
+
height: v = "300px",
|
|
22
|
+
// Alto por defecto
|
|
23
|
+
gap: g = 16
|
|
24
|
+
// Separación por defecto entre cards
|
|
25
|
+
}) => {
|
|
26
|
+
const [n, h] = d(0), [u, N] = d(!1), [T, B] = d({ x: 0, y: 0 }), [I, w] = d({ x: 0, y: 0 }), y = D(null), c = D(null), s = x.length, C = f ? typeof f == "number" ? `${f}px` : f : r && r > 0 ? `${100 / r}%` : "100%";
|
|
27
|
+
L(() => (k && s > 1 && !u && (c.current = setInterval(() => {
|
|
28
|
+
h((e) => (e + 1) % s);
|
|
29
|
+
}, $)), () => {
|
|
30
|
+
c.current && clearInterval(c.current);
|
|
31
|
+
}), [k, $, s, u]), L(() => {
|
|
32
|
+
u && c.current && clearInterval(c.current);
|
|
33
|
+
}, [u]);
|
|
34
|
+
const S = (e, t) => {
|
|
35
|
+
l || (N(!0), B({ x: e, y: t }), w({ x: e, y: t }));
|
|
36
|
+
}, E = (e, t) => {
|
|
37
|
+
!u || l || w({ x: e, y: t });
|
|
38
|
+
}, X = () => {
|
|
39
|
+
if (!u || l) return;
|
|
40
|
+
const e = I.x - T.x;
|
|
41
|
+
if (Math.abs(e) > Y) {
|
|
42
|
+
if (e > 0 && n > 0) {
|
|
43
|
+
const a = n - 1;
|
|
44
|
+
h(a), m?.(a);
|
|
45
|
+
} else if (e < 0 && n < s - 1) {
|
|
46
|
+
const a = n + 1;
|
|
47
|
+
h(a), m?.(a);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
N(!1), w({ x: 0, y: 0 });
|
|
51
|
+
}, U = (e) => {
|
|
52
|
+
e.preventDefault(), S(e.clientX, e.clientY);
|
|
53
|
+
}, _ = (e) => {
|
|
54
|
+
E(e.clientX, e.clientY);
|
|
55
|
+
}, b = () => {
|
|
56
|
+
X();
|
|
57
|
+
}, q = (e) => {
|
|
58
|
+
const t = e.touches[0];
|
|
59
|
+
S(t.clientX, t.clientY);
|
|
60
|
+
}, z = (e) => {
|
|
61
|
+
const t = e.touches[0];
|
|
62
|
+
E(t.clientX, t.clientY);
|
|
63
|
+
}, A = () => {
|
|
64
|
+
X();
|
|
65
|
+
}, j = (e) => {
|
|
66
|
+
l || e < 0 || e >= s || (h(e), m?.(e));
|
|
67
|
+
}, F = () => {
|
|
68
|
+
const e = I.x - T.x;
|
|
69
|
+
let t = 0;
|
|
70
|
+
if (r && r > 0) {
|
|
71
|
+
const M = y.current ? (y.current.offsetWidth - g * (r - 1)) / r : 0;
|
|
72
|
+
t = n * (M + g);
|
|
73
|
+
} else
|
|
74
|
+
t = n * 100;
|
|
75
|
+
const a = r && r > 0 ? `translateX(-${t}px)` : `translateX(-${n * 100}%)`;
|
|
76
|
+
if (u) {
|
|
77
|
+
const M = `translateX(${e}px)`;
|
|
78
|
+
return `${a} ${M}`;
|
|
79
|
+
}
|
|
80
|
+
return a;
|
|
81
|
+
};
|
|
82
|
+
return s === 0 ? null : /* @__PURE__ */ o.jsxs(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: i("relative overflow-hidden", P),
|
|
86
|
+
style: {
|
|
87
|
+
width: typeof p == "number" ? `${p}px` : p,
|
|
88
|
+
height: typeof v == "number" ? `${v}px` : v
|
|
89
|
+
},
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ o.jsx(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
ref: y,
|
|
95
|
+
className: i(
|
|
96
|
+
"relative flex flex-row transition-transform duration-300 ease-out",
|
|
97
|
+
l && "pointer-events-none opacity-50"
|
|
98
|
+
),
|
|
99
|
+
style: {
|
|
100
|
+
transform: F(),
|
|
101
|
+
gap: `${g}px`
|
|
102
|
+
},
|
|
103
|
+
onMouseDown: U,
|
|
104
|
+
onMouseMove: _,
|
|
105
|
+
onMouseUp: b,
|
|
106
|
+
onMouseLeave: b,
|
|
107
|
+
onTouchStart: q,
|
|
108
|
+
onTouchMove: z,
|
|
109
|
+
onTouchEnd: A,
|
|
110
|
+
children: x.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
className: "flex-shrink-0 h-full",
|
|
114
|
+
style: {
|
|
115
|
+
width: C
|
|
116
|
+
},
|
|
117
|
+
children: e
|
|
118
|
+
},
|
|
119
|
+
t
|
|
120
|
+
))
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
R && s > 1 && /* @__PURE__ */ o.jsx("div", { className: "absolute bottom-4 left-1/2 transform -translate-x-1/2 flex gap-2", children: x.map((e, t) => /* @__PURE__ */ o.jsx(
|
|
124
|
+
"button",
|
|
125
|
+
{
|
|
126
|
+
onClick: () => j(t),
|
|
127
|
+
className: i(
|
|
128
|
+
"w-2 h-2 rounded-full transition-all duration-200",
|
|
129
|
+
t === n ? "bg-primary-default-default" : "bg-neutral-medium-default hover:bg-neutral-default-default"
|
|
130
|
+
),
|
|
131
|
+
"aria-label": `Ir al elemento ${t + 1}`
|
|
132
|
+
},
|
|
133
|
+
t
|
|
134
|
+
)) }),
|
|
135
|
+
W && s > 1 && /* @__PURE__ */ o.jsxs("div", { className: "absolute inset-0 flex items-center justify-between pointer-events-none", children: [
|
|
136
|
+
n > 0 && /* @__PURE__ */ o.jsx(
|
|
137
|
+
"button",
|
|
138
|
+
{
|
|
139
|
+
onClick: () => j(n - 1),
|
|
140
|
+
className: i(
|
|
141
|
+
"p-2 rounded-full bg-white shadow-md hover:shadow-lg transition-shadow pointer-events-auto",
|
|
142
|
+
l && "pointer-events-none opacity-50"
|
|
143
|
+
),
|
|
144
|
+
"aria-label": "Elemento anterior",
|
|
145
|
+
children: /* @__PURE__ */ o.jsx(
|
|
146
|
+
"svg",
|
|
147
|
+
{
|
|
148
|
+
className: "w-4 h-4 text-neutral-default-default rotate-180",
|
|
149
|
+
fill: "none",
|
|
150
|
+
stroke: "currentColor",
|
|
151
|
+
viewBox: "0 0 24 24",
|
|
152
|
+
children: /* @__PURE__ */ o.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
n < s - 1 && /* @__PURE__ */ o.jsx(
|
|
158
|
+
"button",
|
|
159
|
+
{
|
|
160
|
+
onClick: () => j(n + 1),
|
|
161
|
+
className: i(
|
|
162
|
+
"p-2 rounded-full bg-white shadow-md hover:shadow-lg transition-shadow pointer-events-auto",
|
|
163
|
+
l && "pointer-events-none opacity-50"
|
|
164
|
+
),
|
|
165
|
+
"aria-label": "Elemento siguiente",
|
|
166
|
+
children: /* @__PURE__ */ o.jsx(
|
|
167
|
+
"svg",
|
|
168
|
+
{
|
|
169
|
+
className: "w-4 h-4 text-neutral-default-default",
|
|
170
|
+
fill: "none",
|
|
171
|
+
stroke: "currentColor",
|
|
172
|
+
viewBox: "0 0 24 24",
|
|
173
|
+
children: /* @__PURE__ */ o.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
] })
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
};
|
|
183
|
+
export {
|
|
184
|
+
O as default
|
|
185
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { j as a } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { motion as x } from "framer-motion";
|
|
3
|
+
import { memo as b } from "react";
|
|
4
|
+
import { c as r } from "./cn-B6yFEsav.js";
|
|
5
|
+
const k = b(function({
|
|
6
|
+
items: s,
|
|
7
|
+
activeTab: l,
|
|
8
|
+
onTabChange: o,
|
|
9
|
+
className: n,
|
|
10
|
+
tabClassName: u,
|
|
11
|
+
activeTabClassName: f,
|
|
12
|
+
indicatorClassName: c,
|
|
13
|
+
animated: m = !0,
|
|
14
|
+
renderTab: i
|
|
15
|
+
}) {
|
|
16
|
+
const p = (t) => {
|
|
17
|
+
t.disabled || o?.(t.id, t);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ a.jsx(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: r(
|
|
23
|
+
"flex flex-row justify-around items-end relative border-b-1 border-neutral-strong-default w-full md:justify-start md:px-10 md:gap-5",
|
|
24
|
+
n
|
|
25
|
+
),
|
|
26
|
+
role: "tablist",
|
|
27
|
+
children: s?.map((t) => {
|
|
28
|
+
const e = l === t.id, d = () => p(t);
|
|
29
|
+
return i ? /* @__PURE__ */ a.jsx("div", { children: i(t, e, d) }, t.id) : /* @__PURE__ */ a.jsxs(
|
|
30
|
+
"button",
|
|
31
|
+
{
|
|
32
|
+
onClick: d,
|
|
33
|
+
disabled: t.disabled,
|
|
34
|
+
className: r(
|
|
35
|
+
"relative flex justify-center items-center h-10 px-4 font-medium focus:outline-none transition-colors",
|
|
36
|
+
!t.disabled && "hover:text-primary-default-default cursor-pointer",
|
|
37
|
+
t.disabled && "opacity-50 cursor-not-allowed",
|
|
38
|
+
u,
|
|
39
|
+
e && f
|
|
40
|
+
),
|
|
41
|
+
tabIndex: t.disabled ? -1 : 0,
|
|
42
|
+
"aria-label": t.title,
|
|
43
|
+
role: "tab",
|
|
44
|
+
"aria-selected": e,
|
|
45
|
+
title: t.description,
|
|
46
|
+
children: [
|
|
47
|
+
e && m && /* @__PURE__ */ a.jsx(
|
|
48
|
+
x.div,
|
|
49
|
+
{
|
|
50
|
+
layoutId: "tab-indicator",
|
|
51
|
+
className: r(
|
|
52
|
+
"absolute -bottom-[1px] left-0 right-0 h-[5px] rounded-t-xl bg-primary-default-default z-0",
|
|
53
|
+
c
|
|
54
|
+
),
|
|
55
|
+
transition: {
|
|
56
|
+
type: "spring",
|
|
57
|
+
stiffness: 300,
|
|
58
|
+
damping: 20
|
|
59
|
+
},
|
|
60
|
+
"aria-hidden": "true"
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ a.jsx(
|
|
64
|
+
"span",
|
|
65
|
+
{
|
|
66
|
+
className: r(
|
|
67
|
+
"relative z-10",
|
|
68
|
+
e ? "text-primary-default-default font-semibold text-md" : "text-neutral-medium-default font-medium text-md"
|
|
69
|
+
),
|
|
70
|
+
children: t.title
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
t.id
|
|
76
|
+
);
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
k as default
|
|
83
|
+
};
|
package/dist/Table.d.ts
ADDED
package/dist/Table.es.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
|
5
|
+
"table",
|
|
6
|
+
{
|
|
7
|
+
ref: a,
|
|
8
|
+
className: l(
|
|
9
|
+
"w-full caption-bottom text-sm border-b-1 rounded-lg border-neutral-default-default",
|
|
10
|
+
e
|
|
11
|
+
),
|
|
12
|
+
...t
|
|
13
|
+
}
|
|
14
|
+
) }));
|
|
15
|
+
n.displayName = "Table";
|
|
16
|
+
const f = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
17
|
+
"thead",
|
|
18
|
+
{
|
|
19
|
+
ref: a,
|
|
20
|
+
className: l("[&_tr]:border-b-0 [&_tr]:text-center", e),
|
|
21
|
+
...t
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
f.displayName = "TableHeader";
|
|
25
|
+
const i = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
26
|
+
"tbody",
|
|
27
|
+
{
|
|
28
|
+
ref: a,
|
|
29
|
+
className: l("[&_tr:last-child]:border-b [&_tr]:cursor-pointer ", e),
|
|
30
|
+
...t
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
i.displayName = "TableBody";
|
|
34
|
+
const b = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
35
|
+
"tfoot",
|
|
36
|
+
{
|
|
37
|
+
ref: a,
|
|
38
|
+
className: l(
|
|
39
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:!border-b-0",
|
|
40
|
+
e
|
|
41
|
+
),
|
|
42
|
+
...t
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
b.displayName = "TableFooter";
|
|
46
|
+
const m = o.forwardRef(({ className: e, isSelected: t, ...a }, d) => {
|
|
47
|
+
const s = `
|
|
48
|
+
after:content-["<span id='selected-span'></span>"]
|
|
49
|
+
after:absolute
|
|
50
|
+
after:top-1/2
|
|
51
|
+
after:left-1/2
|
|
52
|
+
after:w-[calc(100%)]
|
|
53
|
+
after:h-[calc(100%-12px)]
|
|
54
|
+
after:-translate-x-1/2
|
|
55
|
+
after:-translate-y-1/2
|
|
56
|
+
after:bg-primary-default-default
|
|
57
|
+
after:rounded-lg
|
|
58
|
+
${t ? "after:opacity-10" : "after:opacity-0"}
|
|
59
|
+
after:z-10
|
|
60
|
+
after:pointer-events-none
|
|
61
|
+
transition-all
|
|
62
|
+
duration-300
|
|
63
|
+
ease-in-out
|
|
64
|
+
`;
|
|
65
|
+
return /* @__PURE__ */ r.jsx(
|
|
66
|
+
"tr",
|
|
67
|
+
{
|
|
68
|
+
ref: d,
|
|
69
|
+
className: l(
|
|
70
|
+
"border-b border-neutral-default-default relative text-center text-md text-semibold transition-colors hover:bg-neutral-medium-default/50 text-neutral-default-default",
|
|
71
|
+
s,
|
|
72
|
+
e
|
|
73
|
+
),
|
|
74
|
+
...a
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
m.displayName = "TableRow";
|
|
79
|
+
const c = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
80
|
+
"th",
|
|
81
|
+
{
|
|
82
|
+
ref: a,
|
|
83
|
+
className: l(
|
|
84
|
+
"h-14 px-4 text-center align-middle font-semibold text-neutral-default-default bg-neutral-medium-default first:rounded-tl-lg first:rounded-bl-lg last:rounded-br-lg last:rounded-tr-lg",
|
|
85
|
+
e
|
|
86
|
+
),
|
|
87
|
+
...t
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
c.displayName = "TableHead";
|
|
91
|
+
const u = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
92
|
+
"td",
|
|
93
|
+
{
|
|
94
|
+
ref: a,
|
|
95
|
+
className: l(
|
|
96
|
+
"py-4 px-4 align-middle text-center [&:has([role=checkbox])]:pr-0",
|
|
97
|
+
e
|
|
98
|
+
),
|
|
99
|
+
...t
|
|
100
|
+
}
|
|
101
|
+
));
|
|
102
|
+
u.displayName = "TableCell";
|
|
103
|
+
const p = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx(
|
|
104
|
+
"caption",
|
|
105
|
+
{
|
|
106
|
+
ref: a,
|
|
107
|
+
className: l("mt-4 text-sm text-muted-foreground", e),
|
|
108
|
+
...t
|
|
109
|
+
}
|
|
110
|
+
));
|
|
111
|
+
p.displayName = "TableCaption";
|
|
112
|
+
export {
|
|
113
|
+
n as Table,
|
|
114
|
+
i as TableBody,
|
|
115
|
+
p as TableCaption,
|
|
116
|
+
u as TableCell,
|
|
117
|
+
b as TableFooter,
|
|
118
|
+
c as TableHead,
|
|
119
|
+
f as TableHeader,
|
|
120
|
+
m as TableRow
|
|
121
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { j as y } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as C } from "./cn-B6yFEsav.js";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
function M({
|
|
5
|
+
className: i,
|
|
6
|
+
autoResize: t = !1,
|
|
7
|
+
userResize: d = !0,
|
|
8
|
+
minRows: r = 3,
|
|
9
|
+
maxRows: a,
|
|
10
|
+
placeholder: f,
|
|
11
|
+
onChange: c,
|
|
12
|
+
value: h,
|
|
13
|
+
rows: m
|
|
14
|
+
}) {
|
|
15
|
+
const o = s.useRef(null), n = s.useCallback(() => {
|
|
16
|
+
const e = o.current;
|
|
17
|
+
if (!e || !t) return;
|
|
18
|
+
e.style.height = "auto";
|
|
19
|
+
const g = e.scrollHeight, u = Number.parseInt(getComputedStyle(e).lineHeight) || 20, H = r * u + 16;
|
|
20
|
+
let l = Math.max(g, H);
|
|
21
|
+
if (a) {
|
|
22
|
+
const b = a * u + 16;
|
|
23
|
+
l = Math.min(l, b);
|
|
24
|
+
}
|
|
25
|
+
e.style.height = `${l}px`;
|
|
26
|
+
}, [t, r, a]), x = (e) => {
|
|
27
|
+
c?.(e), n();
|
|
28
|
+
};
|
|
29
|
+
s.useEffect(() => {
|
|
30
|
+
n();
|
|
31
|
+
}, [n]);
|
|
32
|
+
const p = () => d ? t ? "resize-x" : "resize" : "resize-none";
|
|
33
|
+
return /* @__PURE__ */ y.jsx(
|
|
34
|
+
"textarea",
|
|
35
|
+
{
|
|
36
|
+
ref: o,
|
|
37
|
+
"data-slot": "textarea",
|
|
38
|
+
className: C(
|
|
39
|
+
"placeholder:text-neutral-medium-default text-neutral-default-default appearance-none border border-neutral-default-default focus:border-primary-default-default flex w-full rounded-md px-3 py-2 outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
40
|
+
p(),
|
|
41
|
+
i
|
|
42
|
+
),
|
|
43
|
+
onChange: x,
|
|
44
|
+
rows: t ? r : m,
|
|
45
|
+
value: h,
|
|
46
|
+
placeholder: f
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
M as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
|
+
import { useState as p, cloneElement as x } from "react";
|
|
4
|
+
import { Icons as b } from "./Icons.es.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
title: i,
|
|
7
|
+
trigger: o,
|
|
8
|
+
children: r,
|
|
9
|
+
position: t = "top",
|
|
10
|
+
component: c
|
|
11
|
+
}) => {
|
|
12
|
+
const [s, l] = p(!1), m = () => l(!0), a = () => l(!1), u = o === "hover" ? {
|
|
13
|
+
onMouseEnter: m,
|
|
14
|
+
onMouseLeave: a
|
|
15
|
+
} : {
|
|
16
|
+
onClick: () => l(!s)
|
|
17
|
+
}, d = {
|
|
18
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
19
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
20
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
21
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative inline-block", children: [
|
|
24
|
+
x(r, u),
|
|
25
|
+
/* @__PURE__ */ e.jsx(f, { children: s && /* @__PURE__ */ e.jsx(
|
|
26
|
+
n.div,
|
|
27
|
+
{
|
|
28
|
+
initial: { opacity: 0, scale: 0.8, y: t === "top" ? 10 : -10 },
|
|
29
|
+
animate: {
|
|
30
|
+
opacity: 1,
|
|
31
|
+
scale: 1,
|
|
32
|
+
y: 0
|
|
33
|
+
},
|
|
34
|
+
exit: { opacity: 0, scale: 0.8, y: t === "top" ? 10 : -10 },
|
|
35
|
+
transition: {
|
|
36
|
+
duration: 0.15,
|
|
37
|
+
ease: "easeOut"
|
|
38
|
+
},
|
|
39
|
+
className: `absolute z-50 ${d[t]}`,
|
|
40
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "min-w-80 max-w-80 min-h-36 h-fit text-white rounded-lg shadow-lg p-3 bg-neutral-medium-default", children: [
|
|
41
|
+
/* @__PURE__ */ e.jsx("h3", { className: "font-bold text-sm mb-1 text-neutral-strong-default", children: i }),
|
|
42
|
+
c,
|
|
43
|
+
o === "click" && /* @__PURE__ */ e.jsx(
|
|
44
|
+
n.button,
|
|
45
|
+
{
|
|
46
|
+
onClick: (h) => {
|
|
47
|
+
h.stopPropagation(), a();
|
|
48
|
+
},
|
|
49
|
+
className: "absolute cursor-pointer -top-2 -right-2 w-6 h-6 bg-neutral-strong-default hover:bg-neutral-medium-default rounded-full flex items-center justify-center transition-colors z-10",
|
|
50
|
+
whileHover: { scale: 1.1 },
|
|
51
|
+
whileTap: { scale: 0.95 },
|
|
52
|
+
children: /* @__PURE__ */ e.jsx(b.Close, { size: 14, className: "text-white" })
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
56
|
+
}
|
|
57
|
+
) })
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
N as default
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/Avatar/Avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropZone } from '../components/DropZone/DropZone';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Icons } from '../Icons/Icons';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/Logo/Logo';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/SwipeContainer/SwipeContainer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/TabLinks/TabLinks';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from '../components/Table/Table';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/TextArea/TextArea';
|