@namuna-nur/ui-kit 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { u as Hn, p as a, y as Gr, x as Jt, U as Dn, P as _e, z as Ln, v as Gn, J as Wr, q as Nr, _ as kr, a1 as Mr, C as Ht, e as w, L as ae, a2 as be, a3 as Ee, a4 as Re, B as T, a5 as ht, a6 as vt, a7 as qt, A as Wn, k as Pe, a8 as Zt, f as Nn, R as kn, S as ft, h as Kr, H as gt, a as Yr, a9 as Mn, I as Kn, M as Jr, aa as Zr, T as _r } from "./Avatar.tokens.js";
1
+ import { u as Hn, p as a, y as Gr, x as Jt, U as Dn, P as _e, z as Ln, v as Gn, J as Wr, q as Nr, _ as kr, a1 as Mr, C as Ht, e as w, L as ae, a2 as be, a3 as Ee, a4 as Re, B as F, a5 as ht, a6 as vt, a7 as qt, A as Wn, k as Pe, a8 as Zt, f as Nn, R as kn, S as ft, h as Kr, H as gt, a as Yr, a9 as Mn, I as Kn, M as Jr, aa as Zr, T as _r } from "./Avatar.tokens.js";
2
2
  import * as A from "react";
3
- import _, { useRef as he, forwardRef as ve, useState as N, useImperativeHandle as $r, useEffect as xt, Fragment as eo, useMemo as Yn } from "react";
3
+ import _, { useRef as he, forwardRef as ve, useState as k, useImperativeHandle as $r, useEffect as xt, Fragment as eo, useMemo as Yn } from "react";
4
4
  import { a as f, f as Jn } from "./twMerge.js";
5
5
  import { Link as Zn, useSearchParams as _t, NavLink as mt, useNavigate as to } from "react-router-dom";
6
6
  import { u as $t } from "./useOption.js";
@@ -189,8 +189,8 @@ var [ar, Jo] = bt(qe), [lr, Zo] = bt(
189
189
  var y;
190
190
  if (!ko.includes(g.key)) return;
191
191
  const v = g.target, q = s().filter((z) => {
192
- var F;
193
- return !((F = z.ref.current) != null && F.disabled);
192
+ var S;
193
+ return !((S = z.ref.current) != null && S.disabled);
194
194
  }), m = q.findIndex((z) => z.ref.current === v), V = q.length;
195
195
  if (m === -1) return;
196
196
  g.preventDefault();
@@ -1337,8 +1337,8 @@ const Bi = {
1337
1337
  var C, I;
1338
1338
  const j = r.options.columnResizeDirection === "rtl" ? -1 : 1, P = (E - ((C = x == null ? void 0 : x.startOffset) != null ? C : 0)) * j, y = Math.max(P / ((I = x == null ? void 0 : x.startSize) != null ? I : 0), -0.999999);
1339
1339
  return x.columnSizingStart.forEach((z) => {
1340
- let [F, B] = z;
1341
- s[F] = Math.round(Math.max(B + B * y, 0) * 100) / 100;
1340
+ let [S, B] = z;
1341
+ s[S] = Math.round(Math.max(B + B * y, 0) * 100) / 100;
1342
1342
  }), {
1343
1343
  ...x,
1344
1344
  deltaOffset: P,
@@ -2523,7 +2523,7 @@ const ua = ({
2523
2523
  setSelectedItems: l,
2524
2524
  classNames: d
2525
2525
  }, u) => {
2526
- const [s, c] = N(""), [p, h] = N(!1), g = he(null);
2526
+ const [s, c] = k(""), [p, h] = k(!1), g = he(null);
2527
2527
  $r(u, () => ({
2528
2528
  open: () => h(!0),
2529
2529
  close: () => h(!1),
@@ -2563,7 +2563,7 @@ const ua = ({
2563
2563
  ae,
2564
2564
  {
2565
2565
  disabled: n,
2566
- className: f(W.label, d == null ? void 0 : d.label),
2566
+ className: f(N.label, d == null ? void 0 : d.label),
2567
2567
  children: e
2568
2568
  }
2569
2569
  ),
@@ -2583,31 +2583,31 @@ const ua = ({
2583
2583
  disabled: n,
2584
2584
  "data-testid": "dropdown-trigger",
2585
2585
  className: f(
2586
- W.trigger,
2586
+ N.trigger,
2587
2587
  {
2588
- [W.hoverTrigger]: !n,
2589
- [W.focusTrigger]: p || i.length > 0,
2588
+ [N.hoverTrigger]: !n,
2589
+ [N.focusTrigger]: p || i.length > 0,
2590
2590
  "pl-1.5 pr-3.5 py-[5px]": i.length > 0,
2591
- [W.disabled.trigger]: n
2591
+ [N.disabled.trigger]: n
2592
2592
  },
2593
2593
  d == null ? void 0 : d.trigger
2594
2594
  ),
2595
- children: /* @__PURE__ */ a.jsxs("div", { className: W.selectedItems, children: [
2595
+ children: /* @__PURE__ */ a.jsxs("div", { className: N.selectedItems, children: [
2596
2596
  i.length === 0 && /* @__PURE__ */ a.jsx(
2597
2597
  w,
2598
2598
  {
2599
2599
  className: f(
2600
- W.text,
2601
- n && W.disabled.text
2600
+ N.text,
2601
+ n && N.disabled.text
2602
2602
  ),
2603
2603
  children: t
2604
2604
  }
2605
2605
  ),
2606
- i.map((x) => /* @__PURE__ */ a.jsxs("div", { className: W.selectedItem, children: [
2606
+ i.map((x) => /* @__PURE__ */ a.jsxs("div", { className: N.selectedItem, children: [
2607
2607
  /* @__PURE__ */ a.jsx(
2608
2608
  w,
2609
2609
  {
2610
- className: W.selectedItemText,
2610
+ className: N.selectedItemText,
2611
2611
  variant: "p",
2612
2612
  children: x.label
2613
2613
  }
@@ -2621,7 +2621,7 @@ const ua = ({
2621
2621
  children: /* @__PURE__ */ a.jsx(
2622
2622
  en,
2623
2623
  {
2624
- className: W.closeIcon,
2624
+ className: N.closeIcon,
2625
2625
  width: 12,
2626
2626
  height: 12,
2627
2627
  viewBox: "0 0 20 20"
@@ -2637,7 +2637,7 @@ const ua = ({
2637
2637
  height: 20,
2638
2638
  viewBox: "0 0 20 20",
2639
2639
  className: f(
2640
- W.arrowIcon,
2640
+ N.arrowIcon,
2641
2641
  p && "-rotate-180"
2642
2642
  )
2643
2643
  }
@@ -2649,10 +2649,10 @@ const ua = ({
2649
2649
  Re,
2650
2650
  {
2651
2651
  style: { minWidth: "var(--radix-popper-anchor-width)" },
2652
- className: f(W.options),
2652
+ className: f(N.options),
2653
2653
  children: [
2654
2654
  /* @__PURE__ */ a.jsx(w, { className: "text-dark-40 font-mono mb-[18px] font-medium", children: e }),
2655
- o && /* @__PURE__ */ a.jsxs("div", { className: W.wrapperInput, children: [
2655
+ o && /* @__PURE__ */ a.jsxs("div", { className: N.wrapperInput, children: [
2656
2656
  /* @__PURE__ */ a.jsx(
2657
2657
  "input",
2658
2658
  {
@@ -2660,7 +2660,7 @@ const ua = ({
2660
2660
  onChange: m,
2661
2661
  value: s,
2662
2662
  autoFocus: !0,
2663
- className: W.input,
2663
+ className: N.input,
2664
2664
  placeholder: "Тип договора"
2665
2665
  }
2666
2666
  ),
@@ -2670,7 +2670,7 @@ const ua = ({
2670
2670
  width: 20,
2671
2671
  height: 20,
2672
2672
  viewBox: "0 0 21 21",
2673
- className: W.plusIcon,
2673
+ className: N.plusIcon,
2674
2674
  onClick: V
2675
2675
  }
2676
2676
  )
@@ -2683,33 +2683,33 @@ const ua = ({
2683
2683
  checked: i.some((j) => j.id === x.id),
2684
2684
  onChange: () => v(x.id),
2685
2685
  className: f(
2686
- W.option,
2686
+ N.option,
2687
2687
  I.length - 1 !== C && "mb-2.5"
2688
2688
  ),
2689
2689
  label: x.label
2690
2690
  },
2691
2691
  x.id
2692
- )) : /* @__PURE__ */ a.jsx("div", { className: W.noItemsFound, children: "No items found" }),
2693
- /* @__PURE__ */ a.jsxs("div", { className: W.buttons, children: [
2692
+ )) : /* @__PURE__ */ a.jsx("div", { className: N.noItemsFound, children: "No items found" }),
2693
+ /* @__PURE__ */ a.jsxs("div", { className: N.buttons, children: [
2694
2694
  /* @__PURE__ */ a.jsx(
2695
- T,
2695
+ F,
2696
2696
  {
2697
2697
  variant: "secondary",
2698
2698
  className: f(
2699
- W.button.base,
2700
- W.button.cancel
2699
+ N.button.base,
2700
+ N.button.cancel
2701
2701
  ),
2702
2702
  onClick: () => h(!1),
2703
2703
  children: "Отмена"
2704
2704
  }
2705
2705
  ),
2706
2706
  /* @__PURE__ */ a.jsx(
2707
- T,
2707
+ F,
2708
2708
  {
2709
2709
  variant: "primary",
2710
2710
  className: f(
2711
- W.button.base,
2712
- W.button.save
2711
+ N.button.base,
2712
+ N.button.save
2713
2713
  ),
2714
2714
  isShadow: !0,
2715
2715
  onClick: () => h(!1),
@@ -2725,7 +2725,7 @@ const ua = ({
2725
2725
  )
2726
2726
  ] });
2727
2727
  }
2728
- ), W = {
2728
+ ), N = {
2729
2729
  trigger: "w-full bg-gray-50 z-10 rounded-[10px] border border-gray-50 px-3.5 py-3",
2730
2730
  label: "text-xs text-dark-50 font-mono leading-none mb-[7px] font-semibold",
2731
2731
  text: "text-dark-40/[.5] font-mono text-sm leading-none",
@@ -2770,11 +2770,11 @@ const ua = ({
2770
2770
  classNames: g,
2771
2771
  ...v
2772
2772
  }, q) => {
2773
- const [m, V] = N(o ?? []), [E, x] = N(i ?? []), [C, I] = N(!1), [j, P] = N(!1), y = no(e, d);
2773
+ const [m, V] = k(o ?? []), [E, x] = k(i ?? []), [C, I] = k(!1), [j, P] = k(!1), y = no(e, d);
2774
2774
  xt(() => {
2775
2775
  I(!!y), u == null || u(y);
2776
2776
  }, [y, u]);
2777
- const z = ue.base, F = ue.hover, B = ue.focus, { focusWithin: M } = ue, b = ue.disabled, R = ue.input, Q = ue.button, D = ue.filterIcon, k = ue.dropdown, L = ue.popover, K = ue.emptyPopover, oe = (le, de, xe) => {
2777
+ const z = ue.base, S = ue.hover, B = ue.focus, { focusWithin: T } = ue, b = ue.disabled, R = ue.input, Q = ue.button, L = ue.filterIcon, M = ue.dropdown, G = ue.popover, K = ue.emptyPopover, oe = (le, de, xe) => {
2778
2778
  const ee = (He = []) => He.map(
2779
2779
  (Qe) => Qe.id === de.id && de.label === de.label ? { ...Qe, checked: xe } : Qe
2780
2780
  ), ce = le === "status" ? ee(m) : m, tt = le === "module" ? ee(E) : E;
@@ -2787,7 +2787,7 @@ const ua = ({
2787
2787
  }, Y = (le) => {
2788
2788
  c == null || c(le), I(!1);
2789
2789
  }, Ce = ({ type: le, title: de, items: xe }) => /* @__PURE__ */ a.jsxs(eo, { children: [
2790
- /* @__PURE__ */ a.jsx(w, { className: k.typeFilter, children: de }),
2790
+ /* @__PURE__ */ a.jsx(w, { className: M.typeFilter, children: de }),
2791
2791
  xe == null ? void 0 : xe.map((ee) => /* @__PURE__ */ a.jsx(
2792
2792
  qr,
2793
2793
  {
@@ -2805,9 +2805,9 @@ const ua = ({
2805
2805
  {
2806
2806
  className: f(
2807
2807
  z,
2808
- !t && M,
2808
+ !t && T,
2809
2809
  (j || C) && !t && B,
2810
- !(j || C) && !t && F,
2810
+ !(j || C) && !t && S,
2811
2811
  t && b,
2812
2812
  g == null ? void 0 : g.base
2813
2813
  ),
@@ -2827,10 +2827,10 @@ const ua = ({
2827
2827
  width: 14,
2828
2828
  height: 14,
2829
2829
  className: f(
2830
- D.icon,
2831
- !t && D.hover,
2832
- t && D.disabled,
2833
- j && D.active
2830
+ L.icon,
2831
+ !t && L.hover,
2832
+ t && L.disabled,
2833
+ j && L.active
2834
2834
  )
2835
2835
  }
2836
2836
  )
@@ -2839,20 +2839,20 @@ const ua = ({
2839
2839
  /* @__PURE__ */ a.jsxs(
2840
2840
  qt,
2841
2841
  {
2842
- className: f(k.content, g == null ? void 0 : g.dropdown),
2842
+ className: f(M.content, g == null ? void 0 : g.dropdown),
2843
2843
  align: "start",
2844
2844
  sideOffset: 18,
2845
2845
  alignOffset: -12,
2846
2846
  style: { minWidth: "var(--radix-popper-anchor-width)" },
2847
2847
  children: [
2848
- /* @__PURE__ */ a.jsxs("div", { className: k.wrapperByStatus, children: [
2849
- /* @__PURE__ */ a.jsx(w, { className: k.title, children: "Поиск по фильтру" }),
2848
+ /* @__PURE__ */ a.jsxs("div", { className: M.wrapperByStatus, children: [
2849
+ /* @__PURE__ */ a.jsx(w, { className: M.title, children: "Поиск по фильтру" }),
2850
2850
  /* @__PURE__ */ a.jsx(Ce, { type: "status", title: "Статус", items: m })
2851
2851
  ] }),
2852
- /* @__PURE__ */ a.jsx("div", { className: k.wrapperByModule, children: /* @__PURE__ */ a.jsx(Ce, { type: "module", title: "Модуль", items: E }) }),
2852
+ /* @__PURE__ */ a.jsx("div", { className: M.wrapperByModule, children: /* @__PURE__ */ a.jsx(Ce, { type: "module", title: "Модуль", items: E }) }),
2853
2853
  /* @__PURE__ */ a.jsxs("div", { className: Q.parent, children: [
2854
2854
  /* @__PURE__ */ a.jsx(
2855
- T,
2855
+ F,
2856
2856
  {
2857
2857
  variant: "secondary",
2858
2858
  className: f(Q.base, Q.cancel),
@@ -2861,7 +2861,7 @@ const ua = ({
2861
2861
  }
2862
2862
  ),
2863
2863
  /* @__PURE__ */ a.jsx(
2864
- T,
2864
+ F,
2865
2865
  {
2866
2866
  onClick: te,
2867
2867
  className: f(Q.base, Q.save),
@@ -2907,9 +2907,9 @@ const ua = ({
2907
2907
  sideOffset: 18,
2908
2908
  alignOffset: n ? -42 : -76,
2909
2909
  style: { minWidth: "var(--radix-popper-anchor-width)" },
2910
- className: f(L.content, g == null ? void 0 : g.popover),
2911
- children: s && (s == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ a.jsxs("div", { className: L.wrapper, children: [
2912
- /* @__PURE__ */ a.jsxs(w, { className: L.title, children: [
2910
+ className: f(G.content, g == null ? void 0 : g.popover),
2911
+ children: s && (s == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ a.jsxs("div", { className: G.wrapper, children: [
2912
+ /* @__PURE__ */ a.jsxs(w, { className: G.title, children: [
2913
2913
  "Результаты (",
2914
2914
  s == null ? void 0 : s.length,
2915
2915
  ")"
@@ -2924,7 +2924,7 @@ const ua = ({
2924
2924
  w,
2925
2925
  {
2926
2926
  onClick: () => Y(le),
2927
- className: L.item,
2927
+ className: G.item,
2928
2928
  children: le
2929
2929
  },
2930
2930
  de
@@ -3242,19 +3242,28 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3242
3242
  ...c
3243
3243
  }, p) => {
3244
3244
  const [h, g] = A.useState(!1), v = A.useRef(null), q = we.root, m = we.input, V = we.icon, E = we.placeholder, x = we.list, C = we.status, I = we.message, j = (B) => {
3245
- const M = B.target.files ? Array.from(B.target.files) : [];
3246
- M.length !== 0 && i(M);
3247
- }, P = (r == null ? void 0 : r.map((B) => ({
3245
+ const T = B.target.files ? Array.from(B.target.files) : [];
3246
+ if (T.length === 0) return;
3247
+ const b = o ? T : T[0];
3248
+ i(b), B.target.value = "";
3249
+ }, P = r ? (Array.isArray(r) ? r : [r]).map((B) => ({
3248
3250
  name: B.name,
3249
3251
  type: B.type,
3250
3252
  size: Ua(B.size)
3251
- }))) || [], y = () => {
3253
+ })) : [], y = () => {
3252
3254
  var B;
3253
3255
  s || (g(!0), (B = v.current) == null || B.click());
3254
3256
  }, z = () => {
3255
3257
  g(!1);
3256
- }, F = (B) => {
3257
- B.stopPropagation(), i(null);
3258
+ }, S = (B) => {
3259
+ const T = r ? (Array.isArray(r) ? r : [r]).filter(
3260
+ (b) => b.name !== B.name
3261
+ ) : [];
3262
+ if (o) {
3263
+ i(T.length > 0 ? T : null);
3264
+ return;
3265
+ }
3266
+ i(null);
3258
3267
  };
3259
3268
  return /* @__PURE__ */ a.jsxs("div", { className: f(q, l == null ? void 0 : l.root), children: [
3260
3269
  !!t && /* @__PURE__ */ a.jsx(
@@ -3281,7 +3290,7 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3281
3290
  !s && !!u && C[u],
3282
3291
  l == null ? void 0 : l.input,
3283
3292
  {
3284
- "items-start": r && (r == null ? void 0 : r.length) > 0
3293
+ "items-start": !!r && (Array.isArray(r) ? r.length > 0 : !0)
3285
3294
  }
3286
3295
  ),
3287
3296
  children: [
@@ -3299,11 +3308,13 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3299
3308
  ...c
3300
3309
  }
3301
3310
  ),
3302
- r && r.length > 0 ? /* @__PURE__ */ a.jsx("ul", { role: "listbox", className: x, children: P.map((B) => /* @__PURE__ */ a.jsx(
3311
+ r && (!Array.isArray(r) || r.length > 0) ? /* @__PURE__ */ a.jsx("ul", { role: "listbox", className: x, children: P.map((B) => /* @__PURE__ */ a.jsx(
3303
3312
  Oa,
3304
3313
  {
3305
3314
  file: B,
3306
- onClick: F
3315
+ onClick: (T) => {
3316
+ T.stopPropagation(), S(B);
3317
+ }
3307
3318
  },
3308
3319
  `${B.name}-${B.size}`
3309
3320
  )) }) : /* @__PURE__ */ a.jsxs(A.Fragment, { children: [
@@ -3325,7 +3336,7 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3325
3336
  ] });
3326
3337
  }
3327
3338
  ), we = {
3328
- root: "w-full flex flex-col gap-1.5",
3339
+ root: "w-full",
3329
3340
  input: {
3330
3341
  base: "relative flex flex-col items-center justify-center gap-2 w-full bg-gray-50 p-3 rounded-[10px] border border-gray-50",
3331
3342
  pressed: "data-[state=on]:bg-sidebar-10 data-[state=on]:border-primary-10 data-[state=on]:ring data-[state=on]:ring-primary-10/[.20]",
@@ -3333,7 +3344,7 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3333
3344
  },
3334
3345
  placeholder: "text-xs text-dark-40/[.40] leading-none",
3335
3346
  icon: "fill-gray-20",
3336
- list: "flex items-center flex-row gap-1",
3347
+ list: "flex items-center flex-wrap gap-1",
3337
3348
  status: {
3338
3349
  danger: "bg-white border-danger-10 ring-2 ring-danger-10/[.20] hover:border-danger-10"
3339
3350
  },
@@ -3347,10 +3358,10 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3347
3358
  classNames: n
3348
3359
  }) => {
3349
3360
  const o = t === "review";
3350
- return e != null && e.length ? /* @__PURE__ */ a.jsx("div", { className: f(G.root, n == null ? void 0 : n.root), children: e.map(
3361
+ return e != null && e.length ? /* @__PURE__ */ a.jsx("div", { className: f(W.root, n == null ? void 0 : n.root), children: e.map(
3351
3362
  ({ avatarSrc: i, fullName: l, role: d, comment: u, date: s, time: c, stars: p = 0 }, h) => {
3352
3363
  const g = Math.max(0, Math.min(5, Math.floor(p)));
3353
- return /* @__PURE__ */ a.jsxs("div", { className: G.wrapper, children: [
3364
+ return /* @__PURE__ */ a.jsxs("div", { className: W.wrapper, children: [
3354
3365
  /* @__PURE__ */ a.jsx(
3355
3366
  jr,
3356
3367
  {
@@ -3360,10 +3371,10 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3360
3371
  classNames: {
3361
3372
  root: "self-start",
3362
3373
  textWrapper: "justify-end",
3363
- jobTitle: G.author.jobTitle,
3374
+ jobTitle: W.author.jobTitle,
3364
3375
  fullName: f(
3365
- G.author.fullNameBase,
3366
- o ? G.author.fullNameReview : G.author.fullNameComment
3376
+ W.author.fullNameBase,
3377
+ o ? W.author.fullNameReview : W.author.fullNameComment
3367
3378
  )
3368
3379
  },
3369
3380
  avatarProps: {
@@ -3371,10 +3382,10 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3371
3382
  alt: l,
3372
3383
  classNames: {
3373
3384
  wrapper: f(
3374
- G.avatar.wrapperBase,
3375
- o ? G.avatar.wrapperReview : G.avatar.wrapperComment
3385
+ W.avatar.wrapperBase,
3386
+ o ? W.avatar.wrapperReview : W.avatar.wrapperComment
3376
3387
  ),
3377
- img: G.avatar.img
3388
+ img: W.avatar.img
3378
3389
  }
3379
3390
  }
3380
3391
  }
@@ -3383,26 +3394,26 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3383
3394
  "div",
3384
3395
  {
3385
3396
  className: f(
3386
- G.comment.base,
3387
- o ? G.comment.review : G.comment.comment,
3397
+ W.comment.base,
3398
+ o ? W.comment.review : W.comment.comment,
3388
3399
  n == null ? void 0 : n.comment
3389
3400
  ),
3390
3401
  children: [
3391
- o && /* @__PURE__ */ a.jsxs("div", { className: G.stars.row, children: [
3402
+ o && /* @__PURE__ */ a.jsxs("div", { className: W.stars.row, children: [
3392
3403
  [...Array(5)].map((v, q) => /* @__PURE__ */ a.jsx(
3393
3404
  Bo,
3394
3405
  {
3395
3406
  className: f(
3396
- G.stars.icon,
3397
- q < g ? G.stars.filled : G.stars.empty
3407
+ W.stars.icon,
3408
+ q < g ? W.stars.filled : W.stars.empty
3398
3409
  )
3399
3410
  },
3400
3411
  q
3401
3412
  )),
3402
- /* @__PURE__ */ a.jsx(w, { variant: "span", className: G.stars.score, children: String(p).replace(".", ",") })
3413
+ /* @__PURE__ */ a.jsx(w, { variant: "span", className: W.stars.score, children: String(p).replace(".", ",") })
3403
3414
  ] }),
3404
- /* @__PURE__ */ a.jsx(w, { variant: "p", className: G.commentText, children: u }),
3405
- /* @__PURE__ */ a.jsxs(w, { variant: "span", className: G.commentDate, children: [
3415
+ /* @__PURE__ */ a.jsx(w, { variant: "p", className: W.commentText, children: u }),
3416
+ /* @__PURE__ */ a.jsxs(w, { variant: "span", className: W.commentDate, children: [
3406
3417
  s,
3407
3418
  "   ",
3408
3419
  c
@@ -3412,18 +3423,18 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3412
3423
  )
3413
3424
  ] }, h);
3414
3425
  }
3415
- ) }) : /* @__PURE__ */ a.jsx("div", { className: f(G.root, n == null ? void 0 : n.root), children: /* @__PURE__ */ a.jsx(
3426
+ ) }) : /* @__PURE__ */ a.jsx("div", { className: f(W.root, n == null ? void 0 : n.root), children: /* @__PURE__ */ a.jsx(
3416
3427
  w,
3417
3428
  {
3418
3429
  variant: "p",
3419
3430
  className: f(
3420
- G.emptyText.base,
3421
- o ? G.emptyText.review : G.emptyText.comment
3431
+ W.emptyText.base,
3432
+ o ? W.emptyText.review : W.emptyText.comment
3422
3433
  ),
3423
3434
  children: r
3424
3435
  }
3425
3436
  ) });
3426
- }, G = {
3437
+ }, W = {
3427
3438
  root: "font-mono flex flex-col gap-3 w-full",
3428
3439
  wrapper: "flex gap-3 pt-1 flex-col justify-center",
3429
3440
  avatar: {
@@ -3466,9 +3477,9 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3466
3477
  message: i
3467
3478
  }) => {
3468
3479
  const l = (b) => {
3469
- const R = b.getDate().toString().padStart(2, "0"), Q = (b.getMonth() + 1).toString().padStart(2, "0"), D = b.getFullYear();
3470
- return `${R}/${Q}/${D}`;
3471
- }, [d, u] = N(!1), [s, c] = N(e || /* @__PURE__ */ new Date()), [p, h] = N(l(e || /* @__PURE__ */ new Date())), g = he(null), v = he(null), q = [
3480
+ const R = b.getDate().toString().padStart(2, "0"), Q = (b.getMonth() + 1).toString().padStart(2, "0"), L = b.getFullYear();
3481
+ return `${R}/${Q}/${L}`;
3482
+ }, [d, u] = k(!1), [s, c] = k(e || /* @__PURE__ */ new Date()), [p, h] = k(l(e || /* @__PURE__ */ new Date())), g = he(null), v = he(null), q = [
3472
3483
  "Январь",
3473
3484
  "Февраль",
3474
3485
  "Март",
@@ -3482,15 +3493,15 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3482
3493
  "Ноябрь",
3483
3494
  "Декабрь"
3484
3495
  ], m = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], V = (b) => {
3485
- const R = b.getFullYear(), Q = b.getMonth(), D = new Date(R, Q, 1), L = new Date(R, Q + 1, 0).getDate();
3486
- let K = D.getDay();
3496
+ const R = b.getFullYear(), Q = b.getMonth(), L = new Date(R, Q, 1), G = new Date(R, Q + 1, 0).getDate();
3497
+ let K = L.getDay();
3487
3498
  K = K === 0 ? 6 : K - 1;
3488
3499
  const oe = [];
3489
3500
  for (let Y = 0; Y < K; Y++) {
3490
3501
  const Ce = new Date(R, Q, 1 - (K - Y));
3491
3502
  oe.push({ date: Ce, isCurrentMonth: !1 });
3492
3503
  }
3493
- for (let Y = 1; Y <= L; Y++)
3504
+ for (let Y = 1; Y <= G; Y++)
3494
3505
  oe.push({ date: new Date(R, Q, Y), isCurrentMonth: !0 });
3495
3506
  const te = 42 - oe.length;
3496
3507
  for (let Y = 1; Y <= te; Y++)
@@ -3503,10 +3514,10 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3503
3514
  R.length >= 3 && R.length <= 4 ? R = `${R.slice(0, 2)}/${R.slice(2)}` : R.length > 4 && (R = `${R.slice(0, 2)}/${R.slice(2, 4)}/${R.slice(4, 8)}`), R.length > 10 && (R = R.slice(0, 10)), h(R);
3504
3515
  const Q = R.split("/");
3505
3516
  if (Q.length === 3) {
3506
- const D = parseInt(Q[0]), k = parseInt(Q[1]) - 1, L = parseInt(Q[2]);
3507
- if (D > 0 && D <= 31 && k >= 0 && k <= 11 && L > 1900) {
3508
- const K = new Date(L, k, D);
3509
- K.getDate() === D && K.getMonth() === k && K.getFullYear() === L && (r(K), c(new Date(L, k, 1)));
3517
+ const L = parseInt(Q[0]), M = parseInt(Q[1]) - 1, G = parseInt(Q[2]);
3518
+ if (L > 0 && L <= 31 && M >= 0 && M <= 11 && G > 1900) {
3519
+ const K = new Date(G, M, L);
3520
+ K.getDate() === L && K.getMonth() === M && K.getFullYear() === G && (r(K), c(new Date(G, M, 1)));
3510
3521
  }
3511
3522
  }
3512
3523
  }, C = (b) => {
@@ -3518,8 +3529,8 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3518
3529
  };
3519
3530
  xt(() => {
3520
3531
  const b = (R) => {
3521
- const Q = R.composedPath(), D = g.current && Q.includes(g.current), k = v.current && Q.includes(v.current);
3522
- !D && !k && u(!1);
3532
+ const Q = R.composedPath(), L = g.current && Q.includes(g.current), M = v.current && Q.includes(v.current);
3533
+ !L && !M && u(!1);
3523
3534
  };
3524
3535
  return window.addEventListener("mousedown", b), () => {
3525
3536
  window.removeEventListener("mousedown", b);
@@ -3530,13 +3541,13 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3530
3541
  label: b.toString(),
3531
3542
  value: b.toString()
3532
3543
  })
3533
- ), F = (b) => {
3544
+ ), S = (b) => {
3534
3545
  const R = parseInt(b);
3535
3546
  c(new Date(s.getFullYear(), R, 1));
3536
3547
  }, B = (b) => {
3537
3548
  const R = parseInt(b);
3538
3549
  c(new Date(R, s.getMonth(), 1));
3539
- }, M = (b) => {
3550
+ }, T = (b) => {
3540
3551
  b.preventDefault(), b.stopPropagation();
3541
3552
  const R = /* @__PURE__ */ new Date();
3542
3553
  E(R), u(!0), c(new Date(R.getFullYear(), R.getMonth(), 1));
@@ -3647,7 +3658,7 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3647
3658
  disabled: !1,
3648
3659
  ref: v,
3649
3660
  onChange: (b) => {
3650
- F(b), u(!0);
3661
+ S(b), u(!0);
3651
3662
  },
3652
3663
  value: String(s.getMonth())
3653
3664
  }
@@ -3686,19 +3697,19 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3686
3697
  ] }),
3687
3698
  /* @__PURE__ */ a.jsx("div", { className: X.weekHeader, children: m.map((b) => /* @__PURE__ */ a.jsx("div", { className: X.weekDay, children: b }, b)) }),
3688
3699
  /* @__PURE__ */ a.jsx("div", { className: X.calendar, children: V(s).map((b, R) => {
3689
- const { date: Q, isCurrentMonth: D } = b, k = Q.getDate();
3690
- let L = X.dayButton;
3691
- return D ? P(Q) ? L += ` ${X.daySelected}` : j(Q) ? L += ` ${X.dayToday}` : y(Q) ? L += ` ${X.dayWeekend}` : L += ` ${X.dayNormal}` : L += ` ${X.dayOutside}`, /* @__PURE__ */ a.jsx(
3700
+ const { date: Q, isCurrentMonth: L } = b, M = Q.getDate();
3701
+ let G = X.dayButton;
3702
+ return L ? P(Q) ? G += ` ${X.daySelected}` : j(Q) ? G += ` ${X.dayToday}` : y(Q) ? G += ` ${X.dayWeekend}` : G += ` ${X.dayNormal}` : G += ` ${X.dayOutside}`, /* @__PURE__ */ a.jsx(
3692
3703
  "button",
3693
3704
  {
3694
3705
  onClick: () => E(Q),
3695
- className: L,
3696
- children: k
3706
+ className: G,
3707
+ children: M
3697
3708
  },
3698
3709
  R
3699
3710
  );
3700
3711
  }) }),
3701
- /* @__PURE__ */ a.jsx("div", { className: X.resetButtonWrapper, children: /* @__PURE__ */ a.jsx("button", { onClick: M, className: X.resetButton, children: "Сбросить" }) })
3712
+ /* @__PURE__ */ a.jsx("div", { className: X.resetButtonWrapper, children: /* @__PURE__ */ a.jsx("button", { onClick: T, className: X.resetButton, children: "Сбросить" }) })
3702
3713
  ] })
3703
3714
  }
3704
3715
  )
@@ -3960,7 +3971,7 @@ const Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3960
3971
  icon: l,
3961
3972
  iconSizes: d
3962
3973
  }) => {
3963
- const [u, s] = N(!1), p = $t(n)(i), h = Bt.base, g = Bt.disabled.trigger, v = Bt.disabled.triggerText, q = ({
3974
+ const [u, s] = k(!1), p = $t(n)(i), h = Bt.base, g = Bt.disabled.trigger, v = Bt.disabled.triggerText, q = ({
3964
3975
  className: m,
3965
3976
  text: V = ""
3966
3977
  }) => /* @__PURE__ */ a.jsx(
@@ -4370,7 +4381,7 @@ const Ba = ({
4370
4381
  className: f(d.base, r && d.expanded),
4371
4382
  children: [
4372
4383
  /* @__PURE__ */ a.jsx(mt, { role: "link", to: "/", children: r ? /* @__PURE__ */ a.jsx(xo, {}) : /* @__PURE__ */ a.jsx(To, {}) }),
4373
- /* @__PURE__ */ a.jsx(T, { type: "button", variant: "text", classNames: { base: "p-0" }, children: r && /* @__PURE__ */ a.jsx(mo, { className: f(s), width: 24, height: 24 }) })
4384
+ /* @__PURE__ */ a.jsx(F, { type: "button", variant: "text", classNames: { base: "p-0" }, children: r && /* @__PURE__ */ a.jsx(mo, { className: f(s), width: 24, height: 24 }) })
4374
4385
  ]
4375
4386
  }
4376
4387
  ),
@@ -4418,7 +4429,7 @@ const Ba = ({
4418
4429
  onChange: t,
4419
4430
  classNames: n
4420
4431
  }) => {
4421
- const [o, i] = N(!1), l = he(null), d = (u) => {
4432
+ const [o, i] = k(!1), l = he(null), d = (u) => {
4422
4433
  t(u), i(!1);
4423
4434
  };
4424
4435
  return /* @__PURE__ */ a.jsx(
@@ -4429,7 +4440,7 @@ const Ba = ({
4429
4440
  "data-testid": "switcher-language",
4430
4441
  children: /* @__PURE__ */ a.jsxs(be, { open: o, onOpenChange: i, children: [
4431
4442
  /* @__PURE__ */ a.jsx(Ee, { className: "focus-visible:outline-none", asChild: !0, children: /* @__PURE__ */ a.jsx(
4432
- T,
4443
+ F,
4433
4444
  {
4434
4445
  variant: "text",
4435
4446
  icon: Vt,
@@ -4514,10 +4525,10 @@ const Pl = ({
4514
4525
  className: l
4515
4526
  }) => {
4516
4527
  const d = e === 1, u = e === t, s = (e - 1) * Number(n) + 1, c = Math.min(e * Number(n), i), p = za(e, t);
4517
- return /* @__PURE__ */ a.jsxs("div", { className: f(S.wrapper, l), children: [
4518
- /* @__PURE__ */ a.jsxs("div", { className: f(S.countWrapper.base), children: [
4519
- /* @__PURE__ */ a.jsx("p", { className: f(S.countWrapper.text), children: "Отображено: " }),
4520
- /* @__PURE__ */ a.jsxs("span", { className: f(S.countWrapper.current), children: [
4528
+ return /* @__PURE__ */ a.jsxs("div", { className: f(H.wrapper, l), children: [
4529
+ /* @__PURE__ */ a.jsxs("div", { className: f(H.countWrapper.base), children: [
4530
+ /* @__PURE__ */ a.jsx("p", { className: f(H.countWrapper.text), children: "Отображено: " }),
4531
+ /* @__PURE__ */ a.jsxs("span", { className: f(H.countWrapper.current), children: [
4521
4532
  s,
4522
4533
  " - ",
4523
4534
  c,
@@ -4525,19 +4536,19 @@ const Pl = ({
4525
4536
  i
4526
4537
  ] })
4527
4538
  ] }),
4528
- /* @__PURE__ */ a.jsxs("div", { className: f(S.nav.base), children: [
4539
+ /* @__PURE__ */ a.jsxs("div", { className: f(H.nav.base), children: [
4529
4540
  /* @__PURE__ */ a.jsx(
4530
- T,
4541
+ F,
4531
4542
  {
4532
4543
  disabled: d,
4533
4544
  "aria-label": "Previous Page",
4534
4545
  onClick: () => r == null ? void 0 : r(e - 1),
4535
4546
  classNames: {
4536
4547
  base: f(
4537
- S.arrowButton.base,
4538
- !d && S.arrowButton.hover,
4539
- S.arrowButton.pressed,
4540
- d && S.arrowButton.disabled
4548
+ H.arrowButton.base,
4549
+ !d && H.arrowButton.hover,
4550
+ H.arrowButton.pressed,
4551
+ d && H.arrowButton.disabled
4541
4552
  )
4542
4553
  },
4543
4554
  children: /* @__PURE__ */ a.jsx(
@@ -4546,26 +4557,26 @@ const Pl = ({
4546
4557
  width: 28,
4547
4558
  height: 28,
4548
4559
  className: f(
4549
- S.arrowButton.icon,
4550
- d && S.arrowButton.iconDisabled
4560
+ H.arrowButton.icon,
4561
+ d && H.arrowButton.iconDisabled
4551
4562
  )
4552
4563
  }
4553
4564
  )
4554
4565
  }
4555
4566
  ),
4556
- /* @__PURE__ */ a.jsx("div", { className: f(S.nav.pageBtnWrapper), children: p.map(
4557
- (h, g) => h === "..." ? /* @__PURE__ */ a.jsx("span", { className: f(S.pageButton.base), children: "..." }, `dots-${g}`) : /* @__PURE__ */ a.jsx(
4558
- T,
4567
+ /* @__PURE__ */ a.jsx("div", { className: f(H.nav.pageBtnWrapper), children: p.map(
4568
+ (h, g) => h === "..." ? /* @__PURE__ */ a.jsx("span", { className: f(H.pageButton.base), children: "..." }, `dots-${g}`) : /* @__PURE__ */ a.jsx(
4569
+ F,
4559
4570
  {
4560
4571
  onClick: () => r == null ? void 0 : r(h),
4561
4572
  "aria-current": h === e ? "page" : void 0,
4562
4573
  classNames: {
4563
4574
  base: f(
4564
- S.pageButton.base,
4565
- S.pageButton.hover,
4566
- S.pageButton.focus,
4567
- S.pageButton.pressed,
4568
- h === e && S.pageButton.active
4575
+ H.pageButton.base,
4576
+ H.pageButton.hover,
4577
+ H.pageButton.focus,
4578
+ H.pageButton.pressed,
4579
+ h === e && H.pageButton.active
4569
4580
  )
4570
4581
  },
4571
4582
  children: h
@@ -4574,18 +4585,18 @@ const Pl = ({
4574
4585
  )
4575
4586
  ) }),
4576
4587
  /* @__PURE__ */ a.jsx(
4577
- T,
4588
+ F,
4578
4589
  {
4579
4590
  disabled: u,
4580
4591
  "aria-label": "Next Page",
4581
4592
  onClick: () => r == null ? void 0 : r(e + 1),
4582
4593
  classNames: {
4583
4594
  base: f(
4584
- S.arrowButton.base,
4585
- S.arrowButton.hover,
4586
- S.arrowButton.focus,
4587
- S.arrowButton.pressed,
4588
- u && S.arrowButton.disabled
4595
+ H.arrowButton.base,
4596
+ H.arrowButton.hover,
4597
+ H.arrowButton.focus,
4598
+ H.arrowButton.pressed,
4599
+ u && H.arrowButton.disabled
4589
4600
  )
4590
4601
  },
4591
4602
  children: /* @__PURE__ */ a.jsx(
@@ -4594,8 +4605,8 @@ const Pl = ({
4594
4605
  width: 28,
4595
4606
  height: 28,
4596
4607
  className: f(
4597
- S.arrowButton.icon,
4598
- u && S.arrowButton.iconDisabled
4608
+ H.arrowButton.icon,
4609
+ u && H.arrowButton.iconDisabled
4599
4610
  )
4600
4611
  }
4601
4612
  )
@@ -4616,7 +4627,7 @@ const Pl = ({
4616
4627
  )
4617
4628
  ] })
4618
4629
  ] });
4619
- }, S = {
4630
+ }, H = {
4620
4631
  wrapper: "flex items-center w-full py-5",
4621
4632
  nav: {
4622
4633
  base: "flex items-center gap-4 grow justify-center h-7",
@@ -5009,18 +5020,18 @@ var Ye = function(e) {
5009
5020
  var P, y;
5010
5021
  if (m.cachedId === m.id) throw new Ye("The input selection has not been updated.");
5011
5022
  m.cachedId = m.id;
5012
- var z = i.value, F = i.selectionStart, B = i.selectionEnd;
5013
- if (F === null || B === null) throw new Ye("The selection attributes have not been initialized.");
5014
- var M, b = V.value;
5015
- if (j.inputType === void 0 && (V.selectionStart = 0, V.selectionEnd = b.length), F > V.selectionStart ? M = "insert" : F <= V.selectionStart && F < V.selectionEnd ? M = "deleteBackward" : F === V.selectionEnd && z.length < b.length && (M = "deleteForward"), M === void 0 || (M === "deleteBackward" || M === "deleteForward") && z.length > b.length) throw new Ye("Input type detection error.");
5016
- var R = "", Q = V.selectionStart, D = V.selectionEnd;
5017
- if (M === "insert") R = z.slice(V.selectionStart, F);
5023
+ var z = i.value, S = i.selectionStart, B = i.selectionEnd;
5024
+ if (S === null || B === null) throw new Ye("The selection attributes have not been initialized.");
5025
+ var T, b = V.value;
5026
+ if (j.inputType === void 0 && (V.selectionStart = 0, V.selectionEnd = b.length), S > V.selectionStart ? T = "insert" : S <= V.selectionStart && S < V.selectionEnd ? T = "deleteBackward" : S === V.selectionEnd && z.length < b.length && (T = "deleteForward"), T === void 0 || (T === "deleteBackward" || T === "deleteForward") && z.length > b.length) throw new Ye("Input type detection error.");
5027
+ var R = "", Q = V.selectionStart, L = V.selectionEnd;
5028
+ if (T === "insert") R = z.slice(V.selectionStart, S);
5018
5029
  else {
5019
- var k = b.length - z.length;
5020
- Q = F, D = F + k;
5030
+ var M = b.length - z.length;
5031
+ Q = S, L = S + M;
5021
5032
  }
5022
5033
  q.value !== b ? q.options = q.fallbackOptions : q.fallbackOptions = q.options;
5023
- var L = q.options, K = n({ inputType: M, previousValue: b, previousOptions: L, value: z, addedValue: R, changeStart: Q, changeEnd: D, selectionStart: F, selectionEnd: B }), oe = K.options, te = Ja(K, Za);
5034
+ var G = q.options, K = n({ inputType: T, previousValue: b, previousOptions: G, value: z, addedValue: R, changeStart: Q, changeEnd: L, selectionStart: S, selectionEnd: B }), oe = K.options, te = Ja(K, Za);
5024
5035
  i.value = te.value, i.setSelectionRange(te.selectionStart, te.selectionEnd), q.value = te.value, q.options = oe, V.selectionStart = te.selectionStart, V.selectionEnd = te.selectionEnd, (P = i._valueTracker) === null || P === void 0 || (y = P.setValue) === null || y === void 0 || y.call(P, b);
5025
5036
  } catch (Y) {
5026
5037
  if (i.value = V.value, i.setSelectionRange(V.selectionStart, V.selectionEnd), j.preventDefault(), j.stopPropagation(), Y.name !== "SyntheticChangeError") throw Y;
@@ -5077,25 +5088,25 @@ var Hr = function(e) {
5077
5088
  var j = Kt(l, lt({ end: s }, d)), P = Kt(l, lt({ start: c }, d)), y = RegExp("[^".concat(Object.keys(m).join(""), "]"), "g"), z = q.replace(y, "");
5078
5089
  if (j && (j = Me(j, { replacementChars: z, replacement: m, separate: E }), z = z.slice(j.length)), u && (u = Me(u, { replacementChars: z, replacement: m, separate: !1 }), z = z.slice(u.length)), i === "insert" && u === "") throw new Ye("The character does not match the key value of the `replacement` object.");
5079
5090
  if (E) {
5080
- var F = q.slice(s, c).replace(y, ""), B = F.length - u.length;
5081
- B < 0 ? P = P.slice(-B) : B > 0 && (P = F.slice(-B) + P);
5091
+ var S = q.slice(s, c).replace(y, ""), B = S.length - u.length;
5092
+ B < 0 ? P = P.slice(-B) : B > 0 && (P = S.slice(-B) + P);
5082
5093
  }
5083
5094
  P && (P = Me(P, { replacementChars: z, replacement: m, separate: E }));
5084
- var M = yr(j + u + P, { mask: q, replacement: m, separate: E, showMask: V }), b = function(R) {
5085
- var Q, D, k, L = R.inputType, K = R.value, oe = R.addedValue, te = R.beforeChangeValue, Y = R.mask, Ce = R.replacement, le = R.separate, de = zr(K, { mask: Y, replacement: Ce }).filter(function(He) {
5095
+ var T = yr(j + u + P, { mask: q, replacement: m, separate: E, showMask: V }), b = function(R) {
5096
+ var Q, L, M, G = R.inputType, K = R.value, oe = R.addedValue, te = R.beforeChangeValue, Y = R.mask, Ce = R.replacement, le = R.separate, de = zr(K, { mask: Y, replacement: Ce }).filter(function(He) {
5086
5097
  var Qe = He.type;
5087
5098
  return Qe === "input" || le && Qe === "replacement";
5088
- }), xe = (Q = de[te.length + oe.length - 1]) === null || Q === void 0 ? void 0 : Q.index, ee = (D = de[te.length - 1]) === null || D === void 0 ? void 0 : D.index, ce = (k = de[te.length + oe.length]) === null || k === void 0 ? void 0 : k.index;
5089
- if (L === "insert") {
5099
+ }), xe = (Q = de[te.length + oe.length - 1]) === null || Q === void 0 ? void 0 : Q.index, ee = (L = de[te.length - 1]) === null || L === void 0 ? void 0 : L.index, ce = (M = de[te.length + oe.length]) === null || M === void 0 ? void 0 : M.index;
5100
+ if (G === "insert") {
5090
5101
  if (xe !== void 0) return xe + 1;
5091
5102
  if (ce !== void 0) return ce;
5092
5103
  if (ee !== void 0) return ee + 1;
5093
5104
  }
5094
- if (L === "deleteForward") {
5105
+ if (G === "deleteForward") {
5095
5106
  if (ce !== void 0) return ce;
5096
5107
  if (ee !== void 0) return ee + 1;
5097
5108
  }
5098
- if (L === "deleteBackward") {
5109
+ if (G === "deleteBackward") {
5099
5110
  if (ee !== void 0) return ee + 1;
5100
5111
  if (ce !== void 0) return ce;
5101
5112
  }
@@ -5103,8 +5114,8 @@ var Hr = function(e) {
5103
5114
  return Object.prototype.hasOwnProperty.call(Ce, He);
5104
5115
  });
5105
5116
  return tt !== -1 ? tt : K.length;
5106
- }({ inputType: i, value: M, addedValue: u, beforeChangeValue: j, mask: q, replacement: m, separate: E });
5107
- return { value: M, selectionStart: b, selectionEnd: b, options: { mask: q, replacement: m, separate: E } };
5117
+ }({ inputType: i, value: T, addedValue: u, beforeChangeValue: j, mask: q, replacement: m, separate: E });
5118
+ return { value: T, selectionStart: b, selectionEnd: b, options: { mask: q, replacement: m, separate: E } };
5108
5119
  } }])).format = function(o) {
5109
5120
  return Ke(o, ye(n));
5110
5121
  }, t.formatToParts = function(o) {
@@ -5139,7 +5150,7 @@ const dt = {
5139
5150
  classNames: u,
5140
5151
  ...s
5141
5152
  }) => {
5142
- const c = $a(dt), [p, h] = N(
5153
+ const c = $a(dt), [p, h] = k(
5143
5154
  () => Ke(String(e), dt)
5144
5155
  );
5145
5156
  xt(() => {
@@ -5208,7 +5219,7 @@ const dt = {
5208
5219
  className: u,
5209
5220
  ...s
5210
5221
  }, c) => {
5211
- const [p, h] = N(n || ""), g = (C) => {
5222
+ const [p, h] = k(n || ""), g = (C) => {
5212
5223
  h(C), o == null || o(e, C);
5213
5224
  }, v = s.disabled || !1, q = Le.base, m = Le.pressed, V = Le.hover, E = Le.disabled, x = Le.content;
5214
5225
  return /* @__PURE__ */ a.jsxs(
@@ -5247,7 +5258,7 @@ const dt = {
5247
5258
  ),
5248
5259
  !!d && /* @__PURE__ */ a.jsxs(be, { children: [
5249
5260
  /* @__PURE__ */ a.jsx(Ee, { onClick: (C) => C.stopPropagation(), asChild: !0, children: /* @__PURE__ */ a.jsx(
5250
- T,
5261
+ F,
5251
5262
  {
5252
5263
  variant: "text",
5253
5264
  classNames: {
@@ -5544,7 +5555,7 @@ const dt = {
5544
5555
  ...l,
5545
5556
  children: [
5546
5557
  /* @__PURE__ */ a.jsx(
5547
- T,
5558
+ F,
5548
5559
  {
5549
5560
  onClick: o,
5550
5561
  type: "button",
@@ -5558,7 +5569,7 @@ const dt = {
5558
5569
  ),
5559
5570
  /* @__PURE__ */ a.jsx(w, { className: Te.wrapperBlockName, children: e || "-" }),
5560
5571
  /* @__PURE__ */ a.jsx(
5561
- T,
5572
+ F,
5562
5573
  {
5563
5574
  onClick: i,
5564
5575
  type: "button",
@@ -5580,7 +5591,7 @@ const dt = {
5580
5591
  label: n,
5581
5592
  classNames: o
5582
5593
  }) => {
5583
- const [i, l] = N(e || /* @__PURE__ */ new Date()), d = he(null), u = [
5594
+ const [i, l] = k(e || /* @__PURE__ */ new Date()), d = he(null), u = [
5584
5595
  "Январь",
5585
5596
  "Февраль",
5586
5597
  "Март",
@@ -6103,7 +6114,7 @@ const dt = {
6103
6114
  value: i
6104
6115
  }, l) => {
6105
6116
  var E;
6106
- const [d, u] = N(!1), c = $t(n)(i), p = he(null), h = Ge.base, g = Ge.options, v = Ge.disabled.trigger, q = Ge.disabled.triggerText, m = (E = n.find((x) => x.value === i)) == null ? void 0 : E.status, V = ({
6117
+ const [d, u] = k(!1), c = $t(n)(i), p = he(null), h = Ge.base, g = Ge.options, v = Ge.disabled.trigger, q = Ge.disabled.triggerText, m = (E = n.find((x) => x.value === i)) == null ? void 0 : E.status, V = ({
6107
6118
  className: x,
6108
6119
  text: C = ""
6109
6120
  }) => /* @__PURE__ */ a.jsx(
@@ -6238,28 +6249,28 @@ const al = {
6238
6249
  {
6239
6250
  ref: c,
6240
6251
  className: f(
6241
- H.wrapper,
6242
- n && H.disabled,
6252
+ D.wrapper,
6253
+ n && D.disabled,
6243
6254
  u == null ? void 0 : u.wrapper
6244
6255
  ),
6245
6256
  tabIndex: 0,
6246
6257
  ...s,
6247
6258
  children: [
6248
- /* @__PURE__ */ a.jsxs("div", { className: H.wrapperContainer, children: [
6249
- /* @__PURE__ */ a.jsxs("div", { className: H.titleContainer, children: [
6250
- /* @__PURE__ */ a.jsxs("div", { className: H.textContainer, children: [
6251
- /* @__PURE__ */ a.jsx("div", { className: H.circle[d] }),
6252
- /* @__PURE__ */ a.jsx(w, { "data-testid": "title", className: H.text, children: e })
6259
+ /* @__PURE__ */ a.jsxs("div", { className: D.wrapperContainer, children: [
6260
+ /* @__PURE__ */ a.jsxs("div", { className: D.titleContainer, children: [
6261
+ /* @__PURE__ */ a.jsxs("div", { className: D.textContainer, children: [
6262
+ /* @__PURE__ */ a.jsx("div", { className: D.circle[d] }),
6263
+ /* @__PURE__ */ a.jsx(w, { "data-testid": "title", className: D.text, children: e })
6253
6264
  ] }),
6254
- /* @__PURE__ */ a.jsx(w, { "data-testid": "date-and-time", className: H.dateAndTime, children: Jn(t, "dd.MM.yyyy HH:mm:ss") })
6265
+ /* @__PURE__ */ a.jsx(w, { "data-testid": "date-and-time", className: D.dateAndTime, children: Jn(t, "dd.MM.yyyy HH:mm:ss") })
6255
6266
  ] }),
6256
- /* @__PURE__ */ a.jsxs("div", { className: H.fileContainer, children: [
6257
- /* @__PURE__ */ a.jsx("div", { className: H.iconContainer, children: r.type.startsWith("image/") ? /* @__PURE__ */ a.jsx(
6267
+ /* @__PURE__ */ a.jsxs("div", { className: D.fileContainer, children: [
6268
+ /* @__PURE__ */ a.jsx("div", { className: D.iconContainer, children: r.type.startsWith("image/") ? /* @__PURE__ */ a.jsx(
6258
6269
  "img",
6259
6270
  {
6260
6271
  src: URL.createObjectURL(r),
6261
6272
  alt: r.name,
6262
- className: H.fileImg,
6273
+ className: D.fileImg,
6263
6274
  width: 22,
6264
6275
  height: 30
6265
6276
  }
@@ -6270,27 +6281,27 @@ const al = {
6270
6281
  {
6271
6282
  href: "#",
6272
6283
  className: f(
6273
- H.fileName,
6274
- n && H.textDisabled
6284
+ D.fileName,
6285
+ n && D.textDisabled
6275
6286
  ),
6276
6287
  weight: "font-bold",
6277
6288
  isIconVisible: !1,
6278
6289
  children: r.name
6279
6290
  }
6280
6291
  ),
6281
- /* @__PURE__ */ a.jsxs(w, { "data-testid": "size-file", className: H.sizeFile, children: [
6292
+ /* @__PURE__ */ a.jsxs(w, { "data-testid": "size-file", className: D.sizeFile, children: [
6282
6293
  r.size.toFixed(1),
6283
6294
  "MB"
6284
6295
  ] })
6285
6296
  ] }),
6286
- /* @__PURE__ */ a.jsxs("div", { className: H.buttonContainer, children: [
6297
+ /* @__PURE__ */ a.jsxs("div", { className: D.buttonContainer, children: [
6287
6298
  /* @__PURE__ */ a.jsx(
6288
- T,
6299
+ F,
6289
6300
  {
6290
6301
  "data-testid": "download-button",
6291
6302
  classNames: {
6292
- base: f(H.button.basic, H.button.active),
6293
- icon: H.iconHover
6303
+ base: f(D.button.basic, D.button.active),
6304
+ icon: D.iconHover
6294
6305
  },
6295
6306
  onClick: i,
6296
6307
  variant: "text",
@@ -6299,12 +6310,12 @@ const al = {
6299
6310
  }
6300
6311
  ),
6301
6312
  /* @__PURE__ */ a.jsx(
6302
- T,
6313
+ F,
6303
6314
  {
6304
6315
  "data-testid": "show-button",
6305
6316
  classNames: {
6306
- base: f(H.button.basic, H.button.active),
6307
- icon: H.iconHover
6317
+ base: f(D.button.basic, D.button.active),
6318
+ icon: D.iconHover
6308
6319
  },
6309
6320
  onClick: l,
6310
6321
  variant: "text",
@@ -6313,12 +6324,12 @@ const al = {
6313
6324
  }
6314
6325
  ),
6315
6326
  /* @__PURE__ */ a.jsx(
6316
- T,
6327
+ F,
6317
6328
  {
6318
6329
  "data-testid": "delete-button",
6319
6330
  classNames: {
6320
- base: f(H.button.basic, H.button.active),
6321
- icon: H.iconHover
6331
+ base: f(D.button.basic, D.button.active),
6332
+ icon: D.iconHover
6322
6333
  },
6323
6334
  onClick: o,
6324
6335
  variant: "text",
@@ -6329,11 +6340,11 @@ const al = {
6329
6340
  ] })
6330
6341
  ] })
6331
6342
  ] }),
6332
- n && /* @__PURE__ */ a.jsx("div", { className: H.overlay })
6343
+ n && /* @__PURE__ */ a.jsx("div", { className: D.overlay })
6333
6344
  ]
6334
6345
  }
6335
6346
  ) : null
6336
- ), H = {
6347
+ ), D = {
6337
6348
  wrapper: "flex items-center justify-center w-[371px] h-max px-[30px] py-3 relative border border-dark-30/[.15] border-[1.5px] hover:border-primary-20/[.30] focus:border-primary-10 transition-colors duration-200",
6338
6349
  wrapperContainer: "flex items-center flex-col w-80 h-[60px]",
6339
6350
  titleContainer: "flex justify-between w-full",
@@ -6406,7 +6417,7 @@ const al = {
6406
6417
  ),
6407
6418
  /* @__PURE__ */ a.jsxs("div", { className: ne.buttonContainer.button, children: [
6408
6419
  /* @__PURE__ */ a.jsx(
6409
- T,
6420
+ F,
6410
6421
  {
6411
6422
  "data-testid": "download-button",
6412
6423
  classNames: {
@@ -6420,7 +6431,7 @@ const al = {
6420
6431
  }
6421
6432
  ),
6422
6433
  /* @__PURE__ */ a.jsx(
6423
- T,
6434
+ F,
6424
6435
  {
6425
6436
  "data-testid": "show-button",
6426
6437
  classNames: {
@@ -6434,7 +6445,7 @@ const al = {
6434
6445
  }
6435
6446
  ),
6436
6447
  /* @__PURE__ */ a.jsx(
6437
- T,
6448
+ F,
6438
6449
  {
6439
6450
  "data-testid": "delete-button",
6440
6451
  classNames: {
@@ -6476,7 +6487,7 @@ const al = {
6476
6487
  classNames: o
6477
6488
  }) => /* @__PURE__ */ a.jsxs("div", { className: f(ge.container, o == null ? void 0 : o.root), children: [
6478
6489
  /* @__PURE__ */ a.jsx("div", { className: ge.header, children: /* @__PURE__ */ a.jsx(
6479
- T,
6490
+ F,
6480
6491
  {
6481
6492
  icon: t,
6482
6493
  variant: "text",
@@ -6598,7 +6609,7 @@ const al = {
6598
6609
  value: "text-sm text-dark-30 font-semibold"
6599
6610
  }, ll = ve(
6600
6611
  ({ classNames: e, disabled: r, onChange: t, placeholder: n = "Choose", value: o, label: i }, l) => {
6601
- const [d, u] = N(!1), [s, c] = N([]), [p, h] = N(""), [g, v] = N(""), [q, m] = N(null), E = $t(s)(o), x = We.base, C = We.options, I = We.disabled.trigger, j = We.disabled.triggerText, P = ({
6612
+ const [d, u] = k(!1), [s, c] = k([]), [p, h] = k(""), [g, v] = k(""), [q, m] = k(null), E = $t(s)(o), x = We.base, C = We.options, I = We.disabled.trigger, j = We.disabled.triggerText, P = ({
6602
6613
  className: b,
6603
6614
  text: R = ""
6604
6615
  }) => /* @__PURE__ */ a.jsx(
@@ -6630,12 +6641,12 @@ const al = {
6630
6641
  }
6631
6642
  }, z = (b) => {
6632
6643
  c((R) => R.filter((Q) => Q.value !== b)), g === b && (v(""), t(""));
6633
- }, F = (b) => {
6644
+ }, S = (b) => {
6634
6645
  const R = s.find((Q) => Q.value === b);
6635
6646
  R && (h(R.label), m(b));
6636
6647
  }, B = () => {
6637
6648
  h(""), m(null);
6638
- }, M = () => {
6649
+ }, T = () => {
6639
6650
  g && (u(!1), t(g));
6640
6651
  };
6641
6652
  return /* @__PURE__ */ a.jsxs("div", { className: We.container, children: [
@@ -6724,7 +6735,7 @@ const al = {
6724
6735
  ),
6725
6736
  /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2", children: [
6726
6737
  /* @__PURE__ */ a.jsx(
6727
- T,
6738
+ F,
6728
6739
  {
6729
6740
  variant: "text",
6730
6741
  icon: _n,
@@ -6733,7 +6744,7 @@ const al = {
6733
6744
  icon: "fill-dark-50/[0.5] text-dark-50/[0.5]"
6734
6745
  },
6735
6746
  onClick: (R) => {
6736
- R.stopPropagation(), F(b.value);
6747
+ R.stopPropagation(), S(b.value);
6737
6748
  },
6738
6749
  iconDimensions: {
6739
6750
  height: 20,
@@ -6744,7 +6755,7 @@ const al = {
6744
6755
  }
6745
6756
  ),
6746
6757
  /* @__PURE__ */ a.jsx(
6747
- T,
6758
+ F,
6748
6759
  {
6749
6760
  variant: "text",
6750
6761
  icon: $e,
@@ -6770,7 +6781,7 @@ const al = {
6770
6781
  ))) }),
6771
6782
  /* @__PURE__ */ a.jsxs("div", { className: f(C.primaryActionsWrapper), children: [
6772
6783
  /* @__PURE__ */ a.jsx(
6773
- T,
6784
+ F,
6774
6785
  {
6775
6786
  type: "button",
6776
6787
  variant: "secondary",
@@ -6783,14 +6794,14 @@ const al = {
6783
6794
  }
6784
6795
  ),
6785
6796
  /* @__PURE__ */ a.jsx(
6786
- T,
6797
+ F,
6787
6798
  {
6788
6799
  type: "button",
6789
6800
  variant: "primary",
6790
6801
  className: f(C.primaryActionApply),
6791
6802
  "aria-label": "Применить выбранные пункты",
6792
6803
  isShadow: !0,
6793
- onClick: M,
6804
+ onClick: T,
6794
6805
  children: "Сохранить"
6795
6806
  }
6796
6807
  )
@@ -6908,7 +6919,7 @@ const We = {
6908
6919
  children: [
6909
6920
  /* @__PURE__ */ a.jsxs(be, { open: u, onOpenChange: s, children: [
6910
6921
  /* @__PURE__ */ a.jsx(Ee, { asChild: !0, children: /* @__PURE__ */ a.jsx(
6911
- T,
6922
+ F,
6912
6923
  {
6913
6924
  variant: "text",
6914
6925
  type: "button",
@@ -7011,7 +7022,7 @@ const We = {
7011
7022
  onSelectChat: r,
7012
7023
  classNames: t
7013
7024
  }) => {
7014
- const [n, o] = N(null), [i, l] = N(""), d = (u) => {
7025
+ const [n, o] = k(null), [i, l] = k(""), d = (u) => {
7015
7026
  o(u), r == null || r(u);
7016
7027
  };
7017
7028
  return /* @__PURE__ */ a.jsxs("div", { className: f(Sn.wrapper, t == null ? void 0 : t.wrapper), children: [
@@ -7159,7 +7170,7 @@ const We = {
7159
7170
  " сообщения"
7160
7171
  ] }),
7161
7172
  /* @__PURE__ */ a.jsx(
7162
- T,
7173
+ F,
7163
7174
  {
7164
7175
  variant: "text",
7165
7176
  icon: $e,
@@ -7248,7 +7259,7 @@ const We = {
7248
7259
  text: "Удалить"
7249
7260
  }
7250
7261
  ], _l = ({ trigger: e, onClick: r }) => {
7251
- const [t, n] = N(!1), o = (c) => {
7262
+ const [t, n] = k(!1), o = (c) => {
7252
7263
  c.preventDefault(), n(!0);
7253
7264
  }, i = (c) => {
7254
7265
  r(c), n(!1);
@@ -7270,7 +7281,7 @@ const We = {
7270
7281
  side: "top",
7271
7282
  className: St.wrapper,
7272
7283
  children: ul.map(({ id: c, icon: p, iconSizes: h, isDanger: g, text: v }) => /* @__PURE__ */ a.jsx(
7273
- T,
7284
+ F,
7274
7285
  {
7275
7286
  "data-testid": "action",
7276
7287
  variant: "text",
@@ -7327,7 +7338,7 @@ export {
7327
7338
  Il as F,
7328
7339
  In as G,
7329
7340
  Pl as H,
7330
- S as I,
7341
+ H as I,
7331
7342
  Ql as J,
7332
7343
  Ue as K,
7333
7344
  Xl as L,
@@ -7378,7 +7389,7 @@ export {
7378
7389
  il as ai,
7379
7390
  al as aj,
7380
7391
  Wl as ak,
7381
- H as al,
7392
+ D as al,
7382
7393
  Nl as am,
7383
7394
  ne as an,
7384
7395
  kl as ao,
@@ -7398,13 +7409,13 @@ export {
7398
7409
  jr as d,
7399
7410
  it as e,
7400
7411
  Rl as f,
7401
- G as g,
7412
+ W as g,
7402
7413
  X as h,
7403
7414
  Pa as i,
7404
7415
  Cn as j,
7405
7416
  Z as k,
7406
7417
  wl as l,
7407
- W as m,
7418
+ N as m,
7408
7419
  Bt as n,
7409
7420
  Qa as o,
7410
7421
  ca as p,
@@ -4,8 +4,8 @@ export declare const UploadInput: React.ForwardRefExoticComponent<Omit<Omit<Toog
4
4
  disabled?: boolean;
5
5
  label: string;
6
6
  placeholder?: string;
7
- files: File[] | null;
8
- onChange: (files: File[] | null) => void;
7
+ files: File | File[] | null;
8
+ onChange: (files: File | File[] | null) => void;
9
9
  multiple?: boolean;
10
10
  message?: string;
11
11
  status?: "danger";
@@ -12,8 +12,8 @@ export type UploadInputProps = Omit<React.ComponentPropsWithoutRef<typeof Toogle
12
12
  disabled?: boolean;
13
13
  label: string;
14
14
  placeholder?: string;
15
- files: File[] | null;
16
- onChange: (files: File[] | null) => void;
15
+ files: File | File[] | null;
16
+ onChange: (files: File | File[] | null) => void;
17
17
  multiple?: boolean;
18
18
  message?: string;
19
19
  status?: 'danger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namuna-nur/ui-kit",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "UI Kit for Namuna NUR",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",