prometeo-design-system 2.3.1 → 2.3.3
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.es.js +1 -1
- package/dist/{Button-Bc0LYLfg.js → Button-DsbEyjth.js} +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-BiYr6kY9.js → CardProfile-BhFog7j5.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/CheckboxFormik.es.js +1 -1
- package/dist/DatePicker.es.js +2 -2
- package/dist/DialogModal.es.js +35 -31
- package/dist/DrawerDesktop.es.js +2 -2
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons/Icons.d.ts +48 -46
- package/dist/Icons.es.js +93 -90
- package/dist/Image.es.js +1 -1
- package/dist/ImageGallery-DnoRTpCr.js +317 -0
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +1 -1
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-jDE96L2N.js → LayoutGeneric-p4Pll4Cm.js} +1 -1
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/SegmentedButton.es.js +1 -1
- package/dist/Select.es.js +368 -185
- package/dist/SelectFormik.es.js +90 -72
- package/dist/Skeleton.es.js +35 -34
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +31 -28
- package/dist/TabLinks.es.js +35 -33
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +7 -6
- package/dist/components/Dialog/useDialogControl.d.ts +4 -3
- package/dist/components/Select/Select.d.ts +33 -13
- package/dist/components/SelectFormik/SelectFormik.d.ts +4 -2
- package/dist/components/Skeleton/Skeleton.d.ts +5 -2
- package/dist/components/Switch/Switch.d.ts +5 -2
- package/dist/components/TabLinks/TabLinks.d.ts +2 -2
- package/dist/exports/Select.d.ts +1 -1
- package/dist/hooks/useDragScroll.d.ts +29 -0
- package/dist/hooks/useLabelBackground.d.ts +5 -0
- package/dist/index.d.ts +8 -8
- package/dist/{jsx-runtime-ByW6EXIE.js → jsx-runtime-DKDX3adD.js} +94 -96
- package/dist/pages/SelectsPage.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +6 -6
- package/dist/useDragScroll-CHN9OMwn.js +165 -0
- package/package.json +4 -4
- package/src/styles/intellisense.css +5 -0
- package/dist/ImageGallery-O5Y4oBrD.js +0 -352
- package/dist/lib/utils.d.ts +0 -1
- package/dist/preview/Select.d.ts +0 -2
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,49 +1,67 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
2
|
-
import { Icons as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useField as
|
|
5
|
-
import { useState as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
label:
|
|
9
|
-
name:
|
|
10
|
-
placeholder:
|
|
11
|
-
disabled:
|
|
12
|
-
containerClassName:
|
|
13
|
-
className:
|
|
14
|
-
options:
|
|
15
|
-
multiple:
|
|
16
|
-
emptyMessage:
|
|
17
|
-
labelVariant:
|
|
18
|
-
isFetching:
|
|
1
|
+
import { j as t } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { Icons as g } from "./Icons.es.js";
|
|
3
|
+
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { useField as $, ErrorMessage as q } from "formik";
|
|
5
|
+
import { memo as G, useState as k, useRef as H, useEffect as J } from "react";
|
|
6
|
+
import K from "./Spinner.es.js";
|
|
7
|
+
const Q = ({
|
|
8
|
+
label: C,
|
|
9
|
+
name: I,
|
|
10
|
+
placeholder: b = "",
|
|
11
|
+
disabled: j,
|
|
12
|
+
containerClassName: S,
|
|
13
|
+
className: D,
|
|
14
|
+
options: c = [],
|
|
15
|
+
multiple: i = !1,
|
|
16
|
+
emptyMessage: z = "No hay opciones disponibles",
|
|
17
|
+
labelVariant: w = "default",
|
|
18
|
+
isFetching: E = !1,
|
|
19
|
+
returnFullObject: m = !1
|
|
20
|
+
// Por defecto false para mantener compatibilidad
|
|
19
21
|
}) => {
|
|
20
|
-
const [r,
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const [r, N, o] = $(I), [l, x] = k(!1), [p, A] = k(!1), h = H(null), v = N.touched && N.error, u = (e) => e ? typeof e == "object" && e.id !== void 0 ? e.id : e : null, V = () => r.value ? Array.isArray(r.value) ? r.value.map(u) : u(r.value) : i ? [] : null, f = r.value && (Array.isArray(r.value) ? r.value.length > 0 : typeof r.value == "object" ? r.value.id : r.value?.toString().length > 0), O = () => w === "static" || f || l || p ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", P = () => {
|
|
23
|
+
if (!r.value) return [];
|
|
24
|
+
const e = V();
|
|
25
|
+
return Array.isArray(e) ? c.filter((a) => e.includes(a.id)) : c.filter((a) => a.id === e);
|
|
26
|
+
}, F = (e) => {
|
|
27
|
+
if (i) {
|
|
28
|
+
const a = Array.isArray(r.value) ? r.value.map(u) : [], s = a.includes(e.id);
|
|
29
|
+
if (m) {
|
|
30
|
+
const n = Array.isArray(r.value) ? r.value : [], y = s ? n.filter((B) => u(B) !== e.id) : [...n, e];
|
|
31
|
+
o.setValue(y);
|
|
32
|
+
} else {
|
|
33
|
+
const n = s ? a.filter((y) => y !== e.id) : [...a, e.id];
|
|
34
|
+
o.setValue(n);
|
|
35
|
+
}
|
|
24
36
|
} else
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
e.stopPropagation(),
|
|
28
|
-
},
|
|
29
|
-
if (a?.stopPropagation(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
o.setValue(m ? e : e.id), x(!1);
|
|
38
|
+
}, M = (e) => {
|
|
39
|
+
e.stopPropagation(), o.setValue(i ? [] : "");
|
|
40
|
+
}, R = (e, a) => {
|
|
41
|
+
if (a?.stopPropagation(), i && Array.isArray(r.value))
|
|
42
|
+
if (m) {
|
|
43
|
+
const s = r.value.filter(
|
|
44
|
+
(n) => u(n) !== e
|
|
45
|
+
);
|
|
46
|
+
o.setValue(s);
|
|
47
|
+
} else {
|
|
48
|
+
const s = r.value.filter(
|
|
49
|
+
(n) => n !== e
|
|
50
|
+
);
|
|
51
|
+
o.setValue(s);
|
|
52
|
+
}
|
|
35
53
|
};
|
|
36
|
-
|
|
54
|
+
J(() => {
|
|
37
55
|
const e = (a) => {
|
|
38
|
-
|
|
56
|
+
h.current && !h.current.contains(a.target) && x(!1);
|
|
39
57
|
};
|
|
40
58
|
return l && document.addEventListener("mousedown", e), () => {
|
|
41
59
|
document.removeEventListener("mousedown", e);
|
|
42
60
|
};
|
|
43
61
|
}, [l]);
|
|
44
|
-
const
|
|
45
|
-
const e =
|
|
46
|
-
return e.length === 0 ?
|
|
62
|
+
const L = () => {
|
|
63
|
+
const e = P();
|
|
64
|
+
return e.length === 0 ? b ? /* @__PURE__ */ t.jsx("span", { className: "text-neutral-medium-default opacity-50", children: b }) : null : i ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 flex-wrap py-1", children: e.map((a) => /* @__PURE__ */ t.jsxs(
|
|
47
65
|
"div",
|
|
48
66
|
{
|
|
49
67
|
className: "inline-flex items-center gap-1 px-2 py-1 bg-primary-default-default text-white text-xs rounded-md",
|
|
@@ -53,12 +71,12 @@ const T = ({
|
|
|
53
71
|
"button",
|
|
54
72
|
{
|
|
55
73
|
onMouseDown: (s) => {
|
|
56
|
-
s.preventDefault(),
|
|
74
|
+
s.preventDefault(), R(a.id, s);
|
|
57
75
|
},
|
|
58
76
|
className: "flex-shrink-0 hover:bg-primary-strong-default rounded-sm p-0.5 transition-colors",
|
|
59
77
|
type: "button",
|
|
60
78
|
tabIndex: -1,
|
|
61
|
-
children: /* @__PURE__ */ t.jsx(
|
|
79
|
+
children: /* @__PURE__ */ t.jsx(g.Close, { size: 12, className: "" })
|
|
62
80
|
}
|
|
63
81
|
)
|
|
64
82
|
]
|
|
@@ -69,57 +87,57 @@ const T = ({
|
|
|
69
87
|
return /* @__PURE__ */ t.jsxs(
|
|
70
88
|
"div",
|
|
71
89
|
{
|
|
72
|
-
className:
|
|
73
|
-
ref:
|
|
90
|
+
className: d("relative w-full bg-inherit", S),
|
|
91
|
+
ref: h,
|
|
74
92
|
children: [
|
|
75
93
|
/* @__PURE__ */ t.jsxs("div", { className: "relative bg-inherit", children: [
|
|
76
94
|
/* @__PURE__ */ t.jsxs(
|
|
77
95
|
"div",
|
|
78
96
|
{
|
|
79
|
-
onClick: () => !
|
|
80
|
-
onFocus: () =>
|
|
81
|
-
onBlur: () =>
|
|
82
|
-
className:
|
|
97
|
+
onClick: () => !j && x(!l),
|
|
98
|
+
onFocus: () => A(!0),
|
|
99
|
+
onBlur: () => A(!1),
|
|
100
|
+
className: d(
|
|
83
101
|
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-300 ease-in-out text-neutral-default-default",
|
|
84
102
|
"flex items-center justify-between bg-transparent focus:outline-none",
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
103
|
+
f || l || p ? " border-primary-default-focused ring-primary-default-focused ring-[2px]" : v ? "ring-error-default-default ring-[2px]" : "border-neutral-default-default hover:border-primary-default-hover",
|
|
104
|
+
j && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
105
|
+
D
|
|
88
106
|
),
|
|
89
107
|
children: [
|
|
90
108
|
/* @__PURE__ */ t.jsx(
|
|
91
109
|
"label",
|
|
92
110
|
{
|
|
93
|
-
className:
|
|
111
|
+
className: d(
|
|
94
112
|
"absolute pointer-events-none bg-inherit px-1 z-10",
|
|
95
|
-
|
|
113
|
+
w === "default" && "transition-all duration-200 ease-in-out",
|
|
96
114
|
"text-md",
|
|
97
|
-
|
|
98
|
-
|
|
115
|
+
O(),
|
|
116
|
+
f || l || p ? "text-primary-default-default" : v ? "text-red-500" : "text-neutral-medium-default",
|
|
99
117
|
"left-3"
|
|
100
118
|
),
|
|
101
|
-
children:
|
|
119
|
+
children: C
|
|
102
120
|
}
|
|
103
121
|
),
|
|
104
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 min-w-0", children:
|
|
122
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 min-w-0", children: L() }),
|
|
105
123
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
106
|
-
|
|
124
|
+
f && /* @__PURE__ */ t.jsx(
|
|
107
125
|
"button",
|
|
108
126
|
{
|
|
109
127
|
onMouseDown: (e) => {
|
|
110
|
-
e.preventDefault(), e.stopPropagation(),
|
|
128
|
+
e.preventDefault(), e.stopPropagation(), M(e);
|
|
111
129
|
},
|
|
112
130
|
className: "text-neutral-medium-default hover:text-neutral-default-default transition-colors",
|
|
113
131
|
type: "button",
|
|
114
132
|
tabIndex: -1,
|
|
115
|
-
children: /* @__PURE__ */ t.jsx(
|
|
133
|
+
children: /* @__PURE__ */ t.jsx(g.Close, { size: 16, className: "" })
|
|
116
134
|
}
|
|
117
135
|
),
|
|
118
|
-
|
|
119
|
-
|
|
136
|
+
E ? /* @__PURE__ */ t.jsx(K, { size: 20, variant: "clip" }) : /* @__PURE__ */ t.jsx(
|
|
137
|
+
g.ChevronDown,
|
|
120
138
|
{
|
|
121
139
|
size: 20,
|
|
122
|
-
className:
|
|
140
|
+
className: d(
|
|
123
141
|
"transition-transform text-neutral-default-default",
|
|
124
142
|
l ? "rotate-180" : ""
|
|
125
143
|
)
|
|
@@ -129,24 +147,24 @@ const T = ({
|
|
|
129
147
|
]
|
|
130
148
|
}
|
|
131
149
|
),
|
|
132
|
-
l && /* @__PURE__ */ t.jsx("div", { className: "absolute z-50 w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-md shadow-lg max-h-60 overflow-auto", children:
|
|
133
|
-
const a =
|
|
150
|
+
l && /* @__PURE__ */ t.jsx("div", { className: "absolute z-50 w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-md shadow-lg max-h-60 overflow-auto", children: c.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: z }) : c.map((e) => {
|
|
151
|
+
const a = V(), s = i ? Array.isArray(a) && a.includes(e.id) : a === e.id;
|
|
134
152
|
return /* @__PURE__ */ t.jsxs(
|
|
135
153
|
"div",
|
|
136
154
|
{
|
|
137
|
-
onMouseDown: (
|
|
138
|
-
|
|
155
|
+
onMouseDown: (n) => {
|
|
156
|
+
n.preventDefault(), F(e), n.stopPropagation();
|
|
139
157
|
},
|
|
140
|
-
className:
|
|
158
|
+
className: d(
|
|
141
159
|
"px-3 py-2 cursor-pointer flex items-center transition-colors",
|
|
142
|
-
|
|
160
|
+
s ? "bg-primary-default-default text-white" : "hover:bg-neutral-medium-selected text-neutral-default-default"
|
|
143
161
|
),
|
|
144
162
|
children: [
|
|
145
|
-
|
|
163
|
+
i && /* @__PURE__ */ t.jsx(
|
|
146
164
|
"input",
|
|
147
165
|
{
|
|
148
166
|
type: "checkbox",
|
|
149
|
-
checked:
|
|
167
|
+
checked: s,
|
|
150
168
|
onChange: () => {
|
|
151
169
|
},
|
|
152
170
|
className: "mr-2 pointer-events-none"
|
|
@@ -159,8 +177,8 @@ const T = ({
|
|
|
159
177
|
);
|
|
160
178
|
}) })
|
|
161
179
|
] }),
|
|
162
|
-
|
|
163
|
-
|
|
180
|
+
v && /* @__PURE__ */ t.jsx(
|
|
181
|
+
q,
|
|
164
182
|
{
|
|
165
183
|
name: r.name,
|
|
166
184
|
component: "span",
|
|
@@ -170,7 +188,7 @@ const T = ({
|
|
|
170
188
|
]
|
|
171
189
|
}
|
|
172
190
|
);
|
|
173
|
-
};
|
|
191
|
+
}, _ = G(Q);
|
|
174
192
|
export {
|
|
175
|
-
|
|
193
|
+
_ as default
|
|
176
194
|
};
|
package/dist/Skeleton.es.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import { j as x } from "./jsx-runtime-
|
|
2
|
-
import { c as
|
|
3
|
-
import { useRef as
|
|
4
|
-
const
|
|
5
|
-
const e =
|
|
1
|
+
import { j as x } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as E } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { memo as P, useRef as B, useCallback as R, useLayoutEffect as D } from "react";
|
|
4
|
+
const b = (y) => {
|
|
5
|
+
const e = B(null), { debugMode: p = !1, className: f = "", children: h, shape: k = "rounded", animation: d = "shimmer", onlyContainer: l = !1 } = y;
|
|
6
6
|
let i = "255, 255, 255", m = "255, 255, 255, 0.1";
|
|
7
|
-
const g =
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
}, [u, m, i, l]);
|
|
25
|
-
E(() => {
|
|
7
|
+
const g = R(() => {
|
|
8
|
+
if (l || !e.current) return;
|
|
9
|
+
const n = m.split(",").map(Number), c = i.match(/\d+/g);
|
|
10
|
+
switch (d) {
|
|
11
|
+
case "shimmer":
|
|
12
|
+
e.current.classList.add("skeleton-shimmer-animation"), n && n.length >= 3 && (e.current.style.setProperty("--shimmer-color-r", n[0].toString()), e.current.style.setProperty("--shimmer-color-g", n[1].toString()), e.current.style.setProperty("--shimmer-color-b", n[2].toString()), e.current.style.setProperty("--shimmer-color-a", n[3].toString()));
|
|
13
|
+
break;
|
|
14
|
+
case "none":
|
|
15
|
+
e.current.style.animation = "none";
|
|
16
|
+
break;
|
|
17
|
+
case "border":
|
|
18
|
+
e.current.classList.add("skeleton-border-animation"), e.current.style.backgroundColor = "transparent", c && c.length >= 3 && (e.current.style.setProperty("--border-color-r", c[0]), e.current.style.setProperty("--border-color-g", c[1]), e.current.style.setProperty("--border-color-b", c[2]));
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
}, [d, m, i, l]);
|
|
22
|
+
D(() => {
|
|
26
23
|
if (e.current) {
|
|
27
24
|
const n = (a) => {
|
|
28
25
|
let r = a;
|
|
@@ -42,12 +39,14 @@ const A = (b) => {
|
|
|
42
39
|
t.fillStyle = a, t.fillRect(0, 0, 1, 1);
|
|
43
40
|
const o = t.getImageData(0, 0, 1, 1).data;
|
|
44
41
|
return [o[0], o[1], o[2]];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
};
|
|
43
|
+
if (!e.current.parentElement) return;
|
|
44
|
+
const C = n(e.current.parentElement), s = c(C), w = s.reduce((a, r) => a + r, 0) < 382;
|
|
45
|
+
let u;
|
|
46
|
+
w ? u = `rgb(${s[0] + 10}, ${s[1] + 10}, ${s[2] + 10})` : (u = `rgb(${s[0] - 30}, ${s[1] - 30}, ${s[2] - 30})`, i = "115,115,115", m = "255,255,255, 0.4"), l && (u = "transparent", e.current.style.animation = "none"), e.current.style.backgroundColor = u, g();
|
|
48
47
|
}
|
|
49
48
|
}, [m, i, l, g]);
|
|
50
|
-
const
|
|
49
|
+
const S = {
|
|
51
50
|
circle: "rounded-full aspect-square",
|
|
52
51
|
square: "rounded-none",
|
|
53
52
|
rounded: "rounded"
|
|
@@ -56,17 +55,19 @@ const A = (b) => {
|
|
|
56
55
|
"div",
|
|
57
56
|
{
|
|
58
57
|
ref: e,
|
|
59
|
-
className:
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
className: E(
|
|
59
|
+
p && " border-red-600/20 border",
|
|
60
|
+
f,
|
|
62
61
|
"skeleton-container",
|
|
63
|
-
k
|
|
62
|
+
S[k]
|
|
64
63
|
),
|
|
65
|
-
children:
|
|
64
|
+
children: h
|
|
66
65
|
},
|
|
67
66
|
`skeleton-${Math.random().toFixed(10)}`
|
|
68
67
|
);
|
|
69
68
|
};
|
|
69
|
+
b.displayName = "Skeleton";
|
|
70
|
+
const L = P(b);
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
L as Skeleton
|
|
72
73
|
};
|
package/dist/Spinner.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { ClipLoader as l, SyncLoader as m, HashLoader as p, GridLoader as x, DotLoader as j, BounceLoader as f } from "react-spinners";
|
|
3
3
|
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
4
|
const y = ({
|
package/dist/Steps.es.js
CHANGED
package/dist/Switch.es.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as a } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { motion as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
if (!
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { memo as w, useRef as b } from "react";
|
|
4
|
+
import { motion as c } from "framer-motion";
|
|
5
|
+
const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
6
|
+
const n = b(null), h = (u) => {
|
|
7
|
+
if (!n.current || t) return;
|
|
8
|
+
u.preventDefault(), u.stopPropagation();
|
|
9
|
+
const g = !n.current.checked;
|
|
10
|
+
f(d, g);
|
|
11
|
+
}, i = {
|
|
11
12
|
on: {
|
|
12
13
|
default: {
|
|
13
14
|
container: "bg-primary-default-default",
|
|
@@ -28,7 +29,7 @@ const x = ({ name: c, value: o, onChange: d, disabled: e = !1 }) => {
|
|
|
28
29
|
dot: "bg-neutral-weak-default"
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
},
|
|
32
|
+
}, m = {
|
|
32
33
|
on: {
|
|
33
34
|
left: "unset",
|
|
34
35
|
right: -4
|
|
@@ -37,7 +38,7 @@ const x = ({ name: c, value: o, onChange: d, disabled: e = !1 }) => {
|
|
|
37
38
|
left: -4,
|
|
38
39
|
right: "unset"
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
+
}, p = {
|
|
41
42
|
on: {
|
|
42
43
|
width: 24,
|
|
43
44
|
height: 24
|
|
@@ -45,40 +46,40 @@ const x = ({ name: c, value: o, onChange: d, disabled: e = !1 }) => {
|
|
|
45
46
|
off: {
|
|
46
47
|
width: 16
|
|
47
48
|
}
|
|
48
|
-
},
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
49
|
+
}, e = o ? "on" : "off", s = t ? "disabled" : "default";
|
|
50
|
+
return /* @__PURE__ */ a.jsxs("div", { children: [
|
|
51
|
+
/* @__PURE__ */ a.jsx("input", { type: "checkbox", hidden: !0, ref: n, checked: o, disabled: t }),
|
|
52
|
+
/* @__PURE__ */ a.jsx(
|
|
52
53
|
"div",
|
|
53
54
|
{
|
|
54
55
|
className: r(
|
|
55
56
|
"w-14 h-8 rounded-full relative px-2",
|
|
56
|
-
|
|
57
|
+
i[e][s].container
|
|
57
58
|
),
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
|
|
59
|
+
children: /* @__PURE__ */ a.jsx(
|
|
60
|
+
c.span,
|
|
60
61
|
{
|
|
61
|
-
onClick:
|
|
62
|
-
animate:
|
|
63
|
-
whileHover:
|
|
64
|
-
background:
|
|
62
|
+
onClick: h,
|
|
63
|
+
animate: m[e],
|
|
64
|
+
whileHover: t ? {} : {
|
|
65
|
+
background: e === "off" ? "rgba(29, 27, 32, 0.08)" : "rgba(101, 85, 143, 0.12)"
|
|
65
66
|
},
|
|
66
67
|
className: r(
|
|
67
68
|
"absolute top-1/2 -translate-y-1/2 grid place-items-center ",
|
|
68
69
|
"size-10 aspect-square rounded-full absolute top-1/2 -translate-y-1/2",
|
|
69
70
|
"cursor-pointer"
|
|
70
71
|
),
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
-
|
|
72
|
+
children: /* @__PURE__ */ a.jsx(
|
|
73
|
+
c.span,
|
|
73
74
|
{
|
|
74
|
-
animate:
|
|
75
|
-
whileTap:
|
|
75
|
+
animate: p[e],
|
|
76
|
+
whileTap: t ? {} : {
|
|
76
77
|
width: 28,
|
|
77
78
|
height: 28
|
|
78
79
|
},
|
|
79
80
|
className: r(
|
|
80
81
|
"size-4 aspect-square rounded-full z-10",
|
|
81
|
-
|
|
82
|
+
i[e][s].dot
|
|
82
83
|
)
|
|
83
84
|
}
|
|
84
85
|
)
|
|
@@ -88,6 +89,8 @@ const x = ({ name: c, value: o, onChange: d, disabled: e = !1 }) => {
|
|
|
88
89
|
)
|
|
89
90
|
] });
|
|
90
91
|
};
|
|
92
|
+
l.displayName = "Switch";
|
|
93
|
+
const y = w(l);
|
|
91
94
|
export {
|
|
92
|
-
|
|
95
|
+
y as Switch
|
|
93
96
|
};
|
package/dist/TabLinks.es.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-
|
|
2
|
-
import { motion as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { c as
|
|
5
|
-
const
|
|
6
|
-
items:
|
|
7
|
-
activeTab:
|
|
8
|
-
onTabChange:
|
|
9
|
-
className:
|
|
10
|
-
tabClassName:
|
|
11
|
-
activeTabClassName:
|
|
12
|
-
indicatorClassName:
|
|
13
|
-
animated:
|
|
14
|
-
renderTab:
|
|
1
|
+
import { j as a } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { motion as h } from "framer-motion";
|
|
3
|
+
import { memo as d } from "react";
|
|
4
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
5
|
+
const l = d(function({
|
|
6
|
+
items: o,
|
|
7
|
+
activeTab: n,
|
|
8
|
+
onTabChange: u,
|
|
9
|
+
className: f,
|
|
10
|
+
tabClassName: c,
|
|
11
|
+
activeTabClassName: m,
|
|
12
|
+
indicatorClassName: b,
|
|
13
|
+
animated: p = !0,
|
|
14
|
+
renderTab: r
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
17
|
-
t.disabled ||
|
|
16
|
+
const x = (t) => {
|
|
17
|
+
t.disabled || u?.(t.id, t);
|
|
18
18
|
};
|
|
19
19
|
return /* @__PURE__ */ a.jsx(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
|
-
className:
|
|
22
|
+
className: i(
|
|
23
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
|
-
|
|
24
|
+
f
|
|
25
25
|
),
|
|
26
26
|
role: "tablist",
|
|
27
|
-
children:
|
|
28
|
-
const e =
|
|
29
|
-
return
|
|
27
|
+
children: o?.map((t) => {
|
|
28
|
+
const e = n === t.id, s = () => x(t);
|
|
29
|
+
return r ? /* @__PURE__ */ a.jsx("div", { children: r(t, e, s) }, t.id) : /* @__PURE__ */ a.jsxs(
|
|
30
30
|
"button",
|
|
31
31
|
{
|
|
32
|
-
onClick:
|
|
32
|
+
onClick: s,
|
|
33
33
|
disabled: t.disabled,
|
|
34
|
-
className:
|
|
34
|
+
className: i(
|
|
35
35
|
"relative flex justify-center items-center h-10 px-4 font-medium focus:outline-none transition-colors",
|
|
36
36
|
!t.disabled && "hover:text-primary-default-default cursor-pointer",
|
|
37
37
|
t.disabled && "opacity-50 cursor-not-allowed",
|
|
38
|
-
|
|
39
|
-
e &&
|
|
38
|
+
c,
|
|
39
|
+
e && m
|
|
40
40
|
),
|
|
41
41
|
tabIndex: t.disabled ? -1 : 0,
|
|
42
42
|
"aria-label": t.title,
|
|
@@ -44,18 +44,18 @@ const k = b(function({
|
|
|
44
44
|
"aria-selected": e,
|
|
45
45
|
title: t.description,
|
|
46
46
|
children: [
|
|
47
|
-
e &&
|
|
48
|
-
|
|
47
|
+
e && p && /* @__PURE__ */ a.jsx(
|
|
48
|
+
h.div,
|
|
49
49
|
{
|
|
50
50
|
layoutId: "tab-indicator",
|
|
51
|
-
className:
|
|
51
|
+
className: i(
|
|
52
52
|
"absolute -bottom-[1px] left-0 right-0 h-[5px] rounded-t-xl bg-primary-default-default z-0",
|
|
53
|
-
|
|
53
|
+
b
|
|
54
54
|
),
|
|
55
55
|
transition: {
|
|
56
56
|
type: "spring",
|
|
57
|
-
stiffness:
|
|
58
|
-
damping:
|
|
57
|
+
stiffness: 250,
|
|
58
|
+
damping: 17
|
|
59
59
|
},
|
|
60
60
|
"aria-hidden": "true"
|
|
61
61
|
}
|
|
@@ -63,7 +63,7 @@ const k = b(function({
|
|
|
63
63
|
/* @__PURE__ */ a.jsx(
|
|
64
64
|
"span",
|
|
65
65
|
{
|
|
66
|
-
className:
|
|
66
|
+
className: i(
|
|
67
67
|
"relative z-10",
|
|
68
68
|
e ? "text-primary-default-default font-semibold text-md" : "text-neutral-medium-default font-medium text-md"
|
|
69
69
|
),
|
|
@@ -78,6 +78,8 @@ const k = b(function({
|
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
});
|
|
81
|
+
l.displayName = "TabLinks";
|
|
82
|
+
const N = d(l);
|
|
81
83
|
export {
|
|
82
|
-
|
|
84
|
+
N as default
|
|
83
85
|
};
|
package/dist/Table.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Icons as b } from "./Icons.es.js";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
interface DialogProps {
|
|
1
|
+
interface DialogProps<TContext = unknown> {
|
|
2
2
|
title?: string;
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
onClose?: () => void;
|
|
3
|
+
children: React.ReactNode | ((context: TContext | null) => React.ReactNode);
|
|
4
|
+
onClose?: (context: TContext | null) => void;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export interface DialogHandle {
|
|
8
|
-
open: () => void;
|
|
7
|
+
export interface DialogHandle<TContext = unknown> {
|
|
8
|
+
open: (context?: TContext) => void;
|
|
9
9
|
close: () => void;
|
|
10
10
|
isOpen: boolean;
|
|
11
|
+
getContext: () => TContext | null;
|
|
11
12
|
}
|
|
12
13
|
interface DialogContentProps {
|
|
13
14
|
children?: React.ReactNode;
|
|
@@ -25,7 +26,7 @@ interface DialogFooterProps {
|
|
|
25
26
|
children?: React.ReactNode;
|
|
26
27
|
className?: string;
|
|
27
28
|
}
|
|
28
|
-
declare const DialogModal: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<DialogHandle
|
|
29
|
+
declare const DialogModal: import('react').ForwardRefExoticComponent<DialogProps<any> & import('react').RefAttributes<DialogHandle<any>>> & {
|
|
29
30
|
Content: ({ children, className }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
Header: ({ children, className }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
32
|
Footer: ({ children, className }: DialogFooterProps) => import("react/jsx-runtime").JSX.Element;
|