@arkyn/components 3.0.1-beta.140 → 3.0.1-beta.142
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/bundle.js +1003 -987
- package/dist/components/checkbox/index.d.ts +5 -1
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +6 -6
- package/dist/components/currencyInput/index.d.ts +5 -0
- package/dist/components/currencyInput/index.d.ts.map +1 -1
- package/dist/components/currencyInput/index.js +6 -5
- package/dist/components/imageUpload/index.d.ts +4 -0
- package/dist/components/imageUpload/index.d.ts.map +1 -1
- package/dist/components/imageUpload/index.js +5 -5
- package/dist/components/input/index.d.ts +4 -0
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +5 -5
- package/dist/components/multiSelect/index.d.ts +4 -0
- package/dist/components/multiSelect/index.d.ts.map +1 -1
- package/dist/components/multiSelect/index.js +5 -5
- package/dist/components/phoneInput/index.d.ts +48 -0
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/phoneInput/index.js +60 -16
- package/dist/components/radio/radioGroup/index.d.ts +4 -0
- package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
- package/dist/components/radio/radioGroup/index.js +5 -5
- package/dist/components/richText/index.d.ts +2 -0
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/index.js +12 -12
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +5 -5
- package/dist/components/switch/index.d.ts +5 -1
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/switch/index.js +6 -6
- package/dist/hooks/useAutomation.d.ts +29 -24
- package/dist/hooks/useAutomation.d.ts.map +1 -1
- package/dist/hooks/useAutomation.js +50 -38
- package/dist/services/fieldTemplate.d.ts +14 -0
- package/dist/services/fieldTemplate.d.ts.map +1 -0
- package/dist/services/fieldTemplate.js +11 -0
- package/dist/types/richTextTypes.d.ts +3 -0
- package/dist/types/richTextTypes.d.ts.map +1 -1
- package/package.json +3 -1
package/dist/bundle.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { Children as e, cloneElement as t, createContext as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
|
|
2
2
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import { AlertTriangle as h, AlignCenter as g, AlignJustify as _, AlignLeft as v, AlignRight as y, Bold as b, Check as x, CheckCircle2 as S, ChevronDown as C, ChevronLeft as w, ChevronRight as T, Code as E, Ellipsis as D, File as O, FileArchive as k, FileAudio as A, FileImage as j, Heading1 as M, Heading2 as N, Image as P, Info as F, Italic as I, Loader2 as L, MapPinned as R, Pause as z, Play as B, Quote as V, RefreshCw as H, Search as U, Underline as W, Video as G, X as
|
|
4
|
-
import { findCountryMask as
|
|
5
|
-
import { AnimatePresence as
|
|
6
|
-
import
|
|
7
|
-
import { createRoot as
|
|
8
|
-
import { InputMask as
|
|
9
|
-
import { countries as
|
|
10
|
-
import
|
|
11
|
-
import { Editor as
|
|
12
|
-
import { withHistory as
|
|
13
|
-
import { Editable as
|
|
14
|
-
import { StandaloneSearchBox as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
3
|
+
import { AlertTriangle as h, AlignCenter as g, AlignJustify as _, AlignLeft as v, AlignRight as y, Bold as b, Check as x, CheckCircle2 as S, ChevronDown as C, ChevronLeft as w, ChevronRight as T, Code as E, Ellipsis as D, File as O, FileArchive as k, FileAudio as A, FileImage as j, Heading1 as M, Heading2 as N, Image as P, Info as F, Italic as I, Loader2 as L, MapPinned as R, Pause as z, Play as B, Quote as V, RefreshCw as H, Search as U, Underline as W, Video as G, X as K, XCircle as q } from "lucide-react";
|
|
4
|
+
import { findCountryMask as ee, formatToCapitalizeFirstWordLetter as te, formatToCurrency as J, formatToPhone as ne, removeNonNumeric as re } from "@arkyn/shared";
|
|
5
|
+
import { AnimatePresence as ie, motion as Y } from "framer-motion";
|
|
6
|
+
import ae from "mapbox-gl";
|
|
7
|
+
import { createRoot as oe } from "react-dom/client";
|
|
8
|
+
import { InputMask as se } from "@react-input/mask";
|
|
9
|
+
import { countries as ce } from "@arkyn/templates";
|
|
10
|
+
import le from "is-hotkey";
|
|
11
|
+
import { Editor as ue, Element as de, Node as fe, Text as pe, Transforms as me, createEditor as he } from "slate";
|
|
12
|
+
import { withHistory as ge } from "slate-history";
|
|
13
|
+
import { Editable as _e, Slate as ve, useSlate as ye, withReact as be } from "slate-react";
|
|
14
|
+
import { StandaloneSearchBox as xe, useLoadScript as Se } from "@react-google-maps/api";
|
|
15
|
+
import { scroller as Ce } from "react-scroll";
|
|
16
|
+
import we, { Toaster as Te } from "react-hot-toast";
|
|
17
|
+
import Ee from "html-react-parser";
|
|
17
18
|
//#region src/components/alert/alertTitle/index.tsx
|
|
18
|
-
function
|
|
19
|
+
function De(e) {
|
|
19
20
|
let { className: t, ...n } = e;
|
|
20
21
|
return /* @__PURE__ */ p("div", {
|
|
21
22
|
className: `arkynAlertTitle ${t}`.trim(),
|
|
@@ -24,18 +25,18 @@ function Oe(e) {
|
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/components/alert/alertContainer/index.tsx
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return a(
|
|
28
|
+
var Oe = n({});
|
|
29
|
+
function ke() {
|
|
30
|
+
return a(Oe);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function Ae(e) {
|
|
32
33
|
let { schema: t, children: n, className: r, ...i } = e, a = `arkynAlertContainer ${t} ${((e) => {
|
|
33
34
|
let t = !1, n = (e) => {
|
|
34
|
-
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type ===
|
|
35
|
+
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type === De ? t = !0 : e.props && typeof e.props == "object" && e.props !== null && "children" in e.props && n(e.props.children));
|
|
35
36
|
};
|
|
36
37
|
return n(e), t;
|
|
37
38
|
})(n) ? "existsAlertTitle" : "nonExistsAlertTitle"} ${r}`;
|
|
38
|
-
return /* @__PURE__ */ p(
|
|
39
|
+
return /* @__PURE__ */ p(Oe.Provider, {
|
|
39
40
|
value: e,
|
|
40
41
|
children: /* @__PURE__ */ p("div", {
|
|
41
42
|
className: a.trim(),
|
|
@@ -46,7 +47,7 @@ function je(e) {
|
|
|
46
47
|
}
|
|
47
48
|
//#endregion
|
|
48
49
|
//#region src/components/alert/alertContent/index.tsx
|
|
49
|
-
function
|
|
50
|
+
function je(e) {
|
|
50
51
|
let { className: t, ...n } = e;
|
|
51
52
|
return /* @__PURE__ */ p("div", {
|
|
52
53
|
className: `arkynAlertContent ${t}`.trim(),
|
|
@@ -55,7 +56,7 @@ function Me(e) {
|
|
|
55
56
|
}
|
|
56
57
|
//#endregion
|
|
57
58
|
//#region src/components/alert/alertDescription/index.tsx
|
|
58
|
-
function
|
|
59
|
+
function Me(e) {
|
|
59
60
|
let { className: t, ...n } = e;
|
|
60
61
|
return /* @__PURE__ */ p("div", {
|
|
61
62
|
className: `arkynAlertDescription ${t}`.trim(),
|
|
@@ -64,14 +65,14 @@ function Ne(e) {
|
|
|
64
65
|
}
|
|
65
66
|
//#endregion
|
|
66
67
|
//#region src/components/alert/alertIcon/index.tsx
|
|
67
|
-
function
|
|
68
|
-
let { className: t, ...n } = e, { schema: r } =
|
|
68
|
+
function Ne(e) {
|
|
69
|
+
let { className: t, ...n } = e, { schema: r } = ke(), i = `arkynAlertIcon ${r} ${t}`;
|
|
69
70
|
switch (r) {
|
|
70
71
|
case "success": return /* @__PURE__ */ p(S, {
|
|
71
72
|
className: i,
|
|
72
73
|
...n
|
|
73
74
|
});
|
|
74
|
-
case "danger": return /* @__PURE__ */ p(
|
|
75
|
+
case "danger": return /* @__PURE__ */ p(q, {
|
|
75
76
|
className: i,
|
|
76
77
|
...n
|
|
77
78
|
});
|
|
@@ -87,7 +88,7 @@ function Pe(e) {
|
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
90
|
//#region src/hooks/useSlider.ts
|
|
90
|
-
function
|
|
91
|
+
function Pe(e) {
|
|
91
92
|
function t() {
|
|
92
93
|
return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
|
|
93
94
|
}
|
|
@@ -99,7 +100,7 @@ function Fe(e) {
|
|
|
99
100
|
}
|
|
100
101
|
//#endregion
|
|
101
102
|
//#region src/components/slider/index.tsx
|
|
102
|
-
function
|
|
103
|
+
function Fe(e) {
|
|
103
104
|
let { onChange: t, value: n, disabled: r = !1, onDragging: i, className: a = "", ...s } = e, [c, d] = u(!1), f = l(null), h = () => d(!0), g = () => d(!1), _ = (e) => {
|
|
104
105
|
if (r || !c || !f.current) return;
|
|
105
106
|
let n = f.current.getBoundingClientRect(), i = e.clientX - n.left;
|
|
@@ -130,8 +131,8 @@ function Ie(e) {
|
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
133
|
//#region src/components/audioPlayer/index.tsx
|
|
133
|
-
function
|
|
134
|
-
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] =
|
|
134
|
+
function Ie(e) {
|
|
135
|
+
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] = Pe(0), [d, f] = u(!1), [h, g] = u(!1), _ = l(null), v = _.current?.currentTime || 0, y = _.current?.duration || 0, b = C(v), x = C(y), S = {
|
|
135
136
|
totalTime: y,
|
|
136
137
|
currentTime: v,
|
|
137
138
|
formattedCurrentTime: b,
|
|
@@ -186,7 +187,7 @@ function Le(e) {
|
|
|
186
187
|
children: [d && /* @__PURE__ */ p(z, {}), !d && /* @__PURE__ */ p(B, {})]
|
|
187
188
|
}),
|
|
188
189
|
/* @__PURE__ */ p("p", { children: b }),
|
|
189
|
-
/* @__PURE__ */ p(
|
|
190
|
+
/* @__PURE__ */ p(Fe, {
|
|
190
191
|
value: s,
|
|
191
192
|
onChange: D,
|
|
192
193
|
onDragging: g,
|
|
@@ -198,22 +199,22 @@ function Le(e) {
|
|
|
198
199
|
}
|
|
199
200
|
//#endregion
|
|
200
201
|
//#region src/providers/formProvider.tsx
|
|
201
|
-
var
|
|
202
|
-
function
|
|
202
|
+
var Le = n({});
|
|
203
|
+
function Re(e) {
|
|
203
204
|
let { children: n, fieldErrors: r, form: i } = e;
|
|
204
|
-
return /* @__PURE__ */ m(
|
|
205
|
+
return /* @__PURE__ */ m(Le.Provider, {
|
|
205
206
|
value: { fieldErrors: r },
|
|
206
207
|
children: [!i && n, i && t(i, i.props, n)]
|
|
207
208
|
});
|
|
208
209
|
}
|
|
209
210
|
//#endregion
|
|
210
211
|
//#region src/hooks/useForm.ts
|
|
211
|
-
function
|
|
212
|
-
return a(
|
|
212
|
+
function X() {
|
|
213
|
+
return a(Le);
|
|
213
214
|
}
|
|
214
215
|
//#endregion
|
|
215
216
|
//#region src/components/fieldError/index.tsx
|
|
216
|
-
function
|
|
217
|
+
function ze(e) {
|
|
217
218
|
let { children: t, className: n, ...r } = e, i = `arkynFieldError ${n}`;
|
|
218
219
|
return t ? /* @__PURE__ */ p("strong", {
|
|
219
220
|
className: i.trim(),
|
|
@@ -223,7 +224,7 @@ function Y(e) {
|
|
|
223
224
|
}
|
|
224
225
|
//#endregion
|
|
225
226
|
//#region src/components/fieldLabel/index.tsx
|
|
226
|
-
function
|
|
227
|
+
function Be(e) {
|
|
227
228
|
let { showAsterisk: t = !1, className: n = "", ...r } = e;
|
|
228
229
|
return /* @__PURE__ */ p("label", {
|
|
229
230
|
className: `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`.trim(),
|
|
@@ -232,7 +233,7 @@ function X(e) {
|
|
|
232
233
|
}
|
|
233
234
|
//#endregion
|
|
234
235
|
//#region src/components/fieldWrapper/index.tsx
|
|
235
|
-
function
|
|
236
|
+
function Ve(e) {
|
|
236
237
|
let { children: t, className: n, orientation: r = "vertical", ...i } = e;
|
|
237
238
|
return /* @__PURE__ */ p("section", {
|
|
238
239
|
className: `arkynFieldWrapper ${n} ${r}`.trim(),
|
|
@@ -242,7 +243,7 @@ function Z(e) {
|
|
|
242
243
|
}
|
|
243
244
|
//#endregion
|
|
244
245
|
//#region src/services/iconRenderer.tsx
|
|
245
|
-
function
|
|
246
|
+
function Z(e) {
|
|
246
247
|
let { iconSize: t, icon: n, className: r, show: i = !0 } = e;
|
|
247
248
|
return !i || !n ? /* @__PURE__ */ p(f, {}) : typeof n == "string" ? /* @__PURE__ */ p("p", {
|
|
248
249
|
className: r,
|
|
@@ -255,7 +256,7 @@ function Q(e) {
|
|
|
255
256
|
}
|
|
256
257
|
//#endregion
|
|
257
258
|
//#region src/components/button/index.tsx
|
|
258
|
-
function
|
|
259
|
+
function Q(e) {
|
|
259
260
|
let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", loadingText: i, size: a = "md", leftIcon: o, rightIcon: s, disabled: c, className: l = "", children: u, ...d } = e, f = {
|
|
260
261
|
xs: 12,
|
|
261
262
|
sm: 16,
|
|
@@ -275,12 +276,12 @@ function $(e) {
|
|
|
275
276
|
}), /* @__PURE__ */ m("div", {
|
|
276
277
|
className: "arkynButtonContent",
|
|
277
278
|
children: [
|
|
278
|
-
/* @__PURE__ */ p(
|
|
279
|
+
/* @__PURE__ */ p(Z, {
|
|
279
280
|
iconSize: f,
|
|
280
281
|
icon: o
|
|
281
282
|
}),
|
|
282
283
|
u,
|
|
283
|
-
/* @__PURE__ */ p(
|
|
284
|
+
/* @__PURE__ */ p(Z, {
|
|
284
285
|
iconSize: f,
|
|
285
286
|
icon: s
|
|
286
287
|
})
|
|
@@ -290,7 +291,7 @@ function $(e) {
|
|
|
290
291
|
}
|
|
291
292
|
//#endregion
|
|
292
293
|
//#region src/components/divider/index.tsx
|
|
293
|
-
function
|
|
294
|
+
function He(e) {
|
|
294
295
|
let { className: t, orientation: n = "horizontal", ...r } = e;
|
|
295
296
|
return /* @__PURE__ */ p("div", {
|
|
296
297
|
className: `arkynDivider ${n} ${t}`.trim(),
|
|
@@ -299,7 +300,7 @@ function Be(e) {
|
|
|
299
300
|
}
|
|
300
301
|
//#endregion
|
|
301
302
|
//#region src/components/iconButton/index.tsx
|
|
302
|
-
function
|
|
303
|
+
function Ue(e) {
|
|
303
304
|
let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", size: i = "md", icon: a, disabled: o, className: s = "", ...c } = e, l = {
|
|
304
305
|
xs: 12,
|
|
305
306
|
sm: 16,
|
|
@@ -327,7 +328,7 @@ function Ve(e) {
|
|
|
327
328
|
}
|
|
328
329
|
//#endregion
|
|
329
330
|
//#region src/components/tooltip/index.tsx
|
|
330
|
-
function
|
|
331
|
+
function We(e) {
|
|
331
332
|
let { text: t, size: n = "lg", children: r, orientation: i = "top", className: a = "", ...c } = e, d = s(), f = l(null), [h, g] = u(i);
|
|
332
333
|
return o(() => {
|
|
333
334
|
let e = () => {
|
|
@@ -358,7 +359,7 @@ function He(e) {
|
|
|
358
359
|
}
|
|
359
360
|
//#endregion
|
|
360
361
|
//#region src/components/audioUpload/hasFileContent/index.tsx
|
|
361
|
-
function
|
|
362
|
+
function Ge(e) {
|
|
362
363
|
let { filePath: t, disabled: n, acceptAudio: r, handleSelectFile: i, isLoading: a, reSendAudio: o, changeAudioButtonText: s } = e;
|
|
363
364
|
function c() {
|
|
364
365
|
if (n) return;
|
|
@@ -371,14 +372,14 @@ function Ue(e) {
|
|
|
371
372
|
return /* @__PURE__ */ m("div", {
|
|
372
373
|
className: "arkynAudioUploadHasFileContentContainer",
|
|
373
374
|
children: [
|
|
374
|
-
/* @__PURE__ */ p(
|
|
375
|
-
/* @__PURE__ */ p(
|
|
375
|
+
/* @__PURE__ */ p(Ie, { src: t }),
|
|
376
|
+
/* @__PURE__ */ p(He, {}),
|
|
376
377
|
/* @__PURE__ */ m("div", {
|
|
377
378
|
className: "arkynAudioUploadButtonsContainer",
|
|
378
|
-
children: [!!o && /* @__PURE__ */ p(
|
|
379
|
+
children: [!!o && /* @__PURE__ */ p(We, {
|
|
379
380
|
orientation: "bottom",
|
|
380
381
|
text: "Reenviar áudio",
|
|
381
|
-
children: /* @__PURE__ */ p(
|
|
382
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
382
383
|
type: "button",
|
|
383
384
|
"aria-label": "resend image",
|
|
384
385
|
variant: "outline",
|
|
@@ -389,7 +390,7 @@ function Ue(e) {
|
|
|
389
390
|
icon: H,
|
|
390
391
|
disabled: n
|
|
391
392
|
})
|
|
392
|
-
}), /* @__PURE__ */ p(
|
|
393
|
+
}), /* @__PURE__ */ p(Q, {
|
|
393
394
|
isLoading: a,
|
|
394
395
|
onClick: c,
|
|
395
396
|
variant: "outline",
|
|
@@ -404,7 +405,7 @@ function Ue(e) {
|
|
|
404
405
|
}
|
|
405
406
|
//#endregion
|
|
406
407
|
//#region src/components/audioUpload/noFileContent/index.tsx
|
|
407
|
-
function
|
|
408
|
+
function Ke(e) {
|
|
408
409
|
let { dropAudioText: t, isLoading: n, acceptAudio: r, handleSelectFile: i, selectAudioButtonText: a, disabled: o } = e;
|
|
409
410
|
function s(e) {
|
|
410
411
|
if (o) return;
|
|
@@ -423,7 +424,7 @@ function We(e) {
|
|
|
423
424
|
return /* @__PURE__ */ m("div", {
|
|
424
425
|
onDrop: s,
|
|
425
426
|
className: "arkynAudioUploadNoFileContent",
|
|
426
|
-
children: [/* @__PURE__ */ p(
|
|
427
|
+
children: [/* @__PURE__ */ p(Q, {
|
|
427
428
|
isLoading: n,
|
|
428
429
|
onClick: c,
|
|
429
430
|
variant: "ghost",
|
|
@@ -436,8 +437,8 @@ function We(e) {
|
|
|
436
437
|
}
|
|
437
438
|
//#endregion
|
|
438
439
|
//#region src/components/audioUpload/index.tsx
|
|
439
|
-
function
|
|
440
|
-
let { name: t, label: n, fileName: r = "file", method: i = "POST", onChange: a, fileResponseName: o = "url", selectAudioButtonText: s = "Selecionar arquivo de áudio", dropAudioText: c = "Ou arraste e solte um arquivo de áudio aqui", changeAudioButtonText: l = "Trocar arquivo de áudio", acceptAudio: d = "audio/*", action: f, defaultValue: h = "", showAsterisk: g = !1, disabled: _ = !1 } = e, { fieldErrors: v } =
|
|
440
|
+
function qe(e) {
|
|
441
|
+
let { name: t, label: n, fileName: r = "file", method: i = "POST", onChange: a, fileResponseName: o = "url", selectAudioButtonText: s = "Selecionar arquivo de áudio", dropAudioText: c = "Ou arraste e solte um arquivo de áudio aqui", changeAudioButtonText: l = "Trocar arquivo de áudio", acceptAudio: d = "audio/*", action: f, defaultValue: h = "", showAsterisk: g = !1, disabled: _ = !1 } = e, { fieldErrors: v } = X(), y = v?.[t], [b, x] = u(h), [S, C] = u(""), [w, T] = u(null), [E, D] = u(h), [O, k] = u(!1);
|
|
441
442
|
async function A(e) {
|
|
442
443
|
if (_) return;
|
|
443
444
|
k(!0), T(e), C("");
|
|
@@ -461,8 +462,8 @@ function Ge(e) {
|
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
let M = y || S;
|
|
464
|
-
return /* @__PURE__ */ m(
|
|
465
|
-
n && /* @__PURE__ */ p(
|
|
465
|
+
return /* @__PURE__ */ m(Ve, { children: [
|
|
466
|
+
n && /* @__PURE__ */ p(Be, {
|
|
466
467
|
showAsterisk: g,
|
|
467
468
|
children: n
|
|
468
469
|
}),
|
|
@@ -474,7 +475,7 @@ function Ge(e) {
|
|
|
474
475
|
name: t,
|
|
475
476
|
value: b || ""
|
|
476
477
|
}),
|
|
477
|
-
!E && /* @__PURE__ */ p(
|
|
478
|
+
!E && /* @__PURE__ */ p(Ke, {
|
|
478
479
|
disabled: _,
|
|
479
480
|
isLoading: O,
|
|
480
481
|
acceptAudio: d,
|
|
@@ -482,7 +483,7 @@ function Ge(e) {
|
|
|
482
483
|
handleSelectFile: j,
|
|
483
484
|
selectAudioButtonText: s
|
|
484
485
|
}),
|
|
485
|
-
E && /* @__PURE__ */ p(
|
|
486
|
+
E && /* @__PURE__ */ p(Ge, {
|
|
486
487
|
filePath: E,
|
|
487
488
|
acceptAudio: d,
|
|
488
489
|
changeAudioButtonText: l,
|
|
@@ -493,12 +494,12 @@ function Ge(e) {
|
|
|
493
494
|
})
|
|
494
495
|
]
|
|
495
496
|
}),
|
|
496
|
-
M && /* @__PURE__ */ p(
|
|
497
|
+
M && /* @__PURE__ */ p(ze, { children: M })
|
|
497
498
|
] });
|
|
498
499
|
}
|
|
499
500
|
//#endregion
|
|
500
501
|
//#region src/components/badge/index.tsx
|
|
501
|
-
function
|
|
502
|
+
function Je(e) {
|
|
502
503
|
let { variant: t = "ghost", scheme: n = "primary", size: r = "lg", leftIcon: i, rightIcon: a, className: o = "", children: s, ...c } = e, l = {
|
|
503
504
|
md: 12,
|
|
504
505
|
lg: 14
|
|
@@ -507,12 +508,12 @@ function Ke(e) {
|
|
|
507
508
|
className: `arkynBadge ${t} ${n} ${r} ${o}`.trim(),
|
|
508
509
|
...c,
|
|
509
510
|
children: [
|
|
510
|
-
/* @__PURE__ */ p(
|
|
511
|
+
/* @__PURE__ */ p(Z, {
|
|
511
512
|
iconSize: l,
|
|
512
513
|
icon: i
|
|
513
514
|
}),
|
|
514
515
|
/* @__PURE__ */ p("p", { children: s }),
|
|
515
|
-
/* @__PURE__ */ p(
|
|
516
|
+
/* @__PURE__ */ p(Z, {
|
|
516
517
|
iconSize: l,
|
|
517
518
|
icon: a
|
|
518
519
|
})
|
|
@@ -521,7 +522,7 @@ function Ke(e) {
|
|
|
521
522
|
}
|
|
522
523
|
//#endregion
|
|
523
524
|
//#region src/components/calendar/_viewService.ts
|
|
524
|
-
var
|
|
525
|
+
var Ye = class {
|
|
525
526
|
currentDay(e) {
|
|
526
527
|
return String(e.getDate()).padStart(2, "0");
|
|
527
528
|
}
|
|
@@ -532,7 +533,7 @@ var qe = class {
|
|
|
532
533
|
return String(e.getFullYear());
|
|
533
534
|
}
|
|
534
535
|
capitalize(e) {
|
|
535
|
-
return
|
|
536
|
+
return te(e);
|
|
536
537
|
}
|
|
537
538
|
parseDayType(e, t, n, r) {
|
|
538
539
|
let i = r[0].getDate(), a = r[0].getMonth(), o = r[0].getFullYear(), s = r[1].getDate(), c = r[1].getMonth(), l = r[1].getFullYear(), u = new Date(o, a, i), d = new Date(l, c, s), f = new Date(n, t, e);
|
|
@@ -649,12 +650,12 @@ var qe = class {
|
|
|
649
650
|
let n = new Date(e);
|
|
650
651
|
n.setDate(1), n.setMonth(n.getMonth() - 1), t(n);
|
|
651
652
|
}
|
|
652
|
-
},
|
|
653
|
-
function
|
|
654
|
-
return a(
|
|
653
|
+
}, Xe = n({});
|
|
654
|
+
function Ze() {
|
|
655
|
+
return a(Xe);
|
|
655
656
|
}
|
|
656
|
-
function
|
|
657
|
-
let t = e.language || "pt-BR", n = e.calendarType === "single" ? [e.defaultValue || /* @__PURE__ */ new Date(), e.defaultValue || /* @__PURE__ */ new Date()] : e.defaultValue || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [r, i] = u(/* @__PURE__ */ new Date()), [a, o] = u(n), s = new
|
|
657
|
+
function Qe(e) {
|
|
658
|
+
let t = e.language || "pt-BR", n = e.calendarType === "single" ? [e.defaultValue || /* @__PURE__ */ new Date(), e.defaultValue || /* @__PURE__ */ new Date()] : e.defaultValue || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [r, i] = u(/* @__PURE__ */ new Date()), [a, o] = u(n), s = new Ye();
|
|
658
659
|
function c(t) {
|
|
659
660
|
let n = [new Date(t[0]), new Date(t[1])];
|
|
660
661
|
e.onChange && e.calendarType === "range" && e.onChange(n), e.onChange && e.calendarType === "single" && e.onChange(n[0]), o(n);
|
|
@@ -662,7 +663,7 @@ function Xe(e) {
|
|
|
662
663
|
function l(t) {
|
|
663
664
|
e.onChangeView && e.onChangeView(t), i(t);
|
|
664
665
|
}
|
|
665
|
-
return /* @__PURE__ */ p(
|
|
666
|
+
return /* @__PURE__ */ p(Xe.Provider, {
|
|
666
667
|
value: {
|
|
667
668
|
valueDate: a,
|
|
668
669
|
viewDate: r,
|
|
@@ -685,15 +686,33 @@ function Xe(e) {
|
|
|
685
686
|
}
|
|
686
687
|
//#endregion
|
|
687
688
|
//#region src/components/calendar/calendarContainer/index.tsx
|
|
688
|
-
function
|
|
689
|
+
function $e({ children: e }) {
|
|
689
690
|
return /* @__PURE__ */ p("div", {
|
|
690
691
|
className: "arkynCalendarContainer",
|
|
691
692
|
children: e
|
|
692
693
|
});
|
|
693
694
|
}
|
|
694
695
|
//#endregion
|
|
696
|
+
//#region src/services/fieldTemplate.tsx
|
|
697
|
+
function $(e) {
|
|
698
|
+
let { name: t, label: n, showAsterisk: r, className: i, unShowFieldTemplate: a, errorMessage: o, children: s, orientation: c } = e;
|
|
699
|
+
return a ? s : /* @__PURE__ */ m(Ve, {
|
|
700
|
+
id: t,
|
|
701
|
+
className: i,
|
|
702
|
+
orientation: c,
|
|
703
|
+
children: [
|
|
704
|
+
n && /* @__PURE__ */ p(Be, {
|
|
705
|
+
showAsterisk: r,
|
|
706
|
+
children: n
|
|
707
|
+
}),
|
|
708
|
+
s,
|
|
709
|
+
o && /* @__PURE__ */ p(ze, { children: o })
|
|
710
|
+
]
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
//#endregion
|
|
695
714
|
//#region src/components/select/selectChevron/index.tsx
|
|
696
|
-
function
|
|
715
|
+
function et(e) {
|
|
697
716
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
698
717
|
return n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(C, {
|
|
699
718
|
className: `arkynSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -708,7 +727,7 @@ function Qe(e) {
|
|
|
708
727
|
}
|
|
709
728
|
//#endregion
|
|
710
729
|
//#region src/components/select/selectContainer/index.tsx
|
|
711
|
-
function
|
|
730
|
+
function tt(e) {
|
|
712
731
|
let { children: t, handleContainerFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s, readOnly: c, variant: l, size: u, id: d, prefixExists: f } = e;
|
|
713
732
|
return /* @__PURE__ */ p("section", {
|
|
714
733
|
id: d,
|
|
@@ -719,7 +738,7 @@ function $e(e) {
|
|
|
719
738
|
}
|
|
720
739
|
//#endregion
|
|
721
740
|
//#region src/components/select/selectContent/index.tsx
|
|
722
|
-
function
|
|
741
|
+
function nt(e) {
|
|
723
742
|
let { children: t, size: n } = e;
|
|
724
743
|
return /* @__PURE__ */ p("div", {
|
|
725
744
|
className: `arkynSelectContent ${n}`,
|
|
@@ -728,7 +747,7 @@ function et(e) {
|
|
|
728
747
|
}
|
|
729
748
|
//#endregion
|
|
730
749
|
//#region src/components/select/selectOption/index.tsx
|
|
731
|
-
function
|
|
750
|
+
function rt(e) {
|
|
732
751
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
733
752
|
return /* @__PURE__ */ m("div", {
|
|
734
753
|
onClick: () => r(i),
|
|
@@ -742,13 +761,13 @@ function tt(e) {
|
|
|
742
761
|
}
|
|
743
762
|
//#endregion
|
|
744
763
|
//#region src/hooks/useScrollLock.ts
|
|
745
|
-
function
|
|
764
|
+
function it() {
|
|
746
765
|
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
747
766
|
}
|
|
748
|
-
function
|
|
767
|
+
function at(e) {
|
|
749
768
|
o(() => {
|
|
750
769
|
if (e) {
|
|
751
|
-
let e = document.body.style.overflow, t = document.body.style.paddingRight, n =
|
|
770
|
+
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = it();
|
|
752
771
|
if (n > 0) {
|
|
753
772
|
let e = window.getComputedStyle(document.body), t = parseInt(e.paddingRight) || 0;
|
|
754
773
|
document.body.style.paddingRight = `${t + n}px`;
|
|
@@ -761,98 +780,94 @@ function rt(e) {
|
|
|
761
780
|
}
|
|
762
781
|
//#endregion
|
|
763
782
|
//#region src/components/input/index.tsx
|
|
764
|
-
function
|
|
765
|
-
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: o, className: c = "", prefix: d, suffix: f, isLoading: h = !1, leftIcon: g, readOnly: _, onFocus: v, onBlur: y,
|
|
783
|
+
function ot(e) {
|
|
784
|
+
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: o, className: c = "", prefix: d, suffix: f, isLoading: h = !1, leftIcon: g, readOnly: _, onFocus: v, onBlur: y, unShowFieldTemplate: b = !1, errorMessage: x, showAsterisk: S, rightIcon: C, type: w = "text", size: T = "md", id: E, value: D, placeholder: O, orientation: k, ...A } = e, { fieldErrors: j } = X(), [M, N] = u(!1), P = l(null), F = E || s(), I = x || j?.[t], R = !!I, z = n || h, B = {
|
|
766
785
|
md: 20,
|
|
767
786
|
lg: 20
|
|
768
|
-
}[
|
|
769
|
-
function
|
|
770
|
-
|
|
787
|
+
}[T], V = C ? "right" : "left", H = V === "left" && h, U = V === "right" && h;
|
|
788
|
+
function W() {
|
|
789
|
+
z || !P?.current || (N(!0), P.current.focus());
|
|
771
790
|
}
|
|
772
|
-
function
|
|
773
|
-
|
|
791
|
+
function G(e) {
|
|
792
|
+
N(!0), v && v(e);
|
|
774
793
|
}
|
|
775
|
-
function
|
|
776
|
-
|
|
794
|
+
function K(e) {
|
|
795
|
+
N(!1), y && y(e);
|
|
777
796
|
}
|
|
778
|
-
|
|
797
|
+
return w === "hidden" ? /* @__PURE__ */ p("input", {
|
|
779
798
|
style: { display: "none" },
|
|
780
799
|
readOnly: !0,
|
|
781
800
|
type: "text",
|
|
782
|
-
ref:
|
|
783
|
-
...
|
|
784
|
-
})
|
|
785
|
-
|
|
786
|
-
|
|
801
|
+
ref: P,
|
|
802
|
+
...A
|
|
803
|
+
}) : /* @__PURE__ */ p($, {
|
|
804
|
+
name: t,
|
|
805
|
+
label: o,
|
|
806
|
+
showAsterisk: S,
|
|
787
807
|
className: c,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
})
|
|
845
|
-
]
|
|
846
|
-
}),
|
|
847
|
-
P && /* @__PURE__ */ p(Y, { children: P })
|
|
848
|
-
]
|
|
808
|
+
errorMessage: I,
|
|
809
|
+
unShowFieldTemplate: b,
|
|
810
|
+
orientation: k,
|
|
811
|
+
children: /* @__PURE__ */ m("section", {
|
|
812
|
+
title: r,
|
|
813
|
+
style: i,
|
|
814
|
+
onClick: W,
|
|
815
|
+
className: `arkynInput ${d ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${f ? "hasSuffix" : ""} ${a} ${T} ${z || _ || h ? "opacity" : ""} ${R ? "errored" : ""} ${M ? "focused" : ""}`,
|
|
816
|
+
children: [
|
|
817
|
+
/* @__PURE__ */ p(Z, {
|
|
818
|
+
iconSize: B,
|
|
819
|
+
icon: d,
|
|
820
|
+
className: "prefix"
|
|
821
|
+
}),
|
|
822
|
+
/* @__PURE__ */ p(Z, {
|
|
823
|
+
show: H,
|
|
824
|
+
iconSize: B,
|
|
825
|
+
className: "spinner",
|
|
826
|
+
icon: L
|
|
827
|
+
}),
|
|
828
|
+
/* @__PURE__ */ p(Z, {
|
|
829
|
+
show: !h,
|
|
830
|
+
icon: g,
|
|
831
|
+
iconSize: B
|
|
832
|
+
}),
|
|
833
|
+
/* @__PURE__ */ p("input", {
|
|
834
|
+
disabled: z,
|
|
835
|
+
readOnly: _,
|
|
836
|
+
ref: P,
|
|
837
|
+
onFocus: G,
|
|
838
|
+
onBlur: K,
|
|
839
|
+
type: w,
|
|
840
|
+
id: F,
|
|
841
|
+
name: t,
|
|
842
|
+
placeholder: z && D || O,
|
|
843
|
+
value: z ? void 0 : D,
|
|
844
|
+
...A
|
|
845
|
+
}),
|
|
846
|
+
/* @__PURE__ */ p(Z, {
|
|
847
|
+
show: !h,
|
|
848
|
+
icon: C,
|
|
849
|
+
iconSize: B
|
|
850
|
+
}),
|
|
851
|
+
/* @__PURE__ */ p(Z, {
|
|
852
|
+
show: U,
|
|
853
|
+
iconSize: B,
|
|
854
|
+
className: "spinner",
|
|
855
|
+
icon: L
|
|
856
|
+
}),
|
|
857
|
+
/* @__PURE__ */ p(Z, {
|
|
858
|
+
iconSize: B,
|
|
859
|
+
icon: f,
|
|
860
|
+
className: "suffix"
|
|
861
|
+
})
|
|
862
|
+
]
|
|
863
|
+
})
|
|
849
864
|
});
|
|
850
865
|
}
|
|
851
866
|
//#endregion
|
|
852
867
|
//#region src/components/select/selectOptionsContainer/index.tsx
|
|
853
|
-
function
|
|
868
|
+
function st(e) {
|
|
854
869
|
let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
|
|
855
|
-
|
|
870
|
+
at(n), o(() => {
|
|
856
871
|
n && (() => {
|
|
857
872
|
if (!s.current) return;
|
|
858
873
|
let e = s.current.parentElement;
|
|
@@ -867,7 +882,7 @@ function at(e) {
|
|
|
867
882
|
return n ? /* @__PURE__ */ m("div", {
|
|
868
883
|
ref: s,
|
|
869
884
|
className: `arkynSelectOptionsContainer ${c}`,
|
|
870
|
-
children: [r && /* @__PURE__ */ p(
|
|
885
|
+
children: [r && /* @__PURE__ */ p(ot, {
|
|
871
886
|
type: "search",
|
|
872
887
|
name: "search-select",
|
|
873
888
|
variant: "underline",
|
|
@@ -879,7 +894,7 @@ function at(e) {
|
|
|
879
894
|
}
|
|
880
895
|
//#endregion
|
|
881
896
|
//#region src/components/select/selectOverlay/index.tsx
|
|
882
|
-
function
|
|
897
|
+
function ct(e) {
|
|
883
898
|
let { isFocused: t, handleBlur: n } = e;
|
|
884
899
|
return t ? /* @__PURE__ */ p("aside", {
|
|
885
900
|
className: "arkynSelectOverlay",
|
|
@@ -888,7 +903,7 @@ function ot(e) {
|
|
|
888
903
|
}
|
|
889
904
|
//#endregion
|
|
890
905
|
//#region src/components/select/selectSpinner/index.tsx
|
|
891
|
-
function
|
|
906
|
+
function lt(e) {
|
|
892
907
|
let { iconSize: t, isLoading: n } = e;
|
|
893
908
|
return n ? /* @__PURE__ */ p(L, {
|
|
894
909
|
className: "arkynSelectSpinner",
|
|
@@ -898,109 +913,108 @@ function st(e) {
|
|
|
898
913
|
}
|
|
899
914
|
//#endregion
|
|
900
915
|
//#region src/components/select/index.tsx
|
|
901
|
-
function
|
|
902
|
-
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !0, defaultValue: o = "", errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid" } = e, { fieldErrors:
|
|
916
|
+
function ut(e) {
|
|
917
|
+
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !0, defaultValue: o = "", errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", orientation: j = "horizontal", unShowFieldTemplate: M = !1 } = e, { fieldErrors: N } = X(), P = l(null), F = g || s(), I = c || N?.[t], L = !!I, R = E || d || f, z = {
|
|
903
918
|
md: 20,
|
|
904
919
|
lg: 20
|
|
905
|
-
}[O], [
|
|
906
|
-
function
|
|
907
|
-
return
|
|
920
|
+
}[O], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = k || W;
|
|
921
|
+
function q(e) {
|
|
922
|
+
return K === e;
|
|
908
923
|
}
|
|
909
924
|
function ee(e) {
|
|
910
925
|
return n.find((t) => t.value === e)?.label || "";
|
|
911
926
|
}
|
|
912
927
|
function te() {
|
|
913
|
-
|
|
928
|
+
R || !P?.current || H || (U(!0), P.current.focus(), T && T());
|
|
914
929
|
}
|
|
915
|
-
function
|
|
916
|
-
|
|
930
|
+
function J() {
|
|
931
|
+
U(!1), C && P.current && P.current.blur();
|
|
917
932
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
933
|
+
function ne(e) {
|
|
934
|
+
V(e), x && x(e);
|
|
920
935
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
936
|
+
function re(e) {
|
|
937
|
+
q(e) ? (G(""), S && S("")) : (G(e), S && S(e)), a && J();
|
|
923
938
|
}
|
|
924
|
-
let
|
|
925
|
-
return /* @__PURE__ */
|
|
939
|
+
let ie = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
|
|
940
|
+
return /* @__PURE__ */ p($, {
|
|
941
|
+
name: t,
|
|
942
|
+
label: _,
|
|
943
|
+
showAsterisk: y,
|
|
926
944
|
className: r,
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
/* @__PURE__ */
|
|
945
|
+
errorMessage: I,
|
|
946
|
+
unShowFieldTemplate: M,
|
|
947
|
+
orientation: j,
|
|
948
|
+
children: /* @__PURE__ */ m(tt, {
|
|
949
|
+
handleContainerFocus: te,
|
|
950
|
+
disabled: R,
|
|
951
|
+
isError: L,
|
|
952
|
+
isFocused: H,
|
|
953
|
+
isLoading: d,
|
|
954
|
+
readOnly: f,
|
|
955
|
+
size: O,
|
|
956
|
+
variant: A,
|
|
957
|
+
prefixExists: !!D,
|
|
958
|
+
id: F,
|
|
959
|
+
children: [
|
|
960
|
+
/* @__PURE__ */ p("input", {
|
|
961
|
+
ref: P,
|
|
962
|
+
name: t,
|
|
963
|
+
value: K,
|
|
964
|
+
type: "hidden"
|
|
965
|
+
}),
|
|
966
|
+
/* @__PURE__ */ p(Z, {
|
|
967
|
+
iconSize: z,
|
|
968
|
+
icon: D,
|
|
969
|
+
className: "prefix"
|
|
970
|
+
}),
|
|
971
|
+
b && /* @__PURE__ */ p(b, {
|
|
972
|
+
size: z,
|
|
973
|
+
strokeWidth: 2.5
|
|
974
|
+
}),
|
|
975
|
+
/* @__PURE__ */ m(nt, {
|
|
976
|
+
size: O,
|
|
977
|
+
children: [K !== "" && /* @__PURE__ */ p("p", {
|
|
978
|
+
className: "hasValue",
|
|
979
|
+
children: ee(K)
|
|
980
|
+
}), K === "" && /* @__PURE__ */ p("p", { children: i })]
|
|
981
|
+
}),
|
|
982
|
+
/* @__PURE__ */ m(st, {
|
|
983
|
+
isFocused: H,
|
|
984
|
+
isSearchable: h,
|
|
985
|
+
search: B,
|
|
986
|
+
onSearch: ne,
|
|
987
|
+
children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(rt, {
|
|
988
|
+
label: e,
|
|
989
|
+
value: t,
|
|
960
990
|
size: O,
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
readOnly: f,
|
|
983
|
-
iconSize: L,
|
|
984
|
-
isLoading: d
|
|
985
|
-
}),
|
|
986
|
-
/* @__PURE__ */ p(st, {
|
|
987
|
-
iconSize: L,
|
|
988
|
-
isLoading: d
|
|
989
|
-
}),
|
|
990
|
-
/* @__PURE__ */ p(ot, {
|
|
991
|
-
handleBlur: ne,
|
|
992
|
-
isFocused: B
|
|
993
|
-
})
|
|
994
|
-
]
|
|
995
|
-
}),
|
|
996
|
-
P && /* @__PURE__ */ p(Y, { children: P })
|
|
997
|
-
]
|
|
991
|
+
handleChangeValue: re,
|
|
992
|
+
optionHasSelected: q
|
|
993
|
+
}, t)), ie.length <= 0 && /* @__PURE__ */ p("p", { children: w })]
|
|
994
|
+
}),
|
|
995
|
+
/* @__PURE__ */ p(et, {
|
|
996
|
+
disabled: R,
|
|
997
|
+
isFocused: H,
|
|
998
|
+
readOnly: f,
|
|
999
|
+
iconSize: z,
|
|
1000
|
+
isLoading: d
|
|
1001
|
+
}),
|
|
1002
|
+
/* @__PURE__ */ p(lt, {
|
|
1003
|
+
iconSize: z,
|
|
1004
|
+
isLoading: d
|
|
1005
|
+
}),
|
|
1006
|
+
/* @__PURE__ */ p(ct, {
|
|
1007
|
+
handleBlur: J,
|
|
1008
|
+
isFocused: H
|
|
1009
|
+
})
|
|
1010
|
+
]
|
|
1011
|
+
})
|
|
998
1012
|
});
|
|
999
1013
|
}
|
|
1000
1014
|
//#endregion
|
|
1001
1015
|
//#region src/components/calendar/calendarHeader/index.tsx
|
|
1002
|
-
function
|
|
1003
|
-
let t =
|
|
1016
|
+
function dt({ basicMode: e }) {
|
|
1017
|
+
let t = Ze();
|
|
1004
1018
|
return e ? /* @__PURE__ */ m("div", {
|
|
1005
1019
|
className: "arkynCalendarHeader",
|
|
1006
1020
|
children: [
|
|
@@ -1026,14 +1040,14 @@ function lt({ basicMode: e }) {
|
|
|
1026
1040
|
className: "arkynCalendarButton",
|
|
1027
1041
|
onClick: () => t.nextMonth(),
|
|
1028
1042
|
children: /* @__PURE__ */ p(T, {})
|
|
1029
|
-
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(
|
|
1043
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(ut, {
|
|
1030
1044
|
name: "calendarMonth",
|
|
1031
1045
|
variant: "underline",
|
|
1032
1046
|
className: "calendarMonthSelect",
|
|
1033
1047
|
value: t.currentMonth,
|
|
1034
1048
|
options: t.listMonths,
|
|
1035
1049
|
onChange: (e) => t.changeMonth(+e)
|
|
1036
|
-
}), /* @__PURE__ */ p(
|
|
1050
|
+
}), /* @__PURE__ */ p(ut, {
|
|
1037
1051
|
name: "calendarYear",
|
|
1038
1052
|
variant: "underline",
|
|
1039
1053
|
className: "calendarYearSelect",
|
|
@@ -1045,8 +1059,8 @@ function lt({ basicMode: e }) {
|
|
|
1045
1059
|
}
|
|
1046
1060
|
//#endregion
|
|
1047
1061
|
//#region src/components/calendar/calendarTableTd/index.tsx
|
|
1048
|
-
function
|
|
1049
|
-
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } =
|
|
1062
|
+
function ft(e) {
|
|
1063
|
+
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } = Ze();
|
|
1050
1064
|
function s() {
|
|
1051
1065
|
let e = /* @__PURE__ */ new Date();
|
|
1052
1066
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
@@ -1062,15 +1076,15 @@ function ut(e) {
|
|
|
1062
1076
|
}
|
|
1063
1077
|
//#endregion
|
|
1064
1078
|
//#region src/components/calendar/calendarTableBody/index.tsx
|
|
1065
|
-
function
|
|
1079
|
+
function pt() {
|
|
1066
1080
|
return /* @__PURE__ */ p("tbody", {
|
|
1067
1081
|
className: "arkynCalendarTableBody",
|
|
1068
|
-
children:
|
|
1082
|
+
children: Ze().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p(ft, { ...e }, t)) }, t))
|
|
1069
1083
|
});
|
|
1070
1084
|
}
|
|
1071
1085
|
//#endregion
|
|
1072
1086
|
//#region src/components/calendar/calendarTableContainer/index.tsx
|
|
1073
|
-
function
|
|
1087
|
+
function mt({ children: e }) {
|
|
1074
1088
|
return /* @__PURE__ */ p("table", {
|
|
1075
1089
|
className: "arkynCalendarTableContainer",
|
|
1076
1090
|
children: e
|
|
@@ -1078,47 +1092,47 @@ function ft({ children: e }) {
|
|
|
1078
1092
|
}
|
|
1079
1093
|
//#endregion
|
|
1080
1094
|
//#region src/components/calendar/calendarTableHeader/index.tsx
|
|
1081
|
-
function
|
|
1082
|
-
let { listWeek: e } =
|
|
1095
|
+
function ht() {
|
|
1096
|
+
let { listWeek: e } = Ze();
|
|
1083
1097
|
return /* @__PURE__ */ p("thead", {
|
|
1084
1098
|
className: "arkynCalendarTableHeader",
|
|
1085
|
-
children: /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p("th", { children:
|
|
1099
|
+
children: /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p("th", { children: te(e) }, t)) })
|
|
1086
1100
|
});
|
|
1087
1101
|
}
|
|
1088
1102
|
//#endregion
|
|
1089
1103
|
//#region src/components/calendar/index.tsx
|
|
1090
|
-
function
|
|
1104
|
+
function gt(e) {
|
|
1091
1105
|
let t = e.variant || "complete";
|
|
1092
|
-
return e.type === "range" ? /* @__PURE__ */ p(
|
|
1106
|
+
return e.type === "range" ? /* @__PURE__ */ p(Qe, {
|
|
1093
1107
|
defaultValue: e.defaultValue,
|
|
1094
1108
|
calendarType: "range",
|
|
1095
1109
|
onChange: e.onChange,
|
|
1096
1110
|
onChangeView: e.onChangeView,
|
|
1097
|
-
children: /* @__PURE__ */ m(
|
|
1098
|
-
}) : /* @__PURE__ */ p(
|
|
1111
|
+
children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(dt, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(mt, { children: [/* @__PURE__ */ p(ht, {}), /* @__PURE__ */ p(pt, {})] })] })
|
|
1112
|
+
}) : /* @__PURE__ */ p(Qe, {
|
|
1099
1113
|
defaultValue: e.defaultValue,
|
|
1100
1114
|
calendarType: "single",
|
|
1101
1115
|
onChange: e.onChange,
|
|
1102
1116
|
onChangeView: e.onChangeView,
|
|
1103
|
-
children: /* @__PURE__ */ m(
|
|
1117
|
+
children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(dt, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(mt, { children: [/* @__PURE__ */ p(ht, {}), /* @__PURE__ */ p(pt, {})] })] })
|
|
1104
1118
|
});
|
|
1105
1119
|
}
|
|
1106
1120
|
//#endregion
|
|
1107
1121
|
//#region src/components/cardTab/cardTabContext.tsx
|
|
1108
|
-
var
|
|
1109
|
-
function
|
|
1110
|
-
return a(
|
|
1122
|
+
var _t = n({});
|
|
1123
|
+
function vt() {
|
|
1124
|
+
return a(_t);
|
|
1111
1125
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return /* @__PURE__ */ p(
|
|
1126
|
+
function yt(e) {
|
|
1127
|
+
return /* @__PURE__ */ p(_t.Provider, {
|
|
1114
1128
|
value: e,
|
|
1115
1129
|
children: e.children
|
|
1116
1130
|
});
|
|
1117
1131
|
}
|
|
1118
1132
|
//#endregion
|
|
1119
1133
|
//#region src/components/cardTab/cardTabButton/index.tsx
|
|
1120
|
-
function
|
|
1121
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
1134
|
+
function bt(e) {
|
|
1135
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = vt(), u = s || n, d = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
1122
1136
|
function f(e) {
|
|
1123
1137
|
l(a), i && i(e);
|
|
1124
1138
|
}
|
|
@@ -1133,12 +1147,12 @@ function vt(e) {
|
|
|
1133
1147
|
}
|
|
1134
1148
|
//#endregion
|
|
1135
1149
|
//#region src/components/cardTab/cardTabContainer/index.tsx
|
|
1136
|
-
function
|
|
1150
|
+
function xt(e) {
|
|
1137
1151
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynCardTabContainer ${a || ""}`;
|
|
1138
1152
|
function d(e) {
|
|
1139
1153
|
c(e), n && n(e);
|
|
1140
1154
|
}
|
|
1141
|
-
return /* @__PURE__ */ p(
|
|
1155
|
+
return /* @__PURE__ */ p(yt, {
|
|
1142
1156
|
disabled: i,
|
|
1143
1157
|
currentTab: s,
|
|
1144
1158
|
changeCurrentTab: d,
|
|
@@ -1151,193 +1165,187 @@ function yt(e) {
|
|
|
1151
1165
|
}
|
|
1152
1166
|
//#endregion
|
|
1153
1167
|
//#region src/components/checkbox/index.tsx
|
|
1154
|
-
function
|
|
1155
|
-
let { id: t, name: n, className: r = "", size: i = "md", errorMessage: a, defaultChecked: o = !1, label: c, checked: d = null, onCheck: f, orientation: h = "horizontalReverse",
|
|
1156
|
-
function
|
|
1157
|
-
let e =
|
|
1158
|
-
|
|
1168
|
+
function St(e) {
|
|
1169
|
+
let { id: t, name: n, className: r = "", size: i = "md", errorMessage: a, defaultChecked: o = !1, label: c, checked: d = null, onCheck: f, orientation: h = "horizontalReverse", showAsterisk: g, unShowFieldTemplate: _, value: v, ...y } = e, { fieldErrors: b } = X(), S = l(null), C = t || s(), w = a || b?.[n], T = !!w, [E, D] = u(o || !1), O = typeof d == "boolean" ? d : E, k = `arkynCheckbox ${i} ${T ? "errorTrue" : "errorFalse"} ${O ? "checkedTrue" : "checkedFalse"}`;
|
|
1170
|
+
function A() {
|
|
1171
|
+
let e = E;
|
|
1172
|
+
D(!e), f && f(e ? "" : v || "checked");
|
|
1159
1173
|
}
|
|
1160
|
-
return /* @__PURE__ */
|
|
1161
|
-
|
|
1174
|
+
return /* @__PURE__ */ p($, {
|
|
1175
|
+
name: n,
|
|
1176
|
+
label: c,
|
|
1177
|
+
showAsterisk: g,
|
|
1162
1178
|
className: r,
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
}), /* @__PURE__ */ p(x, {})]
|
|
1180
|
-
}),
|
|
1181
|
-
S && /* @__PURE__ */ p(Y, { children: S })
|
|
1182
|
-
]
|
|
1179
|
+
errorMessage: w,
|
|
1180
|
+
unShowFieldTemplate: _,
|
|
1181
|
+
orientation: h,
|
|
1182
|
+
children: /* @__PURE__ */ m("button", {
|
|
1183
|
+
id: C,
|
|
1184
|
+
type: "button",
|
|
1185
|
+
className: k,
|
|
1186
|
+
onClick: A,
|
|
1187
|
+
...y,
|
|
1188
|
+
children: [/* @__PURE__ */ p("input", {
|
|
1189
|
+
type: "hidden",
|
|
1190
|
+
name: n,
|
|
1191
|
+
ref: S,
|
|
1192
|
+
value: O ? v || "checked" : ""
|
|
1193
|
+
}), /* @__PURE__ */ p(x, {})]
|
|
1194
|
+
})
|
|
1183
1195
|
});
|
|
1184
1196
|
}
|
|
1185
1197
|
//#endregion
|
|
1186
1198
|
//#region src/hooks/useHydrated.ts
|
|
1187
|
-
function
|
|
1199
|
+
function Ct() {
|
|
1188
1200
|
return () => {};
|
|
1189
1201
|
}
|
|
1190
|
-
function
|
|
1191
|
-
return d(
|
|
1202
|
+
function wt() {
|
|
1203
|
+
return d(Ct, () => !0, () => !1);
|
|
1192
1204
|
}
|
|
1193
1205
|
//#endregion
|
|
1194
1206
|
//#region src/components/clientOnly.tsx
|
|
1195
|
-
function
|
|
1207
|
+
function Tt(e) {
|
|
1196
1208
|
let { children: t, fallback: n = null } = e;
|
|
1197
|
-
return
|
|
1209
|
+
return wt() ? /* @__PURE__ */ p(f, { children: t() }) : /* @__PURE__ */ p(f, { children: n });
|
|
1198
1210
|
}
|
|
1199
1211
|
//#endregion
|
|
1200
1212
|
//#region src/services/maskCurrencyValues.ts
|
|
1201
|
-
function
|
|
1213
|
+
function Et(e) {
|
|
1202
1214
|
let t = e;
|
|
1203
|
-
return typeof e == "string" ? (t = +
|
|
1215
|
+
return typeof e == "string" ? (t = +re(e), t % 1 != 0 && (t = t.toFixed(2))) : t = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), re(String(t)) / 10 ** 2;
|
|
1204
1216
|
}
|
|
1205
|
-
function
|
|
1206
|
-
if (!e) return [0,
|
|
1207
|
-
let n =
|
|
1208
|
-
return [n,
|
|
1217
|
+
function Dt(e, t) {
|
|
1218
|
+
if (!e) return [0, J(0, t)];
|
|
1219
|
+
let n = Et(e);
|
|
1220
|
+
return [n, J(n, t)];
|
|
1209
1221
|
}
|
|
1210
1222
|
//#endregion
|
|
1211
1223
|
//#region src/components/currencyInput/index.tsx
|
|
1212
|
-
function
|
|
1213
|
-
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: c, className: d = "", value: f, defaultValue: h, max: g = 1e9, locale: _, onChange: v, prefix: y, suffix: b, isLoading: x = !1, leftIcon: S, readOnly: C, onFocus: w, onBlur: T, errorMessage: E,
|
|
1224
|
+
function Ot(e) {
|
|
1225
|
+
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: c, className: d = "", value: f, defaultValue: h, max: g = 1e9, locale: _, onChange: v, prefix: y, suffix: b, isLoading: x = !1, leftIcon: S, readOnly: C, onFocus: w, onBlur: T, errorMessage: E, unShowFieldTemplate: D, orientation: O, showAsterisk: k, rightIcon: A, size: j = "md", id: M, ...N } = e, { fieldErrors: P } = X(), [F, I] = u(!1), [R, z] = u("0"), B = l(null), V = M || s(), H = E || P?.[t], U = !!H, W = n || x, G = {
|
|
1214
1226
|
md: 20,
|
|
1215
1227
|
lg: 20
|
|
1216
|
-
}[
|
|
1228
|
+
}[j], K = A ? "right" : "left", q = K === "left" && x, ee = K === "right" && x;
|
|
1217
1229
|
function te() {
|
|
1218
|
-
|
|
1230
|
+
W || !B?.current || (I(!0), B.current.focus());
|
|
1219
1231
|
}
|
|
1220
|
-
function
|
|
1221
|
-
|
|
1232
|
+
function J(e) {
|
|
1233
|
+
I(!0), w && w(e);
|
|
1222
1234
|
}
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1235
|
+
function ne(e) {
|
|
1236
|
+
I(!1), T && T(e);
|
|
1225
1237
|
}
|
|
1226
|
-
let
|
|
1227
|
-
let [t, n] =
|
|
1228
|
-
return !g || t <= g ? (
|
|
1229
|
-
}, q = (e) => {
|
|
1230
|
-
e.preventDefault();
|
|
1231
|
-
let [t, n] = K(e.target.value);
|
|
1232
|
-
v && v(e, String(t), String(n));
|
|
1238
|
+
let re = (e) => {
|
|
1239
|
+
let [t, n] = Dt(e, _);
|
|
1240
|
+
return !g || t <= g ? (z(n), [t, n]) : Dt(e, _);
|
|
1233
1241
|
};
|
|
1234
|
-
o(() => {
|
|
1242
|
+
return o(() => {
|
|
1235
1243
|
function e() {
|
|
1236
1244
|
if (typeof f == "number") return f;
|
|
1237
1245
|
if (typeof h == "number") return h;
|
|
1238
1246
|
}
|
|
1239
|
-
let [, t] =
|
|
1240
|
-
|
|
1247
|
+
let [, t] = Dt(e(), _);
|
|
1248
|
+
z(t);
|
|
1241
1249
|
}, [
|
|
1242
1250
|
_,
|
|
1243
1251
|
h,
|
|
1244
1252
|
f
|
|
1245
|
-
])
|
|
1246
|
-
|
|
1247
|
-
|
|
1253
|
+
]), /* @__PURE__ */ p($, {
|
|
1254
|
+
name: t,
|
|
1255
|
+
label: c,
|
|
1256
|
+
showAsterisk: k,
|
|
1248
1257
|
className: d,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
]
|
|
1258
|
+
errorMessage: H,
|
|
1259
|
+
unShowFieldTemplate: D,
|
|
1260
|
+
orientation: O,
|
|
1261
|
+
children: /* @__PURE__ */ m("section", {
|
|
1262
|
+
title: r,
|
|
1263
|
+
style: i,
|
|
1264
|
+
className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${W || C || x ? "opacity" : ""} ${U ? "errored" : ""} ${F ? "focused" : ""}`,
|
|
1265
|
+
onClick: te,
|
|
1266
|
+
children: [
|
|
1267
|
+
/* @__PURE__ */ p(Z, {
|
|
1268
|
+
iconSize: G,
|
|
1269
|
+
icon: y,
|
|
1270
|
+
className: "prefix"
|
|
1271
|
+
}),
|
|
1272
|
+
/* @__PURE__ */ p(Z, {
|
|
1273
|
+
show: q,
|
|
1274
|
+
iconSize: G,
|
|
1275
|
+
className: "spinner",
|
|
1276
|
+
icon: L
|
|
1277
|
+
}),
|
|
1278
|
+
/* @__PURE__ */ p(Z, {
|
|
1279
|
+
show: !x,
|
|
1280
|
+
icon: S,
|
|
1281
|
+
iconSize: G
|
|
1282
|
+
}),
|
|
1283
|
+
/* @__PURE__ */ p("input", {
|
|
1284
|
+
disabled: W,
|
|
1285
|
+
readOnly: C,
|
|
1286
|
+
ref: B,
|
|
1287
|
+
onFocus: J,
|
|
1288
|
+
onBlur: ne,
|
|
1289
|
+
onChange: (e) => {
|
|
1290
|
+
e.preventDefault();
|
|
1291
|
+
let [t, n] = re(e.target.value);
|
|
1292
|
+
v && v(e, String(t), String(n));
|
|
1293
|
+
},
|
|
1294
|
+
id: V,
|
|
1295
|
+
placeholder: W ? R : void 0,
|
|
1296
|
+
value: W ? void 0 : R,
|
|
1297
|
+
...N
|
|
1298
|
+
}),
|
|
1299
|
+
/* @__PURE__ */ p("input", {
|
|
1300
|
+
type: "hidden",
|
|
1301
|
+
name: t,
|
|
1302
|
+
value: Et(R),
|
|
1303
|
+
readOnly: !0
|
|
1304
|
+
}),
|
|
1305
|
+
/* @__PURE__ */ p(Z, {
|
|
1306
|
+
show: !x,
|
|
1307
|
+
icon: A,
|
|
1308
|
+
iconSize: G
|
|
1309
|
+
}),
|
|
1310
|
+
/* @__PURE__ */ p(Z, {
|
|
1311
|
+
show: ee,
|
|
1312
|
+
iconSize: G,
|
|
1313
|
+
className: "spinner",
|
|
1314
|
+
icon: L
|
|
1315
|
+
}),
|
|
1316
|
+
/* @__PURE__ */ p(Z, {
|
|
1317
|
+
iconSize: G,
|
|
1318
|
+
icon: b,
|
|
1319
|
+
className: "suffix"
|
|
1320
|
+
})
|
|
1321
|
+
]
|
|
1322
|
+
})
|
|
1315
1323
|
});
|
|
1316
1324
|
}
|
|
1317
1325
|
//#endregion
|
|
1318
1326
|
//#region src/components/drawer/drawerContext.tsx
|
|
1319
|
-
var
|
|
1320
|
-
function
|
|
1321
|
-
return /* @__PURE__ */ p(
|
|
1327
|
+
var kt = n({});
|
|
1328
|
+
function At(e) {
|
|
1329
|
+
return /* @__PURE__ */ p(kt.Provider, {
|
|
1322
1330
|
value: { makeInvisible: e.makeInvisible },
|
|
1323
1331
|
children: e.children
|
|
1324
1332
|
});
|
|
1325
1333
|
}
|
|
1326
|
-
function
|
|
1327
|
-
return a(
|
|
1334
|
+
function jt() {
|
|
1335
|
+
return a(kt);
|
|
1328
1336
|
}
|
|
1329
1337
|
//#endregion
|
|
1330
1338
|
//#region src/components/drawer/drawerContainer/index.tsx
|
|
1331
|
-
function
|
|
1339
|
+
function Mt(e) {
|
|
1332
1340
|
let { isVisible: t, makeInvisible: n, orientation: r = "left", children: i, className: a, ...o } = e;
|
|
1333
|
-
|
|
1341
|
+
at(t);
|
|
1334
1342
|
let s = r === "left" ? "-100%" : "100%", c = `arkynDrawerContainer ${r} ${t ? "visibleTrue" : "visibleFalse"} ${a}`;
|
|
1335
|
-
return /* @__PURE__ */ p(
|
|
1343
|
+
return /* @__PURE__ */ p(At, {
|
|
1336
1344
|
makeInvisible: n,
|
|
1337
|
-
children: /* @__PURE__ */ p(
|
|
1345
|
+
children: /* @__PURE__ */ p(ie, { children: t && /* @__PURE__ */ m("aside", {
|
|
1338
1346
|
className: c.trim(),
|
|
1339
1347
|
...o,
|
|
1340
|
-
children: [/* @__PURE__ */ p(
|
|
1348
|
+
children: [/* @__PURE__ */ p(Y.div, {
|
|
1341
1349
|
className: "arkynDrawerContainerOverlay",
|
|
1342
1350
|
transition: {
|
|
1343
1351
|
duration: .15,
|
|
@@ -1347,7 +1355,7 @@ function At(e) {
|
|
|
1347
1355
|
animate: { opacity: 1 },
|
|
1348
1356
|
exit: { opacity: 0 },
|
|
1349
1357
|
onClick: n
|
|
1350
|
-
}), /* @__PURE__ */ p(
|
|
1358
|
+
}), /* @__PURE__ */ p(Y.div, {
|
|
1351
1359
|
className: "arkynDrawerContainerContent",
|
|
1352
1360
|
transition: {
|
|
1353
1361
|
ease: "easeOut",
|
|
@@ -1363,8 +1371,8 @@ function At(e) {
|
|
|
1363
1371
|
}
|
|
1364
1372
|
//#endregion
|
|
1365
1373
|
//#region src/components/drawer/drawerHeader/index.tsx
|
|
1366
|
-
function
|
|
1367
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
1374
|
+
function Nt(e) {
|
|
1375
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = jt();
|
|
1368
1376
|
return /* @__PURE__ */ m("header", {
|
|
1369
1377
|
className: `arkynDrawerHeader ${n}`.trim(),
|
|
1370
1378
|
...i,
|
|
@@ -1373,13 +1381,13 @@ function jt(e) {
|
|
|
1373
1381
|
type: "button",
|
|
1374
1382
|
onClick: a,
|
|
1375
1383
|
"aria-label": "Close drawer",
|
|
1376
|
-
children: /* @__PURE__ */ p(
|
|
1384
|
+
children: /* @__PURE__ */ p(K, { size: 24 })
|
|
1377
1385
|
})]
|
|
1378
1386
|
});
|
|
1379
1387
|
}
|
|
1380
1388
|
//#endregion
|
|
1381
1389
|
//#region src/components/facebookPixel/pixel.ts
|
|
1382
|
-
var
|
|
1390
|
+
var Pt = class {
|
|
1383
1391
|
pixelId;
|
|
1384
1392
|
autoConfig;
|
|
1385
1393
|
initialized;
|
|
@@ -1426,18 +1434,18 @@ var Mt = class {
|
|
|
1426
1434
|
};
|
|
1427
1435
|
//#endregion
|
|
1428
1436
|
//#region src/components/facebookPixel/facebookPixel.client.tsx
|
|
1429
|
-
function
|
|
1430
|
-
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new
|
|
1437
|
+
function Ft(e) {
|
|
1438
|
+
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new Pt(t, n);
|
|
1431
1439
|
return u.init(), r && u.pageView(), c && u.grantConsent(), l && u.revokeConsent(), i && u.track(...i), a && u.trackCustom(...a), o && u.trackSingle(t, ...o), s && u.trackSingleCustom(t, ...s), /* @__PURE__ */ p(f, {});
|
|
1432
1440
|
}
|
|
1433
1441
|
//#endregion
|
|
1434
1442
|
//#region src/components/facebookPixel/index.tsx
|
|
1435
|
-
function
|
|
1436
|
-
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(
|
|
1443
|
+
function It(e) {
|
|
1444
|
+
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Tt, { children: () => /* @__PURE__ */ p(Ft, { ...e }) });
|
|
1437
1445
|
}
|
|
1438
1446
|
//#endregion
|
|
1439
1447
|
//#region src/components/fileUpload/hasFileContent/index.tsx
|
|
1440
|
-
function
|
|
1448
|
+
function Lt(e) {
|
|
1441
1449
|
let { disabled: t, file: n, isLoading: r, acceptFile: i, changeFileButtonText: a, handleSelectFile: o, reSendFile: s } = e;
|
|
1442
1450
|
function c() {
|
|
1443
1451
|
if (t) return;
|
|
@@ -1457,13 +1465,13 @@ function Ft(e) {
|
|
|
1457
1465
|
className: "arkynFileUploadFileContainer",
|
|
1458
1466
|
children: [/* @__PURE__ */ p(l, {}), /* @__PURE__ */ p("p", { children: n.name })]
|
|
1459
1467
|
}),
|
|
1460
|
-
/* @__PURE__ */ p(
|
|
1468
|
+
/* @__PURE__ */ p(He, {}),
|
|
1461
1469
|
/* @__PURE__ */ m("div", {
|
|
1462
1470
|
className: "arkynFileUploadButtonsContainer",
|
|
1463
|
-
children: [!!s && /* @__PURE__ */ p(
|
|
1471
|
+
children: [!!s && /* @__PURE__ */ p(We, {
|
|
1464
1472
|
orientation: "bottom",
|
|
1465
1473
|
text: "Reenviar arquivo",
|
|
1466
|
-
children: /* @__PURE__ */ p(
|
|
1474
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
1467
1475
|
type: "button",
|
|
1468
1476
|
"aria-label": "resend file",
|
|
1469
1477
|
variant: "outline",
|
|
@@ -1474,7 +1482,7 @@ function Ft(e) {
|
|
|
1474
1482
|
icon: H,
|
|
1475
1483
|
disabled: t
|
|
1476
1484
|
})
|
|
1477
|
-
}), /* @__PURE__ */ p(
|
|
1485
|
+
}), /* @__PURE__ */ p(Q, {
|
|
1478
1486
|
isLoading: r,
|
|
1479
1487
|
onClick: c,
|
|
1480
1488
|
variant: "outline",
|
|
@@ -1489,7 +1497,7 @@ function Ft(e) {
|
|
|
1489
1497
|
}
|
|
1490
1498
|
//#endregion
|
|
1491
1499
|
//#region src/components/fileUpload/noFileContent/index.tsx
|
|
1492
|
-
function
|
|
1500
|
+
function Rt(e) {
|
|
1493
1501
|
let { dropFileText: t, isLoading: n, acceptFile: r, handleSelectFile: i, selectFileButtonText: a, disabled: o } = e;
|
|
1494
1502
|
function s(e) {
|
|
1495
1503
|
if (o) return;
|
|
@@ -1508,7 +1516,7 @@ function It(e) {
|
|
|
1508
1516
|
return /* @__PURE__ */ m("div", {
|
|
1509
1517
|
onDrop: s,
|
|
1510
1518
|
className: "arkynFileUploadNoFileContent",
|
|
1511
|
-
children: [/* @__PURE__ */ p(
|
|
1519
|
+
children: [/* @__PURE__ */ p(Q, {
|
|
1512
1520
|
isLoading: n,
|
|
1513
1521
|
onClick: c,
|
|
1514
1522
|
variant: "ghost",
|
|
@@ -1521,8 +1529,8 @@ function It(e) {
|
|
|
1521
1529
|
}
|
|
1522
1530
|
//#endregion
|
|
1523
1531
|
//#region src/components/fileUpload/index.tsx
|
|
1524
|
-
function
|
|
1525
|
-
let { name: t, label: n, showAsterisk: r = !1, action: i, fileName: a = "file", method: o = "POST", acceptFile: s = "*", fileResponseName: c = "url", changeFileButtonText: l = "Alterar arquivo", selectFileButtonText: d = "Selecionar arquivo", dropFileText: f = "Ou arraste e solte o arquivo aqui", onChange: h, disabled: g = !1 } = e, { fieldErrors: _ } =
|
|
1532
|
+
function zt(e) {
|
|
1533
|
+
let { name: t, label: n, showAsterisk: r = !1, action: i, fileName: a = "file", method: o = "POST", acceptFile: s = "*", fileResponseName: c = "url", changeFileButtonText: l = "Alterar arquivo", selectFileButtonText: d = "Selecionar arquivo", dropFileText: f = "Ou arraste e solte o arquivo aqui", onChange: h, disabled: g = !1 } = e, { fieldErrors: _ } = X(), v = _?.[t], [y, b] = u(""), [x, S] = u(""), [C, w] = u(null), [T, E] = u(!1);
|
|
1526
1534
|
async function D(e) {
|
|
1527
1535
|
if (g) return;
|
|
1528
1536
|
E(!0), w(e), S("");
|
|
@@ -1540,8 +1548,8 @@ function Lt(e) {
|
|
|
1540
1548
|
g || D(e);
|
|
1541
1549
|
}
|
|
1542
1550
|
let k = v || x;
|
|
1543
|
-
return /* @__PURE__ */ m(
|
|
1544
|
-
n && /* @__PURE__ */ p(
|
|
1551
|
+
return /* @__PURE__ */ m(Ve, { children: [
|
|
1552
|
+
n && /* @__PURE__ */ p(Be, {
|
|
1545
1553
|
showAsterisk: r,
|
|
1546
1554
|
children: n
|
|
1547
1555
|
}),
|
|
@@ -1553,7 +1561,7 @@ function Lt(e) {
|
|
|
1553
1561
|
name: t,
|
|
1554
1562
|
value: y || ""
|
|
1555
1563
|
}),
|
|
1556
|
-
!C && /* @__PURE__ */ p(
|
|
1564
|
+
!C && /* @__PURE__ */ p(Rt, {
|
|
1557
1565
|
disabled: g,
|
|
1558
1566
|
isLoading: T,
|
|
1559
1567
|
acceptFile: s,
|
|
@@ -1561,7 +1569,7 @@ function Lt(e) {
|
|
|
1561
1569
|
handleSelectFile: O,
|
|
1562
1570
|
selectFileButtonText: d
|
|
1563
1571
|
}),
|
|
1564
|
-
C && /* @__PURE__ */ p(
|
|
1572
|
+
C && /* @__PURE__ */ p(Lt, {
|
|
1565
1573
|
disabled: g,
|
|
1566
1574
|
isLoading: T,
|
|
1567
1575
|
acceptFile: s,
|
|
@@ -1572,12 +1580,12 @@ function Lt(e) {
|
|
|
1572
1580
|
})
|
|
1573
1581
|
]
|
|
1574
1582
|
}),
|
|
1575
|
-
k && /* @__PURE__ */ p(
|
|
1583
|
+
k && /* @__PURE__ */ p(ze, { children: k })
|
|
1576
1584
|
] });
|
|
1577
1585
|
}
|
|
1578
1586
|
//#endregion
|
|
1579
1587
|
//#region src/components/googleAnalytics/snippets/generateGAElements.ts
|
|
1580
|
-
function
|
|
1588
|
+
function Bt(e) {
|
|
1581
1589
|
let { measurementId: t } = e;
|
|
1582
1590
|
return t || console.warn("Google Analytics Measurement ID is required"), {
|
|
1583
1591
|
src: `https://www.googletagmanager.com/gtag/js?id=${t}`,
|
|
@@ -1590,7 +1598,7 @@ function Rt(e) {
|
|
|
1590
1598
|
}
|
|
1591
1599
|
//#endregion
|
|
1592
1600
|
//#region src/components/googleAnalytics/googleAnalytics.tsx
|
|
1593
|
-
var
|
|
1601
|
+
var Vt = class {
|
|
1594
1602
|
initializeAsyncScript(e) {
|
|
1595
1603
|
let t = document.createElement("script");
|
|
1596
1604
|
return t.async = !0, t.src = e, t;
|
|
@@ -1600,24 +1608,24 @@ var zt = class {
|
|
|
1600
1608
|
return t.innerHTML = e, t;
|
|
1601
1609
|
}
|
|
1602
1610
|
initialize(e) {
|
|
1603
|
-
let { measurementId: t } = e, n =
|
|
1611
|
+
let { measurementId: t } = e, n = Bt({ measurementId: t }), r = this.initializeAsyncScript(n.src), i = this.initializeInlineScript(n.script);
|
|
1604
1612
|
document.head.appendChild(r), document.head.appendChild(i);
|
|
1605
1613
|
}
|
|
1606
1614
|
};
|
|
1607
1615
|
//#endregion
|
|
1608
1616
|
//#region src/components/googleAnalytics/googleAnalytics.client.tsx
|
|
1609
|
-
function
|
|
1610
|
-
return new
|
|
1617
|
+
function Ht(e) {
|
|
1618
|
+
return new Vt().initialize(e), /* @__PURE__ */ p(f, {});
|
|
1611
1619
|
}
|
|
1612
1620
|
//#endregion
|
|
1613
1621
|
//#region src/components/googleAnalytics/index.tsx
|
|
1614
|
-
function
|
|
1622
|
+
function Ut(e) {
|
|
1615
1623
|
let { measurementId: t, showInDevMode: n = !1 } = e;
|
|
1616
|
-
return process.env.NODE_ENV !== "production" && !n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(
|
|
1624
|
+
return process.env.NODE_ENV !== "production" && !n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Tt, { children: () => /* @__PURE__ */ p(Ht, { measurementId: t }) });
|
|
1617
1625
|
}
|
|
1618
1626
|
//#endregion
|
|
1619
1627
|
//#region src/components/googleTagManager/snippets/appendToDataLayer.ts
|
|
1620
|
-
function
|
|
1628
|
+
function Wt(e) {
|
|
1621
1629
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
1622
1630
|
return `
|
|
1623
1631
|
window.${n} = window.${n} || [];
|
|
@@ -1625,7 +1633,7 @@ function Ht(e) {
|
|
|
1625
1633
|
}
|
|
1626
1634
|
//#endregion
|
|
1627
1635
|
//#region src/components/googleTagManager/snippets/generateGTMElements.ts
|
|
1628
|
-
function
|
|
1636
|
+
function Gt(e) {
|
|
1629
1637
|
let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `>m_auth=${o}`, c = `>m_preview=${a}`;
|
|
1630
1638
|
return t || console.warn("GTM Id is required"), {
|
|
1631
1639
|
iframe: `
|
|
@@ -1638,7 +1646,7 @@ function Ut(e) {
|
|
|
1638
1646
|
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${s}${c}>m_cookies_win=x';
|
|
1639
1647
|
f.parentNode.insertBefore(j,f);
|
|
1640
1648
|
})(window,document,'script','${i}','${t}');`,
|
|
1641
|
-
dataLayerVar:
|
|
1649
|
+
dataLayerVar: Wt({
|
|
1642
1650
|
dataLayer: r,
|
|
1643
1651
|
dataLayerName: i
|
|
1644
1652
|
})
|
|
@@ -1646,13 +1654,13 @@ function Ut(e) {
|
|
|
1646
1654
|
}
|
|
1647
1655
|
//#endregion
|
|
1648
1656
|
//#region src/components/googleTagManager/googleTagManager.tsx
|
|
1649
|
-
var
|
|
1657
|
+
var Kt = class {
|
|
1650
1658
|
initializeDataScript(e) {
|
|
1651
1659
|
let t = document.createElement("script");
|
|
1652
1660
|
return t.innerHTML = e, t;
|
|
1653
1661
|
}
|
|
1654
1662
|
initializeGTMElements(e) {
|
|
1655
|
-
let t =
|
|
1663
|
+
let t = Gt(e);
|
|
1656
1664
|
return {
|
|
1657
1665
|
noScript: () => {
|
|
1658
1666
|
let e = document.createElement("noscript");
|
|
@@ -1668,7 +1676,7 @@ var Wt = class {
|
|
|
1668
1676
|
initializeDataLayer(e) {
|
|
1669
1677
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
1670
1678
|
if (window[n]) return window[n].push(t);
|
|
1671
|
-
let r =
|
|
1679
|
+
let r = Wt({
|
|
1672
1680
|
dataLayer: t,
|
|
1673
1681
|
dataLayerName: n
|
|
1674
1682
|
}), i = this.initializeDataScript(r);
|
|
@@ -1688,14 +1696,14 @@ var Wt = class {
|
|
|
1688
1696
|
};
|
|
1689
1697
|
//#endregion
|
|
1690
1698
|
//#region src/components/googleTagManager/googleTagManager.client.tsx
|
|
1691
|
-
function
|
|
1692
|
-
return new
|
|
1699
|
+
function qt(e) {
|
|
1700
|
+
return new Kt().initialize(e), /* @__PURE__ */ p(f, {});
|
|
1693
1701
|
}
|
|
1694
1702
|
//#endregion
|
|
1695
1703
|
//#region src/components/googleTagManager/index.tsx
|
|
1696
|
-
function
|
|
1704
|
+
function Jt(e) {
|
|
1697
1705
|
let { gtmId: t, auth: n = "", preview: r = "", dataLayerName: i = "dataLayer", events: a = {}, dataLayer: o = {}, showInDevMode: s = !1 } = e;
|
|
1698
|
-
return process.env.NODE_ENV !== "production" && !s ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(
|
|
1706
|
+
return process.env.NODE_ENV !== "production" && !s ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Tt, { children: () => /* @__PURE__ */ p(qt, {
|
|
1699
1707
|
auth: n,
|
|
1700
1708
|
dataLayer: o,
|
|
1701
1709
|
dataLayerName: i,
|
|
@@ -1706,7 +1714,7 @@ function Kt(e) {
|
|
|
1706
1714
|
}
|
|
1707
1715
|
//#endregion
|
|
1708
1716
|
//#region src/components/imageUpload/hasFileContent/index.tsx
|
|
1709
|
-
function
|
|
1717
|
+
function Yt(e) {
|
|
1710
1718
|
let { disabled: t, filePath: n, isLoading: r, acceptImage: i, changeImageButtonText: a, handleSelectFile: o, reSendImage: s } = e;
|
|
1711
1719
|
function c() {
|
|
1712
1720
|
if (t) return;
|
|
@@ -1719,10 +1727,10 @@ function qt(e) {
|
|
|
1719
1727
|
return /* @__PURE__ */ m("div", {
|
|
1720
1728
|
className: "arkynImageUploadHasFileContent",
|
|
1721
1729
|
style: { backgroundImage: `url("${n}")` },
|
|
1722
|
-
children: [s && /* @__PURE__ */ p(
|
|
1730
|
+
children: [s && /* @__PURE__ */ p(We, {
|
|
1723
1731
|
orientation: "bottom",
|
|
1724
1732
|
text: "Reenviar imagem",
|
|
1725
|
-
children: /* @__PURE__ */ p(
|
|
1733
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
1726
1734
|
type: "button",
|
|
1727
1735
|
"aria-label": "resend image",
|
|
1728
1736
|
variant: "outline",
|
|
@@ -1733,7 +1741,7 @@ function qt(e) {
|
|
|
1733
1741
|
icon: H,
|
|
1734
1742
|
disabled: t
|
|
1735
1743
|
})
|
|
1736
|
-
}), /* @__PURE__ */ p(
|
|
1744
|
+
}), /* @__PURE__ */ p(Q, {
|
|
1737
1745
|
isLoading: r,
|
|
1738
1746
|
onClick: c,
|
|
1739
1747
|
variant: "outline",
|
|
@@ -1746,7 +1754,7 @@ function qt(e) {
|
|
|
1746
1754
|
}
|
|
1747
1755
|
//#endregion
|
|
1748
1756
|
//#region src/components/imageUpload/noFileContent/index.tsx
|
|
1749
|
-
function
|
|
1757
|
+
function Xt(e) {
|
|
1750
1758
|
let { dropImageText: t, isLoading: n, acceptImage: r, handleSelectFile: i, selectImageButtonText: a, disabled: o } = e;
|
|
1751
1759
|
function s(e) {
|
|
1752
1760
|
if (o) return;
|
|
@@ -1765,7 +1773,7 @@ function Jt(e) {
|
|
|
1765
1773
|
return /* @__PURE__ */ m("div", {
|
|
1766
1774
|
onDrop: s,
|
|
1767
1775
|
className: "arkynImageUploadNoFileContent",
|
|
1768
|
-
children: [/* @__PURE__ */ p(
|
|
1776
|
+
children: [/* @__PURE__ */ p(Q, {
|
|
1769
1777
|
isLoading: n,
|
|
1770
1778
|
onClick: c,
|
|
1771
1779
|
variant: "ghost",
|
|
@@ -1778,68 +1786,67 @@ function Jt(e) {
|
|
|
1778
1786
|
}
|
|
1779
1787
|
//#endregion
|
|
1780
1788
|
//#region src/components/imageUpload/index.tsx
|
|
1781
|
-
function
|
|
1782
|
-
let { name: t, defaultValue: n = "", label: r, showAsterisk: i = !1, action: a, fileName: o = "file", className: s = "", method: c = "POST", acceptImage: l = "image/*", fileResponseName: d = "url", changeImageButtonText: f = "Alterar imagem", selectImageButtonText: h = "Selecionar imagem", dropImageText: g = "Ou arraste e solte a imagem aqui", onChange: _, disabled: v = !1 } = e, { fieldErrors:
|
|
1783
|
-
async function
|
|
1789
|
+
function Zt(e) {
|
|
1790
|
+
let { name: t, defaultValue: n = "", label: r, showAsterisk: i = !1, action: a, fileName: o = "file", className: s = "", method: c = "POST", acceptImage: l = "image/*", fileResponseName: d = "url", changeImageButtonText: f = "Alterar imagem", selectImageButtonText: h = "Selecionar imagem", dropImageText: g = "Ou arraste e solte a imagem aqui", onChange: _, disabled: v = !1, unShowFieldTemplate: y = !1, orientation: b = "horizontal" } = e, { fieldErrors: x } = X(), S = x?.[t], [C, w] = u(n), [T, E] = u(""), [D, O] = u(null), [k, A] = u(n), [j, M] = u(!1);
|
|
1791
|
+
async function N(e) {
|
|
1784
1792
|
if (v) return;
|
|
1785
|
-
|
|
1793
|
+
M(!0), O(e), E("");
|
|
1786
1794
|
let t = new FormData();
|
|
1787
1795
|
t.append(o, e), await fetch(a, {
|
|
1788
1796
|
method: c,
|
|
1789
1797
|
body: t
|
|
1790
1798
|
}).then(async (e) => await e.json()).then((e) => {
|
|
1791
|
-
e?.error ?
|
|
1799
|
+
e?.error ? E(e.error) : w(e?.[d]), _ && _(e?.[d]);
|
|
1792
1800
|
}).catch((e) => {
|
|
1793
|
-
console.error(e),
|
|
1794
|
-
}).finally(() =>
|
|
1801
|
+
console.error(e), E("Erro ao enviar imagem");
|
|
1802
|
+
}).finally(() => M(!1));
|
|
1795
1803
|
}
|
|
1796
|
-
function
|
|
1797
|
-
v || (
|
|
1804
|
+
function P(e) {
|
|
1805
|
+
v || (A(URL.createObjectURL(e)), N(e));
|
|
1798
1806
|
}
|
|
1799
|
-
let
|
|
1800
|
-
return /* @__PURE__ */
|
|
1807
|
+
let F = S || T;
|
|
1808
|
+
return /* @__PURE__ */ p($, {
|
|
1809
|
+
name: t,
|
|
1810
|
+
label: r,
|
|
1811
|
+
showAsterisk: i,
|
|
1801
1812
|
className: s,
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
]
|
|
1833
|
-
}),
|
|
1834
|
-
N && /* @__PURE__ */ p(Y, { children: N })
|
|
1835
|
-
]
|
|
1813
|
+
errorMessage: F,
|
|
1814
|
+
unShowFieldTemplate: y,
|
|
1815
|
+
orientation: b,
|
|
1816
|
+
children: /* @__PURE__ */ m("div", {
|
|
1817
|
+
className: `arkynImageUpload ${F ? "hasError" : "noHasError"} ${k ? "hasImage" : "noHasImage"}`,
|
|
1818
|
+
children: [
|
|
1819
|
+
/* @__PURE__ */ p("input", {
|
|
1820
|
+
type: "hidden",
|
|
1821
|
+
name: t,
|
|
1822
|
+
value: C || ""
|
|
1823
|
+
}),
|
|
1824
|
+
!k && /* @__PURE__ */ p(Xt, {
|
|
1825
|
+
disabled: v,
|
|
1826
|
+
isLoading: j,
|
|
1827
|
+
acceptImage: l,
|
|
1828
|
+
dropImageText: g,
|
|
1829
|
+
handleSelectFile: P,
|
|
1830
|
+
selectImageButtonText: h
|
|
1831
|
+
}),
|
|
1832
|
+
k && /* @__PURE__ */ p(Yt, {
|
|
1833
|
+
disabled: v,
|
|
1834
|
+
isLoading: j,
|
|
1835
|
+
acceptImage: l,
|
|
1836
|
+
filePath: k,
|
|
1837
|
+
handleSelectFile: P,
|
|
1838
|
+
changeImageButtonText: f,
|
|
1839
|
+
reSendImage: F && D ? () => N(D) : void 0
|
|
1840
|
+
})
|
|
1841
|
+
]
|
|
1842
|
+
})
|
|
1836
1843
|
});
|
|
1837
1844
|
}
|
|
1838
1845
|
//#endregion
|
|
1839
1846
|
//#region src/components/mapView/mapView.client.tsx
|
|
1840
|
-
function
|
|
1847
|
+
function Qt({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i }) {
|
|
1841
1848
|
let a = l(null), s = l(null), c = e || t[0];
|
|
1842
|
-
return o(() => (
|
|
1849
|
+
return o(() => (ae.accessToken = r, a.current = new ae.Map({
|
|
1843
1850
|
container: s.current,
|
|
1844
1851
|
style: "mapbox://styles/mapbox/light-v11",
|
|
1845
1852
|
center: [c.lng, c.lat],
|
|
@@ -1848,11 +1855,11 @@ function Xt({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
1848
1855
|
}), t.forEach((e) => {
|
|
1849
1856
|
let { lat: t, lng: r, popUp: i } = e, o = document.createElement("img");
|
|
1850
1857
|
o.className = "arkynMarker", o.src = "https://i.postimg.cc/mgKggjk7/Pin.png";
|
|
1851
|
-
let s = new
|
|
1858
|
+
let s = new ae.Marker(o).setLngLat([r, t]).addTo(a.current);
|
|
1852
1859
|
if (i) {
|
|
1853
1860
|
let e = document.createElement("div");
|
|
1854
|
-
|
|
1855
|
-
let t = new
|
|
1861
|
+
oe(e).render(i);
|
|
1862
|
+
let t = new ae.Popup({
|
|
1856
1863
|
offset: 25,
|
|
1857
1864
|
closeButton: !1,
|
|
1858
1865
|
className: "arkynMapViewPopup"
|
|
@@ -1881,19 +1888,19 @@ function Xt({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
1881
1888
|
}
|
|
1882
1889
|
//#endregion
|
|
1883
1890
|
//#region src/components/mapView/index.tsx
|
|
1884
|
-
function
|
|
1891
|
+
function $t({ className: e }) {
|
|
1885
1892
|
return /* @__PURE__ */ p("div", {
|
|
1886
1893
|
className: "arkynMapViewPinnedEmpty " + e,
|
|
1887
1894
|
children: /* @__PURE__ */ p(R, {})
|
|
1888
1895
|
});
|
|
1889
1896
|
}
|
|
1890
|
-
function
|
|
1897
|
+
function en(e) {
|
|
1891
1898
|
let { coordinates: t, zoom: n = 18, accessToken: r, className: i, onMarkerClick: a, ...o } = e;
|
|
1892
|
-
if (!t) return /* @__PURE__ */ p(
|
|
1899
|
+
if (!t) return /* @__PURE__ */ p($t, { className: i });
|
|
1893
1900
|
let s = Array.isArray(t) ? t : [t];
|
|
1894
|
-
return s.length === 0 ? /* @__PURE__ */ p(
|
|
1895
|
-
fallback: /* @__PURE__ */ p(
|
|
1896
|
-
children: () => /* @__PURE__ */ p(
|
|
1901
|
+
return s.length === 0 ? /* @__PURE__ */ p($t, { className: i }) : /* @__PURE__ */ p(Tt, {
|
|
1902
|
+
fallback: /* @__PURE__ */ p($t, { className: i }),
|
|
1903
|
+
children: () => /* @__PURE__ */ p(Qt, {
|
|
1897
1904
|
accessToken: r,
|
|
1898
1905
|
coordinates: s,
|
|
1899
1906
|
center: s[0],
|
|
@@ -1904,29 +1911,29 @@ function Qt(e) {
|
|
|
1904
1911
|
}
|
|
1905
1912
|
//#endregion
|
|
1906
1913
|
//#region src/components/maskedInput/index.tsx
|
|
1907
|
-
var
|
|
1914
|
+
var tn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
1908
1915
|
ref: t,
|
|
1909
1916
|
...e
|
|
1910
1917
|
}));
|
|
1911
|
-
function
|
|
1912
|
-
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", separate: o, mask: c, showMask: d, replacement: f, label: h, className: g = "", prefix: _, suffix: v, isLoading: y = !1, leftIcon: b, readOnly: x, onFocus: S, onBlur: C, errorMessage: w, defaultValue: T, showAsterisk: E, rightIcon: D, size: O = "md", id: k, value: A, placeholder: j, ...M } = e, { fieldErrors: N } =
|
|
1918
|
+
function nn(e) {
|
|
1919
|
+
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", separate: o, mask: c, showMask: d, replacement: f, label: h, className: g = "", prefix: _, suffix: v, isLoading: y = !1, leftIcon: b, readOnly: x, onFocus: S, onBlur: C, errorMessage: w, defaultValue: T, showAsterisk: E, rightIcon: D, size: O = "md", id: k, value: A, placeholder: j, ...M } = e, { fieldErrors: N } = X(), [P, F] = u(!1), I = l(null), R = k || s(), z = w || N?.[t], B = !!z, V = n || y, H = {
|
|
1913
1920
|
md: 20,
|
|
1914
1921
|
lg: 20
|
|
1915
1922
|
}[O], U = D ? "right" : "left", W = U === "left" && y, G = U === "right" && y;
|
|
1916
|
-
function
|
|
1923
|
+
function K() {
|
|
1917
1924
|
V || !I?.current || (F(!0), I.current.focus());
|
|
1918
1925
|
}
|
|
1919
|
-
function
|
|
1926
|
+
function q(e) {
|
|
1920
1927
|
F(!0), S && S(e);
|
|
1921
1928
|
}
|
|
1922
|
-
function
|
|
1929
|
+
function ee(e) {
|
|
1923
1930
|
F(!1), C && C(e);
|
|
1924
1931
|
}
|
|
1925
|
-
let
|
|
1926
|
-
return /* @__PURE__ */ m(
|
|
1932
|
+
let te = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${V || x || y ? "opacity" : ""} ${B ? "errored" : ""} ${P ? "focused" : ""}`;
|
|
1933
|
+
return /* @__PURE__ */ m(Ve, {
|
|
1927
1934
|
className: g,
|
|
1928
1935
|
children: [
|
|
1929
|
-
h && /* @__PURE__ */ p(
|
|
1936
|
+
h && /* @__PURE__ */ p(Be, {
|
|
1930
1937
|
showAsterisk: E,
|
|
1931
1938
|
htmlFor: R,
|
|
1932
1939
|
children: h
|
|
@@ -1934,34 +1941,34 @@ function en(e) {
|
|
|
1934
1941
|
/* @__PURE__ */ m("section", {
|
|
1935
1942
|
title: r,
|
|
1936
1943
|
style: i,
|
|
1937
|
-
onClick:
|
|
1938
|
-
className:
|
|
1944
|
+
onClick: K,
|
|
1945
|
+
className: te,
|
|
1939
1946
|
children: [
|
|
1940
|
-
/* @__PURE__ */ p(
|
|
1947
|
+
/* @__PURE__ */ p(Z, {
|
|
1941
1948
|
iconSize: H,
|
|
1942
1949
|
icon: _,
|
|
1943
1950
|
className: "prefix"
|
|
1944
1951
|
}),
|
|
1945
|
-
/* @__PURE__ */ p(
|
|
1952
|
+
/* @__PURE__ */ p(Z, {
|
|
1946
1953
|
show: W,
|
|
1947
1954
|
iconSize: H,
|
|
1948
1955
|
className: "spinner",
|
|
1949
1956
|
icon: L
|
|
1950
1957
|
}),
|
|
1951
|
-
/* @__PURE__ */ p(
|
|
1958
|
+
/* @__PURE__ */ p(Z, {
|
|
1952
1959
|
show: !y,
|
|
1953
1960
|
icon: b,
|
|
1954
1961
|
iconSize: H
|
|
1955
1962
|
}),
|
|
1956
|
-
/* @__PURE__ */ p(
|
|
1957
|
-
component:
|
|
1963
|
+
/* @__PURE__ */ p(se, {
|
|
1964
|
+
component: tn,
|
|
1958
1965
|
mask: c,
|
|
1959
1966
|
replacement: f,
|
|
1960
1967
|
separate: o,
|
|
1961
1968
|
showMask: d,
|
|
1962
1969
|
ref: I,
|
|
1963
|
-
onFocus:
|
|
1964
|
-
onBlur:
|
|
1970
|
+
onFocus: q,
|
|
1971
|
+
onBlur: ee,
|
|
1965
1972
|
disabled: V,
|
|
1966
1973
|
readOnly: x,
|
|
1967
1974
|
id: R,
|
|
@@ -1971,52 +1978,52 @@ function en(e) {
|
|
|
1971
1978
|
value: V ? void 0 : A,
|
|
1972
1979
|
...M
|
|
1973
1980
|
}),
|
|
1974
|
-
/* @__PURE__ */ p(
|
|
1981
|
+
/* @__PURE__ */ p(Z, {
|
|
1975
1982
|
show: !y,
|
|
1976
1983
|
icon: D,
|
|
1977
1984
|
iconSize: H
|
|
1978
1985
|
}),
|
|
1979
|
-
/* @__PURE__ */ p(
|
|
1986
|
+
/* @__PURE__ */ p(Z, {
|
|
1980
1987
|
show: G,
|
|
1981
1988
|
iconSize: H,
|
|
1982
1989
|
className: "spinner",
|
|
1983
1990
|
icon: L
|
|
1984
1991
|
}),
|
|
1985
|
-
/* @__PURE__ */ p(
|
|
1992
|
+
/* @__PURE__ */ p(Z, {
|
|
1986
1993
|
iconSize: H,
|
|
1987
1994
|
icon: v,
|
|
1988
1995
|
className: "suffix"
|
|
1989
1996
|
})
|
|
1990
1997
|
]
|
|
1991
1998
|
}),
|
|
1992
|
-
z && /* @__PURE__ */ p(
|
|
1999
|
+
z && /* @__PURE__ */ p(ze, { children: z })
|
|
1993
2000
|
]
|
|
1994
2001
|
});
|
|
1995
2002
|
}
|
|
1996
2003
|
//#endregion
|
|
1997
2004
|
//#region src/components/modal/modalContext.tsx
|
|
1998
|
-
var
|
|
1999
|
-
function
|
|
2000
|
-
return /* @__PURE__ */ p(
|
|
2005
|
+
var rn = n({});
|
|
2006
|
+
function an(e) {
|
|
2007
|
+
return /* @__PURE__ */ p(rn.Provider, {
|
|
2001
2008
|
value: { makeInvisible: e.makeInvisible },
|
|
2002
2009
|
children: e.children
|
|
2003
2010
|
});
|
|
2004
2011
|
}
|
|
2005
|
-
function
|
|
2006
|
-
return a(
|
|
2012
|
+
function on() {
|
|
2013
|
+
return a(rn);
|
|
2007
2014
|
}
|
|
2008
2015
|
//#endregion
|
|
2009
2016
|
//#region src/components/modal/modalContainer/index.tsx
|
|
2010
|
-
function
|
|
2017
|
+
function sn(e) {
|
|
2011
2018
|
let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e;
|
|
2012
|
-
|
|
2019
|
+
at(t);
|
|
2013
2020
|
let o = `arkynModalContainer ${t ? "visibleTrue" : "visibleFalse"} ${i}`;
|
|
2014
|
-
return /* @__PURE__ */ p(
|
|
2021
|
+
return /* @__PURE__ */ p(an, {
|
|
2015
2022
|
makeInvisible: n,
|
|
2016
|
-
children: /* @__PURE__ */ p(
|
|
2023
|
+
children: /* @__PURE__ */ p(ie, { children: t && /* @__PURE__ */ m("aside", {
|
|
2017
2024
|
className: o.trim(),
|
|
2018
2025
|
...a,
|
|
2019
|
-
children: [/* @__PURE__ */ p(
|
|
2026
|
+
children: [/* @__PURE__ */ p(Y.div, {
|
|
2020
2027
|
className: "arkynModalContainerOverlay",
|
|
2021
2028
|
transition: {
|
|
2022
2029
|
duration: .15,
|
|
@@ -2026,7 +2033,7 @@ function an(e) {
|
|
|
2026
2033
|
animate: { opacity: 1 },
|
|
2027
2034
|
exit: { opacity: 0 },
|
|
2028
2035
|
onClick: n
|
|
2029
|
-
}), /* @__PURE__ */ p(
|
|
2036
|
+
}), /* @__PURE__ */ p(Y.div, {
|
|
2030
2037
|
className: "arkynModalContainerContent",
|
|
2031
2038
|
transition: {
|
|
2032
2039
|
duration: .15,
|
|
@@ -2051,7 +2058,7 @@ function an(e) {
|
|
|
2051
2058
|
}
|
|
2052
2059
|
//#endregion
|
|
2053
2060
|
//#region src/components/modal/modalFooter/index.tsx
|
|
2054
|
-
function
|
|
2061
|
+
function cn(e) {
|
|
2055
2062
|
let { alignment: t = "right", className: n, ...r } = e;
|
|
2056
2063
|
return /* @__PURE__ */ p("footer", {
|
|
2057
2064
|
className: `arkynModalFooter ${t} ${n}`.trim(),
|
|
@@ -2060,8 +2067,8 @@ function on(e) {
|
|
|
2060
2067
|
}
|
|
2061
2068
|
//#endregion
|
|
2062
2069
|
//#region src/components/modal/modalHeader/index.tsx
|
|
2063
|
-
function
|
|
2064
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
2070
|
+
function ln(e) {
|
|
2071
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = on();
|
|
2065
2072
|
return /* @__PURE__ */ m("header", {
|
|
2066
2073
|
className: `arkynModalHeader ${n}`.trim(),
|
|
2067
2074
|
...i,
|
|
@@ -2070,13 +2077,13 @@ function sn(e) {
|
|
|
2070
2077
|
onClick: a,
|
|
2071
2078
|
"aria-label": "Close modal button",
|
|
2072
2079
|
className: "arkynModalHeaderCloseButton",
|
|
2073
|
-
children: /* @__PURE__ */ p(
|
|
2080
|
+
children: /* @__PURE__ */ p(K, { size: 24 })
|
|
2074
2081
|
})]
|
|
2075
2082
|
});
|
|
2076
2083
|
}
|
|
2077
2084
|
//#endregion
|
|
2078
2085
|
//#region src/components/multiSelect/multiSelectChevron/index.tsx
|
|
2079
|
-
function
|
|
2086
|
+
function un(e) {
|
|
2080
2087
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
2081
2088
|
return n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(C, {
|
|
2082
2089
|
className: `arkynMultiSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -2091,7 +2098,7 @@ function cn(e) {
|
|
|
2091
2098
|
}
|
|
2092
2099
|
//#endregion
|
|
2093
2100
|
//#region src/components/multiSelect/multiSelectContainer/index.tsx
|
|
2094
|
-
function
|
|
2101
|
+
function dn(e) {
|
|
2095
2102
|
let { children: t, handleContainerFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s, readOnly: c, variant: l, size: u, id: d, prefixExists: f } = e;
|
|
2096
2103
|
return /* @__PURE__ */ p("section", {
|
|
2097
2104
|
id: d,
|
|
@@ -2102,7 +2109,7 @@ function ln(e) {
|
|
|
2102
2109
|
}
|
|
2103
2110
|
//#endregion
|
|
2104
2111
|
//#region src/components/multiSelect/multiSelectContent/index.tsx
|
|
2105
|
-
function
|
|
2112
|
+
function fn(e) {
|
|
2106
2113
|
let { children: t, size: n } = e;
|
|
2107
2114
|
return /* @__PURE__ */ p("div", {
|
|
2108
2115
|
className: `arkynMultiSelectContent ${n}`,
|
|
@@ -2111,7 +2118,7 @@ function un(e) {
|
|
|
2111
2118
|
}
|
|
2112
2119
|
//#endregion
|
|
2113
2120
|
//#region src/components/multiSelect/multiSelectMark/index.tsx
|
|
2114
|
-
function
|
|
2121
|
+
function pn(e) {
|
|
2115
2122
|
let { label: t, value: n, disabled: r, handleChangeValue: i } = e;
|
|
2116
2123
|
return /* @__PURE__ */ m("div", {
|
|
2117
2124
|
className: "arkynMultiSelectMark",
|
|
@@ -2121,13 +2128,13 @@ function dn(e) {
|
|
|
2121
2128
|
onClick: (e) => {
|
|
2122
2129
|
e.stopPropagation(), i(n);
|
|
2123
2130
|
},
|
|
2124
|
-
children: /* @__PURE__ */ p(
|
|
2131
|
+
children: /* @__PURE__ */ p(K, {})
|
|
2125
2132
|
})]
|
|
2126
2133
|
});
|
|
2127
2134
|
}
|
|
2128
2135
|
//#endregion
|
|
2129
2136
|
//#region src/components/multiSelect/multiSelectOption/index.tsx
|
|
2130
|
-
function
|
|
2137
|
+
function mn(e) {
|
|
2131
2138
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
2132
2139
|
return /* @__PURE__ */ m("div", {
|
|
2133
2140
|
onClick: () => r(i),
|
|
@@ -2141,9 +2148,9 @@ function fn(e) {
|
|
|
2141
2148
|
}
|
|
2142
2149
|
//#endregion
|
|
2143
2150
|
//#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
|
|
2144
|
-
function
|
|
2151
|
+
function hn(e) {
|
|
2145
2152
|
let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
|
|
2146
|
-
|
|
2153
|
+
at(n), o(() => {
|
|
2147
2154
|
n && (() => {
|
|
2148
2155
|
if (!s.current) return;
|
|
2149
2156
|
let e = s.current.parentElement;
|
|
@@ -2158,7 +2165,7 @@ function pn(e) {
|
|
|
2158
2165
|
return n ? /* @__PURE__ */ m("div", {
|
|
2159
2166
|
ref: s,
|
|
2160
2167
|
className: `arkynMultiSelectOptionsContainer ${c}`,
|
|
2161
|
-
children: [r && /* @__PURE__ */ p(
|
|
2168
|
+
children: [r && /* @__PURE__ */ p(ot, {
|
|
2162
2169
|
type: "search",
|
|
2163
2170
|
name: "search-select",
|
|
2164
2171
|
variant: "underline",
|
|
@@ -2170,7 +2177,7 @@ function pn(e) {
|
|
|
2170
2177
|
}
|
|
2171
2178
|
//#endregion
|
|
2172
2179
|
//#region src/components/multiSelect/multiSelectOverlay/index.tsx
|
|
2173
|
-
function
|
|
2180
|
+
function gn(e) {
|
|
2174
2181
|
let { isFocused: t, handleBlur: n } = e;
|
|
2175
2182
|
return t ? /* @__PURE__ */ p("aside", {
|
|
2176
2183
|
className: "arkynMultiSelectOverlay",
|
|
@@ -2179,7 +2186,7 @@ function mn(e) {
|
|
|
2179
2186
|
}
|
|
2180
2187
|
//#endregion
|
|
2181
2188
|
//#region src/components/multiSelect/multiSelectSpinner/index.tsx
|
|
2182
|
-
function
|
|
2189
|
+
function _n(e) {
|
|
2183
2190
|
let { iconSize: t, isLoading: n } = e;
|
|
2184
2191
|
return n ? /* @__PURE__ */ p(L, {
|
|
2185
2192
|
className: "arkynMultiSelectSpinner",
|
|
@@ -2189,110 +2196,109 @@ function hn(e) {
|
|
|
2189
2196
|
}
|
|
2190
2197
|
//#endregion
|
|
2191
2198
|
//#region src/components/multiSelect/index.tsx
|
|
2192
|
-
function
|
|
2193
|
-
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !1, defaultValue: o = [], errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid" } = e, { fieldErrors:
|
|
2199
|
+
function vn(e) {
|
|
2200
|
+
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !1, defaultValue: o = [], errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", unShowFieldTemplate: j = !1, orientation: M = "horizontal" } = e, { fieldErrors: N } = X(), P = l(null), F = g || s(), I = c || N?.[t], L = !!I, R = E || d || f, z = {
|
|
2194
2201
|
md: 20,
|
|
2195
2202
|
lg: 20
|
|
2196
|
-
}[O], [
|
|
2197
|
-
function
|
|
2198
|
-
return
|
|
2203
|
+
}[O], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = k || W;
|
|
2204
|
+
function q(e) {
|
|
2205
|
+
return K.includes(e);
|
|
2199
2206
|
}
|
|
2200
2207
|
function ee(e) {
|
|
2201
2208
|
return n.find((t) => t.value === e)?.label || "";
|
|
2202
2209
|
}
|
|
2203
2210
|
function te() {
|
|
2204
|
-
|
|
2211
|
+
R || !P?.current || H || (U(!0), P.current.focus(), T && T());
|
|
2205
2212
|
}
|
|
2206
|
-
function
|
|
2207
|
-
|
|
2213
|
+
function J() {
|
|
2214
|
+
U(!1), C && P.current && P.current.blur();
|
|
2208
2215
|
}
|
|
2209
|
-
function
|
|
2210
|
-
|
|
2216
|
+
function ne(e) {
|
|
2217
|
+
V(e), x && x(e);
|
|
2211
2218
|
}
|
|
2212
|
-
function
|
|
2213
|
-
|
|
2219
|
+
function re(e) {
|
|
2220
|
+
q(e) ? (G(W.filter((t) => t !== e)), S && S(W.filter((t) => t !== e))) : (G([...W, e]), S && S([...W, e])), a && J();
|
|
2214
2221
|
}
|
|
2215
|
-
let
|
|
2216
|
-
return /* @__PURE__ */
|
|
2222
|
+
let ie = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
|
|
2223
|
+
return /* @__PURE__ */ p($, {
|
|
2224
|
+
name: t,
|
|
2225
|
+
label: _,
|
|
2226
|
+
showAsterisk: y,
|
|
2217
2227
|
className: r,
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
/* @__PURE__ */
|
|
2228
|
+
errorMessage: I,
|
|
2229
|
+
unShowFieldTemplate: j,
|
|
2230
|
+
orientation: M,
|
|
2231
|
+
children: /* @__PURE__ */ m(dn, {
|
|
2232
|
+
handleContainerFocus: te,
|
|
2233
|
+
disabled: R,
|
|
2234
|
+
isError: L,
|
|
2235
|
+
isFocused: H,
|
|
2236
|
+
isLoading: d,
|
|
2237
|
+
readOnly: f,
|
|
2238
|
+
size: O,
|
|
2239
|
+
variant: A,
|
|
2240
|
+
prefixExists: !!D,
|
|
2241
|
+
id: F,
|
|
2242
|
+
children: [
|
|
2243
|
+
/* @__PURE__ */ p("input", {
|
|
2244
|
+
ref: P,
|
|
2245
|
+
name: t,
|
|
2246
|
+
value: JSON.stringify(K),
|
|
2247
|
+
type: "hidden"
|
|
2248
|
+
}),
|
|
2249
|
+
/* @__PURE__ */ p(Z, {
|
|
2250
|
+
iconSize: z,
|
|
2251
|
+
icon: D,
|
|
2252
|
+
className: "prefix"
|
|
2253
|
+
}),
|
|
2254
|
+
b && /* @__PURE__ */ p(b, {
|
|
2255
|
+
size: z,
|
|
2256
|
+
strokeWidth: 2.5
|
|
2257
|
+
}),
|
|
2258
|
+
/* @__PURE__ */ m(fn, {
|
|
2259
|
+
size: O,
|
|
2260
|
+
children: [K.map((e) => /* @__PURE__ */ p(pn, {
|
|
2261
|
+
label: ee(e),
|
|
2262
|
+
value: e,
|
|
2263
|
+
handleChangeValue: re,
|
|
2264
|
+
disabled: R
|
|
2265
|
+
}, e)), K.length <= 0 && /* @__PURE__ */ p("p", { children: i })]
|
|
2266
|
+
}),
|
|
2267
|
+
/* @__PURE__ */ m(hn, {
|
|
2268
|
+
isFocused: H,
|
|
2269
|
+
isSearchable: h,
|
|
2270
|
+
search: B,
|
|
2271
|
+
onSearch: ne,
|
|
2272
|
+
children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(mn, {
|
|
2273
|
+
label: e,
|
|
2274
|
+
value: t,
|
|
2251
2275
|
size: O,
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
disabled: I,
|
|
2274
|
-
isFocused: B,
|
|
2275
|
-
readOnly: f,
|
|
2276
|
-
iconSize: L,
|
|
2277
|
-
isLoading: d
|
|
2278
|
-
}),
|
|
2279
|
-
/* @__PURE__ */ p(hn, {
|
|
2280
|
-
iconSize: L,
|
|
2281
|
-
isLoading: d
|
|
2282
|
-
}),
|
|
2283
|
-
/* @__PURE__ */ p(mn, {
|
|
2284
|
-
handleBlur: ne,
|
|
2285
|
-
isFocused: B
|
|
2286
|
-
})
|
|
2287
|
-
]
|
|
2288
|
-
}),
|
|
2289
|
-
P && /* @__PURE__ */ p(Y, { children: P })
|
|
2290
|
-
]
|
|
2276
|
+
handleChangeValue: re,
|
|
2277
|
+
optionHasSelected: q
|
|
2278
|
+
}, t)), ie.length <= 0 && /* @__PURE__ */ p("p", { children: w })]
|
|
2279
|
+
}),
|
|
2280
|
+
/* @__PURE__ */ p(un, {
|
|
2281
|
+
disabled: R,
|
|
2282
|
+
isFocused: H,
|
|
2283
|
+
readOnly: f,
|
|
2284
|
+
iconSize: z,
|
|
2285
|
+
isLoading: d
|
|
2286
|
+
}),
|
|
2287
|
+
/* @__PURE__ */ p(_n, {
|
|
2288
|
+
iconSize: z,
|
|
2289
|
+
isLoading: d
|
|
2290
|
+
}),
|
|
2291
|
+
/* @__PURE__ */ p(gn, {
|
|
2292
|
+
handleBlur: J,
|
|
2293
|
+
isFocused: H
|
|
2294
|
+
})
|
|
2295
|
+
]
|
|
2296
|
+
})
|
|
2291
2297
|
});
|
|
2292
2298
|
}
|
|
2293
2299
|
//#endregion
|
|
2294
2300
|
//#region src/components/pagination/chevronButton/index.tsx
|
|
2295
|
-
function
|
|
2301
|
+
function yn(e) {
|
|
2296
2302
|
let { orientation: t, handlePageChange: n, disabled: r } = e;
|
|
2297
2303
|
return /* @__PURE__ */ p("button", {
|
|
2298
2304
|
className: "arkynChevronPageButton",
|
|
@@ -2306,7 +2312,7 @@ function _n(e) {
|
|
|
2306
2312
|
}
|
|
2307
2313
|
//#endregion
|
|
2308
2314
|
//#region src/components/pagination/currentButton/index.tsx
|
|
2309
|
-
function
|
|
2315
|
+
function bn({ currentPage: e }) {
|
|
2310
2316
|
return /* @__PURE__ */ p("button", {
|
|
2311
2317
|
className: "arkynPaginationCurrentButton",
|
|
2312
2318
|
disabled: !0,
|
|
@@ -2315,7 +2321,7 @@ function vn({ currentPage: e }) {
|
|
|
2315
2321
|
}
|
|
2316
2322
|
//#endregion
|
|
2317
2323
|
//#region src/components/pagination/pageButton/index.tsx
|
|
2318
|
-
function
|
|
2324
|
+
function xn(e) {
|
|
2319
2325
|
let { page: t, handlePageChange: n } = e;
|
|
2320
2326
|
return /* @__PURE__ */ p("button", {
|
|
2321
2327
|
className: "arkynPaginationPageButton",
|
|
@@ -2325,7 +2331,7 @@ function yn(e) {
|
|
|
2325
2331
|
}
|
|
2326
2332
|
//#endregion
|
|
2327
2333
|
//#region src/components/pagination/paginationService.ts
|
|
2328
|
-
var
|
|
2334
|
+
var Sn = class {
|
|
2329
2335
|
currentPage;
|
|
2330
2336
|
totalCountRegisters;
|
|
2331
2337
|
registerPerPage;
|
|
@@ -2358,7 +2364,7 @@ var bn = class {
|
|
|
2358
2364
|
};
|
|
2359
2365
|
//#endregion
|
|
2360
2366
|
//#region src/components/pagination/spread/index.tsx
|
|
2361
|
-
function
|
|
2367
|
+
function Cn() {
|
|
2362
2368
|
return /* @__PURE__ */ p("p", {
|
|
2363
2369
|
className: "arkynPaginationSpread",
|
|
2364
2370
|
children: /* @__PURE__ */ p(D, {})
|
|
@@ -2366,8 +2372,8 @@ function xn() {
|
|
|
2366
2372
|
}
|
|
2367
2373
|
//#endregion
|
|
2368
2374
|
//#region src/components/pagination/index.tsx
|
|
2369
|
-
function
|
|
2370
|
-
let { totalCountRegisters: t, siblingsCount: n, currentPage: r, registerPerPage: i, onChange: a, ...o } = e, { currentPage: s, siblingsCount: c, previousPages: l, nextPages: u, lastPage: d, handlePageChange: h, handleMinusChange: g, handlePlusChange: _ } = new
|
|
2375
|
+
function wn(e) {
|
|
2376
|
+
let { totalCountRegisters: t, siblingsCount: n, currentPage: r, registerPerPage: i, onChange: a, ...o } = e, { currentPage: s, siblingsCount: c, previousPages: l, nextPages: u, lastPage: d, handlePageChange: h, handleMinusChange: g, handlePlusChange: _ } = new Sn({
|
|
2371
2377
|
totalCountRegisters: t,
|
|
2372
2378
|
currentPage: r,
|
|
2373
2379
|
registerPerPage: i,
|
|
@@ -2378,29 +2384,29 @@ function Sn(e) {
|
|
|
2378
2384
|
className: "arkynPagination",
|
|
2379
2385
|
...o,
|
|
2380
2386
|
children: [
|
|
2381
|
-
/* @__PURE__ */ p(
|
|
2387
|
+
/* @__PURE__ */ p(yn, {
|
|
2382
2388
|
orientation: "left",
|
|
2383
2389
|
handlePageChange: g,
|
|
2384
2390
|
disabled: s <= 1
|
|
2385
2391
|
}),
|
|
2386
|
-
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2392
|
+
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(xn, {
|
|
2387
2393
|
page: 1,
|
|
2388
2394
|
handlePageChange: () => h(1)
|
|
2389
|
-
}), s > 2 + c && /* @__PURE__ */ p(
|
|
2390
|
-
l.map((e, t) => /* @__PURE__ */ p(
|
|
2395
|
+
}), s > 2 + c && /* @__PURE__ */ p(Cn, {})] }),
|
|
2396
|
+
l.map((e, t) => /* @__PURE__ */ p(xn, {
|
|
2391
2397
|
page: e,
|
|
2392
2398
|
handlePageChange: g
|
|
2393
2399
|
}, t)),
|
|
2394
|
-
/* @__PURE__ */ p(
|
|
2395
|
-
u.map((e, t) => /* @__PURE__ */ p(
|
|
2400
|
+
/* @__PURE__ */ p(bn, { currentPage: s }),
|
|
2401
|
+
u.map((e, t) => /* @__PURE__ */ p(xn, {
|
|
2396
2402
|
page: e,
|
|
2397
2403
|
handlePageChange: _
|
|
2398
2404
|
}, t)),
|
|
2399
|
-
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(
|
|
2405
|
+
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(Cn, {}), /* @__PURE__ */ p(xn, {
|
|
2400
2406
|
page: d,
|
|
2401
2407
|
handlePageChange: () => h(d)
|
|
2402
2408
|
})] }),
|
|
2403
|
-
/* @__PURE__ */ p(
|
|
2409
|
+
/* @__PURE__ */ p(yn, {
|
|
2404
2410
|
orientation: "right",
|
|
2405
2411
|
handlePageChange: _,
|
|
2406
2412
|
disabled: s >= d
|
|
@@ -2410,7 +2416,7 @@ function Sn(e) {
|
|
|
2410
2416
|
}
|
|
2411
2417
|
//#endregion
|
|
2412
2418
|
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
2413
|
-
function
|
|
2419
|
+
function Tn(e) {
|
|
2414
2420
|
let { children: t, onFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s = "", readOnly: c, variant: l, size: u } = e;
|
|
2415
2421
|
return /* @__PURE__ */ p("section", {
|
|
2416
2422
|
className: `arkynPhoneInputContainer ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`.trim(),
|
|
@@ -2420,7 +2426,7 @@ function Cn(e) {
|
|
|
2420
2426
|
}
|
|
2421
2427
|
//#endregion
|
|
2422
2428
|
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
2423
|
-
function
|
|
2429
|
+
function En(e) {
|
|
2424
2430
|
let { isOpen: t, onClick: n } = e;
|
|
2425
2431
|
return t ? /* @__PURE__ */ p("aside", {
|
|
2426
2432
|
className: "arkynPhoneInputCountriesOverlay",
|
|
@@ -2429,7 +2435,7 @@ function wn(e) {
|
|
|
2429
2435
|
}
|
|
2430
2436
|
//#endregion
|
|
2431
2437
|
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
2432
|
-
function
|
|
2438
|
+
function Dn(e) {
|
|
2433
2439
|
let { country: t, isActive: n, handleChangeValue: r, size: i } = e;
|
|
2434
2440
|
return /* @__PURE__ */ m("div", {
|
|
2435
2441
|
onClick: () => r(t),
|
|
@@ -2449,12 +2455,12 @@ function Tn(e) {
|
|
|
2449
2455
|
}
|
|
2450
2456
|
//#endregion
|
|
2451
2457
|
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
2452
|
-
function
|
|
2458
|
+
function On(e) {
|
|
2453
2459
|
let { children: t, isOpen: n, onSearch: r, search: i, placeholder: a } = e, s = l(null), [c, d] = u("bottom");
|
|
2454
2460
|
function h(e) {
|
|
2455
2461
|
r(e.target.value);
|
|
2456
2462
|
}
|
|
2457
|
-
return
|
|
2463
|
+
return at(n), o(() => {
|
|
2458
2464
|
n && (() => {
|
|
2459
2465
|
if (!s.current) return;
|
|
2460
2466
|
let e = s.current.parentElement;
|
|
@@ -2478,7 +2484,7 @@ function En(e) {
|
|
|
2478
2484
|
}
|
|
2479
2485
|
//#endregion
|
|
2480
2486
|
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
2481
|
-
function
|
|
2487
|
+
function kn(e) {
|
|
2482
2488
|
let { currentCountry: t, onClick: n } = e;
|
|
2483
2489
|
return /* @__PURE__ */ m("div", {
|
|
2484
2490
|
className: "phoneInputSelectCountry",
|
|
@@ -2493,20 +2499,20 @@ function Dn(e) {
|
|
|
2493
2499
|
className: "chevronDown",
|
|
2494
2500
|
strokeWidth: 2.5
|
|
2495
2501
|
}),
|
|
2496
|
-
/* @__PURE__ */ p(
|
|
2502
|
+
/* @__PURE__ */ p(He, { orientation: "vertical" })
|
|
2497
2503
|
]
|
|
2498
2504
|
});
|
|
2499
2505
|
}
|
|
2500
2506
|
//#endregion
|
|
2501
2507
|
//#region src/utils/phoneInputUtilities.ts
|
|
2502
|
-
function
|
|
2508
|
+
function An(e) {
|
|
2503
2509
|
return e && e.replace(/[^0-9]/g, "");
|
|
2504
2510
|
}
|
|
2505
|
-
var
|
|
2511
|
+
var jn = {
|
|
2506
2512
|
EIGHT: "(99) 9999-9999",
|
|
2507
2513
|
NINE: "(99) 99999-9999"
|
|
2508
2514
|
};
|
|
2509
|
-
function
|
|
2515
|
+
function Mn(e, t) {
|
|
2510
2516
|
let n = "", r = 0;
|
|
2511
2517
|
for (let i = 0; i < t.length; i++) if (t[i] === "9") if (r < e.length) n += e[r], r++;
|
|
2512
2518
|
else break;
|
|
@@ -2514,21 +2520,21 @@ function An(e, t) {
|
|
|
2514
2520
|
else break;
|
|
2515
2521
|
return n;
|
|
2516
2522
|
}
|
|
2517
|
-
function
|
|
2523
|
+
function Nn(e) {
|
|
2518
2524
|
return e.length > 10 ? "NINE" : "EIGHT";
|
|
2519
2525
|
}
|
|
2520
|
-
var
|
|
2526
|
+
var Pn = An(jn.NINE).length, Fn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
2521
2527
|
ref: t,
|
|
2522
2528
|
...e
|
|
2523
|
-
})),
|
|
2529
|
+
})), In = r((e, t) => {
|
|
2524
2530
|
let { onFocus: n, readonly: r, onBlur: i, size: a, onChange: s, value: c, currentCountry: l, disabled: d, id: f } = e, [m, h] = u(!1), g = typeof l.mask == "string" ? l.mask : l.mask[0];
|
|
2525
2531
|
o(() => {
|
|
2526
2532
|
m ? s(g) : h(!0);
|
|
2527
2533
|
}, [l]);
|
|
2528
2534
|
let _ = `phoneInputMask ${a}`;
|
|
2529
2535
|
function v(e) {
|
|
2530
|
-
let t =
|
|
2531
|
-
t.length >
|
|
2536
|
+
let t = An(e.target.value), n = Nn(t);
|
|
2537
|
+
t.length > Pn || (t = Mn(t, jn[n]), e.target.value = t, s(t));
|
|
2532
2538
|
}
|
|
2533
2539
|
return l.code === "+55" ? /* @__PURE__ */ p("input", {
|
|
2534
2540
|
id: f,
|
|
@@ -2539,13 +2545,13 @@ var Mn = On(kn.NINE).length, Nn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
2539
2545
|
onBlur: i,
|
|
2540
2546
|
disabled: d,
|
|
2541
2547
|
ref: t
|
|
2542
|
-
}) : /* @__PURE__ */ p(
|
|
2548
|
+
}) : /* @__PURE__ */ p(se, {
|
|
2543
2549
|
id: f,
|
|
2544
2550
|
value: c,
|
|
2545
2551
|
readOnly: r,
|
|
2546
2552
|
onChange: (e) => s(e.target.value),
|
|
2547
2553
|
className: _,
|
|
2548
|
-
component:
|
|
2554
|
+
component: Fn,
|
|
2549
2555
|
onFocus: n,
|
|
2550
2556
|
onBlur: i,
|
|
2551
2557
|
disabled: d,
|
|
@@ -2557,110 +2563,108 @@ var Mn = On(kn.NINE).length, Nn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
2557
2563
|
});
|
|
2558
2564
|
//#endregion
|
|
2559
2565
|
//#region src/components/phoneInput/index.tsx
|
|
2560
|
-
function
|
|
2561
|
-
let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S } = e,
|
|
2562
|
-
function
|
|
2563
|
-
|
|
2564
|
-
}
|
|
2565
|
-
function G() {
|
|
2566
|
-
j(!0), D(!0);
|
|
2566
|
+
function Ln(e) {
|
|
2567
|
+
let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S, unShowFieldTemplate: C = !1, orientation: w = "horizontal" } = e, T = ce.find((e) => e.iso === "BR"), E = h ? ne(h) : "", D = h ? ee(h)[1] : T, [O, k] = u(!1), [A, j] = u(""), [M, N] = u(!1), [P, F] = u(E), I = n === void 0 ? P : n, [L, R] = u(D), { fieldErrors: z } = X(), B = l(null), V = S || s(), H = o || z?.[v], U = !!H, W = a || c, G = l(null);
|
|
2568
|
+
function K() {
|
|
2569
|
+
W || O || M || (k(!0), G.current && G.current.focus());
|
|
2567
2570
|
}
|
|
2568
|
-
function
|
|
2569
|
-
|
|
2571
|
+
function q() {
|
|
2572
|
+
N(!0), k(!0);
|
|
2570
2573
|
}
|
|
2571
2574
|
function te() {
|
|
2572
|
-
|
|
2575
|
+
N(!1), k(!1);
|
|
2573
2576
|
}
|
|
2574
|
-
function
|
|
2575
|
-
|
|
2577
|
+
function J() {
|
|
2578
|
+
k(!0);
|
|
2576
2579
|
}
|
|
2577
|
-
function
|
|
2578
|
-
|
|
2580
|
+
function ie() {
|
|
2581
|
+
k(!1);
|
|
2582
|
+
}
|
|
2583
|
+
function Y(e) {
|
|
2584
|
+
return e.name.toLowerCase().includes(A.toLowerCase());
|
|
2579
2585
|
}
|
|
2580
2586
|
function ae(e) {
|
|
2581
|
-
let t =
|
|
2582
|
-
return t +=
|
|
2587
|
+
let t = L.code;
|
|
2588
|
+
return t += re(e || I), t;
|
|
2583
2589
|
}
|
|
2584
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ p($, {
|
|
2591
|
+
name: v,
|
|
2592
|
+
label: r,
|
|
2593
|
+
showAsterisk: _,
|
|
2585
2594
|
className: i,
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2595
|
+
errorMessage: H,
|
|
2596
|
+
unShowFieldTemplate: C,
|
|
2597
|
+
orientation: w,
|
|
2598
|
+
children: /* @__PURE__ */ m(Tn, {
|
|
2599
|
+
disabled: W,
|
|
2600
|
+
isError: U,
|
|
2601
|
+
isLoading: c,
|
|
2602
|
+
isFocused: O,
|
|
2603
|
+
readOnly: d,
|
|
2604
|
+
size: f,
|
|
2605
|
+
variant: g,
|
|
2606
|
+
onFocus: K,
|
|
2607
|
+
children: [
|
|
2608
|
+
/* @__PURE__ */ p(kn, {
|
|
2609
|
+
currentCountry: L,
|
|
2610
|
+
onClick: q,
|
|
2611
|
+
size: f
|
|
2612
|
+
}),
|
|
2613
|
+
/* @__PURE__ */ m(On, {
|
|
2614
|
+
isOpen: W || d ? !1 : M,
|
|
2615
|
+
search: A,
|
|
2616
|
+
placeholder: b,
|
|
2617
|
+
onSearch: j,
|
|
2618
|
+
children: [ce.filter((e) => Y(e)).map((e) => /* @__PURE__ */ p(Dn, {
|
|
2619
|
+
country: e,
|
|
2620
|
+
handleChangeValue: () => {
|
|
2621
|
+
R(e), N(!1), F("");
|
|
2622
|
+
},
|
|
2623
|
+
isActive: e.iso === L.iso,
|
|
2605
2624
|
size: f
|
|
2606
|
-
}),
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
size: f,
|
|
2635
|
-
onChange: (e) => {
|
|
2636
|
-
N(e), y && y(ae(e));
|
|
2637
|
-
}
|
|
2638
|
-
}),
|
|
2639
|
-
/* @__PURE__ */ p("input", {
|
|
2640
|
-
ref: R,
|
|
2641
|
-
type: "hidden",
|
|
2642
|
-
name: v,
|
|
2643
|
-
value: ae()
|
|
2644
|
-
})
|
|
2645
|
-
]
|
|
2646
|
-
}),
|
|
2647
|
-
B && /* @__PURE__ */ p(Y, { children: B })
|
|
2648
|
-
]
|
|
2625
|
+
}, e.iso)), ce.filter((e) => Y(e)).length === 0 && /* @__PURE__ */ p("p", { children: x })]
|
|
2626
|
+
}),
|
|
2627
|
+
/* @__PURE__ */ p(En, {
|
|
2628
|
+
isOpen: W || d ? !1 : M,
|
|
2629
|
+
onClick: te
|
|
2630
|
+
}),
|
|
2631
|
+
/* @__PURE__ */ p(In, {
|
|
2632
|
+
id: V,
|
|
2633
|
+
ref: G,
|
|
2634
|
+
readonly: d,
|
|
2635
|
+
currentCountry: L,
|
|
2636
|
+
value: I,
|
|
2637
|
+
disabled: W,
|
|
2638
|
+
onBlur: ie,
|
|
2639
|
+
onFocus: J,
|
|
2640
|
+
size: f,
|
|
2641
|
+
onChange: (e) => {
|
|
2642
|
+
F(e), y && y(ae(e));
|
|
2643
|
+
}
|
|
2644
|
+
}),
|
|
2645
|
+
/* @__PURE__ */ p("input", {
|
|
2646
|
+
ref: B,
|
|
2647
|
+
type: "hidden",
|
|
2648
|
+
name: v,
|
|
2649
|
+
value: ae()
|
|
2650
|
+
})
|
|
2651
|
+
]
|
|
2652
|
+
})
|
|
2649
2653
|
});
|
|
2650
2654
|
}
|
|
2651
2655
|
//#endregion
|
|
2652
2656
|
//#region src/components/popover/index.tsx
|
|
2653
|
-
function
|
|
2657
|
+
function Rn(e) {
|
|
2654
2658
|
let { children: t, button: n, closeOnClick: r, className: i = "", orientation: a = "bottomLeft" } = e, [o, s] = u(!1), c = `arkynPopover ${a} ${o ? "visibleTrue" : "visibleFalse"} ${i}`;
|
|
2655
2659
|
function l() {
|
|
2656
2660
|
o || s(!0);
|
|
2657
2661
|
}
|
|
2658
|
-
return
|
|
2662
|
+
return at(o), /* @__PURE__ */ m("div", {
|
|
2659
2663
|
className: c,
|
|
2660
2664
|
onClick: l,
|
|
2661
2665
|
children: [
|
|
2662
2666
|
n,
|
|
2663
|
-
/* @__PURE__ */ p(
|
|
2667
|
+
/* @__PURE__ */ p(Y.div, {
|
|
2664
2668
|
style: { visibility: o ? "visible" : "hidden" },
|
|
2665
2669
|
transition: {
|
|
2666
2670
|
ease: "easeOut",
|
|
@@ -2682,10 +2686,10 @@ function In(e) {
|
|
|
2682
2686
|
}
|
|
2683
2687
|
//#endregion
|
|
2684
2688
|
//#region src/components/radio/radioContext.tsx
|
|
2685
|
-
var
|
|
2686
|
-
function
|
|
2689
|
+
var zn = n({});
|
|
2690
|
+
function Bn(e) {
|
|
2687
2691
|
let { children: t, size: n, isError: r, handleChange: i, value: a, disabled: o } = e;
|
|
2688
|
-
return /* @__PURE__ */ p(
|
|
2692
|
+
return /* @__PURE__ */ p(zn.Provider, {
|
|
2689
2693
|
value: {
|
|
2690
2694
|
handleChange: i,
|
|
2691
2695
|
value: a,
|
|
@@ -2696,13 +2700,13 @@ function Rn(e) {
|
|
|
2696
2700
|
children: t
|
|
2697
2701
|
});
|
|
2698
2702
|
}
|
|
2699
|
-
function
|
|
2700
|
-
return a(
|
|
2703
|
+
function Vn() {
|
|
2704
|
+
return a(zn);
|
|
2701
2705
|
}
|
|
2702
2706
|
//#endregion
|
|
2703
2707
|
//#region src/components/radio/radioBox/index.tsx
|
|
2704
|
-
function
|
|
2705
|
-
let { value: t, size: n, disabled: r, children: i, className: a = "", onClick: o, onFocus: s, ...c } = e, { handleChange: l, size: u, value: d, isError: f, disabled: h } =
|
|
2708
|
+
function Hn(e) {
|
|
2709
|
+
let { value: t, size: n, disabled: r, children: i, className: a = "", onClick: o, onFocus: s, ...c } = e, { handleChange: l, size: u, value: d, isError: f, disabled: h } = Vn(), g = d === t, _ = n || u, v = r || h, y = `arkynRadioBox ${_} ${g ? "checkedTrue" : "checkedFalse"} ${f ? "errorTrue" : "errorFalse"} ${v ? "disabledTrue" : "disabledFalse"} ${a}`;
|
|
2706
2710
|
function b(e) {
|
|
2707
2711
|
o && o(e), l(t);
|
|
2708
2712
|
}
|
|
@@ -2722,62 +2726,61 @@ function Bn(e) {
|
|
|
2722
2726
|
}
|
|
2723
2727
|
//#endregion
|
|
2724
2728
|
//#region src/components/radio/radioGroup/index.tsx
|
|
2725
|
-
function
|
|
2726
|
-
let { defaultValue: t = "", name: n, label: r, showAsterisk: i, errorMessage: a, value: o, onChange: s, size: c = "md", className: l = "", disabled: d = !1,
|
|
2727
|
-
function
|
|
2728
|
-
|
|
2729
|
+
function Un(e) {
|
|
2730
|
+
let { defaultValue: t = "", name: n, label: r, showAsterisk: i, errorMessage: a, value: o, onChange: s, size: c = "md", className: l = "", disabled: d = !1, unShowFieldTemplate: f = !1, orientation: h = "horizontal", ...g } = e, [_, v] = u(t), { fieldErrors: y } = X();
|
|
2731
|
+
function b(e) {
|
|
2732
|
+
v(e), s && s(e);
|
|
2729
2733
|
}
|
|
2730
|
-
let
|
|
2731
|
-
return /* @__PURE__ */
|
|
2734
|
+
let x = a || y?.[n], S = !!x, C = `arkynRadioGroup ${c}`;
|
|
2735
|
+
return /* @__PURE__ */ p($, {
|
|
2736
|
+
name: n,
|
|
2737
|
+
label: r,
|
|
2738
|
+
showAsterisk: i,
|
|
2732
2739
|
className: l,
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
})]
|
|
2754
|
-
}),
|
|
2755
|
-
y && /* @__PURE__ */ p(Y, { children: y })
|
|
2756
|
-
]
|
|
2740
|
+
errorMessage: x,
|
|
2741
|
+
unShowFieldTemplate: f,
|
|
2742
|
+
orientation: h,
|
|
2743
|
+
children: /* @__PURE__ */ m(Bn, {
|
|
2744
|
+
isError: S,
|
|
2745
|
+
size: c,
|
|
2746
|
+
value: o || _,
|
|
2747
|
+
handleChange: b,
|
|
2748
|
+
disabled: d,
|
|
2749
|
+
children: [/* @__PURE__ */ p("input", {
|
|
2750
|
+
style: { display: "none" },
|
|
2751
|
+
type: "text",
|
|
2752
|
+
readOnly: !0,
|
|
2753
|
+
name: n,
|
|
2754
|
+
value: o || _
|
|
2755
|
+
}), /* @__PURE__ */ p("div", {
|
|
2756
|
+
className: C.trim(),
|
|
2757
|
+
...g
|
|
2758
|
+
})]
|
|
2759
|
+
})
|
|
2757
2760
|
});
|
|
2758
2761
|
}
|
|
2759
2762
|
//#endregion
|
|
2760
2763
|
//#region src/services/isBlockActive.ts
|
|
2761
|
-
function
|
|
2764
|
+
function Wn(e, t, n = "type") {
|
|
2762
2765
|
let { selection: r } = e;
|
|
2763
2766
|
if (!r) return !1;
|
|
2764
|
-
let [i] = Array.from(
|
|
2765
|
-
at:
|
|
2766
|
-
match: (e) => !
|
|
2767
|
+
let [i] = Array.from(ue.nodes(e, {
|
|
2768
|
+
at: ue.unhangRange(e, r),
|
|
2769
|
+
match: (e) => !ue.isEditor(e) && de.isElement(e) && e[n] === t
|
|
2767
2770
|
}));
|
|
2768
2771
|
return !!i;
|
|
2769
2772
|
}
|
|
2770
2773
|
//#endregion
|
|
2771
2774
|
//#region src/templates/richTextTemplates.ts
|
|
2772
|
-
var
|
|
2775
|
+
var Gn = {
|
|
2773
2776
|
"mod+b": "bold",
|
|
2774
2777
|
"mod+i": "italic",
|
|
2775
2778
|
"mod+u": "underline",
|
|
2776
2779
|
"mod+`": "code"
|
|
2777
|
-
},
|
|
2780
|
+
}, Kn = [{
|
|
2778
2781
|
type: "paragraph",
|
|
2779
2782
|
children: [{ text: "" }]
|
|
2780
|
-
}],
|
|
2783
|
+
}], qn = ["listItem", "numberedList"], Jn = [
|
|
2781
2784
|
"left",
|
|
2782
2785
|
"center",
|
|
2783
2786
|
"right",
|
|
@@ -2785,27 +2788,27 @@ var Un = {
|
|
|
2785
2788
|
];
|
|
2786
2789
|
//#endregion
|
|
2787
2790
|
//#region src/services/toggleBlock.ts
|
|
2788
|
-
function
|
|
2789
|
-
let n =
|
|
2790
|
-
|
|
2791
|
-
match: (e) => !
|
|
2791
|
+
function Yn(e, t) {
|
|
2792
|
+
let n = Wn(e, t, Jn.includes(t) ? "align" : "type"), r = qn.includes(t);
|
|
2793
|
+
me.unwrapNodes(e, {
|
|
2794
|
+
match: (e) => !ue.isEditor(e) && de.isElement(e) && qn.includes(e.type) && !Jn.includes(t),
|
|
2792
2795
|
split: !0
|
|
2793
2796
|
});
|
|
2794
2797
|
let i;
|
|
2795
|
-
if (i =
|
|
2798
|
+
if (i = Jn.includes(t) ? { align: n ? void 0 : t } : { type: n ? "paragraph" : r ? "listItem" : t }, me.setNodes(e, i), !n && r) {
|
|
2796
2799
|
let n = {
|
|
2797
2800
|
type: t,
|
|
2798
2801
|
children: []
|
|
2799
2802
|
};
|
|
2800
|
-
|
|
2803
|
+
me.wrapNodes(e, n);
|
|
2801
2804
|
}
|
|
2802
2805
|
}
|
|
2803
2806
|
//#endregion
|
|
2804
2807
|
//#region src/components/richText/blockButton/index.tsx
|
|
2805
|
-
function
|
|
2806
|
-
let n =
|
|
2808
|
+
function Xn({ format: e, icon: t }) {
|
|
2809
|
+
let n = ye(), r = Wn(n, e, Jn.includes(e) ? "align" : "type") ? "activeTrue" : "activeFalse";
|
|
2807
2810
|
function i(t) {
|
|
2808
|
-
t.preventDefault(),
|
|
2811
|
+
t.preventDefault(), Yn(n, e);
|
|
2809
2812
|
}
|
|
2810
2813
|
return /* @__PURE__ */ p("button", {
|
|
2811
2814
|
type: "button",
|
|
@@ -2816,7 +2819,7 @@ function Jn({ format: e, icon: t }) {
|
|
|
2816
2819
|
}
|
|
2817
2820
|
//#endregion
|
|
2818
2821
|
//#region src/components/richText/element/index.tsx
|
|
2819
|
-
function
|
|
2822
|
+
function Zn({ attributes: e, children: t, element: n }) {
|
|
2820
2823
|
let r = { textAlign: n.align };
|
|
2821
2824
|
switch (n.type) {
|
|
2822
2825
|
case "blockQuote": return /* @__PURE__ */ p("blockquote", {
|
|
@@ -2886,20 +2889,20 @@ function Yn({ attributes: e, children: t, element: n }) {
|
|
|
2886
2889
|
}
|
|
2887
2890
|
//#endregion
|
|
2888
2891
|
//#region src/components/tab/tabContext.tsx
|
|
2889
|
-
var
|
|
2890
|
-
function
|
|
2891
|
-
return a(
|
|
2892
|
+
var Qn = n({});
|
|
2893
|
+
function $n() {
|
|
2894
|
+
return a(Qn);
|
|
2892
2895
|
}
|
|
2893
|
-
function
|
|
2894
|
-
return /* @__PURE__ */ p(
|
|
2896
|
+
function er(e) {
|
|
2897
|
+
return /* @__PURE__ */ p(Qn.Provider, {
|
|
2895
2898
|
value: e,
|
|
2896
2899
|
children: e.children
|
|
2897
2900
|
});
|
|
2898
2901
|
}
|
|
2899
2902
|
//#endregion
|
|
2900
2903
|
//#region src/components/tab/tabButton/index.tsx
|
|
2901
|
-
function
|
|
2902
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
2904
|
+
function tr(e) {
|
|
2905
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = $n(), u = s || n, d = `arkynTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
2903
2906
|
function f(e) {
|
|
2904
2907
|
l(a), i && i(e);
|
|
2905
2908
|
}
|
|
@@ -2914,12 +2917,12 @@ function $n(e) {
|
|
|
2914
2917
|
}
|
|
2915
2918
|
//#endregion
|
|
2916
2919
|
//#region src/components/tab/tabContainer/index.tsx
|
|
2917
|
-
function
|
|
2920
|
+
function nr(e) {
|
|
2918
2921
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynTabContainer ${a || ""}`;
|
|
2919
2922
|
function d(e) {
|
|
2920
2923
|
c(e), n && n(e);
|
|
2921
2924
|
}
|
|
2922
|
-
return /* @__PURE__ */ p(
|
|
2925
|
+
return /* @__PURE__ */ p(er, {
|
|
2923
2926
|
disabled: i,
|
|
2924
2927
|
currentTab: s,
|
|
2925
2928
|
changeCurrentTab: d,
|
|
@@ -2932,8 +2935,8 @@ function er(e) {
|
|
|
2932
2935
|
}
|
|
2933
2936
|
//#endregion
|
|
2934
2937
|
//#region src/components/richText/insertImage/index.tsx
|
|
2935
|
-
function
|
|
2936
|
-
let { action: t, tabLabels: n = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: r = "Cancelar", modalConfirmButton: i = "Confirmar", modalInputImageLabel: a = "Imagem:", modalInputUrlLabel: o = "URL da imagem:", modalTitle: s = "Inserir imagem" } = e, c =
|
|
2938
|
+
function rr(e) {
|
|
2939
|
+
let { action: t, tabLabels: n = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: r = "Cancelar", modalConfirmButton: i = "Confirmar", modalInputImageLabel: a = "Imagem:", modalInputUrlLabel: o = "URL da imagem:", modalTitle: s = "Inserir imagem" } = e, c = ye(), [l, d] = u(!1), [h, g] = u(""), [_, v] = u("url");
|
|
2937
2940
|
function y(e) {
|
|
2938
2941
|
e.preventDefault(), !(!h || h === "") && (c.insertNodes([
|
|
2939
2942
|
{
|
|
@@ -2956,26 +2959,26 @@ function tr(e) {
|
|
|
2956
2959
|
className: "arkynRichTextInsertImage",
|
|
2957
2960
|
onMouseDown: () => d(!0),
|
|
2958
2961
|
children: /* @__PURE__ */ p(P, {})
|
|
2959
|
-
}), /* @__PURE__ */ m(
|
|
2962
|
+
}), /* @__PURE__ */ m(sn, {
|
|
2960
2963
|
isVisible: l,
|
|
2961
2964
|
makeInvisible: () => d(!1),
|
|
2962
2965
|
children: [
|
|
2963
|
-
/* @__PURE__ */ p(
|
|
2966
|
+
/* @__PURE__ */ p(ln, { children: s }),
|
|
2964
2967
|
/* @__PURE__ */ m("div", {
|
|
2965
2968
|
className: "arkynRichTextInsertImageModalContent",
|
|
2966
2969
|
children: [
|
|
2967
|
-
/* @__PURE__ */ m(
|
|
2970
|
+
/* @__PURE__ */ m(nr, {
|
|
2968
2971
|
defaultValue: _,
|
|
2969
2972
|
onChange: v,
|
|
2970
|
-
children: [/* @__PURE__ */ p(
|
|
2973
|
+
children: [/* @__PURE__ */ p(tr, {
|
|
2971
2974
|
value: "url",
|
|
2972
2975
|
children: n[0]
|
|
2973
|
-
}), /* @__PURE__ */ p(
|
|
2976
|
+
}), /* @__PURE__ */ p(tr, {
|
|
2974
2977
|
value: "file",
|
|
2975
2978
|
children: n[1]
|
|
2976
2979
|
})]
|
|
2977
2980
|
}),
|
|
2978
|
-
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2981
|
+
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ot, {
|
|
2979
2982
|
type: "text",
|
|
2980
2983
|
name: "richTextImageURL",
|
|
2981
2984
|
label: o,
|
|
@@ -2987,7 +2990,7 @@ function tr(e) {
|
|
|
2987
2990
|
src: h,
|
|
2988
2991
|
alt: "preview"
|
|
2989
2992
|
})] }),
|
|
2990
|
-
_ === "file" && /* @__PURE__ */ p(
|
|
2993
|
+
_ === "file" && /* @__PURE__ */ p(Zt, {
|
|
2991
2994
|
name: "richTextImageURL",
|
|
2992
2995
|
action: t,
|
|
2993
2996
|
label: a,
|
|
@@ -2997,13 +3000,13 @@ function tr(e) {
|
|
|
2997
3000
|
})
|
|
2998
3001
|
]
|
|
2999
3002
|
}),
|
|
3000
|
-
/* @__PURE__ */ m(
|
|
3003
|
+
/* @__PURE__ */ m(cn, { children: [/* @__PURE__ */ p(Q, {
|
|
3001
3004
|
type: "button",
|
|
3002
3005
|
scheme: "danger",
|
|
3003
3006
|
variant: "outline",
|
|
3004
3007
|
onClick: () => d(!1),
|
|
3005
3008
|
children: r
|
|
3006
|
-
}), /* @__PURE__ */ p(
|
|
3009
|
+
}), /* @__PURE__ */ p(Q, {
|
|
3007
3010
|
type: "button",
|
|
3008
3011
|
onClick: y,
|
|
3009
3012
|
children: i
|
|
@@ -3013,8 +3016,8 @@ function tr(e) {
|
|
|
3013
3016
|
}
|
|
3014
3017
|
//#endregion
|
|
3015
3018
|
//#region src/components/richText/insertVideo/index.tsx
|
|
3016
|
-
function
|
|
3017
|
-
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do vídeo:", modalTitle: i = "Inserir vídeo", invalidUrlMessage: a = "URL inválida" } = e, s =
|
|
3019
|
+
function ir(e) {
|
|
3020
|
+
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do vídeo:", modalTitle: i = "Inserir vídeo", invalidUrlMessage: a = "URL inválida" } = e, s = ye(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(""), [v, y] = u("");
|
|
3018
3021
|
function b(e) {
|
|
3019
3022
|
if (e.preventDefault(), !d || d === "") return;
|
|
3020
3023
|
let t = `https://www.youtube.com/embed/${d}`;
|
|
@@ -3046,14 +3049,14 @@ function nr(e) {
|
|
|
3046
3049
|
className: "arkynRichTextInsertVideo",
|
|
3047
3050
|
onMouseDown: () => l(!0),
|
|
3048
3051
|
children: /* @__PURE__ */ p(G, {})
|
|
3049
|
-
}), /* @__PURE__ */ m(
|
|
3052
|
+
}), /* @__PURE__ */ m(sn, {
|
|
3050
3053
|
isVisible: c,
|
|
3051
3054
|
makeInvisible: () => l(!1),
|
|
3052
3055
|
children: [
|
|
3053
|
-
/* @__PURE__ */ p(
|
|
3056
|
+
/* @__PURE__ */ p(ln, { children: i }),
|
|
3054
3057
|
/* @__PURE__ */ m("div", {
|
|
3055
3058
|
className: "arkynRichTextInsertVideoModalContent",
|
|
3056
|
-
children: [/* @__PURE__ */ p(
|
|
3059
|
+
children: [/* @__PURE__ */ p(ot, {
|
|
3057
3060
|
type: "text",
|
|
3058
3061
|
name: "richTextVideoURL",
|
|
3059
3062
|
label: r,
|
|
@@ -3071,13 +3074,13 @@ function nr(e) {
|
|
|
3071
3074
|
allowFullScreen: !0
|
|
3072
3075
|
})]
|
|
3073
3076
|
}),
|
|
3074
|
-
/* @__PURE__ */ m(
|
|
3077
|
+
/* @__PURE__ */ m(cn, { children: [/* @__PURE__ */ p(Q, {
|
|
3075
3078
|
type: "button",
|
|
3076
3079
|
scheme: "danger",
|
|
3077
3080
|
variant: "outline",
|
|
3078
3081
|
onClick: () => l(!1),
|
|
3079
3082
|
children: t
|
|
3080
|
-
}), /* @__PURE__ */ p(
|
|
3083
|
+
}), /* @__PURE__ */ p(Q, {
|
|
3081
3084
|
disabled: !d,
|
|
3082
3085
|
type: "button",
|
|
3083
3086
|
onClick: b,
|
|
@@ -3088,7 +3091,7 @@ function nr(e) {
|
|
|
3088
3091
|
}
|
|
3089
3092
|
//#endregion
|
|
3090
3093
|
//#region src/components/richText/leaf/index.tsx
|
|
3091
|
-
function
|
|
3094
|
+
function ar({ attributes: e, children: t, leaf: n }) {
|
|
3092
3095
|
return n.bold && (t = /* @__PURE__ */ p("strong", { children: t })), n.code && (t = /* @__PURE__ */ p("code", { children: t })), n.italic && (t = /* @__PURE__ */ p("em", { children: t })), n.underline && (t = /* @__PURE__ */ p("u", { children: t })), /* @__PURE__ */ p("span", {
|
|
3093
3096
|
...e,
|
|
3094
3097
|
children: t
|
|
@@ -3096,21 +3099,21 @@ function rr({ attributes: e, children: t, leaf: n }) {
|
|
|
3096
3099
|
}
|
|
3097
3100
|
//#endregion
|
|
3098
3101
|
//#region src/services/isMarkActive.ts
|
|
3099
|
-
function
|
|
3100
|
-
let n =
|
|
3102
|
+
function or(e, t) {
|
|
3103
|
+
let n = ue.marks(e);
|
|
3101
3104
|
return n ? n[t] === !0 : !1;
|
|
3102
3105
|
}
|
|
3103
3106
|
//#endregion
|
|
3104
3107
|
//#region src/services/toggleMark.ts
|
|
3105
|
-
function
|
|
3106
|
-
|
|
3108
|
+
function sr(e, t) {
|
|
3109
|
+
or(e, t) ? ue.removeMark(e, t) : ue.addMark(e, t, !0);
|
|
3107
3110
|
}
|
|
3108
3111
|
//#endregion
|
|
3109
3112
|
//#region src/components/richText/markButton/index.tsx
|
|
3110
|
-
function
|
|
3111
|
-
let n =
|
|
3113
|
+
function cr({ format: e, icon: t }) {
|
|
3114
|
+
let n = ye(), r = or(n, e) ? "activeTrue" : "activeFalse";
|
|
3112
3115
|
function i(t) {
|
|
3113
|
-
t.preventDefault(),
|
|
3116
|
+
t.preventDefault(), sr(n, e);
|
|
3114
3117
|
}
|
|
3115
3118
|
return /* @__PURE__ */ p("button", {
|
|
3116
3119
|
type: "button",
|
|
@@ -3121,7 +3124,7 @@ function or({ format: e, icon: t }) {
|
|
|
3121
3124
|
}
|
|
3122
3125
|
//#endregion
|
|
3123
3126
|
//#region src/components/richText/toolbar/index.tsx
|
|
3124
|
-
function
|
|
3127
|
+
function lr({ children: e }) {
|
|
3125
3128
|
return /* @__PURE__ */ p("div", {
|
|
3126
3129
|
className: "arkynRichTextToolbar",
|
|
3127
3130
|
children: e
|
|
@@ -3129,135 +3132,137 @@ function sr({ children: e }) {
|
|
|
3129
3132
|
}
|
|
3130
3133
|
//#endregion
|
|
3131
3134
|
//#region src/services/extractTextFromNode.ts
|
|
3132
|
-
function
|
|
3133
|
-
return e.map((e) =>
|
|
3135
|
+
function ur(e) {
|
|
3136
|
+
return e.map((e) => fe.string(e)).join("");
|
|
3134
3137
|
}
|
|
3135
3138
|
//#endregion
|
|
3136
3139
|
//#region src/components/richText/index.tsx
|
|
3137
|
-
function
|
|
3138
|
-
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a,
|
|
3139
|
-
function
|
|
3140
|
+
function dr(e) {
|
|
3141
|
+
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a, className: o = "", defaultValue: d = "[]", enforceCharacterLimit: f = !1, onChangeCharactersCount: h, baseErrorMessage: x, maxLimit: S = 1e4, onChange: C, isError: w, label: T, showAsterisk: D, id: O, orientation: k = "horizontal", unShowFieldTemplate: A = !1 } = e, j = c(() => ge(be(he())), []), { fieldErrors: P } = X();
|
|
3142
|
+
function F() {
|
|
3140
3143
|
try {
|
|
3141
|
-
let e = JSON.parse(
|
|
3142
|
-
return !Array.isArray(e) || e.length <= 0 ?
|
|
3144
|
+
let e = JSON.parse(d);
|
|
3145
|
+
return !Array.isArray(e) || e.length <= 0 ? Kn : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : Kn;
|
|
3143
3146
|
} catch {
|
|
3144
|
-
return
|
|
3147
|
+
return Kn;
|
|
3145
3148
|
}
|
|
3146
3149
|
}
|
|
3147
|
-
let [
|
|
3150
|
+
let [L, R] = u(ur(F()).length), [z, B] = u(JSON.stringify(F()) || "[]"), [H, U] = u(!1), G = l(null), K = O || s(), q = x || P?.[t], ee = w || !!q, te = i(ar, []), J = i(Zn, []);
|
|
3148
3151
|
function ne(e) {
|
|
3149
|
-
let t =
|
|
3150
|
-
|
|
3152
|
+
let t = ur(e);
|
|
3153
|
+
R(t.length), h && h(t.length), !(f && t.length >= S) && (B(JSON.stringify(e)), C && C(e), j.children = e, me.setNodes(j, { children: e }));
|
|
3151
3154
|
}
|
|
3152
|
-
let re = `arkynRichText ${
|
|
3153
|
-
function
|
|
3155
|
+
let re = `arkynRichText ${ee || S < L ? "errorTrue" : "errorFalse"} ${H ? "focusTrue" : "focusFalse"}`, ie = S - L;
|
|
3156
|
+
function Y(e) {
|
|
3154
3157
|
return !n?.includes(e);
|
|
3155
3158
|
}
|
|
3156
|
-
return /* @__PURE__ */
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3159
|
+
return /* @__PURE__ */ p($, {
|
|
3160
|
+
name: t,
|
|
3161
|
+
label: T,
|
|
3162
|
+
showAsterisk: D,
|
|
3163
|
+
className: o,
|
|
3164
|
+
errorMessage: q,
|
|
3165
|
+
unShowFieldTemplate: A,
|
|
3166
|
+
orientation: k,
|
|
3167
|
+
children: /* @__PURE__ */ m(ve, {
|
|
3168
|
+
editor: j,
|
|
3169
|
+
initialValue: F(),
|
|
3164
3170
|
onChange: ne,
|
|
3165
3171
|
onValueChange: ne,
|
|
3166
3172
|
children: [
|
|
3167
3173
|
/* @__PURE__ */ m("div", {
|
|
3168
3174
|
className: re,
|
|
3169
3175
|
children: [
|
|
3170
|
-
/* @__PURE__ */ m(
|
|
3171
|
-
|
|
3176
|
+
/* @__PURE__ */ m(lr, { children: [
|
|
3177
|
+
Y("headingOne") && /* @__PURE__ */ p(Xn, {
|
|
3172
3178
|
format: "headingOne",
|
|
3173
3179
|
icon: M
|
|
3174
3180
|
}),
|
|
3175
|
-
|
|
3181
|
+
Y("headingTwo") && /* @__PURE__ */ p(Xn, {
|
|
3176
3182
|
format: "headingTwo",
|
|
3177
3183
|
icon: N
|
|
3178
3184
|
}),
|
|
3179
|
-
|
|
3185
|
+
Y("blockQuote") && /* @__PURE__ */ p(Xn, {
|
|
3180
3186
|
format: "blockQuote",
|
|
3181
3187
|
icon: V
|
|
3182
3188
|
}),
|
|
3183
|
-
|
|
3189
|
+
Y("bold") && /* @__PURE__ */ p(cr, {
|
|
3184
3190
|
format: "bold",
|
|
3185
3191
|
icon: b
|
|
3186
3192
|
}),
|
|
3187
|
-
|
|
3193
|
+
Y("italic") && /* @__PURE__ */ p(cr, {
|
|
3188
3194
|
format: "italic",
|
|
3189
3195
|
icon: I
|
|
3190
3196
|
}),
|
|
3191
|
-
|
|
3197
|
+
Y("underline") && /* @__PURE__ */ p(cr, {
|
|
3192
3198
|
format: "underline",
|
|
3193
3199
|
icon: W
|
|
3194
3200
|
}),
|
|
3195
|
-
|
|
3201
|
+
Y("code") && /* @__PURE__ */ p(cr, {
|
|
3196
3202
|
format: "code",
|
|
3197
3203
|
icon: E
|
|
3198
3204
|
}),
|
|
3199
|
-
|
|
3205
|
+
Y("left") && /* @__PURE__ */ p(Xn, {
|
|
3200
3206
|
format: "left",
|
|
3201
3207
|
icon: v
|
|
3202
3208
|
}),
|
|
3203
|
-
|
|
3209
|
+
Y("right") && /* @__PURE__ */ p(Xn, {
|
|
3204
3210
|
format: "right",
|
|
3205
3211
|
icon: y
|
|
3206
3212
|
}),
|
|
3207
|
-
|
|
3213
|
+
Y("center") && /* @__PURE__ */ p(Xn, {
|
|
3208
3214
|
format: "center",
|
|
3209
3215
|
icon: g
|
|
3210
3216
|
}),
|
|
3211
|
-
|
|
3217
|
+
Y("justify") && /* @__PURE__ */ p(Xn, {
|
|
3212
3218
|
format: "justify",
|
|
3213
3219
|
icon: _
|
|
3214
3220
|
}),
|
|
3215
|
-
r &&
|
|
3216
|
-
|
|
3221
|
+
r && Y("image") && /* @__PURE__ */ p(rr, { ...r }),
|
|
3222
|
+
Y("video") && /* @__PURE__ */ p(ir, { ...a })
|
|
3217
3223
|
] }),
|
|
3218
|
-
/* @__PURE__ */ p(
|
|
3224
|
+
/* @__PURE__ */ p(_e, {
|
|
3219
3225
|
className: "editorContainer",
|
|
3220
|
-
renderElement:
|
|
3221
|
-
renderLeaf:
|
|
3226
|
+
renderElement: J,
|
|
3227
|
+
renderLeaf: te,
|
|
3222
3228
|
spellCheck: !0,
|
|
3223
|
-
ref:
|
|
3224
|
-
id:
|
|
3225
|
-
onFocus: () =>
|
|
3226
|
-
onBlur: () =>
|
|
3229
|
+
ref: G,
|
|
3230
|
+
id: K,
|
|
3231
|
+
onFocus: () => U(!0),
|
|
3232
|
+
onBlur: () => U(!1),
|
|
3227
3233
|
onKeyDown: (e) => {
|
|
3228
|
-
for (let t in
|
|
3234
|
+
for (let t in Gn) if (le(t, e)) {
|
|
3229
3235
|
e.preventDefault();
|
|
3230
|
-
let n =
|
|
3231
|
-
|
|
3236
|
+
let n = Gn[t];
|
|
3237
|
+
sr(j, n);
|
|
3232
3238
|
}
|
|
3233
3239
|
}
|
|
3234
3240
|
}),
|
|
3235
|
-
|
|
3241
|
+
ie < 0 && /* @__PURE__ */ p("div", {
|
|
3236
3242
|
className: "restatesCharacters",
|
|
3237
|
-
children:
|
|
3243
|
+
children: ie
|
|
3238
3244
|
})
|
|
3239
3245
|
]
|
|
3240
3246
|
}),
|
|
3241
3247
|
/* @__PURE__ */ p("input", {
|
|
3242
3248
|
type: "hidden",
|
|
3243
3249
|
name: t,
|
|
3244
|
-
value:
|
|
3250
|
+
value: z.slice(0, S)
|
|
3245
3251
|
}),
|
|
3246
3252
|
/* @__PURE__ */ p("input", {
|
|
3247
3253
|
type: "hidden",
|
|
3248
3254
|
name: `${t}Count`,
|
|
3249
|
-
value:
|
|
3255
|
+
value: L
|
|
3250
3256
|
})
|
|
3251
3257
|
]
|
|
3252
|
-
})
|
|
3253
|
-
|
|
3254
|
-
] });
|
|
3258
|
+
})
|
|
3259
|
+
});
|
|
3255
3260
|
}
|
|
3256
3261
|
//#endregion
|
|
3257
3262
|
//#region src/components/searchPlaces.tsx
|
|
3258
|
-
function
|
|
3263
|
+
function fr(e) {
|
|
3259
3264
|
let { onChange: t, onPlaceChanged: n, options: r, ...i } = e, [a, o] = u(null);
|
|
3260
|
-
return /* @__PURE__ */ p(
|
|
3265
|
+
return /* @__PURE__ */ p(xe, {
|
|
3261
3266
|
onLoad: (e) => o(e),
|
|
3262
3267
|
onPlacesChanged: () => {
|
|
3263
3268
|
let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components;
|
|
@@ -3298,7 +3303,7 @@ function ur(e) {
|
|
|
3298
3303
|
}
|
|
3299
3304
|
},
|
|
3300
3305
|
options: r,
|
|
3301
|
-
children: /* @__PURE__ */ p(
|
|
3306
|
+
children: /* @__PURE__ */ p(ot, {
|
|
3302
3307
|
type: "text",
|
|
3303
3308
|
autoComplete: "off",
|
|
3304
3309
|
onChange: (e) => t && t(e.target.value),
|
|
@@ -3308,36 +3313,38 @@ function ur(e) {
|
|
|
3308
3313
|
}
|
|
3309
3314
|
//#endregion
|
|
3310
3315
|
//#region src/components/switch/index.tsx
|
|
3311
|
-
function
|
|
3312
|
-
let { label: t, size: n = "lg", defaultChecked: r = !1, checked: i = null, value: a, unCheckedValue: o = "", name: c, className: d = "", onCheck: f, id:
|
|
3313
|
-
function
|
|
3314
|
-
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3316
|
+
function pr(e) {
|
|
3317
|
+
let { label: t, size: n = "lg", defaultChecked: r = !1, checked: i = null, value: a, unCheckedValue: o = "", name: c, className: d = "", onCheck: f, id: m, orientation: h = "horizontalReverse", className: g = "", showAsterisk: _, errorMessage: v, unShowFieldTemplate: y = !1, ...b } = e, x = l(null), S = m || s(), [C, w] = u(r), T = typeof i == "boolean" ? i : C;
|
|
3318
|
+
function E() {
|
|
3319
|
+
w(!C), f && f(T ? o : a || "checked");
|
|
3320
|
+
}
|
|
3321
|
+
return /* @__PURE__ */ p($, {
|
|
3322
|
+
name: c,
|
|
3323
|
+
label: t,
|
|
3324
|
+
showAsterisk: _,
|
|
3325
|
+
className: g,
|
|
3326
|
+
errorMessage: v,
|
|
3327
|
+
unShowFieldTemplate: y,
|
|
3328
|
+
orientation: h,
|
|
3329
|
+
children: /* @__PURE__ */ p("button", {
|
|
3323
3330
|
type: "button",
|
|
3324
|
-
onClick:
|
|
3325
|
-
className:
|
|
3326
|
-
...
|
|
3331
|
+
onClick: E,
|
|
3332
|
+
className: `arkynSwitch ${T ? "checkedTrue" : "checkedFalse"} ${n} ${d}`,
|
|
3333
|
+
...b,
|
|
3327
3334
|
children: /* @__PURE__ */ p("input", {
|
|
3328
|
-
id:
|
|
3335
|
+
id: S,
|
|
3329
3336
|
type: "hidden",
|
|
3330
3337
|
name: c,
|
|
3331
|
-
ref:
|
|
3332
|
-
onClick:
|
|
3333
|
-
value:
|
|
3338
|
+
ref: x,
|
|
3339
|
+
onClick: E,
|
|
3340
|
+
value: T ? a || "checked" : o
|
|
3334
3341
|
})
|
|
3335
|
-
})
|
|
3342
|
+
})
|
|
3336
3343
|
});
|
|
3337
3344
|
}
|
|
3338
3345
|
//#endregion
|
|
3339
3346
|
//#region src/components/table/tableBody/index.tsx
|
|
3340
|
-
function
|
|
3347
|
+
function mr(t) {
|
|
3341
3348
|
let { emptyMessage: n = "Nenhum dado adicionado.", className: r, children: i, ...a } = t, o = `arkynTableBody ${r}`, s = e.count(i) === 0;
|
|
3342
3349
|
return /* @__PURE__ */ p("tbody", {
|
|
3343
3350
|
className: o.trim(),
|
|
@@ -3353,7 +3360,7 @@ function fr(t) {
|
|
|
3353
3360
|
}
|
|
3354
3361
|
//#endregion
|
|
3355
3362
|
//#region src/components/table/tableCaption/index.tsx
|
|
3356
|
-
function
|
|
3363
|
+
function hr(e) {
|
|
3357
3364
|
let { className: t, children: n, ...r } = e;
|
|
3358
3365
|
return /* @__PURE__ */ p("caption", {
|
|
3359
3366
|
className: `arkynTableCaption ${t}`.trim(),
|
|
@@ -3366,7 +3373,7 @@ function pr(e) {
|
|
|
3366
3373
|
}
|
|
3367
3374
|
//#endregion
|
|
3368
3375
|
//#region src/components/table/tableContainer/index.tsx
|
|
3369
|
-
function
|
|
3376
|
+
function gr(e) {
|
|
3370
3377
|
let { children: t, className: n, ...r } = e;
|
|
3371
3378
|
return /* @__PURE__ */ p("div", {
|
|
3372
3379
|
className: `arkynTableContainer ${n}`.trim(),
|
|
@@ -3376,7 +3383,7 @@ function mr(e) {
|
|
|
3376
3383
|
}
|
|
3377
3384
|
//#endregion
|
|
3378
3385
|
//#region src/components/table/tableFooter/index.tsx
|
|
3379
|
-
function
|
|
3386
|
+
function _r(e) {
|
|
3380
3387
|
let { className: t, children: n, ...r } = e;
|
|
3381
3388
|
return /* @__PURE__ */ m("tfoot", {
|
|
3382
3389
|
className: `arkynTableFooter ${t}`.trim(),
|
|
@@ -3392,7 +3399,7 @@ function hr(e) {
|
|
|
3392
3399
|
}
|
|
3393
3400
|
//#endregion
|
|
3394
3401
|
//#region src/components/table/tableHeader/index.tsx
|
|
3395
|
-
function
|
|
3402
|
+
function vr(e) {
|
|
3396
3403
|
let { className: t, children: n, ...r } = e;
|
|
3397
3404
|
return /* @__PURE__ */ m("thead", {
|
|
3398
3405
|
className: `arkynTableHeader ${t}`.trim(),
|
|
@@ -3402,8 +3409,8 @@ function gr(e) {
|
|
|
3402
3409
|
}
|
|
3403
3410
|
//#endregion
|
|
3404
3411
|
//#region src/components/textarea/index.tsx
|
|
3405
|
-
function
|
|
3406
|
-
let { variant: t = "solid", size: n = "md", className: r, errorMessage: i, disabled: a = !1, readOnly: o = !1, label: c, showAsterisk: d, name: f, onFocus: h, onBlur: g, title: _, style: v, value: y, defaultValue: b, placeholder: x, id: S, ...C } = e, { fieldErrors: w } =
|
|
3412
|
+
function yr(e) {
|
|
3413
|
+
let { variant: t = "solid", size: n = "md", className: r, errorMessage: i, disabled: a = !1, readOnly: o = !1, label: c, showAsterisk: d, name: f, onFocus: h, onBlur: g, title: _, style: v, value: y, defaultValue: b, placeholder: x, id: S, ...C } = e, { fieldErrors: w } = X(), [T, E] = u(!1), D = l(null), O = S || s(), k = i || w?.[f], A = `arkynTextarea ${t} ${n} ${a || o ? "opacityTrue" : "opacityFalse"} ${k ? "errorTrue" : "errorFalse"} ${T ? "focusedTrue" : "focusedFalse"}`;
|
|
3407
3414
|
function j() {
|
|
3408
3415
|
a || !D?.current || (E(!0), D.current.focus());
|
|
3409
3416
|
}
|
|
@@ -3413,10 +3420,10 @@ function _r(e) {
|
|
|
3413
3420
|
function N(e) {
|
|
3414
3421
|
E(!1), g && g(e);
|
|
3415
3422
|
}
|
|
3416
|
-
return /* @__PURE__ */ m(
|
|
3423
|
+
return /* @__PURE__ */ m(Ve, {
|
|
3417
3424
|
className: r,
|
|
3418
3425
|
children: [
|
|
3419
|
-
c && /* @__PURE__ */ p(
|
|
3426
|
+
c && /* @__PURE__ */ p(Be, {
|
|
3420
3427
|
htmlFor: O,
|
|
3421
3428
|
showAsterisk: d,
|
|
3422
3429
|
children: c
|
|
@@ -3440,14 +3447,14 @@ function _r(e) {
|
|
|
3440
3447
|
...C
|
|
3441
3448
|
})
|
|
3442
3449
|
}),
|
|
3443
|
-
k && /* @__PURE__ */ p(
|
|
3450
|
+
k && /* @__PURE__ */ p(ze, { children: k })
|
|
3444
3451
|
]
|
|
3445
3452
|
});
|
|
3446
3453
|
}
|
|
3447
3454
|
//#endregion
|
|
3448
3455
|
//#region src/providers/modalProvider.tsx
|
|
3449
|
-
var
|
|
3450
|
-
function
|
|
3456
|
+
var br = n({});
|
|
3457
|
+
function xr(e) {
|
|
3451
3458
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
3452
3459
|
function i(e) {
|
|
3453
3460
|
return !!n.some((t) => t.key === e);
|
|
@@ -3470,7 +3477,7 @@ function yr(e) {
|
|
|
3470
3477
|
function c() {
|
|
3471
3478
|
r([]);
|
|
3472
3479
|
}
|
|
3473
|
-
return /* @__PURE__ */ p(
|
|
3480
|
+
return /* @__PURE__ */ p(br.Provider, {
|
|
3474
3481
|
value: {
|
|
3475
3482
|
modalIsOpen: i,
|
|
3476
3483
|
modalData: a,
|
|
@@ -3483,8 +3490,8 @@ function yr(e) {
|
|
|
3483
3490
|
}
|
|
3484
3491
|
//#endregion
|
|
3485
3492
|
//#region src/hooks/useModal.ts
|
|
3486
|
-
function
|
|
3487
|
-
let t = a(
|
|
3493
|
+
function Sr(e) {
|
|
3494
|
+
let t = a(br);
|
|
3488
3495
|
if (Object.entries(t).length === 0) throw Error("useModal must be used within a Provider");
|
|
3489
3496
|
if (e) {
|
|
3490
3497
|
let { modalData: n, modalIsOpen: r, openModal: i, closeModal: a } = t;
|
|
@@ -3498,11 +3505,11 @@ function br(e) {
|
|
|
3498
3505
|
}
|
|
3499
3506
|
//#endregion
|
|
3500
3507
|
//#region src/providers/toastProvider.tsx
|
|
3501
|
-
var
|
|
3502
|
-
function
|
|
3508
|
+
var Cr = n({});
|
|
3509
|
+
function wr({ children: e }) {
|
|
3503
3510
|
function t(e) {
|
|
3504
3511
|
switch (e.type) {
|
|
3505
|
-
case "success": return
|
|
3512
|
+
case "success": return we.success(e.message, {
|
|
3506
3513
|
style: {
|
|
3507
3514
|
background: "#10B981",
|
|
3508
3515
|
color: "#ffffff",
|
|
@@ -3515,7 +3522,7 @@ function Sr({ children: e }) {
|
|
|
3515
3522
|
secondary: "#ffffff"
|
|
3516
3523
|
}
|
|
3517
3524
|
});
|
|
3518
|
-
case "danger": return
|
|
3525
|
+
case "danger": return we.error(e.message, {
|
|
3519
3526
|
style: {
|
|
3520
3527
|
background: "#E11D48",
|
|
3521
3528
|
color: "#ffffff",
|
|
@@ -3530,9 +3537,9 @@ function Sr({ children: e }) {
|
|
|
3530
3537
|
});
|
|
3531
3538
|
}
|
|
3532
3539
|
}
|
|
3533
|
-
return /* @__PURE__ */ m(
|
|
3540
|
+
return /* @__PURE__ */ m(Cr.Provider, {
|
|
3534
3541
|
value: { showToast: t },
|
|
3535
|
-
children: [/* @__PURE__ */ p(
|
|
3542
|
+
children: [/* @__PURE__ */ p(Te, {
|
|
3536
3543
|
position: "top-right",
|
|
3537
3544
|
containerStyle: { zIndex: 999999999999999 }
|
|
3538
3545
|
}), e]
|
|
@@ -3540,14 +3547,14 @@ function Sr({ children: e }) {
|
|
|
3540
3547
|
}
|
|
3541
3548
|
//#endregion
|
|
3542
3549
|
//#region src/hooks/useToast.ts
|
|
3543
|
-
function
|
|
3544
|
-
let e = a(
|
|
3550
|
+
function Tr() {
|
|
3551
|
+
let e = a(Cr);
|
|
3545
3552
|
if (Object.entries(e).length === 0) throw Error("useToast must be used within a Provider");
|
|
3546
3553
|
return e;
|
|
3547
3554
|
}
|
|
3548
3555
|
//#endregion
|
|
3549
3556
|
//#region src/templates/badResponses.ts
|
|
3550
|
-
var
|
|
3557
|
+
var Er = [
|
|
3551
3558
|
"BadGateway",
|
|
3552
3559
|
"BadRequest",
|
|
3553
3560
|
"Conflict",
|
|
@@ -3557,7 +3564,7 @@ var wr = [
|
|
|
3557
3564
|
"ServerError",
|
|
3558
3565
|
"Unauthorized",
|
|
3559
3566
|
"UnprocessableEntity"
|
|
3560
|
-
],
|
|
3567
|
+
], Dr = [
|
|
3561
3568
|
"Created",
|
|
3562
3569
|
"Found",
|
|
3563
3570
|
"Success",
|
|
@@ -3565,28 +3572,37 @@ var wr = [
|
|
|
3565
3572
|
];
|
|
3566
3573
|
//#endregion
|
|
3567
3574
|
//#region src/hooks/useAutomation.ts
|
|
3568
|
-
function
|
|
3569
|
-
let { closeAll: t } =
|
|
3575
|
+
function Or(e) {
|
|
3576
|
+
let { closeAll: t } = Sr(), { showToast: n } = Tr(), r = e?.closeModal, i = e?.message, a = e?.name, s = e?.cause?.data?.scrollTo, c = e?.cause?.fieldErrors ? Object.values(e?.cause?.fieldErrors)[0] : null;
|
|
3577
|
+
function l() {
|
|
3578
|
+
if (!(!i && !c)) {
|
|
3579
|
+
if (Dr.includes(a)) return n({
|
|
3580
|
+
message: i,
|
|
3581
|
+
type: "success"
|
|
3582
|
+
});
|
|
3583
|
+
if (Er.includes(a)) {
|
|
3584
|
+
if (c) return n({
|
|
3585
|
+
message: c,
|
|
3586
|
+
type: "danger"
|
|
3587
|
+
});
|
|
3588
|
+
if (i !== "Unprocessable entity") return n({
|
|
3589
|
+
message: i,
|
|
3590
|
+
type: "danger"
|
|
3591
|
+
});
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3570
3595
|
o(() => {
|
|
3571
|
-
r && t(),
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
}),
|
|
3575
|
-
message: i,
|
|
3576
|
-
type: "danger"
|
|
3577
|
-
}), wr.includes(a) && !wr.includes(i) && n({
|
|
3578
|
-
message: i,
|
|
3579
|
-
type: "danger"
|
|
3580
|
-
}), Tr.includes(a) && !Tr.includes(i) && n({
|
|
3581
|
-
message: i,
|
|
3582
|
-
type: "success"
|
|
3583
|
-
}));
|
|
3596
|
+
r && t(), s && Ce.scrollTo(s, {
|
|
3597
|
+
smooth: !0,
|
|
3598
|
+
offset: 20
|
|
3599
|
+
}), l();
|
|
3584
3600
|
}, [e]);
|
|
3585
3601
|
}
|
|
3586
3602
|
//#endregion
|
|
3587
3603
|
//#region src/providers/drawerProvider.tsx
|
|
3588
|
-
var
|
|
3589
|
-
function
|
|
3604
|
+
var kr = n({});
|
|
3605
|
+
function Ar(e) {
|
|
3590
3606
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
3591
3607
|
function i(e) {
|
|
3592
3608
|
return !!n.some((t) => t.key === e);
|
|
@@ -3606,7 +3622,7 @@ function Or(e) {
|
|
|
3606
3622
|
function s(e) {
|
|
3607
3623
|
r(n.filter((t) => t.key !== e));
|
|
3608
3624
|
}
|
|
3609
|
-
return /* @__PURE__ */ p(
|
|
3625
|
+
return /* @__PURE__ */ p(kr.Provider, {
|
|
3610
3626
|
value: {
|
|
3611
3627
|
drawerIsOpen: i,
|
|
3612
3628
|
drawerData: a,
|
|
@@ -3618,8 +3634,8 @@ function Or(e) {
|
|
|
3618
3634
|
}
|
|
3619
3635
|
//#endregion
|
|
3620
3636
|
//#region src/hooks/useDrawer.ts
|
|
3621
|
-
function
|
|
3622
|
-
let t = a(
|
|
3637
|
+
function jr(e) {
|
|
3638
|
+
let t = a(kr);
|
|
3623
3639
|
if (Object.entries(t).length === 0) throw Error("useDrawer must be used within a Provider");
|
|
3624
3640
|
if (e) {
|
|
3625
3641
|
let { drawerData: n, drawerIsOpen: r, openDrawer: i, closeDrawer: a } = t;
|
|
@@ -3633,7 +3649,7 @@ function kr(e) {
|
|
|
3633
3649
|
}
|
|
3634
3650
|
//#endregion
|
|
3635
3651
|
//#region src/hooks/useScopedParams.ts
|
|
3636
|
-
function
|
|
3652
|
+
function Mr(e, t = "") {
|
|
3637
3653
|
let n = new URLSearchParams(e), r = t ? `${t}:` : "", i = (e) => {
|
|
3638
3654
|
Object.entries(e).forEach(([e, t]) => {
|
|
3639
3655
|
t === void 0 ? n.delete(`${r}${e}`) : n.set(`${r}${e}`, String(t));
|
|
@@ -3650,8 +3666,8 @@ function Ar(e, t = "") {
|
|
|
3650
3666
|
}
|
|
3651
3667
|
//#endregion
|
|
3652
3668
|
//#region src/hooks/useSearchAutomation.ts
|
|
3653
|
-
function
|
|
3654
|
-
let { closeAll: n } =
|
|
3669
|
+
function Nr(e, t = "") {
|
|
3670
|
+
let { closeAll: n } = Sr(), { showToast: r } = Tr(), { getParam: i } = Mr(e, t), a = i("closeModal") === "true", s = i("message"), c = i("name"), l = i("type");
|
|
3655
3671
|
o(() => {
|
|
3656
3672
|
a && n(), s && (l === "success" && r({
|
|
3657
3673
|
message: s,
|
|
@@ -3659,10 +3675,10 @@ function jr(e, t = "") {
|
|
|
3659
3675
|
}), l === "danger" && r({
|
|
3660
3676
|
message: s,
|
|
3661
3677
|
type: "danger"
|
|
3662
|
-
}), c &&
|
|
3678
|
+
}), c && Er.includes(c) && !Er.includes(s) && r({
|
|
3663
3679
|
message: s,
|
|
3664
3680
|
type: "danger"
|
|
3665
|
-
}), c &&
|
|
3681
|
+
}), c && Dr.includes(c) && !Dr.includes(s) && r({
|
|
3666
3682
|
message: s,
|
|
3667
3683
|
type: "success"
|
|
3668
3684
|
}));
|
|
@@ -3675,28 +3691,28 @@ function jr(e, t = "") {
|
|
|
3675
3691
|
}
|
|
3676
3692
|
//#endregion
|
|
3677
3693
|
//#region src/providers/placesProvider.tsx
|
|
3678
|
-
var
|
|
3694
|
+
var Pr = [
|
|
3679
3695
|
"places",
|
|
3680
3696
|
"marker",
|
|
3681
3697
|
"maps"
|
|
3682
3698
|
];
|
|
3683
|
-
function
|
|
3684
|
-
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } =
|
|
3699
|
+
function Fr(e) {
|
|
3700
|
+
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } = Se({
|
|
3685
3701
|
googleMapsApiKey: t,
|
|
3686
|
-
libraries:
|
|
3702
|
+
libraries: Pr,
|
|
3687
3703
|
preventGoogleFontsLoading: r
|
|
3688
3704
|
});
|
|
3689
3705
|
return /* @__PURE__ */ p(f, { children: n(i) });
|
|
3690
3706
|
}
|
|
3691
3707
|
//#endregion
|
|
3692
3708
|
//#region src/utils/richTextUtilities.ts
|
|
3693
|
-
function
|
|
3694
|
-
if (
|
|
3709
|
+
function Ir(e) {
|
|
3710
|
+
if (pe.isText(e)) {
|
|
3695
3711
|
let t = e?.text;
|
|
3696
3712
|
return e?.bold && (t = `<strong>${t}</strong>`), e?.code && (t = `<code>${t}</code>`), e?.italic && (t = `<em>${t}</em>`), e?.underline && (t = `<u>${t}</u>`), t;
|
|
3697
3713
|
}
|
|
3698
|
-
if (
|
|
3699
|
-
let t = e.children?.map((e) =>
|
|
3714
|
+
if (de.isElement(e)) {
|
|
3715
|
+
let t = e.children?.map((e) => Ir(e)).join(""), n = e.align || "left";
|
|
3700
3716
|
switch (e.type) {
|
|
3701
3717
|
case "video": return `<iframe src="${e.src}" class="align_${n}" />`;
|
|
3702
3718
|
case "image": return `<img src="${e.src}" class="align_${n}" />`;
|
|
@@ -3712,9 +3728,9 @@ function Pr(e) {
|
|
|
3712
3728
|
}
|
|
3713
3729
|
return "";
|
|
3714
3730
|
}
|
|
3715
|
-
function
|
|
3731
|
+
function Lr(e) {
|
|
3716
3732
|
if (typeof e == "string") return { text: e };
|
|
3717
|
-
let t = Array.isArray(e.props.children) ? e.props.children.map((e) =>
|
|
3733
|
+
let t = Array.isArray(e.props.children) ? e.props.children.map((e) => Lr(e)) : [{ text: e.props.children || "" }], n = e.props.className?.replace("align_", "");
|
|
3718
3734
|
switch (e.type) {
|
|
3719
3735
|
case "img": return {
|
|
3720
3736
|
type: "image",
|
|
@@ -3778,14 +3794,14 @@ function Fr(e) {
|
|
|
3778
3794
|
}
|
|
3779
3795
|
//#endregion
|
|
3780
3796
|
//#region src/services/toHtml.ts
|
|
3781
|
-
function
|
|
3782
|
-
return e.map((e) =>
|
|
3797
|
+
function Rr(e) {
|
|
3798
|
+
return e.map((e) => Ir(e)).join("");
|
|
3783
3799
|
}
|
|
3784
3800
|
//#endregion
|
|
3785
3801
|
//#region src/services/toRichTextValue.ts
|
|
3786
|
-
function
|
|
3787
|
-
let t =
|
|
3788
|
-
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } :
|
|
3802
|
+
function zr(e) {
|
|
3803
|
+
let t = Ee(e);
|
|
3804
|
+
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } : Lr(e)) : typeof t == "string" ? [{ text: t }] : [Lr(t)];
|
|
3789
3805
|
}
|
|
3790
3806
|
//#endregion
|
|
3791
|
-
export {
|
|
3807
|
+
export { Ae as AlertContainer, je as AlertContent, Me as AlertDescription, Ne as AlertIcon, De as AlertTitle, Ie as AudioPlayer, qe as AudioUpload, Je as Badge, Q as Button, gt as Calendar, bt as CardTabButton, xt as CardTabContainer, St as Checkbox, Tt as ClientOnly, Ot as CurrencyInput, He as Divider, Mt as DrawerContainer, Nt as DrawerHeader, Ar as DrawerProvider, It as FacebookPixel, ze as FieldError, Be as FieldLabel, Ve as FieldWrapper, zt as FileUpload, Re as FormProvider, Ut as GoogleAnalytics, Jt as GoogleTagManager, Ue as IconButton, Zt as ImageUpload, ot as Input, en as MapView, nn as MaskedInput, sn as ModalContainer, cn as ModalFooter, ln as ModalHeader, xr as ModalProvider, vn as MultiSelect, wn as Pagination, Ln as PhoneInput, Fr as PlacesProvider, Rn as Popover, Hn as RadioBox, Un as RadioGroup, dr as RichText, fr as SearchPlaces, ut as Select, Fe as Slider, pr as Switch, tr as TabButton, nr as TabContainer, mr as TableBody, hr as TableCaption, gr as TableContainer, _r as TableFooter, vr as TableHeader, yr as Textarea, wr as ToastProvider, We as Tooltip, Rr as toHtml, zr as toRichTextValue, Or as useAutomation, jr as useDrawer, X as useForm, wt as useHydrated, Sr as useModal, Mr as useScopedParams, at as useScrollLock, Nr as useSearchAutomation, Pe as useSlider, Tr as useToast };
|