prometeo-design-system 2.6.7 → 2.7.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/{Button-DsbEyjth.js → Button-CvBWH1HX.js} +8 -8
- package/dist/Button.es.js +1 -1
- package/dist/ButtonV2.d.ts +6 -0
- package/dist/ButtonV2.es.js +217 -0
- package/dist/CheckboxFormik.es.js +10 -10
- package/dist/DatePicker.es.js +2 -2
- package/dist/DrawerDesktop.es.js +1 -1
- package/dist/DropZone.es.js +5 -5
- package/dist/FAButton.es.js +1 -1
- package/dist/Header.es.js +11 -11
- package/dist/{ImageGallery-DnoRTpCr.js → ImageGallery-DKzJg3un.js} +1 -1
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input-BTsR-vNF.js +281 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputFormikV2.es.js +1 -1
- package/dist/Pagination.es.js +8 -8
- package/dist/ProfilePictureUpload.es.js +3 -3
- package/dist/Select-BQMdfu1n.js +1003 -0
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectFormikLegacy.es.js +14 -14
- package/dist/SelectSearch.es.js +66 -63
- package/dist/TabLinks.es.js +8 -8
- package/dist/TextArea.es.js +28 -26
- package/dist/Toast.es.js +1 -1
- package/dist/components/Button/ButtonV2.d.ts +23 -0
- package/dist/components/Header/Header.d.ts +2 -1
- package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +29 -3
- package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +2 -1
- package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +9 -3
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +28 -1
- package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +1 -0
- package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +2 -1
- package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +13 -2
- package/dist/components/RecurrentDatePicker/recurrentDatePicker.validations.d.ts +69 -0
- package/dist/components/Select/Select.d.ts +18 -0
- package/dist/components/TextArea/TextArea.d.ts +2 -1
- package/dist/exports/ButtonV2.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/preview/ButtonPreview.d.ts +2 -0
- package/dist/preview/SelectPreview/SelectGroupedOptionsPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +21 -19
- package/package.json +5 -2
- package/src/styles/intellisense.css +2 -1
- package/dist/Input-i6OzjjFo.js +0 -280
- package/dist/Select-D3aU7dXF.js +0 -812
- package/dist/components/Drawer/DrawerDesktop_old.d.ts +0 -15
- package/dist/components/Drawer/DrawerMobile_old.d.ts +0 -18
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { default as Se } from "./Avatar.es.js";
|
|
2
|
-
import { B as Ie } from "./Button-
|
|
2
|
+
import { B as Ie } from "./Button-CvBWH1HX.js";
|
|
3
3
|
import { C as Re, a as Le } from "./CardProfile-DV3gwvqE.js";
|
|
4
4
|
import { default as Ae } from "./CheckBox.es.js";
|
|
5
5
|
import { default as qe } from "./CheckboxFormik.es.js";
|
|
6
6
|
import { default as De, useDialogControl as Ee } from "./DialogModal.es.js";
|
|
7
7
|
import { default as Fe, useDrawerDesktop as He } from "./DrawerDesktop.es.js";
|
|
8
8
|
import { default as $e, useDrawerMobile as Me } from "./DrawerMobile.es.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { I as _e } from "./Input-
|
|
9
|
+
import { default as Ue } from "./Header.es.js";
|
|
10
|
+
import { I as _e } from "./Input-BTsR-vNF.js";
|
|
11
11
|
import { default as Ze } from "./InputFormik.es.js";
|
|
12
12
|
import { InputMultiple as Ke } from "./InputMultiple.es.js";
|
|
13
13
|
import { default as Ye } from "./Logo.es.js";
|
|
@@ -15,7 +15,7 @@ import { Menu as tt } from "./Menu.es.js";
|
|
|
15
15
|
import { default as rt } from "./Pagination.es.js";
|
|
16
16
|
import { ProfilePictureUpload as nt } from "./ProfilePictureUpload.es.js";
|
|
17
17
|
import { default as st } from "./ProgressBar.es.js";
|
|
18
|
-
import { S as ct } from "./Select-
|
|
18
|
+
import { S as ct } from "./Select-BQMdfu1n.js";
|
|
19
19
|
import { default as dt } from "./SelectFormikLegacy.es.js";
|
|
20
20
|
import { default as mt } from "./SelectFormik.es.js";
|
|
21
21
|
import { default as xt } from "./Spinner.es.js";
|
|
@@ -30,8 +30,8 @@ import { default as Ot } from "./Tooltip.es.js";
|
|
|
30
30
|
import { Skeleton as Ht } from "./Skeleton.es.js";
|
|
31
31
|
import { SegmentedButton as $t } from "./SegmentedButton.es.js";
|
|
32
32
|
import { u as k } from "./LayoutGeneric-CbaoatQB.js";
|
|
33
|
-
import { L as
|
|
34
|
-
import { I as _t } from "./ImageGallery-
|
|
33
|
+
import { L as Vt, S as Ut } from "./LayoutGeneric-CbaoatQB.js";
|
|
34
|
+
import { I as _t } from "./ImageGallery-DKzJg3un.js";
|
|
35
35
|
import { default as Zt } from "./Image.es.js";
|
|
36
36
|
import { default as Kt, toastpyrion as Qt } from "./Toast.es.js";
|
|
37
37
|
import { default as ea } from "./ToastProvider.es.js";
|
|
@@ -40,6 +40,7 @@ import { default as oa } from "./FAButton.es.js";
|
|
|
40
40
|
import { default as ia } from "./InputFormikV2.es.js";
|
|
41
41
|
import { RadioButtonFormik as la } from "./RadioButtonFormik.es.js";
|
|
42
42
|
import { RadioButton as ua } from "./RadioButton.es.js";
|
|
43
|
+
import { default as fa } from "./ButtonV2.es.js";
|
|
43
44
|
import { j as a } from "./jsx-runtime-DKDX3adD.js";
|
|
44
45
|
import { c as u } from "./cn-B6yFEsav.js";
|
|
45
46
|
import A, { useRef as v, useState as g, useLayoutEffect as P, createContext as q, useContext as z, forwardRef as C, useEffect as h, useCallback as D } from "react";
|
|
@@ -47,10 +48,10 @@ import { useGSAP as I } from "@gsap/react";
|
|
|
47
48
|
import x from "gsap";
|
|
48
49
|
import { Icons as w } from "./Icons.es.js";
|
|
49
50
|
import { motion as b, AnimatePresence as B } from "framer-motion";
|
|
50
|
-
import { default as
|
|
51
|
+
import { default as pa } from "./OtpInput.es.js";
|
|
51
52
|
import { useDropzone as E } from "react-dropzone";
|
|
52
|
-
import { useIsMobile as
|
|
53
|
-
import { DropZone as
|
|
53
|
+
import { useIsMobile as ba } from "./useDevice.es.js";
|
|
54
|
+
import { DropZone as va } from "./DropZone.es.js";
|
|
54
55
|
const O = (t, e) => {
|
|
55
56
|
I(
|
|
56
57
|
() => {
|
|
@@ -190,7 +191,7 @@ const O = (t, e) => {
|
|
|
190
191
|
}
|
|
191
192
|
};
|
|
192
193
|
return /* @__PURE__ */ a.jsx(R.Provider, { value: p, children: t });
|
|
193
|
-
}, j = (t, e, r, n) => e && (Array.isArray(e) ? e.length > 0 : e) ? t.to(e, r, n) : t,
|
|
194
|
+
}, j = (t, e, r, n) => e && (Array.isArray(e) ? e.length > 0 : e) ? t.to(e, r, n) : t, V = (t, e, r) => {
|
|
194
195
|
I(
|
|
195
196
|
() => {
|
|
196
197
|
if (!t.current) return;
|
|
@@ -232,11 +233,11 @@ const O = (t, e) => {
|
|
|
232
233
|
secondaryBarContent: x.utils.toArray(".secondary-bar *"),
|
|
233
234
|
badgeInLink: x.utils.toArray(".badge-in-link")
|
|
234
235
|
};
|
|
235
|
-
e ?
|
|
236
|
+
e ? U(n, o) : G(n, o), o.secondaryBar && _(o.secondaryBar);
|
|
236
237
|
},
|
|
237
238
|
{ scope: t, dependencies: [e, r] }
|
|
238
239
|
);
|
|
239
|
-
},
|
|
240
|
+
}, U = (t, e) => {
|
|
240
241
|
t.to(e.navbar, {
|
|
241
242
|
width: "5rem",
|
|
242
243
|
duration: 0.2,
|
|
@@ -568,7 +569,7 @@ const O = (t, e) => {
|
|
|
568
569
|
l.current && d(l);
|
|
569
570
|
}, [d]), h(() => {
|
|
570
571
|
c.current && i(c);
|
|
571
|
-
}, [i]),
|
|
572
|
+
}, [i]), V(l, e, !1), /* @__PURE__ */ a.jsxs(
|
|
572
573
|
"div",
|
|
573
574
|
{
|
|
574
575
|
className: u(
|
|
@@ -946,6 +947,7 @@ export {
|
|
|
946
947
|
Se as Avatar,
|
|
947
948
|
L as Badge,
|
|
948
949
|
Ie as Button,
|
|
950
|
+
fa as ButtonV2,
|
|
949
951
|
Re as CardProfile,
|
|
950
952
|
Le as ChangueAccount,
|
|
951
953
|
Ae as CheckBox,
|
|
@@ -955,9 +957,9 @@ export {
|
|
|
955
957
|
De as DialogModal,
|
|
956
958
|
Fe as DrawerDesktop,
|
|
957
959
|
$e as DrawerMobile,
|
|
958
|
-
|
|
960
|
+
va as DropZone,
|
|
959
961
|
oa as FAButton,
|
|
960
|
-
|
|
962
|
+
Ue as Header,
|
|
961
963
|
w as Icons,
|
|
962
964
|
Zt as Image,
|
|
963
965
|
_t as ImageGallery,
|
|
@@ -965,14 +967,14 @@ export {
|
|
|
965
967
|
Ze as InputFormik,
|
|
966
968
|
ia as InputFormikV2,
|
|
967
969
|
Ke as InputMultiple,
|
|
968
|
-
|
|
970
|
+
Vt as LayoutGeneric,
|
|
969
971
|
Ye as Logo,
|
|
970
972
|
tt as Menu,
|
|
971
973
|
xe as NavBarActions,
|
|
972
974
|
ge as NavbarCollapseButton,
|
|
973
975
|
be as NavbarLinks,
|
|
974
976
|
pe as NavigationLink,
|
|
975
|
-
|
|
977
|
+
pa as OtpInput,
|
|
976
978
|
rt as Pagination,
|
|
977
979
|
nt as ProfilePictureUpload,
|
|
978
980
|
st as ProgressBar,
|
|
@@ -986,7 +988,7 @@ export {
|
|
|
986
988
|
aa as SelectSearch,
|
|
987
989
|
me as Sidebar,
|
|
988
990
|
M as SidebarProvider,
|
|
989
|
-
|
|
991
|
+
Ut as SidebarRefProvider,
|
|
990
992
|
Ht as Skeleton,
|
|
991
993
|
xt as Spinner,
|
|
992
994
|
yt as Steps,
|
|
@@ -1012,7 +1014,7 @@ export {
|
|
|
1012
1014
|
He as useDrawerDesktop,
|
|
1013
1015
|
Me as useDrawerMobile,
|
|
1014
1016
|
we as useFileDropzone,
|
|
1015
|
-
|
|
1017
|
+
ba as useIsMobile,
|
|
1016
1018
|
ve as useNavbarCollapse,
|
|
1017
1019
|
fe as useSidebar,
|
|
1018
1020
|
k as useSidebarContext
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prometeo-design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "design kit system",
|
|
7
7
|
"main": "dist/prometeo-design-system.umd.js",
|
|
@@ -181,6 +181,10 @@
|
|
|
181
181
|
"types": "./dist/RadioButtonFormik.d.ts",
|
|
182
182
|
"import": "./dist/RadioButtonFormik.es.js"
|
|
183
183
|
},
|
|
184
|
+
"./ButtonV2": {
|
|
185
|
+
"types": "./dist/ButtonV2.d.ts",
|
|
186
|
+
"import": "./dist/ButtonV2.es.js"
|
|
187
|
+
},
|
|
184
188
|
"./styles": "./dist/prometeo-design-system.css",
|
|
185
189
|
"./intellisense": "./src/styles/intellisense.css"
|
|
186
190
|
},
|
|
@@ -266,7 +270,6 @@
|
|
|
266
270
|
"typescript-eslint": "^8.39.1",
|
|
267
271
|
"unplugin-fonts": "^1.4.0",
|
|
268
272
|
"use-debounce": "^10.0.6",
|
|
269
|
-
"vaul": "^1.1.2",
|
|
270
273
|
"vite": "^7.1.2",
|
|
271
274
|
"vite-plugin-dts": "^4.5.4"
|
|
272
275
|
},
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
@utility bg-primary-default-disabled { --intellisense-bg-primary-default-disabled: 1; }
|
|
109
109
|
@utility bg-primary-default-hover { --intellisense-bg-primary-default-hover: 1; }
|
|
110
110
|
@utility bg-primary-default-pressed { --intellisense-bg-primary-default-pressed: 1; }
|
|
111
|
-
@utility bg-primary-default-
|
|
111
|
+
@utility bg-primary-default-focused { --intellisense-bg-primary-default-focused: 1; }
|
|
112
112
|
@utility bg-primary-medium-default { --intellisense-bg-primary-medium-default: 1; }
|
|
113
113
|
@utility bg-primary-medium-disabled { --intellisense-bg-primary-medium-disabled: 1; }
|
|
114
114
|
@utility bg-primary-light { --intellisense-bg-primary-light: 1; }
|
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
@utility border-primary-medium-pressed { --intellisense-border-primary-medium-pressed: 1; }
|
|
168
168
|
@utility border-primary-medium-disabled { --intellisense-border-primary-medium-disabled: 1; }
|
|
169
169
|
@utility border-primary-medium-hover { --intellisense-border-primary-medium-hover: 1; }
|
|
170
|
+
@utility border-primary-medium-pressed { --intellisense-border-primary-medium-pressed: 1; }
|
|
170
171
|
@utility border-neutral { --intellisense-border-neutral: 1; }
|
|
171
172
|
@utility border-neutral-default-default { --intellisense-border-neutral-default-default: 1; }
|
|
172
173
|
@utility border-neutral-default-hover { --intellisense-border-neutral-default-hover: 1; }
|
package/dist/Input-i6OzjjFo.js
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { Icons as k } from "./Icons.es.js";
|
|
3
|
-
import { c as r } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { useRef as T, useLayoutEffect as me, memo as ge, forwardRef as xe, useState as O, useCallback as be, useEffect as B } from "react";
|
|
5
|
-
import { useDebounce as he } from "use-debounce";
|
|
6
|
-
import we from "./Spinner.es.js";
|
|
7
|
-
import { H as ye } from "./HelperComponent-U6mPwuDH.js";
|
|
8
|
-
import { B as je } from "./Button-DsbEyjth.js";
|
|
9
|
-
const Ce = (o) => {
|
|
10
|
-
let t = o;
|
|
11
|
-
for (; t && t !== document.body; ) {
|
|
12
|
-
const l = window.getComputedStyle(t).backgroundColor;
|
|
13
|
-
if (l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)")
|
|
14
|
-
return l;
|
|
15
|
-
t = t.parentElement;
|
|
16
|
-
}
|
|
17
|
-
const s = window.getComputedStyle(document.body).backgroundColor;
|
|
18
|
-
return s && s !== "transparent" && s !== "rgba(0, 0, 0, 0)" ? s : "rgb(255, 255, 255)";
|
|
19
|
-
};
|
|
20
|
-
function ze() {
|
|
21
|
-
const o = T(null);
|
|
22
|
-
return me(() => {
|
|
23
|
-
if (!o.current || !o.current.parentElement) return;
|
|
24
|
-
const t = Ce(o.current.parentElement);
|
|
25
|
-
o.current.style.backgroundColor = t;
|
|
26
|
-
}, []), {
|
|
27
|
-
ref: o
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const x = {
|
|
31
|
-
default: {
|
|
32
|
-
container: "",
|
|
33
|
-
input: r(
|
|
34
|
-
"border-neutral-default-default text-neutral-default-default!",
|
|
35
|
-
"focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
|
|
36
|
-
"hover:border-neutral-strong-default"
|
|
37
|
-
),
|
|
38
|
-
label: r(
|
|
39
|
-
"text-neutral-medium-default"
|
|
40
|
-
),
|
|
41
|
-
icon: r(
|
|
42
|
-
"text-neutral-medium-default",
|
|
43
|
-
"peer-focus:text-primary-default-default"
|
|
44
|
-
)
|
|
45
|
-
},
|
|
46
|
-
error: {
|
|
47
|
-
container: "",
|
|
48
|
-
input: r(
|
|
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: r(
|
|
54
|
-
"text-error-light",
|
|
55
|
-
"peer-focus:text-error-light"
|
|
56
|
-
),
|
|
57
|
-
icon: r(
|
|
58
|
-
"text-error-light",
|
|
59
|
-
"peer-focus:text-error-light"
|
|
60
|
-
)
|
|
61
|
-
},
|
|
62
|
-
success: {
|
|
63
|
-
container: "",
|
|
64
|
-
input: r(
|
|
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: r(
|
|
70
|
-
"text-success",
|
|
71
|
-
"peer-focus:text-success-light"
|
|
72
|
-
),
|
|
73
|
-
icon: r(
|
|
74
|
-
"text-success-light",
|
|
75
|
-
"peer-focus:text-success-light"
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
}, V = xe(({
|
|
79
|
-
label: o,
|
|
80
|
-
icon: t,
|
|
81
|
-
iconPosition: s = "left",
|
|
82
|
-
onChange: b,
|
|
83
|
-
value: l = "",
|
|
84
|
-
debounceMs: d = 0,
|
|
85
|
-
name: h,
|
|
86
|
-
width: g = "100%",
|
|
87
|
-
height: c,
|
|
88
|
-
variant: f = "default",
|
|
89
|
-
labelVariant: a = "default",
|
|
90
|
-
size: F = "medium",
|
|
91
|
-
disabled: w = !1,
|
|
92
|
-
type: n = "text",
|
|
93
|
-
isFetching: p,
|
|
94
|
-
errorComponent: y,
|
|
95
|
-
helperComponent: j,
|
|
96
|
-
placeholder: G,
|
|
97
|
-
required: v = !1,
|
|
98
|
-
onFocus: J,
|
|
99
|
-
onBlur: K,
|
|
100
|
-
onEmptied: H,
|
|
101
|
-
onKeyDown: Q,
|
|
102
|
-
onKeyUp: U,
|
|
103
|
-
className: W,
|
|
104
|
-
isActive: C,
|
|
105
|
-
style: X,
|
|
106
|
-
readOnly: Y = !1,
|
|
107
|
-
onClear: L,
|
|
108
|
-
...Z
|
|
109
|
-
}, _) => {
|
|
110
|
-
const [z, P] = O(l), [N] = he(z, d), [E, q] = O(!1), { ref: A } = ze(), M = T(null), I = _ || null || M;
|
|
111
|
-
let i = F;
|
|
112
|
-
c && (i = "customHeight");
|
|
113
|
-
const m = {
|
|
114
|
-
small: {
|
|
115
|
-
container: "text-sm",
|
|
116
|
-
input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
|
|
117
|
-
label: ` prometeo-fonts-label-large
|
|
118
|
-
peer-focus:prometeo-fonts-label-large
|
|
119
|
-
peer-placeholder-shown:${a === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
120
|
-
icon: "w-4 h-4 right-3"
|
|
121
|
-
},
|
|
122
|
-
medium: {
|
|
123
|
-
container: "text-base",
|
|
124
|
-
input: "h-12 px-3 prometeo-fonts-body-large",
|
|
125
|
-
label: ` prometeo-fonts-label-large
|
|
126
|
-
peer-focus:prometeo-fonts-label-large
|
|
127
|
-
peer-placeholder-shown:${a === "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 `,
|
|
128
|
-
icon: "w-5 h-5 right-3"
|
|
129
|
-
},
|
|
130
|
-
large: {
|
|
131
|
-
container: "text-lg",
|
|
132
|
-
input: "h-14 px-3 text-lg border-b border-t-0 border-x-0 rounded-none focus:ring-0 prometeo-fonts-body-xlarge ",
|
|
133
|
-
label: "peer-placeholder-shown:prometeo-fonts-body-xlarge peer-focus:prometeo-fonts-label-large peer-focus:text-neutral-medium-default prometeo-fonts-label-large ",
|
|
134
|
-
icon: "w-6 h-6 right-3"
|
|
135
|
-
},
|
|
136
|
-
customHeight: {
|
|
137
|
-
container: "text-base",
|
|
138
|
-
input: "text-base",
|
|
139
|
-
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
|
|
140
|
-
icon: "w-6 h-6 right-3"
|
|
141
|
-
}
|
|
142
|
-
}, $ = be(b, []);
|
|
143
|
-
B(() => {
|
|
144
|
-
d > 0 && N !== l && $(N);
|
|
145
|
-
}, [N, d, $, l]), B(() => {
|
|
146
|
-
P(l);
|
|
147
|
-
}, [l]), B(() => {
|
|
148
|
-
C && I.current?.focus();
|
|
149
|
-
}, [C, I.current?.focus]);
|
|
150
|
-
const ee = (u) => {
|
|
151
|
-
J?.(u);
|
|
152
|
-
}, te = (u) => {
|
|
153
|
-
C === void 0 && K?.(u);
|
|
154
|
-
}, re = (u) => {
|
|
155
|
-
const S = u.target.value, pe = u.target.name, ie = z;
|
|
156
|
-
P(S), ie.length > 0 && S.length === 0 && H?.(), (!d || d === 0) && b(S, pe);
|
|
157
|
-
}, oe = () => {
|
|
158
|
-
q(!E);
|
|
159
|
-
}, R = {};
|
|
160
|
-
g && g !== "100%" && (R.width = g), c && (R.height = c);
|
|
161
|
-
const D = f === "error" && y, le = !D && j, se = n === "password", ne = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : t ? `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 ${s === "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", ae = () => c ? m.customHeight.label : m[i].label, ue = () => c ? { height: c } : {}, ce = () => a === "default" ? o : G || o || "", fe = () => se ? t ? s === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : t ? s === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", de = a === "default" && "transition-all duration-200 ease-in-out";
|
|
162
|
-
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
163
|
-
/* @__PURE__ */ e.jsxs(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
className: r(
|
|
167
|
-
"relative",
|
|
168
|
-
m[i].container,
|
|
169
|
-
!g && "w-full",
|
|
170
|
-
"bg-inherit",
|
|
171
|
-
a === "static" && "mt-2",
|
|
172
|
-
W
|
|
173
|
-
),
|
|
174
|
-
style: { ...X, ...R },
|
|
175
|
-
children: [
|
|
176
|
-
/* @__PURE__ */ e.jsx(
|
|
177
|
-
"input",
|
|
178
|
-
{
|
|
179
|
-
id: h,
|
|
180
|
-
name: h,
|
|
181
|
-
ref: I,
|
|
182
|
-
value: z,
|
|
183
|
-
placeholder: ce(),
|
|
184
|
-
type: n === "password" && E ? "text" : n,
|
|
185
|
-
className: r(
|
|
186
|
-
"peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
187
|
-
"focus:outline-none px-3",
|
|
188
|
-
a === "default" && "placeholder:text-transparent",
|
|
189
|
-
a === "static" && "placeholder:text-neutral-medium-default ",
|
|
190
|
-
x[f].input,
|
|
191
|
-
m[i].input,
|
|
192
|
-
t && "pr-10",
|
|
193
|
-
w && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
194
|
-
x[f].container,
|
|
195
|
-
fe()
|
|
196
|
-
),
|
|
197
|
-
style: ue(),
|
|
198
|
-
onChange: re,
|
|
199
|
-
onFocus: ee,
|
|
200
|
-
onBlur: te,
|
|
201
|
-
disabled: w,
|
|
202
|
-
required: v,
|
|
203
|
-
onEmptied: H,
|
|
204
|
-
onKeyDown: Q,
|
|
205
|
-
onKeyUp: U,
|
|
206
|
-
readOnly: Y,
|
|
207
|
-
...Z
|
|
208
|
-
}
|
|
209
|
-
),
|
|
210
|
-
/* @__PURE__ */ e.jsx(
|
|
211
|
-
"label",
|
|
212
|
-
{
|
|
213
|
-
ref: A,
|
|
214
|
-
htmlFor: h,
|
|
215
|
-
className: r(
|
|
216
|
-
"absolute left-3 pointer-events-none px-1 z-10",
|
|
217
|
-
de,
|
|
218
|
-
ae(),
|
|
219
|
-
x[f].label,
|
|
220
|
-
ne(),
|
|
221
|
-
v && "after:content-['*'] after:text-error-default after:ml-1",
|
|
222
|
-
w && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
223
|
-
),
|
|
224
|
-
children: o
|
|
225
|
-
}
|
|
226
|
-
),
|
|
227
|
-
(t || n === "password" || p) && /* @__PURE__ */ e.jsx(
|
|
228
|
-
"button",
|
|
229
|
-
{
|
|
230
|
-
tabIndex: -1,
|
|
231
|
-
type: "button",
|
|
232
|
-
className: r(
|
|
233
|
-
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
|
|
234
|
-
m[i].icon,
|
|
235
|
-
x[f].icon,
|
|
236
|
-
n === "password" && !p ? "cursor-pointer" : "pointer-events-none",
|
|
237
|
-
s === "right" ? "right-3" : "left-3"
|
|
238
|
-
),
|
|
239
|
-
onClick: n === "password" && !p ? oe : void 0,
|
|
240
|
-
onMouseDown: (u) => n === "password" && !p && u.preventDefault(),
|
|
241
|
-
children: /* @__PURE__ */ e.jsx("div", { children: p && n !== "password" ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(we, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : n === "password" ? E ? /* @__PURE__ */ e.jsx(k.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ e.jsx(k.EyeVisibilityOff, { size: 24, className: "" }) : t })
|
|
242
|
-
}
|
|
243
|
-
),
|
|
244
|
-
L && /* @__PURE__ */ e.jsx(
|
|
245
|
-
je,
|
|
246
|
-
{
|
|
247
|
-
type: "button",
|
|
248
|
-
color: "secondary",
|
|
249
|
-
size: "small",
|
|
250
|
-
animate: !1,
|
|
251
|
-
className: r(
|
|
252
|
-
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10 right-1",
|
|
253
|
-
"size-6 p-4 ",
|
|
254
|
-
"bg-inherit",
|
|
255
|
-
"hover:bg-neutral-default-hover p-4 rounded-full"
|
|
256
|
-
),
|
|
257
|
-
label: "",
|
|
258
|
-
onClick: L,
|
|
259
|
-
icon: /* @__PURE__ */ e.jsx(k.Close, { size: 20, className: "" })
|
|
260
|
-
}
|
|
261
|
-
)
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
),
|
|
265
|
-
(y || j) && /* @__PURE__ */ e.jsx("div", { className: "min-h-6", children: (D || le) && /* @__PURE__ */ e.jsx(
|
|
266
|
-
ye,
|
|
267
|
-
{
|
|
268
|
-
className: " absolute",
|
|
269
|
-
variant: f,
|
|
270
|
-
children: y || j
|
|
271
|
-
}
|
|
272
|
-
) })
|
|
273
|
-
] });
|
|
274
|
-
});
|
|
275
|
-
V.displayName = "Input";
|
|
276
|
-
const Le = ge(V);
|
|
277
|
-
export {
|
|
278
|
-
Le as I,
|
|
279
|
-
ze as u
|
|
280
|
-
};
|