prometeo-design-system 2.7.1 → 2.7.3
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 +72 -33
- package/dist/Button.es.js +398 -2
- package/dist/DatePicker.es.js +2 -2
- package/dist/DrawerDesktop.es.js +31 -30
- package/dist/FAButton.es.js +69 -18
- package/dist/Header.es.js +14 -14
- package/dist/Icons/Icons.d.ts +12 -0
- package/dist/Icons.es.js +567 -346
- package/dist/{ImageGallery-DKzJg3un.js → ImageGallery-D8nIvBpV.js} +7 -7
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-C22kKz7U.js → Input-CnXDg2s7.js} +90 -92
- package/dist/Input.es.js +1 -1
- package/dist/InputFormikV2.es.js +30 -18
- package/dist/{Select-C2-CCMwC.js → Select-CiaBY4E0.js} +62 -62
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +21 -20
- package/dist/SelectSearch.es.js +1 -1
- package/dist/Switch.es.js +4 -4
- package/dist/Toast.es.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +9 -4
- package/dist/components/Button/Button.d.ts +8 -14
- package/dist/components/Button/Button_Legacy.d.ts +29 -0
- package/dist/components/Input/Input.d.ts +5 -6
- package/dist/index-BOQuZ0gG.js +34 -0
- package/dist/index.d.ts +0 -2
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +19 -21
- package/package.json +1 -5
- package/dist/Button-CvBWH1HX.js +0 -183
- package/dist/ButtonV2.d.ts +0 -6
- package/dist/ButtonV2.es.js +0 -217
- package/dist/components/Button/ButtonV2.d.ts +0 -23
- package/dist/exports/ButtonV2.d.ts +0 -2
|
@@ -2,7 +2,7 @@ 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
|
|
5
|
+
import S from "./Button.es.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({
|
|
@@ -37,7 +37,7 @@ const O = D(L(({ images: n, className: c }, r) => {
|
|
|
37
37
|
);
|
|
38
38
|
}));
|
|
39
39
|
O.displayName = "GalleryPreview";
|
|
40
|
-
const
|
|
40
|
+
const _ = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails: d, thumbnailsClassName: a, currentIndex: l, goToNext: o, goToPrevious: s, goToIndex: N }) => {
|
|
41
41
|
const h = v(null), y = v(null), w = v(null), m = v({
|
|
42
42
|
scale: 1,
|
|
43
43
|
translateX: 0,
|
|
@@ -194,7 +194,7 @@ const B = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
194
194
|
)
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
|
-
d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-[100] bottom-0", children: /* @__PURE__ */ t.jsx(
|
|
197
|
+
d && /* @__PURE__ */ t.jsx("div", { className: " w-full absolute items-center flex justify-center left-0 right-0 z-[100] bottom-0", children: /* @__PURE__ */ t.jsx(B, { images: n, currentIndex: l, goToIndex: N, thumbnailsClassName: a }) }),
|
|
198
198
|
n.length > 1 && /* @__PURE__ */ t.jsxs("div", { className: "absolute bottom-20 left-1/2 transform -translate-x-1/2 text-neutral-default-default prometeo-fonts-label-xlarge px-4 py-2 rounded-full", children: [
|
|
199
199
|
l + 1,
|
|
200
200
|
" / ",
|
|
@@ -204,13 +204,13 @@ const B = D(({ images: n, lightboxClassName: c, closeLightbox: r, showThumbnails
|
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
_.displayName = "LightBox";
|
|
208
208
|
const se = (n, c) => {
|
|
209
209
|
if (n.currentIndex !== c.currentIndex || n.thumbnailsClassName !== c.thumbnailsClassName || n.images.length !== c.images.length) return !1;
|
|
210
210
|
for (let r = 0; r < n.images.length; r++)
|
|
211
211
|
if (n.images[r].src !== c.images[r].src) return !1;
|
|
212
212
|
return !0;
|
|
213
|
-
},
|
|
213
|
+
}, B = D(({ images: n, currentIndex: c, goToIndex: r, thumbnailsClassName: d }) => /* @__PURE__ */ t.jsxs(
|
|
214
214
|
"div",
|
|
215
215
|
{
|
|
216
216
|
className: "flex gap-4 w-max overflow-x-auto overflow-y-visible max-w-full px-16 py-4",
|
|
@@ -251,7 +251,7 @@ const se = (n, c) => {
|
|
|
251
251
|
]
|
|
252
252
|
}
|
|
253
253
|
), se);
|
|
254
|
-
|
|
254
|
+
B.displayName = "Thumbnails";
|
|
255
255
|
const ae = L(
|
|
256
256
|
(n, c) => {
|
|
257
257
|
const {
|
|
@@ -295,7 +295,7 @@ const ae = L(
|
|
|
295
295
|
}
|
|
296
296
|
),
|
|
297
297
|
h && /* @__PURE__ */ t.jsx(
|
|
298
|
-
|
|
298
|
+
_,
|
|
299
299
|
{
|
|
300
300
|
images: s,
|
|
301
301
|
closeLightbox: j,
|
package/dist/ImageGallery.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { Icons as
|
|
2
|
+
import { Icons as z } from "./Icons.es.js";
|
|
3
3
|
import { c as t } from "./cn-B6yFEsav.js";
|
|
4
|
-
import { useRef as
|
|
5
|
-
import
|
|
6
|
-
import { H as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
4
|
+
import { useRef as q, useLayoutEffect as F, memo as V, forwardRef as ee, useState as te } from "react";
|
|
5
|
+
import re from "./Spinner.es.js";
|
|
6
|
+
import { H as oe } from "./HelperComponent-U6mPwuDH.js";
|
|
7
|
+
import le from "./Button.es.js";
|
|
8
|
+
const se = (o) => {
|
|
9
9
|
let e = o;
|
|
10
10
|
for (; e && e !== document.body; ) {
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
return
|
|
11
|
+
const n = window.getComputedStyle(e).backgroundColor;
|
|
12
|
+
if (n && n !== "transparent" && n !== "rgba(0, 0, 0, 0)")
|
|
13
|
+
return n;
|
|
14
14
|
e = e.parentElement;
|
|
15
15
|
}
|
|
16
16
|
const l = window.getComputedStyle(document.body).backgroundColor;
|
|
17
17
|
return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
const o =
|
|
21
|
-
return
|
|
19
|
+
function ae() {
|
|
20
|
+
const o = q(null);
|
|
21
|
+
return F(() => {
|
|
22
22
|
if (!o.current || !o.current.parentElement) return;
|
|
23
|
-
const e =
|
|
23
|
+
const e = se(o.current.parentElement);
|
|
24
24
|
o.current.style.backgroundColor = e;
|
|
25
25
|
}, []), {
|
|
26
26
|
ref: o
|
|
@@ -60,47 +60,46 @@ const b = {
|
|
|
60
60
|
label: t("text-success", "peer-focus:text-success-light"),
|
|
61
61
|
icon: t("text-success-light", "peer-focus:text-success-light")
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, I = ee(
|
|
64
64
|
({
|
|
65
65
|
label: o,
|
|
66
66
|
icon: e,
|
|
67
67
|
iconPosition: l = "left",
|
|
68
|
-
onChange:
|
|
69
|
-
value:
|
|
68
|
+
onChange: C,
|
|
69
|
+
value: n = "",
|
|
70
70
|
name: g,
|
|
71
71
|
width: m = "100%",
|
|
72
72
|
height: u,
|
|
73
73
|
variant: c = "default",
|
|
74
|
-
labelVariant:
|
|
75
|
-
size:
|
|
74
|
+
labelVariant: a = "default",
|
|
75
|
+
size: S = "medium",
|
|
76
76
|
disabled: x = !1,
|
|
77
77
|
type: s = "text",
|
|
78
78
|
isFetching: f,
|
|
79
79
|
errorComponent: h,
|
|
80
80
|
helperComponent: w,
|
|
81
|
-
placeholder:
|
|
82
|
-
required:
|
|
83
|
-
onFocus:
|
|
84
|
-
onBlur:
|
|
85
|
-
onKeyDown:
|
|
86
|
-
onKeyUp:
|
|
87
|
-
className:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const p = {
|
|
81
|
+
placeholder: H,
|
|
82
|
+
required: N = !1,
|
|
83
|
+
onFocus: $,
|
|
84
|
+
onBlur: k,
|
|
85
|
+
onKeyDown: B,
|
|
86
|
+
onKeyUp: L,
|
|
87
|
+
className: R,
|
|
88
|
+
style: P,
|
|
89
|
+
readOnly: D = !1,
|
|
90
|
+
onClear: v,
|
|
91
|
+
...A
|
|
92
|
+
}, M) => {
|
|
93
|
+
const [y, O] = te(!1), { ref: T } = ae();
|
|
94
|
+
let p = S;
|
|
95
|
+
u && (p = "customHeight");
|
|
96
|
+
const d = {
|
|
98
97
|
small: {
|
|
99
98
|
container: "text-sm",
|
|
100
99
|
input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
|
|
101
100
|
label: ` prometeo-fonts-label-large
|
|
102
101
|
peer-focus:prometeo-fonts-label-large
|
|
103
|
-
peer-placeholder-shown:${
|
|
102
|
+
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 `,
|
|
104
103
|
icon: "w-4 h-4 right-3"
|
|
105
104
|
},
|
|
106
105
|
medium: {
|
|
@@ -108,7 +107,7 @@ const b = {
|
|
|
108
107
|
input: "h-12 px-3 prometeo-fonts-body-large",
|
|
109
108
|
label: ` prometeo-fonts-label-large
|
|
110
109
|
peer-focus:prometeo-fonts-label-large
|
|
111
|
-
peer-placeholder-shown:${
|
|
110
|
+
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 `,
|
|
112
111
|
icon: "w-5 h-5 right-3"
|
|
113
112
|
},
|
|
114
113
|
large: {
|
|
@@ -123,77 +122,69 @@ const b = {
|
|
|
123
122
|
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
|
|
124
123
|
icon: "w-6 h-6 right-3"
|
|
125
124
|
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
L?.(i);
|
|
132
|
-
}, Y = (i) => {
|
|
133
|
-
y === void 0 && P?.(i);
|
|
134
|
-
}, Z = () => {
|
|
135
|
-
Q(!j);
|
|
136
|
-
}, C = {};
|
|
137
|
-
m && m !== "100%" && (C.width = m), u && (C.height = u);
|
|
138
|
-
const v = c === "error" && h, _ = !v && w, q = s === "password", A = () => n === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `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 ${l === "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", F = () => u ? p.customHeight.label : p[d].label, V = () => u ? { height: u } : {}, ee = () => n === "default" ? o : $ || o || "", te = () => q ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", re = n === "default" && "transition-all duration-200 ease-in-out", N = h || w;
|
|
125
|
+
}, G = () => {
|
|
126
|
+
O(!y);
|
|
127
|
+
}, j = {};
|
|
128
|
+
m && m !== "100%" && (j.width = m), u && (j.height = u);
|
|
129
|
+
const E = c === "error" && h, J = !E && w, K = s === "password", Q = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${i ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "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 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${i ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, U = () => u ? d.customHeight.label : d[p].label, W = () => u ? { height: u } : {}, X = () => a === "default" ? o : H || o || "", Y = () => K ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Z = a === "default" && "transition-all duration-200 ease-in-out", i = h || w;
|
|
139
130
|
return /* @__PURE__ */ r.jsxs(
|
|
140
131
|
"div",
|
|
141
132
|
{
|
|
142
133
|
className: t(
|
|
143
134
|
"relative",
|
|
144
|
-
p
|
|
135
|
+
d[p].container,
|
|
145
136
|
!m && "w-full",
|
|
146
137
|
"bg-inherit",
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
a === "static" && "mt-2",
|
|
139
|
+
R
|
|
149
140
|
),
|
|
150
|
-
style: { ...
|
|
141
|
+
style: { ...P, ...j },
|
|
151
142
|
children: [
|
|
152
143
|
/* @__PURE__ */ r.jsx(
|
|
153
144
|
"input",
|
|
154
145
|
{
|
|
155
146
|
id: g,
|
|
156
147
|
name: g,
|
|
157
|
-
ref:
|
|
158
|
-
value:
|
|
159
|
-
placeholder:
|
|
160
|
-
type: s === "password" &&
|
|
148
|
+
ref: M,
|
|
149
|
+
value: n,
|
|
150
|
+
placeholder: X(),
|
|
151
|
+
type: s === "password" && y ? "text" : s,
|
|
161
152
|
className: t(
|
|
162
153
|
"peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
163
154
|
"focus:outline-none px-3",
|
|
164
|
-
|
|
165
|
-
|
|
155
|
+
a === "default" && "placeholder:text-transparent",
|
|
156
|
+
a === "static" && "placeholder:text-neutral-medium-default ",
|
|
166
157
|
b[c].input,
|
|
167
|
-
p
|
|
158
|
+
d[p].input,
|
|
168
159
|
e && "pr-10",
|
|
169
160
|
x && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
170
161
|
b[c].container,
|
|
171
|
-
|
|
162
|
+
Y()
|
|
172
163
|
),
|
|
173
|
-
style:
|
|
174
|
-
onChange:
|
|
175
|
-
onFocus:
|
|
176
|
-
onBlur:
|
|
164
|
+
style: W(),
|
|
165
|
+
onChange: C,
|
|
166
|
+
onFocus: $,
|
|
167
|
+
onBlur: k,
|
|
177
168
|
disabled: x,
|
|
178
|
-
required:
|
|
179
|
-
onKeyDown:
|
|
180
|
-
onKeyUp:
|
|
181
|
-
readOnly:
|
|
182
|
-
...
|
|
169
|
+
required: N,
|
|
170
|
+
onKeyDown: B,
|
|
171
|
+
onKeyUp: L,
|
|
172
|
+
readOnly: D,
|
|
173
|
+
...A
|
|
183
174
|
}
|
|
184
175
|
),
|
|
185
176
|
/* @__PURE__ */ r.jsx(
|
|
186
177
|
"label",
|
|
187
178
|
{
|
|
188
|
-
ref:
|
|
179
|
+
ref: T,
|
|
189
180
|
htmlFor: g,
|
|
190
181
|
className: t(
|
|
191
182
|
"absolute left-3 pointer-events-none px-1 z-10",
|
|
192
|
-
|
|
193
|
-
|
|
183
|
+
Z,
|
|
184
|
+
U(),
|
|
194
185
|
b[c].label,
|
|
195
|
-
|
|
196
|
-
|
|
186
|
+
Q(),
|
|
187
|
+
N && "after:content-['*'] after:text-error-default after:ml-1",
|
|
197
188
|
x && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
198
189
|
),
|
|
199
190
|
children: o
|
|
@@ -205,51 +196,58 @@ const b = {
|
|
|
205
196
|
tabIndex: -1,
|
|
206
197
|
type: "button",
|
|
207
198
|
className: t(
|
|
208
|
-
`absolute ${
|
|
209
|
-
p
|
|
199
|
+
`absolute ${i ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
|
|
200
|
+
d[p].icon,
|
|
210
201
|
b[c].icon,
|
|
211
202
|
s === "password" && !f ? "cursor-pointer" : "pointer-events-none",
|
|
212
203
|
l === "right" ? "right-3" : "left-3"
|
|
213
204
|
),
|
|
214
|
-
onClick: s === "password" && !f ?
|
|
215
|
-
onMouseDown: (
|
|
205
|
+
onClick: s === "password" && !f ? G : void 0,
|
|
206
|
+
onMouseDown: (_) => s === "password" && !f && _.preventDefault(),
|
|
216
207
|
children: /* @__PURE__ */ r.jsxs("div", { children: [
|
|
217
|
-
f && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
|
|
218
|
-
s === "password" && (
|
|
208
|
+
f && s !== "password" && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(re, { size: 24, color: "#7c86ff", loading: !0, variant: "clip" }) }),
|
|
209
|
+
s === "password" && (y ? /* @__PURE__ */ r.jsx(z.EyeVisibility, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(z.EyeVisibilityOff, { size: 24, className: "" })),
|
|
219
210
|
e
|
|
220
211
|
] })
|
|
221
212
|
}
|
|
222
213
|
),
|
|
223
|
-
|
|
224
|
-
|
|
214
|
+
v && /* @__PURE__ */ r.jsx(
|
|
215
|
+
le,
|
|
225
216
|
{
|
|
226
217
|
type: "button",
|
|
227
218
|
color: "secondary",
|
|
228
219
|
size: "small",
|
|
229
220
|
animate: !1,
|
|
230
221
|
className: t(
|
|
231
|
-
`absolute ${
|
|
222
|
+
`absolute! ${i ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
|
|
232
223
|
"size-6 p-4 ",
|
|
233
224
|
"bg-inherit",
|
|
234
225
|
"hover:bg-transparent! p-4 rounded-full"
|
|
235
226
|
),
|
|
236
227
|
label: "",
|
|
237
228
|
disabled: x,
|
|
238
|
-
onClick:
|
|
229
|
+
onClick: v,
|
|
239
230
|
variant: "text",
|
|
240
231
|
animateIcon: !1,
|
|
241
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
232
|
+
icon: /* @__PURE__ */ r.jsx(z.Close, { size: 20, className: "" })
|
|
242
233
|
}
|
|
243
234
|
),
|
|
244
|
-
|
|
235
|
+
i && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (E || J) && /* @__PURE__ */ r.jsx(
|
|
236
|
+
oe,
|
|
237
|
+
{
|
|
238
|
+
className: "absolute ",
|
|
239
|
+
variant: c,
|
|
240
|
+
children: h || w
|
|
241
|
+
}
|
|
242
|
+
) })
|
|
245
243
|
]
|
|
246
244
|
}
|
|
247
245
|
);
|
|
248
246
|
}
|
|
249
247
|
);
|
|
250
|
-
|
|
251
|
-
const
|
|
248
|
+
I.displayName = "Input";
|
|
249
|
+
const me = V(I);
|
|
252
250
|
export {
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
me as I,
|
|
252
|
+
ae as u
|
|
255
253
|
};
|
package/dist/Input.es.js
CHANGED
package/dist/InputFormikV2.es.js
CHANGED
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { FastField as
|
|
1
|
+
import { j as i } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { FastField as m, getIn as n } from "formik";
|
|
3
3
|
import { memo as s } from "react";
|
|
4
|
-
import { I as
|
|
5
|
-
const
|
|
6
|
-
field:
|
|
7
|
-
form:
|
|
4
|
+
import { I as d } from "./Input-CnXDg2s7.js";
|
|
5
|
+
const f = ({
|
|
6
|
+
field: a,
|
|
7
|
+
form: r,
|
|
8
8
|
...e
|
|
9
9
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
10
|
+
const t = r.getFieldMeta(a.name), o = t.touched && t.error;
|
|
11
|
+
return /* @__PURE__ */ i.jsx(
|
|
12
|
+
d,
|
|
13
13
|
{
|
|
14
14
|
...e,
|
|
15
|
-
...
|
|
16
|
-
value:
|
|
17
|
-
onChange: (
|
|
18
|
-
|
|
15
|
+
...a,
|
|
16
|
+
value: a.value,
|
|
17
|
+
onChange: (u) => {
|
|
18
|
+
a.onChange({ target: { value: u.target.value, name: a.name } });
|
|
19
19
|
},
|
|
20
|
-
variant:
|
|
21
|
-
errorComponent:
|
|
20
|
+
variant: o ? "error" : "default",
|
|
21
|
+
errorComponent: t.error,
|
|
22
22
|
type: e.type,
|
|
23
|
-
ref: e.innerRef
|
|
23
|
+
ref: e.innerRef,
|
|
24
|
+
disabled: e.disabled
|
|
24
25
|
}
|
|
25
26
|
);
|
|
26
|
-
},
|
|
27
|
+
}, l = s(f), h = (a) => /* @__PURE__ */ i.jsx(
|
|
28
|
+
m,
|
|
29
|
+
{
|
|
30
|
+
name: a.name,
|
|
31
|
+
disabled: a.disabled,
|
|
32
|
+
shouldUpdate: (r, e) => {
|
|
33
|
+
const t = r.name;
|
|
34
|
+
return r.disabled !== e.disabled || t !== e.name || n(r.formik.values, t) !== n(e.formik.values, t) || n(r.formik.errors, t) !== n(e.formik.errors, t) || n(r.formik.touched, t) !== n(e.formik.touched, t) || r.formik.isSubmitting !== e.formik.isSubmitting || Object.keys(r).length !== Object.keys(e).length;
|
|
35
|
+
},
|
|
36
|
+
children: ({ field: r, form: e }) => /* @__PURE__ */ i.jsx(l, { ...a, field: r, form: e, disabled: a.disabled })
|
|
37
|
+
}
|
|
38
|
+
);
|
|
27
39
|
export {
|
|
28
|
-
|
|
40
|
+
h as default
|
|
29
41
|
};
|