@dss-kit/ui-kit 1.0.4 → 1.1.0
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/README.md +19 -0
- package/dist/components/builders/Sheet/SheetLayer.js +95 -83
- package/dist/components/builders/Sheet/hooks/index.d.ts +1 -0
- package/dist/components/builders/Sheet/hooks/useMotionValueStyle.d.ts +8 -0
- package/dist/components/builders/Sheet/hooks/useMotionValueStyle.js +14 -0
- package/dist/components/builders/Table/TablePagination/TablePagination.d.ts +10 -4
- package/dist/components/builders/Table/TablePagination/TablePagination.js +230 -177
- package/dist/components/builders/Text/Text.d.ts +4 -1
- package/dist/components/builders/Text/Text.js +78 -76
- package/dist/components/controls/Button/Button.d.ts +1 -1
- package/dist/components/controls/Button/Button.js +47 -46
- package/dist/components/controls/OtpInput/OtpInput.js +121 -143
- package/dist/components/controls/OtpInput/styles.d.ts +1 -0
- package/dist/components/controls/OtpInput/styles.js +9 -3
- package/dist/components/controls/Select/Select.js +72 -70
- package/dist/components/shared/Toast/ToastContainer.d.ts +1 -1
- package/dist/components/shared/Toast/ToastContainer.js +25 -23
- package/dist/fonts/inter-cyrillic-ext-400.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-500.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-600.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-700.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-800.woff2 +0 -0
- package/dist/fonts/inter-latin-cyrillic-400.woff2 +0 -0
- package/dist/fonts/inter-latin-cyrillic-500.woff2 +0 -0
- package/dist/fonts/inter-latin-cyrillic-600.woff2 +0 -0
- package/dist/fonts/inter-latin-cyrillic-700.woff2 +0 -0
- package/dist/fonts/inter-latin-cyrillic-800.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-500.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-700.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-800.woff2 +0 -0
- package/dist/index.js +34 -32
- package/dist/providers/MotionProvider/MotionProvider.d.ts +9 -0
- package/dist/providers/MotionProvider/MotionProvider.js +21 -0
- package/dist/providers/MotionProvider/MotionProvider.types.d.ts +12 -0
- package/dist/providers/MotionProvider/features.d.ts +1 -0
- package/dist/providers/MotionProvider/features.js +4 -0
- package/dist/providers/MotionProvider/index.d.ts +2 -0
- package/dist/providers/MotionProvider/loadMotionFeatures.d.ts +13 -0
- package/dist/providers/MotionProvider/loadMotionFeatures.js +9 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/styles/utils/breakpoints.d.ts +12 -0
- package/dist/styles/utils/breakpoints.js +20 -13
- package/dist/styles/utils/breakpoints.ts +32 -0
- package/dist/ui-kit.cjs +8 -8
- package/dist/ui-kit.css +1 -1
- package/package.json +3 -1
- package/dist/fonts/inter-normal-200.woff2 +0 -0
- package/dist/fonts/inter-normal-300.woff2 +0 -0
- package/dist/fonts/inter-normal-400.woff2 +0 -0
- package/dist/fonts/inter-normal-500.woff2 +0 -0
- package/dist/fonts/inter-normal-600.woff2 +0 -0
- package/dist/fonts/inter-normal-700.woff2 +0 -0
- package/dist/fonts/inter-normal-800.woff2 +0 -0
|
@@ -1,180 +1,233 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { css as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { jsxs as u, jsx as t, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { css as a, cx as Z } from "@emotion/css";
|
|
3
|
+
import { useRef as ee, useState as te, useEffect as ne } from "react";
|
|
4
|
+
import w from "../../../../assets/svg/table/chevron-left.svg.js";
|
|
5
|
+
import S from "../../../../assets/svg/table/chevron-right.svg.js";
|
|
6
|
+
import oe from "../../../../assets/svg/table/dots.svg.js";
|
|
7
|
+
import { bpContainer as E } from "../../../../styles/utils/breakpoints.js";
|
|
8
|
+
import { getPageNumbers as ie } from "./TablePagination.utils.js";
|
|
9
|
+
import { Select as re } from "../../../controls/Select/Select.js";
|
|
10
|
+
import { Button as V } from "../../../controls/Button/Button.js";
|
|
11
|
+
import { IconButton as f } from "../../../controls/IconButton/IconButton.js";
|
|
11
12
|
import { Box as r } from "../../Box/Box.js";
|
|
12
|
-
import { theme as
|
|
13
|
-
import { Text as
|
|
14
|
-
const { color: i, cornerRadius:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
import { theme as se } from "../../../../utils/theme/index.js";
|
|
14
|
+
import { Text as ae } from "../../Text/Text.js";
|
|
15
|
+
const { color: i, cornerRadius: le, spacing: C } = se, k = "table-pagination", ce = a({
|
|
16
|
+
containerType: "inline-size",
|
|
17
|
+
containerName: k
|
|
18
|
+
}), P = a({
|
|
19
|
+
[E.sm(k)]: {
|
|
20
|
+
display: "none"
|
|
21
|
+
}
|
|
22
|
+
}), W = a({
|
|
23
|
+
[E.sm(k, "min")]: {
|
|
24
|
+
display: "none"
|
|
25
|
+
}
|
|
26
|
+
}), We = ({
|
|
27
|
+
pageIndex: n,
|
|
28
|
+
pageSize: o,
|
|
29
|
+
totalCount: l,
|
|
18
30
|
onPageChange: s,
|
|
19
31
|
onPageSizeChange: c,
|
|
20
|
-
variant:
|
|
21
|
-
labels:
|
|
22
|
-
pageSizeOptions:
|
|
23
|
-
showPageSizeSelector:
|
|
24
|
-
renderPageSizeSelectorDropdownItem:
|
|
25
|
-
renderPageSizeSelectorInputItem:
|
|
26
|
-
className:
|
|
27
|
-
itemClassName:
|
|
28
|
-
activeItemClassName:
|
|
29
|
-
pageSizeSelectorClassName:
|
|
32
|
+
variant: p = "numbered",
|
|
33
|
+
labels: g,
|
|
34
|
+
pageSizeOptions: b = [10, 20, 50, 100],
|
|
35
|
+
showPageSizeSelector: v = !0,
|
|
36
|
+
renderPageSizeSelectorDropdownItem: I = (d) => d.label,
|
|
37
|
+
renderPageSizeSelectorInputItem: z,
|
|
38
|
+
className: A,
|
|
39
|
+
itemClassName: R,
|
|
40
|
+
activeItemClassName: M,
|
|
41
|
+
pageSizeSelectorClassName: $
|
|
30
42
|
}) => {
|
|
31
|
-
const { prev:
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
const
|
|
36
|
-
for (const
|
|
37
|
-
|
|
43
|
+
const { prev: d = "Previous", next: _ = "Next" } = g ?? {}, T = ee(null), [F, q] = te(0), B = Math.ceil(l / o), m = n > 0, h = n < B - 1;
|
|
44
|
+
ne(() => {
|
|
45
|
+
const e = T.current;
|
|
46
|
+
if (!e) return;
|
|
47
|
+
const N = new ResizeObserver((O) => {
|
|
48
|
+
for (const j of O)
|
|
49
|
+
q(j.contentRect.width);
|
|
38
50
|
});
|
|
39
|
-
return
|
|
40
|
-
|
|
51
|
+
return N.observe(e), () => {
|
|
52
|
+
N.disconnect();
|
|
41
53
|
};
|
|
42
54
|
}, []);
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
55
|
+
const G = ((e) => {
|
|
56
|
+
if (e <= 0)
|
|
45
57
|
return 1;
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
58
|
+
const L = e - 96;
|
|
59
|
+
if (L <= 40)
|
|
48
60
|
return 1;
|
|
49
|
-
const
|
|
50
|
-
return Math.max(1, Math.min(10,
|
|
51
|
-
})(
|
|
52
|
-
page:
|
|
53
|
-
count:
|
|
54
|
-
maxVisiblePages:
|
|
55
|
-
}),
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
c(Number(
|
|
61
|
+
const X = Math.floor((L + 8) / 48);
|
|
62
|
+
return Math.max(1, Math.min(10, X));
|
|
63
|
+
})(F), H = ie({
|
|
64
|
+
page: n + 1,
|
|
65
|
+
count: B,
|
|
66
|
+
maxVisiblePages: G
|
|
67
|
+
}), x = () => {
|
|
68
|
+
m && s(n - 1);
|
|
69
|
+
}, y = () => {
|
|
70
|
+
h && s(n + 1);
|
|
71
|
+
}, J = (e) => {
|
|
72
|
+
c(Number(e));
|
|
61
73
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
74
|
+
if (l === 0)
|
|
75
|
+
return null;
|
|
76
|
+
const K = () => /* @__PURE__ */ u(
|
|
77
|
+
r,
|
|
78
|
+
{
|
|
79
|
+
ref: T,
|
|
80
|
+
flex: 1,
|
|
81
|
+
row: !0,
|
|
82
|
+
overflow: "hidden",
|
|
83
|
+
gap: C.sm,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ t(
|
|
86
|
+
f,
|
|
87
|
+
{
|
|
88
|
+
onClick: x,
|
|
89
|
+
disabled: !m,
|
|
90
|
+
color: "neutral",
|
|
91
|
+
size: "sm",
|
|
92
|
+
children: /* @__PURE__ */ t(w, {})
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ t(r, { row: !0, gap: C.sm, children: H.map((e) => /* @__PURE__ */ t(
|
|
96
|
+
D,
|
|
97
|
+
{
|
|
98
|
+
isDots: e === "start-dots" || e === "end-dots",
|
|
99
|
+
isCurrentPage: e === n + 1,
|
|
100
|
+
disabled: e === "start-dots" || e === "end-dots",
|
|
101
|
+
onClick: () => s(e - 1),
|
|
102
|
+
className: R,
|
|
103
|
+
activeClassName: M,
|
|
104
|
+
children: e
|
|
105
|
+
},
|
|
106
|
+
e
|
|
107
|
+
)) }),
|
|
108
|
+
/* @__PURE__ */ t(
|
|
109
|
+
f,
|
|
110
|
+
{
|
|
111
|
+
color: "neutral",
|
|
112
|
+
size: "sm",
|
|
113
|
+
onClick: y,
|
|
114
|
+
disabled: !h,
|
|
115
|
+
children: /* @__PURE__ */ t(S, {})
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
), Q = () => /* @__PURE__ */ u(
|
|
121
|
+
r,
|
|
122
|
+
{
|
|
123
|
+
flex: 1,
|
|
124
|
+
row: !0,
|
|
125
|
+
gap: C.sm,
|
|
126
|
+
alignItems: "center",
|
|
127
|
+
className: A,
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ t(
|
|
130
|
+
V,
|
|
131
|
+
{
|
|
132
|
+
className: P,
|
|
133
|
+
width: "auto",
|
|
134
|
+
size: "sm",
|
|
135
|
+
color: "neutral",
|
|
136
|
+
iconLeft: /* @__PURE__ */ t(w, { width: 20, height: 20 }),
|
|
137
|
+
disabled: !m,
|
|
138
|
+
onClick: x,
|
|
139
|
+
children: d
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ t(
|
|
143
|
+
f,
|
|
144
|
+
{
|
|
145
|
+
className: W,
|
|
146
|
+
color: "neutral",
|
|
147
|
+
size: "sm",
|
|
148
|
+
"aria-label": d,
|
|
149
|
+
disabled: !m,
|
|
150
|
+
onClick: x,
|
|
151
|
+
children: /* @__PURE__ */ t(w, {})
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ t(
|
|
155
|
+
D,
|
|
156
|
+
{
|
|
157
|
+
className: R,
|
|
158
|
+
activeClassName: M,
|
|
159
|
+
children: n + 1
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ t(
|
|
163
|
+
V,
|
|
164
|
+
{
|
|
165
|
+
className: P,
|
|
166
|
+
width: "auto",
|
|
167
|
+
size: "sm",
|
|
168
|
+
color: "neutral",
|
|
169
|
+
iconRight: /* @__PURE__ */ t(S, { width: 20, height: 20 }),
|
|
170
|
+
disabled: !h,
|
|
171
|
+
onClick: y,
|
|
172
|
+
children: _
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ t(
|
|
176
|
+
f,
|
|
177
|
+
{
|
|
178
|
+
className: W,
|
|
179
|
+
color: "neutral",
|
|
180
|
+
size: "sm",
|
|
181
|
+
"aria-label": _,
|
|
182
|
+
disabled: !h,
|
|
183
|
+
onClick: y,
|
|
184
|
+
children: /* @__PURE__ */ t(S, {})
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
), U = z && ((e) => /* @__PURE__ */ u(Y, { children: [
|
|
190
|
+
/* @__PURE__ */ t("span", { className: P, children: z(e) }),
|
|
191
|
+
/* @__PURE__ */ t("span", { className: W, children: e.label })
|
|
192
|
+
] }));
|
|
193
|
+
return /* @__PURE__ */ u(
|
|
194
|
+
r,
|
|
195
|
+
{
|
|
196
|
+
flex: 1,
|
|
197
|
+
row: !0,
|
|
198
|
+
justifyContent: "space-between",
|
|
199
|
+
className: ce,
|
|
200
|
+
children: [
|
|
201
|
+
p === "simple" ? Q() : K(),
|
|
202
|
+
v && /* @__PURE__ */ t(r, { alignItems: "flex-end", className: $, children: /* @__PURE__ */ t(
|
|
203
|
+
re,
|
|
204
|
+
{
|
|
205
|
+
width: "fit-content",
|
|
206
|
+
value: o.toString(),
|
|
207
|
+
size: "sm",
|
|
208
|
+
items: b.map((e) => ({
|
|
209
|
+
value: e.toString(),
|
|
210
|
+
label: e.toString()
|
|
211
|
+
})),
|
|
212
|
+
returnedValue: (e) => e.value,
|
|
213
|
+
renderDropdownItem: I,
|
|
214
|
+
renderSingleInputItem: U,
|
|
215
|
+
onChange: (e) => J(e)
|
|
216
|
+
}
|
|
217
|
+
) })
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}, D = ({
|
|
222
|
+
children: n,
|
|
223
|
+
isCurrentPage: o = !1,
|
|
224
|
+
onClick: l,
|
|
172
225
|
isDots: s = !1,
|
|
173
226
|
disabled: c = !1,
|
|
174
|
-
className:
|
|
175
|
-
activeClassName:
|
|
227
|
+
className: p,
|
|
228
|
+
activeClassName: g
|
|
176
229
|
}) => {
|
|
177
|
-
const
|
|
230
|
+
const b = a({
|
|
178
231
|
cursor: c ? "not-allowed" : "pointer",
|
|
179
232
|
userSelect: "none",
|
|
180
233
|
width: "40px",
|
|
@@ -182,27 +235,27 @@ const { color: i, cornerRadius: tt, spacing: b } = Y, bt = ({
|
|
|
182
235
|
display: "flex",
|
|
183
236
|
alignItems: "center",
|
|
184
237
|
justifyContent: "center",
|
|
185
|
-
backgroundColor:
|
|
186
|
-
borderRadius:
|
|
187
|
-
border:
|
|
188
|
-
}),
|
|
238
|
+
backgroundColor: o ? i.fill.accent_secondary : i.fill.bg_secondary,
|
|
239
|
+
borderRadius: le.sm,
|
|
240
|
+
border: o ? `1px solid ${i.fill.accent_secondary_hover}` : `1px solid ${i.border.neutral_alpha_basic}`
|
|
241
|
+
}), v = a({
|
|
189
242
|
width: "24px",
|
|
190
243
|
height: "24px",
|
|
191
|
-
color:
|
|
244
|
+
color: o ? i.icon.secondary : i.icon.tertiary
|
|
192
245
|
});
|
|
193
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ t(
|
|
194
247
|
r,
|
|
195
248
|
{
|
|
196
|
-
className:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
249
|
+
className: Z(
|
|
250
|
+
b,
|
|
251
|
+
p,
|
|
252
|
+
o && g
|
|
200
253
|
),
|
|
201
|
-
onClick: c ? void 0 :
|
|
202
|
-
children: s ? /* @__PURE__ */
|
|
254
|
+
onClick: c ? void 0 : l,
|
|
255
|
+
children: s ? /* @__PURE__ */ t(oe, { className: v }) : /* @__PURE__ */ t(ae, { center: !0, variant: "body-2", fontWeight: "medium", children: n })
|
|
203
256
|
}
|
|
204
257
|
);
|
|
205
258
|
};
|
|
206
259
|
export {
|
|
207
|
-
|
|
260
|
+
We as TablePagination
|
|
208
261
|
};
|
|
@@ -55,7 +55,7 @@ export declare const Text: React.ForwardRefExoticComponent<Omit<React.HTMLAttrib
|
|
|
55
55
|
opacityDuration?: number;
|
|
56
56
|
style?: React.CSSProperties;
|
|
57
57
|
} & React.RefAttributes<HTMLElement>>;
|
|
58
|
-
|
|
58
|
+
declare const MotionText: React.ComponentType<Omit<{
|
|
59
59
|
center?: boolean | undefined;
|
|
60
60
|
left?: boolean | undefined;
|
|
61
61
|
right?: boolean | undefined;
|
|
@@ -345,3 +345,6 @@ export declare const AnimatedText: React.ComponentType<Omit<{
|
|
|
345
345
|
} & import('framer-motion').MotionProps, "children"> & {
|
|
346
346
|
children?: React.ReactNode | import('motion-dom').MotionValue<number> | import('motion-dom').MotionValue<string>;
|
|
347
347
|
}>;
|
|
348
|
+
/** `Text` с motion-пропсами. Фичи Motion подгружаются через `MotionProvider`. */
|
|
349
|
+
export declare const AnimatedText: typeof MotionText;
|
|
350
|
+
export {};
|
|
@@ -1,97 +1,99 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { css as
|
|
3
|
-
import {
|
|
4
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { css as K, cx as O } from "@emotion/css";
|
|
3
|
+
import { m as Q } from "framer-motion";
|
|
4
|
+
import { forwardRef as l, useState as V } from "react";
|
|
5
5
|
import { styles as o } from "./styles.js";
|
|
6
6
|
import { systemToClass as X } from "./utils/systemToClass.js";
|
|
7
|
-
|
|
7
|
+
import { MotionProvider as Y } from "../../../providers/MotionProvider/MotionProvider.js";
|
|
8
|
+
const d = l(
|
|
8
9
|
({
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
11
|
-
variant:
|
|
12
|
-
fontWeight:
|
|
13
|
-
tag:
|
|
14
|
-
colorName:
|
|
15
|
-
inherit:
|
|
16
|
-
style:
|
|
17
|
-
clickOpacity:
|
|
18
|
-
opacityDuration:
|
|
19
|
-
onClick:
|
|
20
|
-
disabled:
|
|
21
|
-
mt:
|
|
22
|
-
mb:
|
|
23
|
-
ml:
|
|
10
|
+
children: t,
|
|
11
|
+
className: e,
|
|
12
|
+
variant: p = "body-1",
|
|
13
|
+
fontWeight: f = "medium",
|
|
14
|
+
tag: u = "p",
|
|
15
|
+
colorName: x = "primary",
|
|
16
|
+
inherit: a = !1,
|
|
17
|
+
style: y,
|
|
18
|
+
clickOpacity: T = 0.5,
|
|
19
|
+
opacityDuration: h = 200,
|
|
20
|
+
onClick: i,
|
|
21
|
+
disabled: ss,
|
|
22
|
+
mt: v,
|
|
23
|
+
mb: C,
|
|
24
|
+
ml: M,
|
|
24
25
|
mr: b,
|
|
25
|
-
flex:
|
|
26
|
-
cursor:
|
|
27
|
-
wordBreak:
|
|
28
|
-
whiteSpace:
|
|
29
|
-
textOverflow:
|
|
30
|
-
decoration:
|
|
26
|
+
flex: P,
|
|
27
|
+
cursor: N,
|
|
28
|
+
wordBreak: S,
|
|
29
|
+
whiteSpace: g,
|
|
30
|
+
textOverflow: w,
|
|
31
|
+
decoration: A,
|
|
31
32
|
color: I,
|
|
32
|
-
center:
|
|
33
|
-
left:
|
|
34
|
-
right:
|
|
35
|
-
uppercase:
|
|
36
|
-
lowercase:
|
|
37
|
-
capitalize:
|
|
38
|
-
overflow:
|
|
39
|
-
...
|
|
40
|
-
},
|
|
41
|
-
const [
|
|
42
|
-
mt:
|
|
43
|
-
mb:
|
|
44
|
-
ml:
|
|
33
|
+
center: R,
|
|
34
|
+
left: j,
|
|
35
|
+
right: k,
|
|
36
|
+
uppercase: B,
|
|
37
|
+
lowercase: D,
|
|
38
|
+
capitalize: E,
|
|
39
|
+
overflow: L,
|
|
40
|
+
...U
|
|
41
|
+
}, W) => {
|
|
42
|
+
const [$, m] = V(!1), s = !!i, c = () => s && m(!0), n = () => s && m(!1), q = X({
|
|
43
|
+
mt: v,
|
|
44
|
+
mb: C,
|
|
45
|
+
ml: M,
|
|
45
46
|
mr: b,
|
|
46
|
-
flex:
|
|
47
|
-
cursor:
|
|
48
|
-
wordBreak:
|
|
49
|
-
whiteSpace:
|
|
50
|
-
textOverflow:
|
|
51
|
-
decoration:
|
|
47
|
+
flex: P,
|
|
48
|
+
cursor: N,
|
|
49
|
+
wordBreak: S,
|
|
50
|
+
whiteSpace: g,
|
|
51
|
+
textOverflow: w,
|
|
52
|
+
decoration: A,
|
|
52
53
|
color: I,
|
|
53
|
-
center:
|
|
54
|
-
left:
|
|
55
|
-
right:
|
|
56
|
-
uppercase:
|
|
57
|
-
lowercase:
|
|
58
|
-
capitalize:
|
|
59
|
-
overflow:
|
|
60
|
-
}),
|
|
61
|
-
opacity:
|
|
62
|
-
transition: `opacity ${
|
|
54
|
+
center: R,
|
|
55
|
+
left: j,
|
|
56
|
+
right: k,
|
|
57
|
+
uppercase: B,
|
|
58
|
+
lowercase: D,
|
|
59
|
+
capitalize: E,
|
|
60
|
+
overflow: L
|
|
61
|
+
}), z = u, F = o[a ? "inherit" : p], G = o[a ? "inherit" : x], H = o[a ? "inherit" : f], J = s ? K({
|
|
62
|
+
opacity: $ ? T : 1,
|
|
63
|
+
transition: `opacity ${h}ms ease`
|
|
63
64
|
}) : "";
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
65
|
+
return /* @__PURE__ */ r(
|
|
66
|
+
z,
|
|
66
67
|
{
|
|
67
|
-
ref:
|
|
68
|
-
...
|
|
69
|
-
className:
|
|
68
|
+
ref: W,
|
|
69
|
+
...U,
|
|
70
|
+
className: O(
|
|
70
71
|
o.text,
|
|
71
|
-
q,
|
|
72
|
-
z,
|
|
73
72
|
F,
|
|
74
73
|
G,
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
H,
|
|
75
|
+
J,
|
|
76
|
+
e,
|
|
77
|
+
q
|
|
77
78
|
),
|
|
78
|
-
style:
|
|
79
|
-
onClick:
|
|
80
|
-
onMouseDown:
|
|
81
|
-
onMouseUp:
|
|
82
|
-
onMouseLeave:
|
|
83
|
-
onTouchStart:
|
|
84
|
-
onTouchEnd:
|
|
79
|
+
style: y,
|
|
80
|
+
onClick: i,
|
|
81
|
+
onMouseDown: c,
|
|
82
|
+
onMouseUp: n,
|
|
83
|
+
onMouseLeave: n,
|
|
84
|
+
onTouchStart: c,
|
|
85
|
+
onTouchEnd: n,
|
|
85
86
|
role: s ? "button" : void 0,
|
|
86
87
|
tabIndex: s ? 0 : void 0,
|
|
87
|
-
children:
|
|
88
|
+
children: t
|
|
88
89
|
}
|
|
89
90
|
);
|
|
90
91
|
}
|
|
91
92
|
);
|
|
92
|
-
|
|
93
|
-
const
|
|
93
|
+
d.displayName = "Text";
|
|
94
|
+
const Z = Q.create(d), _ = l((t, e) => /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Z, { ...t, ref: e }) }));
|
|
95
|
+
_.displayName = "AnimatedText";
|
|
94
96
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
_ as AnimatedText,
|
|
98
|
+
d as Text
|
|
97
99
|
};
|
|
@@ -45,7 +45,7 @@ export interface ButtonProps extends Omit<HTMLMotionProps<"button">, "className"
|
|
|
45
45
|
className?: string;
|
|
46
46
|
/** Класс для корневой обёртки кнопки (`Box`). */
|
|
47
47
|
wrapperClassName?: string;
|
|
48
|
-
/** Класс для самой `
|
|
48
|
+
/** Класс для самой `m.button`. */
|
|
49
49
|
buttonClassName?: string;
|
|
50
50
|
/** Класс, применяемый к кнопке только в состоянии `disabled`. */
|
|
51
51
|
buttonDisabledClassName?: string;
|