prometeo-design-system 1.8.2 → 1.8.4
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.es.js +67 -63
- package/dist/{CardProfile-Bg_q2qMm.js → CardProfile-BZajBGbO.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/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +1 -1
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/Header.es.js +4 -4
- package/dist/Icons.es.js +1 -1
- package/dist/Input.es.js +132 -117
- package/dist/InputFormik.es.js +129 -64
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-p4Pll4Cm.js → LayoutGeneric-jDE96L2N.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/Select.es.js +1 -1
- package/dist/SelectFormik.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/TabLinks.es.js +1 -1
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Button/Button.d.ts +3 -2
- 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 +4 -4
- package/package.json +1 -1
package/dist/InputFormik.es.js
CHANGED
|
@@ -1,97 +1,162 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
2
|
-
import { c as
|
|
3
|
-
import { FastField as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { Icons as
|
|
6
|
-
const
|
|
7
|
-
icon:
|
|
8
|
-
iconPosition:
|
|
9
|
-
label:
|
|
10
|
-
className:
|
|
11
|
-
containerClassName:
|
|
12
|
-
id:
|
|
13
|
-
type:
|
|
14
|
-
labelVariant:
|
|
15
|
-
placeholder:
|
|
16
|
-
disabled:
|
|
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
|
+
import { Icons as N } from "./Icons.es.js";
|
|
6
|
+
const Q = ({
|
|
7
|
+
icon: l,
|
|
8
|
+
iconPosition: r = "left",
|
|
9
|
+
label: d,
|
|
10
|
+
className: B,
|
|
11
|
+
containerClassName: $,
|
|
12
|
+
id: w,
|
|
13
|
+
type: j = "text",
|
|
14
|
+
labelVariant: n = "default",
|
|
15
|
+
placeholder: p,
|
|
16
|
+
disabled: b = !1,
|
|
17
17
|
field: t,
|
|
18
|
-
form:
|
|
19
|
-
...
|
|
18
|
+
form: z,
|
|
19
|
+
...a
|
|
20
20
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
g(!1), n.onBlur?.(), t.onBlur(l);
|
|
28
|
-
}, [t, n]), S = f(() => {
|
|
29
|
-
E((l) => !l);
|
|
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(() => {
|
|
22
|
+
v(!0), a.onFocus?.();
|
|
23
|
+
}, [a]), D = y((i) => {
|
|
24
|
+
v(!1), a.onBlur?.(), t.onBlur(i);
|
|
25
|
+
}, [t, a]), T = y(() => {
|
|
26
|
+
K((i) => !i);
|
|
30
27
|
}, []);
|
|
31
|
-
|
|
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;
|
|
34
|
+
if (f && f !== "transparent" && f !== "rgba(0, 0, 0, 0)")
|
|
35
|
+
return f;
|
|
36
|
+
s = s.parentElement;
|
|
37
|
+
}
|
|
38
|
+
const m = window.getComputedStyle(document.body).backgroundColor;
|
|
39
|
+
return m && m !== "transparent" && m !== "rgba(0, 0, 0, 0)" ? m : "rgb(255, 255, 255)";
|
|
40
|
+
})(c.current.parentElement);
|
|
41
|
+
c.current.style.backgroundColor = V;
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
const h = {
|
|
45
|
+
default: {
|
|
46
|
+
input: `${o && "ring-primary-default-default ring-[1px] "} border-neutral-default-default hover:border-primary-default-default`,
|
|
47
|
+
label: `${o ? "text-primary-default-default" : "text-neutral-medium-default"}`,
|
|
48
|
+
icon: {},
|
|
49
|
+
placeholder: {}
|
|
50
|
+
},
|
|
51
|
+
disabled: {
|
|
52
|
+
input: "border-neutral-default-disabled",
|
|
53
|
+
label: "text-neutral-medium-disabled",
|
|
54
|
+
icon: "text-neutral-medium-disabled",
|
|
55
|
+
placeholder: {}
|
|
56
|
+
},
|
|
57
|
+
error: {
|
|
58
|
+
input: "border-error-default-default ",
|
|
59
|
+
label: "text-error-medium-default",
|
|
60
|
+
icon: {},
|
|
61
|
+
placeholder: {}
|
|
62
|
+
},
|
|
63
|
+
success: {
|
|
64
|
+
input: {},
|
|
65
|
+
label: {},
|
|
66
|
+
icon: {},
|
|
67
|
+
placeholder: {}
|
|
68
|
+
},
|
|
69
|
+
warning: {
|
|
70
|
+
input: {},
|
|
71
|
+
label: {},
|
|
72
|
+
icon: {},
|
|
73
|
+
placeholder: {}
|
|
74
|
+
}
|
|
75
|
+
}, U = {
|
|
76
|
+
none: {
|
|
77
|
+
label: "left-2 "
|
|
78
|
+
},
|
|
79
|
+
left: {
|
|
80
|
+
label: `left-9 ${(o || E || n === "static") && "left-2"} `
|
|
81
|
+
},
|
|
82
|
+
right: {
|
|
83
|
+
label: "left-2"
|
|
84
|
+
}
|
|
85
|
+
}, S = {
|
|
86
|
+
static: {
|
|
87
|
+
input: "placeholder:text-neutral-medium-default placeholder:opacity-50",
|
|
88
|
+
label: "-top-1 -translate-y-full scale-90 px-0 "
|
|
89
|
+
},
|
|
90
|
+
default: {
|
|
91
|
+
input: `${p && o ? "placeholder:text-neutral-medium-default placeholder:opacity-50" : "placeholder:text-transparent"}`,
|
|
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"}`
|
|
93
|
+
}
|
|
94
|
+
}, g = b ? "disabled" : k ? "error" : "default";
|
|
95
|
+
return /* @__PURE__ */ e.jsxs("div", { className: u("relative w-full bg-inherit", n === "static" && "mt-5", $), children: [
|
|
32
96
|
/* @__PURE__ */ e.jsxs("div", { className: "relative bg-inherit", children: [
|
|
33
97
|
/* @__PURE__ */ e.jsx(
|
|
34
98
|
"input",
|
|
35
99
|
{
|
|
36
|
-
disabled:
|
|
37
|
-
id:
|
|
38
|
-
type:
|
|
100
|
+
disabled: b,
|
|
101
|
+
id: w || t.name,
|
|
102
|
+
type: M,
|
|
39
103
|
name: t.name,
|
|
40
104
|
value: t.value || "",
|
|
41
|
-
placeholder:
|
|
105
|
+
placeholder: P(),
|
|
42
106
|
onChange: t.onChange,
|
|
43
|
-
onFocus:
|
|
44
|
-
onEmptied:
|
|
45
|
-
onKeyDown:
|
|
46
|
-
onKeyUp:
|
|
47
|
-
onBlur:
|
|
48
|
-
className:
|
|
49
|
-
"w-full px-3 h-12 text-left border-
|
|
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",
|
|
50
114
|
"bg-transparent focus:outline-none",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
K(),
|
|
56
|
-
F
|
|
115
|
+
S[n].input,
|
|
116
|
+
h[g].input,
|
|
117
|
+
R(),
|
|
118
|
+
B
|
|
57
119
|
)
|
|
58
120
|
}
|
|
59
121
|
),
|
|
60
122
|
/* @__PURE__ */ e.jsx(
|
|
61
123
|
"label",
|
|
62
124
|
{
|
|
63
|
-
|
|
64
|
-
|
|
125
|
+
ref: c,
|
|
126
|
+
htmlFor: w || a.name,
|
|
127
|
+
className: u(
|
|
65
128
|
"absolute transition-all duration-200 font-bold text-sm ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
129
|
+
"prometeo-fonts-label-large text-sm",
|
|
130
|
+
U[l ? r : "none"].label,
|
|
131
|
+
S[n].label,
|
|
132
|
+
h[g].label
|
|
69
133
|
),
|
|
70
|
-
children:
|
|
134
|
+
children: d
|
|
71
135
|
}
|
|
72
136
|
),
|
|
73
|
-
|
|
137
|
+
l && /* @__PURE__ */ e.jsx("div", { className: u(
|
|
74
138
|
"absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
139
|
+
h[g].icon,
|
|
140
|
+
r === "left" ? "left-3" : "right-3"
|
|
141
|
+
), children: l }),
|
|
142
|
+
x && /* @__PURE__ */ e.jsx(
|
|
78
143
|
"button",
|
|
79
144
|
{
|
|
80
145
|
type: "button",
|
|
81
|
-
onClick:
|
|
82
|
-
className:
|
|
146
|
+
onClick: T,
|
|
147
|
+
className: u(
|
|
83
148
|
"absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
|
|
84
149
|
"transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
|
|
85
|
-
|
|
150
|
+
l && r === "right" ? "right-8" : "right-3"
|
|
86
151
|
),
|
|
87
152
|
tabIndex: -1,
|
|
88
|
-
disabled:
|
|
89
|
-
children:
|
|
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" })
|
|
90
155
|
}
|
|
91
156
|
)
|
|
92
157
|
] }),
|
|
93
|
-
|
|
94
|
-
|
|
158
|
+
k && /* @__PURE__ */ e.jsx(
|
|
159
|
+
q,
|
|
95
160
|
{
|
|
96
161
|
name: t.name,
|
|
97
162
|
component: "span",
|
|
@@ -99,7 +164,7 @@ const T = ({
|
|
|
99
164
|
}
|
|
100
165
|
)
|
|
101
166
|
] });
|
|
102
|
-
},
|
|
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 }) });
|
|
103
168
|
export {
|
|
104
|
-
|
|
169
|
+
le as default
|
|
105
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 E } from "./Icons.es.js";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
4
|
import M, { useRef as D, useState as p, useCallback as W, useEffect as X } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.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-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
package/dist/Select.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { Icons as w } from "./Icons.es.js";
|
|
3
3
|
import { c as o } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { memo as se, useState as y, useRef as re, useEffect as oe } from "react";
|
package/dist/SelectFormik.es.js
CHANGED
package/dist/Spinner.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 { ClipLoader as l, SyncLoader as m, HashLoader as p, GridLoader as x, DotLoader as j, BounceLoader as f } from "react-spinners";
|
|
3
3
|
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
4
|
const y = ({
|
package/dist/Steps.es.js
CHANGED
package/dist/TabLinks.es.js
CHANGED
package/dist/Table.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 { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Tooltip.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 { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Icons as b } from "./Icons.es.js";
|
|
@@ -24,5 +24,6 @@ export interface ButtonProps extends VariantProps<typeof buttonVariants> {
|
|
|
24
24
|
variant?: "filled" | "outline" | "text";
|
|
25
25
|
form?: string;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
declare function Button({ label, onClick, icon, contentClassName, loadingText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, className, form, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare const _default: import('react').MemoExoticComponent<typeof Button>;
|
|
29
|
+
export default _default;
|