@matbea-ui/matbea-ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/matbea-ui.cjs.js +1 -933
- package/dist/matbea-ui.cjs10.js +1 -0
- package/dist/matbea-ui.cjs11.js +1 -0
- package/dist/matbea-ui.cjs12.js +1 -0
- package/dist/matbea-ui.cjs13.js +1 -0
- package/dist/matbea-ui.cjs14.js +1 -0
- package/dist/matbea-ui.cjs15.js +1 -0
- package/dist/matbea-ui.cjs16.js +1 -0
- package/dist/matbea-ui.cjs17.js +1 -0
- package/dist/matbea-ui.cjs18.js +1 -0
- package/dist/matbea-ui.cjs19.js +1 -0
- package/dist/matbea-ui.cjs2.js +1 -0
- package/dist/matbea-ui.cjs20.js +1 -0
- package/dist/matbea-ui.cjs21.js +1 -0
- package/dist/matbea-ui.cjs22.js +1 -0
- package/dist/matbea-ui.cjs23.js +1 -0
- package/dist/matbea-ui.cjs24.js +1 -0
- package/dist/matbea-ui.cjs25.js +1 -0
- package/dist/matbea-ui.cjs26.js +1 -0
- package/dist/matbea-ui.cjs27.js +1 -0
- package/dist/matbea-ui.cjs28.js +1 -0
- package/dist/matbea-ui.cjs29.js +63 -0
- package/dist/matbea-ui.cjs3.js +1 -0
- package/dist/matbea-ui.cjs30.js +34 -0
- package/dist/matbea-ui.cjs31.js +44 -0
- package/dist/matbea-ui.cjs32.js +1 -0
- package/dist/matbea-ui.cjs33.js +11 -0
- package/dist/matbea-ui.cjs34.js +71 -0
- package/dist/matbea-ui.cjs35.js +14 -0
- package/dist/matbea-ui.cjs36.js +11 -0
- package/dist/matbea-ui.cjs37.js +1 -0
- package/dist/matbea-ui.cjs38.js +1 -0
- package/dist/matbea-ui.cjs39.js +37 -0
- package/dist/matbea-ui.cjs4.js +1 -0
- package/dist/matbea-ui.cjs40.js +62 -0
- package/dist/matbea-ui.cjs41.js +102 -0
- package/dist/matbea-ui.cjs42.js +103 -0
- package/dist/matbea-ui.cjs43.js +7 -0
- package/dist/matbea-ui.cjs44.js +1 -0
- package/dist/matbea-ui.cjs45.js +1 -0
- package/dist/matbea-ui.cjs46.js +55 -0
- package/dist/matbea-ui.cjs47.js +23 -0
- package/dist/matbea-ui.cjs48.js +38 -0
- package/dist/matbea-ui.cjs49.js +51 -0
- package/dist/matbea-ui.cjs5.js +1 -0
- package/dist/matbea-ui.cjs50.js +1 -0
- package/dist/matbea-ui.cjs51.js +27 -0
- package/dist/matbea-ui.cjs52.js +48 -0
- package/dist/matbea-ui.cjs53.js +1 -0
- package/dist/matbea-ui.cjs54.js +1 -0
- package/dist/matbea-ui.cjs55.js +1 -0
- package/dist/matbea-ui.cjs56.js +34 -0
- package/dist/matbea-ui.cjs57.js +11 -0
- package/dist/matbea-ui.cjs58.js +24 -0
- package/dist/matbea-ui.cjs59.js +27 -0
- package/dist/matbea-ui.cjs6.js +1 -0
- package/dist/matbea-ui.cjs60.js +29 -0
- package/dist/matbea-ui.cjs61.js +1 -0
- package/dist/matbea-ui.cjs62.js +20 -0
- package/dist/matbea-ui.cjs63.js +1 -0
- package/dist/matbea-ui.cjs64.js +1 -0
- package/dist/matbea-ui.cjs65.js +1 -0
- package/dist/matbea-ui.cjs66.js +6 -0
- package/dist/matbea-ui.cjs67.js +6 -0
- package/dist/matbea-ui.cjs68.js +1 -0
- package/dist/matbea-ui.cjs69.js +1 -0
- package/dist/matbea-ui.cjs7.js +1 -0
- package/dist/matbea-ui.cjs70.js +1 -0
- package/dist/matbea-ui.cjs71.js +1 -0
- package/dist/matbea-ui.cjs72.js +1 -0
- package/dist/matbea-ui.cjs8.js +1 -0
- package/dist/matbea-ui.cjs9.js +1 -0
- package/dist/matbea-ui.es.js +54 -2670
- package/dist/matbea-ui.es10.js +10 -0
- package/dist/matbea-ui.es11.js +47 -0
- package/dist/matbea-ui.es12.js +178 -0
- package/dist/matbea-ui.es13.js +188 -0
- package/dist/matbea-ui.es14.js +12 -0
- package/dist/matbea-ui.es15.js +31 -0
- package/dist/matbea-ui.es16.js +25 -0
- package/dist/matbea-ui.es17.js +40 -0
- package/dist/matbea-ui.es18.js +43 -0
- package/dist/matbea-ui.es19.js +25 -0
- package/dist/matbea-ui.es2.js +38 -0
- package/dist/matbea-ui.es20.js +13 -0
- package/dist/matbea-ui.es21.js +33 -0
- package/dist/matbea-ui.es22.js +16 -0
- package/dist/matbea-ui.es23.js +25 -0
- package/dist/matbea-ui.es24.js +36 -0
- package/dist/matbea-ui.es25.js +29 -0
- package/dist/matbea-ui.es26.js +30 -0
- package/dist/matbea-ui.es27.js +20 -0
- package/dist/matbea-ui.es28.js +5 -0
- package/dist/matbea-ui.es29.js +163 -0
- package/dist/matbea-ui.es3.js +24 -0
- package/dist/matbea-ui.es30.js +40 -0
- package/dist/matbea-ui.es31.js +330 -0
- package/dist/matbea-ui.es32.js +15 -0
- package/dist/matbea-ui.es33.js +26 -0
- package/dist/matbea-ui.es34.js +85 -0
- package/dist/matbea-ui.es35.js +18 -0
- package/dist/matbea-ui.es36.js +18 -0
- package/dist/matbea-ui.es37.js +24 -0
- package/dist/matbea-ui.es38.js +10 -0
- package/dist/matbea-ui.es39.js +42 -0
- package/dist/matbea-ui.es4.js +31 -0
- package/dist/matbea-ui.es40.js +70 -0
- package/dist/matbea-ui.es41.js +119 -0
- package/dist/matbea-ui.es42.js +131 -0
- package/dist/matbea-ui.es43.js +13 -0
- package/dist/matbea-ui.es44.js +25 -0
- package/dist/matbea-ui.es45.js +34 -0
- package/dist/matbea-ui.es46.js +64 -0
- package/dist/matbea-ui.es47.js +39 -0
- package/dist/matbea-ui.es48.js +44 -0
- package/dist/matbea-ui.es49.js +58 -0
- package/dist/matbea-ui.es5.js +19 -0
- package/dist/matbea-ui.es50.js +26 -0
- package/dist/matbea-ui.es51.js +58 -0
- package/dist/matbea-ui.es52.js +62 -0
- package/dist/matbea-ui.es53.js +12 -0
- package/dist/matbea-ui.es54.js +12 -0
- package/dist/matbea-ui.es55.js +15 -0
- package/dist/matbea-ui.es56.js +74 -0
- package/dist/matbea-ui.es57.js +17 -0
- package/dist/matbea-ui.es58.js +55 -0
- package/dist/matbea-ui.es59.js +57 -0
- package/dist/matbea-ui.es6.js +62 -0
- package/dist/matbea-ui.es60.js +59 -0
- package/dist/matbea-ui.es61.js +21 -0
- package/dist/matbea-ui.es62.js +34 -0
- package/dist/matbea-ui.es63.js +10 -0
- package/dist/matbea-ui.es64.js +4 -0
- package/dist/matbea-ui.es65.js +26 -0
- package/dist/matbea-ui.es66.js +236 -0
- package/dist/matbea-ui.es67.js +10 -0
- package/dist/matbea-ui.es68.js +9 -0
- package/dist/matbea-ui.es69.js +12 -0
- package/dist/matbea-ui.es7.js +5 -0
- package/dist/matbea-ui.es70.js +4 -0
- package/dist/matbea-ui.es71.js +4 -0
- package/dist/matbea-ui.es72.js +17 -0
- package/dist/matbea-ui.es8.js +6 -0
- package/dist/matbea-ui.es9.js +27 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { j as e } from "./matbea-ui.es28.js";
|
|
2
|
+
import { BalanceRowStyled as o, BalanceCell as l, BalanceCellActions as a } from "./matbea-ui.es57.js";
|
|
3
|
+
const x = ({
|
|
4
|
+
valueLabel: n,
|
|
5
|
+
count: r,
|
|
6
|
+
amount: c,
|
|
7
|
+
actions: s
|
|
8
|
+
}) => /* @__PURE__ */ e.jsxs(o, { children: [
|
|
9
|
+
/* @__PURE__ */ e.jsx(l, { children: n }),
|
|
10
|
+
/* @__PURE__ */ e.jsx(l, { children: r }),
|
|
11
|
+
/* @__PURE__ */ e.jsx(l, { children: c }),
|
|
12
|
+
/* @__PURE__ */ e.jsx(a, { children: s })
|
|
13
|
+
] });
|
|
14
|
+
export {
|
|
15
|
+
x as BalanceRow
|
|
16
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { j as r } from "./matbea-ui.es28.js";
|
|
2
|
+
import { CurrencyNameStyled as o, CurrencyNameLongname as s, CurrencyNameShortname as a, CurrencyNameNetwork as i } from "./matbea-ui.es58.js";
|
|
3
|
+
const j = ({
|
|
4
|
+
icon: m,
|
|
5
|
+
network: e,
|
|
6
|
+
longName: c,
|
|
7
|
+
shortName: n
|
|
8
|
+
}) => /* @__PURE__ */ r.jsxs(
|
|
9
|
+
o,
|
|
10
|
+
{
|
|
11
|
+
$icon: !!m,
|
|
12
|
+
$longname: !!c,
|
|
13
|
+
$shortname: !!n,
|
|
14
|
+
$network: !!e,
|
|
15
|
+
children: [
|
|
16
|
+
m,
|
|
17
|
+
/* @__PURE__ */ r.jsx(s, { children: c }),
|
|
18
|
+
n && /* @__PURE__ */ r.jsx(a, { children: n }),
|
|
19
|
+
e && /* @__PURE__ */ r.jsx(i, { children: e })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
j as CurrencyName
|
|
25
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { j as r } from "./matbea-ui.es28.js";
|
|
2
|
+
import { CurrencyRateCard as h, CurrencyRateBody as C, CurrencyRateBox as c, CurrencyRatePriceLabel as s, CurrencyRateAmount as t } from "./matbea-ui.es59.js";
|
|
3
|
+
import { CurrencyName as R } from "./matbea-ui.es23.js";
|
|
4
|
+
const f = ({
|
|
5
|
+
longName: i,
|
|
6
|
+
shortName: x,
|
|
7
|
+
network: o,
|
|
8
|
+
icon: j,
|
|
9
|
+
buyLabel: d,
|
|
10
|
+
sellLabel: m,
|
|
11
|
+
buyValue: e,
|
|
12
|
+
sellValue: n
|
|
13
|
+
}) => /* @__PURE__ */ r.jsxs(h, { children: [
|
|
14
|
+
/* @__PURE__ */ r.jsx(
|
|
15
|
+
R,
|
|
16
|
+
{
|
|
17
|
+
longName: i,
|
|
18
|
+
shortName: x,
|
|
19
|
+
network: o,
|
|
20
|
+
icon: j
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
(e || n) && /* @__PURE__ */ r.jsxs(C, { children: [
|
|
24
|
+
e && /* @__PURE__ */ r.jsxs(c, { children: [
|
|
25
|
+
/* @__PURE__ */ r.jsx(s, { children: d }),
|
|
26
|
+
/* @__PURE__ */ r.jsx(t, { children: e })
|
|
27
|
+
] }),
|
|
28
|
+
n && /* @__PURE__ */ r.jsxs(c, { children: [
|
|
29
|
+
/* @__PURE__ */ r.jsx(s, { children: m }),
|
|
30
|
+
/* @__PURE__ */ r.jsx(t, { children: n })
|
|
31
|
+
] })
|
|
32
|
+
] })
|
|
33
|
+
] });
|
|
34
|
+
export {
|
|
35
|
+
f as CurrencyRate
|
|
36
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { j as s } from "./matbea-ui.es28.js";
|
|
2
|
+
import { formatCardNumber as h } from "./matbea-ui.es27.js";
|
|
3
|
+
import { RequisitesStyled as d, RequisitesItemLabel as i, RequisitesItemValue as t } from "./matbea-ui.es60.js";
|
|
4
|
+
import { CopyButton as c } from "./matbea-ui.es61.js";
|
|
5
|
+
const q = ({
|
|
6
|
+
cardHolderLabel: r,
|
|
7
|
+
cardHolderName: o,
|
|
8
|
+
cardNumberLabel: x,
|
|
9
|
+
cardNumber: e,
|
|
10
|
+
merchantLabel: n,
|
|
11
|
+
merchantName: j,
|
|
12
|
+
descriptionLabel: l,
|
|
13
|
+
description: m
|
|
14
|
+
}) => /* @__PURE__ */ s.jsxs(d, { children: [
|
|
15
|
+
/* @__PURE__ */ s.jsx(i, { children: r }),
|
|
16
|
+
/* @__PURE__ */ s.jsx(t, { children: o }),
|
|
17
|
+
/* @__PURE__ */ s.jsx(i, { children: x }),
|
|
18
|
+
/* @__PURE__ */ s.jsxs(t, { children: [
|
|
19
|
+
e && h(e),
|
|
20
|
+
e && /* @__PURE__ */ s.jsx(c, { text: e.toString() })
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ s.jsx(i, { children: n }),
|
|
23
|
+
/* @__PURE__ */ s.jsx(t, { children: j }),
|
|
24
|
+
/* @__PURE__ */ s.jsx(i, { children: l }),
|
|
25
|
+
/* @__PURE__ */ s.jsx(t, { children: m })
|
|
26
|
+
] });
|
|
27
|
+
export {
|
|
28
|
+
q as Requisites
|
|
29
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as s } from "./matbea-ui.es28.js";
|
|
2
|
+
import { useMemo as a } from "react";
|
|
3
|
+
import { ClockIcon as c } from "./matbea-ui.es53.js";
|
|
4
|
+
import { SuccessfullSmallIcon as e } from "./matbea-ui.es54.js";
|
|
5
|
+
import { TransactionStatusStyled as i, TransactionStatusLabel as u, TransactionStatusContent as l, TransactionStatusValue as m } from "./matbea-ui.es62.js";
|
|
6
|
+
const p = ({
|
|
7
|
+
label: n,
|
|
8
|
+
statusValue: r,
|
|
9
|
+
type: t
|
|
10
|
+
}) => {
|
|
11
|
+
const o = a(() => {
|
|
12
|
+
switch (t) {
|
|
13
|
+
case "success":
|
|
14
|
+
return /* @__PURE__ */ s.jsx(e, { size: 18 });
|
|
15
|
+
case "pending":
|
|
16
|
+
default:
|
|
17
|
+
return /* @__PURE__ */ s.jsx(c, { size: 18 });
|
|
18
|
+
}
|
|
19
|
+
}, [t]);
|
|
20
|
+
return /* @__PURE__ */ s.jsxs(i, { children: [
|
|
21
|
+
/* @__PURE__ */ s.jsx(u, { children: n }),
|
|
22
|
+
/* @__PURE__ */ s.jsxs(l, { children: [
|
|
23
|
+
o,
|
|
24
|
+
/* @__PURE__ */ s.jsx(m, { children: r })
|
|
25
|
+
] })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
p as TransactionStatus
|
|
30
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const l = (r, e = 4, c = 7) => {
|
|
2
|
+
const t = r.trim();
|
|
3
|
+
if (!t) return t;
|
|
4
|
+
const o = t.lastIndexOf(".");
|
|
5
|
+
if (o <= 0 || o === t.length - 1)
|
|
6
|
+
return t;
|
|
7
|
+
const s = t.slice(o + 1), n = t.slice(0, o).replace(/[@.]/g, "").slice(0, e), a = "*".repeat(c);
|
|
8
|
+
return `${n}${a}${s}`;
|
|
9
|
+
}, d = (r) => r.toString().padStart(16, "0").replace(/(\d{4})(?=\d)/g, "$1 "), g = async (r) => {
|
|
10
|
+
try {
|
|
11
|
+
await navigator.clipboard.writeText(r), console.log("Скопировано в буфер обмена");
|
|
12
|
+
} catch (e) {
|
|
13
|
+
console.error("Ошибка копирования:", e);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
g as copyToClipboard,
|
|
18
|
+
d as formatCardNumber,
|
|
19
|
+
l as maskEmail
|
|
20
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import l, { css as i } from "styled-components";
|
|
2
|
+
const a = {
|
|
3
|
+
default: {
|
|
4
|
+
padding: "15px 22px",
|
|
5
|
+
minHeight: "48px",
|
|
6
|
+
fontSize: "15px",
|
|
7
|
+
lineHeight: "18px",
|
|
8
|
+
gap: "10px",
|
|
9
|
+
iconGap: "6px"
|
|
10
|
+
},
|
|
11
|
+
medium: {
|
|
12
|
+
padding: "12px 16px",
|
|
13
|
+
minHeight: "42px",
|
|
14
|
+
fontSize: "15px",
|
|
15
|
+
lineHeight: "18px",
|
|
16
|
+
gap: "10px",
|
|
17
|
+
iconGap: "6px"
|
|
18
|
+
},
|
|
19
|
+
small: {
|
|
20
|
+
padding: "10px",
|
|
21
|
+
minHeight: "36px",
|
|
22
|
+
fontSize: "14px",
|
|
23
|
+
lineHeight: "17px",
|
|
24
|
+
gap: "4px",
|
|
25
|
+
iconGap: "4px"
|
|
26
|
+
}
|
|
27
|
+
}, p = (e) => ({ theme: t }) => {
|
|
28
|
+
const r = t.colors, o = {
|
|
29
|
+
primary: {
|
|
30
|
+
default: {
|
|
31
|
+
bg: r.primary.primaryBlue,
|
|
32
|
+
color: r.primary.white,
|
|
33
|
+
border: r.primary.primaryBlue
|
|
34
|
+
},
|
|
35
|
+
hover: {
|
|
36
|
+
bg: r.primary.hoverBlue,
|
|
37
|
+
color: r.primary.white,
|
|
38
|
+
border: r.primary.hoverBlue
|
|
39
|
+
},
|
|
40
|
+
active: {
|
|
41
|
+
bg: r.primary.activeBlue,
|
|
42
|
+
color: r.primary.white,
|
|
43
|
+
border: r.primary.activeBlue
|
|
44
|
+
},
|
|
45
|
+
disabled: {
|
|
46
|
+
bg: r.gray.lightGray2,
|
|
47
|
+
color: r.gray.darkGray,
|
|
48
|
+
border: r.gray.lightGray2
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
secondary: {
|
|
52
|
+
default: {
|
|
53
|
+
bg: "transparent",
|
|
54
|
+
color: r.primary.primaryBlue,
|
|
55
|
+
border: r.primary.primaryBlue
|
|
56
|
+
},
|
|
57
|
+
hover: {
|
|
58
|
+
bg: r.primary.primaryBlue,
|
|
59
|
+
color: r.primary.white,
|
|
60
|
+
border: r.primary.primaryBlue
|
|
61
|
+
},
|
|
62
|
+
active: {
|
|
63
|
+
bg: r.primary.activeBlue,
|
|
64
|
+
color: r.primary.white,
|
|
65
|
+
border: r.primary.activeBlue
|
|
66
|
+
},
|
|
67
|
+
disabled: {
|
|
68
|
+
bg: "transparent",
|
|
69
|
+
color: r.gray.darkGray,
|
|
70
|
+
border: r.gray.lightGray2
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
tertiary: {
|
|
74
|
+
default: {
|
|
75
|
+
bg: "transparent",
|
|
76
|
+
color: r.primary.primaryBlue,
|
|
77
|
+
border: "transparent"
|
|
78
|
+
},
|
|
79
|
+
hover: {
|
|
80
|
+
bg: r.gray.lightBlueGray,
|
|
81
|
+
color: r.primary.primaryBlue,
|
|
82
|
+
border: "transparent"
|
|
83
|
+
},
|
|
84
|
+
active: {
|
|
85
|
+
bg: r.gray.lightBlueGray2,
|
|
86
|
+
color: r.primary.primaryBlue,
|
|
87
|
+
border: "transparent"
|
|
88
|
+
},
|
|
89
|
+
disabled: {
|
|
90
|
+
bg: "transparent",
|
|
91
|
+
color: r.gray.darkGray,
|
|
92
|
+
border: "transparent"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}[e];
|
|
96
|
+
return i`
|
|
97
|
+
background-color: ${o.default.bg};
|
|
98
|
+
color: ${o.default.color};
|
|
99
|
+
border-color: ${o.default.border};
|
|
100
|
+
|
|
101
|
+
&:hover:not(:disabled) {
|
|
102
|
+
background-color: ${o.hover.bg};
|
|
103
|
+
color: ${o.hover.color};
|
|
104
|
+
border-color: ${o.hover.border};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:active:not(:disabled) {
|
|
108
|
+
background-color: ${o.active.bg};
|
|
109
|
+
color: ${o.active.color};
|
|
110
|
+
border-color: ${o.active.border};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:disabled {
|
|
114
|
+
background-color: ${o.disabled.bg};
|
|
115
|
+
color: ${o.disabled.color};
|
|
116
|
+
border-color: ${o.disabled.border};
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
}, c = l.button`
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
border: 1px solid transparent;
|
|
124
|
+
border-radius: ${({ $form: e }) => e === "brick-right" ? "0 5px 5px 0" : "5px"};
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
transition: background-color 0.15s ease, border-color 0.15s ease,
|
|
127
|
+
color 0.15s ease, opacity 0.15s ease;
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
|
|
130
|
+
${({ $size: e }) => i`
|
|
131
|
+
padding: ${a[e].padding};
|
|
132
|
+
min-height: ${a[e].minHeight};
|
|
133
|
+
font-size: ${a[e].fontSize};
|
|
134
|
+
line-height: ${a[e].lineHeight};
|
|
135
|
+
`}
|
|
136
|
+
|
|
137
|
+
${({ $hasIcon: e, $iconOnly: t, $size: r }) => i`
|
|
138
|
+
gap: ${t ? "0" : e ? a[r].iconGap : a[r].gap};
|
|
139
|
+
`}
|
|
140
|
+
|
|
141
|
+
${({ $fullWidth: e }) => e && i`
|
|
142
|
+
width: 100%;
|
|
143
|
+
`}
|
|
144
|
+
|
|
145
|
+
${({ $variant: e }) => p(e)}
|
|
146
|
+
|
|
147
|
+
&:disabled {
|
|
148
|
+
cursor: not-allowed;
|
|
149
|
+
}
|
|
150
|
+
`, g = l.span`
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
line-height: 0;
|
|
155
|
+
${({ $iconOnly: e }) => e && i`
|
|
156
|
+
width: 18px;
|
|
157
|
+
height: 18px;
|
|
158
|
+
`}
|
|
159
|
+
`;
|
|
160
|
+
export {
|
|
161
|
+
g as IconSlot,
|
|
162
|
+
c as StyledButton
|
|
163
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as o } from "./matbea-ui.es28.js";
|
|
2
|
+
import { useState as a } from "react";
|
|
3
|
+
import { Wrapper as d, Trigger as l, Bubble as m } from "./matbea-ui.es30.js";
|
|
4
|
+
const y = ({
|
|
5
|
+
label: r,
|
|
6
|
+
children: e,
|
|
7
|
+
copiedText: i = "Скопировано!",
|
|
8
|
+
copyDuration: s = 1500
|
|
9
|
+
}) => {
|
|
10
|
+
const [p, t] = a(!1), n = async () => {
|
|
11
|
+
try {
|
|
12
|
+
await navigator.clipboard.writeText(r), t(!0), setTimeout(() => t(!1), s);
|
|
13
|
+
} catch (c) {
|
|
14
|
+
console.error("Copy failed", c);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ o.jsxs(d, { onClick: n, children: [
|
|
18
|
+
e ?? /* @__PURE__ */ o.jsx(l, { type: "button", children: r }),
|
|
19
|
+
/* @__PURE__ */ o.jsx(m, { children: p ? i : r })
|
|
20
|
+
] });
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
y as CopyTooltip
|
|
24
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { styled as o } from "styled-components";
|
|
2
|
+
const t = o.div`
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
`, n = o.button`
|
|
8
|
+
border: none;
|
|
9
|
+
background: transparent;
|
|
10
|
+
padding: 4px 8px;
|
|
11
|
+
font: inherit;
|
|
12
|
+
color: inherit;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
`, e = o.span`
|
|
15
|
+
position: absolute;
|
|
16
|
+
bottom: 100%;
|
|
17
|
+
left: 50%;
|
|
18
|
+
transform: translate(-50%, -6px);
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
background: rgba(0, 0, 0, 0.85);
|
|
21
|
+
color: #fff;
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
padding: 4px 8px;
|
|
24
|
+
border-radius: 4px;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
28
|
+
|
|
29
|
+
${t}:hover &,
|
|
30
|
+
${t}:focus-within &,
|
|
31
|
+
${t}:active & {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
transform: translate(-50%, -10px);
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
export {
|
|
37
|
+
e as Bubble,
|
|
38
|
+
n as Trigger,
|
|
39
|
+
t as Wrapper
|
|
40
|
+
};
|