snapflow-ui-kit 1.2.9 → 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.
@@ -1,61 +1,61 @@
1
1
  "use client";
2
2
  import z, { clsx as C } from "clsx";
3
- import { clsx as Pn } from "clsx";
3
+ import { clsx as Rn } from "clsx";
4
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";
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 L, parse as M, isValid as A } from "date-fns";
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 P from "@radix-ui/react-dropdown-menu";
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 Q } from "react-hot-toast";
17
+ import { toast as G } from "react-hot-toast";
18
18
  const Sn = (e) => {
19
- Q.custom((t) => /* @__PURE__ */ n(
19
+ G.custom((t) => /* @__PURE__ */ n(
20
20
  se,
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: () => G.dismiss(t.id)
26
26
  }
27
27
  ));
28
28
  }, kn = (e, t) => {
29
- Q.custom((r) => /* @__PURE__ */ n(
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: r.visible ? W.toastEnter : W.toastExit,
36
- onClose: () => Q.dismiss(r.id)
35
+ className: a.visible ? Q.toastEnter : Q.toastExit,
36
+ onClose: () => G.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 = {
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: 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,
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: r
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) && r();
76
+ e.current && !e.current.contains(s.target) && a();
77
77
  }, i = (s) => {
78
- s.key === "Escape" && r();
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, 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", _ = {
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: rt,
88
- select: at,
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: ut,
95
- dropdown: _t,
96
- searchContainer: pt,
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: r,
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__ */ p(ce, { children: [
114
- y && /* @__PURE__ */ n("div", { className: _.searchContainer, children: /* @__PURE__ */ n(
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: _.searchInput,
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: _.noOptions, children: r }),
126
- e.length ? e.map((l) => /* @__PURE__ */ p(
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(_.option, l.value === f && _.selected),
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: _.optionIcon, children: l.icon }),
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: _.noOptions, children: o })
141
- ] }), re = (e, t) => {
142
- const [r, o] = j(e);
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]), r;
150
+ }, [t, e]), a;
151
151
  }, yt = (e) => {
152
152
  const {
153
153
  className: t,
154
- defaultSearchValue: r = "",
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: u = !1,
169
+ searchable: _ = !1,
170
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(() => {
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
- }, []), B = K(() => {
173
+ }, []), $ = K(() => {
174
174
  N(!1), H();
175
175
  }, [H]), me = () => {
176
- o || (b ? B() : (H(), N(!0)));
176
+ o || (b ? $() : (H(), N(!0)));
177
177
  }, he = (E) => {
178
- y?.(E), B();
178
+ y?.(E), $();
179
179
  };
180
180
  return k(() => {
181
181
  const E = (fe) => {
182
- G.current && !G.current.contains(fe.target) && B();
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
- }, [B, b]), k(() => {
188
- if (!(!u || !f)) {
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, 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
+ }, [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(_.trigger, b && _.triggerOpen),
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__ */ 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 ? 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(_.arrow, b && _.open), children: /* @__PURE__ */ n(ye, {}) })
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: _.dropdown, role: "listbox", style: { maxHeight: 191 }, children: /* @__PURE__ */ n(
218
+ b && /* @__PURE__ */ n(ge, { className: p.dropdown, role: "listbox", style: { maxHeight: 191 }, children: /* @__PURE__ */ n(
219
219
  wt,
220
220
  {
221
- filteredOptions: pe,
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: u,
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
- }, r = e.options?.map((o) => ({
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: r,
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: 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
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(a.calendar, e && a.open),
296
+ root: z(r.calendar, e && r.open),
297
297
  ...bt
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
+ }), 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: r,
302
+ onChange: a,
303
303
  setMonth: o,
304
304
  setIsOpen: i
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(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 = ae(s, "range");
318
- r(c), s.from && s.to && s.from.getTime() !== s.to.getTime() && i(!1);
317
+ const c = re(s, "range");
318
+ a(c), s.from && s.to && s.from.getTime() !== s.to.getTime() && i(!1);
319
319
  }
320
- }, V = "dd.MM.yyyy", xt = (e) => {
320
+ }, W = "dd.MM.yyyy", xt = (e) => {
321
321
  if (!e) return;
322
- const t = M(e, V, /* @__PURE__ */ new Date());
323
- return A(t) ? t : void 0;
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 = " - ", 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 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, r).trim(), i = e.substring(r + t.length).trim();
331
+ const o = e.substring(0, a).trim(), i = e.substring(a + t.length).trim();
332
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))
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, r) => {
339
+ }, Ot = (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
350
  }, Dn = ({
351
351
  mode: e,
352
352
  value: t,
353
- onChange: r,
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 = R(null), [l, g] = j(/* @__PURE__ */ new Date()), w = ne(() => jt(t, e), [t, e]);
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
- }, u = (N) => {
371
- const T = N.currentTarget.value;
372
- r(T);
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: r,
377
+ onChange: a,
378
378
  setMonth: g,
379
379
  setIsOpen: y
380
380
  });
381
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: [
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(a.trigger, s && a.error),
390
+ className: z(r.trigger, s && r.error),
391
391
  onClick: h,
392
392
  value: t,
393
- onChange: u,
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: a.clearButton,
407
+ className: r.clearButton,
408
408
  onClick: x,
409
409
  "aria-label": "Clear date",
410
- children: /* @__PURE__ */ n(le, { className: a.clearIcon })
410
+ children: /* @__PURE__ */ n(le, { className: r.clearIcon })
411
411
  }
412
412
  ),
413
- /* @__PURE__ */ n(be, { className: z(a.icon, !t && a.placeholder) })
413
+ /* @__PURE__ */ n(be, { className: z(r.icon, !t && r.placeholder) })
414
414
  ] }),
415
- s && /* @__PURE__ */ n(te, { variant: "small", className: a.error, children: s })
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
- }, 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
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: 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,
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($.content, o),
452
+ className: C(L.content, o),
453
453
  side: s,
454
454
  sideOffset: 4,
455
- children: r.map((c, d) => /* @__PURE__ */ p(
456
- P.Item,
455
+ children: a.map((c, d) => /* @__PURE__ */ u(
456
+ R.Item,
457
457
  {
458
- className: $.item,
458
+ className: L.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: 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
- }, 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,
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: r,
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, 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: [
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__ */ p(
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]: !!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
519
  ref: g,
520
520
  id: D,
521
521
  className: v.input,
522
- type: u && S ? "text" : d,
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
- u && /* @__PURE__ */ n(
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 && !u && /* @__PURE__ */ n(
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: r, children: o, className: i }) => {
570
- const s = ie(), c = R(t);
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__ */ p(
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__ */ 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: 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", 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 = {
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: rn,
632
- arrow: an,
631
+ slide: an,
632
+ arrow: rn,
633
633
  arrowPrev: sn,
634
634
  arrowNext: cn,
635
635
  dots: ln,
636
636
  dot: dn,
637
- dotActive: un
637
+ dotActive: _n
638
638
  }, jn = ({
639
639
  children: e,
640
640
  value: t,
641
- onValueChange: r,
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 u = (h + d) % d;
649
- f || y(u), r?.(u);
648
+ const _ = (h + d) % d;
649
+ f || y(_), a?.(_);
650
650
  },
651
- [d, f, r]
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__ */ 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: [
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, u) => /* @__PURE__ */ n(
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": 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
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
- u
696
+ _
697
697
  )) })
698
698
  ] });
699
699
  };
700
700
  export {
701
701
  se as Alert,
702
- $n as Button,
703
- Ln as Card,
702
+ Ln as Button,
703
+ Mn as Card,
704
704
  jn as Carousel,
705
- Mn as Checkbox,
705
+ An as Checkbox,
706
706
  Dn as DatePicker,
707
707
  xn as DropdownMenu,
708
708
  Kt as Input,
709
- An as Label,
709
+ Fn as Label,
710
710
  En as Modal,
711
- Fn as Radio,
711
+ Vn as Radio,
712
712
  yt as Select,
713
- Tn as SimpleBar,
714
- Vn as Tab,
715
- Wn as Textarea,
713
+ Bn as SimpleBar,
714
+ Wn as Tab,
715
+ Qn as Textarea,
716
716
  te as Typography,
717
- Pn as clsx,
717
+ Rn as clsx,
718
718
  kn as toastError,
719
719
  Sn as toastSuccess
720
720
  };