prometeo-design-system 2.5.7 → 2.6.0
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-DV3gwvqE.js → CardProfile-DA-HDUpi.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 +3 -3
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +2 -2
- package/dist/DrawerMobile.es.js +88 -88
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +1 -1
- package/dist/Icons.es.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-BeADef_g.js} +2 -2
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input-DHdy-pWf.js +295 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputFormik.es.js +94 -137
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-B6E-yOYJ.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.es.js +1 -1
- package/dist/{Select-CrTtTmXZ.js → Select-B5hkJ8Oy.js} +222 -238
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +2 -2
- package/dist/SelectFormikLegacy.es.js +1 -1
- package/dist/SelectSearch.es.js +2 -2
- package/dist/Skeleton.es.js +1 -1
- 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/Toast.es.js +2 -2
- package/dist/ToastProvider.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Drawer/DrawerMobile.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/InputFormik/InputFormik.d.ts +1 -2
- package/dist/components/InputFormik/InputFormikV2.d.ts +5 -0
- package/dist/exports/InputFormikV2.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-ByW6EXIE.js} +96 -94
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +279 -257
- package/package.json +17 -1
- package/dist/Input-PNwH7rb6.js +0 -270
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as d } from "./Icons.es.js";
|
|
3
|
+
import { c as o } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { useRef as T, useLayoutEffect as ge, memo as V, forwardRef as be, useState as O, useCallback as he, useEffect as k } from "react";
|
|
5
|
+
import { useDebounce as we } from "use-debounce";
|
|
6
|
+
import ye from "./Spinner.es.js";
|
|
7
|
+
import { B as je } from "./Button-Bc0LYLfg.js";
|
|
8
|
+
const Ce = (t) => {
|
|
9
|
+
let r = t;
|
|
10
|
+
for (; r && r !== document.body; ) {
|
|
11
|
+
const s = window.getComputedStyle(r).backgroundColor;
|
|
12
|
+
if (s && s !== "transparent" && s !== "rgba(0, 0, 0, 0)")
|
|
13
|
+
return s;
|
|
14
|
+
r = r.parentElement;
|
|
15
|
+
}
|
|
16
|
+
const l = window.getComputedStyle(document.body).backgroundColor;
|
|
17
|
+
return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
|
|
18
|
+
};
|
|
19
|
+
function Ne() {
|
|
20
|
+
const t = T(null);
|
|
21
|
+
return ge(() => {
|
|
22
|
+
if (!t.current || !t.current.parentElement) return;
|
|
23
|
+
const r = Ce(t.current.parentElement);
|
|
24
|
+
t.current.style.backgroundColor = r;
|
|
25
|
+
}, []), {
|
|
26
|
+
ref: t
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const F = (t) => {
|
|
30
|
+
const { variant: r, className: l } = t, i = {
|
|
31
|
+
default: "text-neutral-medium-default pt-[1px]",
|
|
32
|
+
error: "text-error-medium-default pt-[1px]",
|
|
33
|
+
success: "text-success-medium-default"
|
|
34
|
+
}, s = {
|
|
35
|
+
default: /* @__PURE__ */ e.jsx(d.Info, { size: 16, className: "text-neutral-medium-default " }),
|
|
36
|
+
error: /* @__PURE__ */ e.jsx(d.Error, { size: 16, className: "text-error-medium-default" }),
|
|
37
|
+
success: /* @__PURE__ */ e.jsx(d.Check, { size: 16, className: "text-success-medium-default" })
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ e.jsx("div", { ref: t.ref, className: o("pl-3 mt-1", l), children: typeof t.children == "string" ? /* @__PURE__ */ e.jsxs("div", { className: "flex gap-0.5 items-start", children: [
|
|
40
|
+
s[r],
|
|
41
|
+
/* @__PURE__ */ e.jsx("p", { className: o(" prometeo-fonts-body-small", i[r]), children: t.children })
|
|
42
|
+
] }) : t.children });
|
|
43
|
+
};
|
|
44
|
+
F.displayName = "HelperText";
|
|
45
|
+
const ze = V(F), h = {
|
|
46
|
+
default: {
|
|
47
|
+
container: "",
|
|
48
|
+
input: o(
|
|
49
|
+
"border-neutral-default-default text-neutral-default-default!",
|
|
50
|
+
"focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
|
|
51
|
+
"hover:border-neutral-strong-default"
|
|
52
|
+
),
|
|
53
|
+
label: o(
|
|
54
|
+
"text-neutral-medium-default"
|
|
55
|
+
),
|
|
56
|
+
icon: o(
|
|
57
|
+
"text-neutral-medium-default",
|
|
58
|
+
"peer-focus:text-primary-default-default"
|
|
59
|
+
)
|
|
60
|
+
},
|
|
61
|
+
error: {
|
|
62
|
+
container: "",
|
|
63
|
+
input: o(
|
|
64
|
+
"border-error-default-default text-neutral-default-default",
|
|
65
|
+
"focus:border-error-default focus:border-2",
|
|
66
|
+
"focus:ring-0 focus:ring-error-default/20"
|
|
67
|
+
),
|
|
68
|
+
label: o(
|
|
69
|
+
"text-error-light",
|
|
70
|
+
"peer-focus:text-error-light"
|
|
71
|
+
),
|
|
72
|
+
icon: o(
|
|
73
|
+
"text-error-light",
|
|
74
|
+
"peer-focus:text-error-light"
|
|
75
|
+
)
|
|
76
|
+
},
|
|
77
|
+
success: {
|
|
78
|
+
container: "",
|
|
79
|
+
input: o(
|
|
80
|
+
"border-success-default-default text-neutral-default-default",
|
|
81
|
+
"focus:border-success-default focus:border-2",
|
|
82
|
+
"focus:ring-0 focus:ring-success-default/20"
|
|
83
|
+
),
|
|
84
|
+
label: o(
|
|
85
|
+
"text-success",
|
|
86
|
+
"peer-focus:text-success-light"
|
|
87
|
+
),
|
|
88
|
+
icon: o(
|
|
89
|
+
"text-success-light",
|
|
90
|
+
"peer-focus:text-success-light"
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
}, G = be(({
|
|
94
|
+
label: t,
|
|
95
|
+
icon: r,
|
|
96
|
+
iconPosition: l = "left",
|
|
97
|
+
onChange: i,
|
|
98
|
+
value: s = "",
|
|
99
|
+
debounceMs: p = 0,
|
|
100
|
+
name: w,
|
|
101
|
+
width: b = "100%",
|
|
102
|
+
height: c,
|
|
103
|
+
variant: f = "default",
|
|
104
|
+
labelVariant: n = "default",
|
|
105
|
+
size: J = "medium",
|
|
106
|
+
disabled: y = !1,
|
|
107
|
+
type: a = "text",
|
|
108
|
+
isFetching: m,
|
|
109
|
+
errorComponent: H,
|
|
110
|
+
helperComponent: R,
|
|
111
|
+
placeholder: K,
|
|
112
|
+
required: S = !1,
|
|
113
|
+
onFocus: Q,
|
|
114
|
+
onBlur: U,
|
|
115
|
+
onEmptied: B,
|
|
116
|
+
onKeyDown: W,
|
|
117
|
+
onKeyUp: X,
|
|
118
|
+
className: Y,
|
|
119
|
+
isActive: j,
|
|
120
|
+
style: Z,
|
|
121
|
+
readOnly: _ = !1,
|
|
122
|
+
onClear: L,
|
|
123
|
+
...q
|
|
124
|
+
}, A) => {
|
|
125
|
+
const [C, $] = O(s), [N] = we(C, p), [z, M] = O(!1), { ref: ee } = Ne(), te = T(null), v = A || null || te;
|
|
126
|
+
let x = J;
|
|
127
|
+
c && (x = "customHeight");
|
|
128
|
+
const g = {
|
|
129
|
+
small: {
|
|
130
|
+
container: "text-sm",
|
|
131
|
+
input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
|
|
132
|
+
label: ` prometeo-fonts-label-large
|
|
133
|
+
peer-focus:prometeo-fonts-label-large
|
|
134
|
+
peer-placeholder-shown:${n === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
135
|
+
icon: "w-4 h-4 right-3"
|
|
136
|
+
},
|
|
137
|
+
medium: {
|
|
138
|
+
container: "text-base",
|
|
139
|
+
input: "h-12 px-3 prometeo-fonts-body-large",
|
|
140
|
+
label: ` prometeo-fonts-label-large
|
|
141
|
+
peer-focus:prometeo-fonts-label-large
|
|
142
|
+
peer-placeholder-shown:${n === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
143
|
+
icon: "w-5 h-5 right-3"
|
|
144
|
+
},
|
|
145
|
+
large: {
|
|
146
|
+
container: "text-lg",
|
|
147
|
+
input: "h-14 px-3 text-lg border-b border-t-0 border-x-0 rounded-none focus:ring-0 prometeo-fonts-body-xlarge ",
|
|
148
|
+
label: "peer-placeholder-shown:prometeo-fonts-body-xlarge peer-focus:prometeo-fonts-label-large peer-focus:text-neutral-medium-default prometeo-fonts-label-large ",
|
|
149
|
+
icon: "w-6 h-6 right-3"
|
|
150
|
+
},
|
|
151
|
+
customHeight: {
|
|
152
|
+
container: "text-base",
|
|
153
|
+
input: "text-base",
|
|
154
|
+
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
|
|
155
|
+
icon: "w-6 h-6 right-3"
|
|
156
|
+
}
|
|
157
|
+
}, P = he(i, []);
|
|
158
|
+
k(() => {
|
|
159
|
+
p > 0 && N !== s && P(N);
|
|
160
|
+
}, [N, p, P, s]), k(() => {
|
|
161
|
+
$(s);
|
|
162
|
+
}, [s]), k(() => {
|
|
163
|
+
j && v.current?.focus();
|
|
164
|
+
}, [j, v.current?.focus]);
|
|
165
|
+
const re = (u) => {
|
|
166
|
+
Q?.(u);
|
|
167
|
+
}, oe = (u) => {
|
|
168
|
+
j === void 0 && U?.(u);
|
|
169
|
+
}, se = (u) => {
|
|
170
|
+
const E = u.target.value, me = u.target.name, xe = C;
|
|
171
|
+
$(E), xe.length > 0 && E.length === 0 && B?.(), (!p || p === 0) && i(E, me);
|
|
172
|
+
}, le = () => {
|
|
173
|
+
M(!z);
|
|
174
|
+
}, I = {};
|
|
175
|
+
b && b !== "100%" && (I.width = b), c && (I.height = c);
|
|
176
|
+
const D = f === "error" && H, ae = !D && R, ne = a === "password", ue = () => n === "static" ? "-top-1 -translate-y-full left-0 pl-3" : r ? `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"}` : "peer-placeholder-shown:top-1/2 -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1", ce = () => c ? g.customHeight.label : g[x].label, fe = () => c ? { height: c } : {}, de = () => n === "default" ? t : K || t || "", ie = () => ne ? r ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : r ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", pe = n === "default" && "transition-all duration-200 ease-in-out";
|
|
177
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
178
|
+
/* @__PURE__ */ e.jsxs(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
className: o(
|
|
182
|
+
"relative",
|
|
183
|
+
g[x].container,
|
|
184
|
+
!b && "w-full",
|
|
185
|
+
"bg-inherit",
|
|
186
|
+
n === "static" && "mt-2",
|
|
187
|
+
Y
|
|
188
|
+
),
|
|
189
|
+
style: { ...Z, ...I },
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ e.jsx(
|
|
192
|
+
"input",
|
|
193
|
+
{
|
|
194
|
+
id: w,
|
|
195
|
+
name: w,
|
|
196
|
+
ref: v,
|
|
197
|
+
value: C,
|
|
198
|
+
placeholder: de(),
|
|
199
|
+
type: a === "password" && z ? "text" : a,
|
|
200
|
+
className: o(
|
|
201
|
+
"peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
202
|
+
"focus:outline-none px-3",
|
|
203
|
+
n === "default" && "placeholder:text-transparent",
|
|
204
|
+
n === "static" && "placeholder:text-neutral-medium-default ",
|
|
205
|
+
h[f].input,
|
|
206
|
+
g[x].input,
|
|
207
|
+
r && "pr-10",
|
|
208
|
+
y && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
209
|
+
h[f].container,
|
|
210
|
+
ie()
|
|
211
|
+
),
|
|
212
|
+
style: fe(),
|
|
213
|
+
onChange: se,
|
|
214
|
+
onFocus: re,
|
|
215
|
+
onBlur: oe,
|
|
216
|
+
disabled: y,
|
|
217
|
+
required: S,
|
|
218
|
+
onEmptied: B,
|
|
219
|
+
onKeyDown: W,
|
|
220
|
+
onKeyUp: X,
|
|
221
|
+
readOnly: _,
|
|
222
|
+
...q
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
/* @__PURE__ */ e.jsx(
|
|
226
|
+
"label",
|
|
227
|
+
{
|
|
228
|
+
ref: ee,
|
|
229
|
+
htmlFor: w,
|
|
230
|
+
className: o(
|
|
231
|
+
"absolute left-3 pointer-events-none px-1 z-10",
|
|
232
|
+
pe,
|
|
233
|
+
ce(),
|
|
234
|
+
h[f].label,
|
|
235
|
+
ue(),
|
|
236
|
+
S && "after:content-['*'] after:text-error-default after:ml-1",
|
|
237
|
+
y && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
238
|
+
),
|
|
239
|
+
children: t
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
(r || a === "password" || m) && /* @__PURE__ */ e.jsx(
|
|
243
|
+
"button",
|
|
244
|
+
{
|
|
245
|
+
tabIndex: -1,
|
|
246
|
+
type: "button",
|
|
247
|
+
className: o(
|
|
248
|
+
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
|
|
249
|
+
g[x].icon,
|
|
250
|
+
h[f].icon,
|
|
251
|
+
a === "password" && !m ? "cursor-pointer" : "pointer-events-none",
|
|
252
|
+
l === "right" ? "right-3" : "left-3"
|
|
253
|
+
),
|
|
254
|
+
onClick: a === "password" && !m ? le : void 0,
|
|
255
|
+
onMouseDown: (u) => a === "password" && !m && u.preventDefault(),
|
|
256
|
+
children: /* @__PURE__ */ e.jsx("div", { children: m && a !== "password" ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(ye, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : a === "password" ? z ? /* @__PURE__ */ e.jsx(d.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ e.jsx(d.EyeVisibilityOff, { size: 24, className: "" }) : r })
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
L && /* @__PURE__ */ e.jsx(
|
|
260
|
+
je,
|
|
261
|
+
{
|
|
262
|
+
type: "button",
|
|
263
|
+
color: "secondary",
|
|
264
|
+
size: "small",
|
|
265
|
+
animate: !1,
|
|
266
|
+
className: o(
|
|
267
|
+
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10 right-1",
|
|
268
|
+
"size-6 p-4 ",
|
|
269
|
+
"bg-inherit",
|
|
270
|
+
"hover:bg-neutral-default-hover p-4 rounded-full"
|
|
271
|
+
),
|
|
272
|
+
label: "",
|
|
273
|
+
onClick: L,
|
|
274
|
+
icon: /* @__PURE__ */ e.jsx(d.Close, { size: 20, className: "" })
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
(D || ae) && /* @__PURE__ */ e.jsx(
|
|
281
|
+
ze,
|
|
282
|
+
{
|
|
283
|
+
variant: f,
|
|
284
|
+
children: H || R
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
] });
|
|
288
|
+
});
|
|
289
|
+
G.displayName = "Input";
|
|
290
|
+
const Le = V(G);
|
|
291
|
+
export {
|
|
292
|
+
ze as H,
|
|
293
|
+
Le as I,
|
|
294
|
+
Ne as u
|
|
295
|
+
};
|
package/dist/Input.es.js
CHANGED
package/dist/InputFormik.es.js
CHANGED
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
2
|
-
import { c as
|
|
3
|
-
import { FastField as
|
|
4
|
-
import { memo as
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as u } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { FastField as O, ErrorMessage as q } from "formik";
|
|
4
|
+
import { memo as G, useState as I, useRef as H, useCallback as y, useLayoutEffect as J } from "react";
|
|
5
5
|
import { Icons as N } from "./Icons.es.js";
|
|
6
|
-
const
|
|
7
|
-
icon:
|
|
6
|
+
const Q = ({
|
|
7
|
+
icon: l,
|
|
8
8
|
iconPosition: r = "left",
|
|
9
9
|
label: d,
|
|
10
10
|
className: B,
|
|
11
|
-
containerClassName:
|
|
11
|
+
containerClassName: $,
|
|
12
12
|
id: w,
|
|
13
13
|
type: j = "text",
|
|
14
14
|
labelVariant: n = "default",
|
|
15
15
|
placeholder: p,
|
|
16
16
|
disabled: b = !1,
|
|
17
|
-
field:
|
|
18
|
-
innerRef: $,
|
|
17
|
+
field: t,
|
|
19
18
|
form: z,
|
|
20
19
|
...a
|
|
21
20
|
}) => {
|
|
22
|
-
const [o, v] = I(!1), [C, K] = I(!1),
|
|
21
|
+
const [o, v] = I(!1), [C, K] = I(!1), c = H(null), F = z.getFieldMeta(t.name), k = F.touched && F.error, E = t.value && t.value.toString().length > 0, x = j === "password", M = x ? C ? "text" : "password" : j, P = () => n === "static" ? p || d : p || "", R = () => x ? l ? r === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : l ? r === "left" ? "pl-10" : "pr-10" : "", A = y(() => {
|
|
23
22
|
v(!0), a.onFocus?.();
|
|
24
|
-
}, [a]),
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
[l, a]
|
|
29
|
-
), U = y(() => {
|
|
30
|
-
K((c) => !c);
|
|
23
|
+
}, [a]), D = y((i) => {
|
|
24
|
+
v(!1), a.onBlur?.(), t.onBlur(i);
|
|
25
|
+
}, [t, a]), T = y(() => {
|
|
26
|
+
K((i) => !i);
|
|
31
27
|
}, []);
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
for (;
|
|
37
|
-
const f = window.getComputedStyle(
|
|
28
|
+
J(() => {
|
|
29
|
+
if (c.current) {
|
|
30
|
+
const V = ((L) => {
|
|
31
|
+
let s = L;
|
|
32
|
+
for (; s && s !== document.body; ) {
|
|
33
|
+
const f = window.getComputedStyle(s).backgroundColor;
|
|
38
34
|
if (f && f !== "transparent" && f !== "rgba(0, 0, 0, 0)")
|
|
39
35
|
return f;
|
|
40
|
-
|
|
36
|
+
s = s.parentElement;
|
|
41
37
|
}
|
|
42
38
|
const m = window.getComputedStyle(document.body).backgroundColor;
|
|
43
39
|
return m && m !== "transparent" && m !== "rgba(0, 0, 0, 0)" ? m : "rgb(255, 255, 255)";
|
|
44
|
-
})(
|
|
45
|
-
|
|
46
|
-
);
|
|
47
|
-
i.current.style.backgroundColor = L;
|
|
40
|
+
})(c.current.parentElement);
|
|
41
|
+
c.current.style.backgroundColor = V;
|
|
48
42
|
}
|
|
49
43
|
}, []);
|
|
50
44
|
const g = {
|
|
@@ -78,7 +72,7 @@ const W = ({
|
|
|
78
72
|
icon: {},
|
|
79
73
|
placeholder: {}
|
|
80
74
|
}
|
|
81
|
-
},
|
|
75
|
+
}, U = {
|
|
82
76
|
none: {
|
|
83
77
|
label: "left-2 "
|
|
84
78
|
},
|
|
@@ -98,116 +92,79 @@ const W = ({
|
|
|
98
92
|
label: `top-1/2 -translate-y-1/2 scale-100 peer-focus:text-sm peer-placeholder-shown:text-base ${(o || E) && "top-0 scale-90"}`
|
|
99
93
|
}
|
|
100
94
|
}, h = b ? "disabled" : k ? "error" : "default";
|
|
101
|
-
return /* @__PURE__ */ e.jsxs(
|
|
102
|
-
"div",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
return /* @__PURE__ */ e.jsxs("div", { className: u("relative w-full bg-inherit", n === "static" && "mt-5", $), children: [
|
|
96
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative bg-inherit", children: [
|
|
97
|
+
/* @__PURE__ */ e.jsx(
|
|
98
|
+
"input",
|
|
99
|
+
{
|
|
100
|
+
disabled: b,
|
|
101
|
+
id: w || t.name,
|
|
102
|
+
type: M,
|
|
103
|
+
name: t.name,
|
|
104
|
+
value: t.value || "",
|
|
105
|
+
placeholder: P(),
|
|
106
|
+
onChange: t.onChange,
|
|
107
|
+
onFocus: A,
|
|
108
|
+
onEmptied: a.onEmptied,
|
|
109
|
+
onKeyDown: a.onKeyDown,
|
|
110
|
+
onKeyUp: a.onKeyUp,
|
|
111
|
+
onBlur: D,
|
|
112
|
+
className: u(
|
|
113
|
+
"w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
|
|
114
|
+
"bg-transparent focus:outline-none",
|
|
115
|
+
S[n].input,
|
|
116
|
+
g[h].input,
|
|
117
|
+
R(),
|
|
118
|
+
B
|
|
119
|
+
)
|
|
120
|
+
}
|
|
108
121
|
),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
onChange: l.onChange,
|
|
121
|
-
onFocus: D,
|
|
122
|
-
onEmptied: a.onEmptied,
|
|
123
|
-
onKeyDown: a.onKeyDown,
|
|
124
|
-
onKeyUp: a.onKeyUp,
|
|
125
|
-
onBlur: T,
|
|
126
|
-
className: s(
|
|
127
|
-
"w-full px-3 h-12 text-left border-[1px] rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
|
|
128
|
-
"bg-transparent focus:outline-none",
|
|
129
|
-
S[n].input,
|
|
130
|
-
g[h].input,
|
|
131
|
-
A(),
|
|
132
|
-
B
|
|
133
|
-
),
|
|
134
|
-
ref: $
|
|
135
|
-
}
|
|
122
|
+
/* @__PURE__ */ e.jsx(
|
|
123
|
+
"label",
|
|
124
|
+
{
|
|
125
|
+
ref: c,
|
|
126
|
+
htmlFor: w || a.name,
|
|
127
|
+
className: u(
|
|
128
|
+
"absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
129
|
+
"prometeo-fonts-label-large text-sm",
|
|
130
|
+
U[l ? r : "none"].label,
|
|
131
|
+
S[n].label,
|
|
132
|
+
g[h].label
|
|
136
133
|
),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
{
|
|
155
|
-
className: s(
|
|
156
|
-
"absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
|
|
157
|
-
g[h].icon,
|
|
158
|
-
r === "left" ? "left-3" : "right-3"
|
|
159
|
-
),
|
|
160
|
-
children: t
|
|
161
|
-
}
|
|
134
|
+
children: d
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
l && /* @__PURE__ */ e.jsx("div", { className: u(
|
|
138
|
+
"absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
|
|
139
|
+
g[h].icon,
|
|
140
|
+
r === "left" ? "left-3" : "right-3"
|
|
141
|
+
), children: l }),
|
|
142
|
+
x && /* @__PURE__ */ e.jsx(
|
|
143
|
+
"button",
|
|
144
|
+
{
|
|
145
|
+
type: "button",
|
|
146
|
+
onClick: T,
|
|
147
|
+
className: u(
|
|
148
|
+
"absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
|
|
149
|
+
"transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
|
|
150
|
+
l && r === "right" ? "right-8" : "right-3"
|
|
162
151
|
),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
className: "text-neutral-default-default"
|
|
180
|
-
}
|
|
181
|
-
) : /* @__PURE__ */ e.jsx(
|
|
182
|
-
N.EyeVisibilityOff,
|
|
183
|
-
{
|
|
184
|
-
size: 24,
|
|
185
|
-
className: "text-neutral-default-default"
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
}
|
|
189
|
-
)
|
|
190
|
-
] }),
|
|
191
|
-
k && /* @__PURE__ */ e.jsx(
|
|
192
|
-
G,
|
|
193
|
-
{
|
|
194
|
-
name: l.name,
|
|
195
|
-
component: "span",
|
|
196
|
-
className: "block text-error-default-default text-xs mt-1"
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
}, X = H(W), ae = (t) => /* @__PURE__ */ e.jsx(q, { name: t.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(
|
|
203
|
-
X,
|
|
204
|
-
{
|
|
205
|
-
...t,
|
|
206
|
-
field: r,
|
|
207
|
-
form: d,
|
|
208
|
-
innerRef: t.innerRef
|
|
209
|
-
}
|
|
210
|
-
) });
|
|
152
|
+
tabIndex: -1,
|
|
153
|
+
disabled: b,
|
|
154
|
+
children: C ? /* @__PURE__ */ e.jsx(N.EyeVisibility, { size: 24, className: "text-neutral-default-default" }) : /* @__PURE__ */ e.jsx(N.EyeVisibilityOff, { size: 24, className: "text-neutral-default-default" })
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] }),
|
|
158
|
+
k && /* @__PURE__ */ e.jsx(
|
|
159
|
+
q,
|
|
160
|
+
{
|
|
161
|
+
name: t.name,
|
|
162
|
+
component: "span",
|
|
163
|
+
className: "block text-error-default-default text-xs mt-1"
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
] });
|
|
167
|
+
}, W = G(Q), le = (l) => /* @__PURE__ */ e.jsx(O, { name: l.name, children: ({ field: r, form: d }) => /* @__PURE__ */ e.jsx(W, { ...l, field: r, form: d }) });
|
|
211
168
|
export {
|
|
212
|
-
|
|
169
|
+
le as default
|
|
213
170
|
};
|
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 n } from "./jsx-runtime-
|
|
1
|
+
import { j as n } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { useRef as o, createContext as c, useContext as l, memo as d } from "react";
|
|
3
3
|
const a = c(null), x = ({ children: e }) => {
|
|
4
4
|
const r = o(null), s = o(null), u = (t) => {
|
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
package/dist/ProgressBar.es.js
CHANGED