@mci-ui/mci-ui 0.0.93 → 0.0.95

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.
Files changed (43) hide show
  1. package/dist/assets/png/empty.png.js +4 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.js +54 -50
  4. package/dist/shared/lib/uploadLanguage.js +6 -3
  5. package/dist/shared/ui/MciModal/MciModal.js +1 -1
  6. package/dist/shared/ui/mciAccordion/MciAccordion.js +4 -4
  7. package/dist/shared/ui/mciButton/MciButton.js +12 -10
  8. package/dist/shared/ui/mciCollapse/MciCollapse.js +1 -1
  9. package/dist/shared/ui/mciDrawer/MciDrawer.js +1 -1
  10. package/dist/shared/ui/mciEmpty/MciEmpty.js +41 -0
  11. package/dist/shared/ui/mciInput/MciInput.js +32 -32
  12. package/dist/shared/ui/mciPagination/MciPagination.js +32 -32
  13. package/dist/shared/ui/mciPhone/MciPhone.js +23 -23
  14. package/dist/shared/ui/mciPicker/MciPicker.js +2 -2
  15. package/dist/shared/ui/mciTable/MciTable.js +317 -165
  16. package/dist/shared/ui/mciTable/MciTableClamp2.js +5 -5
  17. package/dist/shared/ui/mciTabs/FilledTabs.js +38 -36
  18. package/dist/shared/ui/mciTabs/OutlinedTabs.js +28 -24
  19. package/dist/shared/ui/mciTabs/TabCountBadge.js +19 -0
  20. package/dist/shared/ui/mciTag/MciTag.js +17 -17
  21. package/dist/shared/ui/mciTextarea/MciTextarea.js +5 -5
  22. package/dist/shared/ui/mciTimePicker/MciTimePicker.js +368 -217
  23. package/dist/shared/ui/mciUpload/MciUpload.js +102 -352
  24. package/dist/shared/ui/mciUpload/MciUploadButton.js +143 -0
  25. package/dist/shared/ui/mciUpload/MciUploadFileList.js +167 -0
  26. package/dist/shared/ui/mciUpload/mci-upload.theme.js +103 -0
  27. package/dist/shared/ui/mciUpload/mci-upload.utils.js +90 -41
  28. package/dist/shared/ui/mciUpload/useMciUpload.js +183 -0
  29. package/dist/types/index.d.ts +4 -0
  30. package/dist/types/shared/lib/uploadLanguage.d.ts +2 -0
  31. package/dist/types/shared/types/ui/empty.types.d.ts +11 -0
  32. package/dist/types/shared/types/ui/index.d.ts +2 -1
  33. package/dist/types/shared/types/ui/tabs.types.d.ts +1 -0
  34. package/dist/types/shared/types/ui/time-picker.types.d.ts +7 -1
  35. package/dist/types/shared/types/ui/upload.types.d.ts +25 -1
  36. package/dist/types/shared/ui/mciEmpty/MciEmpty.d.ts +2 -0
  37. package/dist/types/shared/ui/mciTabs/TabCountBadge.d.ts +5 -0
  38. package/dist/types/shared/ui/mciUpload/MciUploadButton.d.ts +4 -0
  39. package/dist/types/shared/ui/mciUpload/MciUploadFileList.d.ts +18 -0
  40. package/dist/types/shared/ui/mciUpload/mci-upload.theme.d.ts +101 -0
  41. package/dist/types/shared/ui/mciUpload/mci-upload.utils.d.ts +7 -0
  42. package/dist/types/shared/ui/mciUpload/useMciUpload.d.ts +131 -0
  43. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { jsxs as w, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as w, jsx as a } from "react/jsx-runtime";
2
2
  import { cn as y } from "../../lib/utils.js";
3
3
  import { Star2 as p } from "@solar-icons/react";
4
4
  const m = {
@@ -48,35 +48,37 @@ function S({
48
48
  children: n,
49
49
  text: c,
50
50
  icon: r,
51
- iconPosition: a = "left",
51
+ iconPosition: l = "left",
52
52
  size: i = "base",
53
53
  variant: e = "primary",
54
54
  color: b = "orange",
55
- darkMode: l = !1,
55
+ darkMode: s = !1,
56
56
  loading: o = !1,
57
57
  disabled: u = !1,
58
58
  className: d,
59
59
  type: f = "button",
60
60
  ...v
61
61
  }) {
62
- const s = n ?? c, h = e === "primary" || e === "secondary" || e === "outline" ? l ? T[b][e] : N[b][e] : l ? A[e] : _[e], g = u || o, x = g ? e === "outline" ? "border border-slate-200 bg-transparent text-slate-400 cursor-not-allowed hover:border-slate-200 hover:bg-transparent hover:text-slate-400 active:border-slate-200 active:bg-transparent active:text-slate-400 focus:border-slate-200 focus:bg-transparent focus:text-slate-400 focus:ring-0 focus:shadow-none" : "bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 hover:text-slate-400 active:bg-slate-200 active:text-slate-400 focus:bg-slate-200 focus:text-slate-400 focus:ring-0 focus:shadow-none" : h;
62
+ const g = n ?? c, h = e === "primary" || e === "secondary" || e === "outline" ? s ? T[b][e] : N[b][e] : s ? A[e] : _[e], t = u || o, x = t ? e === "outline" ? "border border-slate-200 bg-transparent text-slate-400 cursor-not-allowed hover:border-slate-200 hover:bg-transparent hover:text-slate-400 active:border-slate-200 active:bg-transparent active:text-slate-400 focus:border-slate-200 focus:bg-transparent focus:text-slate-400 focus:ring-0 focus:shadow-none" : "bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 hover:text-slate-400 active:bg-slate-200 active:text-slate-400 focus:bg-slate-200 focus:text-slate-400 focus:ring-0 focus:shadow-none" : h;
63
63
  return /* @__PURE__ */ w(
64
64
  "button",
65
65
  {
66
66
  ...v,
67
67
  type: f,
68
- disabled: g,
68
+ disabled: t,
69
69
  className: y(
70
- "inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap text-center font-medium transition-all duration-200 cursor-pointer",
70
+ "inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap text-center font-medium transition-all duration-200",
71
+ !t && "cursor-pointer",
72
+ t && "cursor-not-allowed",
71
73
  m[i],
72
74
  x,
73
75
  d
74
76
  ),
75
77
  children: [
76
- r && a === "left" && !o && /* @__PURE__ */ t("span", { className: "flex items-center", children: r }),
77
- s && /* @__PURE__ */ t("span", { className: "whitespace-nowrap", children: s }),
78
- r && a === "right" && !o && /* @__PURE__ */ t("span", { className: "flex items-center", children: r }),
79
- o && /* @__PURE__ */ t(p, { weight: "Linear", size: 20, className: "animate-spin" })
78
+ r && l === "left" && !o && /* @__PURE__ */ a("span", { className: "flex items-center", children: r }),
79
+ g && /* @__PURE__ */ a("span", { className: "whitespace-nowrap", children: g }),
80
+ r && l === "right" && !o && /* @__PURE__ */ a("span", { className: "flex items-center", children: r }),
81
+ o && /* @__PURE__ */ a(p, { weight: "Linear", size: 20, className: "animate-spin" })
80
82
  ]
81
83
  }
82
84
  );
@@ -36,7 +36,7 @@ function R({
36
36
  {
37
37
  onClick: () => d(!r),
38
38
  className: t(
39
- "group flex w-full items-center justify-between p-5 transition-all duration-300 hover:cursor-pointer",
39
+ "group flex w-full cursor-pointer items-center justify-between p-5 transition-all duration-300",
40
40
  m
41
41
  ),
42
42
  children: [
@@ -106,7 +106,7 @@ function T({
106
106
  className: s(
107
107
  t ? "bg-neutral-300 text-slate-50" : "bg-slate-100 text-black",
108
108
  t ? f.darkClose : f.close,
109
- "rounded-xl w-11 h-11 sm:w-12 sm:h-12 hover:cursor-pointer transition flex items-center justify-center group active:scale-95"
109
+ "flex h-11 w-11 cursor-pointer items-center justify-center rounded-xl transition group active:scale-95 sm:h-12 sm:w-12"
110
110
  ),
111
111
  children: /* @__PURE__ */ r(
112
112
  X,
@@ -0,0 +1,41 @@
1
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
+ import p from "../../../assets/png/empty.png.js";
3
+ import { cn as e } from "../../lib/utils.js";
4
+ const u = {
5
+ uz: {
6
+ title: "Ma'lumot topilmadi",
7
+ description: `Hozircha bu bo'limda ma'lumot mavjud emas.
8
+ Qidiruv so'zini o'zgartiring yoki yangi ma'lumot qo'shing`
9
+ },
10
+ ru: {
11
+ title: "Данные не найдены",
12
+ description: `В этом разделе пока нет данных.
13
+ Измените поисковый запрос или добавьте новые данные`
14
+ }
15
+ };
16
+ function b({
17
+ className: n,
18
+ image: i,
19
+ imageClassName: s,
20
+ imageSrc: c,
21
+ locale: l = "uz",
22
+ title: m,
23
+ description: a
24
+ }) {
25
+ const o = u[l], r = a ?? o.description;
26
+ return /* @__PURE__ */ d("div", { className: e("flex flex-col items-center justify-center text-center", n), children: [
27
+ i ? /* @__PURE__ */ t("div", { className: e("mb-4 shrink-0", s), children: i }) : /* @__PURE__ */ t(
28
+ "img",
29
+ {
30
+ src: c ?? p,
31
+ alt: "",
32
+ className: e("mb-4 h-auto w-40 shrink-0", s)
33
+ }
34
+ ),
35
+ /* @__PURE__ */ t("h4", { className: "text-h4 font-semibold text-black", children: m ?? o.title }),
36
+ r && /* @__PURE__ */ t("p", { className: "mt-2 whitespace-pre-line text-base text-slate-700", children: r })
37
+ ] });
38
+ }
39
+ export {
40
+ b as default
41
+ };
@@ -1,9 +1,9 @@
1
1
  import { jsxs as p, jsx as l, Fragment as z } from "react/jsx-runtime";
2
2
  import { EyeClosed as ee, Eye as te } from "@solar-icons/react";
3
3
  import { forwardRef as le, useState as v, useMemo as h } from "react";
4
- import ne from "../../../assets/icons/close.svg.js";
4
+ import se from "../../../assets/icons/close.svg.js";
5
5
  import { cn as e } from "../../lib/utils.js";
6
- import { getInputSizes as se, getInputStateStyles as ae, getInputIconColor as re, getInputRightPaddingClass as ce } from "./mci-input.utils.js";
6
+ import { getInputSizes as ne, getInputStateStyles as ae, getInputIconColor as re, getInputRightPaddingClass as ce } from "./mci-input.utils.js";
7
7
  const ie = le(
8
8
  ({
9
9
  label: C,
@@ -31,19 +31,19 @@ const ie = le(
31
31
  ...L
32
32
  }, O) => {
33
33
  const [g, S] = v(!1), [Q, W] = v(""), [R, T] = v(!1), B = N ?? Q, o = w === "password", b = H && !!B && !f, y = c && u === "left", j = c && u === "right" || r || o, U = j || b, V = h(() => {
34
- let s = 0;
35
- return b && (s += 1), o ? (s += 1, r && (s += 1), s) : (r && (s += 1), c && u === "right" && (s += 1), s);
36
- }, [b, o, r, c, u]), X = (s) => {
37
- S(!0), _?.(s);
38
- }, Y = (s) => {
39
- S(!1), D?.(s);
40
- }, Z = (s) => {
41
- let m = s.target.value;
42
- w === "number" && x && m.length > x && (m = m.slice(0, x), s.target.value = m), N === void 0 && W(m), P?.(s);
43
- }, $ = () => T((s) => !s), q = () => {
34
+ let n = 0;
35
+ return b && (n += 1), o ? (n += 1, r && (n += 1), n) : (r && (n += 1), c && u === "right" && (n += 1), n);
36
+ }, [b, o, r, c, u]), X = (n) => {
37
+ S(!0), _?.(n);
38
+ }, Y = (n) => {
39
+ S(!1), D?.(n);
40
+ }, Z = (n) => {
41
+ let m = n.target.value;
42
+ w === "number" && x && m.length > x && (m = m.slice(0, x), n.target.value = m), N === void 0 && W(m), P?.(n);
43
+ }, $ = () => T((n) => !n), q = () => {
44
44
  N === void 0 && W(""), G?.();
45
- }, n = h(
46
- () => se(!!y, !!j),
45
+ }, s = h(
46
+ () => ne(!!y, !!j),
47
47
  [y, j]
48
48
  ), k = h(() => ae(i, a), [i, a]), d = h(
49
49
  () => re(f, i, g, a),
@@ -60,7 +60,7 @@ const ie = le(
60
60
  className: e(
61
61
  "mb-2 block text-base font-medium",
62
62
  i ? a ? "text-red-500" : "text-red-600" : a ? "text-neutral-50" : "text-slate-700",
63
- n[t].labelFont
63
+ s[t].labelFont
64
64
  ),
65
65
  children: [
66
66
  C,
@@ -86,13 +86,13 @@ const ie = le(
86
86
  placeholder: E,
87
87
  step: J,
88
88
  className: e(
89
- "w-full border font-normal transition-all duration-300 ease-in-out outline-none",
89
+ "w-full border font-normal transition-all duration-300 ease-in-out outline-none cursor-text",
90
90
  t === "base" ? "rounded-xl" : "rounded-lg",
91
91
  a ? "text-neutral-50 placeholder:text-neutral-100 disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-300 disabled:text-neutral-100/50 disabled:placeholder:text-neutral-100/50" : "bg-white disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
92
92
  a && g && !f && "text-white",
93
93
  "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
94
- n[t].input,
95
- n[t].padding,
94
+ s[t].input,
95
+ s[t].padding,
96
96
  M,
97
97
  k
98
98
  ),
@@ -105,14 +105,14 @@ const ie = le(
105
105
  className: e(
106
106
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center",
107
107
  "transition-all duration-300",
108
- n[t].leftIcon,
108
+ s[t].leftIcon,
109
109
  d
110
110
  ),
111
111
  children: /* @__PURE__ */ l(
112
112
  "div",
113
113
  {
114
- className: e("flex items-center justify-center", n[t].iconWrapper),
115
- children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", n[t].icon), children: c })
114
+ className: e("flex items-center justify-center", s[t].iconWrapper),
115
+ children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", s[t].icon), children: c })
116
116
  }
117
117
  )
118
118
  }
@@ -123,7 +123,7 @@ const ie = le(
123
123
  className: e(
124
124
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center gap-2",
125
125
  "transition-all duration-300",
126
- n[t].rightIcon
126
+ s[t].rightIcon
127
127
  ),
128
128
  children: [
129
129
  b && /* @__PURE__ */ l(
@@ -133,22 +133,22 @@ const ie = le(
133
133
  onClick: q,
134
134
  className: e(
135
135
  "flex cursor-pointer items-center justify-center",
136
- n[t].iconWrapper,
136
+ s[t].iconWrapper,
137
137
  a ? "text-neutral-100 hover:text-white" : "text-slate-base hover:text-black"
138
138
  ),
139
- children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", n[t].icon), children: /* @__PURE__ */ l(ne, { className: e("h-full w-full") }) })
139
+ children: /* @__PURE__ */ l("span", { className: e("flex items-center justify-center", s[t].icon), children: /* @__PURE__ */ l(se, { className: e("h-full w-full") }) })
140
140
  }
141
141
  ),
142
142
  r && !o && /* @__PURE__ */ l(
143
143
  "div",
144
144
  {
145
- className: e("flex items-center justify-center", n[t].iconWrapper),
145
+ className: e("flex items-center justify-center", s[t].iconWrapper),
146
146
  children: /* @__PURE__ */ l(
147
147
  "span",
148
148
  {
149
149
  className: e(
150
150
  "flex items-center justify-center",
151
- n[t].icon,
151
+ s[t].icon,
152
152
  d
153
153
  ),
154
154
  children: r
@@ -162,14 +162,14 @@ const ie = le(
162
162
  {
163
163
  className: e(
164
164
  "flex items-center justify-center",
165
- n[t].iconWrapper
165
+ s[t].iconWrapper
166
166
  ),
167
167
  children: /* @__PURE__ */ l(
168
168
  "span",
169
169
  {
170
170
  className: e(
171
171
  "flex items-center justify-center",
172
- n[t].icon,
172
+ s[t].icon,
173
173
  d
174
174
  ),
175
175
  children: r
@@ -184,13 +184,13 @@ const ie = le(
184
184
  onClick: $,
185
185
  className: e(
186
186
  "flex cursor-pointer items-center justify-center",
187
- n[t].iconWrapper,
187
+ s[t].iconWrapper,
188
188
  d
189
189
  ),
190
190
  children: /* @__PURE__ */ l(
191
191
  "span",
192
192
  {
193
- className: e("flex items-center justify-center", n[t].icon),
193
+ className: e("flex items-center justify-center", s[t].icon),
194
194
  children: R ? /* @__PURE__ */ l(ee, { weight: "Linear", className: e("h-full w-full") }) : /* @__PURE__ */ l(te, { weight: "Linear", className: e("h-full w-full") })
195
195
  }
196
196
  )
@@ -200,13 +200,13 @@ const ie = le(
200
200
  c && u === "right" && !o && /* @__PURE__ */ l(
201
201
  "div",
202
202
  {
203
- className: e("flex items-center justify-center", n[t].iconWrapper),
203
+ className: e("flex items-center justify-center", s[t].iconWrapper),
204
204
  children: /* @__PURE__ */ l(
205
205
  "span",
206
206
  {
207
207
  className: e(
208
208
  "flex items-center justify-center",
209
- n[t].icon,
209
+ s[t].icon,
210
210
  d
211
211
  ),
212
212
  children: c
@@ -1,12 +1,12 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { AltArrowDown as L, AltArrowLeft as z, MenuDots as E, AltArrowRight as S } from "@solar-icons/react";
3
- import { useMemo as T } from "react";
2
+ import { AltArrowDown as E, AltArrowLeft as P, MenuDots as T, AltArrowRight as F } from "@solar-icons/react";
3
+ import { useMemo as _ } from "react";
4
4
  import { cn as r } from "../../lib/utils.js";
5
- import { createPageRange as F } from "./mci-pagination.utils.js";
6
- const _ = {
5
+ import { createPageRange as G } from "./mci-pagination.utils.js";
6
+ const O = {
7
7
  medium: "h-9 text-sm",
8
8
  large: "h-10 text-base"
9
- }, G = {
9
+ }, R = {
10
10
  yellow: {
11
11
  active: "bg-yellow-500 text-white border-yellow-500",
12
12
  inactive: "bg-slate-100 border-slate-200 text-black hover:bg-slate-200",
@@ -38,26 +38,26 @@ const _ = {
38
38
  darkArrow: "text-neutral-50"
39
39
  }
40
40
  };
41
- function P({
41
+ function J({
42
42
  totalItems: c,
43
43
  currentPage: m,
44
44
  perPage: b,
45
45
  onPageChange: u,
46
46
  onPerPageChange: h,
47
- siblingCount: x = 1,
48
- perPageOptions: N = [10, 30, 50, 100],
49
- showPerPage: k = !0,
50
- variant: y = "orange",
51
- size: g = "large",
47
+ siblingCount: g = 1,
48
+ perPageOptions: y = [10, 30, 50, 100],
49
+ showPerPage: C = !0,
50
+ variant: I = "orange",
51
+ size: x = "large",
52
52
  darkMode: e = !1,
53
- paginationClassName: I
53
+ paginationClassName: j
54
54
  }) {
55
- const w = Number.isFinite(c) && c > 0 ? c : 0, v = Number.isFinite(b) && b > 0 ? b : 10, l = Math.max(1, Number.isFinite(m) ? m : 1), i = Math.ceil(w / v), j = T(() => F(l, x, i), [l, x, i]), s = _[g], n = G[y ?? "yellow"], C = e ? n.darkActive : n.active, D = e ? n.darkInactive : n.inactive, f = e ? n.darkDisabled : n.disabled, p = e ? n.darkArrow : n.arrow;
56
- return i <= 1 || w === 0 ? null : /* @__PURE__ */ o("div", { className: r(
55
+ const w = Number.isFinite(c) && c > 0 ? c : 0, v = Number.isFinite(b) && b > 0 ? b : 10, i = Math.max(1, Math.ceil(w / v)), D = Number.isFinite(m) ? m : 1, l = Math.min(Math.max(1, D), i), f = C && typeof h == "function", p = i > 1, S = _(() => G(l, g, i), [l, g, i]), s = O[x], n = R[I ?? "yellow"], L = e ? n.darkActive : n.active, z = e ? n.darkInactive : n.inactive, N = e ? n.darkDisabled : n.disabled, A = e ? n.darkArrow : n.arrow;
56
+ return w === 0 || !f && !p ? null : /* @__PURE__ */ o("div", { className: r(
57
57
  "flex items-center justify-between gap-4 w-full",
58
- I
58
+ j
59
59
  ), children: [
60
- k && h && /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
60
+ f && /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
61
61
  /* @__PURE__ */ t(
62
62
  "span",
63
63
  {
@@ -73,18 +73,18 @@ function P({
73
73
  "select",
74
74
  {
75
75
  value: v,
76
- onChange: (a) => h(Number(a.target.value)),
76
+ onChange: (a) => h?.(Number(a.target.value)),
77
77
  className: r(
78
78
  "appearance-none rounded-lg border pl-3 pr-8 text-base font-medium focus:outline-none cursor-pointer",
79
79
  e ? "border-neutral-200 bg-neutral-300 text-white" : "border-slate-200 bg-white text-black",
80
- g === "large" ? "h-10" : "h-9"
80
+ x === "large" ? "h-10" : "h-9"
81
81
  ),
82
82
  "aria-label": "Количество строк на странице",
83
- children: N.map((a) => /* @__PURE__ */ t("option", { value: a, children: a }, a))
83
+ children: y.map((a) => /* @__PURE__ */ t("option", { value: a, children: a }, a))
84
84
  }
85
85
  ),
86
86
  /* @__PURE__ */ t(
87
- L,
87
+ E,
88
88
  {
89
89
  className: r(
90
90
  "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",
@@ -96,7 +96,7 @@ function P({
96
96
  )
97
97
  ] })
98
98
  ] }),
99
- /* @__PURE__ */ o("nav", { "aria-label": "Пагинация", className: "flex items-center gap-1 shrink-0 whitespace-nowrap", children: [
99
+ p && /* @__PURE__ */ o("nav", { "aria-label": "Пагинация", className: "flex items-center gap-1 shrink-0 whitespace-nowrap", children: [
100
100
  /* @__PURE__ */ t(
101
101
  "button",
102
102
  {
@@ -107,12 +107,12 @@ function P({
107
107
  "flex items-center justify-center rounded-lg border transition-all min-w-10",
108
108
  e ? "bg-neutral-300 border-neutral-200" : "bg-slate-100",
109
109
  s,
110
- l === 1 ? r("cursor-not-allowed opacity-50", f) : r("hover:cursor-pointer", p, e ? "hover:bg-neutral-200" : "border-slate-200")
110
+ l === 1 ? r("cursor-not-allowed opacity-50", N) : r("cursor-pointer", A, e ? "hover:bg-neutral-200" : "border-slate-200")
111
111
  ),
112
- children: /* @__PURE__ */ t(z, { weight: "Linear", size: 20 })
112
+ children: /* @__PURE__ */ t(P, { weight: "Linear", size: 20 })
113
113
  }
114
114
  ),
115
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: j.map((a, A) => {
115
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1", children: S.map((a, k) => {
116
116
  if (a === "...")
117
117
  return /* @__PURE__ */ t(
118
118
  "span",
@@ -123,9 +123,9 @@ function P({
123
123
  s
124
124
  ),
125
125
  "aria-hidden": "true",
126
- children: /* @__PURE__ */ t(E, { weight: "Bold", size: 20 })
126
+ children: /* @__PURE__ */ t(T, { weight: "Bold", size: 20 })
127
127
  },
128
- A
128
+ k
129
129
  );
130
130
  const d = a === l;
131
131
  return /* @__PURE__ */ t(
@@ -135,13 +135,13 @@ function P({
135
135
  "aria-label": `Страница ${a}${d ? ", текущая" : ""}`,
136
136
  "aria-current": d ? "page" : void 0,
137
137
  className: r(
138
- "flex items-center justify-center rounded-lg border font-medium transition-all hover:cursor-pointer min-w-10 px-2",
138
+ "flex cursor-pointer items-center justify-center rounded-lg border font-medium transition-all min-w-10 px-2",
139
139
  s,
140
- d ? C : D
140
+ d ? L : z
141
141
  ),
142
142
  children: a
143
143
  },
144
- A
144
+ k
145
145
  );
146
146
  }) }),
147
147
  /* @__PURE__ */ t(
@@ -154,14 +154,14 @@ function P({
154
154
  "flex items-center justify-center rounded-lg border transition-all min-w-10",
155
155
  e ? "bg-neutral-300 border-neutral-200" : "bg-slate-100",
156
156
  s,
157
- l === i ? r("cursor-not-allowed opacity-50", f) : r("hover:cursor-pointer", p, e ? "hover:bg-neutral-200" : "border-slate-200")
157
+ l === i ? r("cursor-not-allowed opacity-50", N) : r("cursor-pointer", A, e ? "hover:bg-neutral-200" : "border-slate-200")
158
158
  ),
159
- children: /* @__PURE__ */ t(S, { size: 20, weight: "Linear" })
159
+ children: /* @__PURE__ */ t(F, { size: 20, weight: "Linear" })
160
160
  }
161
161
  )
162
162
  ] })
163
163
  ] });
164
164
  }
165
165
  export {
166
- P as default
166
+ J as default
167
167
  };
@@ -1,4 +1,4 @@
1
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as I, useState as L, useMemo as h } from "react";
3
3
  import { cn as n } from "../../lib/utils.js";
4
4
  import { Phone as V } from "@solar-icons/react";
@@ -10,64 +10,64 @@ const W = I(
10
10
  size: u = "base",
11
11
  darkMode: e = !1,
12
12
  error: t,
13
- disabled: s = !1,
13
+ disabled: a = !1,
14
14
  required: b = !1,
15
- value: o = "",
16
- onChange: c,
15
+ value: i = "",
16
+ onChange: r,
17
17
  onFocus: g,
18
18
  onBlur: N,
19
19
  className: P,
20
20
  name: _,
21
21
  showIcon: m = !1
22
22
  }, w) => {
23
- const [i, f] = L(!1), y = (B) => {
23
+ const [o, f] = L(!1), y = (B) => {
24
24
  const x = B.target.value;
25
25
  if (x.length < 5) {
26
- c?.("+998");
26
+ r?.("+998");
27
27
  return;
28
28
  }
29
29
  const E = R(x);
30
- c?.(E);
30
+ r?.(E);
31
31
  }, S = () => {
32
- f(!0), (!o || o === "") && c?.("+998"), g?.();
32
+ f(!0), (!i || i === "") && r?.("+998"), g?.();
33
33
  }, F = () => {
34
34
  f(!1), N?.();
35
35
  }, l = z[u], j = m ? l.iconPadding : l.defaultPadding, v = h(() => H(t, e), [t, e]), C = h(
36
- () => O(s, t, i, e),
37
- [t, i, s, e]
36
+ () => O(a, t, o, e),
37
+ [t, o, a, e]
38
38
  );
39
- return /* @__PURE__ */ r("div", { className: n("w-full", P), children: [
40
- d && /* @__PURE__ */ r("label", { className: n(
39
+ return /* @__PURE__ */ c("div", { className: n("w-full", P), children: [
40
+ d && /* @__PURE__ */ c("label", { className: n(
41
41
  "mb-2 block font-medium transition-colors duration-200",
42
- t ? e ? "text-red-500" : "text-red-600" : e ? "text-neutral-50" : i ? "text-blue-600" : "text-slate-700",
42
+ t ? e ? "text-red-500" : "text-red-600" : e ? "text-neutral-50" : o ? "text-blue-600" : "text-slate-700",
43
43
  l.labelFont
44
44
  ), children: [
45
45
  d,
46
- b && /* @__PURE__ */ a("span", { className: "text-red-600 ml-1", children: "*" })
46
+ b && /* @__PURE__ */ s("span", { className: "text-red-600 ml-1", children: "*" })
47
47
  ] }),
48
- /* @__PURE__ */ r("div", { className: "relative flex items-center", children: [
49
- m && /* @__PURE__ */ a("div", { className: n(
48
+ /* @__PURE__ */ c("div", { className: "relative flex items-center", children: [
49
+ m && /* @__PURE__ */ s("div", { className: n(
50
50
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center transition-all duration-300",
51
51
  l.iconLeft,
52
52
  C
53
- ), children: /* @__PURE__ */ a("div", { className: n("flex items-center justify-center", l.iconWrapper), children: /* @__PURE__ */ a(V, { className: n(l.iconSize), weight: "Linear" }) }) }),
54
- /* @__PURE__ */ a(
53
+ ), children: /* @__PURE__ */ s("div", { className: n("flex items-center justify-center", l.iconWrapper), children: /* @__PURE__ */ s(V, { className: n(l.iconSize), weight: "Linear" }) }) }),
54
+ /* @__PURE__ */ s(
55
55
  "input",
56
56
  {
57
57
  ref: w,
58
58
  name: _,
59
59
  type: "tel",
60
- value: o,
60
+ value: i,
61
61
  onChange: y,
62
62
  onFocus: S,
63
63
  onBlur: F,
64
- disabled: s,
64
+ disabled: a,
65
65
  placeholder: p,
66
66
  className: n(
67
- "w-full border font-normal transition-all duration-300 outline-none",
67
+ "w-full border font-normal transition-all duration-300 outline-none cursor-text",
68
68
  u === "base" ? "rounded-xl" : "rounded-lg",
69
69
  e ? "text-neutral-50 placeholder:text-neutral-100 disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-300 disabled:text-neutral-100/50 disabled:placeholder:text-neutral-100/50" : "bg-white disabled:bg-slate-100 disabled:text-slate-400 disabled:cursor-not-allowed",
70
- e && i && !s && "text-white",
70
+ e && o && !a && "text-white",
71
71
  l.input,
72
72
  j,
73
73
  v
@@ -75,7 +75,7 @@ const W = I(
75
75
  }
76
76
  )
77
77
  ] }),
78
- t && /* @__PURE__ */ a("p", { className: n(
78
+ t && /* @__PURE__ */ s("p", { className: n(
79
79
  "mt-2 animate-slide-up text-sm font-normal",
80
80
  e ? "text-red-500" : "text-red-600"
81
81
  ), children: t })
@@ -314,7 +314,7 @@ const Ze = $e(
314
314
  }
315
315
  )
316
316
  ] }),
317
- /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: H.monthsShort.map((e, t) => /* @__PURE__ */ r("button", { type: "button", onClick: () => Fe(t), className: a("py-3 rounded-lg text-sm font-semibold transition-colors hover:cursor-pointer", m.getMonth() === t ? "bg-blue-600 text-white" : l ? "text-neutral-50 hover:bg-neutral-300 hover:text-white" : "text-slate-600 hover:bg-blue-50"), children: e }, e)) })
317
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: H.monthsShort.map((e, t) => /* @__PURE__ */ r("button", { type: "button", onClick: () => Fe(t), className: a("cursor-pointer py-3 rounded-lg text-sm font-semibold transition-colors", m.getMonth() === t ? "bg-blue-600 text-white" : l ? "text-neutral-50 hover:bg-neutral-300 hover:text-white" : "text-slate-600 hover:bg-blue-50"), children: e }, e)) })
318
318
  ] }), Ee = () => {
319
319
  const e = Math.floor(m.getFullYear() / 12) * 12 + we * 12, t = Array.from({ length: 12 }, (n, i) => e + i);
320
320
  return /* @__PURE__ */ h("div", { className: "w-[300px] p-3", children: [
@@ -349,7 +349,7 @@ const Ze = $e(
349
349
  }
350
350
  )
351
351
  ] }),
352
- /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: t.map((n) => /* @__PURE__ */ r("button", { type: "button", onClick: () => Ye(n), className: a("py-3 rounded-lg text-sm font-semibold transition-colors hover:cursor-pointer", m.getFullYear() === n ? "bg-blue-600 text-white" : l ? "text-neutral-50 hover:bg-neutral-300 hover:text-white" : "text-slate-600 hover:bg-blue-50"), children: n }, n)) })
352
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: t.map((n) => /* @__PURE__ */ r("button", { type: "button", onClick: () => Ye(n), className: a("cursor-pointer py-3 rounded-lg text-sm font-semibold transition-colors", m.getFullYear() === n ? "bg-blue-600 text-white" : l ? "text-neutral-50 hover:bg-neutral-300 hover:text-white" : "text-slate-600 hover:bg-blue-50"), children: n }, n)) })
353
353
  ] });
354
354
  }, ce = /* @__PURE__ */ r(
355
355
  "div",