mimir-ui-kit 1.61.0 → 1.61.1

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 { jsxs as v, jsx as l } from "react/jsx-runtime";
2
- import { c as n } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as E, useState as r, useCallback as a } from "react";
1
+ import { jsxs as N, jsx as _ } from "react/jsx-runtime";
2
+ import { c as r } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as E, useState as c, useCallback as i } from "react";
4
4
  import { Icon as H } from "../../icons/Icon.js";
5
5
  import '../../assets/CopyText.css';const L = "_wrapper_1t6ix_2", R = "_container_1t6ix_7", k = "_disabled_1t6ix_14", B = "_hovered_1t6ix_19", q = "_text_1t6ix_23", z = "_pressed_1t6ix_26", G = "_icon_1t6ix_30", J = "_visible_1t6ix_40", K = "_toast_1t6ix_49", Q = "_fadeOut_1t6ix_66", e = {
6
6
  wrapper: L,
@@ -15,58 +15,58 @@ import '../../assets/CopyText.css';const L = "_wrapper_1t6ix_2", R = "_container
15
15
  "slide-in": "_slide-in_1t6ix_1",
16
16
  fadeOut: Q,
17
17
  "slide-out": "_slide-out_1t6ix_1"
18
- }, N = 200, V = E(
19
- (T, b) => {
18
+ }, T = 200, V = E(
19
+ (b, w) => {
20
20
  const {
21
21
  text: s,
22
- className: w,
23
- onCopy: i,
24
- showToast: _ = !0,
25
- toastDuration: p = 2e3,
26
- toastText: M = "Скопировано в буфер обмена",
22
+ className: M,
23
+ onCopy: n,
24
+ showToast: p = !0,
25
+ toastDuration: u = 2e3,
26
+ toastText: y = "Скопировано в буфер обмена",
27
27
  disabled: t = !1,
28
- showCopyButton: y = !1,
28
+ showCopyButton: o = !1,
29
29
  defaultText: C,
30
30
  ...O
31
- } = T, [u, x] = r(y), [o, f] = r(!1), [I, m] = r(!1), [D, c] = r(!1), h = a(async () => {
31
+ } = b, [f, x] = c(o), [a, m] = c(!1), [I, h] = c(!1), [D, d] = c(!1), v = i(async () => {
32
32
  if (!t)
33
33
  try {
34
- if (await navigator.clipboard.writeText(s), _) {
35
- m(!0), c(!1);
36
- const d = Math.max(
37
- p - N,
34
+ if (await navigator.clipboard.writeText(s), p) {
35
+ h(!0), d(!1);
36
+ const l = Math.max(
37
+ u - T,
38
38
  0
39
39
  );
40
40
  setTimeout(() => {
41
- c(!0), setTimeout(() => {
42
- m(!1), c(!1);
43
- }, N);
44
- }, d);
41
+ d(!0), setTimeout(() => {
42
+ h(!1), d(!1);
43
+ }, T);
44
+ }, l);
45
45
  }
46
- i == null || i(s);
47
- } catch (d) {
48
- console.error("Failed to copy text:", d);
46
+ n == null || n(s);
47
+ } catch (l) {
48
+ console.error("Failed to copy text:", l);
49
49
  }
50
- }, [s, i, _, p, t]), S = a(() => {
51
- t || x(!0);
52
- }, [t]), g = a(() => {
53
- x(!1);
54
- }, []), A = a(() => {
55
- !t && s && f(!0);
56
- }, [t, s]), F = a(() => {
57
- s && !t && o && (f(!1), h());
58
- }, [t, o, s, h]), P = n(e.container, w, {
50
+ }, [s, n, p, u, t]), S = i(() => {
51
+ o || t || x(!0);
52
+ }, [t, o]), g = i(() => {
53
+ o || x(!1);
54
+ }, [o]), A = i(() => {
55
+ !t && s && m(!0);
56
+ }, [t, s]), F = i(() => {
57
+ s && !t && a && (m(!1), v());
58
+ }, [t, a, s, v]), P = r(e.container, M, {
59
59
  [e.disabled]: t,
60
- [e.hovered]: u,
61
- [e.pressed]: o
62
- }), U = n(e.text, {
63
- [e.pressed]: o
64
- }), j = n(e.icon, {
65
- [e.pressed]: o,
66
- [e.visible]: u
60
+ [e.hovered]: f,
61
+ [e.pressed]: a
62
+ }), U = r(e.text, {
63
+ [e.pressed]: a
64
+ }), j = r(e.icon, {
65
+ [e.pressed]: a,
66
+ [e.visible]: f
67
67
  });
68
- return /* @__PURE__ */ v("div", { ref: b, className: e.wrapper, ...O, children: [
69
- /* @__PURE__ */ v(
68
+ return /* @__PURE__ */ N("div", { ref: w, className: e.wrapper, ...O, children: [
69
+ /* @__PURE__ */ N(
70
70
  "div",
71
71
  {
72
72
  className: P,
@@ -75,18 +75,18 @@ import '../../assets/CopyText.css';const L = "_wrapper_1t6ix_2", R = "_container
75
75
  onMouseDown: A,
76
76
  onMouseUp: F,
77
77
  children: [
78
- /* @__PURE__ */ l("span", { className: U, children: s || C }),
79
- s && /* @__PURE__ */ l(H, { iconName: "CopyClipboard16px", className: j })
78
+ /* @__PURE__ */ _("span", { className: U, children: s || C }),
79
+ s && /* @__PURE__ */ _(H, { iconName: "CopyClipboard16px", className: j })
80
80
  ]
81
81
  }
82
82
  ),
83
- I && /* @__PURE__ */ l(
83
+ I && /* @__PURE__ */ _(
84
84
  "div",
85
85
  {
86
- className: n(e.toast, {
86
+ className: r(e.toast, {
87
87
  [e.fadeOut]: D
88
88
  }),
89
- children: M
89
+ children: y
90
90
  }
91
91
  )
92
92
  ] });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.61.0",
4
+ "version": "1.61.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {