prometeo-design-system 2.2.2 → 2.3.1
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-DsbEyjth.js → Button-Bc0LYLfg.js} +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/{CardProfile-BhFog7j5.js → CardProfile-BiYr6kY9.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 +1 -1
- 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.es.js +1 -1
- package/dist/Image.d.ts +4 -0
- package/dist/Image.es.js +91 -0
- package/dist/ImageGallery-O5Y4oBrD.js +352 -0
- package/dist/ImageGallery.d.ts +6 -0
- package/dist/ImageGallery.es.js +23 -0
- 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/SegmentedButton.d.ts +2 -0
- package/dist/SegmentedButton.es.js +188 -0
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/Skeleton.es.js +33 -32
- 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 +1 -1
- 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/Image/GalleryPreview.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +23 -0
- package/dist/components/Image/ImageGallery.d.ts +18 -0
- package/dist/components/Image/LightBox.d.ts +14 -0
- package/dist/components/Image/index.d.ts +5 -0
- package/dist/components/Image/useImageGallery.d.ts +10 -0
- package/dist/exports/Image.d.ts +1 -0
- package/dist/exports/ImageGallery.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/pages/ImagesPage.d.ts +2 -0
- package/dist/preview/ImagePreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +272 -447
- package/package.json +9 -1
package/dist/Avatar.es.js
CHANGED
package/dist/Button.es.js
CHANGED
package/dist/CardProfile.es.js
CHANGED
package/dist/CheckBox.es.js
CHANGED
package/dist/DatePicker.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { j as $ } from "./jsx-runtime-
|
|
1
|
+
import { j as $ } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import m, { createContext as mn, useContext as hn, useCallback as q, useRef as Se, useLayoutEffect as yn, useState as he, useEffect as _e, useMemo as fe, memo as pn } from "react";
|
|
3
3
|
import { InputMultiple as gn } from "./InputMultiple.es.js";
|
|
4
4
|
import wn from "./Input.es.js";
|
|
5
5
|
import { createPortal as bn } from "react-dom";
|
|
6
6
|
import { Icons as Mt } from "./Icons.es.js";
|
|
7
7
|
import { c as Be } from "./cn-B6yFEsav.js";
|
|
8
|
-
import { B as vt } from "./Button-
|
|
8
|
+
import { B as vt } from "./Button-Bc0LYLfg.js";
|
|
9
9
|
function Mn(e, t, n = "long") {
|
|
10
10
|
return new Intl.DateTimeFormat("en-US", {
|
|
11
11
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
package/dist/DialogModal.es.js
CHANGED
package/dist/DrawerDesktop.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as s } from "./jsx-runtime-
|
|
1
|
+
import { j as s } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as b } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { c as y, B as h } from "./Button-
|
|
3
|
+
import { c as y, B as h } from "./Button-Bc0LYLfg.js";
|
|
4
4
|
import { createPortal as g } from "react-dom";
|
|
5
5
|
import { Icons as C } from "./Icons.es.js";
|
|
6
6
|
import { forwardRef as k, useState as j, useRef as x, useEffect as v, useCallback as l, useImperativeHandle as D } from "react";
|
package/dist/DrawerMobile.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as d } from "./jsx-runtime-
|
|
1
|
+
import { j as d } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as T } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { forwardRef as q, useState as J, useRef as v, useEffect as M, useCallback as l, useMemo as B, useImperativeHandle as K } from "react";
|
|
4
4
|
import { createPortal as Q } from "react-dom";
|
package/dist/DropZone.es.js
CHANGED
package/dist/Header.es.js
CHANGED
package/dist/Icons.es.js
CHANGED
package/dist/Image.d.ts
ADDED
package/dist/Image.es.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { j as n } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { memo as x, useState as E, useRef as R, useCallback as N, useEffect as b } from "react";
|
|
3
|
+
import M from "./Spinner.es.js";
|
|
4
|
+
import { c as d } from "./cn-B6yFEsav.js";
|
|
5
|
+
import { Skeleton as S } from "./Skeleton.es.js";
|
|
6
|
+
const T = (s, e) => {
|
|
7
|
+
if (s.src !== e.src || s.alt !== e.alt || s.width !== e.width || s.height !== e.height || s.className !== e.className || s.lazy !== e.lazy || s.showLoader !== e.showLoader || s.allowPreview !== e.allowPreview) return !1;
|
|
8
|
+
const r = s.loaderProps, a = e.loaderProps;
|
|
9
|
+
return !(r !== a && (!r || !a || r.loaderType !== a.loaderType || r.variant !== a.variant || r.speedMultiplier !== a.speedMultiplier || r.className !== a.className || r.size !== a.size || r.backdropClassName !== a.backdropClassName));
|
|
10
|
+
}, D = x(
|
|
11
|
+
(s) => {
|
|
12
|
+
const { src: e, alt: r, width: a, height: c, className: f, lazy: y = !0, showLoader: k = !0, loaderProps: I, allowPreview: t = !1, galleryRef: l } = s, { variant: v = "clip", speedMultiplier: j = 0.7, className: z, size: C = 48, backdropClassName: L, loaderType: u = "clasic" } = I || {}, [m, g] = E(!0), h = R(!1), p = N((i) => {
|
|
13
|
+
const o = new Image();
|
|
14
|
+
o.src = i, o.onload = () => {
|
|
15
|
+
g(!1);
|
|
16
|
+
}, o.onerror = () => {
|
|
17
|
+
g(!1);
|
|
18
|
+
};
|
|
19
|
+
}, []);
|
|
20
|
+
b(() => {
|
|
21
|
+
p(e);
|
|
22
|
+
}, [e, p]), b(() => {
|
|
23
|
+
l?.current && !h.current && (l.current.addImage({ src: e, alt: r, width: a, height: c, className: f }), h.current = !0);
|
|
24
|
+
}, [l, e, r, a, c, f]);
|
|
25
|
+
const w = N(() => {
|
|
26
|
+
if (t && l?.current) {
|
|
27
|
+
const o = l.current.images.findIndex((P) => P.src === e);
|
|
28
|
+
l.current.openLightbox(o >= 0 ? o : 0);
|
|
29
|
+
}
|
|
30
|
+
}, [t, l, e]);
|
|
31
|
+
return (
|
|
32
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: false positive
|
|
33
|
+
/* @__PURE__ */ n.jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: d(
|
|
37
|
+
"relative rounded-2xl overflow-hidden select-none",
|
|
38
|
+
t && l && "cursor-pointer hover:brightness-75 transition-all ease-in-out duration-300",
|
|
39
|
+
f
|
|
40
|
+
),
|
|
41
|
+
style: {
|
|
42
|
+
width: a,
|
|
43
|
+
height: c,
|
|
44
|
+
minWidth: a,
|
|
45
|
+
minHeight: c
|
|
46
|
+
},
|
|
47
|
+
onClick: w,
|
|
48
|
+
role: t ? "button" : void 0,
|
|
49
|
+
tabIndex: t ? 0 : void 0,
|
|
50
|
+
onKeyDown: t ? (i) => {
|
|
51
|
+
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), w());
|
|
52
|
+
} : void 0,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ n.jsx(
|
|
55
|
+
"img",
|
|
56
|
+
{
|
|
57
|
+
draggable: !1,
|
|
58
|
+
src: e,
|
|
59
|
+
alt: r,
|
|
60
|
+
className: d("object-cover", f, "w-full h-full"),
|
|
61
|
+
loading: y ? "lazy" : "eager"
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
m && k && /* @__PURE__ */ n.jsx(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: d(
|
|
68
|
+
"absolute grid place-items-center",
|
|
69
|
+
"inset-0",
|
|
70
|
+
u === "skeleton" ? "bg-inherit" : "bg-black/30",
|
|
71
|
+
L
|
|
72
|
+
),
|
|
73
|
+
children: u === "clasic" ? /* @__PURE__ */ n.jsx(M, { variant: v, speedMultiplier: j, loading: m, className: z, size: C }) : /* @__PURE__ */ n.jsx(
|
|
74
|
+
S,
|
|
75
|
+
{
|
|
76
|
+
className: "w-full h-full z-100"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
T
|
|
87
|
+
);
|
|
88
|
+
D.displayName = "Image";
|
|
89
|
+
export {
|
|
90
|
+
D as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { j as n } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import ee, { memo as z, forwardRef as O, useRef as w, useCallback as a, useEffect as te, useState as I, useImperativeHandle as re } from "react";
|
|
3
|
+
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { B as R } from "./Button-Bc0LYLfg.js";
|
|
5
|
+
import { Icons as S } from "./Icons.es.js";
|
|
6
|
+
const F = z(O(({ images: s, className: f }, o) => {
|
|
7
|
+
const h = w(null), r = w({
|
|
8
|
+
isDragging: !1,
|
|
9
|
+
startX: 0,
|
|
10
|
+
scrollLeft: 0,
|
|
11
|
+
totalDistance: 0,
|
|
12
|
+
lastX: 0,
|
|
13
|
+
lastTime: 0,
|
|
14
|
+
velocity: 0
|
|
15
|
+
}), i = w(null), u = a(() => {
|
|
16
|
+
const e = h.current;
|
|
17
|
+
if (!e) return;
|
|
18
|
+
const c = 0.9;
|
|
19
|
+
Math.abs(r.current.velocity) > 0.5 ? (e.scrollLeft -= r.current.velocity, r.current.velocity *= c, i.current = requestAnimationFrame(u)) : (r.current.velocity = 0, i.current && (cancelAnimationFrame(i.current), i.current = null));
|
|
20
|
+
}, []), l = a((e) => {
|
|
21
|
+
const c = h.current;
|
|
22
|
+
if (!c) return;
|
|
23
|
+
i.current && (cancelAnimationFrame(i.current), i.current = null);
|
|
24
|
+
const p = Date.now();
|
|
25
|
+
r.current = {
|
|
26
|
+
isDragging: !0,
|
|
27
|
+
startX: e.pageX - c.offsetLeft,
|
|
28
|
+
scrollLeft: c.scrollLeft,
|
|
29
|
+
totalDistance: 0,
|
|
30
|
+
lastX: e.pageX - c.offsetLeft,
|
|
31
|
+
lastTime: p,
|
|
32
|
+
velocity: 0
|
|
33
|
+
}, c.style.cursor = "grabbing", c.style.scrollBehavior = "auto", c.style.userSelect = "none";
|
|
34
|
+
}, []), M = a((e) => {
|
|
35
|
+
const c = h.current;
|
|
36
|
+
if (!c || !r.current.isDragging) return;
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
const p = Date.now(), y = e.pageX - c.offsetLeft, D = y - r.current.startX, b = p - r.current.lastTime;
|
|
39
|
+
if (r.current.totalDistance += Math.abs(D), b > 0) {
|
|
40
|
+
const j = y - r.current.lastX;
|
|
41
|
+
r.current.velocity = j / b * 16;
|
|
42
|
+
}
|
|
43
|
+
r.current.lastX = y, r.current.lastTime = p, c.scrollLeft = r.current.scrollLeft - D;
|
|
44
|
+
}, []), d = a(() => {
|
|
45
|
+
const e = h.current;
|
|
46
|
+
e && (e.style.cursor = "grab", e.style.userSelect = "auto", Math.abs(r.current.velocity) > 1 && u(), r.current.isDragging = !1);
|
|
47
|
+
}, [u]), v = a(() => {
|
|
48
|
+
const e = h.current;
|
|
49
|
+
e && r.current.isDragging && (e.style.cursor = "grab", e.style.userSelect = "auto", Math.abs(r.current.velocity) > 1 && u(), r.current.isDragging = !1);
|
|
50
|
+
}, [u]), x = a(() => r.current.totalDistance < 5, []), m = a((e) => {
|
|
51
|
+
x() || (e.preventDefault(), e.stopPropagation());
|
|
52
|
+
}, [x]);
|
|
53
|
+
return /* @__PURE__ */ n.jsx(
|
|
54
|
+
"section",
|
|
55
|
+
{
|
|
56
|
+
ref: h,
|
|
57
|
+
className: L("flex gap-4 w-full overflow-x-auto py-2 relative", f),
|
|
58
|
+
style: {},
|
|
59
|
+
onMouseDown: l,
|
|
60
|
+
onMouseMove: M,
|
|
61
|
+
onMouseUp: d,
|
|
62
|
+
onMouseLeave: v,
|
|
63
|
+
onClickCapture: m,
|
|
64
|
+
"aria-label": "Image gallery",
|
|
65
|
+
children: s && s.length > 0 && s.map((e, c) => ee.cloneElement(e, {
|
|
66
|
+
key: e.props.src || c,
|
|
67
|
+
...e.props,
|
|
68
|
+
galleryRef: o,
|
|
69
|
+
allowPreview: !0
|
|
70
|
+
}))
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}));
|
|
74
|
+
F.displayName = "GalleryPreview";
|
|
75
|
+
const H = z(({ images: s, lightboxClassName: f, closeLightbox: o, showThumbnails: h, thumbnailsClassName: r, currentIndex: i, goToNext: u, goToPrevious: l, goToIndex: M }) => {
|
|
76
|
+
const d = w(null), v = w(null), x = w(null), m = w({
|
|
77
|
+
scale: 1,
|
|
78
|
+
translateX: 0,
|
|
79
|
+
translateY: 0
|
|
80
|
+
}), e = w({
|
|
81
|
+
startX: 0,
|
|
82
|
+
startY: 0,
|
|
83
|
+
isDragging: !1,
|
|
84
|
+
distanceX: 0,
|
|
85
|
+
distanceY: 0
|
|
86
|
+
});
|
|
87
|
+
te(() => {
|
|
88
|
+
x.current && x.current.focus();
|
|
89
|
+
}, []);
|
|
90
|
+
const c = a((t) => {
|
|
91
|
+
t.preventDefault(), t.stopPropagation(), t.key === "Escape" ? o() : t.key === "ArrowLeft" ? l() : t.key === "ArrowRight" && u();
|
|
92
|
+
}, [o, l, u]), p = a((t) => {
|
|
93
|
+
e.current = { startX: t.touches[0].clientX, startY: t.touches[0].clientY, isDragging: !0, distanceX: 0, distanceY: 0 };
|
|
94
|
+
}, []), y = a((t) => {
|
|
95
|
+
const X = t.touches[0];
|
|
96
|
+
e.current = { ...e.current, isDragging: !0, distanceX: X.clientX - e.current.startX, distanceY: X.clientY - e.current.startY };
|
|
97
|
+
}, []), D = a(() => {
|
|
98
|
+
e.current = { ...e.current, startX: 0, startY: 0, isDragging: !1 }, Math.abs(e.current.distanceX) > Math.abs(e.current.distanceY) && (e.current.distanceX < 0 ? u() : l());
|
|
99
|
+
}, [u, l]), b = a(() => {
|
|
100
|
+
const t = d.current;
|
|
101
|
+
if (!t) return;
|
|
102
|
+
const { scale: X, translateX: Y, translateY: k } = m.current;
|
|
103
|
+
t.style.transform = `scale(${X}) translate(${Y}px, ${k}px)`, t.style.transformOrigin = "center center", t.style.transition = "transform 0.1s ease-out";
|
|
104
|
+
}, []), j = a(() => {
|
|
105
|
+
m.current = { scale: 1, translateX: 0, translateY: 0 }, d.current && (d.current.style.transform = "scale(1) translate(0px, 0px)", d.current.style.transformOrigin = "center center");
|
|
106
|
+
}, []), g = a((t) => {
|
|
107
|
+
const X = d.current, Y = v.current;
|
|
108
|
+
if (!X || !Y) return;
|
|
109
|
+
if (t.shiftKey) {
|
|
110
|
+
t.deltaY < 0 ? u() : t.deltaY > 0 && l();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const k = 2e-3, E = 1, _ = 8, B = -t.deltaY * k, T = m.current.scale;
|
|
114
|
+
let C = T + B;
|
|
115
|
+
if (C = Math.max(E, Math.min(_, C)), C === E) {
|
|
116
|
+
j();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const N = Y.getBoundingClientRect(), K = t.clientX - N.left, G = t.clientY - N.top, W = N.width / 2, q = N.height / 2, V = K - W, $ = G - q, A = C / T, U = m.current.translateX, Z = m.current.translateY, J = U - V * (A - 1) / C, Q = Z - $ * (A - 1) / C;
|
|
120
|
+
m.current = {
|
|
121
|
+
scale: C,
|
|
122
|
+
translateX: J,
|
|
123
|
+
translateY: Q
|
|
124
|
+
}, b();
|
|
125
|
+
}, [u, l, b, j]);
|
|
126
|
+
return s.length === 0 ? null : /* @__PURE__ */ n.jsxs(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
ref: x,
|
|
130
|
+
className: L("fixed inset-0 z-50 bg-black/90 flex items-center justify-center lg:px-16", f),
|
|
131
|
+
onClick: o,
|
|
132
|
+
onKeyDown: c,
|
|
133
|
+
onTouchStart: p,
|
|
134
|
+
onTouchMove: y,
|
|
135
|
+
onTouchEnd: D,
|
|
136
|
+
tabIndex: 0,
|
|
137
|
+
role: "dialog",
|
|
138
|
+
"aria-modal": "true",
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ n.jsx("div", { className: "absolute top-4 right-4 z-110", children: /* @__PURE__ */ n.jsx(
|
|
141
|
+
R,
|
|
142
|
+
{
|
|
143
|
+
variant: "text",
|
|
144
|
+
color: "secondary",
|
|
145
|
+
size: "small",
|
|
146
|
+
onClick: o,
|
|
147
|
+
className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
|
|
148
|
+
"aria-label": "Close gallery",
|
|
149
|
+
children: /* @__PURE__ */ n.jsx(S.Close, { size: 24 })
|
|
150
|
+
}
|
|
151
|
+
) }),
|
|
152
|
+
s.length > 1 && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
153
|
+
/* @__PURE__ */ n.jsx(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
className: "absolute left-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-w-resize",
|
|
157
|
+
onClick: (t) => {
|
|
158
|
+
t.stopPropagation(), l();
|
|
159
|
+
},
|
|
160
|
+
children: /* @__PURE__ */ n.jsx(
|
|
161
|
+
R,
|
|
162
|
+
{
|
|
163
|
+
variant: "text",
|
|
164
|
+
color: "secondary",
|
|
165
|
+
size: "small",
|
|
166
|
+
onClick: (t) => {
|
|
167
|
+
t.stopPropagation(), l();
|
|
168
|
+
},
|
|
169
|
+
className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
|
|
170
|
+
"aria-label": "Previous image",
|
|
171
|
+
children: /* @__PURE__ */ n.jsx(S.CrevronLeft, { size: 24 })
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ n.jsx(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: "absolute right-0 lg:h-full items-center flex justify-center w-16 z-100 cursor-e-resize",
|
|
180
|
+
onClick: (t) => {
|
|
181
|
+
t.stopPropagation(), u();
|
|
182
|
+
},
|
|
183
|
+
children: /* @__PURE__ */ n.jsx(
|
|
184
|
+
R,
|
|
185
|
+
{
|
|
186
|
+
variant: "text",
|
|
187
|
+
color: "secondary",
|
|
188
|
+
size: "small",
|
|
189
|
+
onClick: (t) => {
|
|
190
|
+
t.stopPropagation(), u();
|
|
191
|
+
},
|
|
192
|
+
className: "!text-white hover:!text-gray-300 !w-auto !h-auto !p-2",
|
|
193
|
+
"aria-label": "Next image",
|
|
194
|
+
children: /* @__PURE__ */ n.jsx(S.CrevronRight, { size: 24 })
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
] }),
|
|
200
|
+
/* @__PURE__ */ n.jsx(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
ref: v,
|
|
204
|
+
onClick: (t) => t.stopPropagation(),
|
|
205
|
+
className: "relative max-w-[90vw] max-h-[98vh] mx-auto flex flex-col w-max lg:h-full h-max",
|
|
206
|
+
onWheel: g,
|
|
207
|
+
children: /* @__PURE__ */ n.jsx(
|
|
208
|
+
"div",
|
|
209
|
+
{
|
|
210
|
+
className: "max-h-[98vh] relative overflow-hidden w-full h-full",
|
|
211
|
+
style: {
|
|
212
|
+
animation: "galleryFadeIn 0.6s ease-in-out"
|
|
213
|
+
},
|
|
214
|
+
ref: d,
|
|
215
|
+
children: /* @__PURE__ */ n.jsx(
|
|
216
|
+
"img",
|
|
217
|
+
{
|
|
218
|
+
src: s[i].src,
|
|
219
|
+
alt: s[i].alt,
|
|
220
|
+
className: L(
|
|
221
|
+
" w-full h-full object-contain select-none",
|
|
222
|
+
"prometeo-lightbox-image"
|
|
223
|
+
),
|
|
224
|
+
onLoad: () => j()
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
},
|
|
228
|
+
i
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
h && /* @__PURE__ */ n.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-[100] bottom-0", children: /* @__PURE__ */ n.jsx(P, { images: s, currentIndex: i, goToIndex: M, thumbnailsClassName: r }) }),
|
|
233
|
+
s.length > 1 && /* @__PURE__ */ n.jsxs("div", { className: "absolute bottom-20 left-1/2 transform -translate-x-1/2 text-neutral-default-default prometeo-fonts-label-xlarge px-4 py-2 rounded-full", children: [
|
|
234
|
+
i + 1,
|
|
235
|
+
" / ",
|
|
236
|
+
s.length
|
|
237
|
+
] })
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
);
|
|
241
|
+
});
|
|
242
|
+
H.displayName = "LightBox";
|
|
243
|
+
const ne = (s, f) => {
|
|
244
|
+
if (s.currentIndex !== f.currentIndex || s.thumbnailsClassName !== f.thumbnailsClassName || s.images.length !== f.images.length) return !1;
|
|
245
|
+
for (let o = 0; o < s.images.length; o++)
|
|
246
|
+
if (s.images[o].src !== f.images[o].src) return !1;
|
|
247
|
+
return !0;
|
|
248
|
+
}, P = z(({ images: s, currentIndex: f, goToIndex: o, thumbnailsClassName: h }) => /* @__PURE__ */ n.jsxs(
|
|
249
|
+
"div",
|
|
250
|
+
{
|
|
251
|
+
className: "flex gap-4 w-max overflow-x-auto overflow-y-visible max-w-full px-16 py-4",
|
|
252
|
+
style: {
|
|
253
|
+
scrollbarWidth: "none",
|
|
254
|
+
msOverflowStyle: "none",
|
|
255
|
+
WebkitOverflowScrolling: "touch"
|
|
256
|
+
},
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ n.jsx("style", { children: `
|
|
259
|
+
.flex.gap-4.w-max::-webkit-scrollbar {
|
|
260
|
+
display: none;
|
|
261
|
+
}
|
|
262
|
+
` }),
|
|
263
|
+
s.map((r, i) => /* @__PURE__ */ n.jsx(
|
|
264
|
+
"button",
|
|
265
|
+
{
|
|
266
|
+
type: "button",
|
|
267
|
+
onClick: (u) => {
|
|
268
|
+
u.stopPropagation(), o(i);
|
|
269
|
+
},
|
|
270
|
+
className: L(
|
|
271
|
+
"w-16 h-16 aspect-square min-w-16 rounded overflow-hidden transition-all duration-300 hover:scale-125 cursor-pointer",
|
|
272
|
+
h,
|
|
273
|
+
i === f ? "scale-110" : ""
|
|
274
|
+
),
|
|
275
|
+
children: /* @__PURE__ */ n.jsx(
|
|
276
|
+
"img",
|
|
277
|
+
{
|
|
278
|
+
src: r.src,
|
|
279
|
+
alt: r.alt,
|
|
280
|
+
className: "w-full h-full object-cover select-none"
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
},
|
|
284
|
+
r.src
|
|
285
|
+
))
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
), ne);
|
|
289
|
+
P.displayName = "Thumbnails";
|
|
290
|
+
const se = O(
|
|
291
|
+
(s, f) => {
|
|
292
|
+
const {
|
|
293
|
+
children: o,
|
|
294
|
+
className: h,
|
|
295
|
+
lightboxClassName: r,
|
|
296
|
+
showThumbnails: i,
|
|
297
|
+
thumbnailsClassName: u
|
|
298
|
+
} = s, [l, M] = I([]), [d, v] = I(!1), [x, m] = I(0), e = o ? Array.isArray(o) ? o : [o] : [], c = a((g) => {
|
|
299
|
+
M((t) => t.some((Y) => Y.src === g.src) ? t : [...t, g]);
|
|
300
|
+
}, []), p = a((g = 0) => {
|
|
301
|
+
m(g), v(!0);
|
|
302
|
+
}, []), y = a(() => {
|
|
303
|
+
v(!1);
|
|
304
|
+
}, []);
|
|
305
|
+
re(
|
|
306
|
+
f,
|
|
307
|
+
() => ({
|
|
308
|
+
openLightbox: p,
|
|
309
|
+
closeLightbox: y,
|
|
310
|
+
isOpen: d,
|
|
311
|
+
addImage: c,
|
|
312
|
+
images: l
|
|
313
|
+
}),
|
|
314
|
+
[l]
|
|
315
|
+
);
|
|
316
|
+
const D = a(() => {
|
|
317
|
+
m((g) => (g + 1) % l.length);
|
|
318
|
+
}, [l.length]), b = a(() => {
|
|
319
|
+
m((g) => (g - 1 + l.length) % l.length);
|
|
320
|
+
}, [l.length]), j = a((g) => {
|
|
321
|
+
m(g);
|
|
322
|
+
}, []);
|
|
323
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
324
|
+
/* @__PURE__ */ n.jsx(
|
|
325
|
+
F,
|
|
326
|
+
{
|
|
327
|
+
images: e,
|
|
328
|
+
className: h,
|
|
329
|
+
ref: f
|
|
330
|
+
}
|
|
331
|
+
),
|
|
332
|
+
d && /* @__PURE__ */ n.jsx(
|
|
333
|
+
H,
|
|
334
|
+
{
|
|
335
|
+
images: l,
|
|
336
|
+
closeLightbox: y,
|
|
337
|
+
showThumbnails: i,
|
|
338
|
+
lightboxClassName: r,
|
|
339
|
+
thumbnailsClassName: u,
|
|
340
|
+
currentIndex: x,
|
|
341
|
+
goToNext: D,
|
|
342
|
+
goToPrevious: b,
|
|
343
|
+
goToIndex: j
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
] });
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
se.displayName = "ImageGallery";
|
|
350
|
+
export {
|
|
351
|
+
se as I
|
|
352
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { I as p } from "./ImageGallery-O5Y4oBrD.js";
|
|
2
|
+
import { useRef as u, useCallback as r } from "react";
|
|
3
|
+
const g = () => {
|
|
4
|
+
const e = u(null), t = r((a) => {
|
|
5
|
+
e.current?.addImage(a);
|
|
6
|
+
}, []), n = r(() => {
|
|
7
|
+
e.current?.openLightbox();
|
|
8
|
+
}, []), o = r(() => {
|
|
9
|
+
e.current?.closeLightbox();
|
|
10
|
+
}, []), s = r(() => e.current?.isOpen ?? !1, []), c = r(() => e.current?.images ?? [], []);
|
|
11
|
+
return {
|
|
12
|
+
isOpen: s,
|
|
13
|
+
openLightbox: n,
|
|
14
|
+
closeLightbox: o,
|
|
15
|
+
galleryRef: e,
|
|
16
|
+
addImage: t,
|
|
17
|
+
images: c
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
p as default,
|
|
22
|
+
g as useImageGallery
|
|
23
|
+
};
|
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 J } from "./Icons.es.js";
|
|
3
3
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { memo as xe, useState as H, useRef as K, useCallback as me, useEffect as L, useLayoutEffect as ge } 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 C } from "./Icons.es.js";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
4
|
import S, { useRef as M, useState as x, useCallback as T, useEffect as ee } 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";
|