@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,20 +1,22 @@
|
|
|
1
1
|
import { jsx as t, jsxs as h, Fragment as ye } from "react/jsx-runtime";
|
|
2
2
|
import { cx as f } from "@emotion/css";
|
|
3
|
-
import { useFloating as xe, autoUpdate as we, offset as
|
|
4
|
-
import {
|
|
5
|
-
import { useState as
|
|
6
|
-
import
|
|
3
|
+
import { useFloating as xe, autoUpdate as we, offset as ve, flip as be, shift as ke, size as Ne } from "@floating-ui/react";
|
|
4
|
+
import { m as Se, AnimatePresence as Ce } from "framer-motion";
|
|
5
|
+
import { useState as Me, useMemo as W, useCallback as G, useEffect as Pe } from "react";
|
|
6
|
+
import Ee from "../../../assets/svg/shared/chevron-down.svg.js";
|
|
7
7
|
import Oe from "../../../assets/svg/shared/empty-box.svg.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { getLoadedMotionFeatures as Ve } from "../../../providers/MotionProvider/loadMotionFeatures.js";
|
|
9
|
+
import { styles as n, selectArrowSizesStyles as Ae } from "./styles.js";
|
|
10
|
+
import { useControlled as De } from "../../../utils/hooks/useControlled.js";
|
|
11
|
+
import { Portal as We } from "../../builders/Portal/Portal.js";
|
|
12
|
+
import { Checkbox as ze } from "../Checkbox/Checkbox.js";
|
|
13
|
+
import { Tag as Be } from "../../shared/Tag/Tag.js";
|
|
13
14
|
import { Box as i } from "../../builders/Box/Box.js";
|
|
14
15
|
import { Text as d } from "../../builders/Text/Text.js";
|
|
15
|
-
import { Ripple as
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
import { Ripple as Fe } from "../../builders/Ripple/Ripple.js";
|
|
17
|
+
import { MotionProvider as Re } from "../../../providers/MotionProvider/MotionProvider.js";
|
|
18
|
+
function tt({
|
|
19
|
+
value: H,
|
|
18
20
|
onChange: g,
|
|
19
21
|
multiple: a = !1,
|
|
20
22
|
returnedValue: C,
|
|
@@ -25,19 +27,19 @@ function Ye({
|
|
|
25
27
|
renderDropdownItem: u,
|
|
26
28
|
placeholder: x,
|
|
27
29
|
items: w = [],
|
|
28
|
-
fullWidth:
|
|
30
|
+
fullWidth: J,
|
|
29
31
|
size: m = "md",
|
|
30
|
-
showDefaultItem:
|
|
31
|
-
disabled:
|
|
32
|
-
label:
|
|
33
|
-
firstItem:
|
|
34
|
-
lastItem:
|
|
32
|
+
showDefaultItem: K,
|
|
33
|
+
disabled: M,
|
|
34
|
+
label: P,
|
|
35
|
+
firstItem: F,
|
|
36
|
+
lastItem: R,
|
|
35
37
|
observer: Q,
|
|
36
38
|
emptyText: X,
|
|
37
39
|
onBlur: Y,
|
|
38
|
-
prompt:
|
|
40
|
+
prompt: E,
|
|
39
41
|
error: O,
|
|
40
|
-
errorText:
|
|
42
|
+
errorText: j,
|
|
41
43
|
dropdownMaxWidth: T = 400,
|
|
42
44
|
dropdownMinWidth: Z = 120,
|
|
43
45
|
minWidth: I = 120,
|
|
@@ -47,23 +49,23 @@ function Ye({
|
|
|
47
49
|
className: oe,
|
|
48
50
|
triggerClassName: ne,
|
|
49
51
|
menuClassName: re,
|
|
50
|
-
itemClassName:
|
|
52
|
+
itemClassName: v,
|
|
51
53
|
labelClassName: ie,
|
|
52
54
|
promptClassName: se,
|
|
53
55
|
errorClassName: ae
|
|
54
56
|
}) {
|
|
55
|
-
const [
|
|
56
|
-
|
|
57
|
+
const [b, k] = De(
|
|
58
|
+
H,
|
|
57
59
|
a ? [] : null
|
|
58
|
-
), [V,
|
|
60
|
+
), [V, L] = Me(!1), { refs: U, floatingStyles: ce } = xe({
|
|
59
61
|
open: V,
|
|
60
62
|
// fixed-стратегия не зависит от скролла предков и проще контролируется.
|
|
61
63
|
strategy: "fixed",
|
|
62
64
|
middleware: [
|
|
63
65
|
// Лёгкий отступ, чтобы поповер не прилипал к контролу.
|
|
64
|
-
|
|
66
|
+
ve(4),
|
|
65
67
|
// flip и shift удерживают поповер в зоне видимости, подстраивая оси.
|
|
66
|
-
|
|
68
|
+
be({ crossAxis: !0, fallbackAxisSideDirection: "start" }),
|
|
67
69
|
ke({ crossAxis: !0, padding: 8 }),
|
|
68
70
|
// sizeMiddleware синхронизирует ширину и высоту с reference/viewport.
|
|
69
71
|
Ne({
|
|
@@ -92,9 +94,9 @@ function Ye({
|
|
|
92
94
|
// autoUpdate следит за изменениями размера/позиции и пересчитывает геометрию.
|
|
93
95
|
whileElementsMounted: we
|
|
94
96
|
}), s = W(
|
|
95
|
-
() => a ?
|
|
96
|
-
[
|
|
97
|
-
), N =
|
|
97
|
+
() => a ? b || [] : b != null ? [b] : [],
|
|
98
|
+
[b, a]
|
|
99
|
+
), N = G(
|
|
98
100
|
(e) => C ? C(e) : e,
|
|
99
101
|
[C]
|
|
100
102
|
), S = W(() => {
|
|
@@ -102,20 +104,20 @@ function Ye({
|
|
|
102
104
|
return w.forEach((o) => {
|
|
103
105
|
e.set(N(o), o);
|
|
104
106
|
}), e;
|
|
105
|
-
}, [w, N]), le = !w.length && !O,
|
|
107
|
+
}, [w, N]), le = !w.length && !O, $ = W(
|
|
106
108
|
() => s.map((e) => S.get(e)).filter((e) => !!e),
|
|
107
109
|
[S, s]
|
|
108
110
|
);
|
|
109
|
-
|
|
111
|
+
Pe(() => {
|
|
110
112
|
process.env.NODE_ENV !== "production" && l && !u && console.warn(
|
|
111
113
|
"[Select] `renderItem` deprecated, use `renderDropdownItem` instead."
|
|
112
114
|
);
|
|
113
115
|
}, [u, l]);
|
|
114
|
-
const fe =
|
|
116
|
+
const fe = G(
|
|
115
117
|
(e, o) => u ? u(e, o) : l ? l(e) : String(e),
|
|
116
118
|
[u, l]
|
|
117
119
|
), A = () => {
|
|
118
|
-
|
|
120
|
+
L(!1), Y?.();
|
|
119
121
|
}, de = (e) => {
|
|
120
122
|
const o = N(e);
|
|
121
123
|
if (a) {
|
|
@@ -130,7 +132,7 @@ function Ye({
|
|
|
130
132
|
}, ue = () => {
|
|
131
133
|
const e = a ? [] : null;
|
|
132
134
|
k(e), g?.(e), a || A();
|
|
133
|
-
},
|
|
135
|
+
}, q = () => typeof x == "string" ? /* @__PURE__ */ t(
|
|
134
136
|
d,
|
|
135
137
|
{
|
|
136
138
|
variant: m === "xs" ? "caption-1" : "body-2",
|
|
@@ -141,15 +143,15 @@ function Ye({
|
|
|
141
143
|
}
|
|
142
144
|
) : x, me = () => {
|
|
143
145
|
if (!s.length)
|
|
144
|
-
return
|
|
146
|
+
return q();
|
|
145
147
|
if (a)
|
|
146
|
-
return B ? B(
|
|
148
|
+
return B ? B($) : y ? y({
|
|
147
149
|
mode: "multiple",
|
|
148
|
-
selectedItems:
|
|
150
|
+
selectedItems: $
|
|
149
151
|
}) : /* @__PURE__ */ t(i, { flexWrap: "wrap", row: !0, gap: 10, children: s.map((r) => {
|
|
150
152
|
const c = S.get(r);
|
|
151
153
|
return c ? /* @__PURE__ */ t(
|
|
152
|
-
|
|
154
|
+
Be,
|
|
153
155
|
{
|
|
154
156
|
size: "sm",
|
|
155
157
|
label: l ? l(c) : String(r),
|
|
@@ -161,7 +163,7 @@ function Ye({
|
|
|
161
163
|
) : null;
|
|
162
164
|
}) });
|
|
163
165
|
const e = S.get(s[0]) ?? null;
|
|
164
|
-
if (!e) return
|
|
166
|
+
if (!e) return q();
|
|
165
167
|
if (z)
|
|
166
168
|
return z(e);
|
|
167
169
|
if (y)
|
|
@@ -180,7 +182,7 @@ function Ye({
|
|
|
180
182
|
children: o
|
|
181
183
|
}
|
|
182
184
|
) : /* @__PURE__ */ t(ye, { children: o });
|
|
183
|
-
}, he = V && /* @__PURE__ */ t(
|
|
185
|
+
}, he = V && /* @__PURE__ */ t(We, { children: /* @__PURE__ */ t(
|
|
184
186
|
i,
|
|
185
187
|
{
|
|
186
188
|
row: !0,
|
|
@@ -198,9 +200,9 @@ function Ye({
|
|
|
198
200
|
children: /* @__PURE__ */ t(
|
|
199
201
|
Se.div,
|
|
200
202
|
{
|
|
201
|
-
ref:
|
|
203
|
+
ref: U.setFloating,
|
|
202
204
|
className: f(n["select-dropdown"], te),
|
|
203
|
-
initial: { height: 0, opacity: 0 },
|
|
205
|
+
initial: Ve() ? { height: 0, opacity: 0 } : !1,
|
|
204
206
|
animate: { height: "auto", opacity: 1 },
|
|
205
207
|
exit: { height: 0, opacity: 0 },
|
|
206
208
|
transition: { duration: 0.25, ease: "easeInOut" },
|
|
@@ -211,24 +213,24 @@ function Ye({
|
|
|
211
213
|
onMouseDown: (e) => e.stopPropagation(),
|
|
212
214
|
onClick: (e) => e.stopPropagation(),
|
|
213
215
|
children: /* @__PURE__ */ h("ul", { className: f(n["select-menu"], re), children: [
|
|
214
|
-
|
|
216
|
+
K && !a && /* @__PURE__ */ t(
|
|
215
217
|
i,
|
|
216
218
|
{
|
|
217
|
-
className: f(n["select-menu-item"],
|
|
219
|
+
className: f(n["select-menu-item"], v),
|
|
218
220
|
role: "option",
|
|
219
221
|
onClick: ue,
|
|
220
222
|
children: /* @__PURE__ */ t(d, { variant: "body-2", colorName: "tertiary", children: x })
|
|
221
223
|
}
|
|
222
224
|
),
|
|
223
|
-
|
|
225
|
+
F && /* @__PURE__ */ t(
|
|
224
226
|
i,
|
|
225
227
|
{
|
|
226
228
|
className: f(
|
|
227
229
|
n["select-menu-item"],
|
|
228
230
|
n["select-menu-item-first"],
|
|
229
|
-
|
|
231
|
+
v
|
|
230
232
|
),
|
|
231
|
-
children:
|
|
233
|
+
children: F
|
|
232
234
|
}
|
|
233
235
|
),
|
|
234
236
|
le && /* @__PURE__ */ h(i, { className: n["empty-block"], children: [
|
|
@@ -252,13 +254,13 @@ function Ye({
|
|
|
252
254
|
{
|
|
253
255
|
[n.selected]: c
|
|
254
256
|
},
|
|
255
|
-
|
|
257
|
+
v
|
|
256
258
|
),
|
|
257
259
|
role: "option",
|
|
258
260
|
relative: !0,
|
|
259
261
|
onClick: () => de(e),
|
|
260
262
|
children: [
|
|
261
|
-
a && /* @__PURE__ */ t(
|
|
263
|
+
a && /* @__PURE__ */ t(ze, { size: "sm", checked: c }),
|
|
262
264
|
D ? /* @__PURE__ */ t(
|
|
263
265
|
d,
|
|
264
266
|
{
|
|
@@ -269,22 +271,22 @@ function Ye({
|
|
|
269
271
|
children: p
|
|
270
272
|
}
|
|
271
273
|
) : p,
|
|
272
|
-
/* @__PURE__ */ t(
|
|
274
|
+
/* @__PURE__ */ t(Fe, {})
|
|
273
275
|
]
|
|
274
276
|
},
|
|
275
277
|
r
|
|
276
278
|
);
|
|
277
279
|
}),
|
|
278
280
|
Q,
|
|
279
|
-
|
|
281
|
+
R && /* @__PURE__ */ t(
|
|
280
282
|
i,
|
|
281
283
|
{
|
|
282
284
|
className: f(
|
|
283
285
|
n["select-menu-item"],
|
|
284
286
|
n["select-menu-item-first"],
|
|
285
|
-
|
|
287
|
+
v
|
|
286
288
|
),
|
|
287
|
-
children:
|
|
289
|
+
children: R
|
|
288
290
|
}
|
|
289
291
|
)
|
|
290
292
|
] })
|
|
@@ -299,12 +301,12 @@ function Ye({
|
|
|
299
301
|
relative: !0,
|
|
300
302
|
display: "inline-block",
|
|
301
303
|
minWidth: I,
|
|
302
|
-
w: _ || (
|
|
304
|
+
w: _ || (J ? "full" : "auto"),
|
|
303
305
|
onMouseDown: (e) => e.stopPropagation(),
|
|
304
306
|
onClick: (e) => e.stopPropagation(),
|
|
305
307
|
className: oe,
|
|
306
308
|
children: [
|
|
307
|
-
typeof
|
|
309
|
+
typeof P == "string" ? /* @__PURE__ */ t(
|
|
308
310
|
d,
|
|
309
311
|
{
|
|
310
312
|
variant: "body-2",
|
|
@@ -312,16 +314,16 @@ function Ye({
|
|
|
312
314
|
fontWeight: "regular",
|
|
313
315
|
mb: m === "sm" ? 4 : 8,
|
|
314
316
|
className: ie,
|
|
315
|
-
children:
|
|
317
|
+
children: P
|
|
316
318
|
}
|
|
317
|
-
) :
|
|
319
|
+
) : P,
|
|
318
320
|
/* @__PURE__ */ h(
|
|
319
321
|
i,
|
|
320
322
|
{
|
|
321
|
-
ref:
|
|
323
|
+
ref: U.setReference,
|
|
322
324
|
row: !0,
|
|
323
325
|
gap: 10,
|
|
324
|
-
tabIndex:
|
|
326
|
+
tabIndex: M ? -1 : 0,
|
|
325
327
|
role: "button",
|
|
326
328
|
alignItems: "flex-start",
|
|
327
329
|
"aria-haspopup": "listbox",
|
|
@@ -333,35 +335,35 @@ function Ye({
|
|
|
333
335
|
n[`background-${ee}`],
|
|
334
336
|
{
|
|
335
337
|
[n.error]: O,
|
|
336
|
-
[n.disabled]:
|
|
338
|
+
[n.disabled]: M,
|
|
337
339
|
[n.open]: V
|
|
338
340
|
},
|
|
339
341
|
ne
|
|
340
342
|
),
|
|
341
|
-
onClick: () => !
|
|
343
|
+
onClick: () => !M && L((e) => !e),
|
|
342
344
|
children: [
|
|
343
345
|
/* @__PURE__ */ t(i, { className: f(n["select-value"]), children: me() }),
|
|
344
346
|
/* @__PURE__ */ t(
|
|
345
347
|
i,
|
|
346
348
|
{
|
|
347
|
-
className: f(n["select-arrow"],
|
|
348
|
-
children: /* @__PURE__ */ t(
|
|
349
|
+
className: f(n["select-arrow"], Ae[m]),
|
|
350
|
+
children: /* @__PURE__ */ t(Ee, {})
|
|
349
351
|
}
|
|
350
352
|
)
|
|
351
353
|
]
|
|
352
354
|
}
|
|
353
355
|
),
|
|
354
|
-
typeof
|
|
356
|
+
typeof E == "string" ? /* @__PURE__ */ t(
|
|
355
357
|
d,
|
|
356
358
|
{
|
|
357
359
|
variant: "caption-1",
|
|
358
360
|
colorName: "tertiary",
|
|
359
361
|
mt: 4,
|
|
360
362
|
className: se,
|
|
361
|
-
children:
|
|
363
|
+
children: E
|
|
362
364
|
}
|
|
363
|
-
) :
|
|
364
|
-
O &&
|
|
365
|
+
) : E,
|
|
366
|
+
O && j && /* @__PURE__ */ t(
|
|
365
367
|
d,
|
|
366
368
|
{
|
|
367
369
|
tag: "p",
|
|
@@ -369,14 +371,14 @@ function Ye({
|
|
|
369
371
|
variant: "body-2",
|
|
370
372
|
mt: 5,
|
|
371
373
|
className: ae,
|
|
372
|
-
children:
|
|
374
|
+
children: j
|
|
373
375
|
}
|
|
374
376
|
),
|
|
375
|
-
/* @__PURE__ */ t(Ce, { children: he })
|
|
377
|
+
/* @__PURE__ */ t(Re, { children: /* @__PURE__ */ t(Ce, { children: he }) })
|
|
376
378
|
]
|
|
377
379
|
}
|
|
378
380
|
);
|
|
379
381
|
}
|
|
380
382
|
export {
|
|
381
|
-
|
|
383
|
+
tt as Select
|
|
382
384
|
};
|
|
@@ -3,7 +3,7 @@ interface ToastContainerProps {
|
|
|
3
3
|
position?: ToastPosition;
|
|
4
4
|
/** Кастомный CSS-класс для корневого `<div>` контейнера тостов. */
|
|
5
5
|
className?: string;
|
|
6
|
-
/** Класс для каждого `
|
|
6
|
+
/** Класс для каждого `m.div` обёртки тоста. */
|
|
7
7
|
itemClassName?: string;
|
|
8
8
|
/** Класс, прокидываемый в каждый `Toast` (на корневой `Box`). */
|
|
9
9
|
toastClassName?: string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { cx as m, css as c } from "@emotion/css";
|
|
3
|
-
import { AnimatePresence as
|
|
3
|
+
import { AnimatePresence as f, m as p } from "framer-motion";
|
|
4
4
|
import { useSyncExternalStore as d } from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { getLoadedMotionFeatures as h } from "../../../providers/MotionProvider/loadMotionFeatures.js";
|
|
6
|
+
import { Toast as g } from "./Toast.js";
|
|
6
7
|
import { toastStore as o } from "./Toast.store.js";
|
|
7
|
-
import { Portal as
|
|
8
|
-
|
|
8
|
+
import { Portal as x } from "../../builders/Portal/Portal.js";
|
|
9
|
+
import { MotionProvider as u } from "../../../providers/MotionProvider/MotionProvider.js";
|
|
10
|
+
const y = {
|
|
9
11
|
"top-left": { top: 16, left: 16, alignItems: "flex-start" },
|
|
10
12
|
"top-center": {
|
|
11
13
|
top: 16,
|
|
@@ -22,14 +24,14 @@ const x = {
|
|
|
22
24
|
alignItems: "center"
|
|
23
25
|
},
|
|
24
26
|
"bottom-right": { bottom: 16, right: 16, alignItems: "flex-end" }
|
|
25
|
-
},
|
|
26
|
-
const
|
|
27
|
+
}, b = (t) => {
|
|
28
|
+
const r = t.startsWith("top"), s = t.endsWith("left"), a = t.endsWith("right"), l = t.endsWith("center"), i = s ? -40 : a ? 40 : 0;
|
|
27
29
|
return {
|
|
28
|
-
initial: { opacity: 0, x: i, y:
|
|
30
|
+
initial: { opacity: 0, x: i, y: r ? -16 : 16, scale: 0.95 },
|
|
29
31
|
animate: { opacity: 1, x: 0, y: 0, scale: 1 },
|
|
30
32
|
exit: { opacity: 0, x: i, scale: 0.95, transition: { duration: 0.15 } }
|
|
31
33
|
};
|
|
32
|
-
},
|
|
34
|
+
}, I = c({
|
|
33
35
|
position: "fixed",
|
|
34
36
|
zIndex: 2,
|
|
35
37
|
display: "flex",
|
|
@@ -38,37 +40,37 @@ const x = {
|
|
|
38
40
|
pointerEvents: "none",
|
|
39
41
|
maxWidth: 325,
|
|
40
42
|
width: "100%"
|
|
41
|
-
}),
|
|
43
|
+
}), v = c({
|
|
42
44
|
pointerEvents: "auto",
|
|
43
45
|
width: "100%"
|
|
44
46
|
});
|
|
45
|
-
function
|
|
47
|
+
function M({
|
|
46
48
|
position: t = "top-right",
|
|
47
|
-
className:
|
|
48
|
-
itemClassName:
|
|
49
|
+
className: r,
|
|
50
|
+
itemClassName: s,
|
|
49
51
|
toastClassName: a
|
|
50
52
|
}) {
|
|
51
53
|
const l = d(
|
|
52
54
|
o.subscribe,
|
|
53
55
|
o.getSnapshot,
|
|
54
56
|
o.getSnapshot
|
|
55
|
-
), i =
|
|
56
|
-
return /* @__PURE__ */ n(
|
|
57
|
+
), i = b(t);
|
|
58
|
+
return /* @__PURE__ */ n(x, { children: /* @__PURE__ */ n(
|
|
57
59
|
"div",
|
|
58
60
|
{
|
|
59
|
-
className: m(
|
|
60
|
-
style:
|
|
61
|
-
children: /* @__PURE__ */ n(
|
|
62
|
-
|
|
61
|
+
className: m(I, r),
|
|
62
|
+
style: y[t],
|
|
63
|
+
children: /* @__PURE__ */ n(u, { children: /* @__PURE__ */ n(f, { initial: !1, children: l.map((e) => /* @__PURE__ */ n(
|
|
64
|
+
p.div,
|
|
63
65
|
{
|
|
64
|
-
className: m(
|
|
66
|
+
className: m(v, s),
|
|
65
67
|
layout: !0,
|
|
66
|
-
initial: i.initial,
|
|
68
|
+
initial: h() ? i.initial : !1,
|
|
67
69
|
animate: i.animate,
|
|
68
70
|
exit: i.exit,
|
|
69
71
|
transition: { type: "spring", stiffness: 400, damping: 30 },
|
|
70
72
|
children: /* @__PURE__ */ n(
|
|
71
|
-
|
|
73
|
+
g,
|
|
72
74
|
{
|
|
73
75
|
title: e.title,
|
|
74
76
|
subtitle: e.subtitle,
|
|
@@ -80,10 +82,10 @@ function N({
|
|
|
80
82
|
)
|
|
81
83
|
},
|
|
82
84
|
e.id
|
|
83
|
-
)) })
|
|
85
|
+
)) }) })
|
|
84
86
|
}
|
|
85
87
|
) });
|
|
86
88
|
}
|
|
87
89
|
export {
|
|
88
|
-
|
|
90
|
+
M as ToastContainer
|
|
89
91
|
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { UiKitLocaleProvider as t } from "./locale/UiKitLocaleProvider/UiKitLocaleProvider.js";
|
|
3
3
|
import { Box as m } from "./components/builders/Box/Box.js";
|
|
4
4
|
import { Loader as f } from "./components/builders/Loader/Loader.js";
|
|
5
|
-
import { Modal as
|
|
5
|
+
import { Modal as i } from "./components/builders/Modal/index.js";
|
|
6
6
|
import { Portal as T } from "./components/builders/Portal/Portal.js";
|
|
7
7
|
import { Ripple as l } from "./components/builders/Ripple/Ripple.js";
|
|
8
8
|
import { Sheet as C } from "./components/builders/Sheet/index.js";
|
|
@@ -12,8 +12,8 @@ import { AnimatedText as k, Text as A } from "./components/builders/Text/Text.js
|
|
|
12
12
|
import { LineChart as S } from "./components/charts/LineChart/LineChart.js";
|
|
13
13
|
import { PieProgressChart as P } from "./components/charts/PieProgressChart/PieProgressChart.js";
|
|
14
14
|
import { Button as _ } from "./components/controls/Button/Button.js";
|
|
15
|
-
import { Checkbox as
|
|
16
|
-
import { IconButton as
|
|
15
|
+
import { Checkbox as v } from "./components/controls/Checkbox/Checkbox.js";
|
|
16
|
+
import { IconButton as L } from "./components/controls/IconButton/IconButton.js";
|
|
17
17
|
import { Input as D } from "./components/controls/Input/Input.js";
|
|
18
18
|
import { MarkdownToolbarAction as O } from "./components/controls/MarkdownTextEditor/hooks/useToolbarActions/useToolbarActions.const.js";
|
|
19
19
|
import { MARKDOWN_TEXT_EDITOR_LOCALE_KEY as U } from "./components/controls/MarkdownTextEditor/MarkdownTextEditor.locale.js";
|
|
@@ -29,7 +29,7 @@ import { Breadcrumbs as eo } from "./components/navigation/Breadcrumbs/Breadcrum
|
|
|
29
29
|
import { Avatar as po } from "./components/shared/Avatar/Avatar.js";
|
|
30
30
|
import { Badge as xo } from "./components/shared/Badge/Badge.js";
|
|
31
31
|
import { Counter as ao } from "./components/shared/Counter/Counter.js";
|
|
32
|
-
import { Dot as
|
|
32
|
+
import { Dot as no } from "./components/shared/Dot/Dot.js";
|
|
33
33
|
import { Hint as so } from "./components/shared/Hint/Hint.js";
|
|
34
34
|
import { MarkdownText as Co } from "./components/shared/MarkdownText/MarkdownText.js";
|
|
35
35
|
import { Popover as ho } from "./components/shared/Popover/Popover.js";
|
|
@@ -39,31 +39,32 @@ import { Toast as Eo } from "./components/shared/Toast/Toast.js";
|
|
|
39
39
|
import { useToast as Mo } from "./components/shared/Toast/Toast.hooks.js";
|
|
40
40
|
import { toast as Ro } from "./components/shared/Toast/Toast.utils.js";
|
|
41
41
|
import { ToastContainer as bo } from "./components/shared/Toast/ToastContainer.js";
|
|
42
|
-
import { Tooltip as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
42
|
+
import { Tooltip as Io } from "./components/shared/Tooltip/Tooltip.js";
|
|
43
|
+
import { MotionProvider as wo } from "./providers/MotionProvider/MotionProvider.js";
|
|
44
|
+
import { ThemeProviderScoped as Ko } from "./providers/ThemeProviderScoped/ThemeProviderScoped.js";
|
|
45
|
+
import { THEME_DATA_ATTRIBUTE as Ho } from "./providers/ThemeProviderScoped/ThemeProviderScoped.const.js";
|
|
46
|
+
import { ThemeContext as Wo, useUiKitTheme as yo } from "./providers/ThemeProviderScoped/ThemeProviderScoped.context.js";
|
|
47
|
+
import { useControlled as Fo } from "./utils/hooks/useControlled.js";
|
|
48
|
+
import { useBreakpoint as No } from "./utils/hooks/breakpoints/useBreakpoint/useBreakpoint.js";
|
|
49
|
+
import { Breakpoints as Yo, BreakpointsBase as jo } from "./utils/hooks/breakpoints/useBreakpoint/useBreakpoint.const.js";
|
|
50
|
+
import { getFontWeightClass as Jo } from "./utils/styles/getFontWeightClass/getFontWeightClass.js";
|
|
51
|
+
import { getSizeClass as Vo } from "./utils/styles/getSizeClass/getSizeClass.js";
|
|
52
|
+
import { getStyleClass as $o } from "./utils/styles/getStyleClass/getStyleClass.js";
|
|
53
|
+
import { theme as rr } from "./utils/theme/index.js";
|
|
53
54
|
export {
|
|
54
55
|
k as AnimatedText,
|
|
55
56
|
po as Avatar,
|
|
56
57
|
xo as Badge,
|
|
57
58
|
m as Box,
|
|
58
59
|
eo as Breadcrumbs,
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
Yo as Breakpoints,
|
|
61
|
+
jo as BreakpointsBase,
|
|
61
62
|
_ as Button,
|
|
62
|
-
|
|
63
|
+
v as Checkbox,
|
|
63
64
|
ao as Counter,
|
|
64
|
-
|
|
65
|
+
no as Dot,
|
|
65
66
|
so as Hint,
|
|
66
|
-
|
|
67
|
+
L as IconButton,
|
|
67
68
|
D as Input,
|
|
68
69
|
S as LineChart,
|
|
69
70
|
f as Loader,
|
|
@@ -71,7 +72,8 @@ export {
|
|
|
71
72
|
Co as MarkdownText,
|
|
72
73
|
y as MarkdownTextEditor,
|
|
73
74
|
O as MarkdownToolbarAction,
|
|
74
|
-
|
|
75
|
+
i as Modal,
|
|
76
|
+
wo as MotionProvider,
|
|
75
77
|
F as OtpInput,
|
|
76
78
|
P as PieProgressChart,
|
|
77
79
|
ho as Popover,
|
|
@@ -84,25 +86,25 @@ export {
|
|
|
84
86
|
C as Sheet,
|
|
85
87
|
co as Skeleton,
|
|
86
88
|
Z as Switch,
|
|
87
|
-
|
|
89
|
+
Ho as THEME_DATA_ATTRIBUTE,
|
|
88
90
|
h as Table,
|
|
89
91
|
oo as Tabs,
|
|
90
92
|
ko as Tag,
|
|
91
93
|
A as Text,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
Wo as ThemeContext,
|
|
95
|
+
Ko as ThemeProviderScoped,
|
|
94
96
|
Eo as Toast,
|
|
95
97
|
bo as ToastContainer,
|
|
96
|
-
|
|
98
|
+
Io as Tooltip,
|
|
97
99
|
t as UiKitLocaleProvider,
|
|
98
100
|
c as createColumnHelper,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
Jo as getFontWeightClass,
|
|
102
|
+
Vo as getSizeClass,
|
|
103
|
+
$o as getStyleClass,
|
|
104
|
+
rr as theme,
|
|
103
105
|
Ro as toast,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
No as useBreakpoint,
|
|
107
|
+
Fo as useControlled,
|
|
106
108
|
Mo as useToast,
|
|
107
|
-
|
|
109
|
+
yo as useUiKitTheme
|
|
108
110
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IMotionProviderProps } from './MotionProvider.types';
|
|
2
|
+
/**
|
|
3
|
+
* Подгружает фичи Motion (анимации, жесты, exit, drag, layout) отдельным
|
|
4
|
+
* чанком. Без провайдера `m.*` рендерится, но не анимируется.
|
|
5
|
+
*
|
|
6
|
+
* Компоненты UI Kit оборачивают себя сами, приложению провайдер нужен только
|
|
7
|
+
* для собственных `m.*` компонентов.
|
|
8
|
+
*/
|
|
9
|
+
export declare function MotionProvider({ children, strict, }: IMotionProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as o, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import { LazyMotion as n } from "framer-motion";
|
|
3
|
+
import { useContext as s, createContext as a } from "react";
|
|
4
|
+
import { loadMotionFeatures as f, getLoadedMotionFeatures as m } from "./loadMotionFeatures.js";
|
|
5
|
+
const r = a(!1);
|
|
6
|
+
function l({
|
|
7
|
+
children: e,
|
|
8
|
+
strict: t = !1
|
|
9
|
+
}) {
|
|
10
|
+
return s(r) && !t ? /* @__PURE__ */ o(i, { children: e }) : /* @__PURE__ */ o(r.Provider, { value: !0, children: /* @__PURE__ */ o(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
features: m() ?? f,
|
|
14
|
+
strict: t,
|
|
15
|
+
children: e
|
|
16
|
+
}
|
|
17
|
+
) });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
l as MotionProvider
|
|
21
|
+
};
|