prometeo-design-system 2.8.1 → 2.8.2
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 +5 -5
- package/dist/{CardProfile-CHUivLbW.js → CardProfile-WHoeSibd.js} +28 -28
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +4 -4
- package/dist/DatePicker.es.js +68 -68
- package/dist/DrawerDesktop.es.js +9 -9
- package/dist/DropZone.es.js +32 -32
- package/dist/FAButton.es.js +2 -2
- package/dist/HelperComponent-BeNlTMqI.js +24 -0
- package/dist/Icons/Icons.d.ts +2 -2
- package/dist/Icons.es.js +1053 -2
- package/dist/{ImageGallery-TkgHO3JL.js → ImageGallery-WKzUevOQ.js} +43 -43
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-CsNlU1Hu.js → Input-Bdiozi8s.js} +7 -14
- package/dist/Input.es.js +1 -1
- package/dist/InputMultiple.es.js +51 -51
- package/dist/Logo.es.js +3 -3
- package/dist/Menu.es.js +2 -2
- package/dist/OtpInput.es.js +68 -68
- package/dist/Pagination.es.js +1 -1
- package/dist/RadioButton.es.js +1 -1
- package/dist/{Select-D7Cs1OlG.js → Select-DpnghyhT.js} +4 -4
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/Steps.es.js +14 -14
- package/dist/TabLinks.es.js +2 -2
- package/dist/Table.es.js +2 -2
- package/dist/Toast.es.js +23 -23
- package/dist/Tooltip.es.js +7 -7
- package/dist/components/Spinner/SpinnerV2.d.ts +12 -0
- package/dist/components/Toaster/Toaster.d.ts +3 -3
- package/dist/exports/Icons.d.ts +1 -1
- package/dist/index.d.ts +0 -12
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +111 -122
- package/package.json +1 -23
- package/dist/CheckboxFormik.d.ts +0 -6
- package/dist/CheckboxFormik.es.js +0 -88
- package/dist/HelperComponent-CcGxM09g.js +0 -24
- package/dist/Icons-ChYkaR8R.js +0 -899
- package/dist/InputFormik.d.ts +0 -6
- package/dist/InputFormik.es.js +0 -213
- package/dist/InputFormikV2.d.ts +0 -6
- package/dist/InputFormikV2.es.js +0 -41
- package/dist/RadioButtonFormik.d.ts +0 -2
- package/dist/RadioButtonFormik.es.js +0 -30
- package/dist/SelectFormik.d.ts +0 -6
- package/dist/SelectFormik.es.js +0 -62
- package/dist/SelectFormikLegacy.d.ts +0 -6
- package/dist/SelectFormikLegacy.es.js +0 -194
- package/dist/components/CheckboxFormik/CheckboxFormik.d.ts +0 -12
- package/dist/components/InputFormik/InputFormik.d.ts +0 -23
- package/dist/components/InputFormik/InputFormikV2.d.ts +0 -6
- package/dist/components/RadioButtonFormik/RadioButtonFormik.d.ts +0 -8
- package/dist/components/SelectFormik/SelectFormik.d.ts +0 -8
- package/dist/components/SelectFormik/SelectFormikLegacy.d.ts +0 -21
- package/dist/exports/CheckboxFormik.d.ts +0 -2
- package/dist/exports/InputFormik.d.ts +0 -2
- package/dist/exports/InputFormikV2.d.ts +0 -2
- package/dist/exports/RadioButtonFormik.d.ts +0 -1
- package/dist/exports/SelectFormik.d.ts +0 -2
- package/dist/exports/SelectFormikLegacy.d.ts +0 -2
- package/dist/pages/Autocomplete.page.d.ts +0 -2
- package/dist/pages/ButtonsPage.d.ts +0 -2
- package/dist/pages/DatePicker.d.ts +0 -2
- package/dist/pages/DialogPage.d.ts +0 -2
- package/dist/pages/DrawersPage.d.ts +0 -2
- package/dist/pages/ImagesPage.d.ts +0 -2
- package/dist/pages/OtpPage.d.ts +0 -2
- package/dist/pages/RecurrentDatePicker.page.d.ts +0 -2
- package/dist/pages/SelectsPage.d.ts +0 -2
- package/dist/pages/Skeletons.d.ts +0 -2
- package/dist/pages/ToastsPage.d.ts +0 -2
- package/dist/preview/AutocompletePreview.d.ts +0 -2
- package/dist/preview/ButtonPreview.d.ts +0 -2
- package/dist/preview/DialogModalPreview.d.ts +0 -2
- package/dist/preview/DrawerMobilePreview.d.ts +0 -2
- package/dist/preview/Dropzone.d.ts +0 -2
- package/dist/preview/FABPreview.d.ts +0 -2
- package/dist/preview/IconsPreview.d.ts +0 -2
- package/dist/preview/ImagePreview.d.ts +0 -2
- package/dist/preview/InputsPreviews.d.ts +0 -2
- package/dist/preview/Layout.d.ts +0 -2
- package/dist/preview/OTPPreview.d.ts +0 -2
- package/dist/preview/RadioButtonPreview.d.ts +0 -2
- package/dist/preview/RecurrentDatePickerPreview.d.ts +0 -2
- package/dist/preview/SegmentedButtonPreview.d.ts +0 -2
- package/dist/preview/SelectPreview/CustomFooterExample.d.ts +0 -2
- package/dist/preview/SelectPreview/SelectGroupedOptionsPreview.d.ts +0 -2
- package/dist/preview/SelectPreview/SelectPreview.d.ts +0 -2
- package/dist/preview/SidebarPreview.d.ts +0 -2
- package/dist/preview/StepsPreview.d.ts +0 -2
- package/dist/preview/SwitchPreview.d.ts +0 -2
- package/dist/preview/TabLinks.d.ts +0 -2
- package/dist/preview/TablePreview.d.ts +0 -2
- package/dist/preview/TextArea.d.ts +0 -2
- package/dist/preview/ToastsPreview.d.ts +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import
|
|
2
|
+
import Q, { memo as M, forwardRef as A, useRef as v, useEffect as ee, useCallback as i, useState as R, useImperativeHandle as te } from "react";
|
|
3
3
|
import { c as X } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { u as
|
|
4
|
+
import { u as ne } from "./useDragScroll-CHN9OMwn.js";
|
|
5
5
|
import S from "./Button.es.js";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
const { ref: d, bind: a } =
|
|
6
|
+
import { Close as re, CrevronLeft as se, CrevronRight as ae } from "./Icons.es.js";
|
|
7
|
+
const L = M(A(({ images: n, className: c }, r) => {
|
|
8
|
+
const { ref: d, bind: a } = ne({
|
|
9
9
|
axis: "x",
|
|
10
10
|
friction: 0.9,
|
|
11
11
|
minVelocity: 0.5,
|
|
@@ -27,7 +27,7 @@ const O = D(L(({ images: n, className: c }, r) => {
|
|
|
27
27
|
onPointerCancel: a.onPointerCancel,
|
|
28
28
|
onClickCapture: a.onClickCapture,
|
|
29
29
|
"aria-label": "Image gallery",
|
|
30
|
-
children: n && n.length > 0 && n.map((l, o) =>
|
|
30
|
+
children: n && n.length > 0 && n.map((l, o) => Q.cloneElement(l, {
|
|
31
31
|
key: l.props.src || o,
|
|
32
32
|
...l.props,
|
|
33
33
|
galleryRef: r,
|
|
@@ -36,8 +36,8 @@ const O = D(L(({ images: n, className: c }, r) => {
|
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
}));
|
|
39
|
-
|
|
40
|
-
const
|
|
39
|
+
L.displayName = "GalleryPreview";
|
|
40
|
+
const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails: d, thumbnailsClassName: a, currentIndex: l, goToNext: o, goToPrevious: s, goToIndex: N }) => {
|
|
41
41
|
const h = v(null), y = v(null), w = v(null), m = v({
|
|
42
42
|
scale: 1,
|
|
43
43
|
translateX: 0,
|
|
@@ -49,23 +49,23 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
49
49
|
distanceX: 0,
|
|
50
50
|
distanceY: 0
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
ee(() => {
|
|
53
53
|
w.current && w.current.focus();
|
|
54
54
|
}, []);
|
|
55
55
|
const k = i((e) => {
|
|
56
56
|
e.preventDefault(), e.stopPropagation(), e.key === "Escape" ? r() : e.key === "ArrowLeft" ? s() : e.key === "ArrowRight" && o();
|
|
57
|
-
}, [r, s, o]),
|
|
57
|
+
}, [r, s, o]), P = i((e) => {
|
|
58
58
|
u.current = { startX: e.touches[0].clientX, startY: e.touches[0].clientY, isDragging: !0, distanceX: 0, distanceY: 0 };
|
|
59
59
|
}, []), j = i((e) => {
|
|
60
60
|
const g = e.touches[0];
|
|
61
61
|
u.current = { ...u.current, isDragging: !0, distanceX: g.clientX - u.current.startX, distanceY: g.clientY - u.current.startY };
|
|
62
|
-
}, []),
|
|
62
|
+
}, []), z = i(() => {
|
|
63
63
|
u.current = { ...u.current, startX: 0, startY: 0, isDragging: !1 }, Math.abs(u.current.distanceX) > Math.abs(u.current.distanceY) && (u.current.distanceX < 0 ? o() : s());
|
|
64
64
|
}, [o, s]), C = i(() => {
|
|
65
65
|
const e = h.current;
|
|
66
66
|
if (!e) return;
|
|
67
|
-
const { scale: g, translateX: p, translateY:
|
|
68
|
-
e.style.transform = `scale(${g}) translate(${p}px, ${
|
|
67
|
+
const { scale: g, translateX: p, translateY: I } = m.current;
|
|
68
|
+
e.style.transform = `scale(${g}) translate(${p}px, ${I}px)`, e.style.transformOrigin = "center center", e.style.transition = "transform 0.1s ease-out";
|
|
69
69
|
}, []), b = i(() => {
|
|
70
70
|
m.current = { scale: 1, translateX: 0, translateY: 0 }, h.current && (h.current.style.transform = "scale(1) translate(0px, 0px)", h.current.style.transformOrigin = "center center");
|
|
71
71
|
}, []), f = i((e) => {
|
|
@@ -75,17 +75,17 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
75
75
|
e.deltaY < 0 ? o() : e.deltaY > 0 && s();
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
const
|
|
79
|
-
let x =
|
|
80
|
-
if (x = Math.max(
|
|
78
|
+
const I = 2e-3, D = 1, B = 8, F = -e.deltaY * I, E = m.current.scale;
|
|
79
|
+
let x = E + F;
|
|
80
|
+
if (x = Math.max(D, Math.min(B, x)), x === D) {
|
|
81
81
|
b();
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
const Y = p.getBoundingClientRect(),
|
|
84
|
+
const Y = p.getBoundingClientRect(), G = e.clientX - Y.left, W = e.clientY - Y.top, H = Y.width / 2, K = Y.height / 2, $ = G - H, q = W - K, T = x / E, U = m.current.translateX, V = m.current.translateY, Z = U - $ * (T - 1) / x, J = V - q * (T - 1) / x;
|
|
85
85
|
m.current = {
|
|
86
86
|
scale: x,
|
|
87
|
-
translateX:
|
|
88
|
-
translateY:
|
|
87
|
+
translateX: Z,
|
|
88
|
+
translateY: J
|
|
89
89
|
}, C();
|
|
90
90
|
}, [o, s, C, b]);
|
|
91
91
|
return n.length === 0 ? null : /* @__PURE__ */ t.jsxs(
|
|
@@ -95,9 +95,9 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
95
95
|
className: X("fixed inset-0 z-50 bg-black/90 flex items-center justify-center lg:px-16", c),
|
|
96
96
|
onClick: r,
|
|
97
97
|
onKeyDown: k,
|
|
98
|
-
onTouchStart:
|
|
98
|
+
onTouchStart: P,
|
|
99
99
|
onTouchMove: j,
|
|
100
|
-
onTouchEnd:
|
|
100
|
+
onTouchEnd: z,
|
|
101
101
|
tabIndex: 0,
|
|
102
102
|
role: "dialog",
|
|
103
103
|
"aria-modal": "true",
|
|
@@ -109,9 +109,9 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
109
109
|
color: "secondary",
|
|
110
110
|
size: "small",
|
|
111
111
|
onClick: r,
|
|
112
|
-
className: "
|
|
112
|
+
className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
|
|
113
113
|
"aria-label": "Close gallery",
|
|
114
|
-
children: /* @__PURE__ */ t.jsx(
|
|
114
|
+
children: /* @__PURE__ */ t.jsx(re, { size: 24 })
|
|
115
115
|
}
|
|
116
116
|
) }),
|
|
117
117
|
n.length > 1 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -131,9 +131,9 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
131
131
|
onClick: (e) => {
|
|
132
132
|
e.stopPropagation(), s();
|
|
133
133
|
},
|
|
134
|
-
className: "
|
|
134
|
+
className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
|
|
135
135
|
"aria-label": "Previous image",
|
|
136
|
-
children: /* @__PURE__ */ t.jsx(
|
|
136
|
+
children: /* @__PURE__ */ t.jsx(se, { size: 24 })
|
|
137
137
|
}
|
|
138
138
|
)
|
|
139
139
|
}
|
|
@@ -154,9 +154,9 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
154
154
|
onClick: (e) => {
|
|
155
155
|
e.stopPropagation(), o();
|
|
156
156
|
},
|
|
157
|
-
className: "
|
|
157
|
+
className: "text-white! hover:text-gray-300! w-auto! h-auto! p-2!",
|
|
158
158
|
"aria-label": "Next image",
|
|
159
|
-
children: /* @__PURE__ */ t.jsx(
|
|
159
|
+
children: /* @__PURE__ */ t.jsx(ae, { size: 24 })
|
|
160
160
|
}
|
|
161
161
|
)
|
|
162
162
|
}
|
|
@@ -194,7 +194,7 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
194
194
|
)
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
|
-
d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-
|
|
197
|
+
d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-100 bottom-0", children: /* @__PURE__ */ t.jsx(_, { images: n, currentIndex: l, goToIndex: N, thumbnailsClassName: a }) }),
|
|
198
198
|
n.length > 1 && /* @__PURE__ */ t.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: [
|
|
199
199
|
l + 1,
|
|
200
200
|
" / ",
|
|
@@ -204,13 +204,13 @@ const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
});
|
|
207
|
-
|
|
208
|
-
const
|
|
207
|
+
O.displayName = "LightBox";
|
|
208
|
+
const le = (n, c) => {
|
|
209
209
|
if (n.currentIndex !== c.currentIndex || n.thumbnailsClassName !== c.thumbnailsClassName || n.images.length !== c.images.length) return !1;
|
|
210
210
|
for (let r = 0; r < n.images.length; r++)
|
|
211
211
|
if (n.images[r].src !== c.images[r].src) return !1;
|
|
212
212
|
return !0;
|
|
213
|
-
},
|
|
213
|
+
}, _ = M(({ images: n, currentIndex: c, goToIndex: r, thumbnailsClassName: d }) => /* @__PURE__ */ t.jsxs(
|
|
214
214
|
"div",
|
|
215
215
|
{
|
|
216
216
|
className: "flex gap-4 w-max overflow-x-auto overflow-y-visible max-w-full px-16 py-4",
|
|
@@ -250,9 +250,9 @@ const se = (n, c) => {
|
|
|
250
250
|
))
|
|
251
251
|
]
|
|
252
252
|
}
|
|
253
|
-
),
|
|
254
|
-
|
|
255
|
-
const
|
|
253
|
+
), le);
|
|
254
|
+
_.displayName = "Thumbnails";
|
|
255
|
+
const oe = A(
|
|
256
256
|
(n, c) => {
|
|
257
257
|
const {
|
|
258
258
|
children: r,
|
|
@@ -262,15 +262,15 @@ const ae = L(
|
|
|
262
262
|
thumbnailsClassName: o
|
|
263
263
|
} = n, [s, N] = R([]), [h, y] = R(!1), [w, m] = R(0), u = r ? Array.isArray(r) ? r : [r] : [], k = i((f) => {
|
|
264
264
|
N((e) => e.some((p) => p.src === f.src) ? e : [...e, f]);
|
|
265
|
-
}, []),
|
|
265
|
+
}, []), P = i((f = 0) => {
|
|
266
266
|
m(f), y(!0);
|
|
267
267
|
}, []), j = i(() => {
|
|
268
268
|
y(!1);
|
|
269
269
|
}, []);
|
|
270
|
-
|
|
270
|
+
te(
|
|
271
271
|
c,
|
|
272
272
|
() => ({
|
|
273
|
-
openLightbox:
|
|
273
|
+
openLightbox: P,
|
|
274
274
|
closeLightbox: j,
|
|
275
275
|
isOpen: h,
|
|
276
276
|
addImage: k,
|
|
@@ -278,7 +278,7 @@ const ae = L(
|
|
|
278
278
|
}),
|
|
279
279
|
[s]
|
|
280
280
|
);
|
|
281
|
-
const
|
|
281
|
+
const z = i(() => {
|
|
282
282
|
m((f) => (f + 1) % s.length);
|
|
283
283
|
}, [s.length]), C = i(() => {
|
|
284
284
|
m((f) => (f - 1 + s.length) % s.length);
|
|
@@ -287,7 +287,7 @@ const ae = L(
|
|
|
287
287
|
}, []);
|
|
288
288
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
289
289
|
/* @__PURE__ */ t.jsx(
|
|
290
|
-
|
|
290
|
+
L,
|
|
291
291
|
{
|
|
292
292
|
images: u,
|
|
293
293
|
className: d,
|
|
@@ -295,7 +295,7 @@ const ae = L(
|
|
|
295
295
|
}
|
|
296
296
|
),
|
|
297
297
|
h && /* @__PURE__ */ t.jsx(
|
|
298
|
-
|
|
298
|
+
O,
|
|
299
299
|
{
|
|
300
300
|
images: s,
|
|
301
301
|
closeLightbox: j,
|
|
@@ -303,7 +303,7 @@ const ae = L(
|
|
|
303
303
|
lightboxClassName: a,
|
|
304
304
|
thumbnailsClassName: o,
|
|
305
305
|
currentIndex: w,
|
|
306
|
-
goToNext:
|
|
306
|
+
goToNext: z,
|
|
307
307
|
goToPrevious: C,
|
|
308
308
|
goToIndex: b
|
|
309
309
|
}
|
|
@@ -311,7 +311,7 @@ const ae = L(
|
|
|
311
311
|
] });
|
|
312
312
|
}
|
|
313
313
|
);
|
|
314
|
-
|
|
314
|
+
oe.displayName = "ImageGallery";
|
|
315
315
|
export {
|
|
316
|
-
|
|
316
|
+
oe as I
|
|
317
317
|
};
|
package/dist/ImageGallery.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import {
|
|
2
|
+
import { EyeVisibility as _, EyeVisibilityOff as q, Close as V } from "./Icons.es.js";
|
|
3
3
|
import { c as t } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { useRef as F, useLayoutEffect as ee, memo as te, forwardRef as re, useState as oe } from "react";
|
|
5
5
|
import le from "./Spinner.es.js";
|
|
6
|
-
import { H as se } from "./HelperComponent-
|
|
6
|
+
import { H as se } from "./HelperComponent-BeNlTMqI.js";
|
|
7
7
|
const ae = (o) => {
|
|
8
8
|
let e = o;
|
|
9
9
|
for (; e && e !== document.body; ) {
|
|
@@ -87,7 +87,7 @@ const b = {
|
|
|
87
87
|
style: P,
|
|
88
88
|
readOnly: D = !1,
|
|
89
89
|
onClear: z,
|
|
90
|
-
...
|
|
90
|
+
...v
|
|
91
91
|
}, A) => {
|
|
92
92
|
const [y, M] = oe(!1), { ref: O } = ne();
|
|
93
93
|
let d = H;
|
|
@@ -125,7 +125,7 @@ const b = {
|
|
|
125
125
|
M(!y);
|
|
126
126
|
}, j = {};
|
|
127
127
|
x && x !== "100%" && (j.width = x), u && (j.height = u);
|
|
128
|
-
const
|
|
128
|
+
const E = c === "error" && h, G = !E && w, J = s === "password", K = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, Q = () => u ? i.customHeight.label : i[d].label, U = () => u ? { height: u } : {}, W = () => a === "default" ? o : $ || o || "", X = () => J ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Y = a === "default" && "transition-all duration-200 ease-in-out", m = h || w;
|
|
129
129
|
return /* @__PURE__ */ r.jsxs(
|
|
130
130
|
"div",
|
|
131
131
|
{
|
|
@@ -168,9 +168,9 @@ const b = {
|
|
|
168
168
|
required: N,
|
|
169
169
|
onKeyDown: L,
|
|
170
170
|
onKeyUp: R,
|
|
171
|
-
defaultValue:
|
|
171
|
+
defaultValue: v.defaultValue,
|
|
172
172
|
readOnly: D,
|
|
173
|
-
...
|
|
173
|
+
...v
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
176
|
/* @__PURE__ */ r.jsx(
|
|
@@ -226,14 +226,7 @@ const b = {
|
|
|
226
226
|
children: /* @__PURE__ */ r.jsx(V, { size: 20, className: "" })
|
|
227
227
|
}
|
|
228
228
|
),
|
|
229
|
-
m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (
|
|
230
|
-
se,
|
|
231
|
-
{
|
|
232
|
-
className: "absolute ",
|
|
233
|
-
variant: c,
|
|
234
|
-
children: h || w
|
|
235
|
-
}
|
|
236
|
-
) })
|
|
229
|
+
m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (E || G) && /* @__PURE__ */ r.jsx(se, { className: "absolute ", variant: c, children: h || w }) })
|
|
237
230
|
]
|
|
238
231
|
}
|
|
239
232
|
);
|
package/dist/Input.es.js
CHANGED
package/dist/InputMultiple.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Close as Z, Info as T, Error as ee } from "./Icons.es.js";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const o =
|
|
4
|
+
import M, { useRef as _, useState as x, useCallback as te, useEffect as re } from "react";
|
|
5
|
+
const se = ({ label: S, name: D, onChange: f, value: l, icon: C, valueSeparator: w = ",", variant: I = "default", placeholder: K, itemClassName: U, itemIcon: V, helperText: j, errorText: N, disabled: a, onClick: F, className: $, readonly: h, onValueDelete: B, ...O }) => {
|
|
6
|
+
const o = _(null), E = _(null), [u, n] = x(""), [z, i] = x(0), [q, c] = x(!0), [v, P] = x(!1), [m, p] = x(!1), [k, y] = x(null), g = (e) => {
|
|
7
7
|
if (h || !e) return;
|
|
8
8
|
const t = e.selectionStart ?? u.length;
|
|
9
9
|
i(t);
|
|
10
|
-
},
|
|
10
|
+
}, A = (e) => {
|
|
11
11
|
if (h) return;
|
|
12
12
|
if (e.target.value[e.target.value.length - 1] === w && u.length > 0) {
|
|
13
13
|
const s = u.trim();
|
|
@@ -25,17 +25,17 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
25
25
|
n(e.target.value), c(!1);
|
|
26
26
|
}
|
|
27
27
|
g(e.target);
|
|
28
|
-
}, b =
|
|
28
|
+
}, b = te(() => {
|
|
29
29
|
const e = u.trim();
|
|
30
30
|
if (e.length === 0) {
|
|
31
|
-
p(!1), n(""), c(!0), i(0),
|
|
31
|
+
p(!1), n(""), c(!0), i(0), y(null);
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
p(!1), k !== null && f(
|
|
35
|
-
}, [k, u, f, l]),
|
|
34
|
+
p(!1), k !== null && f(Q(l.map((t, s) => s === k ? e : t))), n(""), c(!0), i(0), y(null);
|
|
35
|
+
}, [k, u, f, l]), G = (e) => {
|
|
36
36
|
if (!h) {
|
|
37
37
|
if (e.key === "Backspace" && u.length === 0) {
|
|
38
|
-
if (
|
|
38
|
+
if (q) {
|
|
39
39
|
const t = l[l.length - 1];
|
|
40
40
|
t && (f(l.filter((s) => s !== t)), n(t), i(t.length));
|
|
41
41
|
} else
|
|
@@ -50,27 +50,27 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
50
50
|
}
|
|
51
51
|
t.length > 0 && !l.includes(t) && t !== w && (f([...l, t]), n(""), c(!0), i(0));
|
|
52
52
|
}
|
|
53
|
-
e.key === "Escape" && m && (p(!1), n(""), c(!0), i(0),
|
|
53
|
+
e.key === "Escape" && m && (p(!1), n(""), c(!0), i(0), y(null)), g(e.currentTarget);
|
|
54
54
|
}
|
|
55
|
-
},
|
|
55
|
+
}, H = (e) => {
|
|
56
56
|
const t = l.filter((s) => s !== e);
|
|
57
|
-
f(t),
|
|
57
|
+
f(t), B?.(e);
|
|
58
|
+
}, J = (e) => {
|
|
59
|
+
h || (L(e), p(!0), n(e), i(e.length), y(l.length - 1), o.current?.focus());
|
|
58
60
|
}, L = (e) => {
|
|
59
|
-
h || (Q(e), p(!0), n(e), i(e.length), I(l.length - 1), o.current?.focus());
|
|
60
|
-
}, Q = (e) => {
|
|
61
61
|
const t = l.filter((s) => s !== e);
|
|
62
62
|
f([...t, e]);
|
|
63
|
-
},
|
|
64
|
-
|
|
63
|
+
}, Q = (e) => e.filter((t, s, Y) => Y.indexOf(t) === s);
|
|
64
|
+
re(() => {
|
|
65
65
|
o.current && (o.current.onfocus = () => {
|
|
66
|
-
|
|
66
|
+
P(!0);
|
|
67
67
|
}, o.current.onblur = () => {
|
|
68
|
-
|
|
68
|
+
P(!1), m && b();
|
|
69
69
|
}), E.current && (E.current.onblur = () => {
|
|
70
70
|
m && b();
|
|
71
71
|
});
|
|
72
72
|
}, [m, b]);
|
|
73
|
-
const
|
|
73
|
+
const W = {
|
|
74
74
|
isFocused: {
|
|
75
75
|
error: "border-error-default-focused ring-error-default-focused",
|
|
76
76
|
success: "border-success-default-focused ring-success-default-focused",
|
|
@@ -89,7 +89,7 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
89
89
|
warning: "border-warning-default-disabled",
|
|
90
90
|
default: "border-neutral-default-disabled"
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, X = {
|
|
93
93
|
default: {
|
|
94
94
|
default: "text-neutral-default-default",
|
|
95
95
|
isFocused: "text-neutral-default-focused",
|
|
@@ -110,27 +110,27 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
110
110
|
isFocused: "text-warning-default-focused",
|
|
111
111
|
disabled: "text-warning-default-disabled"
|
|
112
112
|
}
|
|
113
|
-
},
|
|
113
|
+
}, R = a ? "disabled" : v ? "isFocused" : "default";
|
|
114
114
|
return /* @__PURE__ */ r.jsxs("div", { className: d(
|
|
115
115
|
"relative w-full",
|
|
116
|
-
|
|
116
|
+
$
|
|
117
117
|
), children: [
|
|
118
118
|
/* @__PURE__ */ r.jsx("p", { className: d(
|
|
119
119
|
"mb-1 px-3",
|
|
120
120
|
"prometeo-fonts-label-large",
|
|
121
|
-
|
|
122
|
-
), children:
|
|
121
|
+
X?.[I || "default"]?.[R]
|
|
122
|
+
), children: S }),
|
|
123
123
|
/* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
|
|
124
124
|
/* @__PURE__ */ r.jsx(
|
|
125
125
|
"input",
|
|
126
126
|
{
|
|
127
127
|
ref: o,
|
|
128
128
|
value: u,
|
|
129
|
-
onKeyUp:
|
|
130
|
-
onChange:
|
|
129
|
+
onKeyUp: G,
|
|
130
|
+
onChange: A,
|
|
131
131
|
onClick: (e) => g(e.currentTarget),
|
|
132
132
|
onSelect: (e) => g(e.currentTarget),
|
|
133
|
-
name:
|
|
133
|
+
name: D,
|
|
134
134
|
disabled: a,
|
|
135
135
|
className: d(
|
|
136
136
|
"absolute inset-0 w-full h-full",
|
|
@@ -143,7 +143,7 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
143
143
|
autoCapitalize: "off",
|
|
144
144
|
spellCheck: "false",
|
|
145
145
|
inputMode: "text",
|
|
146
|
-
...
|
|
146
|
+
...O
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
149
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -151,42 +151,42 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
151
151
|
{
|
|
152
152
|
ref: E,
|
|
153
153
|
className: d(
|
|
154
|
-
"border
|
|
154
|
+
"border border-neutral-default-default rounded-md p-3",
|
|
155
155
|
"flex flex-wrap gap-1 min-h-[58px]",
|
|
156
156
|
"transition-all duration-300 ease-in-out",
|
|
157
157
|
"cursor-text",
|
|
158
|
-
|
|
158
|
+
W[R][I],
|
|
159
159
|
v ? "ring-[1px]" : "",
|
|
160
160
|
// 'hover:border-primary-default-hover',
|
|
161
161
|
a && "hover:border-neutral-default-disabled"
|
|
162
162
|
),
|
|
163
163
|
onMouseDown: (e) => {
|
|
164
|
-
e.stopPropagation(),
|
|
164
|
+
e.stopPropagation(), F?.(e), o.current?.focus();
|
|
165
165
|
const t = u.length;
|
|
166
166
|
o.current && (o.current.selectionStart = t, o.current.selectionEnd = t), i(t);
|
|
167
167
|
},
|
|
168
168
|
onClick: (e) => {
|
|
169
|
-
e.stopPropagation(), o.current?.focus(),
|
|
169
|
+
e.stopPropagation(), o.current?.focus(), F?.(e);
|
|
170
170
|
},
|
|
171
171
|
children: [
|
|
172
|
-
|
|
172
|
+
C && /* @__PURE__ */ r.jsx("div", { className: d(
|
|
173
173
|
"flex items-center text-neutral-default-default",
|
|
174
174
|
a && "text-neutral-default-disabled"
|
|
175
|
-
), children:
|
|
175
|
+
), children: C }),
|
|
176
176
|
l.map((e, t) => /* @__PURE__ */ r.jsxs(
|
|
177
177
|
"div",
|
|
178
178
|
{
|
|
179
179
|
className: d(
|
|
180
|
-
"h-8 max-h-8 rounded-lg bg-primary-light-default border
|
|
180
|
+
"h-8 max-h-8 rounded-lg bg-primary-light-default border border-neutral-default-default",
|
|
181
181
|
"flex items-center gap-2 px-2",
|
|
182
182
|
"prometeo-fonts-label-medium z-20",
|
|
183
183
|
t === l.length - 1 && m ? "opacity-0 hidden overflow-hidden" : "",
|
|
184
184
|
a && "border-neutral-default-disabled text-neutral-default-disabled",
|
|
185
|
-
|
|
185
|
+
U
|
|
186
186
|
),
|
|
187
187
|
children: [
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
V && /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: M.createElement(
|
|
189
|
+
V,
|
|
190
190
|
{
|
|
191
191
|
size: 16,
|
|
192
192
|
className: d(
|
|
@@ -199,7 +199,7 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
199
199
|
"span",
|
|
200
200
|
{
|
|
201
201
|
onClick: (s) => {
|
|
202
|
-
s.stopPropagation(), !a &&
|
|
202
|
+
s.stopPropagation(), !a && J(e);
|
|
203
203
|
},
|
|
204
204
|
className: d(
|
|
205
205
|
"cursor-pointer hover:text-neutral-default-hover",
|
|
@@ -212,14 +212,14 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
212
212
|
"div",
|
|
213
213
|
{
|
|
214
214
|
onClick: (s) => {
|
|
215
|
-
s.stopPropagation(), !a &&
|
|
215
|
+
s.stopPropagation(), !a && H(e);
|
|
216
216
|
},
|
|
217
217
|
className: d(
|
|
218
218
|
"cursor-pointer hover:scale-105 transition-all duration-200 ",
|
|
219
219
|
a && " cursor-default hover:scale-100 "
|
|
220
220
|
),
|
|
221
221
|
children: /* @__PURE__ */ r.jsx(
|
|
222
|
-
|
|
222
|
+
Z,
|
|
223
223
|
{
|
|
224
224
|
size: 16,
|
|
225
225
|
className: d(
|
|
@@ -235,28 +235,28 @@ const te = ({ label: D, name: K, onChange: f, value: l, icon: V, valueSeparator:
|
|
|
235
235
|
e
|
|
236
236
|
)),
|
|
237
237
|
v && !h && /* @__PURE__ */ r.jsxs("div", { className: "flex items-center min-w-[2px]", children: [
|
|
238
|
-
/* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-
|
|
239
|
-
/* @__PURE__ */ r.jsx("span", { className: "animate-[cursor-intermitent_1s_ease-in-out_infinite] bg-neutral-default-pressed w-[2px] h-5 inline-block align-middle mx-
|
|
240
|
-
/* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap break-
|
|
238
|
+
/* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap wrap-break-word", children: u.slice(0, z) }),
|
|
239
|
+
/* @__PURE__ */ r.jsx("span", { className: "animate-[cursor-intermitent_1s_ease-in-out_infinite] bg-neutral-default-pressed w-[2px] h-5 inline-block align-middle mx-px z-20" }),
|
|
240
|
+
/* @__PURE__ */ r.jsx("span", { className: "text-neutral-default-default whitespace-pre-wrap wrap-break-word", children: u.slice(z) })
|
|
241
241
|
] }),
|
|
242
242
|
l.length === 0 && !v && /* @__PURE__ */ r.jsx("span", { className: d(
|
|
243
243
|
"text-neutral-medium-default self-center",
|
|
244
244
|
a && "text-neutral-default-disabled"
|
|
245
|
-
), children:
|
|
245
|
+
), children: K || `Escribe los valores separados por ${w}` })
|
|
246
246
|
]
|
|
247
247
|
}
|
|
248
248
|
)
|
|
249
249
|
] }),
|
|
250
|
-
j &&
|
|
251
|
-
/* @__PURE__ */ r.jsx(
|
|
250
|
+
j && I !== "error" && !a && (typeof j == "string" ? /* @__PURE__ */ r.jsxs("div", { className: "prometeo-fonts-body-small text-neutral-medium-default ml-3 mt-1 flex items-center gap-1", children: [
|
|
251
|
+
/* @__PURE__ */ r.jsx(T, { size: 16, className: "text-neutral-medium-default" }),
|
|
252
252
|
j
|
|
253
253
|
] }) : /* @__PURE__ */ r.jsx("div", { className: "ml-3", children: j })),
|
|
254
254
|
N && typeof N == "string" && !a ? /* @__PURE__ */ r.jsxs("div", { className: "prometeo-fonts-body-small text-error-default-default ml-3 mt-1 flex items-center gap-1", children: [
|
|
255
|
-
/* @__PURE__ */ r.jsx(
|
|
255
|
+
/* @__PURE__ */ r.jsx(ee, { size: 16, className: "text-error-default-default" }),
|
|
256
256
|
N
|
|
257
257
|
] }) : N
|
|
258
258
|
] });
|
|
259
|
-
},
|
|
259
|
+
}, de = M.memo(se);
|
|
260
260
|
export {
|
|
261
|
-
|
|
261
|
+
de as InputMultiple
|
|
262
262
|
};
|
package/dist/Logo.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import {
|
|
3
|
-
const s = () => /* @__PURE__ */ e.jsxs("div", { className: "container-logo flex items-center justify-center gap-1 bg-
|
|
4
|
-
/* @__PURE__ */ e.jsx(t
|
|
2
|
+
import { TicketFilled as t } from "./Icons.es.js";
|
|
3
|
+
const s = () => /* @__PURE__ */ e.jsxs("div", { className: "container-logo flex items-center justify-center gap-1 bg-linear-to-br from-[#312C85] to-[#1E1A4D] rounded-md min-w-[185px]", children: [
|
|
4
|
+
/* @__PURE__ */ e.jsx(t, { size: 28, className: "rotate-140 text-primary-medium-pressed icon-logo" }),
|
|
5
5
|
/* @__PURE__ */ e.jsx("span", { className: "font-bold text-[28px] text-primary-medium-pressed font-monserra -tracking-wide text-logo", children: "TICKETS" })
|
|
6
6
|
] });
|
|
7
7
|
export {
|
package/dist/Menu.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { AnimatePresence as n, motion as o } from "framer-motion";
|
|
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
|
|
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 border-neutral-strong-default h-auto w-60 rounded-md px-2", i), children: /* @__PURE__ */ e.jsx(n, { mode: "wait", children: /* @__PURE__ */ e.jsx(
|
|
5
5
|
o.div,
|
|
6
6
|
{
|
|
7
7
|
initial: { height: 0, opacity: 0 },
|
|
@@ -42,7 +42,7 @@ const s = ({ menuRef: t, children: a, className: i }) => /* @__PURE__ */ e.jsx("
|
|
|
42
42
|
ease: "easeInOut"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "border-b border-neutral-strong-default border
|
|
45
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "border-b border-neutral-strong-default border w-full" })
|
|
46
46
|
}
|
|
47
47
|
), d = ({ onClick: t, children: a, className: i }) => /* @__PURE__ */ e.jsx(
|
|
48
48
|
o.button,
|