snapflow-ui-kit 1.2.10 → 1.2.16
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/icons/DesktopIcon/DesktopIcon.d.ts +6 -0
- package/dist/icons/DesktopIcon/index.d.ts +1 -0
- package/dist/icons/SmartphoneIcon/SmartphoneIcon.d.ts +6 -0
- package/dist/icons/SmartphoneIcon/index.d.ts +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons.js +126 -46
- package/dist/icons.js.map +1 -1
- package/dist/index.client.js +204 -204
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/dist/index.client.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import z, { clsx as C } from "clsx";
|
|
3
|
-
import { clsx as
|
|
3
|
+
import { clsx as Rn } from "clsx";
|
|
4
4
|
import ge from "simplebar-react";
|
|
5
|
-
import { default as
|
|
6
|
-
import { A as se, s as
|
|
7
|
-
import { B as
|
|
8
|
-
import { jsx as n, jsxs as
|
|
9
|
-
import { useEffect as k, useState as j, useRef as
|
|
5
|
+
import { default as Bn } from "simplebar-react";
|
|
6
|
+
import { A as se, s as Q, c as te } from "./Textarea-6m6FiIv5.js";
|
|
7
|
+
import { B as Ln, C as Mn, a as An, L as Fn, R as Vn, T as Wn, b as Qn } from "./Textarea-6m6FiIv5.js";
|
|
8
|
+
import { jsx as n, jsxs as u, Fragment as ce } from "react/jsx-runtime";
|
|
9
|
+
import { useEffect as k, useState as j, useRef as T, useCallback as K, useMemo as ne, forwardRef as we, useId as ie } from "react";
|
|
10
10
|
import { A as ye, C as be, E as ve, a as Ce, b as Ne, c as Ie } from "./ArrowRightIcon-D0SDyfKt.js";
|
|
11
11
|
import { DayPicker as oe } from "react-day-picker";
|
|
12
|
-
import { format as
|
|
12
|
+
import { format as M, parse as A, isValid as F } from "date-fns";
|
|
13
13
|
import { C as le } from "./CloseIcon-CqK3tPnG.js";
|
|
14
|
-
import * as
|
|
14
|
+
import * as R from "@radix-ui/react-dropdown-menu";
|
|
15
15
|
import { createPortal as Se } from "react-dom";
|
|
16
16
|
import { FocusTrap as ke } from "focus-trap-react";
|
|
17
|
-
import { toast as
|
|
17
|
+
import { toast as G } from "react-hot-toast";
|
|
18
18
|
const Sn = (e) => {
|
|
19
|
-
|
|
19
|
+
G.custom((t) => /* @__PURE__ */ n(
|
|
20
20
|
se,
|
|
21
21
|
{
|
|
22
22
|
variant: "success",
|
|
23
23
|
message: e,
|
|
24
|
-
className: t.visible ?
|
|
25
|
-
onClose: () =>
|
|
24
|
+
className: t.visible ? Q.toastEnter : Q.toastExit,
|
|
25
|
+
onClose: () => G.dismiss(t.id)
|
|
26
26
|
}
|
|
27
27
|
));
|
|
28
28
|
}, kn = (e, t) => {
|
|
29
|
-
|
|
29
|
+
G.custom((a) => /* @__PURE__ */ n(
|
|
30
30
|
se,
|
|
31
31
|
{
|
|
32
32
|
variant: "error",
|
|
33
33
|
title: t,
|
|
34
34
|
message: e,
|
|
35
|
-
className:
|
|
36
|
-
onClose: () =>
|
|
35
|
+
className: a.visible ? Q.toastEnter : Q.toastExit,
|
|
36
|
+
onClose: () => G.dismiss(a.id)
|
|
37
37
|
}
|
|
38
38
|
));
|
|
39
|
-
}, De = "
|
|
39
|
+
}, De = "_wrapper_12ea5_1", xe = "_inputContainer_12ea5_5", Ee = "_label_12ea5_11", je = "_inputWrapper_12ea5_15", Oe = "_trigger_12ea5_22", Pe = "_icon_12ea5_36", Re = "_placeholder_12ea5_43", Te = "_clearButton_12ea5_47", Be = "_clearIcon_12ea5_86", $e = "_disabledLabel_12ea5_98", Le = "_error_12ea5_102", Me = "_calendar_12ea5_139", Ae = "_open_12ea5_159", Fe = "_monthsCaption_12ea5_165", Ve = "_navButtonPrevious_12ea5_171", We = "_navButtonNext_12ea5_172", Qe = "_navIcon_12ea5_197", Ge = "_monthGrid_12ea5_203", qe = "_dropdowns_12ea5_209", He = "_weekday_12ea5_213", ze = "_day_12ea5_224", Ke = "_dayButton_12ea5_231", Xe = "_dayOutside_12ea5_258", Ye = "_dayToday_12ea5_262", Je = "_daySelected_12ea5_267", Ue = "_dayRangeStart_12ea5_268", Ze = "_dayRangeEnd_12ea5_269", et = "_dayRangeMiddle_12ea5_270", r = {
|
|
40
40
|
wrapper: De,
|
|
41
41
|
inputContainer: xe,
|
|
42
42
|
label: Ee,
|
|
43
43
|
inputWrapper: je,
|
|
44
44
|
trigger: Oe,
|
|
45
|
-
icon:
|
|
46
|
-
placeholder:
|
|
47
|
-
clearButton:
|
|
48
|
-
clearIcon:
|
|
49
|
-
disabledLabel:
|
|
50
|
-
error:
|
|
51
|
-
calendar:
|
|
52
|
-
open:
|
|
53
|
-
monthsCaption:
|
|
54
|
-
navButtonPrevious:
|
|
55
|
-
navButtonNext:
|
|
56
|
-
navIcon:
|
|
57
|
-
monthGrid:
|
|
58
|
-
dropdowns:
|
|
45
|
+
icon: Pe,
|
|
46
|
+
placeholder: Re,
|
|
47
|
+
clearButton: Te,
|
|
48
|
+
clearIcon: Be,
|
|
49
|
+
disabledLabel: $e,
|
|
50
|
+
error: Le,
|
|
51
|
+
calendar: Me,
|
|
52
|
+
open: Ae,
|
|
53
|
+
monthsCaption: Fe,
|
|
54
|
+
navButtonPrevious: Ve,
|
|
55
|
+
navButtonNext: We,
|
|
56
|
+
navIcon: Qe,
|
|
57
|
+
monthGrid: Ge,
|
|
58
|
+
dropdowns: qe,
|
|
59
59
|
weekday: He,
|
|
60
60
|
day: ze,
|
|
61
61
|
dayButton: Ke,
|
|
@@ -68,32 +68,32 @@ const Sn = (e) => {
|
|
|
68
68
|
}, tt = ({
|
|
69
69
|
ref: e,
|
|
70
70
|
isOpen: t,
|
|
71
|
-
onDismiss:
|
|
71
|
+
onDismiss: a
|
|
72
72
|
}) => {
|
|
73
73
|
k(() => {
|
|
74
74
|
if (!t) return;
|
|
75
75
|
const o = (s) => {
|
|
76
|
-
e.current && !e.current.contains(s.target) &&
|
|
76
|
+
e.current && !e.current.contains(s.target) && a();
|
|
77
77
|
}, i = (s) => {
|
|
78
|
-
s.key === "Escape" &&
|
|
78
|
+
s.key === "Escape" && a();
|
|
79
79
|
};
|
|
80
80
|
return document.addEventListener("mousedown", o), document.addEventListener("touchstart", o), document.addEventListener("keydown", i), () => {
|
|
81
81
|
document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o), document.removeEventListener("keydown", i);
|
|
82
82
|
};
|
|
83
|
-
}, [t,
|
|
84
|
-
}, nt = "_container_sn15j_1", ot = "_label_sn15j_7",
|
|
83
|
+
}, [t, a, e]);
|
|
84
|
+
}, nt = "_container_sn15j_1", ot = "_label_sn15j_7", at = "_trigger_sn15j_14", rt = "_select_sn15j_18", st = "_triggerOpen_sn15j_50", ct = "_placeholder_sn15j_71", it = "_selectedContent_sn15j_75", lt = "_optionIcon_sn15j_85", dt = "_arrow_sn15j_91", _t = "_open_sn15j_106", pt = "_dropdown_sn15j_110", ut = "_searchContainer_sn15j_131", mt = "_searchInput_sn15j_141", ht = "_option_sn15j_85", ft = "_selected_sn15j_75", gt = "_noOptions_sn15j_202", p = {
|
|
85
85
|
container: nt,
|
|
86
86
|
label: ot,
|
|
87
|
-
trigger:
|
|
88
|
-
select:
|
|
87
|
+
trigger: at,
|
|
88
|
+
select: rt,
|
|
89
89
|
triggerOpen: st,
|
|
90
90
|
placeholder: ct,
|
|
91
91
|
selectedContent: it,
|
|
92
92
|
optionIcon: lt,
|
|
93
93
|
arrow: dt,
|
|
94
|
-
open:
|
|
95
|
-
dropdown:
|
|
96
|
-
searchContainer:
|
|
94
|
+
open: _t,
|
|
95
|
+
dropdown: pt,
|
|
96
|
+
searchContainer: ut,
|
|
97
97
|
searchInput: mt,
|
|
98
98
|
option: ht,
|
|
99
99
|
selected: ft,
|
|
@@ -101,7 +101,7 @@ const Sn = (e) => {
|
|
|
101
101
|
}, wt = ({
|
|
102
102
|
filteredOptions: e,
|
|
103
103
|
isLoading: t,
|
|
104
|
-
loadingText:
|
|
104
|
+
loadingText: a,
|
|
105
105
|
noOptionsText: o,
|
|
106
106
|
onSearchChange: i,
|
|
107
107
|
onSelect: s,
|
|
@@ -110,36 +110,36 @@ const Sn = (e) => {
|
|
|
110
110
|
searchQuery: m,
|
|
111
111
|
searchable: y,
|
|
112
112
|
value: f
|
|
113
|
-
}) => /* @__PURE__ */
|
|
114
|
-
y && /* @__PURE__ */ n("div", { className:
|
|
113
|
+
}) => /* @__PURE__ */ u(ce, { children: [
|
|
114
|
+
y && /* @__PURE__ */ n("div", { className: p.searchContainer, children: /* @__PURE__ */ n(
|
|
115
115
|
"input",
|
|
116
116
|
{
|
|
117
117
|
ref: c,
|
|
118
|
-
className:
|
|
118
|
+
className: p.searchInput,
|
|
119
119
|
onChange: (l) => i(l.currentTarget.value),
|
|
120
120
|
placeholder: d,
|
|
121
121
|
type: "text",
|
|
122
122
|
value: m
|
|
123
123
|
}
|
|
124
124
|
) }),
|
|
125
|
-
t && /* @__PURE__ */ n("p", { className:
|
|
126
|
-
e.length ? e.map((l) => /* @__PURE__ */
|
|
125
|
+
t && /* @__PURE__ */ n("p", { className: p.noOptions, children: a }),
|
|
126
|
+
e.length ? e.map((l) => /* @__PURE__ */ u(
|
|
127
127
|
"button",
|
|
128
128
|
{
|
|
129
|
-
className: C(
|
|
129
|
+
className: C(p.option, l.value === f && p.selected),
|
|
130
130
|
onClick: () => s(l.value),
|
|
131
131
|
type: "button",
|
|
132
132
|
role: "option",
|
|
133
133
|
"aria-selected": l.value === f,
|
|
134
134
|
children: [
|
|
135
|
-
l.icon && /* @__PURE__ */ n("span", { className:
|
|
135
|
+
l.icon && /* @__PURE__ */ n("span", { className: p.optionIcon, children: l.icon }),
|
|
136
136
|
l.label
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
139
|
l.value
|
|
140
|
-
)) : t ? null : /* @__PURE__ */ n("p", { className:
|
|
141
|
-
] }),
|
|
142
|
-
const [
|
|
140
|
+
)) : t ? null : /* @__PURE__ */ n("p", { className: p.noOptions, children: o })
|
|
141
|
+
] }), ae = (e, t) => {
|
|
142
|
+
const [a, o] = j(e);
|
|
143
143
|
return k(() => {
|
|
144
144
|
const i = setTimeout(() => {
|
|
145
145
|
o(e);
|
|
@@ -147,11 +147,11 @@ const Sn = (e) => {
|
|
|
147
147
|
return () => {
|
|
148
148
|
clearTimeout(i);
|
|
149
149
|
};
|
|
150
|
-
}, [t, e]),
|
|
150
|
+
}, [t, e]), a;
|
|
151
151
|
}, yt = (e) => {
|
|
152
152
|
const {
|
|
153
153
|
className: t,
|
|
154
|
-
defaultSearchValue:
|
|
154
|
+
defaultSearchValue: a = "",
|
|
155
155
|
disabled: o = !1,
|
|
156
156
|
filterOptions: i,
|
|
157
157
|
isLoading: s = !1,
|
|
@@ -166,59 +166,59 @@ const Sn = (e) => {
|
|
|
166
166
|
searchMode: D = "local",
|
|
167
167
|
searchPlaceholder: x = "Search...",
|
|
168
168
|
searchValue: h,
|
|
169
|
-
searchable:
|
|
169
|
+
searchable: _ = !1,
|
|
170
170
|
value: S
|
|
171
|
-
} = e, [b, N] = j(!1), [
|
|
171
|
+
} = e, [b, N] = j(!1), [B, X] = j(h ?? a), q = T(null), Y = T(null), J = T(!0), U = h !== void 0 ? h : B, _e = ae(U, w), Z = ae(B, w), pe = i ?? D === "local", P = l.find((E) => E.value === S), ee = _e.trim().toLowerCase(), ue = pe && ee ? l.filter((E) => E.label.toLowerCase().includes(ee)) : l, H = K(() => {
|
|
172
172
|
X("");
|
|
173
|
-
}, []),
|
|
173
|
+
}, []), $ = K(() => {
|
|
174
174
|
N(!1), H();
|
|
175
175
|
}, [H]), me = () => {
|
|
176
|
-
o || (b ?
|
|
176
|
+
o || (b ? $() : (H(), N(!0)));
|
|
177
177
|
}, he = (E) => {
|
|
178
|
-
y?.(E),
|
|
178
|
+
y?.(E), $();
|
|
179
179
|
};
|
|
180
180
|
return k(() => {
|
|
181
181
|
const E = (fe) => {
|
|
182
|
-
|
|
182
|
+
q.current && !q.current.contains(fe.target) && $();
|
|
183
183
|
};
|
|
184
184
|
return b && document.addEventListener("mousedown", E), () => {
|
|
185
185
|
document.removeEventListener("mousedown", E);
|
|
186
186
|
};
|
|
187
|
-
}, [
|
|
188
|
-
if (!(!
|
|
187
|
+
}, [$, b]), k(() => {
|
|
188
|
+
if (!(!_ || !f)) {
|
|
189
189
|
if (J.current) {
|
|
190
190
|
J.current = !1;
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
f(Z);
|
|
194
194
|
}
|
|
195
|
-
}, [Z, f,
|
|
196
|
-
b &&
|
|
197
|
-
}, [b,
|
|
198
|
-
c && /* @__PURE__ */ n("label", { className:
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
195
|
+
}, [Z, f, _]), k(() => {
|
|
196
|
+
b && _ && Y.current?.focus();
|
|
197
|
+
}, [b, _]), /* @__PURE__ */ u("div", { className: C(p.container, t), children: [
|
|
198
|
+
c && /* @__PURE__ */ n("label", { className: p.label, children: c }),
|
|
199
|
+
/* @__PURE__ */ u("div", { className: p.select, ref: q, children: [
|
|
200
|
+
/* @__PURE__ */ u(
|
|
201
201
|
"button",
|
|
202
202
|
{
|
|
203
|
-
className: C(
|
|
203
|
+
className: C(p.trigger, b && p.triggerOpen),
|
|
204
204
|
disabled: o,
|
|
205
205
|
onClick: me,
|
|
206
206
|
type: "button",
|
|
207
207
|
"aria-haspopup": "listbox",
|
|
208
208
|
"aria-expanded": b,
|
|
209
209
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
/* @__PURE__ */ u("span", { className: P ? p.selectedContent : p.placeholder, children: [
|
|
211
|
+
P?.icon && /* @__PURE__ */ n("span", { className: p.optionIcon, children: P.icon }),
|
|
212
|
+
P ? P.label : g || "Select an option"
|
|
213
213
|
] }),
|
|
214
|
-
/* @__PURE__ */ n("span", { className: C(
|
|
214
|
+
/* @__PURE__ */ n("span", { className: C(p.arrow, b && p.open), children: /* @__PURE__ */ n(ye, {}) })
|
|
215
215
|
]
|
|
216
216
|
}
|
|
217
217
|
),
|
|
218
|
-
b && /* @__PURE__ */ n(ge, { className:
|
|
218
|
+
b && /* @__PURE__ */ n(ge, { className: p.dropdown, role: "listbox", style: { maxHeight: 191 }, children: /* @__PURE__ */ n(
|
|
219
219
|
wt,
|
|
220
220
|
{
|
|
221
|
-
filteredOptions:
|
|
221
|
+
filteredOptions: ue,
|
|
222
222
|
isLoading: s,
|
|
223
223
|
loadingText: d,
|
|
224
224
|
noOptionsText: m,
|
|
@@ -227,7 +227,7 @@ const Sn = (e) => {
|
|
|
227
227
|
searchInputRef: Y,
|
|
228
228
|
searchPlaceholder: x,
|
|
229
229
|
searchQuery: U,
|
|
230
|
-
searchable:
|
|
230
|
+
searchable: _,
|
|
231
231
|
value: S
|
|
232
232
|
}
|
|
233
233
|
) })
|
|
@@ -243,7 +243,7 @@ const Sn = (e) => {
|
|
|
243
243
|
};
|
|
244
244
|
e.onChange(i);
|
|
245
245
|
}
|
|
246
|
-
},
|
|
246
|
+
}, a = e.options?.map((o) => ({
|
|
247
247
|
value: o.value.toString(),
|
|
248
248
|
label: o.label
|
|
249
249
|
})) || [];
|
|
@@ -251,7 +251,7 @@ const Sn = (e) => {
|
|
|
251
251
|
yt,
|
|
252
252
|
{
|
|
253
253
|
className: e.className,
|
|
254
|
-
options:
|
|
254
|
+
options: a,
|
|
255
255
|
value: e.value?.toString() || "",
|
|
256
256
|
onChange: t
|
|
257
257
|
}
|
|
@@ -259,27 +259,27 @@ const Sn = (e) => {
|
|
|
259
259
|
};
|
|
260
260
|
de.displayName = "DatePickerDropdown";
|
|
261
261
|
const bt = {
|
|
262
|
-
month_caption:
|
|
263
|
-
button_previous:
|
|
264
|
-
button_next:
|
|
265
|
-
chevron:
|
|
266
|
-
caption_label:
|
|
267
|
-
dropdowns:
|
|
268
|
-
dropdown_root:
|
|
269
|
-
dropdown:
|
|
270
|
-
dropdown_select_option:
|
|
271
|
-
months_dropdown:
|
|
272
|
-
years_dropdown:
|
|
273
|
-
month_grid:
|
|
274
|
-
weekday:
|
|
275
|
-
day_button:
|
|
276
|
-
day:
|
|
277
|
-
outside:
|
|
278
|
-
selected:
|
|
279
|
-
range_start:
|
|
280
|
-
range_middle:
|
|
281
|
-
range_end:
|
|
282
|
-
today:
|
|
262
|
+
month_caption: r.monthsCaption,
|
|
263
|
+
button_previous: r.navButtonPrevious,
|
|
264
|
+
button_next: r.navButtonNext,
|
|
265
|
+
chevron: r.navIcon,
|
|
266
|
+
caption_label: r.captionLabel,
|
|
267
|
+
dropdowns: r.dropdowns,
|
|
268
|
+
dropdown_root: r.dropdown_root,
|
|
269
|
+
dropdown: r.dropdown,
|
|
270
|
+
dropdown_select_option: r.option,
|
|
271
|
+
months_dropdown: r.monthsDropdown,
|
|
272
|
+
years_dropdown: r.yearsDropdown,
|
|
273
|
+
month_grid: r.monthGrid,
|
|
274
|
+
weekday: r.weekday,
|
|
275
|
+
day_button: r.dayButton,
|
|
276
|
+
day: r.day,
|
|
277
|
+
outside: r.dayOutside,
|
|
278
|
+
selected: r.daySelected,
|
|
279
|
+
range_start: r.dayRangeStart,
|
|
280
|
+
range_middle: r.dayRangeMiddle,
|
|
281
|
+
range_end: r.dayRangeEnd,
|
|
282
|
+
today: r.dayToday
|
|
283
283
|
}, vt = {
|
|
284
284
|
Dropdown: de
|
|
285
285
|
}, Ct = {
|
|
@@ -293,71 +293,71 @@ const bt = {
|
|
|
293
293
|
}, It = (e) => ({
|
|
294
294
|
...Nt,
|
|
295
295
|
classNames: {
|
|
296
|
-
root: z(
|
|
296
|
+
root: z(r.calendar, e && r.open),
|
|
297
297
|
...bt
|
|
298
298
|
}
|
|
299
|
-
}),
|
|
299
|
+
}), V = "dd.MM.yyyy", St = (e) => e ? M(e, V) : "", kt = (e) => !e || !e.from ? "" : e.to && e.from.getTime() !== e.to.getTime() ? `${M(e.from, V)} - ${M(e.to, V)}` : M(e.from, V), re = (e, t) => e ? t === "single" && e instanceof Date ? St(e) : t === "range" && typeof e == "object" && "from" in e ? kt(e) : "" : "", Dt = ({
|
|
300
300
|
value: e,
|
|
301
301
|
mode: t,
|
|
302
|
-
onChange:
|
|
302
|
+
onChange: a,
|
|
303
303
|
setMonth: o,
|
|
304
304
|
setIsOpen: i
|
|
305
305
|
}) => {
|
|
306
306
|
if (!e) {
|
|
307
|
-
|
|
307
|
+
a("");
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
if (t === "single") {
|
|
311
|
-
e instanceof Date && (o(e),
|
|
311
|
+
e instanceof Date && (o(e), a(re(e, "single")), i(!1));
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
314
|
if (t === "range" && typeof e == "object" && "from" in e) {
|
|
315
315
|
const s = e;
|
|
316
316
|
s.from ? o(s.from) : s.to && o(s.to);
|
|
317
|
-
const c =
|
|
318
|
-
|
|
317
|
+
const c = re(s, "range");
|
|
318
|
+
a(c), s.from && s.to && s.from.getTime() !== s.to.getTime() && i(!1);
|
|
319
319
|
}
|
|
320
|
-
},
|
|
320
|
+
}, W = "dd.MM.yyyy", xt = (e) => {
|
|
321
321
|
if (!e) return;
|
|
322
|
-
const t =
|
|
323
|
-
return
|
|
322
|
+
const t = A(e, W, /* @__PURE__ */ new Date());
|
|
323
|
+
return F(t) ? t : void 0;
|
|
324
324
|
}, Et = (e) => {
|
|
325
325
|
if (!e) return;
|
|
326
|
-
const t = " - ",
|
|
327
|
-
if (
|
|
328
|
-
const d =
|
|
329
|
-
return
|
|
326
|
+
const t = " - ", a = e.indexOf(t);
|
|
327
|
+
if (a === -1) {
|
|
328
|
+
const d = A(e.trim(), W, /* @__PURE__ */ new Date());
|
|
329
|
+
return F(d) ? { from: d, to: void 0 } : void 0;
|
|
330
330
|
}
|
|
331
|
-
const o = e.substring(0,
|
|
331
|
+
const o = e.substring(0, a).trim(), i = e.substring(a + t.length).trim();
|
|
332
332
|
if (!o || !i) return;
|
|
333
|
-
const s =
|
|
334
|
-
if (
|
|
333
|
+
const s = A(o, W, /* @__PURE__ */ new Date()), c = A(i, W, /* @__PURE__ */ new Date());
|
|
334
|
+
if (F(s) && F(c))
|
|
335
335
|
return { from: s, to: c };
|
|
336
336
|
}, jt = (e, t) => {
|
|
337
337
|
if (e)
|
|
338
338
|
return t === "single" ? xt(e) : Et(e);
|
|
339
|
-
}, Ot = (e, t,
|
|
339
|
+
}, Ot = (e, t, a) => {
|
|
340
340
|
if (e) {
|
|
341
341
|
if (t === "single" && e instanceof Date) {
|
|
342
|
-
|
|
342
|
+
a(e);
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
345
|
if (t === "range" && typeof e == "object" && "from" in e) {
|
|
346
346
|
const o = e;
|
|
347
|
-
o.from ?
|
|
347
|
+
o.from ? a(o.from) : o.to && a(o.to);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}, Dn = ({
|
|
351
351
|
mode: e,
|
|
352
352
|
value: t,
|
|
353
|
-
onChange:
|
|
353
|
+
onChange: a,
|
|
354
354
|
disabled: o,
|
|
355
355
|
label: i,
|
|
356
356
|
error: s,
|
|
357
357
|
placeholder: c,
|
|
358
358
|
...d
|
|
359
359
|
}) => {
|
|
360
|
-
const [m, y] = j(!1), f =
|
|
360
|
+
const [m, y] = j(!1), f = T(null), [l, g] = j(/* @__PURE__ */ new Date()), w = ne(() => jt(t, e), [t, e]);
|
|
361
361
|
k(() => {
|
|
362
362
|
Ot(w, e, g);
|
|
363
363
|
}, [w, e, g]), tt({ ref: f, isOpen: m, onDismiss: () => {
|
|
@@ -367,30 +367,30 @@ const bt = {
|
|
|
367
367
|
N.stopPropagation(), S(void 0);
|
|
368
368
|
}, h = () => {
|
|
369
369
|
o || y((N) => !N);
|
|
370
|
-
},
|
|
371
|
-
const
|
|
372
|
-
|
|
370
|
+
}, _ = (N) => {
|
|
371
|
+
const B = N.currentTarget.value;
|
|
372
|
+
a(B);
|
|
373
373
|
}, S = (N) => {
|
|
374
374
|
Dt({
|
|
375
375
|
value: N,
|
|
376
376
|
mode: e,
|
|
377
|
-
onChange:
|
|
377
|
+
onChange: a,
|
|
378
378
|
setMonth: g,
|
|
379
379
|
setIsOpen: y
|
|
380
380
|
});
|
|
381
381
|
}, b = ne(() => It(m), [m]);
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
i && /* @__PURE__ */ n("span", { className: o ?
|
|
385
|
-
/* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ u("div", { ref: f, className: r.wrapper, children: [
|
|
383
|
+
/* @__PURE__ */ u("div", { className: r.inputContainer, children: [
|
|
384
|
+
i && /* @__PURE__ */ n("span", { className: o ? r.disabledLabel : r.label, children: /* @__PURE__ */ n(te, { variant: "text-14", children: i }) }),
|
|
385
|
+
/* @__PURE__ */ u("div", { className: r.inputWrapper, children: [
|
|
386
386
|
/* @__PURE__ */ n(
|
|
387
387
|
"input",
|
|
388
388
|
{
|
|
389
389
|
type: "text",
|
|
390
|
-
className: z(
|
|
390
|
+
className: z(r.trigger, s && r.error),
|
|
391
391
|
onClick: h,
|
|
392
392
|
value: t,
|
|
393
|
-
onChange:
|
|
393
|
+
onChange: _,
|
|
394
394
|
placeholder: c,
|
|
395
395
|
disabled: o,
|
|
396
396
|
"aria-label": i || "Select date",
|
|
@@ -404,15 +404,15 @@ const bt = {
|
|
|
404
404
|
"button",
|
|
405
405
|
{
|
|
406
406
|
type: "button",
|
|
407
|
-
className:
|
|
407
|
+
className: r.clearButton,
|
|
408
408
|
onClick: x,
|
|
409
409
|
"aria-label": "Clear date",
|
|
410
|
-
children: /* @__PURE__ */ n(le, { className:
|
|
410
|
+
children: /* @__PURE__ */ n(le, { className: r.clearIcon })
|
|
411
411
|
}
|
|
412
412
|
),
|
|
413
|
-
/* @__PURE__ */ n(be, { className: z(
|
|
413
|
+
/* @__PURE__ */ n(be, { className: z(r.icon, !t && r.placeholder) })
|
|
414
414
|
] }),
|
|
415
|
-
s && /* @__PURE__ */ n(te, { variant: "small", className:
|
|
415
|
+
s && /* @__PURE__ */ n(te, { variant: "small", className: r.error, children: s })
|
|
416
416
|
] }),
|
|
417
417
|
e === "single" ? /* @__PURE__ */ n(
|
|
418
418
|
oe,
|
|
@@ -436,31 +436,31 @@ const bt = {
|
|
|
436
436
|
}
|
|
437
437
|
)
|
|
438
438
|
] });
|
|
439
|
-
},
|
|
440
|
-
content:
|
|
441
|
-
item:
|
|
442
|
-
icon:
|
|
443
|
-
label:
|
|
439
|
+
}, Pt = "_content_1bas8_1", Rt = "_item_1bas8_24", Tt = "_icon_1bas8_56", Bt = "_label_1bas8_62", L = {
|
|
440
|
+
content: Pt,
|
|
441
|
+
item: Rt,
|
|
442
|
+
icon: Tt,
|
|
443
|
+
label: Bt
|
|
444
444
|
}, xn = (e) => {
|
|
445
|
-
const { children: t, items:
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */ n(
|
|
448
|
-
/* @__PURE__ */ n(
|
|
449
|
-
|
|
445
|
+
const { children: t, items: a, className: o, align: i = "end", side: s = "bottom" } = e;
|
|
446
|
+
return /* @__PURE__ */ u(R.Root, { children: [
|
|
447
|
+
/* @__PURE__ */ n(R.Trigger, { asChild: !0, children: t }),
|
|
448
|
+
/* @__PURE__ */ n(R.Portal, { children: /* @__PURE__ */ n(
|
|
449
|
+
R.Content,
|
|
450
450
|
{
|
|
451
451
|
align: i,
|
|
452
|
-
className: C(
|
|
452
|
+
className: C(L.content, o),
|
|
453
453
|
side: s,
|
|
454
454
|
sideOffset: 4,
|
|
455
|
-
children:
|
|
456
|
-
|
|
455
|
+
children: a.map((c, d) => /* @__PURE__ */ u(
|
|
456
|
+
R.Item,
|
|
457
457
|
{
|
|
458
|
-
className:
|
|
458
|
+
className: L.item,
|
|
459
459
|
disabled: c.disabled,
|
|
460
460
|
onSelect: c.onSelect,
|
|
461
461
|
children: [
|
|
462
|
-
c.icon && /* @__PURE__ */ n("span", { className:
|
|
463
|
-
/* @__PURE__ */ n("span", { className:
|
|
462
|
+
c.icon && /* @__PURE__ */ n("span", { className: L.icon, children: c.icon }),
|
|
463
|
+
/* @__PURE__ */ n("span", { className: L.label, children: c.label })
|
|
464
464
|
]
|
|
465
465
|
},
|
|
466
466
|
d
|
|
@@ -468,24 +468,24 @@ const bt = {
|
|
|
468
468
|
}
|
|
469
469
|
) })
|
|
470
470
|
] });
|
|
471
|
-
},
|
|
472
|
-
wrapper:
|
|
473
|
-
label:
|
|
474
|
-
disabled:
|
|
475
|
-
input:
|
|
476
|
-
inputContainer:
|
|
477
|
-
error:
|
|
478
|
-
withStartIcon:
|
|
479
|
-
withEndIcon:
|
|
480
|
-
startIcon:
|
|
481
|
-
endIcon:
|
|
471
|
+
}, $t = "_wrapper_gp2gj_1", Lt = "_label_gp2gj_7", Mt = "_disabled_gp2gj_14", At = "_input_gp2gj_18", Ft = "_inputContainer_gp2gj_22", Vt = "_error_gp2gj_47", Wt = "_withStartIcon_gp2gj_64", Qt = "_withEndIcon_gp2gj_68", Gt = "_startIcon_gp2gj_85", qt = "_endIcon_gp2gj_86", Ht = "_errorMessage_gp2gj_137", zt = "_required_gp2gj_144", v = {
|
|
472
|
+
wrapper: $t,
|
|
473
|
+
label: Lt,
|
|
474
|
+
disabled: Mt,
|
|
475
|
+
input: At,
|
|
476
|
+
inputContainer: Ft,
|
|
477
|
+
error: Vt,
|
|
478
|
+
withStartIcon: Wt,
|
|
479
|
+
withEndIcon: Qt,
|
|
480
|
+
startIcon: Gt,
|
|
481
|
+
endIcon: qt,
|
|
482
482
|
errorMessage: Ht,
|
|
483
483
|
required: zt
|
|
484
484
|
}, Kt = we(
|
|
485
485
|
({
|
|
486
486
|
label: e,
|
|
487
487
|
errorMessage: t,
|
|
488
|
-
startIcon:
|
|
488
|
+
startIcon: a,
|
|
489
489
|
endIcon: o,
|
|
490
490
|
onEndIconClick: i,
|
|
491
491
|
allowPasswordToggle: s,
|
|
@@ -496,30 +496,30 @@ const bt = {
|
|
|
496
496
|
id: f,
|
|
497
497
|
...l
|
|
498
498
|
}, g) => {
|
|
499
|
-
const w = ie(), D = f ?? w, x = t ? `${D}-error` : void 0, h = !!t,
|
|
500
|
-
return /* @__PURE__ */
|
|
501
|
-
e && /* @__PURE__ */
|
|
499
|
+
const w = ie(), D = f ?? w, x = t ? `${D}-error` : void 0, h = !!t, _ = d === "password" && s, [S, b] = j(!1);
|
|
500
|
+
return /* @__PURE__ */ u("div", { className: C(v.wrapper, m), children: [
|
|
501
|
+
e && /* @__PURE__ */ u("label", { htmlFor: D, className: C(v.label, { [v.disabled]: c }), children: [
|
|
502
502
|
e,
|
|
503
503
|
y && /* @__PURE__ */ n("sup", { className: v.required, children: " *" })
|
|
504
504
|
] }),
|
|
505
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ u(
|
|
506
506
|
"div",
|
|
507
507
|
{
|
|
508
508
|
className: C(v.inputContainer, {
|
|
509
509
|
[v.error]: h,
|
|
510
510
|
[v.disabled]: c,
|
|
511
|
-
[v.withStartIcon]: !!
|
|
512
|
-
[v.withEndIcon]: !!o ||
|
|
511
|
+
[v.withStartIcon]: !!a,
|
|
512
|
+
[v.withEndIcon]: !!o || _
|
|
513
513
|
}),
|
|
514
514
|
children: [
|
|
515
|
-
|
|
515
|
+
a && /* @__PURE__ */ n("span", { className: v.startIcon, children: a }),
|
|
516
516
|
/* @__PURE__ */ n(
|
|
517
517
|
"input",
|
|
518
518
|
{
|
|
519
519
|
ref: g,
|
|
520
520
|
id: D,
|
|
521
521
|
className: v.input,
|
|
522
|
-
type:
|
|
522
|
+
type: _ && S ? "text" : d,
|
|
523
523
|
autoComplete: d === "password" ? "current-password" : "off",
|
|
524
524
|
required: y,
|
|
525
525
|
disabled: c,
|
|
@@ -528,7 +528,7 @@ const bt = {
|
|
|
528
528
|
...l
|
|
529
529
|
}
|
|
530
530
|
),
|
|
531
|
-
|
|
531
|
+
_ && /* @__PURE__ */ n(
|
|
532
532
|
"button",
|
|
533
533
|
{
|
|
534
534
|
type: "button",
|
|
@@ -540,7 +540,7 @@ const bt = {
|
|
|
540
540
|
children: S ? /* @__PURE__ */ n(ve, {}) : /* @__PURE__ */ n(Ce, {})
|
|
541
541
|
}
|
|
542
542
|
),
|
|
543
|
-
o && !
|
|
543
|
+
o && !_ && /* @__PURE__ */ n(
|
|
544
544
|
"button",
|
|
545
545
|
{
|
|
546
546
|
type: "button",
|
|
@@ -566,8 +566,8 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
566
566
|
title: Ut,
|
|
567
567
|
close: Zt,
|
|
568
568
|
body: en
|
|
569
|
-
}, En = ({ open: e, onClose: t, title:
|
|
570
|
-
const s = ie(), c =
|
|
569
|
+
}, En = ({ open: e, onClose: t, title: a, children: o, className: i }) => {
|
|
570
|
+
const s = ie(), c = T(t);
|
|
571
571
|
if (k(() => {
|
|
572
572
|
c.current = t;
|
|
573
573
|
}, [t]), k(() => {
|
|
@@ -594,7 +594,7 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
594
594
|
clickOutsideDeactivates: !0,
|
|
595
595
|
returnFocusOnDeactivate: !0
|
|
596
596
|
},
|
|
597
|
-
children: /* @__PURE__ */ n("div", { className: O.overlay, onClick: () => c.current(), children: /* @__PURE__ */
|
|
597
|
+
children: /* @__PURE__ */ n("div", { className: O.overlay, onClick: () => c.current(), children: /* @__PURE__ */ u(
|
|
598
598
|
"div",
|
|
599
599
|
{
|
|
600
600
|
className: C(O.modal, i),
|
|
@@ -603,8 +603,8 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
603
603
|
"aria-modal": "true",
|
|
604
604
|
"aria-labelledby": s,
|
|
605
605
|
children: [
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
/* @__PURE__ */ n("h2", { id: s, className: O.title, children:
|
|
606
|
+
/* @__PURE__ */ u("header", { className: O.header, children: [
|
|
607
|
+
/* @__PURE__ */ n("h2", { id: s, className: O.title, children: a }),
|
|
608
608
|
/* @__PURE__ */ n(
|
|
609
609
|
"button",
|
|
610
610
|
{
|
|
@@ -624,31 +624,31 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
624
624
|
),
|
|
625
625
|
d
|
|
626
626
|
);
|
|
627
|
-
}, tn = "_root_w6me9_1", nn = "_trackWrapper_w6me9_16", on = "_track_w6me9_16",
|
|
627
|
+
}, tn = "_root_w6me9_1", nn = "_trackWrapper_w6me9_16", on = "_track_w6me9_16", an = "_slide_w6me9_32", rn = "_arrow_w6me9_53", sn = "_arrowPrev_w6me9_89", cn = "_arrowNext_w6me9_93", ln = "_dots_w6me9_97", dn = "_dot_w6me9_97", _n = "_dotActive_w6me9_133", I = {
|
|
628
628
|
root: tn,
|
|
629
629
|
trackWrapper: nn,
|
|
630
630
|
track: on,
|
|
631
|
-
slide:
|
|
632
|
-
arrow:
|
|
631
|
+
slide: an,
|
|
632
|
+
arrow: rn,
|
|
633
633
|
arrowPrev: sn,
|
|
634
634
|
arrowNext: cn,
|
|
635
635
|
dots: ln,
|
|
636
636
|
dot: dn,
|
|
637
|
-
dotActive:
|
|
637
|
+
dotActive: _n
|
|
638
638
|
}, jn = ({
|
|
639
639
|
children: e,
|
|
640
640
|
value: t,
|
|
641
|
-
onValueChange:
|
|
641
|
+
onValueChange: a,
|
|
642
642
|
autoPlayInterval: o = 0,
|
|
643
643
|
className: i,
|
|
644
644
|
hideArrowsWhenSingle: s = !0
|
|
645
645
|
}) => {
|
|
646
646
|
const c = Array.isArray(e) ? e : [e], d = c.length, [m, y] = j(0), f = t !== void 0, l = f ? Math.min(Math.max(0, t), d - 1) : m, g = K(
|
|
647
647
|
(h) => {
|
|
648
|
-
const
|
|
649
|
-
f || y(
|
|
648
|
+
const _ = (h + d) % d;
|
|
649
|
+
f || y(_), a?.(_);
|
|
650
650
|
},
|
|
651
|
-
[d, f,
|
|
651
|
+
[d, f, a]
|
|
652
652
|
);
|
|
653
653
|
if (k(() => {
|
|
654
654
|
if (o <= 0 || d <= 1) return;
|
|
@@ -656,9 +656,9 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
656
656
|
return () => clearInterval(h);
|
|
657
657
|
}, [o, d, l, g]), d === 0) return null;
|
|
658
658
|
const w = () => g(l - 1), D = () => g(l + 1), x = !s || d > 1;
|
|
659
|
-
return /* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */ n("div", { className: I.trackWrapper, children: /* @__PURE__ */ n("div", { className: I.track, style: { transform: `translateX(-${l * 100}%)` }, children: c.map((h,
|
|
661
|
-
x && /* @__PURE__ */
|
|
659
|
+
return /* @__PURE__ */ u("div", { className: C(I.root, i), role: "region", "aria-label": "Carousel", children: [
|
|
660
|
+
/* @__PURE__ */ n("div", { className: I.trackWrapper, children: /* @__PURE__ */ n("div", { className: I.track, style: { transform: `translateX(-${l * 100}%)` }, children: c.map((h, _) => /* @__PURE__ */ n("div", { className: I.slide, children: h }, _)) }) }),
|
|
661
|
+
x && /* @__PURE__ */ u(ce, { children: [
|
|
662
662
|
/* @__PURE__ */ n(
|
|
663
663
|
"button",
|
|
664
664
|
{
|
|
@@ -682,39 +682,39 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
682
682
|
}
|
|
683
683
|
)
|
|
684
684
|
] }),
|
|
685
|
-
d > 1 && /* @__PURE__ */ n("div", { className: I.dots, role: "tablist", "aria-label": "Slide selection", children: c.map((h,
|
|
685
|
+
d > 1 && /* @__PURE__ */ n("div", { className: I.dots, role: "tablist", "aria-label": "Slide selection", children: c.map((h, _) => /* @__PURE__ */ n(
|
|
686
686
|
"button",
|
|
687
687
|
{
|
|
688
688
|
type: "button",
|
|
689
689
|
role: "tab",
|
|
690
|
-
"aria-selected":
|
|
691
|
-
"aria-label": `Slide ${
|
|
692
|
-
className: C(I.dot,
|
|
693
|
-
onClick: () => g(
|
|
694
|
-
tabIndex:
|
|
690
|
+
"aria-selected": _ === l,
|
|
691
|
+
"aria-label": `Slide ${_ + 1}`,
|
|
692
|
+
className: C(I.dot, _ === l && I.dotActive),
|
|
693
|
+
onClick: () => g(_),
|
|
694
|
+
tabIndex: _ === l ? 0 : -1
|
|
695
695
|
},
|
|
696
|
-
|
|
696
|
+
_
|
|
697
697
|
)) })
|
|
698
698
|
] });
|
|
699
699
|
};
|
|
700
700
|
export {
|
|
701
701
|
se as Alert,
|
|
702
|
-
|
|
703
|
-
|
|
702
|
+
Ln as Button,
|
|
703
|
+
Mn as Card,
|
|
704
704
|
jn as Carousel,
|
|
705
|
-
|
|
705
|
+
An as Checkbox,
|
|
706
706
|
Dn as DatePicker,
|
|
707
707
|
xn as DropdownMenu,
|
|
708
708
|
Kt as Input,
|
|
709
|
-
|
|
709
|
+
Fn as Label,
|
|
710
710
|
En as Modal,
|
|
711
|
-
|
|
711
|
+
Vn as Radio,
|
|
712
712
|
yt as Select,
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
Bn as SimpleBar,
|
|
714
|
+
Wn as Tab,
|
|
715
|
+
Qn as Textarea,
|
|
716
716
|
te as Typography,
|
|
717
|
-
|
|
717
|
+
Rn as clsx,
|
|
718
718
|
kn as toastError,
|
|
719
719
|
Sn as toastSuccess
|
|
720
720
|
};
|