@mci-ui/mci-ui 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as i, Fragment as ue } from "react/jsx-runtime";
2
- import { AltArrowRight as me, Star2 as Ae, AltArrowDown as Me, EyeClosed as We, Eye as Pe, Calendar as Ve, AltArrowLeft as pe, DoubleAltArrowLeft as Ue, DoubleAltArrowRight as _e, ConfoundedSquare as qe, SortVertical as Je, SortFromTopToBottom as He, SortFromBottomToTop as Oe, Upload as Ke, FileText as Ne, File as Ge, MusicNote as Xe, VideoFramePlayHorizontal as Ze, Gallery as Qe, MenuDots as et, Refresh as tt, InfoCircle as rt, DangerCircle as at, CloseCircle as lt, CheckCircle as st } from "@solar-icons/react";
2
+ import { AltArrowRight as me, Star2 as je, AltArrowDown as Me, EyeClosed as Be, Eye as Pe, Calendar as Ve, AltArrowLeft as pe, DoubleAltArrowLeft as Ue, DoubleAltArrowRight as _e, ConfoundedSquare as qe, SortVertical as Je, SortFromTopToBottom as He, SortFromBottomToTop as Oe, Upload as Ke, FileText as Ne, File as Ge, MusicNote as Xe, VideoFramePlayHorizontal as Ze, Gallery as Qe, MenuDots as et, Refresh as tt, InfoCircle as rt, DangerCircle as at, CloseCircle as lt, CheckCircle as st } from "@solar-icons/react";
3
3
  import { clsx as nt } from "clsx";
4
4
  import { twMerge as ot } from "tailwind-merge";
5
5
  import * as he from "react";
6
- import { memo as it, useState as I, useMemo as Q, useCallback as Y, useRef as ne, useEffect as X, forwardRef as xe } from "react";
6
+ import { memo as it, useState as z, useMemo as te, useCallback as R, useRef as ne, useEffect as Z, forwardRef as xe } from "react";
7
7
  import { createRoot as ct } from "react-dom/client";
8
8
  function r(...t) {
9
9
  return ot(nt(t));
@@ -18,54 +18,54 @@ function ve(t, l) {
18
18
  t.current && !t.current.contains(s.target) && l();
19
19
  } };
20
20
  }
21
- function At({
21
+ function jt({
22
22
  items: t,
23
23
  variant: l = "blue",
24
24
  className: a
25
25
  }) {
26
26
  const s = l === "blue", m = s ? "hover:text-blue-600" : "hover:text-yellow-500", c = s ? "text-blue-600" : "text-yellow-500";
27
- return /* @__PURE__ */ e("nav", { className: r("flex items-center", a), "aria-label": "Breadcrumb", children: t.map((o, d) => {
28
- const v = d === t.length - 1;
27
+ return /* @__PURE__ */ e("nav", { className: r("flex items-center", a), "aria-label": "Breadcrumb", children: t.map((n, d) => {
28
+ const y = d === t.length - 1;
29
29
  return /* @__PURE__ */ i("div", { className: "flex items-center", children: [
30
- v ? /* @__PURE__ */ i("span", { className: r("flex items-center gap-x-2 font-medium", c), children: [
31
- o.icon,
32
- /* @__PURE__ */ e("span", { children: o.label })
30
+ y ? /* @__PURE__ */ i("span", { className: r("flex items-center gap-x-2 font-medium", c), children: [
31
+ n.icon,
32
+ /* @__PURE__ */ e("span", { children: n.label })
33
33
  ] }) : /* @__PURE__ */ i(
34
34
  "a",
35
35
  {
36
- href: o.href ?? "#",
36
+ href: n.href ?? "#",
37
37
  onClick: (u) => {
38
- o.onClick && (u.preventDefault(), o.onClick());
38
+ n.onClick && (u.preventDefault(), n.onClick());
39
39
  },
40
40
  className: r(
41
41
  "flex items-center gap-x-2 transition-all text-small font-normal text-slate-500",
42
42
  m
43
43
  ),
44
44
  children: [
45
- o.icon,
46
- /* @__PURE__ */ e("span", { children: o.label })
45
+ n.icon,
46
+ /* @__PURE__ */ e("span", { children: n.label })
47
47
  ]
48
48
  }
49
49
  ),
50
- !v && /* @__PURE__ */ e("span", { className: "mx-2 flex items-center", children: /* @__PURE__ */ e(me, { weight: "Linear", size: 20, className: "text-slate-500" }) })
50
+ !y && /* @__PURE__ */ e("span", { className: "mx-2 flex items-center", children: /* @__PURE__ */ e(me, { weight: "Linear", size: 20, className: "text-slate-500" }) })
51
51
  ] }, d);
52
52
  }) });
53
53
  }
54
- function jt({
54
+ function At({
55
55
  children: t,
56
56
  text: l,
57
57
  icon: a,
58
58
  iconPosition: s = "left",
59
59
  size: m = "base",
60
60
  variant: c = "primary",
61
- color: o = "yellow",
61
+ color: n = "yellow",
62
62
  loading: d = !1,
63
- disabled: v = !1,
63
+ disabled: y = !1,
64
64
  onClick: u,
65
65
  className: x,
66
- type: j = "button"
66
+ type: E = "button"
67
67
  }) {
68
- const T = t ?? l, M = {
68
+ const j = t ?? l, S = {
69
69
  sm: "h-9 px-2 text-small gap-1.5 rounded-lg leading-9 min-w-9",
70
70
  md: "h-10 px-2 text-base gap-2 rounded-lg leading-10 min-w-10",
71
71
  base: "h-12 px-4 text-base gap-2 rounded-xl leading-12 min-w-12"
@@ -80,29 +80,29 @@ function jt({
80
80
  secondary: "bg-yellow-50 text-yellow-500 hover:bg-yellow-100 active:bg-yellow-100 active:border active:border-yellow-500 focus:ring-2 focus:ring-yellow-200",
81
81
  outline: "border border-yellow-500 text-yellow-500 hover:border-yellow-600 hover:text-yellow-600 active:border-yellow-700 active:text-yellow-700 focus:ring-2 focus:ring-yellow-200"
82
82
  }
83
- }[o][c] : {
83
+ }[n][c] : {
84
84
  danger: "bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:shadow-red",
85
85
  tertiary: "bg-slate-100 text-black hover:bg-slate-200 active:bg-slate-300 focus:ring-2 focus:shadow-slate"
86
- }[c], w = v || d, k = w ? c === "outline" ? "border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0" : "bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 active:bg-slate-200 focus:ring-0" : "";
86
+ }[c], v = y || d, C = v ? c === "outline" ? "border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0" : "bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 active:bg-slate-200 focus:ring-0" : "";
87
87
  return /* @__PURE__ */ i(
88
88
  "button",
89
89
  {
90
- type: j,
90
+ type: E,
91
91
  onClick: u,
92
- disabled: w,
92
+ disabled: v,
93
93
  className: r(
94
94
  "inline-flex items-center justify-center font-medium transition-all duration-200 cursor-pointer",
95
- M[m],
95
+ S[m],
96
96
  f,
97
- !w && f,
98
- k,
97
+ !v && f,
98
+ C,
99
99
  x
100
100
  ),
101
101
  children: [
102
102
  a && s === "left" && !d && /* @__PURE__ */ e("span", { className: "flex items-center", children: a }),
103
- T && /* @__PURE__ */ e("span", { children: T }),
103
+ j && /* @__PURE__ */ e("span", { children: j }),
104
104
  a && s === "right" && !d && /* @__PURE__ */ e("span", { className: "flex items-center", children: a }),
105
- d && /* @__PURE__ */ e(Ae, { weight: "Linear", size: 20, className: "animate-spin" })
105
+ d && /* @__PURE__ */ e(je, { weight: "Linear", size: 20, className: "animate-spin" })
106
106
  ]
107
107
  }
108
108
  );
@@ -126,50 +126,50 @@ const dt = (t) => /* @__PURE__ */ he.createElement("svg", { xmlns: "http://www.w
126
126
  supportText: s,
127
127
  checked: m,
128
128
  onChange: c,
129
- error: o,
129
+ error: n,
130
130
  disabled: d = !1,
131
- required: v = !1,
131
+ required: y = !1,
132
132
  className: u,
133
133
  variant: x = "yellow",
134
- name: j,
135
- value: T
134
+ name: E,
135
+ value: j
136
136
  }) {
137
- const [M, C] = I(!1), n = l === "radio", f = Q(
138
- () => m ?? M,
139
- [m, M]
140
- ), w = Y(
137
+ const [S, L] = z(!1), o = l === "radio", f = te(
138
+ () => m ?? S,
139
+ [m, S]
140
+ ), v = R(
141
141
  (D) => {
142
- d || (m === void 0 && C(D.target.checked), c?.(D));
142
+ d || (m === void 0 && L(D.target.checked), c?.(D));
143
143
  },
144
144
  [m, c, d]
145
- ), k = Q(() => {
145
+ ), C = te(() => {
146
146
  if (d) {
147
- const S = "border-slate-200 bg-slate-100";
148
- return n ? {
149
- container: S,
147
+ const F = "border-slate-200 bg-slate-100";
148
+ return o ? {
149
+ container: F,
150
150
  dot: f ? "bg-slate-300" : "bg-transparent",
151
151
  check: "text-slate-400"
152
152
  } : {
153
- container: S,
153
+ container: F,
154
154
  dot: "",
155
155
  check: f ? "text-slate-400" : "text-transparent"
156
156
  };
157
157
  }
158
158
  const D = ut[x];
159
- if (n) {
160
- const S = r(
159
+ if (o) {
160
+ const F = r(
161
161
  "border transition-all duration-200",
162
162
  f ? D.border : "border-slate-400",
163
163
  !f && D.hover,
164
164
  D.focus,
165
165
  f && ""
166
- ), B = r(
166
+ ), I = r(
167
167
  "transition-all duration-200 rounded-full",
168
168
  f ? D.bg : "bg-transparent"
169
169
  );
170
170
  return {
171
- container: S,
172
- dot: B,
171
+ container: F,
172
+ dot: I,
173
173
  check: ""
174
174
  };
175
175
  }
@@ -183,18 +183,18 @@ const dt = (t) => /* @__PURE__ */ he.createElement("svg", { xmlns: "http://www.w
183
183
  dot: "",
184
184
  check: f ? "text-white" : "text-transparent"
185
185
  };
186
- }, [n, f, d, x]), b = Q(() => !a && !s ? null : /* @__PURE__ */ i("div", { className: "flex flex-col", children: [
186
+ }, [o, f, d, x]), g = te(() => !a && !s ? null : /* @__PURE__ */ i("div", { className: "flex flex-col", children: [
187
187
  a && /* @__PURE__ */ i(
188
188
  "span",
189
189
  {
190
190
  className: r(
191
191
  "text-base font-medium text-slate-700",
192
- o && "text-red-600",
192
+ n && "text-red-600",
193
193
  d && "text-slate-400"
194
194
  ),
195
195
  children: [
196
196
  a,
197
- v && /* @__PURE__ */ e("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
197
+ y && /* @__PURE__ */ e("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
198
198
  ]
199
199
  }
200
200
  ),
@@ -208,7 +208,7 @@ const dt = (t) => /* @__PURE__ */ he.createElement("svg", { xmlns: "http://www.w
208
208
  children: s
209
209
  }
210
210
  )
211
- ] }), [a, s, o, d, v]);
211
+ ] }), [a, s, n, d, y]);
212
212
  return /* @__PURE__ */ i("div", { className: r("flex items-start", u), children: [
213
213
  /* @__PURE__ */ i(
214
214
  "label",
@@ -223,14 +223,14 @@ const dt = (t) => /* @__PURE__ */ he.createElement("svg", { xmlns: "http://www.w
223
223
  {
224
224
  type: l,
225
225
  checked: f,
226
- onChange: w,
226
+ onChange: v,
227
227
  disabled: d,
228
- required: v,
228
+ required: y,
229
229
  className: "sr-only",
230
- "aria-invalid": !!o,
231
- "aria-describedby": o ? `${j}-error` : void 0,
232
- name: j,
233
- value: T
230
+ "aria-invalid": !!n,
231
+ "aria-describedby": n ? `${E}-error` : void 0,
232
+ name: E,
233
+ value: j
234
234
  }
235
235
  ),
236
236
  /* @__PURE__ */ e(
@@ -238,15 +238,15 @@ const dt = (t) => /* @__PURE__ */ he.createElement("svg", { xmlns: "http://www.w
238
238
  {
239
239
  className: r(
240
240
  "relative flex items-center justify-center",
241
- n ? "w-5 h-5 rounded-full" : "w-5 h-5 rounded",
242
- k.container
241
+ o ? "w-5 h-5 rounded-full" : "w-5 h-5 rounded",
242
+ C.container
243
243
  ),
244
- children: n ? /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(
244
+ children: o ? /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(
245
245
  "span",
246
246
  {
247
247
  className: r(
248
248
  "w-3 h-3 rounded-full transition-all duration-200",
249
- k.dot,
249
+ C.dot,
250
250
  f ? "opacity-100 scale-100" : "opacity-0 scale-50"
251
251
  )
252
252
  }
@@ -255,18 +255,18 @@ const dt = (t) => /* @__PURE__ */ he.createElement("svg", { xmlns: "http://www.w
255
255
  {
256
256
  className: r(
257
257
  "w-4 h-4 stroke-[2.5px] transition-opacity duration-200",
258
- k.check,
258
+ C.check,
259
259
  f ? "opacity-100" : "opacity-0"
260
260
  )
261
261
  }
262
262
  )
263
263
  }
264
264
  ),
265
- b
265
+ g
266
266
  ]
267
267
  }
268
268
  ),
269
- o && /* @__PURE__ */ e("p", { id: `${j}-error`, className: "mt-1 text-extra-small text-red-600", children: o })
269
+ n && /* @__PURE__ */ e("p", { id: `${E}-error`, className: "mt-1 text-extra-small text-red-600", children: n })
270
270
  ] });
271
271
  });
272
272
  mt.displayName = "MciCheck";
@@ -278,17 +278,17 @@ function Tt({
278
278
  className: m,
279
279
  contentClassName: c
280
280
  }) {
281
- const [o, d] = I(a), [v, u] = I(0), x = ne(null);
282
- return X(() => {
283
- x.current && u(o ? x.current.scrollHeight : 0);
284
- }, [o]), /* @__PURE__ */ i("div", { className: r("overflow-hidden rounded-xl border border-slate-200", m), children: [
281
+ const [n, d] = z(a), [y, u] = z(0), x = ne(null);
282
+ return Z(() => {
283
+ x.current && u(n ? x.current.scrollHeight : 0);
284
+ }, [n]), /* @__PURE__ */ i("div", { className: r("overflow-hidden rounded-xl border border-slate-200", m), children: [
285
285
  /* @__PURE__ */ i(
286
286
  "button",
287
287
  {
288
- onClick: () => d(!o),
288
+ onClick: () => d(!n),
289
289
  className: r(
290
290
  "flex w-full items-center justify-between p-5 transition-all duration-300 hover:cursor-pointer",
291
- o ? "border-b border-slate-200" : "border-b border-transparent"
291
+ n ? "border-b border-slate-200" : "border-b border-transparent"
292
292
  ),
293
293
  children: [
294
294
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
@@ -302,7 +302,7 @@ function Tt({
302
302
  size: 20,
303
303
  className: r(
304
304
  "flex-shrink-0 transition-transform duration-300 text-slate-400",
305
- o && "rotate-180"
305
+ n && "rotate-180"
306
306
  )
307
307
  }
308
308
  )
@@ -316,7 +316,7 @@ function Tt({
316
316
  "overflow-hidden transition-all duration-300 ease-out"
317
317
  ),
318
318
  style: {
319
- height: `${v}px`
319
+ height: `${y}px`
320
320
  },
321
321
  children: /* @__PURE__ */ e("div", { ref: x, className: r("p-5", c), children: l })
322
322
  }
@@ -331,23 +331,23 @@ function $t({
331
331
  children: s,
332
332
  footer: m,
333
333
  title: c,
334
- description: o,
334
+ description: n,
335
335
  showCloseButton: d = !0,
336
- drawerClassName: v,
336
+ drawerClassName: y,
337
337
  closeOnOverlayClick: u = !0,
338
338
  closeOnEscape: x = !0
339
339
  }) {
340
- const j = ne(null), T = ne(null), { handleEscape: M } = we(() => {
340
+ const E = ne(null), j = ne(null), { handleEscape: S } = we(() => {
341
341
  x && t && l();
342
- }), { handleClick: C } = ve(j, () => {
342
+ }), { handleClick: L } = ve(E, () => {
343
343
  u && t && l();
344
344
  });
345
- X(() => {
346
- t ? (T.current = document.activeElement, j.current?.focus()) : T.current?.focus();
347
- }, [t]), X(() => (t && (document.addEventListener("keydown", M), document.addEventListener("mousedown", C), document.body.style.overflow = "hidden"), () => {
348
- document.removeEventListener("keydown", M), document.removeEventListener("mousedown", C), document.body.style.overflow = "unset";
349
- }), [t, M, C]);
350
- const n = {
345
+ Z(() => {
346
+ t ? (j.current = document.activeElement, E.current?.focus()) : j.current?.focus();
347
+ }, [t]), Z(() => (t && (document.addEventListener("keydown", S), document.addEventListener("mousedown", L), document.body.style.overflow = "hidden"), () => {
348
+ document.removeEventListener("keydown", S), document.removeEventListener("mousedown", L), document.body.style.overflow = "unset";
349
+ }), [t, S, L]);
350
+ const o = {
351
351
  left: "top-6 left-6 bottom-6 max-w-[572px]",
352
352
  right: "top-6 right-6 bottom-6 max-w-[572px]"
353
353
  }, f = {
@@ -369,19 +369,19 @@ function $t({
369
369
  /* @__PURE__ */ i(
370
370
  "div",
371
371
  {
372
- ref: j,
372
+ ref: E,
373
373
  tabIndex: -1,
374
374
  className: r(
375
375
  "fixed flex flex-col z-50 w-full rounded-2xl bg-white transition-transform duration-300 ease-in-out outline-none",
376
- n[a],
376
+ o[a],
377
377
  f[a],
378
- v
378
+ y
379
379
  ),
380
380
  role: "dialog",
381
381
  "aria-modal": "true",
382
382
  "aria-labelledby": c ? "mciDrawer-title" : void 0,
383
383
  children: [
384
- (c || d || o) && /* @__PURE__ */ i(
384
+ (c || d || n) && /* @__PURE__ */ i(
385
385
  "div",
386
386
  {
387
387
  className: r(
@@ -390,7 +390,7 @@ function $t({
390
390
  children: [
391
391
  c && /* @__PURE__ */ i("div", { className: "block", children: [
392
392
  /* @__PURE__ */ e("h2", { id: "drawer-title", className: "text-h3 font-semibold text-black", children: c }),
393
- o && /* @__PURE__ */ e("p", { className: "text-base text-slate-base font-normal mt-2", children: o })
393
+ n && /* @__PURE__ */ e("p", { className: "text-base text-slate-base font-normal mt-2", children: n })
394
394
  ] }),
395
395
  d && /* @__PURE__ */ e(
396
396
  "button",
@@ -415,7 +415,7 @@ function $t({
415
415
  )
416
416
  ] });
417
417
  }
418
- const je = xe(
418
+ const Ae = xe(
419
419
  ({
420
420
  label: t,
421
421
  placeholder: l,
@@ -423,29 +423,33 @@ const je = xe(
423
423
  icon: s,
424
424
  rightIcon: m,
425
425
  iconPosition: c = "left",
426
- size: o = "base",
426
+ size: n = "base",
427
427
  error: d,
428
- disabled: v = !1,
428
+ disabled: y = !1,
429
429
  required: u = !1,
430
430
  value: x,
431
- onChange: j,
432
- onFocus: T,
433
- onBlur: M,
434
- className: C,
435
- name: n,
436
- maxLength: f = 250
437
- }, w) => {
438
- const [k, b] = I(!1), [D, $] = I(""), [S, B] = I(!1), q = x ?? D, J = a === "password", R = s && c === "left", H = s && c === "right" || m || J, P = () => {
439
- b(!0), T?.();
431
+ onChange: E,
432
+ onFocus: j,
433
+ onBlur: S,
434
+ className: L,
435
+ name: o,
436
+ maxLength: f = 250,
437
+ onClear: v,
438
+ showClearButton: C = !1
439
+ }, g) => {
440
+ const [D, A] = z(!1), [F, I] = z(""), [J, Q] = z(!1), U = x ?? F, G = a === "password", B = C && !!U && !y, H = s && c === "left", _ = s && c === "right" || m || G, X = _ || B, P = () => {
441
+ A(!0), j?.();
440
442
  }, re = () => {
441
- b(!1), M?.();
442
- }, ee = (V) => {
443
- x === void 0 && $(V.target.value), j?.(V);
444
- }, G = () => B((V) => !V), F = Q(
443
+ A(!1), S?.();
444
+ }, T = (W) => {
445
+ x === void 0 && I(W.target.value), E?.(W);
446
+ }, O = () => Q((W) => !W), h = () => {
447
+ x === void 0 && I(""), v?.();
448
+ }, b = te(
445
449
  () => ({
446
450
  sm: {
447
451
  input: "h-9 text-small",
448
- padding: R && H ? "pl-7 pr-7" : R ? "pl-7 pr-2" : H ? "pl-2 pr-7" : "px-2",
452
+ padding: H && _ ? "pl-7 pr-7" : H ? "pl-7 pr-2" : _ ? "pl-2 pr-7" : "px-2",
449
453
  icon: "w-4 h-4",
450
454
  leftIcon: "left-2",
451
455
  rightIcon: "right-2",
@@ -454,7 +458,7 @@ const je = xe(
454
458
  },
455
459
  md: {
456
460
  input: "h-10 text-small",
457
- padding: R && H ? "pl-8 pr-8" : R ? "pl-8 pr-2" : H ? "pl-2 pr-8" : "px-4",
461
+ padding: H && _ ? "pl-8 pr-8" : H ? "pl-8 pr-2" : _ ? "pl-2 pr-8" : "px-4",
458
462
  icon: "w-4 h-4",
459
463
  leftIcon: "left-2",
460
464
  rightIcon: "right-2",
@@ -463,7 +467,7 @@ const je = xe(
463
467
  },
464
468
  base: {
465
469
  input: "h-12 text-base",
466
- padding: R && H ? "pl-9 pr-9" : R ? "pl-9 pr-3" : H ? "pl-3 pr-9" : "px-4",
470
+ padding: H && _ ? "pl-9 pr-9" : H ? "pl-9 pr-3" : _ ? "pl-3 pr-9" : "px-4",
467
471
  icon: "w-5 h-5",
468
472
  leftIcon: "left-3",
469
473
  rightIcon: "right-3",
@@ -471,17 +475,17 @@ const je = xe(
471
475
  iconWrapper: "h-5"
472
476
  }
473
477
  }),
474
- [R, H]
475
- ), te = Q(() => d ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [d]), L = Q(() => v ? "text-slate-400" : d ? "text-red-600" : k ? "text-black" : "text-slate-400", [d, k, v]);
476
- return /* @__PURE__ */ i("div", { className: r("w-full", C), children: [
478
+ [H, _]
479
+ ), $ = te(() => d ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [d]), k = te(() => y ? "text-slate-400" : d ? "text-red-600" : D ? "text-black" : "text-slate-400", [d, D, y]);
480
+ return /* @__PURE__ */ i("div", { className: r("w-full", L), children: [
477
481
  t && /* @__PURE__ */ i(
478
482
  "label",
479
483
  {
480
- htmlFor: n,
484
+ htmlFor: o,
481
485
  className: r(
482
486
  "mb-2 block text-base font-medium",
483
487
  d ? "text-red-600" : "text-slate-700",
484
- F[o].labelFont
488
+ b[n].labelFont
485
489
  ),
486
490
  children: [
487
491
  t,
@@ -493,87 +497,101 @@ const je = xe(
493
497
  /* @__PURE__ */ e(
494
498
  "input",
495
499
  {
496
- ref: w,
497
- name: n,
498
- type: J && S ? "text" : a,
499
- value: q,
500
- onChange: ee,
500
+ ref: g,
501
+ name: o,
502
+ type: G && J ? "text" : a,
503
+ value: U,
504
+ onChange: T,
501
505
  onFocus: P,
502
506
  onBlur: re,
503
- disabled: v,
507
+ disabled: y,
504
508
  required: u,
505
509
  autoComplete: "on",
506
510
  placeholder: l,
507
511
  className: r(
508
512
  "w-full border bg-white font-normal transition-all duration-300 ease-in-out outline-none",
509
- o === "base" ? "rounded-xl" : "rounded-lg",
513
+ n === "base" ? "rounded-xl" : "rounded-lg",
510
514
  "disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
511
- F[o].input,
512
- F[o].padding,
513
- te
515
+ b[n].input,
516
+ b[n].padding,
517
+ $
514
518
  ),
515
519
  maxLength: f
516
520
  }
517
521
  ),
518
- R && /* @__PURE__ */ e(
522
+ H && /* @__PURE__ */ e(
519
523
  "div",
520
524
  {
521
525
  className: r(
522
526
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center",
523
527
  "transition-all duration-300",
524
- F[o].leftIcon,
525
- L
528
+ b[n].leftIcon,
529
+ k
526
530
  ),
527
531
  children: /* @__PURE__ */ e(
528
532
  "div",
529
533
  {
530
- className: r("flex items-center justify-center", F[o].iconWrapper),
531
- children: /* @__PURE__ */ e("span", { className: r("flex items-center justify-center", F[o].icon), children: s })
534
+ className: r("flex items-center justify-center", b[n].iconWrapper),
535
+ children: /* @__PURE__ */ e("span", { className: r("flex items-center justify-center", b[n].icon), children: s })
532
536
  }
533
537
  )
534
538
  }
535
539
  ),
536
- /* @__PURE__ */ i(
540
+ X && /* @__PURE__ */ i(
537
541
  "div",
538
542
  {
539
543
  className: r(
540
544
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center gap-2",
541
545
  "transition-all duration-300",
542
- F[o].rightIcon
546
+ b[n].rightIcon
543
547
  ),
544
548
  children: [
545
- m && !J && /* @__PURE__ */ e(
549
+ B && /* @__PURE__ */ e(
550
+ "button",
551
+ {
552
+ type: "button",
553
+ onClick: h,
554
+ className: r(
555
+ "flex items-center justify-center",
556
+ b[n].iconWrapper,
557
+ "text-slate-base hover:text-black"
558
+ ),
559
+ style: { cursor: "pointer" },
560
+ children: /* @__PURE__ */ e("span", { className: r("flex items-center justify-center", b[n].icon), children: /* @__PURE__ */ e(ie, { className: r("h-full w-full") }) })
561
+ }
562
+ ),
563
+ m && !G && /* @__PURE__ */ e(
546
564
  "div",
547
565
  {
548
- className: r("flex items-center justify-center", F[o].iconWrapper),
566
+ className: r("flex items-center justify-center", b[n].iconWrapper),
549
567
  children: /* @__PURE__ */ e(
550
568
  "span",
551
569
  {
552
570
  className: r(
553
571
  "flex items-center justify-center",
554
- F[o].icon,
555
- L
572
+ b[n].icon,
573
+ k
556
574
  ),
557
575
  children: m
558
576
  }
559
577
  )
560
578
  }
561
579
  ),
562
- J && /* @__PURE__ */ i(ue, { children: [
580
+ G && /* @__PURE__ */ i(ue, { children: [
563
581
  m && /* @__PURE__ */ e(
564
582
  "div",
565
583
  {
566
584
  className: r(
567
585
  "flex items-center justify-center",
568
- F[o].iconWrapper
586
+ b[n].iconWrapper
569
587
  ),
570
588
  children: /* @__PURE__ */ e(
571
589
  "span",
572
590
  {
573
591
  className: r(
574
592
  "flex items-center justify-center",
575
- F[o].icon,
576
- L
593
+ b[n].icon,
594
+ k
577
595
  ),
578
596
  children: m
579
597
  }
@@ -584,33 +602,33 @@ const je = xe(
584
602
  "button",
585
603
  {
586
604
  type: "button",
587
- onClick: G,
605
+ onClick: O,
588
606
  className: r(
589
607
  "flex items-center justify-center",
590
- F[o].iconWrapper,
591
- L
608
+ b[n].iconWrapper,
609
+ k
592
610
  ),
593
611
  children: /* @__PURE__ */ e(
594
612
  "span",
595
613
  {
596
- className: r("flex items-center justify-center cursor-pointer", F[o].icon),
597
- children: S ? /* @__PURE__ */ e(We, { weight: "Linear", className: r("h-full w-full") }) : /* @__PURE__ */ e(Pe, { weight: "Linear", className: r("h-full w-full") })
614
+ className: r("flex items-center justify-center cursor-pointer", b[n].icon),
615
+ children: J ? /* @__PURE__ */ e(Be, { weight: "Linear", className: r("h-full w-full") }) : /* @__PURE__ */ e(Pe, { weight: "Linear", className: r("h-full w-full") })
598
616
  }
599
617
  )
600
618
  }
601
619
  )
602
620
  ] }),
603
- s && c === "right" && !J && /* @__PURE__ */ e(
621
+ s && c === "right" && !G && /* @__PURE__ */ e(
604
622
  "div",
605
623
  {
606
- className: r("flex items-center justify-center", F[o].iconWrapper),
624
+ className: r("flex items-center justify-center", b[n].iconWrapper),
607
625
  children: /* @__PURE__ */ e(
608
626
  "span",
609
627
  {
610
628
  className: r(
611
629
  "flex items-center justify-center",
612
- F[o].icon,
613
- L
630
+ b[n].icon,
631
+ k
614
632
  ),
615
633
  children: s
616
634
  }
@@ -625,7 +643,7 @@ const je = xe(
625
643
  ] });
626
644
  }
627
645
  );
628
- je.displayName = "MciInput";
646
+ Ae.displayName = "MciInput";
629
647
  const ht = {
630
648
  uz: {
631
649
  months: [
@@ -731,125 +749,125 @@ const ht = {
731
749
  placeholder: s,
732
750
  label: m,
733
751
  disabled: c = !1,
734
- required: o = !1,
752
+ required: n = !1,
735
753
  className: d,
736
- format: v = "DD.MM.YYYY",
754
+ format: y = "DD.MM.YYYY",
737
755
  minDate: u,
738
756
  maxDate: x,
739
- error: j,
740
- showClear: T = !0,
741
- allowManualInput: M = !0,
742
- locale: C = "uz",
743
- startView: n = "day"
757
+ error: E,
758
+ showClear: j = !0,
759
+ allowManualInput: S = !0,
760
+ locale: L = "uz",
761
+ startView: o = "day"
744
762
  }, f) => {
745
- const [w, k] = I(!1), [b, D] = I(
763
+ const [v, C] = z(!1), [g, D] = z(
746
764
  t === "range" ? [null, null] : null
747
- ), [$, S] = I([null, null]), [B, q] = I(/* @__PURE__ */ new Date()), [J, R] = I(n), [H, P] = I(0), [re, ee] = I(""), G = ne(null), F = l !== void 0 ? l : b, te = ht[C], L = Y((p) => new Date(p.getFullYear(), p.getMonth(), p.getDate()), []), V = Y(
748
- (p, g) => L(p).getTime() === L(g).getTime(),
749
- [L]
750
- ), h = Y(
765
+ ), [A, F] = z([null, null]), [I, J] = z(/* @__PURE__ */ new Date()), [Q, U] = z(o), [G, B] = z(0), [H, _] = z(""), X = ne(null), P = l !== void 0 ? l : g, re = ht[L], T = R((p) => new Date(p.getFullYear(), p.getMonth(), p.getDate()), []), O = R(
766
+ (p, w) => T(p).getTime() === T(w).getTime(),
767
+ [T]
768
+ ), h = R(
751
769
  (p) => {
752
- const g = L(p);
753
- return u && g < L(u) ? !0 : !!(x && g > L(x));
770
+ const w = T(p);
771
+ return u && w < T(u) ? !0 : !!(x && w > T(x));
754
772
  },
755
- [u, x, L]
756
- ), E = Y(
773
+ [u, x, T]
774
+ ), b = R(
757
775
  (p) => {
758
776
  if (!p) return "";
759
- const g = p.getDate().toString().padStart(2, "0"), y = (p.getMonth() + 1).toString().padStart(2, "0"), W = p.getFullYear();
760
- return v.replace("DD", g).replace("MM", y).replace("YYYY", W.toString());
777
+ const w = p.getDate().toString().padStart(2, "0"), N = (p.getMonth() + 1).toString().padStart(2, "0"), Y = p.getFullYear();
778
+ return y.replace("DD", w).replace("MM", N).replace("YYYY", Y.toString());
761
779
  },
762
- [v]
763
- ), z = Q(() => {
780
+ [y]
781
+ ), $ = te(() => {
764
782
  if (t === "date")
765
- return E(F);
766
- const [p, g] = F;
767
- return !p && !g ? "" : p && g ? `${E(p)} - ${E(g)}` : p ? `${E(p)} - ...` : "...";
768
- }, [t, F, E]);
769
- X(() => {
770
- ee(z);
771
- }, [z]);
772
- const A = Y(() => {
773
- k(!1), R(n), P(0), t === "range" && S(F);
774
- }, [t, F, n]), { handleClick: O } = ve(G, A), { handleEscape: K } = we(A);
775
- X(() => {
776
- if (w)
777
- return document.addEventListener("mousedown", O), document.addEventListener("keydown", K), () => {
778
- document.removeEventListener("mousedown", O), document.removeEventListener("keydown", K);
783
+ return b(P);
784
+ const [p, w] = P;
785
+ return !p && !w ? "" : p && w ? `${b(p)} - ${b(w)}` : p ? `${b(p)} - ...` : "...";
786
+ }, [t, P, b]);
787
+ Z(() => {
788
+ _($);
789
+ }, [$]);
790
+ const k = R(() => {
791
+ C(!1), U(o), B(0), t === "range" && F(P);
792
+ }, [t, P, o]), { handleClick: W } = ve(X, k), { handleEscape: K } = we(k);
793
+ Z(() => {
794
+ if (v)
795
+ return document.addEventListener("mousedown", W), document.addEventListener("keydown", K), () => {
796
+ document.removeEventListener("mousedown", W), document.removeEventListener("keydown", K);
779
797
  };
780
- }, [w, O, K]);
781
- const ae = Y(
798
+ }, [v, W, K]);
799
+ const ae = R(
782
800
  (p) => {
783
801
  p.stopPropagation();
784
- const g = t === "range" ? [null, null] : null;
785
- D(g), S([null, null]), ee(""), a?.(g);
802
+ const w = t === "range" ? [null, null] : null;
803
+ D(w), F([null, null]), _(""), a?.(w);
786
804
  },
787
805
  [t, a]
788
- ), ye = Y(
806
+ ), ye = R(
789
807
  (p) => {
790
808
  if (h(p)) return;
791
- const g = L(p);
809
+ const w = T(p);
792
810
  if (t === "date")
793
- D(g), a?.(g), A();
811
+ D(w), a?.(w), k();
794
812
  else {
795
- const [y, W] = $;
796
- if (!y && !W || y && W)
797
- S([g, null]);
798
- else if (y && !W) {
799
- let U;
800
- g < y ? U = [g, y] : U = [y, g], S(U), D(U), a?.(U), A();
813
+ const [N, Y] = A;
814
+ if (!N && !Y || N && Y)
815
+ F([w, null]);
816
+ else if (N && !Y) {
817
+ let V;
818
+ w < N ? V = [w, N] : V = [N, w], F(V), D(V), a?.(V), k();
801
819
  }
802
820
  }
803
821
  },
804
- [t, $, h, L, a, A]
822
+ [t, A, h, T, a, k]
805
823
  ), fe = (p) => {
806
- q((g) => {
807
- const y = new Date(g);
808
- return y.setMonth(y.getMonth() + p), y;
824
+ J((w) => {
825
+ const N = new Date(w);
826
+ return N.setMonth(N.getMonth() + p), N;
809
827
  });
810
- }, N = (p) => {
811
- q((g) => {
812
- const y = new Date(g);
813
- return y.setFullYear(y.getFullYear() + p), y;
828
+ }, M = (p) => {
829
+ J((w) => {
830
+ const N = new Date(w);
831
+ return N.setFullYear(N.getFullYear() + p), N;
814
832
  });
815
- }, le = Y(
833
+ }, le = R(
816
834
  (p) => {
817
- const g = p.getFullYear(), y = p.getMonth(), W = new Date(g, y, 1), U = new Date(g, y + 1, 0), oe = [], se = W.getDay();
818
- for (let _ = se; _ > 0; _--) {
819
- const Z = new Date(g, y, 1 - _);
820
- oe.push({ date: Z, isCurrentMonth: !1 });
835
+ const w = p.getFullYear(), N = p.getMonth(), Y = new Date(w, N, 1), V = new Date(w, N + 1, 0), oe = [], se = Y.getDay();
836
+ for (let q = se; q > 0; q--) {
837
+ const ee = new Date(w, N, 1 - q);
838
+ oe.push({ date: ee, isCurrentMonth: !1 });
821
839
  }
822
- for (let _ = 1; _ <= U.getDate(); _++) {
823
- const Z = new Date(g, y, _);
824
- oe.push({ date: Z, isCurrentMonth: !0 });
840
+ for (let q = 1; q <= V.getDate(); q++) {
841
+ const ee = new Date(w, N, q);
842
+ oe.push({ date: ee, isCurrentMonth: !0 });
825
843
  }
826
844
  const ce = 42 - oe.length;
827
- for (let _ = 1; _ <= ce; _++) {
828
- const Z = new Date(g, y + 1, _);
829
- oe.push({ date: Z, isCurrentMonth: !1 });
845
+ for (let q = 1; q <= ce; q++) {
846
+ const ee = new Date(w, N + 1, q);
847
+ oe.push({ date: ee, isCurrentMonth: !1 });
830
848
  }
831
849
  return oe;
832
850
  },
833
851
  []
834
852
  ), Te = (p) => {
835
- const g = L(p);
836
- if (t === "date") return F && V(g, F);
837
- const [y] = $[0] ? $ : F;
838
- return y && V(g, y);
853
+ const w = T(p);
854
+ if (t === "date") return P && O(w, P);
855
+ const [N] = A[0] ? A : P;
856
+ return N && O(w, N);
839
857
  }, $e = (p) => {
840
858
  if (t !== "range") return !1;
841
- const g = L(p), [, y] = $[1] ? $ : F;
842
- return y && V(g, y);
859
+ const w = T(p), [, N] = A[1] ? A : P;
860
+ return N && O(w, N);
843
861
  }, ze = (p) => {
844
862
  if (t !== "range") return !1;
845
- const g = L(p), [y, W] = $[0] ? $ : F;
846
- return !y || !W ? !1 : g > L(y) && g < L(W);
847
- }, Ie = (p) => V(p, /* @__PURE__ */ new Date()), Ce = (p, g, y) => {
848
- const W = le(p);
863
+ const w = T(p), [N, Y] = A[0] ? A : P;
864
+ return !N || !Y ? !1 : w > T(N) && w < T(Y);
865
+ }, Ie = (p) => O(p, /* @__PURE__ */ new Date()), Ce = (p, w, N) => {
866
+ const Y = le(p);
849
867
  return /* @__PURE__ */ i("div", { className: "w-[300px] p-2", children: [
850
868
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4 py-1", children: [
851
- /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: g ? /* @__PURE__ */ i(ue, { children: [
852
- /* @__PURE__ */ e("button", { onClick: () => N(-1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(Ue, { weight: "Linear", size: 20, className: "text-slate-700" }) }),
869
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: w ? /* @__PURE__ */ i(ue, { children: [
870
+ /* @__PURE__ */ e("button", { onClick: () => M(-1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(Ue, { weight: "Linear", size: 20, className: "text-slate-700" }) }),
853
871
  /* @__PURE__ */ e("button", { onClick: () => fe(-1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(pe, { weight: "Linear", size: 20, className: "text-slate-700" }) })
854
872
  ] }) : /* @__PURE__ */ e("div", { className: "w-[52px]" }) }),
855
873
  /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
@@ -858,9 +876,9 @@ const ht = {
858
876
  {
859
877
  className: "font-medium text-small text-slate-700 cursor-pointer hover:text-blue-600 transition-colors",
860
878
  onClick: () => {
861
- R("month"), q(p);
879
+ U("month"), J(p);
862
880
  },
863
- children: te.months[p.getMonth()]
881
+ children: re.months[p.getMonth()]
864
882
  }
865
883
  ),
866
884
  /* @__PURE__ */ e(
@@ -868,29 +886,29 @@ const ht = {
868
886
  {
869
887
  className: "font-medium text-small text-slate-700 cursor-pointer hover:text-blue-600 transition-colors",
870
888
  onClick: () => {
871
- R("year"), q(p);
889
+ U("year"), J(p);
872
890
  },
873
891
  children: p.getFullYear()
874
892
  }
875
893
  )
876
894
  ] }),
877
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: y ? /* @__PURE__ */ i(ue, { children: [
895
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: N ? /* @__PURE__ */ i(ue, { children: [
878
896
  /* @__PURE__ */ e("button", { onClick: () => fe(1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(me, { weight: "Linear", size: 20, className: "text-slate-700" }) }),
879
- /* @__PURE__ */ e("button", { onClick: () => N(1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(_e, { weight: "Linear", size: 20, className: "text-slate-700" }) })
897
+ /* @__PURE__ */ e("button", { onClick: () => M(1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(_e, { weight: "Linear", size: 20, className: "text-slate-700" }) })
880
898
  ] }) : /* @__PURE__ */ e("div", { className: "w-[52px]" }) })
881
899
  ] }),
882
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: te.weekdaysShort.map((U) => /* @__PURE__ */ e(
900
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-1", children: re.weekdaysShort.map((V) => /* @__PURE__ */ e(
883
901
  "div",
884
902
  {
885
903
  className: "h-4 flex items-center justify-center text-extra-small font-medium text-blue-600",
886
- children: U
904
+ children: V
887
905
  },
888
- U
906
+ V
889
907
  )) }),
890
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-1 relative", children: W.map((U, oe) => {
891
- const se = U.date, ce = h(se), _ = Te(se), Z = $e(se), Be = ze(se), Se = U.isCurrentMonth, Le = Ie(se);
908
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-1 relative", children: Y.map((V, oe) => {
909
+ const se = V.date, ce = h(se), q = Te(se), ee = $e(se), We = ze(se), Se = V.isCurrentMonth, Le = Ie(se);
892
910
  let be = "";
893
- return Be && (be = "bg-blue-50"), _ && ($[1] || F?.[1]) && (be = "bg-gradient-to-r from-transparent via-blue-50 to-blue-50 from-50%"), Z && ($[0] || F?.[0]) && (be = "bg-gradient-to-l from-transparent via-blue-50 to-blue-50 from-50%"), /* @__PURE__ */ e(
911
+ return We && (be = "bg-blue-50"), q && (A[1] || P?.[1]) && (be = "bg-gradient-to-r from-transparent via-blue-50 to-blue-50 from-50%"), ee && (A[0] || P?.[0]) && (be = "bg-gradient-to-l from-transparent via-blue-50 to-blue-50 from-50%"), /* @__PURE__ */ e(
894
912
  "div",
895
913
  {
896
914
  className: r(
@@ -906,13 +924,13 @@ const ht = {
906
924
  "relative z-10 w-9 h-9 rounded-full flex items-center justify-center text-small font-medium transition-all hover:cursor-pointer",
907
925
  Se ? "text-slate-700" : "text-slate-base",
908
926
  ce && "opacity-30 cursor-not-allowed",
909
- !ce && !_ && !Z && Se && "hover:bg-blue-50 hover:text-blue-600",
910
- (_ || Z) && "bg-blue-600 text-white hover:bg-blue-600",
911
- Le && !_ && !Z && "text-blue-600 bg-blue-50"
927
+ !ce && !q && !ee && Se && "hover:bg-blue-50 hover:text-blue-600",
928
+ (q || ee) && "bg-blue-600 text-white hover:bg-blue-600",
929
+ Le && !q && !ee && "text-blue-600 bg-blue-50"
912
930
  ),
913
931
  children: [
914
932
  se.getDate(),
915
- Le && !_ && !Z && /* @__PURE__ */ e(
933
+ Le && !q && !ee && /* @__PURE__ */ e(
916
934
  "span",
917
935
  {
918
936
  className: "absolute top-1.5 right-1.5 w-1 h-1 bg-blue-600 rounded-full"
@@ -928,86 +946,86 @@ const ht = {
928
946
  ] });
929
947
  }, Re = () => /* @__PURE__ */ i("div", { className: "w-[300px] p-2", children: [
930
948
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4 py-1", children: [
931
- /* @__PURE__ */ e("button", { onClick: () => N(-1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(pe, { weight: "Linear", size: 20, className: "text-slate-700" }) }),
932
- /* @__PURE__ */ e("span", { className: "font-medium text-small text-slate-700", children: B.getFullYear() }),
933
- /* @__PURE__ */ e("button", { onClick: () => N(1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(me, { weight: "Linear", size: 20, className: "text-slate-700" }) })
949
+ /* @__PURE__ */ e("button", { onClick: () => M(-1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(pe, { weight: "Linear", size: 20, className: "text-slate-700" }) }),
950
+ /* @__PURE__ */ e("span", { className: "font-medium text-small text-slate-700", children: I.getFullYear() }),
951
+ /* @__PURE__ */ e("button", { onClick: () => M(1), className: "hover:cursor-pointer", children: /* @__PURE__ */ e(me, { weight: "Linear", size: 20, className: "text-slate-700" }) })
934
952
  ] }),
935
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: te.monthsShort.map((p, g) => /* @__PURE__ */ e(
953
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: re.monthsShort.map((p, w) => /* @__PURE__ */ e(
936
954
  "button",
937
955
  {
938
956
  onClick: () => {
939
- const y = new Date(B);
940
- y.setMonth(g), q(y), R("day");
957
+ const N = new Date(I);
958
+ N.setMonth(w), J(N), U("day");
941
959
  },
942
960
  className: r(
943
961
  "p-1 rounded-sm text-small font-medium hover:bg-blue-50 transition-colors hover:cursor-pointer",
944
- B.getMonth() === g && "bg-blue-600 text-white hover:bg-blue-600"
962
+ I.getMonth() === w && "bg-blue-600 text-white hover:bg-blue-600"
945
963
  ),
946
964
  children: p
947
965
  },
948
966
  p
949
967
  )) })
950
968
  ] }), Ye = () => {
951
- const p = B.getFullYear(), g = Math.floor(p / 12) * 12 + H * 12, y = Array.from({ length: 12 }, (W, U) => g + U);
969
+ const p = I.getFullYear(), w = Math.floor(p / 12) * 12 + G * 12, N = Array.from({ length: 12 }, (Y, V) => w + V);
952
970
  return /* @__PURE__ */ i("div", { className: "w-[300px] p-2", children: [
953
971
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4 py-1", children: [
954
972
  /* @__PURE__ */ e(
955
973
  "button",
956
974
  {
957
- onClick: () => P((W) => W - 1),
975
+ onClick: () => B((Y) => Y - 1),
958
976
  className: "hover:cursor-pointer",
959
977
  children: /* @__PURE__ */ e(pe, { weight: "Linear", size: 20, className: "text-slate-700" })
960
978
  }
961
979
  ),
962
980
  /* @__PURE__ */ i("span", { className: "font-medium text-small text-slate-700", children: [
963
- y[0],
981
+ N[0],
964
982
  " - ",
965
- y[11]
983
+ N[11]
966
984
  ] }),
967
985
  /* @__PURE__ */ e(
968
986
  "button",
969
987
  {
970
- onClick: () => P((W) => W + 1),
988
+ onClick: () => B((Y) => Y + 1),
971
989
  className: "hover:cursor-pointer",
972
990
  children: /* @__PURE__ */ e(me, { weight: "Linear", size: 20, className: "text-slate-700" })
973
991
  }
974
992
  )
975
993
  ] }),
976
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: y.map((W) => /* @__PURE__ */ e(
994
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: N.map((Y) => /* @__PURE__ */ e(
977
995
  "button",
978
996
  {
979
997
  onClick: () => {
980
- const U = new Date(B);
981
- U.setFullYear(W), q(U), R("month");
998
+ const V = new Date(I);
999
+ V.setFullYear(Y), J(V), U("month");
982
1000
  },
983
1001
  className: r(
984
1002
  "p-1 rounded-sm text-small font-medium hover:bg-blue-50 transition-colors hover:cursor-pointer",
985
- B.getFullYear() === W && "bg-blue-600 text-white hover:bg-blue-600"
1003
+ I.getFullYear() === Y && "bg-blue-600 text-white hover:bg-blue-600"
986
1004
  ),
987
- children: W
1005
+ children: Y
988
1006
  },
989
- W
1007
+ Y
990
1008
  )) })
991
1009
  ] });
992
- }, De = new Date(B);
993
- return De.setMonth(B.getMonth() + 1), /* @__PURE__ */ i("div", { ref: G, className: r("relative w-full", d), children: [
1010
+ }, De = new Date(I);
1011
+ return De.setMonth(I.getMonth() + 1), /* @__PURE__ */ i("div", { ref: X, className: r("relative w-full", d), children: [
994
1012
  /* @__PURE__ */ e("div", { ref: f, children: /* @__PURE__ */ e(
995
- je,
1013
+ Ae,
996
1014
  {
997
1015
  label: m,
998
1016
  placeholder: Array.isArray(s) ? s[0] : s,
999
- value: re,
1017
+ value: H,
1000
1018
  onChange: () => {
1001
1019
  },
1002
1020
  icon: /* @__PURE__ */ e(Ve, { weight: "Linear", size: 20, className: "text-slate-500" }),
1003
1021
  disabled: c,
1004
- required: o,
1005
- error: j,
1006
- onFocus: () => !c && k(!0),
1007
- readOnly: !M
1022
+ required: n,
1023
+ error: E,
1024
+ onFocus: () => !c && C(!0),
1025
+ readOnly: !S
1008
1026
  }
1009
1027
  ) }),
1010
- T && re && !c && /* @__PURE__ */ e(
1028
+ j && H && !c && /* @__PURE__ */ e(
1011
1029
  "button",
1012
1030
  {
1013
1031
  type: "button",
@@ -1016,14 +1034,14 @@ const ht = {
1016
1034
  children: /* @__PURE__ */ e(ie, { className: "w-5 h-5 text-slate-400" })
1017
1035
  }
1018
1036
  ),
1019
- w && /* @__PURE__ */ e(
1037
+ v && /* @__PURE__ */ e(
1020
1038
  "div",
1021
1039
  {
1022
1040
  className: "absolute top-full left-0 mt-1 z-50 bg-white rounded-lg shadow-md border border-slate-200 flex flex-col md:flex-row overflow-hidden animate-in fade-in zoom-in-95 duration-200",
1023
- children: J === "day" ? /* @__PURE__ */ i(ue, { children: [
1024
- Ce(B, !0, t !== "range"),
1041
+ children: Q === "day" ? /* @__PURE__ */ i(ue, { children: [
1042
+ Ce(I, !0, t !== "range"),
1025
1043
  t === "range" && /* @__PURE__ */ e("div", { className: "hidden md:block border-l border-slate-200", children: Ce(De, !1, !0) })
1026
- ] }) : J === "month" ? Re() : Ye()
1044
+ ] }) : Q === "month" ? Re() : Ye()
1027
1045
  }
1028
1046
  )
1029
1047
  ] });
@@ -1072,118 +1090,118 @@ const bt = {
1072
1090
  icon: s,
1073
1091
  iconPosition: m = "left",
1074
1092
  size: c = "base",
1075
- error: o,
1093
+ error: n,
1076
1094
  disabled: d = !1,
1077
- required: v = !1,
1095
+ required: y = !1,
1078
1096
  value: u,
1079
1097
  onChange: x,
1080
- onFocus: j,
1081
- onBlur: T,
1082
- className: M,
1083
- clearable: C = !1,
1084
- searchable: n = !1,
1098
+ onFocus: E,
1099
+ onBlur: j,
1100
+ className: S,
1101
+ clearable: L = !1,
1102
+ searchable: o = !1,
1085
1103
  onSearch: f,
1086
- name: w
1087
- }, k) => {
1088
- const [b, D] = I(!1), [$, S] = I(!1), [B, q] = I(""), [J, R] = I(""), [H, P] = I(-1), re = ne(null), ee = ne(null), G = u !== void 0 ? u : B, F = a.find((N) => N.value === G), te = G !== "" && G !== void 0, L = bt[c], V = Q(() => {
1089
- if (!n || f) return a;
1090
- const N = J.toLowerCase();
1104
+ name: v
1105
+ }, C) => {
1106
+ const [g, D] = z(!1), [A, F] = z(!1), [I, J] = z(""), [Q, U] = z(""), [G, B] = z(-1), H = ne(null), _ = ne(null), X = u !== void 0 ? u : I, P = a.find((M) => M.value === X), re = X !== "" && X !== void 0, T = bt[c], O = te(() => {
1107
+ if (!o || f) return a;
1108
+ const M = Q.toLowerCase();
1091
1109
  return a.filter(
1092
- (le) => le.label.toLowerCase().includes(N)
1110
+ (le) => le.label.toLowerCase().includes(M)
1093
1111
  );
1094
- }, [a, J, n, f]), h = Y(() => {
1095
- D(!1), S(!1), R(""), P(-1), T?.();
1096
- }, [T]), { handleClick: E } = ve(re, h), { handleEscape: z } = we(h);
1097
- X(() => {
1098
- if (b)
1099
- return document.addEventListener("mousedown", E), document.addEventListener("keydown", z), () => {
1100
- document.removeEventListener("mousedown", E), document.removeEventListener("keydown", z);
1112
+ }, [a, Q, o, f]), h = R(() => {
1113
+ D(!1), F(!1), U(""), B(-1), j?.();
1114
+ }, [j]), { handleClick: b } = ve(H, h), { handleEscape: $ } = we(h);
1115
+ Z(() => {
1116
+ if (g)
1117
+ return document.addEventListener("mousedown", b), document.addEventListener("keydown", $), () => {
1118
+ document.removeEventListener("mousedown", b), document.removeEventListener("keydown", $);
1101
1119
  };
1102
- }, [b, E, z]), X(() => {
1103
- b && n && ee.current && ee.current.focus();
1104
- }, [b, n]);
1105
- const A = Y(
1106
- (N) => {
1107
- if (!b && (N.key === "ArrowDown" || N.key === "ArrowUp" || N.key === "Enter")) {
1108
- N.preventDefault(), D(!0);
1120
+ }, [g, b, $]), Z(() => {
1121
+ g && o && _.current && _.current.focus();
1122
+ }, [g, o]);
1123
+ const k = R(
1124
+ (M) => {
1125
+ if (!g && (M.key === "ArrowDown" || M.key === "ArrowUp" || M.key === "Enter")) {
1126
+ M.preventDefault(), D(!0);
1109
1127
  return;
1110
1128
  }
1111
- if (b)
1112
- switch (N.key) {
1129
+ if (g)
1130
+ switch (M.key) {
1113
1131
  case "ArrowDown":
1114
- N.preventDefault(), P(
1115
- (le) => le < V.length - 1 ? le + 1 : 0
1132
+ M.preventDefault(), B(
1133
+ (le) => le < O.length - 1 ? le + 1 : 0
1116
1134
  );
1117
1135
  break;
1118
1136
  case "ArrowUp":
1119
- N.preventDefault(), P(
1120
- (le) => le > 0 ? le - 1 : V.length - 1
1137
+ M.preventDefault(), B(
1138
+ (le) => le > 0 ? le - 1 : O.length - 1
1121
1139
  );
1122
1140
  break;
1123
1141
  case "Enter":
1124
- N.preventDefault(), H >= 0 && K(V[H].value);
1142
+ M.preventDefault(), G >= 0 && K(O[G].value);
1125
1143
  break;
1126
1144
  }
1127
1145
  },
1128
- [b, V, H]
1129
- ), O = Y(() => {
1130
- d || (D((N) => !N), b ? (R(""), P(-1)) : (S(!0), j?.()));
1131
- }, [d, b, j]), K = Y(
1132
- (N) => {
1133
- u === void 0 && q(N), x?.(N), D(!1), S(!1), R(""), P(-1), T?.();
1146
+ [g, O, G]
1147
+ ), W = R(() => {
1148
+ d || (D((M) => !M), g ? (U(""), B(-1)) : (F(!0), E?.()));
1149
+ }, [d, g, E]), K = R(
1150
+ (M) => {
1151
+ u === void 0 && J(M), x?.(M), D(!1), F(!1), U(""), B(-1), j?.();
1134
1152
  },
1135
- [u, x, T]
1136
- ), ae = Y(
1137
- (N) => {
1138
- N.stopPropagation(), u === void 0 && q(""), x?.(""), R(""), P(-1);
1153
+ [u, x, j]
1154
+ ), ae = R(
1155
+ (M) => {
1156
+ M.stopPropagation(), u === void 0 && J(""), x?.(""), U(""), B(-1);
1139
1157
  },
1140
1158
  [u, x]
1141
- ), ye = Y(
1142
- (N) => {
1143
- R(N), f?.(N), P(0);
1159
+ ), ye = R(
1160
+ (M) => {
1161
+ U(M), f?.(M), B(0);
1144
1162
  },
1145
1163
  [f]
1146
- ), fe = Q(() => o ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [o]);
1147
- return /* @__PURE__ */ i("div", { className: r("w-full", M), ref: k, children: [
1164
+ ), fe = te(() => n ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [n]);
1165
+ return /* @__PURE__ */ i("div", { className: r("w-full", S), ref: C, children: [
1148
1166
  t && /* @__PURE__ */ i(
1149
1167
  "label",
1150
1168
  {
1151
- htmlFor: w,
1169
+ htmlFor: v,
1152
1170
  className: r(
1153
1171
  "mb-2 block text-base font-medium",
1154
- o ? "text-red-600" : "text-slate-700",
1155
- L.label
1172
+ n ? "text-red-600" : "text-slate-700",
1173
+ T.label
1156
1174
  ),
1157
1175
  children: [
1158
1176
  t,
1159
- v && /* @__PURE__ */ e("span", { className: "ml-1 text-red-600", children: "*" })
1177
+ y && /* @__PURE__ */ e("span", { className: "ml-1 text-red-600", children: "*" })
1160
1178
  ]
1161
1179
  }
1162
1180
  ),
1163
1181
  /* @__PURE__ */ i(
1164
1182
  "div",
1165
1183
  {
1166
- ref: re,
1184
+ ref: H,
1167
1185
  className: "relative",
1168
- onKeyDown: A,
1186
+ onKeyDown: k,
1169
1187
  children: [
1170
1188
  /* @__PURE__ */ i(
1171
1189
  "div",
1172
1190
  {
1173
1191
  role: "combobox",
1174
- "aria-expanded": b,
1192
+ "aria-expanded": g,
1175
1193
  "aria-haspopup": "listbox",
1176
- "aria-controls": `${w}-listbox`,
1194
+ "aria-controls": `${v}-listbox`,
1177
1195
  "aria-disabled": d,
1178
1196
  tabIndex: d ? -1 : 0,
1179
- onClick: O,
1197
+ onClick: W,
1180
1198
  className: r(
1181
1199
  "flex w-full items-center rounded-xl border bg-white font-normal transition-all cursor-pointer",
1182
1200
  d && "disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
1183
- L.container,
1184
- s ? m === "left" ? L.iconPaddingLeft : L.iconPaddingRight : L.padding,
1201
+ T.container,
1202
+ s ? m === "left" ? T.iconPaddingLeft : T.iconPaddingRight : T.padding,
1185
1203
  fe,
1186
- $ && "shadow-blue border-blue-600"
1204
+ A && "shadow-blue border-blue-600"
1187
1205
  ),
1188
1206
  children: [
1189
1207
  s && /* @__PURE__ */ e(
@@ -1191,33 +1209,33 @@ const bt = {
1191
1209
  {
1192
1210
  className: r(
1193
1211
  "absolute top-1/2 -translate-y-1/2 pointer-events-none text-slate-400",
1194
- m === "left" ? L.iconWrapper : L.rightIconWrapper
1212
+ m === "left" ? T.iconWrapper : T.rightIconWrapper
1195
1213
  ),
1196
1214
  children: s
1197
1215
  }
1198
1216
  ),
1199
- n && b ? /* @__PURE__ */ e(
1217
+ o && g ? /* @__PURE__ */ e(
1200
1218
  "input",
1201
1219
  {
1202
- ref: ee,
1220
+ ref: _,
1203
1221
  type: "text",
1204
- value: J,
1205
- onChange: (N) => ye(N.target.value),
1222
+ value: Q,
1223
+ onChange: (M) => ye(M.target.value),
1206
1224
  placeholder: l,
1207
1225
  className: "w-full bg-transparent outline-none",
1208
- onClick: (N) => N.stopPropagation()
1226
+ onClick: (M) => M.stopPropagation()
1209
1227
  }
1210
1228
  ) : /* @__PURE__ */ e(
1211
1229
  "span",
1212
1230
  {
1213
1231
  className: r(
1214
1232
  "block truncate",
1215
- !te && "text-slate-400"
1233
+ !re && "text-slate-400"
1216
1234
  ),
1217
- children: F?.label || l
1235
+ children: P?.label || l
1218
1236
  }
1219
1237
  ),
1220
- C && te && !d && /* @__PURE__ */ e(
1238
+ L && re && !d && /* @__PURE__ */ e(
1221
1239
  "button",
1222
1240
  {
1223
1241
  type: "button",
@@ -1227,7 +1245,7 @@ const bt = {
1227
1245
  s && m === "left" ? "right-8" : "right-10"
1228
1246
  ),
1229
1247
  "aria-label": "Очистить",
1230
- children: /* @__PURE__ */ e(ie, { className: L.iconSize })
1248
+ children: /* @__PURE__ */ e(ie, { className: T.iconSize })
1231
1249
  }
1232
1250
  ),
1233
1251
  /* @__PURE__ */ e(
@@ -1235,44 +1253,44 @@ const bt = {
1235
1253
  {
1236
1254
  className: r(
1237
1255
  "absolute top-1/2 right-3 -translate-y-1/2 pointer-events-none transition-transform",
1238
- b && "rotate-180",
1239
- o ? "text-red-600" : b || $ ? "text-black" : "text-slate-400"
1256
+ g && "rotate-180",
1257
+ n ? "text-red-600" : g || A ? "text-black" : "text-slate-400"
1240
1258
  ),
1241
- children: /* @__PURE__ */ e(Me, { className: L.iconSize })
1259
+ children: /* @__PURE__ */ e(Me, { className: T.iconSize })
1242
1260
  }
1243
1261
  )
1244
1262
  ]
1245
1263
  }
1246
1264
  ),
1247
- b && /* @__PURE__ */ e(
1265
+ g && /* @__PURE__ */ e(
1248
1266
  "div",
1249
1267
  {
1250
- id: `${w}-listbox`,
1268
+ id: `${v}-listbox`,
1251
1269
  role: "listbox",
1252
1270
  className: r(
1253
1271
  "absolute z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-lg border border-slate-200 bg-white shadow-md p-1 text-black",
1254
- L.dropdown
1272
+ T.dropdown
1255
1273
  ),
1256
- children: V.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-center text-base font-normal", children: "Ничего не найдено" }) : V.map((N) => /* @__PURE__ */ e(
1274
+ children: O.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-center text-base font-normal", children: "Ничего не найдено" }) : O.map((M) => /* @__PURE__ */ e(
1257
1275
  "div",
1258
1276
  {
1259
1277
  role: "option",
1260
- "aria-selected": G === N.value,
1261
- onClick: () => K(N.value),
1278
+ "aria-selected": X === M.value,
1279
+ onClick: () => K(M.value),
1262
1280
  className: r(
1263
1281
  "cursor-pointer px-3 py-2 font-normal transition-colors hover:bg-slate-100 rounded-sm",
1264
- G === N.value ? "bg-slate-100" : ""
1282
+ X === M.value ? "bg-slate-100" : ""
1265
1283
  ),
1266
- children: N.label
1284
+ children: M.label
1267
1285
  },
1268
- N.value
1286
+ M.value
1269
1287
  ))
1270
1288
  }
1271
1289
  )
1272
1290
  ]
1273
1291
  }
1274
1292
  ),
1275
- o && /* @__PURE__ */ e("p", { className: "mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600", children: o })
1293
+ n && /* @__PURE__ */ e("p", { className: "mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600", children: n })
1276
1294
  ] });
1277
1295
  }
1278
1296
  );
@@ -1308,43 +1326,43 @@ function zt({
1308
1326
  skeletonRows: s = 5,
1309
1327
  noDataText: m = "",
1310
1328
  sort: c,
1311
- onSortChange: o
1329
+ onSortChange: n
1312
1330
  }) {
1313
- const [d, v] = I(null), u = c ?? d, x = Q(() => !u || c ? l : [...l].sort((n, f) => {
1314
- const w = n[u.key], k = f[u.key];
1315
- return w == null ? 1 : k == null ? -1 : w < k ? u.direction === "asc" ? -1 : 1 : w > k ? u.direction === "asc" ? 1 : -1 : 0;
1316
- }), [l, u, c]), j = (n) => {
1317
- if (!n.sortable) return;
1331
+ const [d, y] = z(null), u = c ?? d, x = te(() => !u || c ? l : [...l].sort((o, f) => {
1332
+ const v = o[u.key], C = f[u.key];
1333
+ return v == null ? 1 : C == null ? -1 : v < C ? u.direction === "asc" ? -1 : 1 : v > C ? u.direction === "asc" ? 1 : -1 : 0;
1334
+ }), [l, u, c]), E = (o) => {
1335
+ if (!o.sortable) return;
1318
1336
  let f = null;
1319
- u?.key !== n.key ? f = { key: n.key, direction: "asc" } : u.direction === "asc" && (f = { key: n.key, direction: "desc" }), c !== void 0 ? o?.(f) : v(f);
1337
+ u?.key !== o.key ? f = { key: o.key, direction: "asc" } : u.direction === "asc" && (f = { key: o.key, direction: "desc" }), c !== void 0 ? n?.(f) : y(f);
1320
1338
  };
1321
- X(() => {
1322
- c !== void 0 && v(null);
1339
+ Z(() => {
1340
+ c !== void 0 && y(null);
1323
1341
  }, [c]);
1324
- const T = (n) => n.sortable ? !u || u.key !== n.key ? /* @__PURE__ */ e(Je, { weight: "Linear", size: 20, className: "text-slate-base" }) : u.direction === "asc" ? /* @__PURE__ */ e(He, { weight: "Linear", size: 20, className: "text-slate-base" }) : /* @__PURE__ */ e(Oe, { weight: "Linear", size: 20, className: "text-slate-base" }) : null, M = a ? [] : c ? l : x, C = (n) => {
1325
- if (n != null && (typeof n == "string" || typeof n == "number"))
1326
- return String(n);
1342
+ const j = (o) => o.sortable ? !u || u.key !== o.key ? /* @__PURE__ */ e(Je, { weight: "Linear", size: 20, className: "text-slate-base" }) : u.direction === "asc" ? /* @__PURE__ */ e(He, { weight: "Linear", size: 20, className: "text-slate-base" }) : /* @__PURE__ */ e(Oe, { weight: "Linear", size: 20, className: "text-slate-base" }) : null, S = a ? [] : c ? l : x, L = (o) => {
1343
+ if (o != null && (typeof o == "string" || typeof o == "number"))
1344
+ return String(o);
1327
1345
  };
1328
1346
  return /* @__PURE__ */ e("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ i("div", { className: "inline-block min-w-full align-middle", children: [
1329
- /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-slate-100", children: /* @__PURE__ */ e("table", { className: "w-full table-fixed", children: /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: t?.map((n, f) => /* @__PURE__ */ e(
1347
+ /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-slate-100", children: /* @__PURE__ */ e("table", { className: "w-full table-fixed", children: /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: t?.map((o, f) => /* @__PURE__ */ e(
1330
1348
  "th",
1331
1349
  {
1332
- onClick: () => j(n),
1350
+ onClick: () => E(o),
1333
1351
  className: r(
1334
1352
  "px-3 py-4 text-left text-small font-medium text-slate-700 transition-colors",
1335
- n.align === "center" && "text-center",
1336
- n.align === "right" && "text-right",
1337
- n.sortable && "cursor-pointer hover:bg-slate-200"
1353
+ o.align === "center" && "text-center",
1354
+ o.align === "right" && "text-right",
1355
+ o.sortable && "cursor-pointer hover:bg-slate-200"
1338
1356
  ),
1339
- style: { width: n.width || "auto" },
1357
+ style: { width: o.width || "auto" },
1340
1358
  children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1341
- /* @__PURE__ */ e("span", { className: "truncate", children: n.title }),
1342
- T(n)
1359
+ /* @__PURE__ */ e("span", { className: "truncate", children: o.title }),
1360
+ j(o)
1343
1361
  ] })
1344
1362
  },
1345
1363
  f
1346
1364
  )) }) }) }) }),
1347
- /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-white", children: /* @__PURE__ */ e("table", { className: "w-full table-fixed", children: /* @__PURE__ */ e("tbody", { className: "divide-y divide-slate-200", children: a ? Array.from({ length: s }).map((n, f) => /* @__PURE__ */ e("tr", { children: t?.map((w, k) => /* @__PURE__ */ e("td", { className: "px-4 py-3", style: { width: w.width }, children: /* @__PURE__ */ e(gt, { height: 30, variant: "rounded" }) }, k)) }, f)) : M?.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length, className: "py-20", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center", children: [
1365
+ /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-white", children: /* @__PURE__ */ e("table", { className: "w-full table-fixed", children: /* @__PURE__ */ e("tbody", { className: "divide-y divide-slate-200", children: a ? Array.from({ length: s }).map((o, f) => /* @__PURE__ */ e("tr", { children: t?.map((v, C) => /* @__PURE__ */ e("td", { className: "px-4 py-3", style: { width: v.width }, children: /* @__PURE__ */ e(gt, { height: 30, variant: "rounded" }) }, C)) }, f)) : S?.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length, className: "py-20", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center", children: [
1348
1366
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
1349
1367
  qe,
1350
1368
  {
@@ -1354,21 +1372,21 @@ function zt({
1354
1372
  }
1355
1373
  ) }),
1356
1374
  /* @__PURE__ */ e("p", { className: "text-small font-medium text-slate-400", children: m })
1357
- ] }) }) }) : M?.map((n, f) => /* @__PURE__ */ e(
1375
+ ] }) }) }) : S?.map((o, f) => /* @__PURE__ */ e(
1358
1376
  "tr",
1359
1377
  {
1360
1378
  className: "group transition-colors hover:bg-slate-50",
1361
- children: t?.map((w, k) => {
1362
- const b = n[w.key], D = C(b);
1379
+ children: t?.map((v, C) => {
1380
+ const g = o[v.key], D = L(g);
1363
1381
  return /* @__PURE__ */ e(
1364
1382
  "td",
1365
1383
  {
1366
1384
  className: r(
1367
1385
  "px-3 py-4 text-small font-normal text-black align-top",
1368
- w.align === "center" && "text-center",
1369
- w.align === "right" && "text-right"
1386
+ v.align === "center" && "text-center",
1387
+ v.align === "right" && "text-right"
1370
1388
  ),
1371
- style: { width: w.width || "auto" },
1389
+ style: { width: v.width || "auto" },
1372
1390
  children: /* @__PURE__ */ e(
1373
1391
  "div",
1374
1392
  {
@@ -1377,12 +1395,12 @@ function zt({
1377
1395
  "whitespace-normal",
1378
1396
  "break-all"
1379
1397
  ),
1380
- title: w.render ? void 0 : D,
1381
- children: w.render ? w.render(b, n) : String(b ?? "-")
1398
+ title: v.render ? void 0 : D,
1399
+ children: v.render ? v.render(g, o) : String(g ?? "-")
1382
1400
  }
1383
1401
  )
1384
1402
  },
1385
- k
1403
+ C
1386
1404
  );
1387
1405
  })
1388
1406
  },
@@ -1458,17 +1476,17 @@ const xt = {
1458
1476
  maxFiles: s = 5,
1459
1477
  disabled: m = !1,
1460
1478
  label: c,
1461
- required: o = !1,
1479
+ required: n = !1,
1462
1480
  error: d,
1463
- className: v,
1481
+ className: y,
1464
1482
  onFilesChange: u,
1465
1483
  onUpload: x,
1466
- showPreview: j = !0,
1467
- locale: T = "uz",
1468
- showFileTypeIcon: M = !0,
1469
- customValidator: C
1484
+ showPreview: E = !0,
1485
+ locale: j = "uz",
1486
+ showFileTypeIcon: S = !0,
1487
+ customValidator: L
1470
1488
  }) => {
1471
- const [n, f] = I([]), [w, k] = I(!1), [b, D] = I(!1), $ = ne(null), S = xt[T], B = (h) => {
1489
+ const [o, f] = z([]), [v, C] = z(!1), [g, D] = z(!1), A = ne(null), F = xt[j], I = (h) => {
1472
1490
  switch (h.type.split("/")[0]) {
1473
1491
  case "image":
1474
1492
  return /* @__PURE__ */ e(Qe, { className: "h-5 w-5 text-blue-500" });
@@ -1479,79 +1497,79 @@ const xt = {
1479
1497
  default:
1480
1498
  return h.type.includes("pdf") ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 text-red-500" }) : h.type.includes("word") || h.type.includes("document") ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 text-blue-600" }) : h.type.includes("excel") || h.type.includes("spreadsheet") ? /* @__PURE__ */ e(Ne, { className: "h-5 w-5 text-green-600" }) : /* @__PURE__ */ e(Ge, { className: "h-5 w-5 text-gray-500" });
1481
1499
  }
1482
- }, q = (h) => {
1483
- if (h === 0) return "0 Bytes";
1484
- const E = 1024, z = ["Bytes", "KB", "MB", "GB"], A = Math.floor(Math.log(h) / Math.log(E));
1485
- return parseFloat((h / Math.pow(E, A)).toFixed(2)) + " " + z[A];
1486
1500
  }, J = (h) => {
1487
- const E = a * 1024 * 1024;
1488
- return h.size <= E;
1489
- }, R = (h) => l === "*/*" ? !0 : l.split(",").map((z) => z.trim()).some((z) => {
1490
- if (z.endsWith("/*")) {
1491
- const A = z.replace("/*", "");
1492
- return h.type.startsWith(A);
1501
+ if (h === 0) return "0 Bytes";
1502
+ const b = 1024, $ = ["Bytes", "KB", "MB", "GB"], k = Math.floor(Math.log(h) / Math.log(b));
1503
+ return parseFloat((h / Math.pow(b, k)).toFixed(2)) + " " + $[k];
1504
+ }, Q = (h) => {
1505
+ const b = a * 1024 * 1024;
1506
+ return h.size <= b;
1507
+ }, U = (h) => l === "*/*" ? !0 : l.split(",").map(($) => $.trim()).some(($) => {
1508
+ if ($.endsWith("/*")) {
1509
+ const k = $.replace("/*", "");
1510
+ return h.type.startsWith(k);
1493
1511
  }
1494
- return h.type === z || h.name.toLowerCase().endsWith(z.replace("*.", "."));
1495
- }), H = (h) => new Promise((E) => {
1512
+ return h.type === $ || h.name.toLowerCase().endsWith($.replace("*.", "."));
1513
+ }), G = (h) => new Promise((b) => {
1496
1514
  if (h.type.startsWith("image/")) {
1497
- const z = new FileReader();
1498
- z.onload = (A) => E(A.target?.result), z.readAsDataURL(h);
1515
+ const $ = new FileReader();
1516
+ $.onload = (k) => b(k.target?.result), $.readAsDataURL(h);
1499
1517
  } else
1500
- E("");
1501
- }), P = Y(
1518
+ b("");
1519
+ }), B = R(
1502
1520
  async (h) => {
1503
- const E = Array.from(h), z = [];
1504
- for (const A of E) {
1505
- if (n.length + z.length >= s) {
1506
- alert(S.maxFilesError(s));
1521
+ const b = Array.from(h), $ = [];
1522
+ for (const k of b) {
1523
+ if (o.length + $.length >= s) {
1524
+ alert(F.maxFilesError(s));
1507
1525
  break;
1508
1526
  }
1509
- if (!J(A)) {
1510
- alert(S.fileSizeError(A.name, a));
1527
+ if (!Q(k)) {
1528
+ alert(F.fileSizeError(k.name, a));
1511
1529
  continue;
1512
1530
  }
1513
- if (!R(A)) {
1514
- alert(S.fileTypeError(A.name));
1531
+ if (!U(k)) {
1532
+ alert(F.fileTypeError(k.name));
1515
1533
  continue;
1516
1534
  }
1517
- if (C) {
1518
- const K = C(A);
1535
+ if (L) {
1536
+ const K = L(k);
1519
1537
  if (K) {
1520
1538
  alert(K);
1521
1539
  continue;
1522
1540
  }
1523
1541
  }
1524
- const O = await H(A);
1525
- z.push({
1542
+ const W = await G(k);
1543
+ $.push({
1526
1544
  id: Math.random().toString(36).substr(2, 9),
1527
- file: A,
1528
- preview: O,
1545
+ file: k,
1546
+ preview: W,
1529
1547
  progress: 0,
1530
1548
  status: "uploading"
1531
1549
  });
1532
1550
  }
1533
- if (z.length > 0) {
1534
- const A = t ? [...n, ...z] : z;
1535
- if (f(A), u?.(A.map((O) => O.file)), x) {
1551
+ if ($.length > 0) {
1552
+ const k = t ? [...o, ...$] : $;
1553
+ if (f(k), u?.(k.map((W) => W.file)), x) {
1536
1554
  D(!0);
1537
1555
  try {
1538
- const O = A.map((K, ae) => ({
1556
+ const W = k.map((K, ae) => ({
1539
1557
  ...K,
1540
- progress: Math.min(100, (ae + 1) / A.length * 100)
1558
+ progress: Math.min(100, (ae + 1) / k.length * 100)
1541
1559
  }));
1542
- f(O), await x(O), f(
1560
+ f(W), await x(W), f(
1543
1561
  (K) => K.map((ae) => ({
1544
1562
  ...ae,
1545
1563
  status: "success",
1546
1564
  progress: 100
1547
1565
  }))
1548
1566
  );
1549
- } catch (O) {
1567
+ } catch (W) {
1550
1568
  f(
1551
1569
  (K) => K.map((ae) => ({
1552
1570
  ...ae,
1553
1571
  status: "error",
1554
- error: O instanceof Error ? O.message : S.uploadFailed
1572
+ error: W instanceof Error ? W.message : F.uploadFailed
1555
1573
  }))
1556
1574
  );
1557
1575
  } finally {
@@ -1561,58 +1579,58 @@ const xt = {
1561
1579
  }
1562
1580
  },
1563
1581
  [
1564
- n,
1582
+ o,
1565
1583
  s,
1566
- J,
1567
- R,
1568
- C,
1569
- S,
1584
+ Q,
1585
+ U,
1586
+ L,
1587
+ F,
1570
1588
  a,
1571
1589
  t,
1572
1590
  u,
1573
1591
  x
1574
1592
  ]
1575
- ), re = Y(
1593
+ ), H = R(
1576
1594
  (h) => {
1577
- h.preventDefault(), m || k(!0);
1595
+ h.preventDefault(), m || C(!0);
1578
1596
  },
1579
1597
  [m]
1580
- ), ee = Y((h) => {
1581
- h.preventDefault(), k(!1);
1582
- }, []), G = Y(
1598
+ ), _ = R((h) => {
1599
+ h.preventDefault(), C(!1);
1600
+ }, []), X = R(
1583
1601
  (h) => {
1584
- if (h.preventDefault(), k(!1), m) return;
1585
- const E = h.dataTransfer.files;
1586
- E.length > 0 && P(E);
1602
+ if (h.preventDefault(), C(!1), m) return;
1603
+ const b = h.dataTransfer.files;
1604
+ b.length > 0 && B(b);
1587
1605
  },
1588
- [m, P]
1589
- ), F = Y(
1606
+ [m, B]
1607
+ ), P = R(
1590
1608
  (h) => {
1591
- const E = h.target.files;
1592
- E && E.length > 0 && (P(E), $.current && ($.current.value = ""));
1609
+ const b = h.target.files;
1610
+ b && b.length > 0 && (B(b), A.current && (A.current.value = ""));
1593
1611
  },
1594
- [P]
1595
- ), te = Y(
1612
+ [B]
1613
+ ), re = R(
1596
1614
  (h) => {
1597
- f((E) => {
1598
- const z = E.filter((A) => A.id !== h);
1599
- return u?.(z.map((A) => A.file)), z;
1615
+ f((b) => {
1616
+ const $ = b.filter((k) => k.id !== h);
1617
+ return u?.($.map((k) => k.file)), $;
1600
1618
  });
1601
1619
  },
1602
1620
  [u]
1603
- ), L = Y(() => {
1621
+ ), T = R(() => {
1604
1622
  f([]), u?.([]);
1605
- }, [u]), V = Y(() => {
1606
- $.current?.click();
1623
+ }, [u]), O = R(() => {
1624
+ A.current?.click();
1607
1625
  }, []);
1608
- return /* @__PURE__ */ i("div", { className: r("w-full", v), children: [
1626
+ return /* @__PURE__ */ i("div", { className: r("w-full", y), children: [
1609
1627
  c && /* @__PURE__ */ i(
1610
1628
  "label",
1611
1629
  {
1612
1630
  className: r("mb-2 block text-base font-medium text-slate-700", d ? "text-red-600" : "text-slate-700"),
1613
1631
  children: [
1614
1632
  c,
1615
- o && /* @__PURE__ */ e("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
1633
+ n && /* @__PURE__ */ e("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
1616
1634
  ]
1617
1635
  }
1618
1636
  ),
@@ -1622,23 +1640,23 @@ const xt = {
1622
1640
  className: r(
1623
1641
  "cursor-pointer border border-dashed rounded-2xl p-6 text-center transition-all duration-300",
1624
1642
  "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600",
1625
- w && "border-solid border-slate-600 bg-slate-100",
1643
+ v && "border-solid border-slate-600 bg-slate-100",
1626
1644
  "disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
1627
1645
  d && "border-red-600 focus:border-red-600 shadow-red"
1628
1646
  ),
1629
- onDragOver: re,
1630
- onDragLeave: ee,
1631
- onDrop: G,
1632
- onClick: V,
1647
+ onDragOver: H,
1648
+ onDragLeave: _,
1649
+ onDrop: X,
1650
+ onClick: O,
1633
1651
  children: [
1634
1652
  /* @__PURE__ */ e(
1635
1653
  "input",
1636
1654
  {
1637
- ref: $,
1655
+ ref: A,
1638
1656
  type: "file",
1639
1657
  multiple: t,
1640
1658
  accept: l,
1641
- onChange: F,
1659
+ onChange: P,
1642
1660
  disabled: m,
1643
1661
  className: "hidden"
1644
1662
  }
@@ -1656,38 +1674,38 @@ const xt = {
1656
1674
  ),
1657
1675
  /* @__PURE__ */ i("div", { className: "space-y-1", children: [
1658
1676
  /* @__PURE__ */ i("p", { className: "text-small font-medium text-slate-700", children: [
1659
- S.dragAndDrop,
1677
+ F.dragAndDrop,
1660
1678
  " ",
1661
- S.or.toLowerCase(),
1679
+ F.or.toLowerCase(),
1662
1680
  " ",
1663
- S.clickToUpload
1681
+ F.clickToUpload
1664
1682
  ] }),
1665
- /* @__PURE__ */ e("p", { className: "text-small font-normal text-slate-700", children: S.fileRequirements(t, s, a, l) })
1683
+ /* @__PURE__ */ e("p", { className: "text-small font-normal text-slate-700", children: F.fileRequirements(t, s, a, l) })
1666
1684
  ] })
1667
1685
  ] })
1668
1686
  ]
1669
1687
  }
1670
1688
  ),
1671
- n.length > 0 && /* @__PURE__ */ i("div", { className: "mt-4 space-y-3", children: [
1689
+ o.length > 0 && /* @__PURE__ */ i("div", { className: "mt-4 space-y-3", children: [
1672
1690
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
1673
1691
  /* @__PURE__ */ i("span", { className: "text-small font-medium text-slate-700", children: [
1674
- S.selectedFiles,
1692
+ F.selectedFiles,
1675
1693
  " (",
1676
- n.length,
1694
+ o.length,
1677
1695
  ")"
1678
1696
  ] }),
1679
- n.length > 1 && /* @__PURE__ */ e(
1697
+ o.length > 1 && /* @__PURE__ */ e(
1680
1698
  "button",
1681
1699
  {
1682
1700
  type: "button",
1683
- onClick: L,
1684
- disabled: m || b,
1701
+ onClick: T,
1702
+ disabled: m || g,
1685
1703
  className: "text-small text-red-600 disabled:opacity-50",
1686
- children: S.clearAll
1704
+ children: F.clearAll
1687
1705
  }
1688
1706
  )
1689
1707
  ] }),
1690
- /* @__PURE__ */ e("div", { className: "space-y-2", children: n.map((h) => /* @__PURE__ */ i(
1708
+ /* @__PURE__ */ e("div", { className: "space-y-2", children: o.map((h) => /* @__PURE__ */ i(
1691
1709
  "div",
1692
1710
  {
1693
1711
  className: r(
@@ -1696,27 +1714,27 @@ const xt = {
1696
1714
  ),
1697
1715
  children: [
1698
1716
  /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 items-center space-x-3", children: [
1699
- j && h.preview ? /* @__PURE__ */ e(
1717
+ E && h.preview ? /* @__PURE__ */ e(
1700
1718
  "img",
1701
1719
  {
1702
1720
  src: h.preview,
1703
1721
  alt: h.file.name,
1704
1722
  className: "h-10 w-10 rounded object-cover"
1705
1723
  }
1706
- ) : M ? /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: B(h.file) }) : null,
1724
+ ) : S ? /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: I(h.file) }) : null,
1707
1725
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1708
1726
  /* @__PURE__ */ e("p", { className: "truncate text-small font-medium text-slate-700", children: h.file.name }),
1709
1727
  /* @__PURE__ */ i("div", { className: "flex items-center space-x-2 text-small text-slate-400", children: [
1710
- /* @__PURE__ */ e("span", { children: q(h.file.size) }),
1728
+ /* @__PURE__ */ e("span", { children: J(h.file.size) }),
1711
1729
  h.status === "uploading" && /* @__PURE__ */ i("span", { className: "flex items-center", children: [
1712
- /* @__PURE__ */ e(Ae, { className: "h-5 w-5 mr-1 animate-spin" }),
1713
- S.uploading
1730
+ /* @__PURE__ */ e(je, { className: "h-5 w-5 mr-1 animate-spin" }),
1731
+ F.uploading
1714
1732
  ] }),
1715
1733
  h.status === "success" && /* @__PURE__ */ e(
1716
1734
  "span",
1717
1735
  {
1718
1736
  className: "flex items-center text-small font-normal text-green-600",
1719
- children: S.success
1737
+ children: F.success
1720
1738
  }
1721
1739
  )
1722
1740
  ] }),
@@ -1734,10 +1752,10 @@ const xt = {
1734
1752
  "button",
1735
1753
  {
1736
1754
  type: "button",
1737
- onClick: (E) => {
1738
- E.stopPropagation(), te(h.id);
1755
+ onClick: (b) => {
1756
+ b.stopPropagation(), re(h.id);
1739
1757
  },
1740
- disabled: m || b,
1758
+ disabled: m || g,
1741
1759
  className: "text-slate-base transition-colors active:rotate-180 hover:cursor-pointer disabled:opacity-50",
1742
1760
  children: /* @__PURE__ */ e(ie, { className: "h-6 w-6" })
1743
1761
  }
@@ -1757,15 +1775,15 @@ function Rt({
1757
1775
  description: s,
1758
1776
  Header: m,
1759
1777
  Body: c,
1760
- footer: o,
1778
+ footer: n,
1761
1779
  handleClickOutside: d = !1
1762
1780
  }) {
1763
- const v = ne(null), { handleEscape: u } = we(() => l(!1));
1764
- X(() => (t ? (document.addEventListener("keydown", u), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => document.removeEventListener("keydown", u)), [t, u]);
1765
- const { handleClick: x } = ve(v, () => {
1781
+ const y = ne(null), { handleEscape: u } = we(() => l(!1));
1782
+ Z(() => (t ? (document.addEventListener("keydown", u), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => document.removeEventListener("keydown", u)), [t, u]);
1783
+ const { handleClick: x } = ve(y, () => {
1766
1784
  d && l(!1);
1767
1785
  });
1768
- return X(() => (t && d && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x)), [t, x, d]), /* @__PURE__ */ e(
1786
+ return Z(() => (t && d && document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x)), [t, x, d]), /* @__PURE__ */ e(
1769
1787
  "div",
1770
1788
  {
1771
1789
  className: r(
@@ -1775,7 +1793,7 @@ function Rt({
1775
1793
  children: /* @__PURE__ */ i(
1776
1794
  "div",
1777
1795
  {
1778
- ref: v,
1796
+ ref: y,
1779
1797
  className: r(
1780
1798
  "relative bg-white w-full max-w-[720px] rounded-2xl",
1781
1799
  "transform transition-all duration-500 ease-out",
@@ -1797,7 +1815,7 @@ function Rt({
1797
1815
  )
1798
1816
  ] }),
1799
1817
  c && /* @__PURE__ */ e("div", { className: "scrollbar-thin scrollbar-thumb-slate-200 max-h-96 px-6 overflow-y-auto mb-2", children: c }),
1800
- o && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-3 border-t border-slate-200 p-6", children: o })
1818
+ n && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-3 border-t border-slate-200 p-6", children: n })
1801
1819
  ]
1802
1820
  }
1803
1821
  )
@@ -1811,26 +1829,26 @@ function Yt({
1811
1829
  onPageChange: s,
1812
1830
  onPerPageChange: m,
1813
1831
  siblingCount: c = 1,
1814
- perPageOptions: o = [10, 30, 50, 100],
1832
+ perPageOptions: n = [10, 30, 50, 100],
1815
1833
  showPerPage: d = !0,
1816
- variant: v = "yellow",
1834
+ variant: y = "yellow",
1817
1835
  size: u = "large",
1818
1836
  paginationClassName: x
1819
1837
  }) {
1820
- const j = Number.isFinite(t) && t > 0 ? t : 0, T = Number.isFinite(a) && a > 0 ? a : 10, M = Math.max(1, Number.isFinite(l) ? l : 1), C = Math.ceil(j / T);
1821
- if (C <= 1 || j === 0) return null;
1838
+ const E = Number.isFinite(t) && t > 0 ? t : 0, j = Number.isFinite(a) && a > 0 ? a : 10, S = Math.max(1, Number.isFinite(l) ? l : 1), L = Math.ceil(E / j);
1839
+ if (L <= 1 || E === 0) return null;
1822
1840
  const f = (() => {
1823
- const b = [], D = c * 2 + 5;
1824
- if (C <= D)
1825
- return Array.from({ length: C }, (B, q) => q + 1);
1826
- const $ = Math.max(M - c, 2), S = Math.min(M + c, C - 1);
1827
- b.push(1), $ > 2 && b.push("...");
1828
- for (let B = $; B <= S; B++) b.push(B);
1829
- return S < C - 1 && b.push("..."), C > 1 && b.push(C), b;
1830
- })(), w = {
1841
+ const g = [], D = c * 2 + 5;
1842
+ if (L <= D)
1843
+ return Array.from({ length: L }, (I, J) => J + 1);
1844
+ const A = Math.max(S - c, 2), F = Math.min(S + c, L - 1);
1845
+ g.push(1), A > 2 && g.push("...");
1846
+ for (let I = A; I <= F; I++) g.push(I);
1847
+ return F < L - 1 && g.push("..."), L > 1 && g.push(L), g;
1848
+ })(), v = {
1831
1849
  medium: "h-9 text-small",
1832
1850
  large: "h-10 text-base"
1833
- }[u], k = {
1851
+ }[u], C = {
1834
1852
  yellow: {
1835
1853
  active: "bg-yellow-500 text-white border-yellow-500",
1836
1854
  inactive: "bg-slate-100 border-slate-200 text-black hover:bg-slate-200",
@@ -1843,7 +1861,7 @@ function Yt({
1843
1861
  disabled: "text-slate-400 border-slate-300",
1844
1862
  arrow: "text-black"
1845
1863
  }
1846
- }[v ?? "yellow"];
1864
+ }[y ?? "yellow"];
1847
1865
  return /* @__PURE__ */ i("div", { className: r(
1848
1866
  "flex items-center justify-between gap-4 w-full",
1849
1867
  x
@@ -1860,14 +1878,14 @@ function Yt({
1860
1878
  /* @__PURE__ */ e(
1861
1879
  "select",
1862
1880
  {
1863
- value: T,
1864
- onChange: (b) => m(Number(b.target.value)),
1881
+ value: j,
1882
+ onChange: (g) => m(Number(g.target.value)),
1865
1883
  className: r(
1866
1884
  "appearance-none bg-white border border-slate-200 rounded-lg pl-3 pr-8 text-base text-black font-medium focus:outline-none cursor-pointer",
1867
1885
  u === "large" ? "h-10" : "h-9"
1868
1886
  ),
1869
1887
  "aria-label": "Количество строк на странице",
1870
- children: o.map((b) => /* @__PURE__ */ e("option", { value: b, children: b }, b))
1888
+ children: n.map((g) => /* @__PURE__ */ e("option", { value: g, children: g }, g))
1871
1889
  }
1872
1890
  ),
1873
1891
  /* @__PURE__ */ e(
@@ -1884,41 +1902,41 @@ function Yt({
1884
1902
  /* @__PURE__ */ e(
1885
1903
  "button",
1886
1904
  {
1887
- onClick: () => s(M - 1),
1888
- disabled: M === 1,
1905
+ onClick: () => s(S - 1),
1906
+ disabled: S === 1,
1889
1907
  "aria-label": "Предыдущая страница",
1890
1908
  className: r(
1891
1909
  "flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",
1892
- w,
1893
- M === 1 ? r("cursor-not-allowed opacity-50", k.disabled) : r("hover:cursor-pointer", k.arrow, "border-slate-200")
1910
+ v,
1911
+ S === 1 ? r("cursor-not-allowed opacity-50", C.disabled) : r("hover:cursor-pointer", C.arrow, "border-slate-200")
1894
1912
  ),
1895
1913
  children: /* @__PURE__ */ e(pe, { weight: "Linear", size: 20 })
1896
1914
  }
1897
1915
  ),
1898
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: f.map((b, D) => {
1899
- if (b === "...")
1916
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: f.map((g, D) => {
1917
+ if (g === "...")
1900
1918
  return /* @__PURE__ */ e(
1901
1919
  "span",
1902
1920
  {
1903
- className: r("flex items-center justify-center text-black font-medium min-w-10", w),
1921
+ className: r("flex items-center justify-center text-black font-medium min-w-10", v),
1904
1922
  "aria-hidden": "true",
1905
1923
  children: /* @__PURE__ */ e(et, { weight: "Bold", size: 20 })
1906
1924
  },
1907
1925
  D
1908
1926
  );
1909
- const $ = b === M;
1927
+ const A = g === S;
1910
1928
  return /* @__PURE__ */ e(
1911
1929
  "button",
1912
1930
  {
1913
- onClick: () => s(b),
1914
- "aria-label": `Страница ${b}${$ ? ", текущая" : ""}`,
1915
- "aria-current": $ ? "page" : void 0,
1931
+ onClick: () => s(g),
1932
+ "aria-label": `Страница ${g}${A ? ", текущая" : ""}`,
1933
+ "aria-current": A ? "page" : void 0,
1916
1934
  className: r(
1917
1935
  "flex items-center justify-center rounded-lg border font-medium transition-all hover:cursor-pointer min-w-10 px-2",
1918
- w,
1919
- $ ? k.active : k.inactive
1936
+ v,
1937
+ A ? C.active : C.inactive
1920
1938
  ),
1921
- children: b
1939
+ children: g
1922
1940
  },
1923
1941
  D
1924
1942
  );
@@ -1926,13 +1944,13 @@ function Yt({
1926
1944
  /* @__PURE__ */ e(
1927
1945
  "button",
1928
1946
  {
1929
- onClick: () => s(M + 1),
1930
- disabled: M === C,
1947
+ onClick: () => s(S + 1),
1948
+ disabled: S === L,
1931
1949
  "aria-label": "Следующая страница",
1932
1950
  className: r(
1933
1951
  "flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",
1934
- w,
1935
- M === C ? r("cursor-not-allowed opacity-50", k.disabled) : r("hover:cursor-pointer", k.arrow, "border-slate-200")
1952
+ v,
1953
+ S === L ? r("cursor-not-allowed opacity-50", C.disabled) : r("hover:cursor-pointer", C.arrow, "border-slate-200")
1936
1954
  ),
1937
1955
  children: /* @__PURE__ */ e(me, { size: 20, weight: "Linear" })
1938
1956
  }
@@ -1940,51 +1958,51 @@ function Yt({
1940
1958
  ] })
1941
1959
  ] });
1942
1960
  }
1943
- function Bt({
1961
+ function Wt({
1944
1962
  tabs: t,
1945
1963
  defaultTab: l,
1946
1964
  position: a = "top",
1947
1965
  className: s,
1948
1966
  onChange: m
1949
1967
  }) {
1950
- const [c, o] = I(l || t[0]?.id), [d, v] = I({}), u = ne([]), x = () => {
1951
- const n = t.findIndex((w) => w?.id === c), f = u.current[n];
1968
+ const [c, n] = z(l || t[0]?.id), [d, y] = z({}), u = ne([]), x = () => {
1969
+ const o = t.findIndex((v) => v?.id === c), f = u.current[o];
1952
1970
  if (f) {
1953
- const { offsetLeft: w, offsetTop: k, offsetWidth: b, offsetHeight: D } = f;
1954
- v({
1955
- left: `${w}px`,
1956
- top: `${k}px`,
1957
- width: `${b}px`,
1971
+ const { offsetLeft: v, offsetTop: C, offsetWidth: g, offsetHeight: D } = f;
1972
+ y({
1973
+ left: `${v}px`,
1974
+ top: `${C}px`,
1975
+ width: `${g}px`,
1958
1976
  height: `${D}px`,
1959
1977
  transition: "all 0.4s cubic-bezier(0.25, 1, 0.5, 1)"
1960
1978
  });
1961
1979
  }
1962
1980
  };
1963
- X(() => (x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x)), [c, a, t]);
1964
- const j = {
1981
+ Z(() => (x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x)), [c, a, t]);
1982
+ const E = {
1965
1983
  top: "flex-col",
1966
1984
  bottom: "flex-col-reverse",
1967
1985
  left: "flex-row",
1968
1986
  right: "flex-row-reverse"
1969
- }, T = {
1987
+ }, j = {
1970
1988
  top: "flex-row",
1971
1989
  bottom: "flex-row",
1972
1990
  left: "flex-col",
1973
1991
  right: "flex-col"
1974
- }, M = {
1992
+ }, S = {
1975
1993
  top: "mt-6",
1976
1994
  bottom: "mb-6",
1977
1995
  left: "ml-6",
1978
1996
  right: "mr-6"
1979
- }, C = a === "left" || a === "right";
1980
- return /* @__PURE__ */ i("div", { className: r("flex w-full", j[a], s), children: [
1997
+ }, L = a === "left" || a === "right";
1998
+ return /* @__PURE__ */ i("div", { className: r("flex w-full", E[a], s), children: [
1981
1999
  /* @__PURE__ */ i(
1982
2000
  "div",
1983
2001
  {
1984
2002
  className: r(
1985
2003
  "relative flex rounded-xl bg-slate-100 p-1",
1986
- T[a],
1987
- C ? "min-w-48" : "w-full"
2004
+ j[a],
2005
+ L ? "min-w-48" : "w-full"
1988
2006
  ),
1989
2007
  children: [
1990
2008
  /* @__PURE__ */ e(
@@ -1992,53 +2010,53 @@ function Bt({
1992
2010
  {
1993
2011
  className: r(
1994
2012
  "absolute bg-white rounded-lg",
1995
- C ? "w-full" : "h-full"
2013
+ L ? "w-full" : "h-full"
1996
2014
  ),
1997
2015
  style: d
1998
2016
  }
1999
2017
  ),
2000
- t?.map((n, f) => {
2001
- const w = c === n.id;
2018
+ t?.map((o, f) => {
2019
+ const v = c === o.id;
2002
2020
  return /* @__PURE__ */ i(
2003
2021
  "button",
2004
2022
  {
2005
- ref: (k) => {
2006
- u.current[f] = k;
2023
+ ref: (C) => {
2024
+ u.current[f] = C;
2007
2025
  },
2008
2026
  onClick: () => {
2009
- n?.disabled || (o(n?.id), m?.(n?.id));
2027
+ o?.disabled || (n(o?.id), m?.(o?.id));
2010
2028
  },
2011
- disabled: n?.disabled,
2029
+ disabled: o?.disabled,
2012
2030
  className: r(
2013
2031
  "relative flex cursor-pointer text-black text-base font-normal items-center justify-center gap-2 px-5 py-2 z-10 whitespace-nowrap transition-colors duration-300",
2014
- w ? "" : "text-slate-500 hover:text-slate-700",
2015
- n?.disabled && "opacity-50 cursor-not-allowed",
2016
- C ? "w-full justify-start" : "flex-1"
2032
+ v ? "" : "text-slate-500 hover:text-slate-700",
2033
+ o?.disabled && "opacity-50 cursor-not-allowed",
2034
+ L ? "w-full justify-start" : "flex-1"
2017
2035
  ),
2018
2036
  children: [
2019
- n?.icon && /* @__PURE__ */ e(
2037
+ o?.icon && /* @__PURE__ */ e(
2020
2038
  "span",
2021
2039
  {
2022
2040
  className: r(
2023
2041
  "flex-shrink-0 transition-transform duration-200",
2024
- w && "scale-110"
2042
+ v && "scale-110"
2025
2043
  ),
2026
- children: n?.icon
2044
+ children: o?.icon
2027
2045
  }
2028
2046
  ),
2029
- /* @__PURE__ */ e("span", { className: "relative z-10", children: n?.label })
2047
+ /* @__PURE__ */ e("span", { className: "relative z-10", children: o?.label })
2030
2048
  ]
2031
2049
  },
2032
- n?.id
2050
+ o?.id
2033
2051
  );
2034
2052
  })
2035
2053
  ]
2036
2054
  }
2037
2055
  ),
2038
- /* @__PURE__ */ e("div", { className: r("flex-1 overflow-hidden", M[a]), children: /* @__PURE__ */ e("div", { className: "animate-fade-in", style: { animationDuration: "0.4s" }, children: t?.find((n) => n?.id === c)?.content }, c) })
2056
+ /* @__PURE__ */ e("div", { className: r("flex-1 overflow-hidden", S[a]), children: /* @__PURE__ */ e("div", { className: "animate-fade-in", style: { animationDuration: "0.4s" }, children: t?.find((o) => o?.id === c)?.content }, c) })
2039
2057
  ] });
2040
2058
  }
2041
- function Wt({ children: t, className: l }) {
2059
+ function Bt({ children: t, className: l }) {
2042
2060
  return /* @__PURE__ */ e(
2043
2061
  "div",
2044
2062
  {
@@ -2099,19 +2117,19 @@ const yt = xe(
2099
2117
  onChange: s,
2100
2118
  required: m = !1,
2101
2119
  disabled: c = !1,
2102
- error: o,
2120
+ error: n,
2103
2121
  className: d,
2104
- rows: v = 4,
2122
+ rows: y = 4,
2105
2123
  name: u
2106
2124
  }, x) => {
2107
- const j = Q(() => o ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [o]);
2125
+ const E = te(() => n ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [n]);
2108
2126
  return /* @__PURE__ */ i("div", { className: r("relative w-full", d), children: [
2109
2127
  t && /* @__PURE__ */ i(
2110
2128
  "label",
2111
2129
  {
2112
2130
  className: r(
2113
2131
  "mb-2 block text-base font-medium",
2114
- o ? "text-red-600" : "text-slate-700"
2132
+ n ? "text-red-600" : "text-slate-700"
2115
2133
  ),
2116
2134
  children: [
2117
2135
  t,
@@ -2124,19 +2142,19 @@ const yt = xe(
2124
2142
  {
2125
2143
  ref: x,
2126
2144
  name: u,
2127
- rows: v,
2145
+ rows: y,
2128
2146
  value: a,
2129
- onChange: (T) => s?.(T.target.value),
2147
+ onChange: (j) => s?.(j.target.value),
2130
2148
  disabled: c,
2131
2149
  placeholder: l,
2132
2150
  className: r(
2133
2151
  "w-full resize-none rounded-xl border bg-white text-base font-normal transition-all duration-300 ease-in-out outline-none",
2134
2152
  "p-3 disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
2135
- j
2153
+ E
2136
2154
  )
2137
2155
  }
2138
2156
  ),
2139
- o && /* @__PURE__ */ e("p", { className: "mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600", children: o })
2157
+ n && /* @__PURE__ */ e("p", { className: "mt-2 animate-[slideDown_0.3s_ease-out] text-small font-normal text-red-600", children: n })
2140
2158
  ] });
2141
2159
  }
2142
2160
  );
@@ -2159,21 +2177,21 @@ function Mt({
2159
2177
  action: m,
2160
2178
  onClose: c
2161
2179
  }) {
2162
- const [o, d] = I(100);
2163
- X(() => {
2180
+ const [n, d] = z(100);
2181
+ Z(() => {
2164
2182
  if (s === 1 / 0) {
2165
2183
  d(100);
2166
2184
  return;
2167
2185
  }
2168
2186
  let x = null;
2169
- const j = (M) => {
2170
- x || (x = M);
2171
- const C = M - x, n = Math.max(0, (s - C) / s * 100);
2172
- d(n), n > 0 ? requestAnimationFrame(j) : c?.();
2173
- }, T = requestAnimationFrame(j);
2174
- return () => cancelAnimationFrame(T);
2187
+ const E = (S) => {
2188
+ x || (x = S);
2189
+ const L = S - x, o = Math.max(0, (s - L) / s * 100);
2190
+ d(o), o > 0 ? requestAnimationFrame(E) : c?.();
2191
+ }, j = requestAnimationFrame(E);
2192
+ return () => cancelAnimationFrame(j);
2175
2193
  }, [s, c]);
2176
- const v = {
2194
+ const y = {
2177
2195
  success: /* @__PURE__ */ e(st, { weight: "Bold", className: "w-5 h-5" }),
2178
2196
  error: /* @__PURE__ */ e(lt, { weight: "Bold", className: "w-5 h-5" }),
2179
2197
  warning: /* @__PURE__ */ e(at, { weight: "Bold", className: "w-5 h-5" }),
@@ -2223,13 +2241,13 @@ function Mt({
2223
2241
  {
2224
2242
  className: r("absolute bottom-0 left-0 h-1", u.line[a]),
2225
2243
  style: {
2226
- width: `${o}%`,
2244
+ width: `${n}%`,
2227
2245
  transition: "none"
2228
2246
  }
2229
2247
  }
2230
2248
  ),
2231
2249
  /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
2232
- /* @__PURE__ */ e("div", { className: r("flex-shrink-0", u.text[a]), children: v[a] }),
2250
+ /* @__PURE__ */ e("div", { className: r("flex-shrink-0", u.text[a]), children: y[a] }),
2233
2251
  /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
2234
2252
  /* @__PURE__ */ e("h4", { className: "text-base font-medium mb-1", children: t }),
2235
2253
  l && /* @__PURE__ */ e("p", { className: "text-small text-[#82828C]", children: l }),
@@ -2290,7 +2308,7 @@ function Ut({
2290
2308
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
2291
2309
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
2292
2310
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
2293
- }, o = {
2311
+ }, n = {
2294
2312
  top: "left-1/2 -translate-x-1/2 top-full",
2295
2313
  bottom: "left-1/2 -translate-x-1/2 bottom-full",
2296
2314
  left: "top-1/2 -translate-y-1/2 left-full",
@@ -2316,7 +2334,7 @@ function Ut({
2316
2334
  {
2317
2335
  className: r(
2318
2336
  "absolute h-2 w-2 rotate-45 bg-slate-400",
2319
- o[a]
2337
+ n[a]
2320
2338
  )
2321
2339
  }
2322
2340
  )
@@ -2332,11 +2350,11 @@ function _t({
2332
2350
  variant: s = "yellow",
2333
2351
  label: m,
2334
2352
  supportText: c,
2335
- className: o
2353
+ className: n
2336
2354
  }) {
2337
2355
  const d = () => {
2338
2356
  a || l?.(!t);
2339
- }, v = {
2357
+ }, y = {
2340
2358
  blue: {
2341
2359
  active: "bg-blue-600",
2342
2360
  hover: "hover:bg-blue-600",
@@ -2353,7 +2371,7 @@ function _t({
2353
2371
  {
2354
2372
  className: r(
2355
2373
  "flex items-start gap-3 select-none",
2356
- o
2374
+ n
2357
2375
  ),
2358
2376
  children: [
2359
2377
  /* @__PURE__ */ e(
@@ -2363,9 +2381,9 @@ function _t({
2363
2381
  disabled: a,
2364
2382
  className: r(
2365
2383
  "relative h-6 w-11 rounded-xl transition-all duration-300 outline-none cursor-pointer",
2366
- t ? v[s].active : "bg-slate-200",
2367
- !a && v[s].hover,
2368
- !a && v[s].focus,
2384
+ t ? y[s].active : "bg-slate-200",
2385
+ !a && y[s].hover,
2386
+ !a && y[s].focus,
2369
2387
  a && "bg-slate-100 cursor-not-allowed"
2370
2388
  ),
2371
2389
  onClick: d,
@@ -2397,24 +2415,24 @@ function _t({
2397
2415
  );
2398
2416
  }
2399
2417
  export {
2400
- At as MciBreadcrumb,
2401
- jt as MciButton,
2418
+ jt as MciBreadcrumb,
2419
+ At as MciButton,
2402
2420
  mt as MciCheck,
2403
2421
  Tt as MciCollapse,
2404
2422
  $t as MciDrawer,
2405
- je as MciInput,
2423
+ Ae as MciInput,
2406
2424
  Rt as MciModal,
2407
2425
  Yt as MciPagination,
2408
2426
  ft as MciPicker,
2409
2427
  pt as MciSelect,
2410
2428
  gt as MciSkeleton,
2411
2429
  zt as MciTable,
2412
- Bt as MciTabs,
2430
+ Wt as MciTabs,
2413
2431
  Pt as MciTag,
2414
2432
  yt as MciTextarea,
2415
2433
  Vt as MciToast,
2416
2434
  _t as MciToggle,
2417
2435
  Ut as MciTooltip,
2418
2436
  It as MciUpload,
2419
- Wt as TabPanel
2437
+ Bt as TabPanel
2420
2438
  };