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.
@@ -1,551 +1,551 @@
1
1
  "use client";
2
- import z, { clsx as C } from "clsx";
3
- import { clsx as Pn } from "clsx";
4
- import ge from "simplebar-react";
5
- import { default as Tn } from "simplebar-react";
6
- import { A as se, s as W, c as te } from "./Textarea-6m6FiIv5.js";
7
- import { B as $n, C as Ln, a as Mn, L as An, R as Fn, T as Vn, b as Wn } from "./Textarea-6m6FiIv5.js";
8
- import { jsx as n, jsxs as p, Fragment as ce } from "react/jsx-runtime";
9
- import { useEffect as k, useState as j, useRef as R, useCallback as K, useMemo as ne, forwardRef as we, useId as ie } from "react";
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
- import { DayPicker as oe } from "react-day-picker";
12
- import { format as L, parse as M, isValid as A } from "date-fns";
13
- import { C as le } from "./CloseIcon-CqK3tPnG.js";
14
- import * as P from "@radix-ui/react-dropdown-menu";
15
- import { createPortal as Se } from "react-dom";
16
- import { FocusTrap as ke } from "focus-trap-react";
17
- import { toast as Q } from "react-hot-toast";
18
- const Sn = (e) => {
19
- Q.custom((t) => /* @__PURE__ */ n(
20
- se,
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 ? W.toastEnter : W.toastExit,
25
- onClose: () => Q.dismiss(t.id)
24
+ className: t.visible ? q.toastEnter : q.toastExit,
25
+ onClose: () => K.dismiss(t.id)
26
26
  }
27
27
  ));
28
- }, kn = (e, t) => {
29
- Q.custom((r) => /* @__PURE__ */ n(
30
- se,
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: r.visible ? W.toastEnter : W.toastExit,
36
- onClose: () => Q.dismiss(r.id)
35
+ className: a.visible ? q.toastEnter : q.toastExit,
36
+ onClose: () => K.dismiss(a.id)
37
37
  }
38
38
  ));
39
- }, De = "_wrapper_8euq6_1", xe = "_inputContainer_8euq6_5", Ee = "_label_8euq6_11", je = "_inputWrapper_8euq6_15", Oe = "_trigger_8euq6_22", qe = "_icon_8euq6_36", Pe = "_placeholder_8euq6_43", Re = "_clearButton_8euq6_47", Te = "_clearIcon_8euq6_87", Be = "_disabledLabel_8euq6_99", $e = "_error_8euq6_121", Le = "_calendar_8euq6_139", Me = "_open_8euq6_159", Ae = "_monthsCaption_8euq6_165", Fe = "_navButtonPrevious_8euq6_171", Ve = "_navButtonNext_8euq6_172", We = "_navIcon_8euq6_192", Qe = "_monthGrid_8euq6_198", Ge = "_dropdowns_8euq6_204", He = "_weekday_8euq6_208", ze = "_day_8euq6_219", Ke = "_dayButton_8euq6_226", Xe = "_dayOutside_8euq6_253", Ye = "_dayToday_8euq6_257", Je = "_daySelected_8euq6_262", Ue = "_dayRangeStart_8euq6_263", Ze = "_dayRangeEnd_8euq6_264", et = "_dayRangeMiddle_8euq6_265", a = {
40
- wrapper: De,
41
- inputContainer: xe,
42
- label: Ee,
43
- inputWrapper: je,
44
- trigger: Oe,
45
- icon: qe,
46
- placeholder: Pe,
47
- clearButton: Re,
48
- clearIcon: Te,
49
- disabledLabel: Be,
50
- error: $e,
51
- calendar: Le,
52
- open: Me,
53
- monthsCaption: Ae,
54
- navButtonPrevious: Fe,
55
- navButtonNext: Ve,
56
- navIcon: We,
57
- monthGrid: Qe,
58
- dropdowns: Ge,
59
- weekday: He,
60
- day: ze,
61
- dayButton: Ke,
62
- dayOutside: Xe,
63
- dayToday: Ye,
64
- daySelected: Je,
65
- dayRangeStart: Ue,
66
- dayRangeEnd: Ze,
67
- dayRangeMiddle: et
68
- }, tt = ({
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: r
71
+ onDismiss: a
72
72
  }) => {
73
73
  k(() => {
74
74
  if (!t) return;
75
- const o = (s) => {
76
- e.current && !e.current.contains(s.target) && r();
77
- }, i = (s) => {
78
- s.key === "Escape" && r();
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", i), () => {
81
- document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o), document.removeEventListener("keydown", i);
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, r, e]);
84
- }, nt = "_container_sn15j_1", ot = "_label_sn15j_7", rt = "_trigger_sn15j_14", at = "_select_sn15j_18", st = "_triggerOpen_sn15j_50", ct = "_placeholder_sn15j_71", it = "_selectedContent_sn15j_75", lt = "_optionIcon_sn15j_85", dt = "_arrow_sn15j_91", ut = "_open_sn15j_106", _t = "_dropdown_sn15j_110", pt = "_searchContainer_sn15j_131", mt = "_searchInput_sn15j_141", ht = "_option_sn15j_85", ft = "_selected_sn15j_75", gt = "_noOptions_sn15j_202", _ = {
85
- container: nt,
86
- label: ot,
87
- trigger: rt,
88
- select: at,
89
- triggerOpen: st,
90
- placeholder: ct,
91
- selectedContent: it,
92
- optionIcon: lt,
93
- arrow: dt,
94
- open: ut,
95
- dropdown: _t,
96
- searchContainer: pt,
97
- searchInput: mt,
98
- option: ht,
99
- selected: ft,
100
- noOptions: gt
101
- }, wt = ({
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: r,
104
+ loadingText: a,
105
105
  noOptionsText: o,
106
- onSearchChange: i,
107
- onSelect: s,
106
+ onSearchChange: s,
107
+ onSelect: r,
108
108
  searchInputRef: c,
109
- searchPlaceholder: d,
109
+ searchPlaceholder: l,
110
110
  searchQuery: m,
111
- searchable: y,
111
+ searchable: p,
112
112
  value: f
113
- }) => /* @__PURE__ */ p(ce, { children: [
114
- y && /* @__PURE__ */ n("div", { className: _.searchContainer, children: /* @__PURE__ */ n(
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: _.searchInput,
119
- onChange: (l) => i(l.currentTarget.value),
120
- placeholder: d,
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: _.noOptions, children: r }),
126
- e.length ? e.map((l) => /* @__PURE__ */ p(
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: C(_.option, l.value === f && _.selected),
130
- onClick: () => s(l.value),
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": l.value === f,
133
+ "aria-selected": d.value === f,
134
134
  children: [
135
- l.icon && /* @__PURE__ */ n("span", { className: _.optionIcon, children: l.icon }),
136
- l.label
135
+ d.icon && /* @__PURE__ */ n("span", { className: g.optionIcon, children: d.icon }),
136
+ d.label
137
137
  ]
138
138
  },
139
- l.value
140
- )) : t ? null : /* @__PURE__ */ n("p", { className: _.noOptions, children: o })
141
- ] }), re = (e, t) => {
142
- const [r, o] = j(e);
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 i = setTimeout(() => {
144
+ const s = setTimeout(() => {
145
145
  o(e);
146
146
  }, t);
147
147
  return () => {
148
- clearTimeout(i);
148
+ clearTimeout(s);
149
149
  };
150
- }, [t, e]), r;
151
- }, yt = (e) => {
150
+ }, [t, e]), a;
151
+ }, me = (e) => {
152
152
  const {
153
153
  className: t,
154
- defaultSearchValue: r = "",
154
+ defaultSearchValue: a = "",
155
155
  disabled: o = !1,
156
- filterOptions: i,
157
- isLoading: s = !1,
156
+ filterOptions: s,
157
+ isLoading: r = !1,
158
158
  label: c,
159
- loadingText: d = "Loading...",
159
+ loadingText: l = "Loading...",
160
160
  noOptionsText: m = "No options found",
161
- onChange: y,
161
+ onChange: p,
162
162
  onSearchChange: f,
163
- options: l,
164
- placeholder: g,
163
+ options: d,
164
+ placeholder: h,
165
165
  searchDebounceMs: w = 180,
166
- searchMode: D = "local",
167
- searchPlaceholder: x = "Search...",
168
- searchValue: h,
169
- searchable: u = !1,
170
- value: S
171
- } = e, [b, N] = j(!1), [T, X] = j(h ?? r), G = R(null), Y = R(null), J = R(!0), U = h !== void 0 ? h : T, ue = re(U, w), Z = re(T, w), _e = i ?? D === "local", q = l.find((E) => E.value === S), ee = ue.trim().toLowerCase(), pe = _e && ee ? l.filter((E) => E.label.toLowerCase().includes(ee)) : l, H = K(() => {
172
- X("");
173
- }, []), B = K(() => {
174
- N(!1), H();
175
- }, [H]), me = () => {
176
- o || (b ? B() : (H(), N(!0)));
177
- }, he = (E) => {
178
- y?.(E), B();
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 = (fe) => {
182
- G.current && !G.current.contains(fe.target) && B();
181
+ const E = (ve) => {
182
+ X.current && !X.current.contains(ve.target) && M();
183
183
  };
184
- return b && document.addEventListener("mousedown", E), () => {
184
+ return y && document.addEventListener("mousedown", E), () => {
185
185
  document.removeEventListener("mousedown", E);
186
186
  };
187
- }, [B, b]), k(() => {
188
- if (!(!u || !f)) {
189
- if (J.current) {
190
- J.current = !1;
187
+ }, [M, y]), k(() => {
188
+ if (!(!_ || !f)) {
189
+ if (ee.current) {
190
+ ee.current = !1;
191
191
  return;
192
192
  }
193
- f(Z);
193
+ f(ne);
194
194
  }
195
- }, [Z, f, u]), k(() => {
196
- b && u && Y.current?.focus();
197
- }, [b, u]), /* @__PURE__ */ p("div", { className: C(_.container, t), children: [
198
- c && /* @__PURE__ */ n("label", { className: _.label, children: c }),
199
- /* @__PURE__ */ p("div", { className: _.select, ref: G, children: [
200
- /* @__PURE__ */ p(
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: C(_.trigger, b && _.triggerOpen),
203
+ className: N(g.trigger, y && g.triggerOpen),
204
204
  disabled: o,
205
- onClick: me,
205
+ onClick: we,
206
206
  type: "button",
207
207
  "aria-haspopup": "listbox",
208
- "aria-expanded": b,
208
+ "aria-expanded": y,
209
209
  children: [
210
- /* @__PURE__ */ p("span", { className: q ? _.selectedContent : _.placeholder, children: [
211
- q?.icon && /* @__PURE__ */ n("span", { className: _.optionIcon, children: q.icon }),
212
- q ? q.label : g || "Select an option"
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: C(_.arrow, b && _.open), children: /* @__PURE__ */ n(ye, {}) })
214
+ /* @__PURE__ */ n("span", { className: N(g.arrow, y && g.open), children: /* @__PURE__ */ n(Se, {}) })
215
215
  ]
216
216
  }
217
217
  ),
218
- b && /* @__PURE__ */ n(ge, { className: _.dropdown, role: "listbox", style: { maxHeight: 191 }, children: /* @__PURE__ */ n(
219
- wt,
218
+ y && /* @__PURE__ */ n(Ne, { className: g.dropdown, role: "listbox", style: { maxHeight: 191 }, children: /* @__PURE__ */ n(
219
+ vt,
220
220
  {
221
- filteredOptions: pe,
222
- isLoading: s,
223
- loadingText: d,
221
+ filteredOptions: be,
222
+ isLoading: r,
223
+ loadingText: l,
224
224
  noOptionsText: m,
225
- onSearchChange: X,
226
- onSelect: he,
227
- searchInputRef: Y,
228
- searchPlaceholder: x,
229
- searchQuery: U,
230
- searchable: u,
231
- value: S
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
- }, de = (e) => {
236
+ }, he = (e) => {
237
237
  const t = (o) => {
238
238
  if (e.onChange) {
239
- const i = {
239
+ const s = {
240
240
  target: {
241
241
  value: o
242
242
  }
243
243
  };
244
- e.onChange(i);
244
+ e.onChange(s);
245
245
  }
246
- }, r = e.options?.map((o) => ({
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
- yt,
251
+ me,
252
252
  {
253
253
  className: e.className,
254
- options: r,
254
+ options: a,
255
255
  value: e.value?.toString() || "",
256
256
  onChange: t
257
257
  }
258
258
  );
259
259
  };
260
- de.displayName = "DatePickerDropdown";
261
- const bt = {
262
- month_caption: a.monthsCaption,
263
- button_previous: a.navButtonPrevious,
264
- button_next: a.navButtonNext,
265
- chevron: a.navIcon,
266
- caption_label: a.captionLabel,
267
- dropdowns: a.dropdowns,
268
- dropdown_root: a.dropdown_root,
269
- dropdown: a.dropdown,
270
- dropdown_select_option: a.option,
271
- months_dropdown: a.monthsDropdown,
272
- years_dropdown: a.yearsDropdown,
273
- month_grid: a.monthGrid,
274
- weekday: a.weekday,
275
- day_button: a.dayButton,
276
- day: a.day,
277
- outside: a.dayOutside,
278
- selected: a.daySelected,
279
- range_start: a.dayRangeStart,
280
- range_middle: a.dayRangeMiddle,
281
- range_end: a.dayRangeEnd,
282
- today: a.dayToday
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
- }, Nt = {
291
- components: vt,
292
- ...Ct
293
- }, It = (e) => ({
294
- ...Nt,
290
+ }, It = {
291
+ components: Ct,
292
+ ...St
293
+ }, kt = (e) => ({
294
+ ...It,
295
295
  classNames: {
296
- root: z(a.calendar, e && a.open),
297
- ...bt
296
+ root: J(i.calendar, e && i.open),
297
+ ...Nt
298
298
  }
299
- }), F = "dd.MM.yyyy", St = (e) => e ? L(e, F) : "", kt = (e) => !e || !e.from ? "" : e.to && e.from.getTime() !== e.to.getTime() ? `${L(e.from, F)} - ${L(e.to, F)}` : L(e.from, F), ae = (e, t) => e ? t === "single" && e instanceof Date ? St(e) : t === "range" && typeof e == "object" && "from" in e ? kt(e) : "" : "", Dt = ({
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: r,
302
+ onChange: a,
303
303
  setMonth: o,
304
- setIsOpen: i
304
+ setIsOpen: s
305
305
  }) => {
306
306
  if (!e) {
307
- r("");
307
+ a("");
308
308
  return;
309
309
  }
310
310
  if (t === "single") {
311
- e instanceof Date && (o(e), r(ae(e, "single")), i(!1));
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 s = e;
316
- s.from ? o(s.from) : s.to && o(s.to);
317
- const c = ae(s, "range");
318
- r(c), s.from && s.to && s.from.getTime() !== s.to.getTime() && i(!1);
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
- }, V = "dd.MM.yyyy", xt = (e) => {
320
+ }, G = "dd.MM.yyyy", jt = (e) => {
321
321
  if (!e) return;
322
- const t = M(e, V, /* @__PURE__ */ new Date());
323
- return A(t) ? t : void 0;
324
- }, Et = (e) => {
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 = " - ", r = e.indexOf(t);
327
- if (r === -1) {
328
- const d = M(e.trim(), V, /* @__PURE__ */ new Date());
329
- return A(d) ? { from: d, to: void 0 } : void 0;
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, r).trim(), i = e.substring(r + t.length).trim();
332
- if (!o || !i) return;
333
- const s = M(o, V, /* @__PURE__ */ new Date()), c = M(i, V, /* @__PURE__ */ new Date());
334
- if (A(s) && A(c))
335
- return { from: s, to: c };
336
- }, jt = (e, t) => {
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" ? xt(e) : Et(e);
339
- }, Ot = (e, t, r) => {
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
- r(e);
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 ? r(o.from) : o.to && r(o.to);
347
+ o.from ? a(o.from) : o.to && a(o.to);
348
348
  }
349
349
  }
350
- }, Dn = ({
350
+ }, zn = ({
351
351
  mode: e,
352
352
  value: t,
353
- onChange: r,
353
+ onChange: a,
354
354
  disabled: o,
355
- label: i,
356
- error: s,
355
+ label: s,
356
+ error: r,
357
357
  placeholder: c,
358
- ...d
358
+ ...l
359
359
  }) => {
360
- const [m, y] = j(!1), f = R(null), [l, g] = j(/* @__PURE__ */ new Date()), w = ne(() => jt(t, e), [t, e]);
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
- Ot(w, e, g);
363
- }, [w, e, g]), tt({ ref: f, isOpen: m, onDismiss: () => {
364
- y(!1);
362
+ Pt(w, e, h);
363
+ }, [w, e, h]), at({ ref: f, isOpen: m, onDismiss: () => {
364
+ p(!1);
365
365
  } });
366
- const x = (N) => {
367
- N.stopPropagation(), S(void 0);
368
- }, h = () => {
369
- o || y((N) => !N);
370
- }, u = (N) => {
371
- const T = N.currentTarget.value;
372
- r(T);
373
- }, S = (N) => {
374
- Dt({
375
- value: N,
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: r,
378
- setMonth: g,
379
- setIsOpen: y
377
+ onChange: a,
378
+ setMonth: h,
379
+ setIsOpen: p
380
380
  });
381
- }, b = ne(() => It(m), [m]);
382
- return /* @__PURE__ */ p("div", { ref: f, className: a.wrapper, children: [
383
- /* @__PURE__ */ p("div", { className: a.inputContainer, children: [
384
- i && /* @__PURE__ */ n("span", { className: o ? a.disabledLabel : a.label, children: /* @__PURE__ */ n(te, { variant: "text-14", children: i }) }),
385
- /* @__PURE__ */ p("div", { className: a.inputWrapper, children: [
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: z(a.trigger, s && a.error),
391
- onClick: h,
390
+ className: J(i.trigger, r && i.error),
391
+ onClick: b,
392
392
  value: t,
393
- onChange: u,
393
+ onChange: _,
394
394
  placeholder: c,
395
395
  disabled: o,
396
- "aria-label": i || "Select date",
396
+ "aria-label": s || "Select date",
397
397
  "aria-expanded": m,
398
398
  "aria-haspopup": "dialog",
399
- "aria-invalid": s ? "true" : "false",
400
- ...d
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: a.clearButton,
408
- onClick: x,
407
+ className: i.clearButton,
408
+ onClick: D,
409
409
  "aria-label": "Clear date",
410
- children: /* @__PURE__ */ n(le, { className: a.clearIcon })
410
+ children: /* @__PURE__ */ n(ue, { className: i.clearIcon })
411
411
  }
412
412
  ),
413
- /* @__PURE__ */ n(be, { className: z(a.icon, !t && a.placeholder) })
413
+ /* @__PURE__ */ n(Ie, { className: J(i.icon, !t && i.placeholder) })
414
414
  ] }),
415
- s && /* @__PURE__ */ n(te, { variant: "small", className: a.error, children: s })
415
+ r && /* @__PURE__ */ n(ae, { variant: "small", className: i.error, children: r })
416
416
  ] }),
417
417
  e === "single" ? /* @__PURE__ */ n(
418
- oe,
418
+ re,
419
419
  {
420
- ...b,
421
- month: l,
422
- onMonthChange: g,
420
+ ...y,
421
+ month: d,
422
+ onMonthChange: h,
423
423
  mode: "single",
424
424
  selected: w instanceof Date ? w : void 0,
425
- onSelect: S
425
+ onSelect: I
426
426
  }
427
427
  ) : /* @__PURE__ */ n(
428
- oe,
428
+ re,
429
429
  {
430
- ...b,
431
- month: l,
432
- onMonthChange: g,
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: S
435
+ onSelect: I
436
436
  }
437
437
  )
438
438
  ] });
439
- }, qt = "_content_1bas8_1", Pt = "_item_1bas8_24", Rt = "_icon_1bas8_56", Tt = "_label_1bas8_62", $ = {
440
- content: qt,
441
- item: Pt,
442
- icon: Rt,
443
- label: Tt
444
- }, xn = (e) => {
445
- const { children: t, items: r, className: o, align: i = "end", side: s = "bottom" } = e;
446
- return /* @__PURE__ */ p(P.Root, { children: [
447
- /* @__PURE__ */ n(P.Trigger, { asChild: !0, children: t }),
448
- /* @__PURE__ */ n(P.Portal, { children: /* @__PURE__ */ n(
449
- P.Content,
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: i,
452
- className: C($.content, o),
453
- side: s,
451
+ align: s,
452
+ className: N(A.content, o),
453
+ side: r,
454
454
  sideOffset: 4,
455
- children: r.map((c, d) => /* @__PURE__ */ p(
456
- P.Item,
455
+ children: a.map((c, l) => /* @__PURE__ */ u(
456
+ R.Item,
457
457
  {
458
- className: $.item,
458
+ className: A.item,
459
459
  disabled: c.disabled,
460
460
  onSelect: c.onSelect,
461
461
  children: [
462
- c.icon && /* @__PURE__ */ n("span", { className: $.icon, children: c.icon }),
463
- /* @__PURE__ */ n("span", { className: $.label, children: c.label })
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
- d
466
+ l
467
467
  ))
468
468
  }
469
469
  ) })
470
470
  ] });
471
- }, Bt = "_wrapper_gp2gj_1", $t = "_label_gp2gj_7", Lt = "_disabled_gp2gj_14", Mt = "_input_gp2gj_18", At = "_inputContainer_gp2gj_22", Ft = "_error_gp2gj_47", Vt = "_withStartIcon_gp2gj_64", Wt = "_withEndIcon_gp2gj_68", Qt = "_startIcon_gp2gj_85", Gt = "_endIcon_gp2gj_86", Ht = "_errorMessage_gp2gj_137", zt = "_required_gp2gj_144", v = {
472
- wrapper: Bt,
473
- label: $t,
474
- disabled: Lt,
475
- input: Mt,
476
- inputContainer: At,
477
- error: Ft,
478
- withStartIcon: Vt,
479
- withEndIcon: Wt,
480
- startIcon: Qt,
481
- endIcon: Gt,
482
- errorMessage: Ht,
483
- required: zt
484
- }, Kt = we(
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: r,
488
+ startIcon: a,
489
489
  endIcon: o,
490
- onEndIconClick: i,
491
- allowPasswordToggle: s,
490
+ onEndIconClick: s,
491
+ allowPasswordToggle: r,
492
492
  disabled: c,
493
- type: d = "text",
493
+ type: l = "text",
494
494
  className: m,
495
- required: y,
495
+ required: p,
496
496
  id: f,
497
- ...l
498
- }, g) => {
499
- const w = ie(), D = f ?? w, x = t ? `${D}-error` : void 0, h = !!t, u = d === "password" && s, [S, b] = j(!1);
500
- return /* @__PURE__ */ p("div", { className: C(v.wrapper, m), children: [
501
- e && /* @__PURE__ */ p("label", { htmlFor: D, className: C(v.label, { [v.disabled]: c }), children: [
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
- y && /* @__PURE__ */ n("sup", { className: v.required, children: " *" })
503
+ p && /* @__PURE__ */ n("sup", { className: v.required, children: " *" })
504
504
  ] }),
505
- /* @__PURE__ */ p(
505
+ /* @__PURE__ */ u(
506
506
  "div",
507
507
  {
508
- className: C(v.inputContainer, {
509
- [v.error]: h,
508
+ className: N(v.inputContainer, {
509
+ [v.error]: b,
510
510
  [v.disabled]: c,
511
- [v.withStartIcon]: !!r,
512
- [v.withEndIcon]: !!o || u
511
+ [v.withStartIcon]: !!a,
512
+ [v.withEndIcon]: !!o || _
513
513
  }),
514
514
  children: [
515
- r && /* @__PURE__ */ n("span", { className: v.startIcon, children: r }),
515
+ a && /* @__PURE__ */ n("span", { className: v.startIcon, children: a }),
516
516
  /* @__PURE__ */ n(
517
517
  "input",
518
518
  {
519
- ref: g,
520
- id: D,
519
+ ref: h,
520
+ id: x,
521
521
  className: v.input,
522
- type: u && S ? "text" : d,
523
- autoComplete: d === "password" ? "current-password" : "off",
524
- required: y,
522
+ type: _ && I ? "text" : l,
523
+ autoComplete: l === "password" ? "current-password" : "off",
524
+ required: p,
525
525
  disabled: c,
526
- "aria-invalid": h,
527
- "aria-describedby": x,
528
- ...l
526
+ "aria-invalid": b,
527
+ "aria-describedby": D,
528
+ ...d
529
529
  }
530
530
  ),
531
- u && /* @__PURE__ */ n(
531
+ _ && /* @__PURE__ */ n(
532
532
  "button",
533
533
  {
534
534
  type: "button",
535
535
  className: v.endIcon,
536
- onClick: () => b((N) => !N),
537
- "aria-label": S ? "Hide password" : "Show password",
536
+ onClick: () => y((C) => !C),
537
+ "aria-label": I ? "Hide password" : "Show password",
538
538
  disabled: c,
539
539
  tabIndex: -1,
540
- children: S ? /* @__PURE__ */ n(ve, {}) : /* @__PURE__ */ n(Ce, {})
540
+ children: I ? /* @__PURE__ */ n(ke, {}) : /* @__PURE__ */ n(xe, {})
541
541
  }
542
542
  ),
543
- o && !u && /* @__PURE__ */ n(
543
+ o && !_ && /* @__PURE__ */ n(
544
544
  "button",
545
545
  {
546
546
  type: "button",
547
547
  className: v.endIcon,
548
- onClick: i,
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
- h && /* @__PURE__ */ n("span", { id: x, className: v.errorMessage, role: "alert", children: t })
557
+ b && /* @__PURE__ */ n("span", { id: D, className: v.errorMessage, role: "alert", children: t })
558
558
  ] });
559
559
  }
560
560
  );
561
- Kt.displayName = "Input";
562
- const Xt = "_overlay_17k3a_1", Yt = "_modal_17k3a_15", Jt = "_header_17k3a_29", Ut = "_title_17k3a_39", Zt = "_close_17k3a_52", en = "_body_17k3a_79", O = {
563
- overlay: Xt,
564
- modal: Yt,
565
- header: Jt,
566
- title: Ut,
567
- close: Zt,
568
- body: en
569
- }, En = ({ open: e, onClose: t, title: r, children: o, className: i }) => {
570
- const s = ie(), c = R(t);
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 = (y) => {
581
- y.key === "Escape" && c.current();
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 d = document.getElementById("modal-root") ?? document.body;
588
- return Se(
587
+ const l = document.getElementById("modal-root") ?? document.body;
588
+ return De(
589
589
  /* @__PURE__ */ n(
590
- ke,
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__ */ p(
597
+ children: /* @__PURE__ */ n("div", { className: O.overlay, onClick: () => c.current(), children: /* @__PURE__ */ u(
598
598
  "div",
599
599
  {
600
- className: C(O.modal, i),
600
+ className: N(O.modal, s),
601
601
  onClick: (m) => m.stopPropagation(),
602
602
  role: "dialog",
603
603
  "aria-modal": "true",
604
- "aria-labelledby": s,
604
+ "aria-labelledby": r,
605
605
  children: [
606
- /* @__PURE__ */ p("header", { className: O.header, children: [
607
- /* @__PURE__ */ n("h2", { id: s, className: O.title, children: r }),
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(le, {})
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
- d
625
+ l
626
626
  );
627
- }, tn = "_root_w6me9_1", nn = "_trackWrapper_w6me9_16", on = "_track_w6me9_16", rn = "_slide_w6me9_32", an = "_arrow_w6me9_53", sn = "_arrowPrev_w6me9_89", cn = "_arrowNext_w6me9_93", ln = "_dots_w6me9_97", dn = "_dot_w6me9_97", un = "_dotActive_w6me9_133", I = {
628
- root: tn,
629
- trackWrapper: nn,
630
- track: on,
631
- slide: rn,
632
- arrow: an,
633
- arrowPrev: sn,
634
- arrowNext: cn,
635
- dots: ln,
636
- dot: dn,
637
- dotActive: un
638
- }, jn = ({
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: r,
731
+ onValueChange: a,
642
732
  autoPlayInterval: o = 0,
643
- className: i,
644
- hideArrowsWhenSingle: s = !0
733
+ className: s,
734
+ hideArrowsWhenSingle: r = !0
645
735
  }) => {
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
- (h) => {
648
- const u = (h + d) % d;
649
- f || y(u), r?.(u);
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
- [d, f, r]
741
+ [l, f, a]
652
742
  );
653
743
  if (k(() => {
654
- if (o <= 0 || d <= 1) return;
655
- const h = setInterval(() => g(l + 1), o);
656
- return () => clearInterval(h);
657
- }, [o, d, l, g]), d === 0) return null;
658
- const w = () => g(l - 1), D = () => g(l + 1), x = !s || d > 1;
659
- return /* @__PURE__ */ p("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, u) => /* @__PURE__ */ n("div", { className: I.slide, children: h }, u)) }) }),
661
- x && /* @__PURE__ */ p(ce, { children: [
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: C(I.arrow, I.arrowPrev),
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(Ne, { width: 24, height: 24, "aria-hidden": !0 })
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: C(I.arrow, I.arrowNext),
678
- onClick: D,
767
+ className: N(S.arrow, S.arrowNext),
768
+ onClick: x,
679
769
  "aria-label": "Next slide",
680
770
  tabIndex: 0,
681
- children: /* @__PURE__ */ n(Ie, { width: 24, height: 24, "aria-hidden": !0 })
771
+ children: /* @__PURE__ */ n(_e, { width: 24, height: 24, "aria-hidden": !0 })
682
772
  }
683
773
  )
684
774
  ] }),
685
- d > 1 && /* @__PURE__ */ n("div", { className: I.dots, role: "tablist", "aria-label": "Slide selection", children: c.map((h, u) => /* @__PURE__ */ n(
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": u === l,
691
- "aria-label": `Slide ${u + 1}`,
692
- className: C(I.dot, u === l && I.dotActive),
693
- onClick: () => g(u),
694
- tabIndex: u === l ? 0 : -1
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
- u
786
+ _
697
787
  )) })
698
788
  ] });
699
789
  };
700
790
  export {
701
- se as Alert,
702
- $n as Button,
703
- Ln as Card,
704
- jn as Carousel,
705
- Mn as Checkbox,
706
- Dn as DatePicker,
707
- xn as DropdownMenu,
708
- Kt as Input,
709
- An as Label,
710
- En as Modal,
711
- Fn as Radio,
712
- yt as Select,
713
- Tn as SimpleBar,
714
- Vn as Tab,
715
- Wn as Textarea,
716
- te as Typography,
717
- Pn as clsx,
718
- kn as toastError,
719
- Sn as toastSuccess
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