prometeo-design-system 2.7.8 → 2.8.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/Button.es.js +5 -5
- package/dist/{CardProfile-WHoeSibd.js → CardProfile-CHUivLbW.js} +28 -28
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +60 -60
- package/dist/CheckboxFormik.es.js +2 -2
- 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-CcGxM09g.js +24 -0
- package/dist/Icons/Icons.d.ts +2 -2
- package/dist/Icons-ChYkaR8R.js +899 -0
- package/dist/Icons.es.js +2 -951
- package/dist/{ImageGallery-WKzUevOQ.js → ImageGallery-TkgHO3JL.js} +43 -43
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-D6as6xD-.js → Input-CsNlU1Hu.js} +67 -74
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +58 -58
- package/dist/InputFormikV2.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-sdfP2TL0.js → Select-D7Cs1OlG.js} +4 -4
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectFormikLegacy.es.js +23 -23
- 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/CheckBox/CheckBox.d.ts +5 -4
- package/dist/components/Toaster/Toaster.d.ts +3 -3
- package/dist/exports/Icons.d.ts +1 -1
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +125 -126
- package/package.json +2 -5
- package/dist/HelperComponent-BeNlTMqI.js +0 -24
- package/dist/components/Spinner/SpinnerV2.d.ts +0 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import
|
|
2
|
+
import ee, { memo as D, forwardRef as L, useRef as v, useEffect as te, useCallback as i, useState as R, useImperativeHandle as ne } from "react";
|
|
3
3
|
import { c as X } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { u as
|
|
4
|
+
import { u as re } from "./useDragScroll-CHN9OMwn.js";
|
|
5
5
|
import S from "./Button.es.js";
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
const { ref: d, bind: a } =
|
|
6
|
+
import { I as M } from "./Icons-ChYkaR8R.js";
|
|
7
|
+
const O = D(L(({ images: n, className: c }, r) => {
|
|
8
|
+
const { ref: d, bind: a } = re({
|
|
9
9
|
axis: "x",
|
|
10
10
|
friction: 0.9,
|
|
11
11
|
minVelocity: 0.5,
|
|
@@ -27,7 +27,7 @@ const L = M(A(({ 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) => ee.cloneElement(l, {
|
|
31
31
|
key: l.props.src || o,
|
|
32
32
|
...l.props,
|
|
33
33
|
galleryRef: r,
|
|
@@ -36,8 +36,8 @@ const L = M(A(({ images: n, className: c }, r) => {
|
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
}));
|
|
39
|
-
|
|
40
|
-
const
|
|
39
|
+
O.displayName = "GalleryPreview";
|
|
40
|
+
const _ = D(({ 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 O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
49
49
|
distanceX: 0,
|
|
50
50
|
distanceY: 0
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
te(() => {
|
|
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]), I = 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
|
+
}, []), P = 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: z } = m.current;
|
|
68
|
+
e.style.transform = `scale(${g}) translate(${p}px, ${z}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 O = M(({ 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 z = 2e-3, E = 1, F = 8, G = -e.deltaY * z, T = m.current.scale;
|
|
79
|
+
let x = T + G;
|
|
80
|
+
if (x = Math.max(E, Math.min(F, x)), x === E) {
|
|
81
81
|
b();
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
const Y = p.getBoundingClientRect(),
|
|
84
|
+
const Y = p.getBoundingClientRect(), W = e.clientX - Y.left, H = e.clientY - Y.top, K = Y.width / 2, $ = Y.height / 2, q = W - K, U = H - $, A = x / T, V = m.current.translateX, Z = m.current.translateY, J = V - q * (A - 1) / x, Q = Z - U * (A - 1) / x;
|
|
85
85
|
m.current = {
|
|
86
86
|
scale: x,
|
|
87
|
-
translateX:
|
|
88
|
-
translateY:
|
|
87
|
+
translateX: J,
|
|
88
|
+
translateY: Q
|
|
89
89
|
}, C();
|
|
90
90
|
}, [o, s, C, b]);
|
|
91
91
|
return n.length === 0 ? null : /* @__PURE__ */ t.jsxs(
|
|
@@ -95,9 +95,9 @@ const O = M(({ 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: I,
|
|
99
99
|
onTouchMove: j,
|
|
100
|
-
onTouchEnd:
|
|
100
|
+
onTouchEnd: P,
|
|
101
101
|
tabIndex: 0,
|
|
102
102
|
role: "dialog",
|
|
103
103
|
"aria-modal": "true",
|
|
@@ -109,9 +109,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
109
109
|
color: "secondary",
|
|
110
110
|
size: "small",
|
|
111
111
|
onClick: r,
|
|
112
|
-
className: "text-white
|
|
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(M.Close, { size: 24 })
|
|
115
115
|
}
|
|
116
116
|
) }),
|
|
117
117
|
n.length > 1 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -131,9 +131,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
131
131
|
onClick: (e) => {
|
|
132
132
|
e.stopPropagation(), s();
|
|
133
133
|
},
|
|
134
|
-
className: "text-white
|
|
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(M.CrevronLeft, { size: 24 })
|
|
137
137
|
}
|
|
138
138
|
)
|
|
139
139
|
}
|
|
@@ -154,9 +154,9 @@ const O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
154
154
|
onClick: (e) => {
|
|
155
155
|
e.stopPropagation(), o();
|
|
156
156
|
},
|
|
157
|
-
className: "text-white
|
|
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(M.CrevronRight, { size: 24 })
|
|
160
160
|
}
|
|
161
161
|
)
|
|
162
162
|
}
|
|
@@ -194,7 +194,7 @@ const O = M(({ 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-100 bottom-0", children: /* @__PURE__ */ t.jsx(
|
|
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(B, { 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 O = M(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
});
|
|
207
|
-
|
|
208
|
-
const
|
|
207
|
+
_.displayName = "LightBox";
|
|
208
|
+
const se = (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
|
+
}, B = D(({ 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 le = (n, c) => {
|
|
|
250
250
|
))
|
|
251
251
|
]
|
|
252
252
|
}
|
|
253
|
-
),
|
|
254
|
-
|
|
255
|
-
const
|
|
253
|
+
), se);
|
|
254
|
+
B.displayName = "Thumbnails";
|
|
255
|
+
const ae = L(
|
|
256
256
|
(n, c) => {
|
|
257
257
|
const {
|
|
258
258
|
children: r,
|
|
@@ -262,15 +262,15 @@ const oe = A(
|
|
|
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
|
+
}, []), I = i((f = 0) => {
|
|
266
266
|
m(f), y(!0);
|
|
267
267
|
}, []), j = i(() => {
|
|
268
268
|
y(!1);
|
|
269
269
|
}, []);
|
|
270
|
-
|
|
270
|
+
ne(
|
|
271
271
|
c,
|
|
272
272
|
() => ({
|
|
273
|
-
openLightbox:
|
|
273
|
+
openLightbox: I,
|
|
274
274
|
closeLightbox: j,
|
|
275
275
|
isOpen: h,
|
|
276
276
|
addImage: k,
|
|
@@ -278,7 +278,7 @@ const oe = A(
|
|
|
278
278
|
}),
|
|
279
279
|
[s]
|
|
280
280
|
);
|
|
281
|
-
const
|
|
281
|
+
const P = 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 oe = A(
|
|
|
287
287
|
}, []);
|
|
288
288
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
289
289
|
/* @__PURE__ */ t.jsx(
|
|
290
|
-
|
|
290
|
+
O,
|
|
291
291
|
{
|
|
292
292
|
images: u,
|
|
293
293
|
className: d,
|
|
@@ -295,7 +295,7 @@ const oe = A(
|
|
|
295
295
|
}
|
|
296
296
|
),
|
|
297
297
|
h && /* @__PURE__ */ t.jsx(
|
|
298
|
-
|
|
298
|
+
_,
|
|
299
299
|
{
|
|
300
300
|
images: s,
|
|
301
301
|
closeLightbox: j,
|
|
@@ -303,7 +303,7 @@ const oe = A(
|
|
|
303
303
|
lightboxClassName: a,
|
|
304
304
|
thumbnailsClassName: o,
|
|
305
305
|
currentIndex: w,
|
|
306
|
-
goToNext:
|
|
306
|
+
goToNext: P,
|
|
307
307
|
goToPrevious: C,
|
|
308
308
|
goToIndex: b
|
|
309
309
|
}
|
|
@@ -311,7 +311,7 @@ const oe = A(
|
|
|
311
311
|
] });
|
|
312
312
|
}
|
|
313
313
|
);
|
|
314
|
-
|
|
314
|
+
ae.displayName = "ImageGallery";
|
|
315
315
|
export {
|
|
316
|
-
|
|
316
|
+
ae as I
|
|
317
317
|
};
|
package/dist/ImageGallery.es.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { E as _, a as q, C as V } from "./Icons-ChYkaR8R.js";
|
|
2
3
|
import { c as t } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import { H as
|
|
6
|
-
|
|
7
|
-
import { EyeVisibility as le, EyeVisibilityOff as se, Close as ae } from "./Icons.es.js";
|
|
8
|
-
const ne = (o) => {
|
|
4
|
+
import { useRef as F, useLayoutEffect as ee, memo as te, forwardRef as re, useState as oe } from "react";
|
|
5
|
+
import le from "./Spinner.es.js";
|
|
6
|
+
import { H as se } from "./HelperComponent-CcGxM09g.js";
|
|
7
|
+
const ae = (o) => {
|
|
9
8
|
let e = o;
|
|
10
9
|
for (; e && e !== document.body; ) {
|
|
11
10
|
const n = window.getComputedStyle(e).backgroundColor;
|
|
@@ -16,11 +15,11 @@ const ne = (o) => {
|
|
|
16
15
|
const l = window.getComputedStyle(document.body).backgroundColor;
|
|
17
16
|
return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
|
|
18
17
|
};
|
|
19
|
-
function
|
|
20
|
-
const o =
|
|
21
|
-
return
|
|
18
|
+
function ne() {
|
|
19
|
+
const o = F(null);
|
|
20
|
+
return ee(() => {
|
|
22
21
|
if (!o.current || !o.current.parentElement) return;
|
|
23
|
-
const e =
|
|
22
|
+
const e = ae(o.current.parentElement);
|
|
24
23
|
o.current.style.backgroundColor = e;
|
|
25
24
|
}, []), {
|
|
26
25
|
ref: o
|
|
@@ -60,40 +59,40 @@ const b = {
|
|
|
60
59
|
label: t("text-success", "peer-focus:text-success-light"),
|
|
61
60
|
icon: t("text-success-light", "peer-focus:text-success-light")
|
|
62
61
|
}
|
|
63
|
-
}, S =
|
|
62
|
+
}, S = re(
|
|
64
63
|
({
|
|
65
64
|
label: o,
|
|
66
65
|
icon: e,
|
|
67
66
|
iconPosition: l = "left",
|
|
68
|
-
onChange:
|
|
67
|
+
onChange: C,
|
|
69
68
|
value: n,
|
|
70
69
|
name: g,
|
|
71
|
-
width:
|
|
70
|
+
width: x = "100%",
|
|
72
71
|
height: u,
|
|
73
72
|
variant: c = "default",
|
|
74
73
|
labelVariant: a = "default",
|
|
75
74
|
size: H = "medium",
|
|
76
|
-
disabled:
|
|
75
|
+
disabled: f = !1,
|
|
77
76
|
type: s = "text",
|
|
78
|
-
isFetching:
|
|
77
|
+
isFetching: p,
|
|
79
78
|
errorComponent: h,
|
|
80
79
|
helperComponent: w,
|
|
81
|
-
placeholder:
|
|
82
|
-
required:
|
|
83
|
-
onFocus:
|
|
84
|
-
onBlur:
|
|
85
|
-
onKeyDown:
|
|
86
|
-
onKeyUp:
|
|
87
|
-
className:
|
|
80
|
+
placeholder: $,
|
|
81
|
+
required: N = !1,
|
|
82
|
+
onFocus: k,
|
|
83
|
+
onBlur: I,
|
|
84
|
+
onKeyDown: L,
|
|
85
|
+
onKeyUp: R,
|
|
86
|
+
className: B,
|
|
88
87
|
style: P,
|
|
89
88
|
readOnly: D = !1,
|
|
90
|
-
onClear:
|
|
91
|
-
...
|
|
89
|
+
onClear: z,
|
|
90
|
+
...E
|
|
92
91
|
}, A) => {
|
|
93
|
-
const [y, M] =
|
|
94
|
-
let
|
|
95
|
-
u && (
|
|
96
|
-
const
|
|
92
|
+
const [y, M] = oe(!1), { ref: O } = ne();
|
|
93
|
+
let d = H;
|
|
94
|
+
u && (d = "customHeight");
|
|
95
|
+
const i = {
|
|
97
96
|
small: {
|
|
98
97
|
container: "text-sm",
|
|
99
98
|
input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
|
|
@@ -125,18 +124,18 @@ const b = {
|
|
|
125
124
|
}, T = () => {
|
|
126
125
|
M(!y);
|
|
127
126
|
}, j = {};
|
|
128
|
-
|
|
129
|
-
const
|
|
127
|
+
x && x !== "100%" && (j.width = x), u && (j.height = u);
|
|
128
|
+
const v = c === "error" && h, G = !v && 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;
|
|
130
129
|
return /* @__PURE__ */ r.jsxs(
|
|
131
130
|
"div",
|
|
132
131
|
{
|
|
133
132
|
className: t(
|
|
134
133
|
"relative",
|
|
135
|
-
d
|
|
136
|
-
!
|
|
134
|
+
i[d].container,
|
|
135
|
+
!x && "w-full",
|
|
137
136
|
"bg-inherit",
|
|
138
137
|
a === "static" && "mt-2",
|
|
139
|
-
|
|
138
|
+
B
|
|
140
139
|
),
|
|
141
140
|
style: { ...P, ...j },
|
|
142
141
|
children: [
|
|
@@ -155,23 +154,23 @@ const b = {
|
|
|
155
154
|
a === "default" && "placeholder:text-transparent",
|
|
156
155
|
a === "static" && "placeholder:text-neutral-medium-default ",
|
|
157
156
|
b[c].input,
|
|
158
|
-
d
|
|
157
|
+
i[d].input,
|
|
159
158
|
e && "pr-10",
|
|
160
|
-
|
|
159
|
+
f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
161
160
|
b[c].container,
|
|
162
161
|
X()
|
|
163
162
|
),
|
|
164
163
|
style: U(),
|
|
165
|
-
onChange:
|
|
166
|
-
onFocus:
|
|
167
|
-
onBlur:
|
|
168
|
-
disabled:
|
|
169
|
-
required:
|
|
170
|
-
onKeyDown:
|
|
171
|
-
onKeyUp:
|
|
172
|
-
defaultValue:
|
|
164
|
+
onChange: C,
|
|
165
|
+
onFocus: k,
|
|
166
|
+
onBlur: I,
|
|
167
|
+
disabled: f,
|
|
168
|
+
required: N,
|
|
169
|
+
onKeyDown: L,
|
|
170
|
+
onKeyUp: R,
|
|
171
|
+
defaultValue: E.defaultValue,
|
|
173
172
|
readOnly: D,
|
|
174
|
-
...
|
|
173
|
+
...E
|
|
175
174
|
}
|
|
176
175
|
),
|
|
177
176
|
/* @__PURE__ */ r.jsx(
|
|
@@ -185,56 +184,50 @@ const b = {
|
|
|
185
184
|
Q(),
|
|
186
185
|
b[c].label,
|
|
187
186
|
K(),
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
N && "after:content-['*'] after:text-error-default after:ml-1",
|
|
188
|
+
f && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
190
189
|
),
|
|
191
190
|
children: o
|
|
192
191
|
}
|
|
193
192
|
),
|
|
194
|
-
(e || s === "password" ||
|
|
193
|
+
(e || s === "password" || p) && /* @__PURE__ */ r.jsx(
|
|
195
194
|
"button",
|
|
196
195
|
{
|
|
197
196
|
tabIndex: -1,
|
|
198
197
|
type: "button",
|
|
199
198
|
className: t(
|
|
200
|
-
`absolute ${
|
|
201
|
-
d
|
|
199
|
+
`absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
|
|
200
|
+
i[d].icon,
|
|
202
201
|
b[c].icon,
|
|
203
|
-
s === "password" && !
|
|
202
|
+
s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
|
|
204
203
|
l === "right" ? "right-3" : "left-3"
|
|
205
204
|
),
|
|
206
|
-
onClick: s === "password" && !
|
|
207
|
-
onMouseDown: (Z) => s === "password" && !
|
|
205
|
+
onClick: s === "password" && !p ? T : void 0,
|
|
206
|
+
onMouseDown: (Z) => s === "password" && !p && Z.preventDefault(),
|
|
208
207
|
children: /* @__PURE__ */ r.jsxs("div", { children: [
|
|
209
|
-
|
|
210
|
-
s === "password" && (y ? /* @__PURE__ */ r.jsx(
|
|
208
|
+
p && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(le, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
|
|
209
|
+
s === "password" && (y ? /* @__PURE__ */ r.jsx(_, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(q, { size: 24, className: "" })),
|
|
211
210
|
e
|
|
212
211
|
] })
|
|
213
212
|
}
|
|
214
213
|
),
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
z && /* @__PURE__ */ r.jsx(
|
|
215
|
+
"button",
|
|
217
216
|
{
|
|
218
217
|
type: "button",
|
|
219
|
-
color: "secondary",
|
|
220
|
-
size: "small",
|
|
221
|
-
animate: !1,
|
|
222
218
|
className: t(
|
|
223
|
-
`absolute
|
|
224
|
-
"size-6 p-
|
|
225
|
-
"bg-
|
|
226
|
-
"
|
|
219
|
+
`absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
|
|
220
|
+
"size-6 p-1 rounded-full",
|
|
221
|
+
"hover:bg-neutral-medium-hover transition-colors",
|
|
222
|
+
f && "opacity-50 cursor-not-allowed"
|
|
227
223
|
),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
variant: "text",
|
|
232
|
-
animateIcon: !1,
|
|
233
|
-
icon: /* @__PURE__ */ r.jsx(ae, { size: 20, className: "" })
|
|
224
|
+
disabled: f,
|
|
225
|
+
onClick: z,
|
|
226
|
+
children: /* @__PURE__ */ r.jsx(V, { size: 20, className: "" })
|
|
234
227
|
}
|
|
235
228
|
),
|
|
236
|
-
|
|
237
|
-
|
|
229
|
+
m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (v || G) && /* @__PURE__ */ r.jsx(
|
|
230
|
+
se,
|
|
238
231
|
{
|
|
239
232
|
className: "absolute ",
|
|
240
233
|
variant: c,
|
|
@@ -247,8 +240,8 @@ const b = {
|
|
|
247
240
|
}
|
|
248
241
|
);
|
|
249
242
|
S.displayName = "Input";
|
|
250
|
-
const
|
|
243
|
+
const me = te(S);
|
|
251
244
|
export {
|
|
252
|
-
|
|
253
|
-
|
|
245
|
+
me as I,
|
|
246
|
+
ne as u
|
|
254
247
|
};
|
package/dist/Input.es.js
CHANGED