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