snapflow-ui-kit 1.2.10 → 1.2.18
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/README.md +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/index.d.ts +5 -0
- 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 +513 -420
- package/dist/index.client.js.map +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/dist/index.client.js
CHANGED
|
@@ -1,551 +1,551 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { clsx as
|
|
4
|
-
import
|
|
5
|
-
import { default as
|
|
6
|
-
import { A as
|
|
7
|
-
import { B as
|
|
8
|
-
import { jsx as n, jsxs as
|
|
9
|
-
import { useEffect as k, useState as j, useRef as
|
|
10
|
-
import { A as
|
|
11
|
-
import { DayPicker as
|
|
12
|
-
import { format as
|
|
13
|
-
import { C as
|
|
14
|
-
import * as
|
|
15
|
-
import { createPortal as
|
|
16
|
-
import { FocusTrap as
|
|
17
|
-
import { toast as
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import J, { clsx as N } from "clsx";
|
|
3
|
+
import { clsx as Kn } from "clsx";
|
|
4
|
+
import Ne from "simplebar-react";
|
|
5
|
+
import { default as Yn } from "simplebar-react";
|
|
6
|
+
import { A as ie, s as q, c as ae } from "./Textarea-6m6FiIv5.js";
|
|
7
|
+
import { B as Un, C as Zn, a as eo, L as to, R as no, T as oo, b as ao } from "./Textarea-6m6FiIv5.js";
|
|
8
|
+
import { jsx as n, jsxs as u, Fragment as le } from "react/jsx-runtime";
|
|
9
|
+
import { useEffect as k, useState as j, useRef as T, useCallback as B, useMemo as H, forwardRef as Ce, useId as de } from "react";
|
|
10
|
+
import { A as Se, C as Ie, E as ke, a as xe, b as pe, c as _e } from "./ArrowRightIcon-D0SDyfKt.js";
|
|
11
|
+
import { DayPicker as re } from "react-day-picker";
|
|
12
|
+
import { format as z, parse as F, isValid as V } from "date-fns";
|
|
13
|
+
import { C as ue } from "./CloseIcon-CqK3tPnG.js";
|
|
14
|
+
import * as R from "@radix-ui/react-dropdown-menu";
|
|
15
|
+
import { createPortal as De } from "react-dom";
|
|
16
|
+
import { FocusTrap as Ee } from "focus-trap-react";
|
|
17
|
+
import { toast as K } from "react-hot-toast";
|
|
18
|
+
const An = (e) => {
|
|
19
|
+
K.custom((t) => /* @__PURE__ */ n(
|
|
20
|
+
ie,
|
|
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: () => K.dismiss(t.id)
|
|
26
26
|
}
|
|
27
27
|
));
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
}, Wn = (e, t) => {
|
|
29
|
+
K.custom((a) => /* @__PURE__ */ n(
|
|
30
|
+
ie,
|
|
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: () => K.dismiss(a.id)
|
|
37
37
|
}
|
|
38
38
|
));
|
|
39
|
-
},
|
|
40
|
-
wrapper:
|
|
41
|
-
inputContainer:
|
|
42
|
-
label:
|
|
43
|
-
inputWrapper:
|
|
44
|
-
trigger:
|
|
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:
|
|
59
|
-
weekday:
|
|
60
|
-
day:
|
|
61
|
-
dayButton:
|
|
62
|
-
dayOutside:
|
|
63
|
-
dayToday:
|
|
64
|
-
daySelected:
|
|
65
|
-
dayRangeStart:
|
|
66
|
-
dayRangeEnd:
|
|
67
|
-
dayRangeMiddle:
|
|
68
|
-
},
|
|
39
|
+
}, je = "_wrapper_12ea5_1", Oe = "_inputContainer_12ea5_5", $e = "_label_12ea5_11", Pe = "_inputWrapper_12ea5_15", Re = "_trigger_12ea5_22", Te = "_icon_12ea5_36", Be = "_placeholder_12ea5_43", Le = "_clearButton_12ea5_47", Me = "_clearIcon_12ea5_86", Ae = "_disabledLabel_12ea5_98", We = "_error_12ea5_102", ze = "_calendar_12ea5_139", Fe = "_open_12ea5_159", Ve = "_monthsCaption_12ea5_165", Qe = "_navButtonPrevious_12ea5_171", Ge = "_navButtonNext_12ea5_172", qe = "_navIcon_12ea5_197", He = "_monthGrid_12ea5_203", Ke = "_dropdowns_12ea5_209", Xe = "_weekday_12ea5_213", Ye = "_day_12ea5_224", Je = "_dayButton_12ea5_231", Ue = "_dayOutside_12ea5_258", Ze = "_dayToday_12ea5_262", et = "_daySelected_12ea5_267", tt = "_dayRangeStart_12ea5_268", nt = "_dayRangeEnd_12ea5_269", ot = "_dayRangeMiddle_12ea5_270", i = {
|
|
40
|
+
wrapper: je,
|
|
41
|
+
inputContainer: Oe,
|
|
42
|
+
label: $e,
|
|
43
|
+
inputWrapper: Pe,
|
|
44
|
+
trigger: Re,
|
|
45
|
+
icon: Te,
|
|
46
|
+
placeholder: Be,
|
|
47
|
+
clearButton: Le,
|
|
48
|
+
clearIcon: Me,
|
|
49
|
+
disabledLabel: Ae,
|
|
50
|
+
error: We,
|
|
51
|
+
calendar: ze,
|
|
52
|
+
open: Fe,
|
|
53
|
+
monthsCaption: Ve,
|
|
54
|
+
navButtonPrevious: Qe,
|
|
55
|
+
navButtonNext: Ge,
|
|
56
|
+
navIcon: qe,
|
|
57
|
+
monthGrid: He,
|
|
58
|
+
dropdowns: Ke,
|
|
59
|
+
weekday: Xe,
|
|
60
|
+
day: Ye,
|
|
61
|
+
dayButton: Je,
|
|
62
|
+
dayOutside: Ue,
|
|
63
|
+
dayToday: Ze,
|
|
64
|
+
daySelected: et,
|
|
65
|
+
dayRangeStart: tt,
|
|
66
|
+
dayRangeEnd: nt,
|
|
67
|
+
dayRangeMiddle: ot
|
|
68
|
+
}, at = ({
|
|
69
69
|
ref: e,
|
|
70
70
|
isOpen: t,
|
|
71
|
-
onDismiss:
|
|
71
|
+
onDismiss: a
|
|
72
72
|
}) => {
|
|
73
73
|
k(() => {
|
|
74
74
|
if (!t) return;
|
|
75
|
-
const o = (
|
|
76
|
-
e.current && !e.current.contains(
|
|
77
|
-
},
|
|
78
|
-
|
|
75
|
+
const o = (r) => {
|
|
76
|
+
e.current && !e.current.contains(r.target) && a();
|
|
77
|
+
}, s = (r) => {
|
|
78
|
+
r.key === "Escape" && a();
|
|
79
79
|
};
|
|
80
|
-
return document.addEventListener("mousedown", o), document.addEventListener("touchstart", o), document.addEventListener("keydown",
|
|
81
|
-
document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o), document.removeEventListener("keydown",
|
|
80
|
+
return document.addEventListener("mousedown", o), document.addEventListener("touchstart", o), document.addEventListener("keydown", s), () => {
|
|
81
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o), document.removeEventListener("keydown", s);
|
|
82
82
|
};
|
|
83
|
-
}, [t,
|
|
84
|
-
},
|
|
85
|
-
container:
|
|
86
|
-
label:
|
|
87
|
-
trigger:
|
|
88
|
-
select:
|
|
89
|
-
triggerOpen:
|
|
90
|
-
placeholder:
|
|
91
|
-
selectedContent:
|
|
92
|
-
optionIcon:
|
|
93
|
-
arrow:
|
|
94
|
-
open:
|
|
95
|
-
dropdown:
|
|
96
|
-
searchContainer:
|
|
97
|
-
searchInput:
|
|
98
|
-
option:
|
|
99
|
-
selected:
|
|
100
|
-
noOptions:
|
|
101
|
-
},
|
|
83
|
+
}, [t, a, e]);
|
|
84
|
+
}, rt = "_container_sn15j_1", st = "_label_sn15j_7", ct = "_trigger_sn15j_14", it = "_select_sn15j_18", lt = "_triggerOpen_sn15j_50", dt = "_placeholder_sn15j_71", pt = "_selectedContent_sn15j_75", _t = "_optionIcon_sn15j_85", ut = "_arrow_sn15j_91", mt = "_open_sn15j_106", ht = "_dropdown_sn15j_110", ft = "_searchContainer_sn15j_131", gt = "_searchInput_sn15j_141", bt = "_option_sn15j_85", wt = "_selected_sn15j_75", yt = "_noOptions_sn15j_202", g = {
|
|
85
|
+
container: rt,
|
|
86
|
+
label: st,
|
|
87
|
+
trigger: ct,
|
|
88
|
+
select: it,
|
|
89
|
+
triggerOpen: lt,
|
|
90
|
+
placeholder: dt,
|
|
91
|
+
selectedContent: pt,
|
|
92
|
+
optionIcon: _t,
|
|
93
|
+
arrow: ut,
|
|
94
|
+
open: mt,
|
|
95
|
+
dropdown: ht,
|
|
96
|
+
searchContainer: ft,
|
|
97
|
+
searchInput: gt,
|
|
98
|
+
option: bt,
|
|
99
|
+
selected: wt,
|
|
100
|
+
noOptions: yt
|
|
101
|
+
}, vt = ({
|
|
102
102
|
filteredOptions: e,
|
|
103
103
|
isLoading: t,
|
|
104
|
-
loadingText:
|
|
104
|
+
loadingText: a,
|
|
105
105
|
noOptionsText: o,
|
|
106
|
-
onSearchChange:
|
|
107
|
-
onSelect:
|
|
106
|
+
onSearchChange: s,
|
|
107
|
+
onSelect: r,
|
|
108
108
|
searchInputRef: c,
|
|
109
|
-
searchPlaceholder:
|
|
109
|
+
searchPlaceholder: l,
|
|
110
110
|
searchQuery: m,
|
|
111
|
-
searchable:
|
|
111
|
+
searchable: p,
|
|
112
112
|
value: f
|
|
113
|
-
}) => /* @__PURE__ */
|
|
114
|
-
|
|
113
|
+
}) => /* @__PURE__ */ u(le, { children: [
|
|
114
|
+
p && /* @__PURE__ */ n("div", { className: g.searchContainer, children: /* @__PURE__ */ n(
|
|
115
115
|
"input",
|
|
116
116
|
{
|
|
117
117
|
ref: c,
|
|
118
|
-
className:
|
|
119
|
-
onChange: (
|
|
120
|
-
placeholder:
|
|
118
|
+
className: g.searchInput,
|
|
119
|
+
onChange: (d) => s(d.currentTarget.value),
|
|
120
|
+
placeholder: l,
|
|
121
121
|
type: "text",
|
|
122
122
|
value: m
|
|
123
123
|
}
|
|
124
124
|
) }),
|
|
125
|
-
t && /* @__PURE__ */ n("p", { className:
|
|
126
|
-
e.length ? e.map((
|
|
125
|
+
t && /* @__PURE__ */ n("p", { className: g.noOptions, children: a }),
|
|
126
|
+
e.length ? e.map((d) => /* @__PURE__ */ u(
|
|
127
127
|
"button",
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
130
|
-
onClick: () =>
|
|
129
|
+
className: N(g.option, d.value === f && g.selected),
|
|
130
|
+
onClick: () => r(d.value),
|
|
131
131
|
type: "button",
|
|
132
132
|
role: "option",
|
|
133
|
-
"aria-selected":
|
|
133
|
+
"aria-selected": d.value === f,
|
|
134
134
|
children: [
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
d.icon && /* @__PURE__ */ n("span", { className: g.optionIcon, children: d.icon }),
|
|
136
|
+
d.label
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
140
|
-
)) : t ? null : /* @__PURE__ */ n("p", { className:
|
|
141
|
-
] }),
|
|
142
|
-
const [
|
|
139
|
+
d.value
|
|
140
|
+
)) : t ? null : /* @__PURE__ */ n("p", { className: g.noOptions, children: o })
|
|
141
|
+
] }), se = (e, t) => {
|
|
142
|
+
const [a, o] = j(e);
|
|
143
143
|
return k(() => {
|
|
144
|
-
const
|
|
144
|
+
const s = setTimeout(() => {
|
|
145
145
|
o(e);
|
|
146
146
|
}, t);
|
|
147
147
|
return () => {
|
|
148
|
-
clearTimeout(
|
|
148
|
+
clearTimeout(s);
|
|
149
149
|
};
|
|
150
|
-
}, [t, e]),
|
|
151
|
-
},
|
|
150
|
+
}, [t, e]), a;
|
|
151
|
+
}, me = (e) => {
|
|
152
152
|
const {
|
|
153
153
|
className: t,
|
|
154
|
-
defaultSearchValue:
|
|
154
|
+
defaultSearchValue: a = "",
|
|
155
155
|
disabled: o = !1,
|
|
156
|
-
filterOptions:
|
|
157
|
-
isLoading:
|
|
156
|
+
filterOptions: s,
|
|
157
|
+
isLoading: r = !1,
|
|
158
158
|
label: c,
|
|
159
|
-
loadingText:
|
|
159
|
+
loadingText: l = "Loading...",
|
|
160
160
|
noOptionsText: m = "No options found",
|
|
161
|
-
onChange:
|
|
161
|
+
onChange: p,
|
|
162
162
|
onSearchChange: f,
|
|
163
|
-
options:
|
|
164
|
-
placeholder:
|
|
163
|
+
options: d,
|
|
164
|
+
placeholder: h,
|
|
165
165
|
searchDebounceMs: w = 180,
|
|
166
|
-
searchMode:
|
|
167
|
-
searchPlaceholder:
|
|
168
|
-
searchValue:
|
|
169
|
-
searchable:
|
|
170
|
-
value:
|
|
171
|
-
} = e, [
|
|
172
|
-
|
|
173
|
-
}, []),
|
|
174
|
-
|
|
175
|
-
}, [
|
|
176
|
-
o || (
|
|
177
|
-
},
|
|
178
|
-
|
|
166
|
+
searchMode: x = "local",
|
|
167
|
+
searchPlaceholder: D = "Search...",
|
|
168
|
+
searchValue: b,
|
|
169
|
+
searchable: _ = !1,
|
|
170
|
+
value: I
|
|
171
|
+
} = e, [y, C] = j(!1), [L, U] = j(b ?? a), X = T(null), Z = T(null), ee = T(!0), te = b !== void 0 ? b : L, fe = se(te, w), ne = se(L, w), ge = s ?? x === "local", P = d.find((E) => E.value === I), oe = fe.trim().toLowerCase(), be = ge && oe ? d.filter((E) => E.label.toLowerCase().includes(oe)) : d, Y = B(() => {
|
|
172
|
+
U("");
|
|
173
|
+
}, []), M = B(() => {
|
|
174
|
+
C(!1), Y();
|
|
175
|
+
}, [Y]), we = () => {
|
|
176
|
+
o || (y ? M() : (Y(), C(!0)));
|
|
177
|
+
}, ye = (E) => {
|
|
178
|
+
p?.(E), M();
|
|
179
179
|
};
|
|
180
180
|
return k(() => {
|
|
181
|
-
const E = (
|
|
182
|
-
|
|
181
|
+
const E = (ve) => {
|
|
182
|
+
X.current && !X.current.contains(ve.target) && M();
|
|
183
183
|
};
|
|
184
|
-
return
|
|
184
|
+
return y && document.addEventListener("mousedown", E), () => {
|
|
185
185
|
document.removeEventListener("mousedown", E);
|
|
186
186
|
};
|
|
187
|
-
}, [
|
|
188
|
-
if (!(!
|
|
189
|
-
if (
|
|
190
|
-
|
|
187
|
+
}, [M, y]), k(() => {
|
|
188
|
+
if (!(!_ || !f)) {
|
|
189
|
+
if (ee.current) {
|
|
190
|
+
ee.current = !1;
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
f(
|
|
193
|
+
f(ne);
|
|
194
194
|
}
|
|
195
|
-
}, [
|
|
196
|
-
|
|
197
|
-
}, [
|
|
198
|
-
c && /* @__PURE__ */ n("label", { className:
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
/* @__PURE__ */
|
|
195
|
+
}, [ne, f, _]), k(() => {
|
|
196
|
+
y && _ && Z.current?.focus();
|
|
197
|
+
}, [y, _]), /* @__PURE__ */ u("div", { className: N(g.container, t), children: [
|
|
198
|
+
c && /* @__PURE__ */ n("label", { className: g.label, children: c }),
|
|
199
|
+
/* @__PURE__ */ u("div", { className: g.select, ref: X, children: [
|
|
200
|
+
/* @__PURE__ */ u(
|
|
201
201
|
"button",
|
|
202
202
|
{
|
|
203
|
-
className:
|
|
203
|
+
className: N(g.trigger, y && g.triggerOpen),
|
|
204
204
|
disabled: o,
|
|
205
|
-
onClick:
|
|
205
|
+
onClick: we,
|
|
206
206
|
type: "button",
|
|
207
207
|
"aria-haspopup": "listbox",
|
|
208
|
-
"aria-expanded":
|
|
208
|
+
"aria-expanded": y,
|
|
209
209
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
/* @__PURE__ */ u("span", { className: P ? g.selectedContent : g.placeholder, children: [
|
|
211
|
+
P?.icon && /* @__PURE__ */ n("span", { className: g.optionIcon, children: P.icon }),
|
|
212
|
+
P ? P.label : h || "Select an option"
|
|
213
213
|
] }),
|
|
214
|
-
/* @__PURE__ */ n("span", { className:
|
|
214
|
+
/* @__PURE__ */ n("span", { className: N(g.arrow, y && g.open), children: /* @__PURE__ */ n(Se, {}) })
|
|
215
215
|
]
|
|
216
216
|
}
|
|
217
217
|
),
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
y && /* @__PURE__ */ n(Ne, { className: g.dropdown, role: "listbox", style: { maxHeight: 191 }, children: /* @__PURE__ */ n(
|
|
219
|
+
vt,
|
|
220
220
|
{
|
|
221
|
-
filteredOptions:
|
|
222
|
-
isLoading:
|
|
223
|
-
loadingText:
|
|
221
|
+
filteredOptions: be,
|
|
222
|
+
isLoading: r,
|
|
223
|
+
loadingText: l,
|
|
224
224
|
noOptionsText: m,
|
|
225
|
-
onSearchChange:
|
|
226
|
-
onSelect:
|
|
227
|
-
searchInputRef:
|
|
228
|
-
searchPlaceholder:
|
|
229
|
-
searchQuery:
|
|
230
|
-
searchable:
|
|
231
|
-
value:
|
|
225
|
+
onSearchChange: U,
|
|
226
|
+
onSelect: ye,
|
|
227
|
+
searchInputRef: Z,
|
|
228
|
+
searchPlaceholder: D,
|
|
229
|
+
searchQuery: te,
|
|
230
|
+
searchable: _,
|
|
231
|
+
value: I
|
|
232
232
|
}
|
|
233
233
|
) })
|
|
234
234
|
] })
|
|
235
235
|
] });
|
|
236
|
-
},
|
|
236
|
+
}, he = (e) => {
|
|
237
237
|
const t = (o) => {
|
|
238
238
|
if (e.onChange) {
|
|
239
|
-
const
|
|
239
|
+
const s = {
|
|
240
240
|
target: {
|
|
241
241
|
value: o
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
e.onChange(
|
|
244
|
+
e.onChange(s);
|
|
245
245
|
}
|
|
246
|
-
},
|
|
246
|
+
}, a = e.options?.map((o) => ({
|
|
247
247
|
value: o.value.toString(),
|
|
248
248
|
label: o.label
|
|
249
249
|
})) || [];
|
|
250
250
|
return /* @__PURE__ */ n(
|
|
251
|
-
|
|
251
|
+
me,
|
|
252
252
|
{
|
|
253
253
|
className: e.className,
|
|
254
|
-
options:
|
|
254
|
+
options: a,
|
|
255
255
|
value: e.value?.toString() || "",
|
|
256
256
|
onChange: t
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
259
|
};
|
|
260
|
-
|
|
261
|
-
const
|
|
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:
|
|
283
|
-
}, vt = {
|
|
284
|
-
Dropdown: de
|
|
260
|
+
he.displayName = "DatePickerDropdown";
|
|
261
|
+
const Nt = {
|
|
262
|
+
month_caption: i.monthsCaption,
|
|
263
|
+
button_previous: i.navButtonPrevious,
|
|
264
|
+
button_next: i.navButtonNext,
|
|
265
|
+
chevron: i.navIcon,
|
|
266
|
+
caption_label: i.captionLabel,
|
|
267
|
+
dropdowns: i.dropdowns,
|
|
268
|
+
dropdown_root: i.dropdown_root,
|
|
269
|
+
dropdown: i.dropdown,
|
|
270
|
+
dropdown_select_option: i.option,
|
|
271
|
+
months_dropdown: i.monthsDropdown,
|
|
272
|
+
years_dropdown: i.yearsDropdown,
|
|
273
|
+
month_grid: i.monthGrid,
|
|
274
|
+
weekday: i.weekday,
|
|
275
|
+
day_button: i.dayButton,
|
|
276
|
+
day: i.day,
|
|
277
|
+
outside: i.dayOutside,
|
|
278
|
+
selected: i.daySelected,
|
|
279
|
+
range_start: i.dayRangeStart,
|
|
280
|
+
range_middle: i.dayRangeMiddle,
|
|
281
|
+
range_end: i.dayRangeEnd,
|
|
282
|
+
today: i.dayToday
|
|
285
283
|
}, Ct = {
|
|
284
|
+
Dropdown: he
|
|
285
|
+
}, St = {
|
|
286
286
|
weekStartsOn: 1,
|
|
287
287
|
showOutsideDays: !0,
|
|
288
288
|
reverseYears: !0,
|
|
289
289
|
captionLayout: "dropdown"
|
|
290
|
-
},
|
|
291
|
-
components:
|
|
292
|
-
...
|
|
293
|
-
},
|
|
294
|
-
...
|
|
290
|
+
}, It = {
|
|
291
|
+
components: Ct,
|
|
292
|
+
...St
|
|
293
|
+
}, kt = (e) => ({
|
|
294
|
+
...It,
|
|
295
295
|
classNames: {
|
|
296
|
-
root:
|
|
297
|
-
...
|
|
296
|
+
root: J(i.calendar, e && i.open),
|
|
297
|
+
...Nt
|
|
298
298
|
}
|
|
299
|
-
}),
|
|
299
|
+
}), Q = "dd.MM.yyyy", xt = (e) => e ? z(e, Q) : "", Dt = (e) => !e || !e.from ? "" : e.to && e.from.getTime() !== e.to.getTime() ? `${z(e.from, Q)} - ${z(e.to, Q)}` : z(e.from, Q), ce = (e, t) => e ? t === "single" && e instanceof Date ? xt(e) : t === "range" && typeof e == "object" && "from" in e ? Dt(e) : "" : "", Et = ({
|
|
300
300
|
value: e,
|
|
301
301
|
mode: t,
|
|
302
|
-
onChange:
|
|
302
|
+
onChange: a,
|
|
303
303
|
setMonth: o,
|
|
304
|
-
setIsOpen:
|
|
304
|
+
setIsOpen: s
|
|
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(ce(e, "single")), s(!1));
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
314
|
if (t === "range" && typeof e == "object" && "from" in e) {
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
const c =
|
|
318
|
-
|
|
315
|
+
const r = e;
|
|
316
|
+
r.from ? o(r.from) : r.to && o(r.to);
|
|
317
|
+
const c = ce(r, "range");
|
|
318
|
+
a(c), r.from && r.to && r.from.getTime() !== r.to.getTime() && s(!1);
|
|
319
319
|
}
|
|
320
|
-
},
|
|
320
|
+
}, G = "dd.MM.yyyy", jt = (e) => {
|
|
321
321
|
if (!e) return;
|
|
322
|
-
const t =
|
|
323
|
-
return
|
|
324
|
-
},
|
|
322
|
+
const t = F(e, G, /* @__PURE__ */ new Date());
|
|
323
|
+
return V(t) ? t : void 0;
|
|
324
|
+
}, Ot = (e) => {
|
|
325
325
|
if (!e) return;
|
|
326
|
-
const t = " - ",
|
|
327
|
-
if (
|
|
328
|
-
const
|
|
329
|
-
return
|
|
326
|
+
const t = " - ", a = e.indexOf(t);
|
|
327
|
+
if (a === -1) {
|
|
328
|
+
const l = F(e.trim(), G, /* @__PURE__ */ new Date());
|
|
329
|
+
return V(l) ? { from: l, to: void 0 } : void 0;
|
|
330
330
|
}
|
|
331
|
-
const o = e.substring(0,
|
|
332
|
-
if (!o || !
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
335
|
-
return { from:
|
|
336
|
-
},
|
|
331
|
+
const o = e.substring(0, a).trim(), s = e.substring(a + t.length).trim();
|
|
332
|
+
if (!o || !s) return;
|
|
333
|
+
const r = F(o, G, /* @__PURE__ */ new Date()), c = F(s, G, /* @__PURE__ */ new Date());
|
|
334
|
+
if (V(r) && V(c))
|
|
335
|
+
return { from: r, to: c };
|
|
336
|
+
}, $t = (e, t) => {
|
|
337
337
|
if (e)
|
|
338
|
-
return t === "single" ?
|
|
339
|
-
},
|
|
338
|
+
return t === "single" ? jt(e) : Ot(e);
|
|
339
|
+
}, Pt = (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
|
+
}, zn = ({
|
|
351
351
|
mode: e,
|
|
352
352
|
value: t,
|
|
353
|
-
onChange:
|
|
353
|
+
onChange: a,
|
|
354
354
|
disabled: o,
|
|
355
|
-
label:
|
|
356
|
-
error:
|
|
355
|
+
label: s,
|
|
356
|
+
error: r,
|
|
357
357
|
placeholder: c,
|
|
358
|
-
...
|
|
358
|
+
...l
|
|
359
359
|
}) => {
|
|
360
|
-
const [m,
|
|
360
|
+
const [m, p] = j(!1), f = T(null), [d, h] = j(/* @__PURE__ */ new Date()), w = H(() => $t(t, e), [t, e]);
|
|
361
361
|
k(() => {
|
|
362
|
-
|
|
363
|
-
}, [w, e,
|
|
364
|
-
|
|
362
|
+
Pt(w, e, h);
|
|
363
|
+
}, [w, e, h]), at({ ref: f, isOpen: m, onDismiss: () => {
|
|
364
|
+
p(!1);
|
|
365
365
|
} });
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
},
|
|
369
|
-
o ||
|
|
370
|
-
},
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
},
|
|
374
|
-
|
|
375
|
-
value:
|
|
366
|
+
const D = (C) => {
|
|
367
|
+
C.stopPropagation(), I(void 0);
|
|
368
|
+
}, b = () => {
|
|
369
|
+
o || p((C) => !C);
|
|
370
|
+
}, _ = (C) => {
|
|
371
|
+
const L = C.currentTarget.value;
|
|
372
|
+
a(L);
|
|
373
|
+
}, I = (C) => {
|
|
374
|
+
Et({
|
|
375
|
+
value: C,
|
|
376
376
|
mode: e,
|
|
377
|
-
onChange:
|
|
378
|
-
setMonth:
|
|
379
|
-
setIsOpen:
|
|
377
|
+
onChange: a,
|
|
378
|
+
setMonth: h,
|
|
379
|
+
setIsOpen: p
|
|
380
380
|
});
|
|
381
|
-
},
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
|
|
385
|
-
/* @__PURE__ */
|
|
381
|
+
}, y = H(() => kt(m), [m]);
|
|
382
|
+
return /* @__PURE__ */ u("div", { ref: f, className: i.wrapper, children: [
|
|
383
|
+
/* @__PURE__ */ u("div", { className: i.inputContainer, children: [
|
|
384
|
+
s && /* @__PURE__ */ n("span", { className: o ? i.disabledLabel : i.label, children: /* @__PURE__ */ n(ae, { variant: "text-14", children: s }) }),
|
|
385
|
+
/* @__PURE__ */ u("div", { className: i.inputWrapper, children: [
|
|
386
386
|
/* @__PURE__ */ n(
|
|
387
387
|
"input",
|
|
388
388
|
{
|
|
389
389
|
type: "text",
|
|
390
|
-
className:
|
|
391
|
-
onClick:
|
|
390
|
+
className: J(i.trigger, r && i.error),
|
|
391
|
+
onClick: b,
|
|
392
392
|
value: t,
|
|
393
|
-
onChange:
|
|
393
|
+
onChange: _,
|
|
394
394
|
placeholder: c,
|
|
395
395
|
disabled: o,
|
|
396
|
-
"aria-label":
|
|
396
|
+
"aria-label": s || "Select date",
|
|
397
397
|
"aria-expanded": m,
|
|
398
398
|
"aria-haspopup": "dialog",
|
|
399
|
-
"aria-invalid":
|
|
400
|
-
...
|
|
399
|
+
"aria-invalid": r ? "true" : "false",
|
|
400
|
+
...l
|
|
401
401
|
}
|
|
402
402
|
),
|
|
403
403
|
t && !o && /* @__PURE__ */ n(
|
|
404
404
|
"button",
|
|
405
405
|
{
|
|
406
406
|
type: "button",
|
|
407
|
-
className:
|
|
408
|
-
onClick:
|
|
407
|
+
className: i.clearButton,
|
|
408
|
+
onClick: D,
|
|
409
409
|
"aria-label": "Clear date",
|
|
410
|
-
children: /* @__PURE__ */ n(
|
|
410
|
+
children: /* @__PURE__ */ n(ue, { className: i.clearIcon })
|
|
411
411
|
}
|
|
412
412
|
),
|
|
413
|
-
/* @__PURE__ */ n(
|
|
413
|
+
/* @__PURE__ */ n(Ie, { className: J(i.icon, !t && i.placeholder) })
|
|
414
414
|
] }),
|
|
415
|
-
|
|
415
|
+
r && /* @__PURE__ */ n(ae, { variant: "small", className: i.error, children: r })
|
|
416
416
|
] }),
|
|
417
417
|
e === "single" ? /* @__PURE__ */ n(
|
|
418
|
-
|
|
418
|
+
re,
|
|
419
419
|
{
|
|
420
|
-
...
|
|
421
|
-
month:
|
|
422
|
-
onMonthChange:
|
|
420
|
+
...y,
|
|
421
|
+
month: d,
|
|
422
|
+
onMonthChange: h,
|
|
423
423
|
mode: "single",
|
|
424
424
|
selected: w instanceof Date ? w : void 0,
|
|
425
|
-
onSelect:
|
|
425
|
+
onSelect: I
|
|
426
426
|
}
|
|
427
427
|
) : /* @__PURE__ */ n(
|
|
428
|
-
|
|
428
|
+
re,
|
|
429
429
|
{
|
|
430
|
-
...
|
|
431
|
-
month:
|
|
432
|
-
onMonthChange:
|
|
430
|
+
...y,
|
|
431
|
+
month: d,
|
|
432
|
+
onMonthChange: h,
|
|
433
433
|
mode: "range",
|
|
434
434
|
selected: w && typeof w == "object" && "from" in w ? w : void 0,
|
|
435
|
-
onSelect:
|
|
435
|
+
onSelect: I
|
|
436
436
|
}
|
|
437
437
|
)
|
|
438
438
|
] });
|
|
439
|
-
},
|
|
440
|
-
content:
|
|
441
|
-
item:
|
|
442
|
-
icon:
|
|
443
|
-
label:
|
|
444
|
-
},
|
|
445
|
-
const { children: t, items:
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */ n(
|
|
448
|
-
/* @__PURE__ */ n(
|
|
449
|
-
|
|
439
|
+
}, Rt = "_content_1bas8_1", Tt = "_item_1bas8_24", Bt = "_icon_1bas8_56", Lt = "_label_1bas8_62", A = {
|
|
440
|
+
content: Rt,
|
|
441
|
+
item: Tt,
|
|
442
|
+
icon: Bt,
|
|
443
|
+
label: Lt
|
|
444
|
+
}, Fn = (e) => {
|
|
445
|
+
const { children: t, items: a, className: o, align: s = "end", side: r = "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
|
-
align:
|
|
452
|
-
className:
|
|
453
|
-
side:
|
|
451
|
+
align: s,
|
|
452
|
+
className: N(A.content, o),
|
|
453
|
+
side: r,
|
|
454
454
|
sideOffset: 4,
|
|
455
|
-
children:
|
|
456
|
-
|
|
455
|
+
children: a.map((c, l) => /* @__PURE__ */ u(
|
|
456
|
+
R.Item,
|
|
457
457
|
{
|
|
458
|
-
className:
|
|
458
|
+
className: A.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: A.icon, children: c.icon }),
|
|
463
|
+
/* @__PURE__ */ n("span", { className: A.label, children: c.label })
|
|
464
464
|
]
|
|
465
465
|
},
|
|
466
|
-
|
|
466
|
+
l
|
|
467
467
|
))
|
|
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:
|
|
482
|
-
errorMessage:
|
|
483
|
-
required:
|
|
484
|
-
},
|
|
471
|
+
}, Mt = "_wrapper_gp2gj_1", At = "_label_gp2gj_7", Wt = "_disabled_gp2gj_14", zt = "_input_gp2gj_18", Ft = "_inputContainer_gp2gj_22", Vt = "_error_gp2gj_47", Qt = "_withStartIcon_gp2gj_64", Gt = "_withEndIcon_gp2gj_68", qt = "_startIcon_gp2gj_85", Ht = "_endIcon_gp2gj_86", Kt = "_errorMessage_gp2gj_137", Xt = "_required_gp2gj_144", v = {
|
|
472
|
+
wrapper: Mt,
|
|
473
|
+
label: At,
|
|
474
|
+
disabled: Wt,
|
|
475
|
+
input: zt,
|
|
476
|
+
inputContainer: Ft,
|
|
477
|
+
error: Vt,
|
|
478
|
+
withStartIcon: Qt,
|
|
479
|
+
withEndIcon: Gt,
|
|
480
|
+
startIcon: qt,
|
|
481
|
+
endIcon: Ht,
|
|
482
|
+
errorMessage: Kt,
|
|
483
|
+
required: Xt
|
|
484
|
+
}, Yt = Ce(
|
|
485
485
|
({
|
|
486
486
|
label: e,
|
|
487
487
|
errorMessage: t,
|
|
488
|
-
startIcon:
|
|
488
|
+
startIcon: a,
|
|
489
489
|
endIcon: o,
|
|
490
|
-
onEndIconClick:
|
|
491
|
-
allowPasswordToggle:
|
|
490
|
+
onEndIconClick: s,
|
|
491
|
+
allowPasswordToggle: r,
|
|
492
492
|
disabled: c,
|
|
493
|
-
type:
|
|
493
|
+
type: l = "text",
|
|
494
494
|
className: m,
|
|
495
|
-
required:
|
|
495
|
+
required: p,
|
|
496
496
|
id: f,
|
|
497
|
-
...
|
|
498
|
-
},
|
|
499
|
-
const w =
|
|
500
|
-
return /* @__PURE__ */
|
|
501
|
-
e && /* @__PURE__ */
|
|
497
|
+
...d
|
|
498
|
+
}, h) => {
|
|
499
|
+
const w = de(), x = f ?? w, D = t ? `${x}-error` : void 0, b = !!t, _ = l === "password" && r, [I, y] = j(!1);
|
|
500
|
+
return /* @__PURE__ */ u("div", { className: N(v.wrapper, m), children: [
|
|
501
|
+
e && /* @__PURE__ */ u("label", { htmlFor: x, className: N(v.label, { [v.disabled]: c }), children: [
|
|
502
502
|
e,
|
|
503
|
-
|
|
503
|
+
p && /* @__PURE__ */ n("sup", { className: v.required, children: " *" })
|
|
504
504
|
] }),
|
|
505
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ u(
|
|
506
506
|
"div",
|
|
507
507
|
{
|
|
508
|
-
className:
|
|
509
|
-
[v.error]:
|
|
508
|
+
className: N(v.inputContainer, {
|
|
509
|
+
[v.error]: b,
|
|
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
|
-
ref:
|
|
520
|
-
id:
|
|
519
|
+
ref: h,
|
|
520
|
+
id: x,
|
|
521
521
|
className: v.input,
|
|
522
|
-
type:
|
|
523
|
-
autoComplete:
|
|
524
|
-
required:
|
|
522
|
+
type: _ && I ? "text" : l,
|
|
523
|
+
autoComplete: l === "password" ? "current-password" : "off",
|
|
524
|
+
required: p,
|
|
525
525
|
disabled: c,
|
|
526
|
-
"aria-invalid":
|
|
527
|
-
"aria-describedby":
|
|
528
|
-
...
|
|
526
|
+
"aria-invalid": b,
|
|
527
|
+
"aria-describedby": D,
|
|
528
|
+
...d
|
|
529
529
|
}
|
|
530
530
|
),
|
|
531
|
-
|
|
531
|
+
_ && /* @__PURE__ */ n(
|
|
532
532
|
"button",
|
|
533
533
|
{
|
|
534
534
|
type: "button",
|
|
535
535
|
className: v.endIcon,
|
|
536
|
-
onClick: () =>
|
|
537
|
-
"aria-label":
|
|
536
|
+
onClick: () => y((C) => !C),
|
|
537
|
+
"aria-label": I ? "Hide password" : "Show password",
|
|
538
538
|
disabled: c,
|
|
539
539
|
tabIndex: -1,
|
|
540
|
-
children:
|
|
540
|
+
children: I ? /* @__PURE__ */ n(ke, {}) : /* @__PURE__ */ n(xe, {})
|
|
541
541
|
}
|
|
542
542
|
),
|
|
543
|
-
o && !
|
|
543
|
+
o && !_ && /* @__PURE__ */ n(
|
|
544
544
|
"button",
|
|
545
545
|
{
|
|
546
546
|
type: "button",
|
|
547
547
|
className: v.endIcon,
|
|
548
|
-
onClick:
|
|
548
|
+
onClick: s,
|
|
549
549
|
"aria-label": "Action",
|
|
550
550
|
disabled: c,
|
|
551
551
|
children: o
|
|
@@ -554,20 +554,20 @@ const bt = {
|
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
556
|
),
|
|
557
|
-
|
|
557
|
+
b && /* @__PURE__ */ n("span", { id: D, className: v.errorMessage, role: "alert", children: t })
|
|
558
558
|
] });
|
|
559
559
|
}
|
|
560
560
|
);
|
|
561
|
-
|
|
562
|
-
const
|
|
563
|
-
overlay:
|
|
564
|
-
modal:
|
|
565
|
-
header:
|
|
566
|
-
title:
|
|
567
|
-
close:
|
|
568
|
-
body:
|
|
569
|
-
},
|
|
570
|
-
const
|
|
561
|
+
Yt.displayName = "Input";
|
|
562
|
+
const Jt = "_overlay_17k3a_1", Ut = "_modal_17k3a_15", Zt = "_header_17k3a_29", en = "_title_17k3a_39", tn = "_close_17k3a_52", nn = "_body_17k3a_79", O = {
|
|
563
|
+
overlay: Jt,
|
|
564
|
+
modal: Ut,
|
|
565
|
+
header: Zt,
|
|
566
|
+
title: en,
|
|
567
|
+
close: tn,
|
|
568
|
+
body: nn
|
|
569
|
+
}, Vn = ({ open: e, onClose: t, title: a, children: o, className: s }) => {
|
|
570
|
+
const r = de(), c = T(t);
|
|
571
571
|
if (k(() => {
|
|
572
572
|
c.current = t;
|
|
573
573
|
}, [t]), k(() => {
|
|
@@ -577,34 +577,34 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
577
577
|
};
|
|
578
578
|
}, [e]), k(() => {
|
|
579
579
|
if (!e) return;
|
|
580
|
-
const m = (
|
|
581
|
-
|
|
580
|
+
const m = (p) => {
|
|
581
|
+
p.key === "Escape" && c.current();
|
|
582
582
|
};
|
|
583
583
|
return document.addEventListener("keydown", m), () => {
|
|
584
584
|
document.removeEventListener("keydown", m);
|
|
585
585
|
};
|
|
586
586
|
}, [e]), !e || typeof document > "u") return null;
|
|
587
|
-
const
|
|
588
|
-
return
|
|
587
|
+
const l = document.getElementById("modal-root") ?? document.body;
|
|
588
|
+
return De(
|
|
589
589
|
/* @__PURE__ */ n(
|
|
590
|
-
|
|
590
|
+
Ee,
|
|
591
591
|
{
|
|
592
592
|
active: e,
|
|
593
593
|
focusTrapOptions: {
|
|
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
|
-
className:
|
|
600
|
+
className: N(O.modal, s),
|
|
601
601
|
onClick: (m) => m.stopPropagation(),
|
|
602
602
|
role: "dialog",
|
|
603
603
|
"aria-modal": "true",
|
|
604
|
-
"aria-labelledby":
|
|
604
|
+
"aria-labelledby": r,
|
|
605
605
|
children: [
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
/* @__PURE__ */ n("h2", { id:
|
|
606
|
+
/* @__PURE__ */ u("header", { className: O.header, children: [
|
|
607
|
+
/* @__PURE__ */ n("h2", { id: r, className: O.title, children: a }),
|
|
608
608
|
/* @__PURE__ */ n(
|
|
609
609
|
"button",
|
|
610
610
|
{
|
|
@@ -612,7 +612,7 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
612
612
|
className: O.close,
|
|
613
613
|
"aria-label": "Close modal",
|
|
614
614
|
onClick: () => c.current(),
|
|
615
|
-
children: /* @__PURE__ */ n(
|
|
615
|
+
children: /* @__PURE__ */ n(ue, {})
|
|
616
616
|
}
|
|
617
617
|
)
|
|
618
618
|
] }),
|
|
@@ -622,100 +622,193 @@ const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29",
|
|
|
622
622
|
) })
|
|
623
623
|
}
|
|
624
624
|
),
|
|
625
|
-
|
|
625
|
+
l
|
|
626
626
|
);
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
},
|
|
627
|
+
}, on = "_wrapper_snlgs_1", an = {
|
|
628
|
+
wrapper: on
|
|
629
|
+
}, rn = "_pagination_3b73i_1", sn = "_arrow_3b73i_10", cn = "_page_3b73i_46", ln = "_active_3b73i_73", dn = "_dots_3b73i_100", $ = {
|
|
630
|
+
pagination: rn,
|
|
631
|
+
arrow: sn,
|
|
632
|
+
page: cn,
|
|
633
|
+
active: ln,
|
|
634
|
+
dots: dn
|
|
635
|
+
}, pn = ({ page: e, totalPages: t, siblings: a = 1, onPageChange: o }) => {
|
|
636
|
+
const s = e === 1, r = e === t, c = B(() => {
|
|
637
|
+
o(e - 1);
|
|
638
|
+
}, [e, o]), l = B(() => {
|
|
639
|
+
o(e + 1);
|
|
640
|
+
}, [e, o]), m = H(() => {
|
|
641
|
+
const p = [], f = Math.max(2, e - a), d = Math.min(t - 1, e + a);
|
|
642
|
+
p.push(1), f > 2 && p.push("dots-start");
|
|
643
|
+
for (let h = f; h <= d; h++)
|
|
644
|
+
p.push(h);
|
|
645
|
+
return d < t - 1 && p.push("dots-end"), t > 1 && p.push(t), p;
|
|
646
|
+
}, [e, t, a]);
|
|
647
|
+
return /* @__PURE__ */ u("nav", { className: $.pagination, "aria-label": "Pagination", children: [
|
|
648
|
+
/* @__PURE__ */ n(
|
|
649
|
+
"button",
|
|
650
|
+
{
|
|
651
|
+
className: $.arrow,
|
|
652
|
+
onClick: c,
|
|
653
|
+
disabled: s,
|
|
654
|
+
"aria-label": "Previous page",
|
|
655
|
+
children: /* @__PURE__ */ n(pe, { width: 16, height: 16 })
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
m.map(
|
|
659
|
+
(p) => typeof p == "number" ? /* @__PURE__ */ n(
|
|
660
|
+
"button",
|
|
661
|
+
{
|
|
662
|
+
className: `${$.page} ${p === e ? $.active : ""}`,
|
|
663
|
+
onClick: () => o(p),
|
|
664
|
+
"aria-current": p === e ? "page" : void 0,
|
|
665
|
+
children: p
|
|
666
|
+
},
|
|
667
|
+
p
|
|
668
|
+
) : /* @__PURE__ */ n("span", { className: $.dots, children: "..." }, p)
|
|
669
|
+
),
|
|
670
|
+
/* @__PURE__ */ n("button", { className: $.arrow, onClick: l, disabled: r, "aria-label": "Next page", children: /* @__PURE__ */ n(_e, { width: 16, height: 16 }) })
|
|
671
|
+
] });
|
|
672
|
+
}, _n = "_pageSizeWrapper_l4hpf_5", un = "_label_l4hpf_10", mn = "_pageSizeSelect_l4hpf_18", W = {
|
|
673
|
+
pageSizeWrapper: _n,
|
|
674
|
+
label: un,
|
|
675
|
+
pageSizeSelect: mn
|
|
676
|
+
}, hn = ({ options: e, pageSize: t, onPageSizeChange: a }) => {
|
|
677
|
+
const o = H(
|
|
678
|
+
() => e.map((s) => ({
|
|
679
|
+
label: String(s),
|
|
680
|
+
value: String(s)
|
|
681
|
+
// string for Select
|
|
682
|
+
})),
|
|
683
|
+
[e]
|
|
684
|
+
);
|
|
685
|
+
return /* @__PURE__ */ u("div", { className: W.pageSizeWrapper, children: [
|
|
686
|
+
/* @__PURE__ */ n("span", { className: W.label, children: "Show" }),
|
|
687
|
+
/* @__PURE__ */ n(
|
|
688
|
+
me,
|
|
689
|
+
{
|
|
690
|
+
className: W.pageSizeSelect,
|
|
691
|
+
options: o,
|
|
692
|
+
value: String(t),
|
|
693
|
+
onChange: (s) => a?.(Number(s))
|
|
694
|
+
}
|
|
695
|
+
),
|
|
696
|
+
/* @__PURE__ */ n("span", { className: W.label, children: "per page" })
|
|
697
|
+
] });
|
|
698
|
+
}, Qn = ({
|
|
699
|
+
page: e,
|
|
700
|
+
pageSize: t = 10,
|
|
701
|
+
totalPages: a,
|
|
702
|
+
onPageChange: o,
|
|
703
|
+
onPageSizeChange: s,
|
|
704
|
+
siblings: r = 1,
|
|
705
|
+
showPageSizeSelect: c = !0,
|
|
706
|
+
pageSizeOptions: l = [10, 20, 30, 50, 100]
|
|
707
|
+
}) => a <= 0 ? null : /* @__PURE__ */ u("div", { className: an.wrapper, children: [
|
|
708
|
+
/* @__PURE__ */ n(pn, { page: e, totalPages: a, siblings: r, onPageChange: o }),
|
|
709
|
+
c && /* @__PURE__ */ n(
|
|
710
|
+
hn,
|
|
711
|
+
{
|
|
712
|
+
options: l,
|
|
713
|
+
pageSize: t,
|
|
714
|
+
onPageSizeChange: s
|
|
715
|
+
}
|
|
716
|
+
)
|
|
717
|
+
] }), fn = "_root_w6me9_1", gn = "_trackWrapper_w6me9_16", bn = "_track_w6me9_16", wn = "_slide_w6me9_32", yn = "_arrow_w6me9_53", vn = "_arrowPrev_w6me9_89", Nn = "_arrowNext_w6me9_93", Cn = "_dots_w6me9_97", Sn = "_dot_w6me9_97", In = "_dotActive_w6me9_133", S = {
|
|
718
|
+
root: fn,
|
|
719
|
+
trackWrapper: gn,
|
|
720
|
+
track: bn,
|
|
721
|
+
slide: wn,
|
|
722
|
+
arrow: yn,
|
|
723
|
+
arrowPrev: vn,
|
|
724
|
+
arrowNext: Nn,
|
|
725
|
+
dots: Cn,
|
|
726
|
+
dot: Sn,
|
|
727
|
+
dotActive: In
|
|
728
|
+
}, Gn = ({
|
|
639
729
|
children: e,
|
|
640
730
|
value: t,
|
|
641
|
-
onValueChange:
|
|
731
|
+
onValueChange: a,
|
|
642
732
|
autoPlayInterval: o = 0,
|
|
643
|
-
className:
|
|
644
|
-
hideArrowsWhenSingle:
|
|
733
|
+
className: s,
|
|
734
|
+
hideArrowsWhenSingle: r = !0
|
|
645
735
|
}) => {
|
|
646
|
-
const c = Array.isArray(e) ? e : [e],
|
|
647
|
-
(
|
|
648
|
-
const
|
|
649
|
-
f ||
|
|
736
|
+
const c = Array.isArray(e) ? e : [e], l = c.length, [m, p] = j(0), f = t !== void 0, d = f ? Math.min(Math.max(0, t), l - 1) : m, h = B(
|
|
737
|
+
(b) => {
|
|
738
|
+
const _ = (b + l) % l;
|
|
739
|
+
f || p(_), a?.(_);
|
|
650
740
|
},
|
|
651
|
-
[
|
|
741
|
+
[l, f, a]
|
|
652
742
|
);
|
|
653
743
|
if (k(() => {
|
|
654
|
-
if (o <= 0 ||
|
|
655
|
-
const
|
|
656
|
-
return () => clearInterval(
|
|
657
|
-
}, [o,
|
|
658
|
-
const w = () =>
|
|
659
|
-
return /* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */ n("div", { className:
|
|
661
|
-
|
|
744
|
+
if (o <= 0 || l <= 1) return;
|
|
745
|
+
const b = setInterval(() => h(d + 1), o);
|
|
746
|
+
return () => clearInterval(b);
|
|
747
|
+
}, [o, l, d, h]), l === 0) return null;
|
|
748
|
+
const w = () => h(d - 1), x = () => h(d + 1), D = !r || l > 1;
|
|
749
|
+
return /* @__PURE__ */ u("div", { className: N(S.root, s), role: "region", "aria-label": "Carousel", children: [
|
|
750
|
+
/* @__PURE__ */ n("div", { className: S.trackWrapper, children: /* @__PURE__ */ n("div", { className: S.track, style: { transform: `translateX(-${d * 100}%)` }, children: c.map((b, _) => /* @__PURE__ */ n("div", { className: S.slide, children: b }, _)) }) }),
|
|
751
|
+
D && /* @__PURE__ */ u(le, { children: [
|
|
662
752
|
/* @__PURE__ */ n(
|
|
663
753
|
"button",
|
|
664
754
|
{
|
|
665
755
|
type: "button",
|
|
666
|
-
className:
|
|
756
|
+
className: N(S.arrow, S.arrowPrev),
|
|
667
757
|
onClick: w,
|
|
668
758
|
"aria-label": "Previous slide",
|
|
669
759
|
tabIndex: 0,
|
|
670
|
-
children: /* @__PURE__ */ n(
|
|
760
|
+
children: /* @__PURE__ */ n(pe, { width: 24, height: 24, "aria-hidden": !0 })
|
|
671
761
|
}
|
|
672
762
|
),
|
|
673
763
|
/* @__PURE__ */ n(
|
|
674
764
|
"button",
|
|
675
765
|
{
|
|
676
766
|
type: "button",
|
|
677
|
-
className:
|
|
678
|
-
onClick:
|
|
767
|
+
className: N(S.arrow, S.arrowNext),
|
|
768
|
+
onClick: x,
|
|
679
769
|
"aria-label": "Next slide",
|
|
680
770
|
tabIndex: 0,
|
|
681
|
-
children: /* @__PURE__ */ n(
|
|
771
|
+
children: /* @__PURE__ */ n(_e, { width: 24, height: 24, "aria-hidden": !0 })
|
|
682
772
|
}
|
|
683
773
|
)
|
|
684
774
|
] }),
|
|
685
|
-
|
|
775
|
+
l > 1 && /* @__PURE__ */ n("div", { className: S.dots, role: "tablist", "aria-label": "Slide selection", children: c.map((b, _) => /* @__PURE__ */ n(
|
|
686
776
|
"button",
|
|
687
777
|
{
|
|
688
778
|
type: "button",
|
|
689
779
|
role: "tab",
|
|
690
|
-
"aria-selected":
|
|
691
|
-
"aria-label": `Slide ${
|
|
692
|
-
className:
|
|
693
|
-
onClick: () =>
|
|
694
|
-
tabIndex:
|
|
780
|
+
"aria-selected": _ === d,
|
|
781
|
+
"aria-label": `Slide ${_ + 1}`,
|
|
782
|
+
className: N(S.dot, _ === d && S.dotActive),
|
|
783
|
+
onClick: () => h(_),
|
|
784
|
+
tabIndex: _ === d ? 0 : -1
|
|
695
785
|
},
|
|
696
|
-
|
|
786
|
+
_
|
|
697
787
|
)) })
|
|
698
788
|
] });
|
|
699
789
|
};
|
|
700
790
|
export {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
791
|
+
ie as Alert,
|
|
792
|
+
Un as Button,
|
|
793
|
+
Zn as Card,
|
|
794
|
+
Gn as Carousel,
|
|
795
|
+
eo as Checkbox,
|
|
796
|
+
zn as DatePicker,
|
|
797
|
+
Fn as DropdownMenu,
|
|
798
|
+
Yt as Input,
|
|
799
|
+
to as Label,
|
|
800
|
+
Vn as Modal,
|
|
801
|
+
hn as PageSizeSelect,
|
|
802
|
+
pn as Pager,
|
|
803
|
+
Qn as Pagination,
|
|
804
|
+
no as Radio,
|
|
805
|
+
me as Select,
|
|
806
|
+
Yn as SimpleBar,
|
|
807
|
+
oo as Tab,
|
|
808
|
+
ao as Textarea,
|
|
809
|
+
ae as Typography,
|
|
810
|
+
Kn as clsx,
|
|
811
|
+
Wn as toastError,
|
|
812
|
+
An as toastSuccess
|
|
720
813
|
};
|
|
721
814
|
//# sourceMappingURL=index.client.js.map
|