snapflow-ui-kit 1.2.2 → 1.2.3

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,192 +1,152 @@
1
1
  "use client";
2
- import j, { clsx as w } from "clsx";
3
- import { clsx as pn } from "clsx";
4
- import U from "simplebar-react";
5
- import { default as mn } from "simplebar-react";
6
- import { A as K, s as A, c as V } from "./Textarea-D5WrCGtg.js";
7
- import { B as fn, C as hn, a as bn, L as gn, R as yn, T as wn, b as vn } from "./Textarea-D5WrCGtg.js";
8
- import { jsx as n, jsxs as u, Fragment as Z } from "react/jsx-runtime";
9
- import { useEffect as x, useState as P, useMemo as F, useRef as G, forwardRef as ee, useId as X, useCallback as te } from "react";
10
- import { A as ne, C as oe, E as re, a as ae, b as se, c as ce } from "./ArrowRightIcon-D0SDyfKt.js";
11
- import { DayPicker as q } from "react-day-picker";
12
- import { parse as O, isValid as $, format as M } from "date-fns";
2
+ import M, { clsx as w } from "clsx";
3
+ import { clsx as dn } from "clsx";
4
+ import Q from "simplebar-react";
5
+ import { default as un } from "simplebar-react";
6
+ import { A as K, s as j, c as F } from "./Textarea-6m6FiIv5.js";
7
+ import { B as mn, C as gn, a as hn, L as fn, R as yn, T as bn, b as wn } from "./Textarea-6m6FiIv5.js";
8
+ import { jsx as n, jsxs as m, Fragment as U } from "react/jsx-runtime";
9
+ import { useEffect as D, useState as q, useRef as W, useMemo as G, forwardRef as Z, useId as X, useCallback as ee } from "react";
10
+ import { A as te, C as ne, E as oe, a as re, b as ae, c as se } from "./ArrowRightIcon-D0SDyfKt.js";
11
+ import { DayPicker as V } from "react-day-picker";
12
+ import { format as B, parse as O, isValid as $ } from "date-fns";
13
13
  import { C as Y } from "./CloseIcon-CqK3tPnG.js";
14
14
  import * as S from "@radix-ui/react-dropdown-menu";
15
- import { createPortal as ie } from "react-dom";
16
- import { FocusTrap as le } from "focus-trap-react";
17
- import { toast as W } from "react-hot-toast";
18
- const nn = (e) => {
19
- W.custom((t) => /* @__PURE__ */ n(
15
+ import { createPortal as ce } from "react-dom";
16
+ import { FocusTrap as ie } from "focus-trap-react";
17
+ import { toast as A } from "react-hot-toast";
18
+ const tn = (e) => {
19
+ A.custom((t) => /* @__PURE__ */ n(
20
20
  K,
21
21
  {
22
22
  variant: "success",
23
23
  message: e,
24
- className: t.visible ? A.toastEnter : A.toastExit,
25
- onClose: () => W.dismiss(t.id)
24
+ className: t.visible ? j.toastEnter : j.toastExit,
25
+ onClose: () => A.dismiss(t.id)
26
26
  }
27
27
  ));
28
- }, on = (e, t = "Error!") => {
29
- W.custom((r) => /* @__PURE__ */ n(
28
+ }, nn = (e, t = "Error!") => {
29
+ A.custom((r) => /* @__PURE__ */ n(
30
30
  K,
31
31
  {
32
32
  variant: "error",
33
33
  title: t,
34
34
  message: e,
35
- className: r.visible ? A.toastEnter : A.toastExit,
36
- onClose: () => W.dismiss(r.id)
35
+ className: r.visible ? j.toastEnter : j.toastExit,
36
+ onClose: () => A.dismiss(r.id)
37
37
  }
38
38
  ));
39
- }, de = "_wrapper_1fmp6_1", pe = "_inputContainer_1fmp6_5", _e = "_label_1fmp6_11", me = "_inputWrapper_1fmp6_15", ue = "_trigger_1fmp6_22", fe = "_icon_1fmp6_36", he = "_placeholder_1fmp6_43", be = "_clearButton_1fmp6_47", ge = "_clearIcon_1fmp6_87", ye = "_disabledLabel_1fmp6_99", we = "_error_1fmp6_121", ve = "_calendar_1fmp6_139", Ne = "_open_1fmp6_158", Ce = "_monthsCaption_1fmp6_164", Ie = "_navButtonPrevious_1fmp6_170", ke = "_navButtonNext_1fmp6_171", De = "_navIcon_1fmp6_191", xe = "_monthGrid_1fmp6_197", Ee = "_dropdowns_1fmp6_203", Se = "_weekday_1fmp6_207", Pe = "_day_1fmp6_218", Re = "_dayButton_1fmp6_225", Be = "_dayOutside_1fmp6_252", Oe = "_dayToday_1fmp6_256", $e = "_daySelected_1fmp6_261", Me = "_dayRangeStart_1fmp6_262", Te = "_dayRangeEnd_1fmp6_263", Le = "_dayRangeMiddle_1fmp6_264", s = {
40
- wrapper: de,
41
- inputContainer: pe,
39
+ }, le = "_wrapper_8euq6_1", de = "_inputContainer_8euq6_5", _e = "_label_8euq6_11", ue = "_inputWrapper_8euq6_15", pe = "_trigger_8euq6_22", me = "_icon_8euq6_36", ge = "_placeholder_8euq6_43", he = "_clearButton_8euq6_47", fe = "_clearIcon_8euq6_87", ye = "_disabledLabel_8euq6_99", be = "_error_8euq6_121", we = "_calendar_8euq6_139", ve = "_open_8euq6_159", Ne = "_monthsCaption_8euq6_165", Ce = "_navButtonPrevious_8euq6_171", Ie = "_navButtonNext_8euq6_172", ke = "_navIcon_8euq6_192", xe = "_monthGrid_8euq6_198", De = "_dropdowns_8euq6_204", Ee = "_weekday_8euq6_208", Se = "_day_8euq6_219", qe = "_dayButton_8euq6_226", Pe = "_dayOutside_8euq6_253", Re = "_dayToday_8euq6_257", Be = "_daySelected_8euq6_262", Oe = "_dayRangeStart_8euq6_263", $e = "_dayRangeEnd_8euq6_264", Te = "_dayRangeMiddle_8euq6_265", a = {
40
+ wrapper: le,
41
+ inputContainer: de,
42
42
  label: _e,
43
- inputWrapper: me,
44
- trigger: ue,
45
- icon: fe,
46
- placeholder: he,
47
- clearButton: be,
48
- clearIcon: ge,
43
+ inputWrapper: ue,
44
+ trigger: pe,
45
+ icon: me,
46
+ placeholder: ge,
47
+ clearButton: he,
48
+ clearIcon: fe,
49
49
  disabledLabel: ye,
50
- error: we,
51
- calendar: ve,
52
- open: Ne,
53
- monthsCaption: Ce,
54
- navButtonPrevious: Ie,
55
- navButtonNext: ke,
56
- navIcon: De,
50
+ error: be,
51
+ calendar: we,
52
+ open: ve,
53
+ monthsCaption: Ne,
54
+ navButtonPrevious: Ce,
55
+ navButtonNext: Ie,
56
+ navIcon: ke,
57
57
  monthGrid: xe,
58
- dropdowns: Ee,
59
- weekday: Se,
60
- day: Pe,
61
- dayButton: Re,
62
- dayOutside: Be,
63
- dayToday: Oe,
64
- daySelected: $e,
65
- dayRangeStart: Me,
66
- dayRangeEnd: Te,
67
- dayRangeMiddle: Le
68
- }, Ae = ({
58
+ dropdowns: De,
59
+ weekday: Ee,
60
+ day: Se,
61
+ dayButton: qe,
62
+ dayOutside: Pe,
63
+ dayToday: Re,
64
+ daySelected: Be,
65
+ dayRangeStart: Oe,
66
+ dayRangeEnd: $e,
67
+ dayRangeMiddle: Te
68
+ }, Le = ({
69
69
  ref: e,
70
70
  isOpen: t,
71
71
  onDismiss: r
72
72
  }) => {
73
- x(() => {
73
+ D(() => {
74
74
  if (!t) return;
75
- const o = (c) => {
76
- e.current && !e.current.contains(c.target) && r();
77
- }, l = (c) => {
78
- c.key === "Escape" && r();
75
+ const o = (s) => {
76
+ e.current && !e.current.contains(s.target) && r();
77
+ }, l = (s) => {
78
+ s.key === "Escape" && r();
79
79
  };
80
80
  return document.addEventListener("mousedown", o), document.addEventListener("touchstart", o), document.addEventListener("keydown", l), () => {
81
81
  document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o), document.removeEventListener("keydown", l);
82
82
  };
83
83
  }, [t, r, e]);
84
- }, T = "dd.MM.yyyy", We = (e) => {
85
- if (!e) return;
86
- const t = O(e, T, /* @__PURE__ */ new Date());
87
- return $(t) ? t : void 0;
88
- }, je = (e) => {
89
- if (!e) return;
90
- const t = " - ", r = e.indexOf(t);
91
- if (r === -1) {
92
- const i = O(e.trim(), T, /* @__PURE__ */ new Date());
93
- return $(i) ? { from: i, to: void 0 } : void 0;
94
- }
95
- const o = e.substring(0, r).trim(), l = e.substring(r + t.length).trim();
96
- if (!o || !l) return;
97
- const c = O(o, T, /* @__PURE__ */ new Date()), a = O(l, T, /* @__PURE__ */ new Date());
98
- if ($(c) && $(a))
99
- return { from: c, to: a };
100
- }, z = (e, t) => {
101
- if (e)
102
- return t === "single" ? We(e) : je(e);
103
- }, Fe = (e, t) => {
104
- const [r, o] = P(/* @__PURE__ */ new Date());
105
- return {
106
- month: F(() => {
107
- const a = z(e, t);
108
- if (!a) return r;
109
- if (t === "single" && a instanceof Date)
110
- return a;
111
- if (t === "range" && typeof a == "object" && "from" in a) {
112
- const i = a;
113
- if (i.from)
114
- return i.from;
115
- if (i.to)
116
- return i.to;
117
- }
118
- return r;
119
- }, [e, t, r]),
120
- setMonth: (a) => {
121
- o(a);
122
- }
123
- };
124
- }, Ge = "_container_15bt3_1", Ve = "_label_15bt3_7", qe = "_select_15bt3_14", He = "_trigger_15bt3_19", Ke = "_triggerOpen_15bt3_46", Xe = "_placeholder_15bt3_67", Ye = "_selectedContent_15bt3_71", ze = "_optionIcon_15bt3_81", Je = "_arrow_15bt3_87", Qe = "_open_15bt3_98", Ue = "_dropdown_15bt3_102", Ze = "_option_15bt3_81", et = "_selected_15bt3_71", g = {
125
- container: Ge,
126
- label: Ve,
127
- select: qe,
128
- trigger: He,
129
- triggerOpen: Ke,
130
- placeholder: Xe,
131
- selectedContent: Ye,
132
- optionIcon: ze,
133
- arrow: Je,
134
- open: Qe,
135
- dropdown: Ue,
136
- option: Ze,
137
- selected: et
138
- }, tt = (e) => {
139
- const { className: t, disabled: r = !1, label: o, onChange: l, options: c, placeholder: a, value: i } = e, [d, h] = P(!1), v = G(null), _ = c.find((p) => p.value === i), f = () => {
84
+ }, je = "_container_1ssl5_1", Ae = "_label_1ssl5_7", Me = "_trigger_1ssl5_14", We = "_select_1ssl5_18", Fe = "_triggerOpen_1ssl5_50", Ge = "_placeholder_1ssl5_71", Ve = "_selectedContent_1ssl5_75", He = "_optionIcon_1ssl5_85", Ke = "_arrow_1ssl5_91", Xe = "_open_1ssl5_106", Ye = "_dropdown_1ssl5_110", ze = "_option_1ssl5_85", Je = "_selected_1ssl5_75", y = {
85
+ container: je,
86
+ label: Ae,
87
+ trigger: Me,
88
+ select: We,
89
+ triggerOpen: Fe,
90
+ placeholder: Ge,
91
+ selectedContent: Ve,
92
+ optionIcon: He,
93
+ arrow: Ke,
94
+ open: Xe,
95
+ dropdown: Ye,
96
+ option: ze,
97
+ selected: Je
98
+ }, Qe = (e) => {
99
+ const { className: t, disabled: r = !1, label: o, onChange: l, options: s, placeholder: c, value: i } = e, [d, h] = q(!1), v = W(null), u = s.find((_) => _.value === i), g = () => {
140
100
  r || h(!d);
141
- }, b = (p) => {
142
- l?.(p), h(!1);
101
+ }, f = (_) => {
102
+ l?.(_), h(!1);
143
103
  };
144
- return x(() => {
145
- const p = (k) => {
104
+ return D(() => {
105
+ const _ = (k) => {
146
106
  v.current && !v.current.contains(k.target) && h(!1);
147
107
  };
148
- return d && document.addEventListener("mousedown", p), () => {
149
- document.removeEventListener("mousedown", p);
108
+ return d && document.addEventListener("mousedown", _), () => {
109
+ document.removeEventListener("mousedown", _);
150
110
  };
151
- }, [d]), /* @__PURE__ */ u("div", { className: w(g.container, t), children: [
152
- o && /* @__PURE__ */ n("label", { className: g.label, children: o }),
153
- /* @__PURE__ */ u("div", { className: g.select, ref: v, children: [
154
- /* @__PURE__ */ u(
111
+ }, [d]), /* @__PURE__ */ m("div", { className: w(y.container, t), children: [
112
+ o && /* @__PURE__ */ n("label", { className: y.label, children: o }),
113
+ /* @__PURE__ */ m("div", { className: y.select, ref: v, children: [
114
+ /* @__PURE__ */ m(
155
115
  "button",
156
116
  {
157
- className: w(g.trigger, d && g.triggerOpen),
117
+ className: w(y.trigger, d && y.triggerOpen),
158
118
  disabled: r,
159
- onClick: f,
119
+ onClick: g,
160
120
  type: "button",
161
121
  "aria-haspopup": "listbox",
162
122
  "aria-expanded": d,
163
123
  children: [
164
- /* @__PURE__ */ u("span", { className: _ ? g.selectedContent : g.placeholder, children: [
165
- _?.icon && /* @__PURE__ */ n("span", { className: g.optionIcon, children: _.icon }),
166
- _ ? _.label : a || "Select an option"
124
+ /* @__PURE__ */ m("span", { className: u ? y.selectedContent : y.placeholder, children: [
125
+ u?.icon && /* @__PURE__ */ n("span", { className: y.optionIcon, children: u.icon }),
126
+ u ? u.label : c || "Select an option"
167
127
  ] }),
168
- /* @__PURE__ */ n("span", { className: w(g.arrow, d && g.open), children: /* @__PURE__ */ n(ne, {}) })
128
+ /* @__PURE__ */ n("span", { className: w(y.arrow, d && y.open), children: /* @__PURE__ */ n(te, {}) })
169
129
  ]
170
130
  }
171
131
  ),
172
- d && /* @__PURE__ */ n(U, { className: g.dropdown, role: "listbox", style: { maxHeight: 191 }, children: c.map((p) => /* @__PURE__ */ u(
132
+ d && /* @__PURE__ */ n(Q, { className: y.dropdown, role: "listbox", style: { maxHeight: 191 }, children: s.map((_) => /* @__PURE__ */ m(
173
133
  "button",
174
134
  {
175
- className: w(g.option, p.value === i && g.selected),
176
- onClick: () => b(p.value),
135
+ className: w(y.option, _.value === i && y.selected),
136
+ onClick: () => f(_.value),
177
137
  type: "button",
178
138
  role: "option",
179
- "aria-selected": p.value === i,
139
+ "aria-selected": _.value === i,
180
140
  children: [
181
- p.icon && /* @__PURE__ */ n("span", { className: g.optionIcon, children: p.icon }),
182
- p.label
141
+ _.icon && /* @__PURE__ */ n("span", { className: y.optionIcon, children: _.icon }),
142
+ _.label
183
143
  ]
184
144
  },
185
- p.value
145
+ _.value
186
146
  )) })
187
147
  ] })
188
148
  ] });
189
- }, J = (e) => {
149
+ }, z = (e) => {
190
150
  const t = (o) => {
191
151
  if (e.onChange) {
192
152
  const l = {
@@ -201,7 +161,7 @@ const nn = (e) => {
201
161
  label: o.label
202
162
  })) || [];
203
163
  return /* @__PURE__ */ n(
204
- tt,
164
+ Qe,
205
165
  {
206
166
  className: e.className,
207
167
  options: r,
@@ -210,46 +170,46 @@ const nn = (e) => {
210
170
  }
211
171
  );
212
172
  };
213
- J.displayName = "DatePickerDropdown";
214
- const nt = {
215
- month_caption: s.monthsCaption,
216
- button_previous: s.navButtonPrevious,
217
- button_next: s.navButtonNext,
218
- chevron: s.navIcon,
219
- caption_label: s.captionLabel,
220
- dropdowns: s.dropdowns,
221
- dropdown_root: s.dropdown_root,
222
- dropdown: s.dropdown,
223
- dropdown_select_option: s.option,
224
- months_dropdown: s.monthsDropdown,
225
- years_dropdown: s.yearsDropdown,
226
- month_grid: s.monthGrid,
227
- weekday: s.weekday,
228
- day_button: s.dayButton,
229
- day: s.day,
230
- outside: s.dayOutside,
231
- selected: s.daySelected,
232
- range_start: s.dayRangeStart,
233
- range_middle: s.dayRangeMiddle,
234
- range_end: s.dayRangeEnd,
235
- today: s.dayToday
236
- }, ot = {
237
- Dropdown: J
238
- }, rt = {
173
+ z.displayName = "DatePickerDropdown";
174
+ const Ue = {
175
+ month_caption: a.monthsCaption,
176
+ button_previous: a.navButtonPrevious,
177
+ button_next: a.navButtonNext,
178
+ chevron: a.navIcon,
179
+ caption_label: a.captionLabel,
180
+ dropdowns: a.dropdowns,
181
+ dropdown_root: a.dropdown_root,
182
+ dropdown: a.dropdown,
183
+ dropdown_select_option: a.option,
184
+ months_dropdown: a.monthsDropdown,
185
+ years_dropdown: a.yearsDropdown,
186
+ month_grid: a.monthGrid,
187
+ weekday: a.weekday,
188
+ day_button: a.dayButton,
189
+ day: a.day,
190
+ outside: a.dayOutside,
191
+ selected: a.daySelected,
192
+ range_start: a.dayRangeStart,
193
+ range_middle: a.dayRangeMiddle,
194
+ range_end: a.dayRangeEnd,
195
+ today: a.dayToday
196
+ }, Ze = {
197
+ Dropdown: z
198
+ }, et = {
239
199
  weekStartsOn: 1,
240
200
  showOutsideDays: !0,
241
201
  reverseYears: !0,
242
202
  captionLayout: "dropdown"
243
- }, at = {
244
- components: ot,
245
- ...rt
246
- }, st = (e) => ({
247
- ...at,
203
+ }, tt = {
204
+ components: Ze,
205
+ ...et
206
+ }, nt = (e) => ({
207
+ ...tt,
248
208
  classNames: {
249
- root: j(s.calendar, e && s.open),
250
- ...nt
209
+ root: M(a.calendar, e && a.open),
210
+ ...Ue
251
211
  }
252
- }), L = "dd.MM.yyyy", ct = (e) => e ? M(e, L) : "", it = (e) => !e || !e.from ? "" : e.to && e.from.getTime() !== e.to.getTime() ? `${M(e.from, L)} - ${M(e.to, L)}` : M(e.from, L), H = (e, t) => e ? t === "single" && e instanceof Date ? ct(e) : t === "range" && typeof e == "object" && "from" in e ? it(e) : "" : "", lt = ({
212
+ }), T = "dd.MM.yyyy", ot = (e) => e ? B(e, T) : "", rt = (e) => !e || !e.from ? "" : e.to && e.from.getTime() !== e.to.getTime() ? `${B(e.from, T)} - ${B(e.to, T)}` : B(e.from, T), H = (e, t) => e ? t === "single" && e instanceof Date ? ot(e) : t === "range" && typeof e == "object" && "from" in e ? rt(e) : "" : "", at = ({
253
213
  value: e,
254
214
  mode: t,
255
215
  onChange: r,
@@ -265,12 +225,31 @@ const nt = {
265
225
  return;
266
226
  }
267
227
  if (t === "range" && typeof e == "object" && "from" in e) {
268
- const c = e;
269
- c.from ? o(c.from) : c.to && o(c.to);
270
- const a = H(c, "range");
271
- r(a), c.from && c.to && c.from.getTime() !== c.to.getTime() && l(!1);
228
+ const s = e;
229
+ s.from ? o(s.from) : s.to && o(s.to);
230
+ const c = H(s, "range");
231
+ r(c), s.from && s.to && s.from.getTime() !== s.to.getTime() && l(!1);
272
232
  }
273
- }, dt = (e, t, r) => {
233
+ }, L = "dd.MM.yyyy", st = (e) => {
234
+ if (!e) return;
235
+ const t = O(e, L, /* @__PURE__ */ new Date());
236
+ return $(t) ? t : void 0;
237
+ }, ct = (e) => {
238
+ if (!e) return;
239
+ const t = " - ", r = e.indexOf(t);
240
+ if (r === -1) {
241
+ const i = O(e.trim(), L, /* @__PURE__ */ new Date());
242
+ return $(i) ? { from: i, to: void 0 } : void 0;
243
+ }
244
+ const o = e.substring(0, r).trim(), l = e.substring(r + t.length).trim();
245
+ if (!o || !l) return;
246
+ const s = O(o, L, /* @__PURE__ */ new Date()), c = O(l, L, /* @__PURE__ */ new Date());
247
+ if ($(s) && $(c))
248
+ return { from: s, to: c };
249
+ }, it = (e, t) => {
250
+ if (e)
251
+ return t === "single" ? st(e) : ct(e);
252
+ }, lt = (e, t, r) => {
274
253
  if (e) {
275
254
  if (t === "single" && e instanceof Date) {
276
255
  r(e);
@@ -281,56 +260,56 @@ const nt = {
281
260
  o.from ? r(o.from) : o.to && r(o.to);
282
261
  }
283
262
  }
284
- }, rn = ({
263
+ }, on = ({
285
264
  mode: e,
286
265
  value: t,
287
266
  onChange: r,
288
267
  disabled: o,
289
268
  label: l,
290
- error: c,
291
- placeholder: a,
269
+ error: s,
270
+ placeholder: c,
292
271
  ...i
293
272
  }) => {
294
- const [d, h] = P(!1), v = G(null), { month: _, setMonth: f } = Fe(t, e), b = F(() => z(t, e), [t, e]);
295
- x(() => {
296
- dt(b, e, f);
297
- }, [b, e, f]), Ae({ ref: v, isOpen: d, onDismiss: () => {
273
+ const [d, h] = q(!1), v = W(null), [u, g] = q(/* @__PURE__ */ new Date()), f = G(() => it(t, e), [t, e]);
274
+ D(() => {
275
+ lt(f, e, g);
276
+ }, [f, e, g]), Le({ ref: v, isOpen: d, onDismiss: () => {
298
277
  h(!1);
299
278
  } });
300
279
  const k = (I) => {
301
- I.stopPropagation(), D(void 0);
280
+ I.stopPropagation(), x(void 0);
302
281
  }, N = () => {
303
282
  o || h((I) => !I);
304
- }, m = (I) => {
305
- const Q = I.currentTarget.value;
306
- r(Q);
307
- }, D = (I) => {
308
- lt({
283
+ }, p = (I) => {
284
+ const J = I.currentTarget.value;
285
+ r(J);
286
+ }, x = (I) => {
287
+ at({
309
288
  value: I,
310
289
  mode: e,
311
290
  onChange: r,
312
- setMonth: f,
291
+ setMonth: g,
313
292
  setIsOpen: h
314
293
  });
315
- }, R = F(() => st(d), [d]);
316
- return /* @__PURE__ */ u("div", { ref: v, className: s.wrapper, children: [
317
- /* @__PURE__ */ u("div", { className: s.inputContainer, children: [
318
- l && /* @__PURE__ */ n("span", { className: o ? s.disabledLabel : s.label, children: /* @__PURE__ */ n(V, { variant: "text-14", children: l }) }),
319
- /* @__PURE__ */ u("div", { className: s.inputWrapper, children: [
294
+ }, P = G(() => nt(d), [d]);
295
+ return /* @__PURE__ */ m("div", { ref: v, className: a.wrapper, children: [
296
+ /* @__PURE__ */ m("div", { className: a.inputContainer, children: [
297
+ l && /* @__PURE__ */ n("span", { className: o ? a.disabledLabel : a.label, children: /* @__PURE__ */ n(F, { variant: "text-14", children: l }) }),
298
+ /* @__PURE__ */ m("div", { className: a.inputWrapper, children: [
320
299
  /* @__PURE__ */ n(
321
300
  "input",
322
301
  {
323
302
  type: "text",
324
- className: j(s.trigger, c && s.error),
303
+ className: M(a.trigger, s && a.error),
325
304
  onClick: N,
326
305
  value: t,
327
- onChange: m,
328
- placeholder: a,
306
+ onChange: p,
307
+ placeholder: c,
329
308
  disabled: o,
330
309
  "aria-label": l || "Select date",
331
310
  "aria-expanded": d,
332
311
  "aria-haspopup": "dialog",
333
- "aria-invalid": c ? "true" : "false",
312
+ "aria-invalid": s ? "true" : "false",
334
313
  ...i
335
314
  }
336
315
  ),
@@ -338,63 +317,63 @@ const nt = {
338
317
  "button",
339
318
  {
340
319
  type: "button",
341
- className: s.clearButton,
320
+ className: a.clearButton,
342
321
  onClick: k,
343
322
  "aria-label": "Clear date",
344
- children: /* @__PURE__ */ n(Y, { className: s.clearIcon })
323
+ children: /* @__PURE__ */ n(Y, { className: a.clearIcon })
345
324
  }
346
325
  ),
347
- /* @__PURE__ */ n(oe, { className: j(s.icon, !t && s.placeholder) })
326
+ /* @__PURE__ */ n(ne, { className: M(a.icon, !t && a.placeholder) })
348
327
  ] }),
349
- c && /* @__PURE__ */ n(V, { variant: "small", className: s.error, children: c })
328
+ s && /* @__PURE__ */ n(F, { variant: "small", className: a.error, children: s })
350
329
  ] }),
351
330
  e === "single" ? /* @__PURE__ */ n(
352
- q,
331
+ V,
353
332
  {
354
- ...R,
355
- month: _,
356
- onMonthChange: f,
333
+ ...P,
334
+ month: u,
335
+ onMonthChange: g,
357
336
  mode: "single",
358
- selected: b instanceof Date ? b : void 0,
359
- onSelect: D
337
+ selected: f instanceof Date ? f : void 0,
338
+ onSelect: x
360
339
  }
361
340
  ) : /* @__PURE__ */ n(
362
- q,
341
+ V,
363
342
  {
364
- ...R,
365
- month: _,
366
- onMonthChange: f,
343
+ ...P,
344
+ month: u,
345
+ onMonthChange: g,
367
346
  mode: "range",
368
- selected: b && typeof b == "object" && "from" in b ? b : void 0,
369
- onSelect: D
347
+ selected: f && typeof f == "object" && "from" in f ? f : void 0,
348
+ onSelect: x
370
349
  }
371
350
  )
372
351
  ] });
373
- }, pt = "_content_1bas8_1", _t = "_item_1bas8_24", mt = "_icon_1bas8_56", ut = "_label_1bas8_62", B = {
374
- content: pt,
352
+ }, dt = "_content_1bas8_1", _t = "_item_1bas8_24", ut = "_icon_1bas8_56", pt = "_label_1bas8_62", R = {
353
+ content: dt,
375
354
  item: _t,
376
- icon: mt,
377
- label: ut
378
- }, an = (e) => {
379
- const { children: t, items: r, className: o, align: l = "end", side: c = "bottom" } = e;
380
- return /* @__PURE__ */ u(S.Root, { children: [
355
+ icon: ut,
356
+ label: pt
357
+ }, rn = (e) => {
358
+ const { children: t, items: r, className: o, align: l = "end", side: s = "bottom" } = e;
359
+ return /* @__PURE__ */ m(S.Root, { children: [
381
360
  /* @__PURE__ */ n(S.Trigger, { asChild: !0, children: t }),
382
361
  /* @__PURE__ */ n(S.Portal, { children: /* @__PURE__ */ n(
383
362
  S.Content,
384
363
  {
385
364
  align: l,
386
- className: w(B.content, o),
387
- side: c,
365
+ className: w(R.content, o),
366
+ side: s,
388
367
  sideOffset: 4,
389
- children: r.map((a, i) => /* @__PURE__ */ u(
368
+ children: r.map((c, i) => /* @__PURE__ */ m(
390
369
  S.Item,
391
370
  {
392
- className: B.item,
393
- disabled: a.disabled,
394
- onSelect: a.onSelect,
371
+ className: R.item,
372
+ disabled: c.disabled,
373
+ onSelect: c.onSelect,
395
374
  children: [
396
- a.icon && /* @__PURE__ */ n("span", { className: B.icon, children: a.icon }),
397
- /* @__PURE__ */ n("span", { className: B.label, children: a.label })
375
+ c.icon && /* @__PURE__ */ n("span", { className: R.icon, children: c.icon }),
376
+ /* @__PURE__ */ n("span", { className: R.label, children: c.label })
398
377
  ]
399
378
  },
400
379
  i
@@ -402,150 +381,150 @@ const nt = {
402
381
  }
403
382
  ) })
404
383
  ] });
405
- }, ft = "_wrapper_1i0po_1", ht = "_label_1i0po_7", bt = "_disabled_1i0po_14", gt = "_inputContainer_1i0po_18", yt = "_input_1i0po_18", wt = "_error_1i0po_51", vt = "_withStartIcon_1i0po_64", Nt = "_withEndIcon_1i0po_68", Ct = "_startIcon_1i0po_72", It = "_endIcon_1i0po_73", kt = "_errorMessage_1i0po_115", Dt = "_required_1i0po_122", y = {
406
- wrapper: ft,
407
- label: ht,
408
- disabled: bt,
409
- inputContainer: gt,
410
- input: yt,
411
- error: wt,
412
- withStartIcon: vt,
413
- withEndIcon: Nt,
414
- startIcon: Ct,
415
- endIcon: It,
416
- errorMessage: kt,
417
- required: Dt
418
- }, xt = ee(
384
+ }, mt = "_wrapper_gp2gj_1", gt = "_label_gp2gj_7", ht = "_disabled_gp2gj_14", ft = "_input_gp2gj_18", yt = "_inputContainer_gp2gj_22", bt = "_error_gp2gj_47", wt = "_withStartIcon_gp2gj_64", vt = "_withEndIcon_gp2gj_68", Nt = "_startIcon_gp2gj_85", Ct = "_endIcon_gp2gj_86", It = "_errorMessage_gp2gj_137", kt = "_required_gp2gj_144", b = {
385
+ wrapper: mt,
386
+ label: gt,
387
+ disabled: ht,
388
+ input: ft,
389
+ inputContainer: yt,
390
+ error: bt,
391
+ withStartIcon: wt,
392
+ withEndIcon: vt,
393
+ startIcon: Nt,
394
+ endIcon: Ct,
395
+ errorMessage: It,
396
+ required: kt
397
+ }, xt = Z(
419
398
  ({
420
399
  label: e,
421
400
  errorMessage: t,
422
401
  startIcon: r,
423
402
  endIcon: o,
424
403
  onEndIconClick: l,
425
- allowPasswordToggle: c,
426
- disabled: a,
404
+ allowPasswordToggle: s,
405
+ disabled: c,
427
406
  type: i = "text",
428
407
  className: d,
429
408
  required: h,
430
409
  id: v,
431
- ..._
432
- }, f) => {
433
- const b = X(), p = v ?? b, k = t ? `${p}-error` : void 0, N = !!t, m = i === "password" && c, [D, R] = P(!1);
434
- return /* @__PURE__ */ u("div", { className: w(y.wrapper, d), children: [
435
- e && /* @__PURE__ */ u("label", { htmlFor: p, className: w(y.label, { [y.disabled]: a }), children: [
410
+ ...u
411
+ }, g) => {
412
+ const f = X(), _ = v ?? f, k = t ? `${_}-error` : void 0, N = !!t, p = i === "password" && s, [x, P] = q(!1);
413
+ return /* @__PURE__ */ m("div", { className: w(b.wrapper, d), children: [
414
+ e && /* @__PURE__ */ m("label", { htmlFor: _, className: w(b.label, { [b.disabled]: c }), children: [
436
415
  e,
437
- h && /* @__PURE__ */ n("sup", { className: y.required, children: " *" })
416
+ h && /* @__PURE__ */ n("sup", { className: b.required, children: " *" })
438
417
  ] }),
439
- /* @__PURE__ */ u(
418
+ /* @__PURE__ */ m(
440
419
  "div",
441
420
  {
442
- className: w(y.inputContainer, {
443
- [y.error]: N,
444
- [y.disabled]: a,
445
- [y.withStartIcon]: !!r,
446
- [y.withEndIcon]: !!o || m
421
+ className: w(b.inputContainer, {
422
+ [b.error]: N,
423
+ [b.disabled]: c,
424
+ [b.withStartIcon]: !!r,
425
+ [b.withEndIcon]: !!o || p
447
426
  }),
448
427
  children: [
449
- r && /* @__PURE__ */ n("span", { className: y.startIcon, children: r }),
428
+ r && /* @__PURE__ */ n("span", { className: b.startIcon, children: r }),
450
429
  /* @__PURE__ */ n(
451
430
  "input",
452
431
  {
453
- ref: f,
454
- id: p,
455
- className: y.input,
456
- type: m && D ? "text" : i,
432
+ ref: g,
433
+ id: _,
434
+ className: b.input,
435
+ type: p && x ? "text" : i,
457
436
  autoComplete: i === "password" ? "current-password" : "off",
458
437
  required: h,
459
- disabled: a,
438
+ disabled: c,
460
439
  "aria-invalid": N,
461
440
  "aria-describedby": k,
462
- ..._
441
+ ...u
463
442
  }
464
443
  ),
465
- m && /* @__PURE__ */ n(
444
+ p && /* @__PURE__ */ n(
466
445
  "button",
467
446
  {
468
447
  type: "button",
469
- className: y.endIcon,
470
- onClick: () => R((I) => !I),
471
- "aria-label": D ? "Hide password" : "Show password",
472
- disabled: a,
448
+ className: b.endIcon,
449
+ onClick: () => P((I) => !I),
450
+ "aria-label": x ? "Hide password" : "Show password",
451
+ disabled: c,
473
452
  tabIndex: -1,
474
- children: D ? /* @__PURE__ */ n(re, {}) : /* @__PURE__ */ n(ae, {})
453
+ children: x ? /* @__PURE__ */ n(oe, {}) : /* @__PURE__ */ n(re, {})
475
454
  }
476
455
  ),
477
- o && !m && /* @__PURE__ */ n(
456
+ o && !p && /* @__PURE__ */ n(
478
457
  "button",
479
458
  {
480
459
  type: "button",
481
- className: y.endIcon,
460
+ className: b.endIcon,
482
461
  onClick: l,
483
462
  "aria-label": "Action",
484
- disabled: a,
463
+ disabled: c,
485
464
  children: o
486
465
  }
487
466
  )
488
467
  ]
489
468
  }
490
469
  ),
491
- N && /* @__PURE__ */ n("span", { id: k, className: y.errorMessage, role: "alert", children: t })
470
+ N && /* @__PURE__ */ n("span", { id: k, className: b.errorMessage, role: "alert", children: t })
492
471
  ] });
493
472
  }
494
473
  );
495
474
  xt.displayName = "Input";
496
- const Et = "_overlay_17k3a_1", St = "_modal_17k3a_15", Pt = "_header_17k3a_29", Rt = "_title_17k3a_39", Bt = "_close_17k3a_52", Ot = "_body_17k3a_79", E = {
497
- overlay: Et,
498
- modal: St,
499
- header: Pt,
500
- title: Rt,
501
- close: Bt,
502
- body: Ot
503
- }, sn = ({ open: e, onClose: t, title: r, children: o, className: l }) => {
504
- const c = X(), a = G(t);
505
- if (x(() => {
506
- a.current = t;
507
- }, [t]), x(() => {
475
+ const Dt = "_overlay_17k3a_1", Et = "_modal_17k3a_15", St = "_header_17k3a_29", qt = "_title_17k3a_39", Pt = "_close_17k3a_52", Rt = "_body_17k3a_79", E = {
476
+ overlay: Dt,
477
+ modal: Et,
478
+ header: St,
479
+ title: qt,
480
+ close: Pt,
481
+ body: Rt
482
+ }, an = ({ open: e, onClose: t, title: r, children: o, className: l }) => {
483
+ const s = X(), c = W(t);
484
+ if (D(() => {
485
+ c.current = t;
486
+ }, [t]), D(() => {
508
487
  if (e)
509
488
  return document.body.style.overflow = "hidden", () => {
510
489
  document.body.style.overflow = "";
511
490
  };
512
- }, [e]), x(() => {
491
+ }, [e]), D(() => {
513
492
  if (!e) return;
514
493
  const d = (h) => {
515
- h.key === "Escape" && a.current();
494
+ h.key === "Escape" && c.current();
516
495
  };
517
496
  return document.addEventListener("keydown", d), () => {
518
497
  document.removeEventListener("keydown", d);
519
498
  };
520
499
  }, [e]), !e || typeof document > "u") return null;
521
500
  const i = document.getElementById("modal-root") ?? document.body;
522
- return ie(
501
+ return ce(
523
502
  /* @__PURE__ */ n(
524
- le,
503
+ ie,
525
504
  {
526
505
  active: e,
527
506
  focusTrapOptions: {
528
507
  clickOutsideDeactivates: !0,
529
508
  returnFocusOnDeactivate: !0
530
509
  },
531
- children: /* @__PURE__ */ n("div", { className: E.overlay, onClick: () => a.current(), children: /* @__PURE__ */ u(
510
+ children: /* @__PURE__ */ n("div", { className: E.overlay, onClick: () => c.current(), children: /* @__PURE__ */ m(
532
511
  "div",
533
512
  {
534
513
  className: w(E.modal, l),
535
514
  onClick: (d) => d.stopPropagation(),
536
515
  role: "dialog",
537
516
  "aria-modal": "true",
538
- "aria-labelledby": c,
517
+ "aria-labelledby": s,
539
518
  children: [
540
- /* @__PURE__ */ u("header", { className: E.header, children: [
541
- /* @__PURE__ */ n("h2", { id: c, className: E.title, children: r }),
519
+ /* @__PURE__ */ m("header", { className: E.header, children: [
520
+ /* @__PURE__ */ n("h2", { id: s, className: E.title, children: r }),
542
521
  /* @__PURE__ */ n(
543
522
  "button",
544
523
  {
545
524
  type: "button",
546
525
  className: E.close,
547
526
  "aria-label": "Close modal",
548
- onClick: () => a.current(),
527
+ onClick: () => c.current(),
549
528
  children: /* @__PURE__ */ n(Y, {})
550
529
  }
551
530
  )
@@ -558,50 +537,50 @@ const Et = "_overlay_17k3a_1", St = "_modal_17k3a_15", Pt = "_header_17k3a_29",
558
537
  ),
559
538
  i
560
539
  );
561
- }, $t = "_root_ggtcs_1", Mt = "_trackWrapper_ggtcs_16", Tt = "_track_ggtcs_16", Lt = "_slide_ggtcs_32", At = "_arrow_ggtcs_56", Wt = "_arrowPrev_ggtcs_98", jt = "_arrowNext_ggtcs_102", Ft = "_dots_ggtcs_107", Gt = "_dot_ggtcs_107", Vt = "_dotActive_ggtcs_143", C = {
562
- root: $t,
563
- trackWrapper: Mt,
564
- track: Tt,
565
- slide: Lt,
566
- arrow: At,
567
- arrowPrev: Wt,
568
- arrowNext: jt,
569
- dots: Ft,
570
- dot: Gt,
571
- dotActive: Vt
572
- }, cn = ({
540
+ }, Bt = "_root_ggtcs_1", Ot = "_trackWrapper_ggtcs_16", $t = "_track_ggtcs_16", Tt = "_slide_ggtcs_32", Lt = "_arrow_ggtcs_56", jt = "_arrowPrev_ggtcs_98", At = "_arrowNext_ggtcs_102", Mt = "_dots_ggtcs_107", Wt = "_dot_ggtcs_107", Ft = "_dotActive_ggtcs_143", C = {
541
+ root: Bt,
542
+ trackWrapper: Ot,
543
+ track: $t,
544
+ slide: Tt,
545
+ arrow: Lt,
546
+ arrowPrev: jt,
547
+ arrowNext: At,
548
+ dots: Mt,
549
+ dot: Wt,
550
+ dotActive: Ft
551
+ }, sn = ({
573
552
  children: e,
574
553
  value: t,
575
554
  onValueChange: r,
576
555
  autoPlayInterval: o = 0,
577
556
  className: l,
578
- hideArrowsWhenSingle: c = !0
557
+ hideArrowsWhenSingle: s = !0
579
558
  }) => {
580
- const a = Array.isArray(e) ? e : [e], i = a.length, [d, h] = P(0), v = t !== void 0, _ = v ? Math.min(Math.max(0, t), i - 1) : d, f = te(
559
+ const c = Array.isArray(e) ? e : [e], i = c.length, [d, h] = q(0), v = t !== void 0, u = v ? Math.min(Math.max(0, t), i - 1) : d, g = ee(
581
560
  (N) => {
582
- const m = (N + i) % i;
583
- v || h(m), r?.(m);
561
+ const p = (N + i) % i;
562
+ v || h(p), r?.(p);
584
563
  },
585
564
  [i, v, r]
586
565
  );
587
- if (x(() => {
566
+ if (D(() => {
588
567
  if (o <= 0 || i <= 1) return;
589
- const N = setInterval(() => f(_ + 1), o);
568
+ const N = setInterval(() => g(u + 1), o);
590
569
  return () => clearInterval(N);
591
- }, [o, i, _, f]), i === 0) return null;
592
- const b = () => f(_ - 1), p = () => f(_ + 1), k = !c || i > 1;
593
- return /* @__PURE__ */ u("div", { className: w(C.root, l), role: "region", "aria-label": "Carousel", children: [
594
- /* @__PURE__ */ n("div", { className: C.trackWrapper, children: /* @__PURE__ */ n("div", { className: C.track, style: { transform: `translateX(-${_ * 100}%)` }, children: a.map((N, m) => /* @__PURE__ */ n("div", { className: C.slide, children: N }, m)) }) }),
595
- k && /* @__PURE__ */ u(Z, { children: [
570
+ }, [o, i, u, g]), i === 0) return null;
571
+ const f = () => g(u - 1), _ = () => g(u + 1), k = !s || i > 1;
572
+ return /* @__PURE__ */ m("div", { className: w(C.root, l), role: "region", "aria-label": "Carousel", children: [
573
+ /* @__PURE__ */ n("div", { className: C.trackWrapper, children: /* @__PURE__ */ n("div", { className: C.track, style: { transform: `translateX(-${u * 100}%)` }, children: c.map((N, p) => /* @__PURE__ */ n("div", { className: C.slide, children: N }, p)) }) }),
574
+ k && /* @__PURE__ */ m(U, { children: [
596
575
  /* @__PURE__ */ n(
597
576
  "button",
598
577
  {
599
578
  type: "button",
600
579
  className: w(C.arrow, C.arrowPrev),
601
- onClick: b,
580
+ onClick: f,
602
581
  "aria-label": "Previous slide",
603
582
  tabIndex: 0,
604
- children: /* @__PURE__ */ n(se, { width: 24, height: 24, "aria-hidden": !0 })
583
+ children: /* @__PURE__ */ n(ae, { width: 24, height: 24, "aria-hidden": !0 })
605
584
  }
606
585
  ),
607
586
  /* @__PURE__ */ n(
@@ -609,47 +588,47 @@ const Et = "_overlay_17k3a_1", St = "_modal_17k3a_15", Pt = "_header_17k3a_29",
609
588
  {
610
589
  type: "button",
611
590
  className: w(C.arrow, C.arrowNext),
612
- onClick: p,
591
+ onClick: _,
613
592
  "aria-label": "Next slide",
614
593
  tabIndex: 0,
615
- children: /* @__PURE__ */ n(ce, { width: 24, height: 24, "aria-hidden": !0 })
594
+ children: /* @__PURE__ */ n(se, { width: 24, height: 24, "aria-hidden": !0 })
616
595
  }
617
596
  )
618
597
  ] }),
619
- i > 1 && /* @__PURE__ */ n("div", { className: C.dots, role: "tablist", "aria-label": "Slide selection", children: a.map((N, m) => /* @__PURE__ */ n(
598
+ i > 1 && /* @__PURE__ */ n("div", { className: C.dots, role: "tablist", "aria-label": "Slide selection", children: c.map((N, p) => /* @__PURE__ */ n(
620
599
  "button",
621
600
  {
622
601
  type: "button",
623
602
  role: "tab",
624
- "aria-selected": m === _,
625
- "aria-label": `Slide ${m + 1}`,
626
- className: w(C.dot, m === _ && C.dotActive),
627
- onClick: () => f(m),
628
- tabIndex: m === _ ? 0 : -1
603
+ "aria-selected": p === u,
604
+ "aria-label": `Slide ${p + 1}`,
605
+ className: w(C.dot, p === u && C.dotActive),
606
+ onClick: () => g(p),
607
+ tabIndex: p === u ? 0 : -1
629
608
  },
630
- m
609
+ p
631
610
  )) })
632
611
  ] });
633
612
  };
634
613
  export {
635
614
  K as Alert,
636
- fn as Button,
637
- hn as Card,
638
- cn as Carousel,
639
- bn as Checkbox,
640
- rn as DatePicker,
641
- an as DropdownMenu,
615
+ mn as Button,
616
+ gn as Card,
617
+ sn as Carousel,
618
+ hn as Checkbox,
619
+ on as DatePicker,
620
+ rn as DropdownMenu,
642
621
  xt as Input,
643
- gn as Label,
644
- sn as Modal,
622
+ fn as Label,
623
+ an as Modal,
645
624
  yn as Radio,
646
- tt as Select,
647
- mn as SimpleBar,
648
- wn as Tab,
649
- vn as Textarea,
650
- V as Typography,
651
- pn as clsx,
652
- on as toastError,
653
- nn as toastSuccess
625
+ Qe as Select,
626
+ un as SimpleBar,
627
+ bn as Tab,
628
+ wn as Textarea,
629
+ F as Typography,
630
+ dn as clsx,
631
+ nn as toastError,
632
+ tn as toastSuccess
654
633
  };
655
634
  //# sourceMappingURL=index.client.js.map