prometeo-design-system 1.9.5 → 1.9.7
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.es.js +1 -1
- package/dist/{CardProfile-Bg_q2qMm.js → CardProfile-BZajBGbO.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/DialogModal.es.js +39 -45
- package/dist/DrawerDesktop.es.js +1 -1
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons.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-p4Pll4Cm.js → LayoutGeneric-jDE96L2N.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/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +45 -47
- package/dist/Skeleton.d.ts +2 -0
- package/dist/Skeleton.es.js +71 -0
- 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 +13 -13
- package/dist/TabLinks.es.js +1 -1
- 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 +1 -0
- package/dist/components/SegmentedButton/SegmentedButton.d.ts +20 -0
- package/dist/components/Sidebar/components/nav-actions.d.ts +1 -1
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +5 -5
- package/dist/components/Skeleton/Skeleton.d.ts +10 -0
- package/dist/exports/SegmentedButton.d.ts +1 -0
- package/dist/exports/Skeleton.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/pages/Buttons.d.ts +2 -0
- package/dist/pages/Skeletons.d.ts +2 -0
- package/dist/preview/Layout.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +548 -362
- package/package.json +9 -1
package/dist/Avatar.es.js
CHANGED
package/dist/Button.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-
|
|
1
|
+
import { j as o } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as x } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { c as N } from "./index-BOQuZ0gG.js";
|
|
4
4
|
import { useAnimationControls as k, motion as y } from "framer-motion";
|
package/dist/CardProfile.es.js
CHANGED
package/dist/CheckBox.es.js
CHANGED
package/dist/DialogModal.es.js
CHANGED
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Footer: C,
|
|
39
|
-
Title: h
|
|
40
|
-
});
|
|
41
|
-
u.displayName = "Dialog";
|
|
42
|
-
const R = () => {
|
|
43
|
-
const e = D(null);
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { forwardRef as u, useState as p, useImperativeHandle as f, useRef as g } from "react";
|
|
3
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
|
+
const x = u(({
|
|
5
|
+
children: e,
|
|
6
|
+
onClose: o,
|
|
7
|
+
className: s
|
|
8
|
+
}, n) => {
|
|
9
|
+
const [r, l] = p(!1), c = () => l(!0), a = () => {
|
|
10
|
+
l(!1), o?.();
|
|
11
|
+
};
|
|
12
|
+
return f(n, () => ({
|
|
13
|
+
open: c,
|
|
14
|
+
close: a,
|
|
15
|
+
isOpen: r
|
|
16
|
+
})), /* @__PURE__ */ t.jsx(t.Fragment, { children: r && /* @__PURE__ */ t.jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
|
|
20
|
+
onClick: a,
|
|
21
|
+
children: /* @__PURE__ */ t.jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: i("bg-neutral-default-default w-3/4 h-3/4 xl:w-3/4 xl:h-10/12 rounded-lg shadow-lg border-neutral-strong-default border relative p-6", s),
|
|
25
|
+
onClick: (d) => d.stopPropagation(),
|
|
26
|
+
children: e
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
}), m = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("div", { className: o, children: /* @__PURE__ */ t.jsx("div", { className: i("flex flex-col gap-4"), children: e }) }), j = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("h1", { className: o, children: e }), D = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("div", { className: o, children: e }), b = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("div", { className: o, children: e }), C = Object.assign(x, {
|
|
32
|
+
Content: m,
|
|
33
|
+
Header: D,
|
|
34
|
+
Footer: b,
|
|
35
|
+
Title: j
|
|
36
|
+
}), k = () => {
|
|
37
|
+
const e = g(null);
|
|
44
38
|
return {
|
|
45
39
|
ref: e,
|
|
46
40
|
open: () => {
|
|
@@ -53,6 +47,6 @@ const R = () => {
|
|
|
53
47
|
};
|
|
54
48
|
};
|
|
55
49
|
export {
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
C as default,
|
|
51
|
+
k as useDialogControl
|
|
58
52
|
};
|
package/dist/DrawerDesktop.es.js
CHANGED
package/dist/DrawerMobile.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { forwardRef as O, useState as g, useRef as x, useCallback as t, useImperativeHandle as D } from "react";
|
|
3
3
|
import { Drawer as n } from "vaul";
|
|
4
4
|
import { c as R } from "./cn-B6yFEsav.js";
|
package/dist/DropZone.es.js
CHANGED
package/dist/Header.es.js
CHANGED
package/dist/Icons.es.js
CHANGED
package/dist/Input.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Icons as O } from "./Icons.es.js";
|
|
3
3
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { memo as ue, useState as N, useRef as ce, useCallback as fe, useEffect as $, useLayoutEffect as ie } from "react";
|
package/dist/InputFormik.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as u } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { FastField as O, ErrorMessage as q } from "formik";
|
|
4
4
|
import { memo as G, useState as I, useRef as H, useCallback as y, useLayoutEffect as J } from "react";
|
package/dist/InputMultiple.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Icons as E } from "./Icons.es.js";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
4
|
import M, { useRef as D, useState as p, useCallback as W, useEffect as X } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { useRef as a, createContext as i, useContext as u, memo as c } from "react";
|
|
3
3
|
const o = i(null), l = ({ children: e }) => {
|
|
4
4
|
const r = a(null), s = (n) => {
|
package/dist/LayoutGeneric.es.js
CHANGED
package/dist/Logo.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Icons as t } from "./Icons.es.js";
|
|
3
3
|
const s = () => /* @__PURE__ */ e.jsxs("div", { className: "container-logo flex items-center justify-center gap-1 bg-gradient-to-br from-[#312C85] to-[#1E1A4D] rounded-md min-w-[185px]", children: [
|
|
4
4
|
/* @__PURE__ */ e.jsx(t.TicketFilled, { size: 28, className: "rotate-140 text-primary-medium-pressed icon-logo" }),
|
package/dist/Menu.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { AnimatePresence as n, motion as o } from "framer-motion";
|
|
4
4
|
const s = ({ menuRef: t, children: a, className: i }) => /* @__PURE__ */ e.jsx("div", { ref: t, className: r("flex bg-neutral-default-default absolute bottom-10 left-24 border-1 border-neutral-strong-default h-auto w-60 rounded-md px-2", i), children: /* @__PURE__ */ e.jsx(n, { mode: "wait", children: /* @__PURE__ */ e.jsx(
|
package/dist/OtpInput.es.js
CHANGED
package/dist/Pagination.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { motion as i, AnimatePresence as E } from "framer-motion";
|
|
3
3
|
import { useRef as v, useState as R, useLayoutEffect as A } from "react";
|
|
4
4
|
import H from "./Avatar.es.js";
|
package/dist/ProgressBar.es.js
CHANGED
package/dist/Select.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Icons as w } from "./Icons.es.js";
|
|
3
3
|
import { c as o } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { memo as se, useState as y, useRef as re, useEffect as oe } from "react";
|
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
2
|
-
import { Icons as
|
|
3
|
-
import { c as
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as h } from "./Icons.es.js";
|
|
3
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { useField as P, ErrorMessage as M } from "formik";
|
|
5
5
|
import { useState as w, useRef as R, useEffect as L } from "react";
|
|
6
6
|
import B from "./Spinner.es.js";
|
|
7
7
|
const T = ({
|
|
8
8
|
label: N,
|
|
9
9
|
name: A,
|
|
10
|
-
placeholder:
|
|
11
|
-
disabled:
|
|
10
|
+
placeholder: v = "",
|
|
11
|
+
disabled: g,
|
|
12
12
|
containerClassName: k,
|
|
13
13
|
className: C,
|
|
14
|
-
options:
|
|
14
|
+
options: o = [],
|
|
15
15
|
multiple: n = !1,
|
|
16
16
|
emptyMessage: D = "No hay opciones disponibles",
|
|
17
|
-
labelVariant:
|
|
17
|
+
labelVariant: b = "default",
|
|
18
18
|
isFetching: O = !1
|
|
19
19
|
}) => {
|
|
20
|
-
const [
|
|
20
|
+
const [r, y, u] = P(A), [l, c] = w(!1), [f, j] = w(!1), m = R(null), x = y.touched && y.error, d = r.value && (Array.isArray(r.value) ? r.value.length > 0 : r.value.toString().length > 0), S = () => b === "static" || d || l || f ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", V = () => r.value ? Array.isArray(r.value) ? o.filter((e) => r.value.includes(e.id)) : o.filter((e) => e.id === r.value) : [], z = (e) => {
|
|
21
21
|
if (n) {
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const a = Array.isArray(r.value) ? r.value : [], s = a.includes(e.id) ? a.filter((p) => p !== e.id) : [...a, e.id];
|
|
23
|
+
u.setValue(s);
|
|
24
24
|
} else
|
|
25
|
-
|
|
25
|
+
u.setValue(e.id), c(!1);
|
|
26
26
|
}, E = (e) => {
|
|
27
|
-
e.stopPropagation(),
|
|
28
|
-
}, F = (e,
|
|
29
|
-
if (
|
|
30
|
-
const s =
|
|
31
|
-
(
|
|
27
|
+
e.stopPropagation(), u.setValue(n ? [] : "");
|
|
28
|
+
}, F = (e, a) => {
|
|
29
|
+
if (a?.stopPropagation(), n && Array.isArray(r.value)) {
|
|
30
|
+
const s = r.value.filter(
|
|
31
|
+
(p) => p !== e
|
|
32
32
|
);
|
|
33
|
-
|
|
33
|
+
u.setValue(s);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
L(() => {
|
|
37
|
-
const e = (
|
|
38
|
-
|
|
37
|
+
const e = (a) => {
|
|
38
|
+
m.current && !m.current.contains(a.target) && c(!1);
|
|
39
39
|
};
|
|
40
40
|
return l && document.addEventListener("mousedown", e), () => {
|
|
41
41
|
document.removeEventListener("mousedown", e);
|
|
@@ -43,61 +43,59 @@ const T = ({
|
|
|
43
43
|
}, [l]);
|
|
44
44
|
const I = () => {
|
|
45
45
|
const e = V();
|
|
46
|
-
return e.length === 0 ?
|
|
46
|
+
return e.length === 0 ? v ? /* @__PURE__ */ t.jsx("span", { className: "text-neutral-medium-default opacity-50", children: v }) : null : n ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 flex-wrap py-1", children: e.map((a) => /* @__PURE__ */ t.jsxs(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
className: "inline-flex items-center gap-1 px-2 py-1 bg-primary-default-default text-white text-xs rounded-md",
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */ t.jsx("span", { className: "truncate max-w-20", children:
|
|
51
|
+
/* @__PURE__ */ t.jsx("span", { className: "truncate max-w-20", children: a.label }),
|
|
52
52
|
/* @__PURE__ */ t.jsx(
|
|
53
53
|
"button",
|
|
54
54
|
{
|
|
55
55
|
onMouseDown: (s) => {
|
|
56
|
-
s.preventDefault(), F(
|
|
56
|
+
s.preventDefault(), F(a.id, s);
|
|
57
57
|
},
|
|
58
58
|
className: "flex-shrink-0 hover:bg-primary-strong-default rounded-sm p-0.5 transition-colors",
|
|
59
59
|
type: "button",
|
|
60
60
|
tabIndex: -1,
|
|
61
|
-
children: /* @__PURE__ */ t.jsx(
|
|
61
|
+
children: /* @__PURE__ */ t.jsx(h.Close, { size: 12, className: "" })
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
a.id
|
|
67
67
|
)) }) : /* @__PURE__ */ t.jsx("span", { children: e[0]?.label });
|
|
68
68
|
};
|
|
69
69
|
return /* @__PURE__ */ t.jsxs(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
|
-
className:
|
|
73
|
-
ref:
|
|
72
|
+
className: i("relative w-full bg-inherit", k),
|
|
73
|
+
ref: m,
|
|
74
74
|
children: [
|
|
75
75
|
/* @__PURE__ */ t.jsxs("div", { className: "relative bg-inherit", children: [
|
|
76
76
|
/* @__PURE__ */ t.jsxs(
|
|
77
|
-
"
|
|
77
|
+
"div",
|
|
78
78
|
{
|
|
79
|
-
|
|
80
|
-
disabled: c,
|
|
81
|
-
onClick: () => !c && f(!l),
|
|
79
|
+
onClick: () => !g && c(!l),
|
|
82
80
|
onFocus: () => j(!0),
|
|
83
81
|
onBlur: () => j(!1),
|
|
84
|
-
className:
|
|
85
|
-
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-
|
|
82
|
+
className: i(
|
|
83
|
+
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-300 ease-in-out text-neutral-default-default",
|
|
86
84
|
"flex items-center justify-between bg-transparent focus:outline-none",
|
|
87
|
-
d || l ||
|
|
88
|
-
|
|
85
|
+
d || l || f ? " border-primary-default-focused ring-primary-default-focused ring-[2px]" : x ? "ring-error-default-default ring-[2px]" : "border-neutral-default-default hover:border-primary-default-hover",
|
|
86
|
+
g && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
89
87
|
C
|
|
90
88
|
),
|
|
91
89
|
children: [
|
|
92
90
|
/* @__PURE__ */ t.jsx(
|
|
93
91
|
"label",
|
|
94
92
|
{
|
|
95
|
-
className:
|
|
93
|
+
className: i(
|
|
96
94
|
"absolute pointer-events-none bg-inherit px-1 z-10",
|
|
97
|
-
|
|
95
|
+
b === "default" && "transition-all duration-200 ease-in-out",
|
|
98
96
|
"text-md",
|
|
99
97
|
S(),
|
|
100
|
-
d || l ||
|
|
98
|
+
d || l || f ? "text-primary-default-default" : x ? "text-red-500" : "text-neutral-medium-default",
|
|
101
99
|
"left-3"
|
|
102
100
|
),
|
|
103
101
|
children: N
|
|
@@ -114,14 +112,14 @@ const T = ({
|
|
|
114
112
|
className: "text-neutral-medium-default hover:text-neutral-default-default transition-colors",
|
|
115
113
|
type: "button",
|
|
116
114
|
tabIndex: -1,
|
|
117
|
-
children: /* @__PURE__ */ t.jsx(
|
|
115
|
+
children: /* @__PURE__ */ t.jsx(h.Close, { size: 16, className: "" })
|
|
118
116
|
}
|
|
119
117
|
),
|
|
120
118
|
O ? /* @__PURE__ */ t.jsx(B, { size: 20, variant: "clip" }) : /* @__PURE__ */ t.jsx(
|
|
121
|
-
|
|
119
|
+
h.ChevronDown,
|
|
122
120
|
{
|
|
123
121
|
size: 20,
|
|
124
|
-
className:
|
|
122
|
+
className: i(
|
|
125
123
|
"transition-transform text-neutral-default-default",
|
|
126
124
|
l ? "rotate-180" : ""
|
|
127
125
|
)
|
|
@@ -131,24 +129,24 @@ const T = ({
|
|
|
131
129
|
]
|
|
132
130
|
}
|
|
133
131
|
),
|
|
134
|
-
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:
|
|
135
|
-
const
|
|
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: o.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: D }) : o.map((e) => {
|
|
133
|
+
const a = n ? Array.isArray(r.value) && r.value.includes(e.id) : r.value === e.id;
|
|
136
134
|
return /* @__PURE__ */ t.jsxs(
|
|
137
135
|
"div",
|
|
138
136
|
{
|
|
139
137
|
onMouseDown: (s) => {
|
|
140
138
|
s.preventDefault(), z(e), s.stopPropagation();
|
|
141
139
|
},
|
|
142
|
-
className:
|
|
140
|
+
className: i(
|
|
143
141
|
"px-3 py-2 cursor-pointer flex items-center transition-colors",
|
|
144
|
-
|
|
142
|
+
a ? "bg-primary-default-default text-white" : "hover:bg-neutral-medium-selected text-neutral-default-default"
|
|
145
143
|
),
|
|
146
144
|
children: [
|
|
147
145
|
n && /* @__PURE__ */ t.jsx(
|
|
148
146
|
"input",
|
|
149
147
|
{
|
|
150
148
|
type: "checkbox",
|
|
151
|
-
checked:
|
|
149
|
+
checked: a,
|
|
152
150
|
onChange: () => {
|
|
153
151
|
},
|
|
154
152
|
className: "mr-2 pointer-events-none"
|
|
@@ -161,10 +159,10 @@ const T = ({
|
|
|
161
159
|
);
|
|
162
160
|
}) })
|
|
163
161
|
] }),
|
|
164
|
-
|
|
162
|
+
x && /* @__PURE__ */ t.jsx(
|
|
165
163
|
M,
|
|
166
164
|
{
|
|
167
|
-
name:
|
|
165
|
+
name: r.name,
|
|
168
166
|
component: "span",
|
|
169
167
|
className: "block text-error-default-default text-xs mt-1"
|
|
170
168
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { j as x } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as P } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { useRef as $, useLayoutEffect as B } from "react";
|
|
4
|
+
const v = (g) => {
|
|
5
|
+
const e = $(null), { debugMode: b = !1, className: y = "", children: p, shape: f = "rounded", animation: i = "shimmer", onlyContainer: m = !1 } = g;
|
|
6
|
+
let d = "255, 255, 255", u = "255, 255, 255, 0.1";
|
|
7
|
+
B(() => {
|
|
8
|
+
if (e.current) {
|
|
9
|
+
const n = (a) => {
|
|
10
|
+
let r = a;
|
|
11
|
+
for (; r && r !== document.body; ) {
|
|
12
|
+
const o = window.getComputedStyle(r).backgroundColor;
|
|
13
|
+
if (o && o !== "transparent" && o !== "rgba(0, 0, 0, 0)")
|
|
14
|
+
return o;
|
|
15
|
+
r = r.parentElement;
|
|
16
|
+
}
|
|
17
|
+
const t = window.getComputedStyle(document.body).backgroundColor;
|
|
18
|
+
return t && t !== "transparent" && t !== "rgba(0, 0, 0, 0)" ? t : "rgb(255, 255, 255)";
|
|
19
|
+
}, c = (a) => {
|
|
20
|
+
const r = document.createElement("canvas");
|
|
21
|
+
r.width = 1, r.height = 1;
|
|
22
|
+
const t = r.getContext("2d");
|
|
23
|
+
if (!t) return [255, 255, 255];
|
|
24
|
+
t.fillStyle = a, t.fillRect(0, 0, 1, 1);
|
|
25
|
+
const o = t.getImageData(0, 0, 1, 1).data;
|
|
26
|
+
return [o[0], o[1], o[2]];
|
|
27
|
+
}, C = n(e.current.parentElement), s = c(C), S = s.reduce((a, r) => a + r, 0) < 382;
|
|
28
|
+
let l;
|
|
29
|
+
S ? l = `rgb(${s[0] + 10}, ${s[1] + 10}, ${s[2] + 10})` : (l = `rgb(${s[0] - 30}, ${s[1] - 30}, ${s[2] - 30})`, d = "115,115,115", u = "255,255,255, 0.4"), m && (l = "transparent", e.current.style.animation = "none"), e.current.style.backgroundColor = l, h();
|
|
30
|
+
}
|
|
31
|
+
}, [i]);
|
|
32
|
+
const h = () => {
|
|
33
|
+
if (!m && e.current)
|
|
34
|
+
switch (i) {
|
|
35
|
+
case "shimmer":
|
|
36
|
+
e.current.classList.add("skeleton-shimmer-animation");
|
|
37
|
+
const n = u.split(",").map(Number);
|
|
38
|
+
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()));
|
|
39
|
+
break;
|
|
40
|
+
case "none":
|
|
41
|
+
e.current.style.animation = "none";
|
|
42
|
+
break;
|
|
43
|
+
case "border":
|
|
44
|
+
e.current.classList.add("skeleton-border-animation"), e.current.style.backgroundColor = "transparent";
|
|
45
|
+
const c = d.match(/\d+/g);
|
|
46
|
+
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]));
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}, k = {
|
|
50
|
+
circle: "rounded-full aspect-square",
|
|
51
|
+
square: "rounded-none",
|
|
52
|
+
rounded: "rounded"
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ x.jsx(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref: e,
|
|
58
|
+
className: P(
|
|
59
|
+
b && " border-red-600/20 border",
|
|
60
|
+
y,
|
|
61
|
+
"skeleton-container",
|
|
62
|
+
k[f]
|
|
63
|
+
),
|
|
64
|
+
children: p
|
|
65
|
+
},
|
|
66
|
+
`skeleton-${Math.random().toFixed(10)}`
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
v as Skeleton
|
|
71
|
+
};
|
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-ByW6EXIE.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,13 @@
|
|
|
1
|
-
import { j as n } from "./jsx-runtime-
|
|
1
|
+
import { j as n } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { useRef as p } from "react";
|
|
4
|
-
import { motion as
|
|
5
|
-
const x = ({ name:
|
|
6
|
-
const a = p(null),
|
|
4
|
+
import { motion as l } from "framer-motion";
|
|
5
|
+
const x = ({ name: c, value: o, onChange: d, disabled: e = !1 }) => {
|
|
6
|
+
const a = p(null), i = () => {
|
|
7
7
|
if (!a.current || e) return;
|
|
8
8
|
const m = !a.current.checked;
|
|
9
|
-
c
|
|
10
|
-
},
|
|
9
|
+
d(c, m);
|
|
10
|
+
}, s = {
|
|
11
11
|
on: {
|
|
12
12
|
default: {
|
|
13
13
|
container: "bg-primary-default-default",
|
|
@@ -45,20 +45,20 @@ const x = ({ name: l, value: o, onChange: c, disabled: e = !1 }) => {
|
|
|
45
45
|
off: {
|
|
46
46
|
width: 16
|
|
47
47
|
}
|
|
48
|
-
}, t = o ? "on" : "off",
|
|
48
|
+
}, t = o ? "on" : "off", u = e ? "disabled" : "default";
|
|
49
49
|
return /* @__PURE__ */ n.jsxs("div", { children: [
|
|
50
|
-
/* @__PURE__ */ n.jsx("input", { type: "checkbox", hidden: !0, ref: a, checked: o, disabled: e }),
|
|
50
|
+
/* @__PURE__ */ n.jsx("input", { type: "checkbox", hidden: !0, ref: a, checked: o, disabled: e, onChange: i }),
|
|
51
51
|
/* @__PURE__ */ n.jsx(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
className: r(
|
|
55
55
|
"w-14 h-8 rounded-full relative px-2",
|
|
56
|
-
|
|
56
|
+
s[t][u].container
|
|
57
57
|
),
|
|
58
58
|
children: /* @__PURE__ */ n.jsx(
|
|
59
|
-
|
|
59
|
+
l.span,
|
|
60
60
|
{
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: i,
|
|
62
62
|
animate: f[t],
|
|
63
63
|
whileHover: e ? {} : {
|
|
64
64
|
background: t === "off" ? "rgba(29, 27, 32, 0.08)" : "rgba(101, 85, 143, 0.12)"
|
|
@@ -69,7 +69,7 @@ const x = ({ name: l, value: o, onChange: c, disabled: e = !1 }) => {
|
|
|
69
69
|
"cursor-pointer"
|
|
70
70
|
),
|
|
71
71
|
children: /* @__PURE__ */ n.jsx(
|
|
72
|
-
|
|
72
|
+
l.span,
|
|
73
73
|
{
|
|
74
74
|
animate: h[t],
|
|
75
75
|
whileTap: e ? {} : {
|
|
@@ -78,7 +78,7 @@ const x = ({ name: l, value: o, onChange: c, disabled: e = !1 }) => {
|
|
|
78
78
|
},
|
|
79
79
|
className: r(
|
|
80
80
|
"size-4 aspect-square rounded-full z-10",
|
|
81
|
-
|
|
81
|
+
s[t][u].dot
|
|
82
82
|
)
|
|
83
83
|
}
|
|
84
84
|
)
|
package/dist/TabLinks.es.js
CHANGED