prometeo-design-system 2.3.6 → 2.3.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/SelectFormik.es.js +15 -188
- package/dist/SelectFormikLegacy.d.ts +6 -0
- package/dist/SelectFormikLegacy.es.js +194 -0
- package/dist/components/SelectFormik/SelectFormik.d.ts +4 -19
- package/dist/components/SelectFormik/SelectFormikLegacy.d.ts +21 -0
- package/dist/exports/SelectFormik.d.ts +1 -1
- package/dist/exports/SelectFormikLegacy.d.ts +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/prometeo-design-system.es.js +46 -44
- package/package.json +1 -1
- package/dist/components/SelectFormik/SelectFormikV2.d.ts +0 -6
package/dist/SelectFormik.es.js
CHANGED
|
@@ -1,194 +1,21 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const Q = ({
|
|
8
|
-
label: C,
|
|
9
|
-
name: I,
|
|
10
|
-
placeholder: b = "",
|
|
11
|
-
disabled: j,
|
|
12
|
-
containerClassName: S,
|
|
13
|
-
className: D,
|
|
14
|
-
options: c = [],
|
|
15
|
-
multiple: i = !1,
|
|
16
|
-
emptyMessage: z = "No hay opciones disponibles",
|
|
17
|
-
labelVariant: w = "default",
|
|
18
|
-
isFetching: E = !1,
|
|
19
|
-
returnFullObject: m = !1
|
|
20
|
-
// Por defecto false para mantener compatibilidad
|
|
21
|
-
}) => {
|
|
22
|
-
const [r, N, o] = $(I), [l, x] = k(!1), [p, A] = k(!1), h = H(null), v = N.touched && N.error, u = (e) => e ? typeof e == "object" && e.id !== void 0 ? e.id : e : null, V = () => r.value ? Array.isArray(r.value) ? r.value.map(u) : u(r.value) : i ? [] : null, f = r.value && (Array.isArray(r.value) ? r.value.length > 0 : typeof r.value == "object" ? r.value.id : r.value?.toString().length > 0), O = () => w === "static" || f || l || p ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", P = () => {
|
|
23
|
-
if (!r.value) return [];
|
|
24
|
-
const e = V();
|
|
25
|
-
return Array.isArray(e) ? c.filter((a) => e.includes(a.id)) : c.filter((a) => a.id === e);
|
|
26
|
-
}, F = (e) => {
|
|
27
|
-
if (i) {
|
|
28
|
-
const a = Array.isArray(r.value) ? r.value.map(u) : [], s = a.includes(e.id);
|
|
29
|
-
if (m) {
|
|
30
|
-
const n = Array.isArray(r.value) ? r.value : [], y = s ? n.filter((B) => u(B) !== e.id) : [...n, e];
|
|
31
|
-
o.setValue(y);
|
|
32
|
-
} else {
|
|
33
|
-
const n = s ? a.filter((y) => y !== e.id) : [...a, e.id];
|
|
34
|
-
o.setValue(n);
|
|
35
|
-
}
|
|
36
|
-
} else
|
|
37
|
-
o.setValue(m ? e : e.id), x(!1);
|
|
38
|
-
}, M = (e) => {
|
|
39
|
-
e.stopPropagation(), o.setValue(i ? [] : "");
|
|
40
|
-
}, R = (e, a) => {
|
|
41
|
-
if (a?.stopPropagation(), i && Array.isArray(r.value))
|
|
42
|
-
if (m) {
|
|
43
|
-
const s = r.value.filter(
|
|
44
|
-
(n) => u(n) !== e
|
|
45
|
-
);
|
|
46
|
-
o.setValue(s);
|
|
47
|
-
} else {
|
|
48
|
-
const s = r.value.filter(
|
|
49
|
-
(n) => n !== e
|
|
50
|
-
);
|
|
51
|
-
o.setValue(s);
|
|
52
|
-
}
|
|
1
|
+
import { j as m } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { useField as s } from "formik";
|
|
3
|
+
import i from "./Select.es.js";
|
|
4
|
+
const p = (e) => {
|
|
5
|
+
const [o, r, t] = s(e.name), a = (n) => {
|
|
6
|
+
t.setValue(n.map((l) => l.value));
|
|
53
7
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
h.current && !h.current.contains(a.target) && x(!1);
|
|
57
|
-
};
|
|
58
|
-
return l && document.addEventListener("mousedown", e), () => {
|
|
59
|
-
document.removeEventListener("mousedown", e);
|
|
60
|
-
};
|
|
61
|
-
}, [l]);
|
|
62
|
-
const L = () => {
|
|
63
|
-
const e = P();
|
|
64
|
-
return e.length === 0 ? b ? /* @__PURE__ */ t.jsx("span", { className: "text-neutral-medium-default opacity-50", children: b }) : null : i ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 flex-wrap py-1", children: e.map((a) => /* @__PURE__ */ t.jsxs(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
className: "inline-flex items-center gap-1 px-2 py-1 bg-primary-default-default text-white text-xs rounded-md",
|
|
68
|
-
children: [
|
|
69
|
-
/* @__PURE__ */ t.jsx("span", { className: "truncate max-w-20", children: a.label }),
|
|
70
|
-
/* @__PURE__ */ t.jsx(
|
|
71
|
-
"button",
|
|
72
|
-
{
|
|
73
|
-
onMouseDown: (s) => {
|
|
74
|
-
s.preventDefault(), R(a.id, s);
|
|
75
|
-
},
|
|
76
|
-
className: "flex-shrink-0 hover:bg-primary-strong-default rounded-sm p-0.5 transition-colors",
|
|
77
|
-
type: "button",
|
|
78
|
-
tabIndex: -1,
|
|
79
|
-
children: /* @__PURE__ */ t.jsx(g.Close, { size: 12, className: "" })
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
a.id
|
|
85
|
-
)) }) : /* @__PURE__ */ t.jsx("span", { children: e[0]?.label });
|
|
86
|
-
};
|
|
87
|
-
return /* @__PURE__ */ t.jsxs(
|
|
88
|
-
"div",
|
|
8
|
+
return /* @__PURE__ */ m.jsx(
|
|
9
|
+
i,
|
|
89
10
|
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"div",
|
|
96
|
-
{
|
|
97
|
-
onClick: () => !j && x(!l),
|
|
98
|
-
onFocus: () => A(!0),
|
|
99
|
-
onBlur: () => A(!1),
|
|
100
|
-
className: d(
|
|
101
|
-
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-300 ease-in-out text-neutral-default-default",
|
|
102
|
-
"flex items-center justify-between bg-transparent focus:outline-none",
|
|
103
|
-
f || l || p ? " border-primary-default-focused ring-primary-default-focused ring-[2px]" : v ? "ring-error-default-default ring-[2px]" : "border-neutral-default-default hover:border-primary-default-hover",
|
|
104
|
-
j && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
105
|
-
D
|
|
106
|
-
),
|
|
107
|
-
children: [
|
|
108
|
-
/* @__PURE__ */ t.jsx(
|
|
109
|
-
"label",
|
|
110
|
-
{
|
|
111
|
-
className: d(
|
|
112
|
-
"absolute pointer-events-none bg-inherit px-1 z-10",
|
|
113
|
-
w === "default" && "transition-all duration-200 ease-in-out",
|
|
114
|
-
"text-md",
|
|
115
|
-
O(),
|
|
116
|
-
f || l || p ? "text-primary-default-default" : v ? "text-red-500" : "text-neutral-medium-default",
|
|
117
|
-
"left-3"
|
|
118
|
-
),
|
|
119
|
-
children: C
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 min-w-0", children: L() }),
|
|
123
|
-
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
124
|
-
f && /* @__PURE__ */ t.jsx(
|
|
125
|
-
"button",
|
|
126
|
-
{
|
|
127
|
-
onMouseDown: (e) => {
|
|
128
|
-
e.preventDefault(), e.stopPropagation(), M(e);
|
|
129
|
-
},
|
|
130
|
-
className: "text-neutral-medium-default hover:text-neutral-default-default transition-colors",
|
|
131
|
-
type: "button",
|
|
132
|
-
tabIndex: -1,
|
|
133
|
-
children: /* @__PURE__ */ t.jsx(g.Close, { size: 16, className: "" })
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
E ? /* @__PURE__ */ t.jsx(K, { size: 20, variant: "clip" }) : /* @__PURE__ */ t.jsx(
|
|
137
|
-
g.ChevronDown,
|
|
138
|
-
{
|
|
139
|
-
size: 20,
|
|
140
|
-
className: d(
|
|
141
|
-
"transition-transform text-neutral-default-default",
|
|
142
|
-
l ? "rotate-180" : ""
|
|
143
|
-
)
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
] })
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
),
|
|
150
|
-
l && /* @__PURE__ */ t.jsx("div", { className: "absolute z-50 w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-md shadow-lg max-h-60 overflow-auto", children: c.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: z }) : c.map((e) => {
|
|
151
|
-
const a = V(), s = i ? Array.isArray(a) && a.includes(e.id) : a === e.id;
|
|
152
|
-
return /* @__PURE__ */ t.jsxs(
|
|
153
|
-
"div",
|
|
154
|
-
{
|
|
155
|
-
onMouseDown: (n) => {
|
|
156
|
-
n.preventDefault(), F(e), n.stopPropagation();
|
|
157
|
-
},
|
|
158
|
-
className: d(
|
|
159
|
-
"px-3 py-2 cursor-pointer flex items-center transition-colors",
|
|
160
|
-
s ? "bg-primary-default-default text-white" : "hover:bg-neutral-medium-selected text-neutral-default-default"
|
|
161
|
-
),
|
|
162
|
-
children: [
|
|
163
|
-
i && /* @__PURE__ */ t.jsx(
|
|
164
|
-
"input",
|
|
165
|
-
{
|
|
166
|
-
type: "checkbox",
|
|
167
|
-
checked: s,
|
|
168
|
-
onChange: () => {
|
|
169
|
-
},
|
|
170
|
-
className: "mr-2 pointer-events-none"
|
|
171
|
-
}
|
|
172
|
-
),
|
|
173
|
-
/* @__PURE__ */ t.jsx("span", { children: e.label })
|
|
174
|
-
]
|
|
175
|
-
},
|
|
176
|
-
e.id
|
|
177
|
-
);
|
|
178
|
-
}) })
|
|
179
|
-
] }),
|
|
180
|
-
v && /* @__PURE__ */ t.jsx(
|
|
181
|
-
q,
|
|
182
|
-
{
|
|
183
|
-
name: r.name,
|
|
184
|
-
component: "span",
|
|
185
|
-
className: "block text-error-default-default text-xs mt-1"
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
]
|
|
11
|
+
...e,
|
|
12
|
+
value: o.value,
|
|
13
|
+
onChange: a,
|
|
14
|
+
variant: r.error ? "error" : "default",
|
|
15
|
+
errorComponent: r.error || void 0
|
|
189
16
|
}
|
|
190
17
|
);
|
|
191
|
-
}
|
|
18
|
+
};
|
|
192
19
|
export {
|
|
193
|
-
|
|
20
|
+
p as default
|
|
194
21
|
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as g } from "./Icons.es.js";
|
|
3
|
+
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { useField as $, ErrorMessage as q } from "formik";
|
|
5
|
+
import { memo as G, useState as k, useRef as H, useEffect as J } from "react";
|
|
6
|
+
import K from "./Spinner.es.js";
|
|
7
|
+
const Q = ({
|
|
8
|
+
label: C,
|
|
9
|
+
name: I,
|
|
10
|
+
placeholder: b = "",
|
|
11
|
+
disabled: j,
|
|
12
|
+
containerClassName: S,
|
|
13
|
+
className: D,
|
|
14
|
+
options: c = [],
|
|
15
|
+
multiple: i = !1,
|
|
16
|
+
emptyMessage: z = "No hay opciones disponibles",
|
|
17
|
+
labelVariant: w = "default",
|
|
18
|
+
isFetching: E = !1,
|
|
19
|
+
returnFullObject: m = !1
|
|
20
|
+
// Por defecto false para mantener compatibilidad
|
|
21
|
+
}) => {
|
|
22
|
+
const [r, N, o] = $(I), [l, x] = k(!1), [p, A] = k(!1), h = H(null), v = N.touched && N.error, u = (e) => e ? typeof e == "object" && e.id !== void 0 ? e.id : e : null, V = () => r.value ? Array.isArray(r.value) ? r.value.map(u) : u(r.value) : i ? [] : null, f = r.value && (Array.isArray(r.value) ? r.value.length > 0 : typeof r.value == "object" ? r.value.id : r.value?.toString().length > 0), O = () => w === "static" || f || l || p ? "-top-3 left-2 scale-90" : "top-1/2 -translate-y-1/2 scale-100", L = () => {
|
|
23
|
+
if (!r.value) return [];
|
|
24
|
+
const e = V();
|
|
25
|
+
return Array.isArray(e) ? c.filter((a) => e.includes(a.id)) : c.filter((a) => a.id === e);
|
|
26
|
+
}, P = (e) => {
|
|
27
|
+
if (i) {
|
|
28
|
+
const a = Array.isArray(r.value) ? r.value.map(u) : [], s = a.includes(e.id);
|
|
29
|
+
if (m) {
|
|
30
|
+
const n = Array.isArray(r.value) ? r.value : [], y = s ? n.filter((B) => u(B) !== e.id) : [...n, e];
|
|
31
|
+
o.setValue(y);
|
|
32
|
+
} else {
|
|
33
|
+
const n = s ? a.filter((y) => y !== e.id) : [...a, e.id];
|
|
34
|
+
o.setValue(n);
|
|
35
|
+
}
|
|
36
|
+
} else
|
|
37
|
+
o.setValue(m ? e : e.id), x(!1);
|
|
38
|
+
}, F = (e) => {
|
|
39
|
+
e.stopPropagation(), o.setValue(i ? [] : "");
|
|
40
|
+
}, M = (e, a) => {
|
|
41
|
+
if (a?.stopPropagation(), i && Array.isArray(r.value))
|
|
42
|
+
if (m) {
|
|
43
|
+
const s = r.value.filter(
|
|
44
|
+
(n) => u(n) !== e
|
|
45
|
+
);
|
|
46
|
+
o.setValue(s);
|
|
47
|
+
} else {
|
|
48
|
+
const s = r.value.filter(
|
|
49
|
+
(n) => n !== e
|
|
50
|
+
);
|
|
51
|
+
o.setValue(s);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
J(() => {
|
|
55
|
+
const e = (a) => {
|
|
56
|
+
h.current && !h.current.contains(a.target) && x(!1);
|
|
57
|
+
};
|
|
58
|
+
return l && document.addEventListener("mousedown", e), () => {
|
|
59
|
+
document.removeEventListener("mousedown", e);
|
|
60
|
+
};
|
|
61
|
+
}, [l]);
|
|
62
|
+
const R = () => {
|
|
63
|
+
const e = L();
|
|
64
|
+
return e.length === 0 ? b ? /* @__PURE__ */ t.jsx("span", { className: "text-neutral-medium-default opacity-50", children: b }) : null : i ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-1 flex-wrap py-1", children: e.map((a) => /* @__PURE__ */ t.jsxs(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: "inline-flex items-center gap-1 px-2 py-1 bg-primary-default-default text-white text-xs rounded-md",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ t.jsx("span", { className: "truncate max-w-20", children: a.label }),
|
|
70
|
+
/* @__PURE__ */ t.jsx(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
onMouseDown: (s) => {
|
|
74
|
+
s.preventDefault(), M(a.id, s);
|
|
75
|
+
},
|
|
76
|
+
className: "flex-shrink-0 hover:bg-primary-strong-default rounded-sm p-0.5 transition-colors",
|
|
77
|
+
type: "button",
|
|
78
|
+
tabIndex: -1,
|
|
79
|
+
children: /* @__PURE__ */ t.jsx(g.Close, { size: 12, className: "" })
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
a.id
|
|
85
|
+
)) }) : /* @__PURE__ */ t.jsx("span", { children: e[0]?.label });
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ t.jsxs(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: d("relative w-full bg-inherit", S),
|
|
91
|
+
ref: h,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative bg-inherit", children: [
|
|
94
|
+
/* @__PURE__ */ t.jsxs(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
onClick: () => !j && x(!l),
|
|
98
|
+
onFocus: () => A(!0),
|
|
99
|
+
onBlur: () => A(!1),
|
|
100
|
+
className: d(
|
|
101
|
+
"w-full px-3 h-12 text-left border-1 rounded-lg transition-all duration-300 ease-in-out text-neutral-default-default",
|
|
102
|
+
"flex items-center justify-between bg-transparent focus:outline-none",
|
|
103
|
+
f || l || p ? " border-primary-default-focused ring-primary-default-focused ring-[2px]" : v ? "ring-error-default-default ring-[2px]" : "border-neutral-default-default hover:border-primary-default-hover",
|
|
104
|
+
j && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
105
|
+
D
|
|
106
|
+
),
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ t.jsx(
|
|
109
|
+
"label",
|
|
110
|
+
{
|
|
111
|
+
className: d(
|
|
112
|
+
"absolute pointer-events-none bg-inherit px-1 z-10",
|
|
113
|
+
w === "default" && "transition-all duration-200 ease-in-out",
|
|
114
|
+
"text-md",
|
|
115
|
+
O(),
|
|
116
|
+
f || l || p ? "text-primary-default-default" : v ? "text-red-500" : "text-neutral-medium-default",
|
|
117
|
+
"left-3"
|
|
118
|
+
),
|
|
119
|
+
children: C
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 min-w-0", children: R() }),
|
|
123
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
124
|
+
f && /* @__PURE__ */ t.jsx(
|
|
125
|
+
"button",
|
|
126
|
+
{
|
|
127
|
+
onMouseDown: (e) => {
|
|
128
|
+
e.preventDefault(), e.stopPropagation(), F(e);
|
|
129
|
+
},
|
|
130
|
+
className: "text-neutral-medium-default hover:text-neutral-default-default transition-colors",
|
|
131
|
+
type: "button",
|
|
132
|
+
tabIndex: -1,
|
|
133
|
+
children: /* @__PURE__ */ t.jsx(g.Close, { size: 16, className: "" })
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
E ? /* @__PURE__ */ t.jsx(K, { size: 20, variant: "clip" }) : /* @__PURE__ */ t.jsx(
|
|
137
|
+
g.ChevronDown,
|
|
138
|
+
{
|
|
139
|
+
size: 20,
|
|
140
|
+
className: d(
|
|
141
|
+
"transition-transform text-neutral-default-default",
|
|
142
|
+
l ? "rotate-180" : ""
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] })
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
l && /* @__PURE__ */ t.jsx("div", { className: "absolute z-50 w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-md shadow-lg max-h-60 overflow-auto", children: c.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "px-3 py-2 text-neutral-medium-default", children: z }) : c.map((e) => {
|
|
151
|
+
const a = V(), s = i ? Array.isArray(a) && a.includes(e.id) : a === e.id;
|
|
152
|
+
return /* @__PURE__ */ t.jsxs(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
onMouseDown: (n) => {
|
|
156
|
+
n.preventDefault(), P(e), n.stopPropagation();
|
|
157
|
+
},
|
|
158
|
+
className: d(
|
|
159
|
+
"px-3 py-2 cursor-pointer flex items-center transition-colors",
|
|
160
|
+
s ? "bg-primary-default-default text-white" : "hover:bg-neutral-medium-selected text-neutral-default-default"
|
|
161
|
+
),
|
|
162
|
+
children: [
|
|
163
|
+
i && /* @__PURE__ */ t.jsx(
|
|
164
|
+
"input",
|
|
165
|
+
{
|
|
166
|
+
type: "checkbox",
|
|
167
|
+
checked: s,
|
|
168
|
+
onChange: () => {
|
|
169
|
+
},
|
|
170
|
+
className: "mr-2 pointer-events-none"
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ t.jsx("span", { children: e.label })
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
e.id
|
|
177
|
+
);
|
|
178
|
+
}) })
|
|
179
|
+
] }),
|
|
180
|
+
v && /* @__PURE__ */ t.jsx(
|
|
181
|
+
q,
|
|
182
|
+
{
|
|
183
|
+
name: r.name,
|
|
184
|
+
component: "span",
|
|
185
|
+
className: "block text-error-default-default text-xs mt-1"
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}, _ = G(Q);
|
|
192
|
+
export {
|
|
193
|
+
_ as default
|
|
194
|
+
};
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
}
|
|
6
|
-
export interface ISelectFormik {
|
|
7
|
-
label: string;
|
|
1
|
+
import { SelectProps } from '../Select/Select';
|
|
2
|
+
export interface SelectFormikProps<T> extends Omit<SelectProps<T>, 'value' | 'onChange'> {
|
|
8
3
|
name: string;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
containerClassName: string;
|
|
12
|
-
className: string;
|
|
13
|
-
labelVariant?: "default" | "static";
|
|
14
|
-
options: ISelectFormikOption[];
|
|
15
|
-
multiple?: boolean;
|
|
16
|
-
emptyMessage?: string;
|
|
17
|
-
isFetching?: boolean;
|
|
18
|
-
returnFullObject?: boolean;
|
|
19
4
|
}
|
|
20
|
-
declare const
|
|
21
|
-
export default
|
|
5
|
+
declare const SelectFormik: <T>(props: SelectFormikProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default SelectFormik;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ISelectFormikOption {
|
|
2
|
+
id: number | string;
|
|
3
|
+
label: string;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface ISelectFormik {
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
containerClassName: string;
|
|
12
|
+
className: string;
|
|
13
|
+
labelVariant?: "default" | "static";
|
|
14
|
+
options: ISelectFormikOption[];
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
emptyMessage?: string;
|
|
17
|
+
isFetching?: boolean;
|
|
18
|
+
returnFullObject?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: import('react').MemoExoticComponent<({ label, name, placeholder, disabled, containerClassName, className, options, multiple, emptyMessage, labelVariant, isFetching, returnFullObject, }: ISelectFormik) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from '../components/SelectFormik/SelectFormik';
|
|
2
|
-
export type {
|
|
2
|
+
export type { SelectFormikProps } from '../components/SelectFormik/SelectFormik';
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as Pagination } from './components/Pagination/Pagination';
|
|
|
16
16
|
export { ProfilePictureUpload } from './components/ProfilePictureUpload/ProfilePictureUpload';
|
|
17
17
|
export { default as ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
18
18
|
export { default as Select } from './components/Select/Select';
|
|
19
|
+
export { default as SelectFormikLegacy } from './components/SelectFormik/SelectFormikLegacy';
|
|
19
20
|
export { default as SelectFormik } from './components/SelectFormik/SelectFormik';
|
|
20
21
|
export { default as ChangueAccount } from './components/Sidebar/components/changue-account';
|
|
21
22
|
export { default as Spinner } from './components/Spinner/Spinner';
|
|
@@ -71,7 +72,8 @@ export type { PaginationProps } from './components/Pagination/Pagination';
|
|
|
71
72
|
export type { ProfilePictureUploadProps } from './components/ProfilePictureUpload/ProfilePictureUpload';
|
|
72
73
|
export type { Step, StepsProps } from './components/Steps/Steps';
|
|
73
74
|
export type { SelectProps } from './components/Select/Select';
|
|
74
|
-
export type { ISelectFormik, ISelectFormikOption, } from './components/SelectFormik/
|
|
75
|
+
export type { ISelectFormik, ISelectFormikOption, } from './components/SelectFormik/SelectFormikLegacy';
|
|
76
|
+
export type { SelectFormikProps } from './components/SelectFormik/SelectFormik';
|
|
75
77
|
export type { DialogHandle } from './components/Dialog/Dialog';
|
|
76
78
|
export { DropZone } from './components/DropZone/DropZone';
|
|
77
79
|
export type { ToasterPrometeo } from './components/Toaster/Toaster';
|
|
@@ -16,22 +16,23 @@ 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
18
|
import { default as ct } from "./Select.es.js";
|
|
19
|
-
import { default as dt } from "./
|
|
20
|
-
import { default as mt } from "./
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { default as Tt } from "./
|
|
28
|
-
import { default as Dt } from "./
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
19
|
+
import { default as dt } from "./SelectFormikLegacy.es.js";
|
|
20
|
+
import { default as mt } from "./SelectFormik.es.js";
|
|
21
|
+
import { default as xt } from "./Spinner.es.js";
|
|
22
|
+
import { Steps as vt } from "./Steps.es.js";
|
|
23
|
+
import { default as yt } from "./SwipeContainer.es.js";
|
|
24
|
+
import { Switch as wt } from "./Switch.es.js";
|
|
25
|
+
import { default as Nt } from "./DatePicker.es.js";
|
|
26
|
+
import { Table as St, TableBody as kt, TableCaption as It, TableCell as Bt, TableFooter as Rt, TableHead as Lt, TableHeader as At, TableRow as Pt } from "./Table.es.js";
|
|
27
|
+
import { default as Tt } from "./TabLinks.es.js";
|
|
28
|
+
import { default as Dt } from "./TextArea.es.js";
|
|
29
|
+
import { default as Ot } from "./Tooltip.es.js";
|
|
30
|
+
import { Skeleton as Wt } from "./Skeleton.es.js";
|
|
31
|
+
import { SegmentedButton as Ft } from "./SegmentedButton.es.js";
|
|
31
32
|
import { u as S } from "./LayoutGeneric-jDE96L2N.js";
|
|
32
|
-
import { L as
|
|
33
|
-
import { I as
|
|
34
|
-
import { default as
|
|
33
|
+
import { L as Ut, S as Gt } from "./LayoutGeneric-jDE96L2N.js";
|
|
34
|
+
import { I as _t } from "./ImageGallery-BeADef_g.js";
|
|
35
|
+
import { default as Zt } from "./Image.es.js";
|
|
35
36
|
import { j as a } from "./jsx-runtime-ByW6EXIE.js";
|
|
36
37
|
import { c as u } from "./cn-B6yFEsav.js";
|
|
37
38
|
import P, { useRef as g, useState as y, useLayoutEffect as q, createContext as T, useContext as z, useEffect as N, forwardRef as k, useCallback as D } from "react";
|
|
@@ -39,10 +40,10 @@ import { useGSAP as I } from "@gsap/react";
|
|
|
39
40
|
import m from "gsap";
|
|
40
41
|
import { Icons as h } from "./Icons.es.js";
|
|
41
42
|
import { motion as b, AnimatePresence as B } from "framer-motion";
|
|
42
|
-
import { default as
|
|
43
|
+
import { default as Kt } from "./OtpInput.es.js";
|
|
43
44
|
import { useDropzone as E } from "react-dropzone";
|
|
44
|
-
import { useIsMobile as
|
|
45
|
-
import { DropZone as
|
|
45
|
+
import { useIsMobile as Yt } from "./useDevice.es.js";
|
|
46
|
+
import { DropZone as ta } from "./DropZone.es.js";
|
|
46
47
|
const O = (t, e) => {
|
|
47
48
|
I(
|
|
48
49
|
() => {
|
|
@@ -932,59 +933,60 @@ export {
|
|
|
932
933
|
Pe as CheckBox,
|
|
933
934
|
Te as CheckboxFormik,
|
|
934
935
|
he as CompanyLogo,
|
|
935
|
-
|
|
936
|
+
Nt as DatePicker,
|
|
936
937
|
De as DialogModal,
|
|
937
938
|
He as DrawerDesktop,
|
|
938
939
|
Fe as DrawerMobile,
|
|
939
|
-
|
|
940
|
+
ta as DropZone,
|
|
940
941
|
Ge as Header,
|
|
941
942
|
h as Icons,
|
|
942
|
-
|
|
943
|
-
|
|
943
|
+
Zt as Image,
|
|
944
|
+
_t as ImageGallery,
|
|
944
945
|
_e as Input,
|
|
945
946
|
Ze as InputFormik,
|
|
946
947
|
Ke as InputMultiple,
|
|
947
|
-
|
|
948
|
+
Ut as LayoutGeneric,
|
|
948
949
|
Ye as Logo,
|
|
949
950
|
tt as Menu,
|
|
950
951
|
xe as NavBarActions,
|
|
951
952
|
ye as NavbarCollapseButton,
|
|
952
953
|
be as NavbarLinks,
|
|
953
954
|
pe as NavigationLink,
|
|
954
|
-
|
|
955
|
+
Kt as OtpInput,
|
|
955
956
|
rt as Pagination,
|
|
956
957
|
nt as ProfilePictureUpload,
|
|
957
958
|
st as ProgressBar,
|
|
958
959
|
de as SecondaryBar,
|
|
959
|
-
|
|
960
|
+
Ft as SegmentedButton,
|
|
960
961
|
ct as Select,
|
|
961
|
-
|
|
962
|
+
mt as SelectFormik,
|
|
963
|
+
dt as SelectFormikLegacy,
|
|
962
964
|
me as Sidebar,
|
|
963
965
|
M as SidebarProvider,
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
966
|
+
Gt as SidebarRefProvider,
|
|
967
|
+
Wt as Skeleton,
|
|
968
|
+
xt as Spinner,
|
|
969
|
+
vt as Steps,
|
|
970
|
+
yt as SwipeContainer,
|
|
971
|
+
wt as Switch,
|
|
972
|
+
Tt as TabLinks,
|
|
973
|
+
St as Table,
|
|
974
|
+
kt as TableBody,
|
|
975
|
+
It as TableCaption,
|
|
976
|
+
Bt as TableCell,
|
|
977
|
+
Rt as TableFooter,
|
|
978
|
+
Lt as TableHead,
|
|
979
|
+
At as TableHeader,
|
|
980
|
+
Pt as TableRow,
|
|
981
|
+
Dt as TextArea,
|
|
982
|
+
Ot as Tooltip,
|
|
981
983
|
ve as useActionsNavbar,
|
|
982
984
|
je as useClickOutside,
|
|
983
985
|
Ee as useDialogControl,
|
|
984
986
|
We as useDrawerDesktop,
|
|
985
987
|
Me as useDrawerMobile,
|
|
986
988
|
we as useFileDropzone,
|
|
987
|
-
|
|
989
|
+
Yt as useIsMobile,
|
|
988
990
|
ge as useNavbarCollapse,
|
|
989
991
|
fe as useSidebar,
|
|
990
992
|
S as useSidebarContext
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SelectProps } from '../Select/Select';
|
|
2
|
-
interface SelectFormikProps<T> extends Omit<SelectProps<T>, 'value' | 'onChange'> {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
declare const SelectFormikV2: <T>(props: SelectFormikProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default SelectFormikV2;
|