@mci-ui/mci-ui 0.0.94 → 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 +205 -194
  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 +2 -0
  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,9 +1,9 @@
1
- import { jsx as a, jsxs as w } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as k } from "react/jsx-runtime";
2
2
  import { ClockCircle as De } from "@solar-icons/react";
3
- import { forwardRef as Me, useState as y, useRef as Pe, useMemo as $e, useCallback as k, useEffect as Q } from "react";
4
- import { useClickOutside as Se, useEscapeKey as Te, cn as g } from "../../lib/utils.js";
5
- import Ee from "../mciInput/MciInput.js";
6
- const c = (o) => o.toString().padStart(2, "0"), T = 31, ee = {
3
+ import { forwardRef as Me, useState as x, useRef as Pe, useMemo as Se, useCallback as C, useEffect as F } from "react";
4
+ import { useClickOutside as Te, useEscapeKey as Ee, cn as p } from "../../lib/utils.js";
5
+ import Oe from "../mciInput/MciInput.js";
6
+ const c = (u) => u.toString().padStart(2, "0"), E = 31, te = {
7
7
  en: {
8
8
  day: "Day",
9
9
  hour: "Hour",
@@ -31,7 +31,7 @@ const c = (o) => o.toString().padStart(2, "0"), T = 31, ee = {
31
31
  durationPlaceholder: "Дни, часы, минуты",
32
32
  units: { day: "дн", hour: "ч", minute: "мин" }
33
33
  }
34
- }, Oe = {
34
+ }, Le = {
35
35
  blue: {
36
36
  button: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-[rgba(21,93,252,0.25)]",
37
37
  darkButton: "bg-blue-500 text-black hover:bg-blue-400 focus:ring-blue-500/35",
@@ -53,338 +53,349 @@ const c = (o) => o.toString().padStart(2, "0"), T = 31, ee = {
53
53
  darkStep: "text-orange-300 hover:bg-orange-500/10",
54
54
  input: "focus:border-orange-500 focus:ring-orange-500/20"
55
55
  }
56
- }, Le = (o, i) => `${c(o)}:${c(i)}`, Be = (o, i, e, r) => {
57
- const { units: s } = ee[r];
58
- return `${c(o)} ${s.day} ${c(i)} ${s.hour} ${c(e)} ${s.minute}`;
59
- }, ze = (o, i, e, r, s) => o === "duration" ? Be(i, e, r, s) : Le(e, r), V = (o, i, e, r, s) => o === "duration" && i === 0 && e === 0 && r === 0 ? null : ze(o, i, e, r, s), Z = (o, i, e, r, s) => V(o, i, e, r, s) ?? "", R = (o, i) => {
60
- if (!o) return null;
61
- const e = o.replace(/\D/g, "");
56
+ }, Be = (u, i) => `${c(u)}:${c(i)}`, ze = (u, i, e, o, r = "text") => {
57
+ if (r === "dot")
58
+ return `${c(u)}.${c(i)}.${c(e)}`;
59
+ const { units: s } = te[o];
60
+ return `${c(u)} ${s.day} ${c(i)} ${s.hour} ${c(e)} ${s.minute}`;
61
+ }, Re = (u, i, e, o, r, s = "text") => u === "duration" ? ze(i, e, o, r, s) : Be(e, o), A = (u, i, e, o, r, s = "text") => u === "duration" && i === 0 && e === 0 && o === 0 ? null : Re(u, i, e, o, r, s), ee = (u, i, e, o, r, s = "text") => A(u, i, e, o, r, s) ?? "", V = (u, i) => {
62
+ if (!u) return null;
63
+ const e = u.replace(/\D/g, "");
62
64
  if (i === "duration") {
63
65
  if (e.length !== 6) return null;
64
- const C = Number.parseInt(e.slice(0, 2), 10), D = Number.parseInt(e.slice(2, 4), 10), d = Number.parseInt(e.slice(4, 6), 10);
65
- return C < 0 || C > T || D < 0 || D > 23 || d < 0 || d > 59 ? null : { days: C, hours: D, minutes: d };
66
+ const s = Number.parseInt(e.slice(0, 2), 10), $ = Number.parseInt(e.slice(2, 4), 10), D = Number.parseInt(e.slice(4, 6), 10);
67
+ return s < 0 || s > E || $ < 0 || $ > 23 || D < 0 || D > 59 ? null : { days: s, hours: $, minutes: D };
66
68
  }
67
69
  if (e.length !== 4) return null;
68
- const r = Number.parseInt(e.slice(0, 2), 10), s = Number.parseInt(e.slice(2, 4), 10);
69
- return r < 0 || r > 23 || s < 0 || s > 59 ? null : { days: 0, hours: r, minutes: s };
70
- }, Re = (o, i, e) => {
71
- const r = o.replace(/\D/g, "").slice(0, i === "duration" ? 6 : 4);
70
+ const o = Number.parseInt(e.slice(0, 2), 10), r = Number.parseInt(e.slice(2, 4), 10);
71
+ return o < 0 || o > 23 || r < 0 || r > 59 ? null : { days: 0, hours: o, minutes: r };
72
+ }, Ve = (u, i, e, o = "text") => {
73
+ const r = u.replace(/\D/g, "").slice(0, i === "duration" ? 6 : 4);
72
74
  if (i === "duration") {
73
- const { units: s } = ee[e];
75
+ if (o === "dot")
76
+ return r.length > 4 ? `${r.slice(0, 2)}.${r.slice(2, 4)}.${r.slice(4)}` : r.length > 2 ? `${r.slice(0, 2)}.${r.slice(2)}` : r;
77
+ const { units: s } = te[e];
74
78
  return r.length > 4 ? `${r.slice(0, 2)} ${s.day} ${r.slice(2, 4)} ${s.hour} ${r.slice(4)}` : r.length > 2 ? `${r.slice(0, 2)} ${s.day} ${r.slice(2)}` : r;
75
79
  }
76
80
  return r.length > 2 ? `${r.slice(0, 2)}:${r.slice(2)}` : r;
77
- }, Ve = Me(
81
+ }, Ae = Me(
78
82
  ({
79
- value: o,
83
+ value: u,
80
84
  onChange: i,
81
85
  mode: e = "time",
86
+ durationFormat: o = "text",
82
87
  variant: r = "orange",
83
88
  locale: s = "en",
84
- placeholder: C,
89
+ placeholder: $,
85
90
  label: D,
86
- darkMode: d = !1,
87
- disabled: E = !1,
88
- required: le = !1,
89
- className: ce,
91
+ darkMode: b = !1,
92
+ disabled: O = !1,
93
+ required: ce = !1,
94
+ className: he,
90
95
  error: de,
91
- showClear: he = !0,
92
- allowManualInput: O = !0,
93
- iconPosition: te = "left",
94
- size: me = "base",
95
- minuteStep: fe = 1,
96
- align: A = "auto"
96
+ showClear: me = !0,
97
+ allowManualInput: L = !0,
98
+ iconPosition: ne = "left",
99
+ size: fe = "base",
100
+ minuteStep: ge = 1,
101
+ align: K = "auto"
97
102
  }, pe) => {
98
- const [h, K] = y(!1), [ge, be] = y(null), [ne, b] = y(""), [F, re] = y(!1), [_, se] = y(A), [H, M] = y("00"), [j, P] = y("00"), [W, $] = y("00"), L = Pe(null), B = o !== void 0 ? o : ge, l = $e(() => R(B, e), [B, e]), oe = Math.min(Math.max(Math.floor(fe) || 1, 1), 59), v = ee[s], S = Oe[r], ye = C ?? (e === "duration" ? v.durationPlaceholder : v.timePlaceholder), N = k(
103
+ const [d, _] = x(!1), [be, ye] = x(null), [re, y] = x(""), [H, se] = x(!1), [j, oe] = x(K), [W, M] = x("00"), [U, P] = x("00"), [X, S] = x("00"), B = Pe(null), z = u !== void 0 ? u : be, h = Se(() => V(z, e), [z, e]), ue = Math.min(Math.max(Math.floor(ge) || 1, 1), 59), v = te[s], T = Le[r], xe = $ ?? (e === "duration" ? v.durationPlaceholder : v.timePlaceholder), N = C(
99
104
  (n) => {
100
- o === void 0 && be(n), i?.(n);
105
+ u === void 0 && ye(n), i?.(n);
101
106
  },
102
- [i, o]
103
- ), ue = k(() => {
104
- const n = R(B, e);
105
- M(c(n?.days ?? 0)), P(c(n?.hours ?? 0)), $(c(n?.minutes ?? 0));
106
- }, [B, e]), U = k(() => {
107
- E || (ue(), K(!0));
108
- }, [E, ue]), z = k(() => {
109
- K(!1), b(
110
- l ? Z(
107
+ [i, u]
108
+ ), ie = C(() => {
109
+ const n = V(z, e);
110
+ M(c(n?.days ?? 0)), P(c(n?.hours ?? 0)), S(c(n?.minutes ?? 0));
111
+ }, [z, e]), Y = C(() => {
112
+ O || (ie(), _(!0));
113
+ }, [O, ie]), R = C(() => {
114
+ _(!1), y(
115
+ h ? ee(
111
116
  e,
112
- l.days,
113
- l.hours,
114
- l.minutes,
115
- s
117
+ h.days,
118
+ h.hours,
119
+ h.minutes,
120
+ s,
121
+ o
116
122
  ) : ""
117
123
  );
118
- }, [l, s, e]), Ne = k(
124
+ }, [h, o, s, e]), Ne = C(
119
125
  (n) => {
120
- n.preventDefault(), n.stopPropagation(), h ? z() : U();
126
+ n.preventDefault(), n.stopPropagation(), d ? R() : Y();
121
127
  },
122
- [z, h, U]
123
- ), { handleClick: X } = Se(L, z), { handleEscape: Y } = Te(z);
124
- Q(() => {
125
- !h && !F && b(
126
- l ? Z(
128
+ [R, d, Y]
129
+ ), { handleClick: q } = Te(B, R), { handleEscape: G } = Ee(R);
130
+ F(() => {
131
+ !d && !H && y(
132
+ h ? ee(
127
133
  e,
128
- l.days,
129
- l.hours,
130
- l.minutes,
131
- s
134
+ h.days,
135
+ h.hours,
136
+ h.minutes,
137
+ s,
138
+ o
132
139
  ) : ""
133
140
  );
134
- }, [l, F, h, s, e]), Q(() => {
135
- if (h && A === "auto" && L.current) {
136
- const n = L.current.getBoundingClientRect(), u = window.innerWidth - n.right, t = n.left, f = e === "duration" ? 316 : 220;
137
- u < f && t > f ? se("right") : se("left");
141
+ }, [h, o, H, d, s, e]), F(() => {
142
+ if (d && K === "auto" && B.current) {
143
+ const n = B.current.getBoundingClientRect(), a = window.innerWidth - n.right, t = n.left, f = e === "duration" ? 316 : 220;
144
+ a < f && t > f ? oe("right") : oe("left");
138
145
  }
139
- }, [A, h, e]), Q(() => {
140
- if (h)
141
- return document.addEventListener("mousedown", X), document.addEventListener("keydown", Y), () => {
142
- document.removeEventListener("mousedown", X), document.removeEventListener("keydown", Y);
146
+ }, [K, d, e]), F(() => {
147
+ if (d)
148
+ return document.addEventListener("mousedown", q), document.addEventListener("keydown", G), () => {
149
+ document.removeEventListener("mousedown", q), document.removeEventListener("keydown", G);
143
150
  };
144
- }, [X, Y, h]);
151
+ }, [q, G, d]);
145
152
  const ve = () => {
146
- re(!0), O || U();
147
- }, xe = () => {
148
- if (re(!1), !O) return;
149
- const n = ne.trim();
153
+ se(!0), L || Y();
154
+ }, Ie = () => {
155
+ if (se(!1), !L) return;
156
+ const n = re.trim();
150
157
  if (!n) {
151
158
  N(null);
152
159
  return;
153
160
  }
154
- const u = R(n, e);
155
- if (u) {
156
- const t = V(
161
+ const a = V(n, e);
162
+ if (a) {
163
+ const t = A(
157
164
  e,
158
- u.days,
159
- u.hours,
160
- u.minutes,
161
- s
165
+ a.days,
166
+ a.hours,
167
+ a.minutes,
168
+ s,
169
+ o
162
170
  );
163
- N(t), b(t ?? "");
171
+ N(t), y(t ?? "");
164
172
  return;
165
173
  }
166
- b(
167
- l ? Z(
174
+ y(
175
+ h ? ee(
168
176
  e,
169
- l.days,
170
- l.hours,
171
- l.minutes,
172
- s
177
+ h.days,
178
+ h.hours,
179
+ h.minutes,
180
+ s,
181
+ o
173
182
  ) : ""
174
183
  );
175
- }, Ie = (n) => {
176
- if (!O) return;
177
- const u = Re(n.target.value, e, s), t = u.replace(/\D/g, "");
184
+ }, we = (n) => {
185
+ if (!L) return;
186
+ const a = Ve(n.target.value, e, s, o), t = a.replace(/\D/g, "");
178
187
  if (e === "duration") {
179
- if (t.length >= 1 && Number.parseInt(t[0] ?? "0", 10) > 3 || t.length >= 2 && Number.parseInt(t.slice(0, 2), 10) > T || t.length >= 3 && Number.parseInt(t[2] ?? "0", 10) > 2 || t.length >= 4 && Number.parseInt(t.slice(2, 4), 10) > 23 || t.length >= 5 && Number.parseInt(t[4] ?? "0", 10) > 5 || t.length >= 6 && Number.parseInt(t.slice(4, 6), 10) > 59)
188
+ if (t.length >= 1 && Number.parseInt(t[0] ?? "0", 10) > 3 || t.length >= 2 && Number.parseInt(t.slice(0, 2), 10) > E || t.length >= 3 && Number.parseInt(t[2] ?? "0", 10) > 2 || t.length >= 4 && Number.parseInt(t.slice(2, 4), 10) > 23 || t.length >= 5 && Number.parseInt(t[4] ?? "0", 10) > 5 || t.length >= 6 && Number.parseInt(t.slice(4, 6), 10) > 59)
180
189
  return;
181
190
  } else if (t.length >= 1 && Number.parseInt(t[0] ?? "0", 10) > 2 || t.length >= 2 && Number.parseInt(t.slice(0, 2), 10) > 23 || t.length >= 3 && Number.parseInt(t[2] ?? "0", 10) > 5 || t.length >= 4 && Number.parseInt(t.slice(2, 4), 10) > 59) return;
182
- b(u);
191
+ y(a);
183
192
  const f = e === "duration" ? 6 : 4;
184
193
  if (t.length === f) {
185
- const m = R(u, e);
194
+ const m = V(a, e);
186
195
  if (m) {
187
- const p = V(
196
+ const g = A(
188
197
  e,
189
198
  m.days,
190
199
  m.hours,
191
200
  m.minutes,
192
- s
201
+ s,
202
+ o
193
203
  );
194
- N(p), b(p ?? "");
204
+ N(g), y(g ?? "");
195
205
  }
196
- } else u === "" && N(null);
197
- }, we = k(() => {
198
- N(null), b(""), M("00"), P("00"), $("00");
199
- }, [N]), q = (n, u) => {
200
- const t = u.replace(/\D/g, "").slice(0, 2);
201
- n === "days" && t.length === 2 && Number.parseInt(t, 10) > T || n === "hours" && t.length === 2 && Number.parseInt(t, 10) > 23 || n === "minutes" && t.length === 2 && Number.parseInt(t, 10) > 59 || (n === "days" ? M(t) : n === "hours" ? P(t) : $(t));
202
- }, x = (n, u) => {
206
+ } else a === "" && N(null);
207
+ }, ke = C(() => {
208
+ N(null), y(""), M("00"), P("00"), S("00");
209
+ }, [N]), J = (n, a) => {
210
+ const t = a.replace(/\D/g, "").slice(0, 2);
211
+ n === "days" && t.length === 2 && Number.parseInt(t, 10) > E || n === "hours" && t.length === 2 && Number.parseInt(t, 10) > 23 || n === "minutes" && t.length === 2 && Number.parseInt(t, 10) > 59 || (n === "days" ? M(t) : n === "hours" ? P(t) : S(t));
212
+ }, I = (n, a) => {
203
213
  if (n === "days") {
204
- const m = Number.parseInt(H || "0", 10), p = Math.min(Math.max(m + u, 0), T);
205
- M(c(p));
214
+ const m = Number.parseInt(W || "0", 10), g = Math.min(Math.max(m + a, 0), E);
215
+ M(c(g));
206
216
  return;
207
217
  }
208
218
  if (n === "hours") {
209
- const p = (Number.parseInt(j || "0", 10) + u + 24) % 24;
210
- P(c(p));
219
+ const g = (Number.parseInt(U || "0", 10) + a + 24) % 24;
220
+ P(c(g));
211
221
  return;
212
222
  }
213
- const f = (Number.parseInt(W || "0", 10) + u + 60) % 60;
214
- $(c(f));
215
- }, ke = () => {
216
- const n = Number.parseInt(H || "0", 10), u = Number.parseInt(j || "0", 10), t = Number.parseInt(W || "0", 10), f = Math.min(Math.max(n, 0), T), m = Math.min(Math.max(u, 0), 23), p = Math.min(Math.max(t, 0), 59), ae = V(
223
+ const f = (Number.parseInt(X || "0", 10) + a + 60) % 60;
224
+ S(c(f));
225
+ }, Ce = () => {
226
+ const n = Number.parseInt(W || "0", 10), a = Number.parseInt(U || "0", 10), t = Number.parseInt(X || "0", 10), f = Math.min(Math.max(n, 0), E), m = Math.min(Math.max(a, 0), 23), g = Math.min(Math.max(t, 0), 59), le = A(
217
227
  e,
218
228
  f,
219
229
  m,
220
- p,
221
- s
230
+ g,
231
+ s,
232
+ o
222
233
  );
223
- N(ae), b(ae ?? ""), M(c(f)), P(c(m)), $(c(p)), K(!1);
224
- }, G = g(
234
+ N(le), y(le ?? ""), M(c(f)), P(c(m)), S(c(g)), _(!1);
235
+ }, Q = p(
225
236
  "mb-1 block text-center text-[11px] font-semibold leading-4",
226
- d ? "text-neutral-100" : "text-slate-500"
227
- ), I = g(
228
- "h-6 w-full rounded-md text-base font-semibold leading-none transition-colors hover:cursor-pointer",
229
- d ? S.darkStep : S.step
230
- ), J = g(
237
+ b ? "text-neutral-100" : "text-slate-500"
238
+ ), w = p(
239
+ "h-6 w-full cursor-pointer rounded-md text-base font-semibold leading-none transition-colors",
240
+ b ? T.darkStep : T.step
241
+ ), Z = p(
231
242
  "h-8 w-full rounded-md border px-1 text-center text-sm font-semibold outline-none transition-colors focus:ring-2",
232
- d ? "border-neutral-300 bg-[#1F2025]" : "border-slate-200 bg-white",
233
- S.input
234
- ), Ce = g(
235
- "mt-2 h-8 w-full rounded-md text-sm font-semibold transition-colors hover:cursor-pointer focus:ring-2",
236
- d ? S.darkButton : S.button
237
- ), ie = /* @__PURE__ */ a(
243
+ b ? "border-neutral-300 bg-[#1F2025]" : "border-slate-200 bg-white",
244
+ T.input
245
+ ), $e = p(
246
+ "mt-2 h-8 w-full cursor-pointer rounded-md text-sm font-semibold transition-colors focus:ring-2",
247
+ b ? T.darkButton : T.button
248
+ ), ae = /* @__PURE__ */ l(
238
249
  "div",
239
250
  {
240
251
  onClick: Ne,
241
- className: g(
252
+ className: p(
242
253
  "flex cursor-pointer items-center justify-center rounded-md p-1 transition-colors",
243
- E ? "pointer-events-none opacity-50" : d ? "hover:bg-neutral-300 active:bg-neutral-200" : "hover:bg-slate-100 active:bg-slate-200"
254
+ O ? "pointer-events-none opacity-50" : b ? "hover:bg-neutral-300 active:bg-neutral-200" : "hover:bg-slate-100 active:bg-slate-200"
244
255
  ),
245
- children: /* @__PURE__ */ a(
256
+ children: /* @__PURE__ */ l(
246
257
  De,
247
258
  {
248
259
  weight: "Linear",
249
260
  size: 20,
250
- className: g(
251
- d ? h || F ? "text-white" : "text-neutral-100" : "text-slate-400"
261
+ className: p(
262
+ b ? d || H ? "text-white" : "text-neutral-100" : "text-slate-400"
252
263
  )
253
264
  }
254
265
  )
255
266
  }
256
267
  );
257
- return /* @__PURE__ */ w("div", { ref: L, className: g("relative w-full group", ce), children: [
258
- /* @__PURE__ */ a("div", { ref: pe, children: /* @__PURE__ */ a(
259
- Ee,
268
+ return /* @__PURE__ */ k("div", { ref: B, className: p("relative w-full group", he), children: [
269
+ /* @__PURE__ */ l("div", { ref: pe, children: /* @__PURE__ */ l(
270
+ Oe,
260
271
  {
261
272
  label: D,
262
- placeholder: ye,
263
- value: ne,
264
- onChange: Ie,
265
- icon: te === "left" ? ie : void 0,
266
- rightIcon: te === "right" ? ie : void 0,
267
- disabled: E,
268
- required: le,
273
+ placeholder: xe,
274
+ value: re,
275
+ onChange: we,
276
+ icon: ne === "left" ? ae : void 0,
277
+ rightIcon: ne === "right" ? ae : void 0,
278
+ disabled: O,
279
+ required: ce,
269
280
  error: de,
270
- darkMode: d,
271
- size: me,
281
+ darkMode: b,
282
+ size: fe,
272
283
  maxLength: e === "duration" ? 24 : 5,
273
284
  onFocus: ve,
274
- onBlur: xe,
275
- readOnly: !O,
276
- showClearButton: he,
277
- onClear: we
285
+ onBlur: Ie,
286
+ readOnly: !L,
287
+ showClearButton: me,
288
+ onClear: ke
278
289
  }
279
290
  ) }),
280
- h && /* @__PURE__ */ w(
291
+ d && /* @__PURE__ */ k(
281
292
  "div",
282
293
  {
283
- className: g(
294
+ className: p(
284
295
  "absolute top-[calc(100%+4px)] z-100 rounded-lg border p-2.5 shadow-xl",
285
296
  "animate-in fade-in zoom-in-95 duration-200",
286
297
  e === "duration" ? "w-[300px]" : "w-52",
287
- d ? "border-neutral-200 bg-[#1F2025] text-neutral-50" : "border-slate-200 bg-white text-slate-700",
288
- _ === "right" && "right-0 origin-top-right",
289
- _ === "left" && "left-0 origin-top-left",
290
- _ === "center" && "left-1/2 -translate-x-1/2 origin-top"
298
+ b ? "border-neutral-200 bg-[#1F2025] text-neutral-50" : "border-slate-200 bg-white text-slate-700",
299
+ j === "right" && "right-0 origin-top-right",
300
+ j === "left" && "left-0 origin-top-left",
301
+ j === "center" && "left-1/2 -translate-x-1/2 origin-top"
291
302
  ),
292
303
  onMouseDown: (n) => n.stopPropagation(),
293
304
  children: [
294
- /* @__PURE__ */ w(
305
+ /* @__PURE__ */ k(
295
306
  "div",
296
307
  {
297
- className: g(
308
+ className: p(
298
309
  "grid gap-2",
299
310
  e === "duration" ? "grid-cols-3" : "grid-cols-2"
300
311
  ),
301
312
  children: [
302
- e === "duration" && /* @__PURE__ */ w("div", { className: "space-y-1", children: [
303
- /* @__PURE__ */ a("span", { className: G, children: v.day }),
304
- /* @__PURE__ */ a(
313
+ e === "duration" && /* @__PURE__ */ k("div", { className: "space-y-1", children: [
314
+ /* @__PURE__ */ l("span", { className: Q, children: v.day }),
315
+ /* @__PURE__ */ l(
305
316
  "button",
306
317
  {
307
318
  type: "button",
308
- onClick: () => x("days", 1),
309
- className: I,
319
+ onClick: () => I("days", 1),
320
+ className: w,
310
321
  children: "+"
311
322
  }
312
323
  ),
313
- /* @__PURE__ */ a(
324
+ /* @__PURE__ */ l(
314
325
  "input",
315
326
  {
316
- value: H,
317
- onChange: (n) => q("days", n.target.value),
318
- className: J,
327
+ value: W,
328
+ onChange: (n) => J("days", n.target.value),
329
+ className: Z,
319
330
  inputMode: "numeric"
320
331
  }
321
332
  ),
322
- /* @__PURE__ */ a(
333
+ /* @__PURE__ */ l(
323
334
  "button",
324
335
  {
325
336
  type: "button",
326
- onClick: () => x("days", -1),
327
- className: I,
337
+ onClick: () => I("days", -1),
338
+ className: w,
328
339
  children: "-"
329
340
  }
330
341
  )
331
342
  ] }),
332
- /* @__PURE__ */ w("div", { className: "space-y-1", children: [
333
- /* @__PURE__ */ a("span", { className: G, children: v.hour }),
334
- /* @__PURE__ */ a(
343
+ /* @__PURE__ */ k("div", { className: "space-y-1", children: [
344
+ /* @__PURE__ */ l("span", { className: Q, children: v.hour }),
345
+ /* @__PURE__ */ l(
335
346
  "button",
336
347
  {
337
348
  type: "button",
338
- onClick: () => x("hours", 1),
339
- className: I,
349
+ onClick: () => I("hours", 1),
350
+ className: w,
340
351
  children: "+"
341
352
  }
342
353
  ),
343
- /* @__PURE__ */ a(
354
+ /* @__PURE__ */ l(
344
355
  "input",
345
356
  {
346
- value: j,
347
- onChange: (n) => q("hours", n.target.value),
348
- className: J,
357
+ value: U,
358
+ onChange: (n) => J("hours", n.target.value),
359
+ className: Z,
349
360
  inputMode: "numeric"
350
361
  }
351
362
  ),
352
- /* @__PURE__ */ a(
363
+ /* @__PURE__ */ l(
353
364
  "button",
354
365
  {
355
366
  type: "button",
356
- onClick: () => x("hours", -1),
357
- className: I,
367
+ onClick: () => I("hours", -1),
368
+ className: w,
358
369
  children: "-"
359
370
  }
360
371
  )
361
372
  ] }),
362
- /* @__PURE__ */ w("div", { className: "space-y-1", children: [
363
- /* @__PURE__ */ a("span", { className: G, children: v.minute }),
364
- /* @__PURE__ */ a(
373
+ /* @__PURE__ */ k("div", { className: "space-y-1", children: [
374
+ /* @__PURE__ */ l("span", { className: Q, children: v.minute }),
375
+ /* @__PURE__ */ l(
365
376
  "button",
366
377
  {
367
378
  type: "button",
368
- onClick: () => x("minutes", oe),
369
- className: I,
379
+ onClick: () => I("minutes", ue),
380
+ className: w,
370
381
  children: "+"
371
382
  }
372
383
  ),
373
- /* @__PURE__ */ a(
384
+ /* @__PURE__ */ l(
374
385
  "input",
375
386
  {
376
- value: W,
377
- onChange: (n) => q("minutes", n.target.value),
378
- className: J,
387
+ value: X,
388
+ onChange: (n) => J("minutes", n.target.value),
389
+ className: Z,
379
390
  inputMode: "numeric"
380
391
  }
381
392
  ),
382
- /* @__PURE__ */ a(
393
+ /* @__PURE__ */ l(
383
394
  "button",
384
395
  {
385
396
  type: "button",
386
- onClick: () => x("minutes", -oe),
387
- className: I,
397
+ onClick: () => I("minutes", -ue),
398
+ className: w,
388
399
  children: "-"
389
400
  }
390
401
  )
@@ -392,12 +403,12 @@ const c = (o) => o.toString().padStart(2, "0"), T = 31, ee = {
392
403
  ]
393
404
  }
394
405
  ),
395
- /* @__PURE__ */ a(
406
+ /* @__PURE__ */ l(
396
407
  "button",
397
408
  {
398
409
  type: "button",
399
- onClick: ke,
400
- className: Ce,
410
+ onClick: Ce,
411
+ className: $e,
401
412
  children: v.ok
402
413
  }
403
414
  )
@@ -407,7 +418,7 @@ const c = (o) => o.toString().padStart(2, "0"), T = 31, ee = {
407
418
  ] });
408
419
  }
409
420
  );
410
- Ve.displayName = "MciTimePicker";
421
+ Ae.displayName = "MciTimePicker";
411
422
  export {
412
- Ve as default
423
+ Ae as default
413
424
  };