prometeo-design-system 1.6.6 → 1.6.7
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 +14 -16
- package/dist/Input.es.js +88 -84
- package/dist/InputFormik.es.js +56 -64
- package/dist/components/Button/Button.d.ts +1 -2
- package/dist/components/Input/Input.d.ts +3 -2
- package/dist/components/InputFormik/InputFormik.d.ts +1 -4
- package/dist/components/InputMultiple/InputMultiple.d.ts +21 -0
- package/dist/components/ProfilePictureUpload/ProfilePictureUpload.d.ts +2 -1
- package/dist/index.d.ts +0 -4
- package/dist/preview/InputsPreviews.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +256 -639
- package/package.json +1 -9
package/dist/Button.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
2
|
import { c as n } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { c as
|
|
4
|
-
import { useAnimationControls as
|
|
5
|
-
const
|
|
3
|
+
import { c as S } from "./index-BOQuZ0gG.js";
|
|
4
|
+
import { useAnimationControls as C, motion as m } from "framer-motion";
|
|
5
|
+
const N = S(
|
|
6
6
|
"flex items-center justify-center cursor-pointer focus:outline-none font-semibold rounded-md transition-colors",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
@@ -75,7 +75,7 @@ const z = C(
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
function
|
|
78
|
+
function B({
|
|
79
79
|
label: o = "Selene",
|
|
80
80
|
onClick: p,
|
|
81
81
|
icon: l,
|
|
@@ -92,15 +92,14 @@ function R({
|
|
|
92
92
|
children: u,
|
|
93
93
|
Spinner: g,
|
|
94
94
|
className: y,
|
|
95
|
-
|
|
96
|
-
...w
|
|
95
|
+
...h
|
|
97
96
|
}) {
|
|
98
|
-
const d =
|
|
97
|
+
const d = C(), w = () => {
|
|
99
98
|
!a || r || e || !s || d.start({ rotate: 90 });
|
|
100
|
-
},
|
|
99
|
+
}, j = () => {
|
|
101
100
|
!a || r || e || !s || d.start({ rotate: 0 });
|
|
102
|
-
},
|
|
103
|
-
|
|
101
|
+
}, H = n(
|
|
102
|
+
N({
|
|
104
103
|
variant: v,
|
|
105
104
|
color: x,
|
|
106
105
|
size: i,
|
|
@@ -112,17 +111,16 @@ function R({
|
|
|
112
111
|
return /* @__PURE__ */ t.jsx(
|
|
113
112
|
m.button,
|
|
114
113
|
{
|
|
115
|
-
form: h,
|
|
116
114
|
onClick: p,
|
|
117
|
-
className:
|
|
115
|
+
className: H,
|
|
118
116
|
whileHover: a && !r && !e ? { scale: 1.05 } : {},
|
|
119
117
|
whileTap: a && !r && !e ? { scale: 0.98 } : {},
|
|
120
118
|
transition: { type: "spring", stiffness: 400, damping: 17 },
|
|
121
|
-
onHoverStart:
|
|
122
|
-
onHoverEnd:
|
|
119
|
+
onHoverStart: w,
|
|
120
|
+
onHoverEnd: j,
|
|
123
121
|
disabled: r || e,
|
|
124
122
|
type: b,
|
|
125
|
-
...
|
|
123
|
+
...h,
|
|
126
124
|
children: e ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
127
125
|
g,
|
|
128
126
|
i !== "small" && /* @__PURE__ */ t.jsx("span", { children: f })
|
|
@@ -145,5 +143,5 @@ function R({
|
|
|
145
143
|
);
|
|
146
144
|
}
|
|
147
145
|
export {
|
|
148
|
-
|
|
146
|
+
B as default
|
|
149
147
|
};
|
package/dist/Input.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Icons as
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as F } from "./Icons.es.js";
|
|
3
3
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { memo as
|
|
5
|
-
import { useDebounce as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { memo as re, useState as N, useCallback as se, useEffect as H } from "react";
|
|
5
|
+
import { useDebounce as le } from "use-debounce";
|
|
6
|
+
import oe from "./Spinner.es.js";
|
|
7
|
+
const m = {
|
|
8
8
|
default: {
|
|
9
9
|
container: "",
|
|
10
10
|
input: e(
|
|
@@ -53,7 +53,7 @@ const x = {
|
|
|
53
53
|
"peer-focus:text-success-light"
|
|
54
54
|
)
|
|
55
55
|
}
|
|
56
|
-
},
|
|
56
|
+
}, d = {
|
|
57
57
|
small: {
|
|
58
58
|
container: "text-sm",
|
|
59
59
|
input: "h-10 px-3 text-sm",
|
|
@@ -72,129 +72,133 @@ const x = {
|
|
|
72
72
|
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-lg",
|
|
73
73
|
icon: "w-6 h-6 right-3"
|
|
74
74
|
}
|
|
75
|
-
},
|
|
76
|
-
label:
|
|
77
|
-
icon:
|
|
75
|
+
}, ae = ({
|
|
76
|
+
label: P,
|
|
77
|
+
icon: a,
|
|
78
|
+
iconPosition: g = "left",
|
|
78
79
|
onChange: h,
|
|
79
|
-
value:
|
|
80
|
-
debounceMs:
|
|
80
|
+
value: n = "",
|
|
81
|
+
debounceMs: u = 0,
|
|
81
82
|
name: b,
|
|
82
|
-
width:
|
|
83
|
+
width: p = "100%",
|
|
83
84
|
height: t,
|
|
84
|
-
variant:
|
|
85
|
-
labelVariant:
|
|
86
|
-
size:
|
|
87
|
-
disabled:
|
|
88
|
-
type:
|
|
89
|
-
isFetching:
|
|
90
|
-
errorComponent:
|
|
91
|
-
helperComponent:
|
|
92
|
-
required:
|
|
93
|
-
onFocus:
|
|
94
|
-
onBlur:
|
|
95
|
-
onEmptied:
|
|
96
|
-
onKeyDown:
|
|
97
|
-
onKeyUp:
|
|
85
|
+
variant: c = "default",
|
|
86
|
+
labelVariant: l = "default",
|
|
87
|
+
size: f = "medium",
|
|
88
|
+
disabled: w = !1,
|
|
89
|
+
type: s = "text",
|
|
90
|
+
isFetching: i,
|
|
91
|
+
errorComponent: C,
|
|
92
|
+
helperComponent: E,
|
|
93
|
+
required: S = !1,
|
|
94
|
+
onFocus: L,
|
|
95
|
+
onBlur: O,
|
|
96
|
+
onEmptied: D,
|
|
97
|
+
onKeyDown: $,
|
|
98
|
+
onKeyUp: R
|
|
98
99
|
}) => {
|
|
99
|
-
const [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
|
|
104
|
-
}, [
|
|
100
|
+
const [x, V] = N(n), [j] = le(x, u), [T, k] = N(!1), [y, W] = N(!1), z = se(h, [h]);
|
|
101
|
+
H(() => {
|
|
102
|
+
u > 0 && j !== n && z(j);
|
|
103
|
+
}, [j, u, z, n]), H(() => {
|
|
104
|
+
V(n);
|
|
105
|
+
}, [n]);
|
|
105
106
|
const A = () => {
|
|
106
|
-
|
|
107
|
+
k(!0), L?.();
|
|
107
108
|
}, G = () => {
|
|
108
|
-
|
|
109
|
-
}, J = (
|
|
110
|
-
const
|
|
111
|
-
|
|
109
|
+
k(!1), O?.();
|
|
110
|
+
}, J = (o) => {
|
|
111
|
+
const I = o.target.value, ee = o.target.name, te = x;
|
|
112
|
+
V(I), te.length > 0 && I.length === 0 && D?.(), (!u || u === 0) && h(I, ee);
|
|
112
113
|
}, K = () => {
|
|
113
|
-
W(!
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
const Q =
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
114
|
+
W(!y);
|
|
115
|
+
}, v = {};
|
|
116
|
+
p && p !== "100%" && (v.width = p), t && (v.height = t);
|
|
117
|
+
const Q = x.length > 0, B = c === "error" && C, U = !B && E, X = s === "password", Y = () => l === "static" || T || Q ? "-top-2 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", Z = () => l === "static" ? t ? "text-sm" : "text-xs" : t ? "text-sm" : d[f].label, _ = () => t ? { height: t } : {}, q = () => l === "static" ? P : "", M = () => X ? a ? g === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? g === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "";
|
|
118
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
119
|
+
/* @__PURE__ */ r.jsxs(
|
|
119
120
|
"div",
|
|
120
121
|
{
|
|
121
122
|
className: e(
|
|
122
123
|
"relative",
|
|
123
|
-
f
|
|
124
|
-
!
|
|
124
|
+
d[f].container,
|
|
125
|
+
!p && "w-full",
|
|
125
126
|
"bg-inherit",
|
|
126
|
-
|
|
127
|
+
l === "static" && "mt-2"
|
|
127
128
|
),
|
|
128
|
-
style:
|
|
129
|
+
style: v,
|
|
129
130
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ r.jsx(
|
|
131
132
|
"input",
|
|
132
133
|
{
|
|
133
134
|
id: b,
|
|
134
135
|
name: b,
|
|
135
|
-
type:
|
|
136
|
-
value:
|
|
137
|
-
placeholder:
|
|
136
|
+
type: s === "password" && y ? "text" : s,
|
|
137
|
+
value: x,
|
|
138
|
+
placeholder: q(),
|
|
138
139
|
className: e(
|
|
139
140
|
"peer w-full border-1 rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
140
141
|
"focus:outline-none px-3",
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
!t && f
|
|
144
|
-
t && `px-3 ${f
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
l === "default" && "placeholder:text-transparent",
|
|
143
|
+
l === "static" && "placeholder:text-neutral-medium-default placeholder:opacity-50",
|
|
144
|
+
!t && d[f].input,
|
|
145
|
+
t && `px-3 ${d[f].input.split(" ").filter((o) => o.startsWith("text-")).join(" ")}`,
|
|
146
|
+
m[c].input,
|
|
147
|
+
a && "pr-10",
|
|
148
|
+
w && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
149
|
+
m[c].container,
|
|
150
|
+
M()
|
|
149
151
|
),
|
|
150
|
-
style:
|
|
152
|
+
style: _(),
|
|
151
153
|
onChange: J,
|
|
152
154
|
onFocus: A,
|
|
153
155
|
onBlur: G,
|
|
154
|
-
disabled:
|
|
155
|
-
required:
|
|
156
|
-
onEmptied:
|
|
157
|
-
onKeyDown:
|
|
158
|
-
onKeyUp:
|
|
156
|
+
disabled: w,
|
|
157
|
+
required: S,
|
|
158
|
+
onEmptied: D,
|
|
159
|
+
onKeyDown: $,
|
|
160
|
+
onKeyUp: R
|
|
159
161
|
}
|
|
160
162
|
),
|
|
161
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ r.jsx(
|
|
162
164
|
"label",
|
|
163
165
|
{
|
|
164
166
|
htmlFor: b,
|
|
165
167
|
className: e(
|
|
166
168
|
"absolute left-3 pointer-events-none bg-inherit px-1 z-10",
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
l === "default" && "transition-all duration-200 ease-in-out",
|
|
170
|
+
Z(),
|
|
171
|
+
m[c].label,
|
|
172
|
+
Y(),
|
|
173
|
+
S && "after:content-['*'] after:text-error-default after:ml-1",
|
|
174
|
+
w && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
172
175
|
),
|
|
173
|
-
children:
|
|
176
|
+
children: P
|
|
174
177
|
}
|
|
175
178
|
),
|
|
176
|
-
(
|
|
179
|
+
(a || s === "password" || i) && /* @__PURE__ */ r.jsx(
|
|
177
180
|
"div",
|
|
178
181
|
{
|
|
179
182
|
className: e(
|
|
180
183
|
"absolute top-1/2 -translate-y-1/2 flex items-center justify-center z-10",
|
|
181
|
-
!t && f
|
|
184
|
+
!t && d[f].icon,
|
|
182
185
|
t && "w-5 h-5 right-3",
|
|
183
|
-
|
|
184
|
-
|
|
186
|
+
m[c].icon,
|
|
187
|
+
s === "password" && !i ? "cursor-pointer" : "pointer-events-none",
|
|
188
|
+
g === "right" ? "right-3" : "left-3"
|
|
185
189
|
),
|
|
186
|
-
onClick:
|
|
187
|
-
onMouseDown: (
|
|
188
|
-
children: /* @__PURE__ */
|
|
190
|
+
onClick: s === "password" && !i ? K : void 0,
|
|
191
|
+
onMouseDown: (o) => s === "password" && !i && o.preventDefault(),
|
|
192
|
+
children: /* @__PURE__ */ r.jsx("div", { children: i && s !== "password" ? /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(oe, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }) : s === "password" ? y ? /* @__PURE__ */ r.jsx(F.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(F.EyeVisibilityOff, { size: 24, className: "" }) : a })
|
|
189
193
|
}
|
|
190
194
|
)
|
|
191
195
|
]
|
|
192
196
|
}
|
|
193
197
|
),
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
U && E,
|
|
199
|
+
B && C
|
|
196
200
|
] });
|
|
197
|
-
},
|
|
201
|
+
}, pe = re(ae);
|
|
198
202
|
export {
|
|
199
|
-
|
|
203
|
+
pe as default
|
|
200
204
|
};
|
package/dist/InputFormik.es.js
CHANGED
|
@@ -1,97 +1,89 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useField as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { Icons as
|
|
6
|
-
const
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as n } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { useField as V, ErrorMessage as k } from "formik";
|
|
4
|
+
import { useState as p } from "react";
|
|
5
|
+
import { Icons as b } from "./Icons.es.js";
|
|
6
|
+
const D = ({
|
|
7
7
|
icon: a,
|
|
8
|
-
iconPosition:
|
|
9
|
-
label:
|
|
10
|
-
className:
|
|
11
|
-
containerClassName:
|
|
12
|
-
id:
|
|
13
|
-
type:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
disabled: h = !1,
|
|
17
|
-
...t
|
|
8
|
+
iconPosition: l = "left",
|
|
9
|
+
label: g,
|
|
10
|
+
className: y,
|
|
11
|
+
containerClassName: v,
|
|
12
|
+
id: i,
|
|
13
|
+
type: f = "text",
|
|
14
|
+
disabled: m = !1,
|
|
15
|
+
...e
|
|
18
16
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
return r === "static" ? `-top-5 ${n()} scale-90 px-1` : d || b ? `-top-2 ${n()} scale-90` : `top-1/2 -translate-y-1/2 ${n()} scale-100`;
|
|
22
|
-
}, z = () => r === "static" ? "text-sm" : "text-sm peer-focus:text-sm peer-placeholder-shown:text-base", C = () => r === "static" ? o || c : o || "", K = () => m ? a ? s === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? s === "left" ? "pl-10" : "pr-10" : "", P = () => {
|
|
23
|
-
E(!i);
|
|
17
|
+
const [r, c] = V(e), [s, x] = p(!1), [u, w] = p(!1), o = c.touched && c.error, h = r.value && r.value.toString().length > 0, d = f === "password", j = d ? u ? "text" : "password" : f, N = () => s || h ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", E = () => d ? a ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : a ? l === "left" ? "pl-10" : "pr-10" : "", F = () => a && l === "left" ? "left-10" : "left-3", I = () => {
|
|
18
|
+
w(!u);
|
|
24
19
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ t.jsxs("div", { className: n("relative w-full bg-inherit", v), children: [
|
|
21
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative bg-inherit", children: [
|
|
22
|
+
/* @__PURE__ */ t.jsx(
|
|
28
23
|
"input",
|
|
29
24
|
{
|
|
30
|
-
disabled:
|
|
31
|
-
id:
|
|
32
|
-
type:
|
|
33
|
-
name:
|
|
34
|
-
value:
|
|
35
|
-
|
|
36
|
-
onChange: l.onChange,
|
|
25
|
+
disabled: m,
|
|
26
|
+
id: i || e.name,
|
|
27
|
+
type: j,
|
|
28
|
+
name: r.name,
|
|
29
|
+
value: r.value || "",
|
|
30
|
+
onChange: r.onChange,
|
|
37
31
|
onFocus: () => {
|
|
38
|
-
|
|
32
|
+
x(!0), e.onFocus?.();
|
|
39
33
|
},
|
|
40
|
-
onEmptied:
|
|
41
|
-
onKeyDown:
|
|
42
|
-
onKeyUp:
|
|
43
|
-
onBlur: (
|
|
44
|
-
|
|
34
|
+
onEmptied: e.onEmptied,
|
|
35
|
+
onKeyDown: e.onKeyDown,
|
|
36
|
+
onKeyUp: e.onKeyUp,
|
|
37
|
+
onBlur: (K) => {
|
|
38
|
+
x(!1), e.onBlur?.(), r.onBlur(K);
|
|
45
39
|
},
|
|
46
|
-
className:
|
|
40
|
+
className: n(
|
|
47
41
|
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-200 ease-in-out text-neutral-default-default",
|
|
48
42
|
"bg-transparent focus:outline-none",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
d ? "border-primary-default-default border-2 text-primary-default-default" : f ? "border-error-default-default" : "border-neutral-default-default hover:border-neutral-strong-default",
|
|
53
|
-
K(),
|
|
54
|
-
j
|
|
43
|
+
s ? "border-primary-default-default border-2" : o ? "border-error-default-default" : "border-neutral-default-default hover:border-neutral-strong-default",
|
|
44
|
+
E(),
|
|
45
|
+
y
|
|
55
46
|
)
|
|
56
47
|
}
|
|
57
48
|
),
|
|
58
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ t.jsx(
|
|
59
50
|
"label",
|
|
60
51
|
{
|
|
61
|
-
htmlFor:
|
|
62
|
-
className:
|
|
63
|
-
"absolute transition-all duration-200
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
htmlFor: i || e.name,
|
|
53
|
+
className: n(
|
|
54
|
+
"absolute transition-all duration-200 ease-in-out pointer-events-none bg-inherit px-1 z-10",
|
|
55
|
+
"text-md",
|
|
56
|
+
N(),
|
|
57
|
+
h || s ? "text-primary-default-default" : o ? "text-red-500" : "text-neutral-medium-default",
|
|
58
|
+
F()
|
|
67
59
|
),
|
|
68
|
-
children:
|
|
60
|
+
children: g
|
|
69
61
|
}
|
|
70
62
|
),
|
|
71
|
-
a && /* @__PURE__ */
|
|
63
|
+
a && /* @__PURE__ */ t.jsx("div", { className: n(
|
|
72
64
|
"absolute top-1/2 -translate-y-1/2 text-neutral-medium-default",
|
|
73
|
-
|
|
65
|
+
l === "left" ? "left-3" : "right-3"
|
|
74
66
|
), children: a }),
|
|
75
|
-
|
|
67
|
+
d && /* @__PURE__ */ t.jsx(
|
|
76
68
|
"button",
|
|
77
69
|
{
|
|
78
70
|
type: "button",
|
|
79
|
-
onClick:
|
|
80
|
-
className:
|
|
71
|
+
onClick: I,
|
|
72
|
+
className: n(
|
|
81
73
|
"absolute top-1/2 -translate-y-1/2 p-1 text-neutral-medium-default hover:text-neutral-strong-default",
|
|
82
74
|
"transition-colors duration-200 focus:outline-none focus:text-primary-default-default",
|
|
83
|
-
a &&
|
|
75
|
+
a && l === "right" ? "right-8" : "right-3"
|
|
84
76
|
),
|
|
85
77
|
tabIndex: -1,
|
|
86
|
-
disabled:
|
|
87
|
-
children:
|
|
78
|
+
disabled: m,
|
|
79
|
+
children: u ? /* @__PURE__ */ t.jsx(b.EyeVisibilityOff, { size: 24, className: "text-neutral-default-default" }) : /* @__PURE__ */ t.jsx(b.EyeVisibility, { size: 24, className: "text-neutral-default-default" })
|
|
88
80
|
}
|
|
89
81
|
)
|
|
90
82
|
] }),
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
o && /* @__PURE__ */ t.jsx(
|
|
84
|
+
k,
|
|
93
85
|
{
|
|
94
|
-
name:
|
|
86
|
+
name: e.name,
|
|
95
87
|
component: "span",
|
|
96
88
|
className: "block text-error-default-default text-xs mt-1"
|
|
97
89
|
}
|
|
@@ -99,5 +91,5 @@ const U = ({
|
|
|
99
91
|
] });
|
|
100
92
|
};
|
|
101
93
|
export {
|
|
102
|
-
|
|
94
|
+
D as default
|
|
103
95
|
};
|
|
@@ -22,7 +22,6 @@ export interface ButtonProps extends VariantProps<typeof buttonVariants> {
|
|
|
22
22
|
className?: string;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
variant?: "filled" | "outline" | "text";
|
|
25
|
-
form?: string;
|
|
26
25
|
}
|
|
27
|
-
export default function Button({ label, onClick, icon, contentClassName, loadingText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, className,
|
|
26
|
+
export default function Button({ label, onClick, icon, contentClassName, loadingText, animate, animateIcon, isLoading, disabled, type, variant, color, size, children, Spinner, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
27
|
export {};
|
|
@@ -4,9 +4,10 @@ export type LabelVariant = "default" | "static";
|
|
|
4
4
|
export interface InputProps {
|
|
5
5
|
label: string;
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
|
+
iconPosition?: 'left' | 'right';
|
|
7
8
|
isFetching?: boolean;
|
|
8
|
-
onChange: (value: string) => void;
|
|
9
9
|
id?: string;
|
|
10
|
+
onChange: (value: string, name?: string) => void;
|
|
10
11
|
value?: string;
|
|
11
12
|
debounceMs?: number;
|
|
12
13
|
width?: string;
|
|
@@ -26,5 +27,5 @@ export interface InputProps {
|
|
|
26
27
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
27
28
|
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
28
29
|
}
|
|
29
|
-
declare const _default: import('react').MemoExoticComponent<({ label, icon, onChange, value, debounceMs, name, width, height, variant, labelVariant, size, disabled, type, isFetching, errorComponent, helperComponent, required, onFocus, onBlur, onEmptied, onKeyDown, onKeyUp, }: InputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
30
|
+
declare const _default: import('react').MemoExoticComponent<({ label, icon, iconPosition, onChange, value, debounceMs, name, width, height, variant, labelVariant, size, disabled, type, isFetching, errorComponent, helperComponent, required, onFocus, onBlur, onEmptied, onKeyDown, onKeyUp, }: InputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
30
31
|
export default _default;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type LabelVariant = "default" | "static";
|
|
3
2
|
export interface IInputFormik {
|
|
4
3
|
label: string;
|
|
5
4
|
icon?: ReactNode;
|
|
@@ -9,8 +8,6 @@ export interface IInputFormik {
|
|
|
9
8
|
id?: string;
|
|
10
9
|
type?: string;
|
|
11
10
|
name: string;
|
|
12
|
-
labelVariant?: LabelVariant;
|
|
13
|
-
placeholder?: string;
|
|
14
11
|
onBlur?: () => void;
|
|
15
12
|
onFocus?: () => void;
|
|
16
13
|
disabled?: boolean;
|
|
@@ -18,5 +15,5 @@ export interface IInputFormik {
|
|
|
18
15
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
19
16
|
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
20
17
|
}
|
|
21
|
-
declare const InputFormik: ({ icon, iconPosition, label, className, containerClassName, id, type,
|
|
18
|
+
declare const InputFormik: ({ icon, iconPosition, label, className, containerClassName, id, type, disabled, ...props }: IInputFormik) => import("react/jsx-runtime").JSX.Element;
|
|
22
19
|
export default InputFormik;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface InputMultipleProps {
|
|
3
|
+
label: string;
|
|
4
|
+
name: string;
|
|
5
|
+
onChange: (value: string[]) => void;
|
|
6
|
+
value: string[];
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
valueSeparator?: ',' | ';';
|
|
9
|
+
variant?: 'default' | 'error' | 'success' | 'warning';
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
itemClassName?: string;
|
|
12
|
+
itemIcon?: React.ComponentType<{
|
|
13
|
+
size: number;
|
|
14
|
+
className: string;
|
|
15
|
+
}>;
|
|
16
|
+
helperText?: string | React.ReactNode;
|
|
17
|
+
errorText?: string | React.ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.MemoExoticComponent<({ label, name, onChange, value, icon, valueSeparator, variant, placeholder, itemClassName, itemIcon, helperText, errorText, disabled, ...rest }: InputMultipleProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface ProfilePictureUploadProps {
|
|
2
2
|
imageUrl?: string;
|
|
3
3
|
fallbackText?: string;
|
|
4
4
|
onFileSelect?: (file: File) => void;
|
|
@@ -13,3 +13,4 @@ export interface ProfilePictureUploadProps {
|
|
|
13
13
|
onError?: (error: string) => void;
|
|
14
14
|
}
|
|
15
15
|
export declare function ProfilePictureUpload({ imageUrl, fallbackText, onFileSelect, onEditClick, onRemoveClick, size, className, disabled, showRemoveButton, acceptedTypes, maxFileSize, onError, }: ProfilePictureUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -12,13 +12,11 @@ export { default as InputFormik } from './components/InputFormik/InputFormik';
|
|
|
12
12
|
export { default as Logo } from './components/Logo/Logo';
|
|
13
13
|
export { Menu } from './components/Menu/MenuComposable';
|
|
14
14
|
export { default as Pagination } from './components/Pagination/Pagination';
|
|
15
|
-
export { ProfilePictureUpload } from './components/ProfilePictureUpload/ProfilePictureUpload';
|
|
16
15
|
export { default as ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
17
16
|
export { default as Select } from './components/Select/Select';
|
|
18
17
|
export { default as SelectFormik } from './components/SelectFormik/SelectFormik';
|
|
19
18
|
export { default as ChangueAccount } from './components/Sidebar/components/changue-account';
|
|
20
19
|
export { default as Spinner } from './components/Spinner/Spinner';
|
|
21
|
-
export { default as Steps } from './components/Steps/Steps';
|
|
22
20
|
export { default as SwipeContainer } from './components/SwipeContainer/SwipeContainer';
|
|
23
21
|
export { default as TabLinks } from './components/TabLinks/TabLinks';
|
|
24
22
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from './components/Table/Table';
|
|
@@ -58,8 +56,6 @@ export type { INavAction, INavLink, Role, RoleLevels, } from './components/Sideb
|
|
|
58
56
|
export type { SidebarContextValue } from './components/Sidebar/hooks/useSidebarHook';
|
|
59
57
|
export type { SpinnerProps, SpinnerSize, SpinnerVariant, } from './components/Spinner/Spinner';
|
|
60
58
|
export type { PaginationProps } from './components/Pagination/Pagination';
|
|
61
|
-
export type { ProfilePictureUploadProps } from './components/ProfilePictureUpload/ProfilePictureUpload';
|
|
62
|
-
export type { Step, StepsProps } from './components/Steps/Steps';
|
|
63
59
|
export type { SelectOptionRendererProps, SelectProps, SelectionDisplayProps, } from './components/Select/Select';
|
|
64
60
|
export type { ISelectFormik, ISelectFormikOption, } from './components/SelectFormik/SelectFormik';
|
|
65
61
|
export type { DialogHandle } from './components/Dialog/Dialog';
|