prometeo-design-system 2.9.6 → 2.9.8
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/Button.es.js +9 -9
- package/dist/{CardProfile-CsytJlKZ.js → CardProfile-WHoeSibd.js} +8 -8
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +4 -4
- package/dist/DatePicker-CbXUUnv7.js +3568 -0
- package/dist/DatePicker.es.js +3 -3439
- package/dist/DrawerDesktop.d.ts +6 -0
- package/dist/DrawerDesktop.es.js +211 -0
- package/dist/DrawerMobile.d.ts +6 -0
- package/dist/DrawerMobile.es.js +242 -0
- package/dist/DropZone.es.js +5 -5
- package/dist/FAButton.es.js +1 -1
- package/dist/{HelperComponent-g_xuKWzK.js → HelperComponent-BeNlTMqI.js} +7 -7
- package/dist/Icons/Icons.d.ts +2 -3
- package/dist/Icons.d.ts +0 -4
- package/dist/Icons.es.js +1053 -3
- package/dist/Image.es.js +29 -29
- package/dist/{ImageGallery-Ckxg9OIC.js → ImageGallery-WKzUevOQ.js} +34 -34
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-Cck37DpG.js → Input-Cf8P1QJv.js} +30 -31
- package/dist/Input.es.js +1 -1
- package/dist/InputMultiple.es.js +34 -34
- package/dist/Logo.es.js +1 -1
- package/dist/OtpInput.es.js +43 -43
- package/dist/RadioButton.es.js +1 -1
- package/dist/RecurrentDatePicker.d.ts +2 -0
- package/dist/RecurrentDatePicker.es.js +694 -0
- package/dist/RecurrentDatePickerRRule.d.ts +2 -0
- package/dist/RecurrentDatePickerRRule.es.js +1684 -0
- package/dist/{Select-BD5FTxVw.js → Select-DeKi15Iu.js} +31 -32
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/Spinner.es.js +172 -46
- package/dist/Steps.es.js +1 -1
- package/dist/Toast.es.js +22 -22
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Drawer/DrawerDesktop.d.ts +1 -0
- package/dist/components/Drawer/useDrawerDesktop.d.ts +1 -1
- package/dist/components/RecurrentDatePicker/PreviewCalendar.d.ts +4 -1
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +4 -4
- package/dist/components/RecurrentDatePicker/RecurrentDatePickerRRule.d.ts +13 -0
- package/dist/components/RecurrentDatePicker/recurrentDatePicker.validations.d.ts +3 -3
- package/dist/components/Spinner/Spinner.d.ts +6 -6
- package/dist/exports/DrawerDesktop.d.ts +4 -0
- package/dist/exports/DrawerMobile.d.ts +4 -0
- package/dist/exports/Icons.d.ts +1 -2
- package/dist/exports/RecurrentDatePicker.d.ts +5 -0
- package/dist/exports/RecurrentDatePickerRRule.d.ts +2 -0
- package/dist/exports/Spinner.d.ts +2 -1
- package/dist/index.d.ts +9 -3
- package/dist/prometeo-design-system.es.js +412 -762
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +1 -0
- package/package.json +19 -6
- package/src/styles/app.css +1 -1313
- package/src/styles/base.css +1331 -0
- package/src/styles/utilities.css +24 -36
- package/dist/Icons-DtFC5DJ7.js +0 -1079
- package/dist/components/Spinner/SpinnerV2.d.ts +0 -12
- package/dist/prometeo-design-system.css +0 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { j as f } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as k } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { c as O } from "./index-BOQuZ0gG.js";
|
|
4
|
+
import { createPortal as T } from "react-dom";
|
|
5
|
+
import { forwardRef as I, useRef as m, useState as R, useEffect as l, useCallback as w, useImperativeHandle as V } from "react";
|
|
6
|
+
import { Close as P } from "./Icons.es.js";
|
|
7
|
+
import B from "./Button.es.js";
|
|
8
|
+
const L = I((t, i) => {
|
|
9
|
+
const s = m(null), [e, u] = R(t.defaultOpen || !1), [r, o] = R(null), d = m(t.onClose), a = m(r), p = m(/* @__PURE__ */ new Set()), {
|
|
10
|
+
modal: b = !1,
|
|
11
|
+
children: y,
|
|
12
|
+
className: C,
|
|
13
|
+
direction: h = "left",
|
|
14
|
+
attachToParent: c = !1,
|
|
15
|
+
closeOnOverlayClick: x = !1,
|
|
16
|
+
hideCloseButton: S = !1
|
|
17
|
+
} = t, g = m(x), j = m(e);
|
|
18
|
+
a.current = r, l(() => {
|
|
19
|
+
j.current = e;
|
|
20
|
+
}, [e]), l(() => {
|
|
21
|
+
a.current = r;
|
|
22
|
+
}, [r]), l(() => {
|
|
23
|
+
g.current = x;
|
|
24
|
+
}, [x]);
|
|
25
|
+
const D = (n) => {
|
|
26
|
+
if (!s.current)
|
|
27
|
+
return;
|
|
28
|
+
const N = s.current;
|
|
29
|
+
N && !N.contains(n.target) && g.current && j.current && v();
|
|
30
|
+
};
|
|
31
|
+
l(() => {
|
|
32
|
+
if (!g.current || b || !e)
|
|
33
|
+
return;
|
|
34
|
+
const n = setTimeout(() => {
|
|
35
|
+
document.addEventListener("click", D);
|
|
36
|
+
}, 0);
|
|
37
|
+
return () => {
|
|
38
|
+
clearTimeout(n), document.removeEventListener("click", D);
|
|
39
|
+
};
|
|
40
|
+
}, [x, e, b]), l(() => {
|
|
41
|
+
d.current = t.onClose;
|
|
42
|
+
}, [t.onClose]);
|
|
43
|
+
const z = w((n) => {
|
|
44
|
+
o(n ?? null), u(!0);
|
|
45
|
+
}, []), v = w(() => {
|
|
46
|
+
u(!1), d.current?.(a.current), setTimeout(() => o(null), 300);
|
|
47
|
+
}, []);
|
|
48
|
+
l(() => {
|
|
49
|
+
p.current.forEach((n) => {
|
|
50
|
+
try {
|
|
51
|
+
n(e);
|
|
52
|
+
} catch {
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}, [e]), V(
|
|
56
|
+
i,
|
|
57
|
+
() => ({
|
|
58
|
+
open: z,
|
|
59
|
+
close: v,
|
|
60
|
+
isOpen: e,
|
|
61
|
+
subscribeOpenChange: (n) => (p.current.add(n), () => {
|
|
62
|
+
p.current.delete(n);
|
|
63
|
+
}),
|
|
64
|
+
getContext: () => a.current
|
|
65
|
+
}),
|
|
66
|
+
[e, z, v]
|
|
67
|
+
);
|
|
68
|
+
const E = /* @__PURE__ */ f.jsx(
|
|
69
|
+
Y,
|
|
70
|
+
{
|
|
71
|
+
context: r,
|
|
72
|
+
ref: s,
|
|
73
|
+
isOpen: e,
|
|
74
|
+
close: v,
|
|
75
|
+
direction: h,
|
|
76
|
+
modal: b,
|
|
77
|
+
className: C,
|
|
78
|
+
attachToParent: c,
|
|
79
|
+
closeOnOverlayClick: x,
|
|
80
|
+
hideCloseButton: S,
|
|
81
|
+
children: typeof y == "function" ? y(r) : y
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
return c ? E : T(E, document.body);
|
|
85
|
+
});
|
|
86
|
+
L.displayName = "DrawerDesktopV2";
|
|
87
|
+
const Y = ({
|
|
88
|
+
ref: t,
|
|
89
|
+
children: i,
|
|
90
|
+
direction: s = "left",
|
|
91
|
+
isOpen: e,
|
|
92
|
+
close: u,
|
|
93
|
+
modal: r = !1,
|
|
94
|
+
className: o,
|
|
95
|
+
attachToParent: d = !1,
|
|
96
|
+
closeOnOverlayClick: a = !1,
|
|
97
|
+
hideCloseButton: p = !1,
|
|
98
|
+
context: b
|
|
99
|
+
}) => {
|
|
100
|
+
l(() => {
|
|
101
|
+
if (e && r) {
|
|
102
|
+
const c = window.scrollY;
|
|
103
|
+
return document.body.style.position = "fixed", document.body.style.top = `-${c}px`, document.body.style.width = "100%", () => {
|
|
104
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, c);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}, [e, r]);
|
|
108
|
+
const y = O("border-neutral-strong-default", {
|
|
109
|
+
variants: {
|
|
110
|
+
isOpen: {
|
|
111
|
+
true: "desktop-drawer-visible",
|
|
112
|
+
false: "desktop-drawer-hidden"
|
|
113
|
+
},
|
|
114
|
+
direction: {
|
|
115
|
+
left: "left-0 border-r-[1px] border-l-0",
|
|
116
|
+
right: "right-0 border-l-[1px] border-r-0"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}), C = O(
|
|
120
|
+
"fixed inset-0 bg-black/60 z-[55] cursor-default",
|
|
121
|
+
{
|
|
122
|
+
variants: {
|
|
123
|
+
isOpen: {
|
|
124
|
+
true: "drawer-overlay-visible",
|
|
125
|
+
false: "drawer-overlay-hidden"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
), h = O("", {
|
|
130
|
+
variants: {
|
|
131
|
+
direction: {
|
|
132
|
+
left: "right-0",
|
|
133
|
+
right: "left-0"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
return /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
138
|
+
r && /* @__PURE__ */ f.jsx(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
className: k(C({ isOpen: e })),
|
|
142
|
+
onClick: (c) => {
|
|
143
|
+
c.preventDefault(), c.stopPropagation(), a && u();
|
|
144
|
+
},
|
|
145
|
+
"aria-hidden": "true"
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ f.jsxs(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
ref: t,
|
|
152
|
+
className: k(
|
|
153
|
+
"bg-neutral-strong-default h-full top-0 z-60 w-max overflow-y-auto",
|
|
154
|
+
d ? "absolute" : "fixed",
|
|
155
|
+
y({ isOpen: e, direction: s }),
|
|
156
|
+
!p && "p-4 pt-10",
|
|
157
|
+
o
|
|
158
|
+
),
|
|
159
|
+
role: "dialog",
|
|
160
|
+
"aria-modal": r,
|
|
161
|
+
children: [
|
|
162
|
+
!p && /* @__PURE__ */ f.jsx(
|
|
163
|
+
B,
|
|
164
|
+
{
|
|
165
|
+
icon: /* @__PURE__ */ f.jsx(P, { size: 24 }),
|
|
166
|
+
animate: !1,
|
|
167
|
+
type: "button",
|
|
168
|
+
size: "small",
|
|
169
|
+
variant: "text",
|
|
170
|
+
onClick: u,
|
|
171
|
+
label: "",
|
|
172
|
+
color: "secondary",
|
|
173
|
+
className: k(
|
|
174
|
+
"absolute top-0 z-50",
|
|
175
|
+
h({ direction: s })
|
|
176
|
+
),
|
|
177
|
+
"aria-label": "Close drawer"
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
typeof i == "function" ? i(b) : i
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
] });
|
|
185
|
+
}, K = () => {
|
|
186
|
+
const t = m(null), [i, s] = R(!1), e = w((o) => {
|
|
187
|
+
t.current?.open(o);
|
|
188
|
+
}, []), u = w(() => {
|
|
189
|
+
t.current?.close();
|
|
190
|
+
}, []), r = w(() => t.current?.getContext() ?? null, []);
|
|
191
|
+
return l(() => {
|
|
192
|
+
const o = t.current?.subscribeOpenChange;
|
|
193
|
+
if (!o) return;
|
|
194
|
+
const d = o((a) => {
|
|
195
|
+
s(a);
|
|
196
|
+
});
|
|
197
|
+
return () => {
|
|
198
|
+
d && d();
|
|
199
|
+
};
|
|
200
|
+
}, [t.current?.subscribeOpenChange]), {
|
|
201
|
+
isOpen: i,
|
|
202
|
+
open: e,
|
|
203
|
+
close: u,
|
|
204
|
+
drawerRef: t,
|
|
205
|
+
getContext: r
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
export {
|
|
209
|
+
L as default,
|
|
210
|
+
K as useDrawerDesktop
|
|
211
|
+
};
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { j as m } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as _ } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { forwardRef as V, useState as $, useRef as v, useEffect as y, useCallback as c, useMemo as Q, useImperativeHandle as X } from "react";
|
|
4
|
+
import { createPortal as Z } from "react-dom";
|
|
5
|
+
const B = 44, P = "height 0.5s cubic-bezier(0.32, 0.72, 0, 1)", se = V((l, o) => {
|
|
6
|
+
const { children: D, defaultOpen: s = !1, onClose: g, snapPoints: w = ["60%"], setSnap: d, snap: u, attachToParent: x = !1 } = l, [R, Y] = $(u || "0%"), [M, r] = $(null), O = v(g), T = v(d), f = v(M), p = v(/* @__PURE__ */ new Set());
|
|
7
|
+
O.current = g, f.current = M, y(() => {
|
|
8
|
+
s && S();
|
|
9
|
+
}, [s]), y(() => {
|
|
10
|
+
T.current = d;
|
|
11
|
+
}, [d]);
|
|
12
|
+
const j = c(() => {
|
|
13
|
+
Y("0%"), O.current?.(f.current), setTimeout(() => r(null), 300);
|
|
14
|
+
}, []), S = c((h, k) => {
|
|
15
|
+
Y(h || w[0] || "60%"), r(k ?? null);
|
|
16
|
+
}, [w]), H = Q(() => R !== "0%", [R]);
|
|
17
|
+
y(() => {
|
|
18
|
+
p.current.forEach((h) => {
|
|
19
|
+
try {
|
|
20
|
+
h(H);
|
|
21
|
+
} catch {
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}, [H]), X(o, () => ({
|
|
25
|
+
open: S,
|
|
26
|
+
close: j,
|
|
27
|
+
isOpen: H,
|
|
28
|
+
subscribeOpenChange: (h) => (p.current.add(h), () => {
|
|
29
|
+
p.current.delete(h);
|
|
30
|
+
}),
|
|
31
|
+
getContext: () => f.current
|
|
32
|
+
}), [S, j, H]);
|
|
33
|
+
const F = u || R;
|
|
34
|
+
return x ? /* @__PURE__ */ m.jsx(K, { ...l, snap: F, setSnap: Y, context: M, children: D }) : Z(/* @__PURE__ */ m.jsx(K, { ...l, snap: F, setSnap: Y, context: M, children: D }), document.body);
|
|
35
|
+
}), K = ({ children: l, attachToParent: o = !1, className: D, snap: s, snapPoints: g = ["60%"], setSnap: w, hideOnClose: d = !1, unmountChildrenOnClose: u = !1, header: x, modal: R = !1, closeOnOverlayClick: Y = !1, context: M }) => {
|
|
36
|
+
const r = v(null), O = v(null), T = v(null), f = v(null), p = v(null), j = c(() => {
|
|
37
|
+
if (!r.current) return [];
|
|
38
|
+
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
39
|
+
return g?.map((t) => typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : typeof t == "number" ? t : 0) || [];
|
|
40
|
+
}, [g, o]), S = c((e, t) => {
|
|
41
|
+
const n = j();
|
|
42
|
+
if (n.length === 0) return e;
|
|
43
|
+
if (Math.abs(t) > 0.05)
|
|
44
|
+
if (t > 0) {
|
|
45
|
+
const a = n.filter((i) => i < e);
|
|
46
|
+
return a.length > 0 ? Math.max(...a) : d ? 0 : B;
|
|
47
|
+
} else {
|
|
48
|
+
const a = n.filter((i) => i > e);
|
|
49
|
+
if (a.length > 0)
|
|
50
|
+
return Math.min(...a);
|
|
51
|
+
}
|
|
52
|
+
return n.reduce((a, i) => Math.abs(i - e) < Math.abs(a - e) ? i : a);
|
|
53
|
+
}, [j]), H = c((e) => {
|
|
54
|
+
if (w && g) {
|
|
55
|
+
const t = o && r.current?.parentElement?.offsetHeight || window.innerHeight, n = e <= B ? "0%" : `${Math.round(e / t * 100)}%`;
|
|
56
|
+
w(n);
|
|
57
|
+
}
|
|
58
|
+
}, [w, g, o]), F = c((e) => {
|
|
59
|
+
r.current && (r.current.style.transition = P, r.current.style.height = `${e}px`);
|
|
60
|
+
}, [w, g, o]), N = c(() => {
|
|
61
|
+
if (p.current && o) {
|
|
62
|
+
const { scrollY: e } = p.current;
|
|
63
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, e), p.current = null;
|
|
64
|
+
}
|
|
65
|
+
}, [o]);
|
|
66
|
+
y(() => () => {
|
|
67
|
+
N();
|
|
68
|
+
}, [N]), y(() => {
|
|
69
|
+
if (!r.current || !s) return;
|
|
70
|
+
const e = o && r.current.parentElement?.offsetHeight || window.innerHeight;
|
|
71
|
+
let t = 0;
|
|
72
|
+
typeof s == "string" && s.endsWith("%") ? parseFloat(s) <= 0 ? t = d ? 0 : B : t = parseFloat(s) / 100 * e : typeof s == "string" && s.endsWith("px") ? t = parseFloat(s) : typeof s == "number" && (s >= 0 && s <= 1 ? t = s * e : t = s), F(t);
|
|
73
|
+
}, [s, o]);
|
|
74
|
+
const h = c((e) => {
|
|
75
|
+
if (!r.current) return;
|
|
76
|
+
const t = e.touches[0], n = r.current.offsetHeight;
|
|
77
|
+
f.current = {
|
|
78
|
+
isDragging: !1,
|
|
79
|
+
startY: t.clientY,
|
|
80
|
+
startHeight: n,
|
|
81
|
+
lastY: t.clientY,
|
|
82
|
+
lastTime: Date.now(),
|
|
83
|
+
velocity: 0
|
|
84
|
+
};
|
|
85
|
+
}, []), k = c((e) => {
|
|
86
|
+
if (!r.current) return;
|
|
87
|
+
const t = e, n = r.current.offsetHeight;
|
|
88
|
+
f.current = {
|
|
89
|
+
isDragging: !1,
|
|
90
|
+
startY: t.clientY,
|
|
91
|
+
startHeight: n,
|
|
92
|
+
lastY: t.clientY,
|
|
93
|
+
lastTime: Date.now(),
|
|
94
|
+
velocity: 0
|
|
95
|
+
};
|
|
96
|
+
}, []), z = c((e) => {
|
|
97
|
+
if (!f.current || !r.current) return;
|
|
98
|
+
const t = e.touches[0], n = f.current, L = n.startY - t.clientY, a = n.isDragging || Math.abs(L) > 5;
|
|
99
|
+
if (!n.isDragging && a && (n.isDragging = !0, o)) {
|
|
100
|
+
const i = window.scrollY;
|
|
101
|
+
p.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
102
|
+
}
|
|
103
|
+
if (a) {
|
|
104
|
+
e.preventDefault();
|
|
105
|
+
const i = Date.now(), I = i - n.lastTime;
|
|
106
|
+
if (I > 0) {
|
|
107
|
+
const A = (t.clientY - n.lastY) / I;
|
|
108
|
+
n.velocity = n.velocity * 0.8 + A * 0.2;
|
|
109
|
+
}
|
|
110
|
+
n.lastY = t.clientY, n.lastTime = i;
|
|
111
|
+
const C = n.startHeight + L, G = o && r.current.parentElement?.offsetHeight || window.innerHeight, W = Math.max(0, Math.min(C, G));
|
|
112
|
+
r.current.style.transition = "none", r.current.style.height = `${W}px`;
|
|
113
|
+
}
|
|
114
|
+
}, [o]), q = c((e) => {
|
|
115
|
+
if (!f.current || !r.current) return;
|
|
116
|
+
const t = e, n = f.current, L = n.startY - t.clientY, a = n.isDragging || Math.abs(L) > 5;
|
|
117
|
+
if (!n.isDragging && a && (n.isDragging = !0, o)) {
|
|
118
|
+
const i = window.scrollY;
|
|
119
|
+
p.current = { scrollY: i }, document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.width = "100%";
|
|
120
|
+
}
|
|
121
|
+
if (a) {
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
const i = Date.now(), I = i - n.lastTime;
|
|
124
|
+
if (I > 0) {
|
|
125
|
+
const A = (t.clientY - n.lastY) / I;
|
|
126
|
+
n.velocity = n.velocity * 0.8 + A * 0.2;
|
|
127
|
+
}
|
|
128
|
+
n.lastY = t.clientY, n.lastTime = i;
|
|
129
|
+
const C = n.startHeight + L, G = o && r.current.parentElement?.offsetHeight || window.innerHeight, W = Math.max(0, Math.min(C, G));
|
|
130
|
+
r.current.style.transition = "none", r.current.style.height = `${W}px`;
|
|
131
|
+
}
|
|
132
|
+
}, [o]), b = c(() => {
|
|
133
|
+
if (!f.current || !r.current) return;
|
|
134
|
+
const e = f.current;
|
|
135
|
+
if (e.isDragging) {
|
|
136
|
+
N();
|
|
137
|
+
const t = r.current.offsetHeight, n = S(t, e.velocity);
|
|
138
|
+
H(n);
|
|
139
|
+
}
|
|
140
|
+
f.current = null;
|
|
141
|
+
}, [S, F, N]);
|
|
142
|
+
y(() => {
|
|
143
|
+
const e = T.current;
|
|
144
|
+
if (e)
|
|
145
|
+
return e.addEventListener("touchstart", h, { passive: !1 }), e.addEventListener("touchmove", z, { passive: !1 }), e.addEventListener("touchend", b), e.addEventListener("touchcancel", b), e.addEventListener("mousedown", k, { passive: !1 }), e.addEventListener("mousemove", q, { passive: !1 }), e.addEventListener("mouseup", b), e.addEventListener("mouseleave", b), () => {
|
|
146
|
+
e.removeEventListener("touchstart", h), e.removeEventListener("touchmove", z), e.removeEventListener("touchend", b), e.removeEventListener("touchcancel", b), e.removeEventListener("mousedown", k), e.removeEventListener("mousemove", q), e.removeEventListener("mouseup", b), e.removeEventListener("mouseleave", b);
|
|
147
|
+
};
|
|
148
|
+
}, [h, z, b]);
|
|
149
|
+
const E = Q(() => s !== "0%", [s]), [U, J] = $(() => u ? s !== "0%" : !0);
|
|
150
|
+
return y(() => {
|
|
151
|
+
u && E && J(!0);
|
|
152
|
+
}, [E, u]), y(() => {
|
|
153
|
+
if (!u) return;
|
|
154
|
+
const e = r.current;
|
|
155
|
+
if (!e) return;
|
|
156
|
+
const t = (n) => {
|
|
157
|
+
n.propertyName === "height" && !E && s === "0%" && J(!1);
|
|
158
|
+
};
|
|
159
|
+
return e.addEventListener("transitionend", t), () => {
|
|
160
|
+
e.removeEventListener("transitionend", t);
|
|
161
|
+
};
|
|
162
|
+
}, [E, s, u]), /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
163
|
+
R && /* @__PURE__ */ m.jsx(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: _(E ? "fixed inset-0 bg-black/40 z-55 cursor-default" : "hidden"),
|
|
167
|
+
onClick: (e) => {
|
|
168
|
+
e.preventDefault(), e.stopPropagation(), Y && H(0);
|
|
169
|
+
},
|
|
170
|
+
"aria-hidden": "true"
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ m.jsxs(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
ref: r,
|
|
177
|
+
className: _(
|
|
178
|
+
o ? "absolute" : "fixed",
|
|
179
|
+
"z-60 bottom-0 w-full overflow-hidden",
|
|
180
|
+
"bg-neutral-default-default",
|
|
181
|
+
"border-t border-neutral-strong-default rounded-t-[12px]",
|
|
182
|
+
E ? "" : "border-neutral-weak",
|
|
183
|
+
D,
|
|
184
|
+
"flex flex-col items-center",
|
|
185
|
+
"touch-none select-none"
|
|
186
|
+
),
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ m.jsx(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
ref: T,
|
|
192
|
+
className: "w-full absolute top-0 h-11 flex items-center justify-center cursor-grab active:cursor-grabbing z-50 bg-inherit!",
|
|
193
|
+
children: /* @__PURE__ */ m.jsx("span", { className: "w-12 h-1 rounded-full bg-neutral-weak-default" })
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
typeof x == "string" ? /* @__PURE__ */ m.jsx("p", { className: " prometeo-fonts-headline-small text-neutral-default-default w-full h-11 bg-inherit absolute top-11 z-50 px-4", children: x }) : x,
|
|
197
|
+
/* @__PURE__ */ m.jsx(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
ref: O,
|
|
201
|
+
className: _(
|
|
202
|
+
"w-full h-full overflow-y-auto px-4 pb-4 ",
|
|
203
|
+
x ? "mt-22" : "mt-11"
|
|
204
|
+
),
|
|
205
|
+
style: {
|
|
206
|
+
overscrollBehavior: "contain",
|
|
207
|
+
overflow: E ? "auto" : "hidden"
|
|
208
|
+
},
|
|
209
|
+
children: (!u || U) && (typeof l == "function" ? l(M) : l)
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
] });
|
|
216
|
+
}, oe = () => {
|
|
217
|
+
const l = v(null), [o, D] = $(!1), s = c((d, u) => {
|
|
218
|
+
l.current?.open(d, u);
|
|
219
|
+
}, []), g = c(() => {
|
|
220
|
+
l.current?.close();
|
|
221
|
+
}, []), w = c(() => l.current?.getContext() ?? null, []);
|
|
222
|
+
return y(() => {
|
|
223
|
+
const d = l.current?.subscribeOpenChange;
|
|
224
|
+
if (!d) return;
|
|
225
|
+
const u = d((x) => {
|
|
226
|
+
D(x);
|
|
227
|
+
});
|
|
228
|
+
return () => {
|
|
229
|
+
u && u();
|
|
230
|
+
};
|
|
231
|
+
}, [l.current?.subscribeOpenChange]), {
|
|
232
|
+
isOpen: o,
|
|
233
|
+
open: s,
|
|
234
|
+
close: g,
|
|
235
|
+
drawerRef: l,
|
|
236
|
+
getContext: w
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
export {
|
|
240
|
+
se as default,
|
|
241
|
+
oe as useDrawerMobile
|
|
242
|
+
};
|
package/dist/DropZone.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Error as P, Upload as R } from "./Icons.es.js";
|
|
3
3
|
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
|
-
import z, { useCallback as
|
|
5
|
-
import { useDropzone as
|
|
4
|
+
import z, { useCallback as w } from "react";
|
|
5
|
+
import { useDropzone as E } from "react-dropzone";
|
|
6
6
|
const q = z.forwardRef(
|
|
7
7
|
({
|
|
8
8
|
onFilesAccepted: d,
|
|
@@ -17,7 +17,7 @@ const q = z.forwardRef(
|
|
|
17
17
|
maxFiles: g = 1,
|
|
18
18
|
...j
|
|
19
19
|
}, N) => {
|
|
20
|
-
const b =
|
|
20
|
+
const b = w((s, o) => {
|
|
21
21
|
s.length > 0 && d?.(s), o.length > 0 && m?.(o);
|
|
22
22
|
}, [d, m]), {
|
|
23
23
|
getRootProps: y,
|
|
@@ -25,7 +25,7 @@ const q = z.forwardRef(
|
|
|
25
25
|
isDragActive: a,
|
|
26
26
|
isDragReject: r,
|
|
27
27
|
fileRejections: n
|
|
28
|
-
} =
|
|
28
|
+
} = E({
|
|
29
29
|
onDrop: b,
|
|
30
30
|
accept: v,
|
|
31
31
|
maxFiles: g,
|
package/dist/FAButton.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import u, { memo as n } from "react";
|
|
3
3
|
import { c as f } from "./cn-B6yFEsav.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Add as v } from "./Icons.es.js";
|
|
5
5
|
import { createPortal as m } from "react-dom";
|
|
6
6
|
import { c as b } from "./index-BOQuZ0gG.js";
|
|
7
7
|
const h = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { memo as i } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
3
|
+
import { c as r } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { Check as o, Error as n, Info as d } from "./Icons.es.js";
|
|
5
|
+
const a = (s) => {
|
|
6
6
|
const { variant: t, className: m } = s, l = {
|
|
7
7
|
default: "text-neutral-medium-default pt-[1px]",
|
|
8
8
|
error: "text-error-medium-default pt-[1px]",
|
|
@@ -12,13 +12,13 @@ const r = (s) => {
|
|
|
12
12
|
error: /* @__PURE__ */ e.jsx(n, { size: 16, className: "text-error-medium-default" }),
|
|
13
13
|
success: /* @__PURE__ */ e.jsx(o, { size: 16, className: "text-success-medium-default" })
|
|
14
14
|
};
|
|
15
|
-
return /* @__PURE__ */ e.jsx("div", { ref: s.ref, className:
|
|
15
|
+
return /* @__PURE__ */ e.jsx("div", { ref: s.ref, className: r("pl-3 mt-1", m), children: typeof s.children == "string" ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-0.5 items-start", children: [
|
|
16
16
|
c[t],
|
|
17
|
-
/* @__PURE__ */ e.jsx("p", { className:
|
|
17
|
+
/* @__PURE__ */ e.jsx("p", { className: r(" prometeo-fonts-body-small", l[t]), children: s.children })
|
|
18
18
|
] }) : s.children });
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
const j = i(
|
|
20
|
+
a.displayName = "HelperText";
|
|
21
|
+
const j = i(a);
|
|
22
22
|
export {
|
|
23
23
|
j as H
|
|
24
24
|
};
|
package/dist/Icons/Icons.d.ts
CHANGED
|
@@ -64,8 +64,8 @@ declare const UserAddFill: import('react').MemoExoticComponent<(props: IconProps
|
|
|
64
64
|
declare const EditFill: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
65
65
|
declare const TrashFill: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
66
66
|
declare const Company: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
67
|
-
export { Ticket, Home, Boards, Notifications, Help, Settings, CrevronLeft, CrevronRight, ArrowLeft, Shared, ChevronDown, Collapse, Calendar, Close, UserPerson, Logout, ArrowUpDown, Filter, Search, Stars, MoreVert, Add, Edit, Upload, Copy, FaLock, AccountCircle, UserAdd, AttachFile, HistoryActivity, MessageSquare, CloseNavBarDesktop, EyeVisibility, EyeVisibilityOff, Check, Info, Error, TicketFilled, UploadCloud, Clock, Pause, FastForward, Trash, Sort, Cancel, CheckCircle, FormatColorText, CheckList, WhatsApp, File, Email, Download, Reload, Image, DocumentFill, Company, EditFill, TrashFill, MessageSquareFill, UserAddFill
|
|
68
|
-
declare const Icons: {
|
|
67
|
+
export { Ticket, Home, Boards, Notifications, Help, Settings, CrevronLeft, CrevronRight, ArrowLeft, Shared, ChevronDown, Collapse, Calendar, Close, UserPerson, Logout, ArrowUpDown, Filter, Search, Stars, MoreVert, Add, Edit, Upload, Copy, FaLock, AccountCircle, UserAdd, AttachFile, HistoryActivity, MessageSquare, CloseNavBarDesktop, EyeVisibility, EyeVisibilityOff, Check, Info, Error, TicketFilled, UploadCloud, Clock, Pause, FastForward, Trash, Sort, Cancel, CheckCircle, FormatColorText, CheckList, WhatsApp, File, Email, Download, Reload, Image, DocumentFill, Company, EditFill, TrashFill, MessageSquareFill, UserAddFill };
|
|
68
|
+
export declare const Icons: {
|
|
69
69
|
readonly Ticket: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
70
70
|
readonly Home: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
71
71
|
readonly Boards: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
@@ -127,6 +127,5 @@ declare const Icons: {
|
|
|
127
127
|
readonly MessageSquareFill: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
128
128
|
readonly UserAddFill: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
129
129
|
};
|
|
130
|
-
export * as Icons from './Icons';
|
|
131
130
|
export type IconName = keyof typeof Icons;
|
|
132
131
|
export type IconComponent = (typeof Icons)[IconName];
|