@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.
Files changed (55) hide show
  1. package/README.md +19 -0
  2. package/dist/components/builders/Sheet/SheetLayer.js +95 -83
  3. package/dist/components/builders/Sheet/hooks/index.d.ts +1 -0
  4. package/dist/components/builders/Sheet/hooks/useMotionValueStyle.d.ts +8 -0
  5. package/dist/components/builders/Sheet/hooks/useMotionValueStyle.js +14 -0
  6. package/dist/components/builders/Table/TablePagination/TablePagination.d.ts +10 -4
  7. package/dist/components/builders/Table/TablePagination/TablePagination.js +230 -177
  8. package/dist/components/builders/Text/Text.d.ts +4 -1
  9. package/dist/components/builders/Text/Text.js +78 -76
  10. package/dist/components/controls/Button/Button.d.ts +1 -1
  11. package/dist/components/controls/Button/Button.js +47 -46
  12. package/dist/components/controls/OtpInput/OtpInput.js +121 -143
  13. package/dist/components/controls/OtpInput/styles.d.ts +1 -0
  14. package/dist/components/controls/OtpInput/styles.js +9 -3
  15. package/dist/components/controls/Select/Select.js +72 -70
  16. package/dist/components/shared/Toast/ToastContainer.d.ts +1 -1
  17. package/dist/components/shared/Toast/ToastContainer.js +25 -23
  18. package/dist/fonts/inter-cyrillic-ext-400.woff2 +0 -0
  19. package/dist/fonts/inter-cyrillic-ext-500.woff2 +0 -0
  20. package/dist/fonts/inter-cyrillic-ext-600.woff2 +0 -0
  21. package/dist/fonts/inter-cyrillic-ext-700.woff2 +0 -0
  22. package/dist/fonts/inter-cyrillic-ext-800.woff2 +0 -0
  23. package/dist/fonts/inter-latin-cyrillic-400.woff2 +0 -0
  24. package/dist/fonts/inter-latin-cyrillic-500.woff2 +0 -0
  25. package/dist/fonts/inter-latin-cyrillic-600.woff2 +0 -0
  26. package/dist/fonts/inter-latin-cyrillic-700.woff2 +0 -0
  27. package/dist/fonts/inter-latin-cyrillic-800.woff2 +0 -0
  28. package/dist/fonts/inter-latin-ext-400.woff2 +0 -0
  29. package/dist/fonts/inter-latin-ext-500.woff2 +0 -0
  30. package/dist/fonts/inter-latin-ext-600.woff2 +0 -0
  31. package/dist/fonts/inter-latin-ext-700.woff2 +0 -0
  32. package/dist/fonts/inter-latin-ext-800.woff2 +0 -0
  33. package/dist/index.js +34 -32
  34. package/dist/providers/MotionProvider/MotionProvider.d.ts +9 -0
  35. package/dist/providers/MotionProvider/MotionProvider.js +21 -0
  36. package/dist/providers/MotionProvider/MotionProvider.types.d.ts +12 -0
  37. package/dist/providers/MotionProvider/features.d.ts +1 -0
  38. package/dist/providers/MotionProvider/features.js +4 -0
  39. package/dist/providers/MotionProvider/index.d.ts +2 -0
  40. package/dist/providers/MotionProvider/loadMotionFeatures.d.ts +13 -0
  41. package/dist/providers/MotionProvider/loadMotionFeatures.js +9 -0
  42. package/dist/providers/index.d.ts +1 -0
  43. package/dist/styles/utils/breakpoints.d.ts +12 -0
  44. package/dist/styles/utils/breakpoints.js +20 -13
  45. package/dist/styles/utils/breakpoints.ts +32 -0
  46. package/dist/ui-kit.cjs +8 -8
  47. package/dist/ui-kit.css +1 -1
  48. package/package.json +3 -1
  49. package/dist/fonts/inter-normal-200.woff2 +0 -0
  50. package/dist/fonts/inter-normal-300.woff2 +0 -0
  51. package/dist/fonts/inter-normal-400.woff2 +0 -0
  52. package/dist/fonts/inter-normal-500.woff2 +0 -0
  53. package/dist/fonts/inter-normal-600.woff2 +0 -0
  54. package/dist/fonts/inter-normal-700.woff2 +0 -0
  55. 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 be, flip as ve, shift as ke, size as Ne } from "@floating-ui/react";
4
- import { motion as Se, AnimatePresence as Ce } from "framer-motion";
5
- import { useState as Pe, useMemo as W, useCallback as H, useEffect as Ee } from "react";
6
- import Me from "../../../assets/svg/shared/chevron-down.svg.js";
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 { styles as n, selectArrowSizesStyles as Ve } from "./styles.js";
9
- import { useControlled as Ae } from "../../../utils/hooks/useControlled.js";
10
- import { Portal as De } from "../../builders/Portal/Portal.js";
11
- import { Checkbox as We } from "../Checkbox/Checkbox.js";
12
- import { Tag as ze } from "../../shared/Tag/Tag.js";
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 Be } from "../../builders/Ripple/Ripple.js";
16
- function Ye({
17
- value: J,
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: K,
30
+ fullWidth: J,
29
31
  size: m = "md",
30
- showDefaultItem: L,
31
- disabled: P,
32
- label: E,
33
- firstItem: R,
34
- lastItem: j,
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: M,
40
+ prompt: E,
39
41
  error: O,
40
- errorText: F,
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: b,
52
+ itemClassName: v,
51
53
  labelClassName: ie,
52
54
  promptClassName: se,
53
55
  errorClassName: ae
54
56
  }) {
55
- const [v, k] = Ae(
56
- J,
57
+ const [b, k] = De(
58
+ H,
57
59
  a ? [] : null
58
- ), [V, U] = Pe(!1), { refs: $, floatingStyles: ce } = xe({
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
- be(4),
66
+ ve(4),
65
67
  // flip и shift удерживают поповер в зоне видимости, подстраивая оси.
66
- ve({ crossAxis: !0, fallbackAxisSideDirection: "start" }),
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 ? v || [] : v != null ? [v] : [],
96
- [v, a]
97
- ), N = H(
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, q = W(
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
- Ee(() => {
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 = H(
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
- U(!1), Y?.();
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
- }, G = () => typeof x == "string" ? /* @__PURE__ */ t(
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 G();
146
+ return q();
145
147
  if (a)
146
- return B ? B(q) : y ? y({
148
+ return B ? B($) : y ? y({
147
149
  mode: "multiple",
148
- selectedItems: q
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
- ze,
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 G();
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(De, { children: /* @__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: $.setFloating,
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
- L && !a && /* @__PURE__ */ t(
216
+ K && !a && /* @__PURE__ */ t(
215
217
  i,
216
218
  {
217
- className: f(n["select-menu-item"], b),
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
- R && /* @__PURE__ */ t(
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
- b
231
+ v
230
232
  ),
231
- children: R
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
- b
257
+ v
256
258
  ),
257
259
  role: "option",
258
260
  relative: !0,
259
261
  onClick: () => de(e),
260
262
  children: [
261
- a && /* @__PURE__ */ t(We, { size: "sm", checked: c }),
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(Be, {})
274
+ /* @__PURE__ */ t(Fe, {})
273
275
  ]
274
276
  },
275
277
  r
276
278
  );
277
279
  }),
278
280
  Q,
279
- j && /* @__PURE__ */ t(
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
- b
287
+ v
286
288
  ),
287
- children: j
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: _ || (K ? "full" : "auto"),
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 E == "string" ? /* @__PURE__ */ t(
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: E
317
+ children: P
316
318
  }
317
- ) : E,
319
+ ) : P,
318
320
  /* @__PURE__ */ h(
319
321
  i,
320
322
  {
321
- ref: $.setReference,
323
+ ref: U.setReference,
322
324
  row: !0,
323
325
  gap: 10,
324
- tabIndex: P ? -1 : 0,
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]: P,
338
+ [n.disabled]: M,
337
339
  [n.open]: V
338
340
  },
339
341
  ne
340
342
  ),
341
- onClick: () => !P && U((e) => !e),
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"], Ve[m]),
348
- children: /* @__PURE__ */ t(Me, {})
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 M == "string" ? /* @__PURE__ */ t(
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: M
363
+ children: E
362
364
  }
363
- ) : M,
364
- O && F && /* @__PURE__ */ t(
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: F
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
- Ye as Select
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
- /** Класс для каждого `motion.div` обёртки тоста. */
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 p, motion as f } from "framer-motion";
3
+ import { AnimatePresence as f, m as p } from "framer-motion";
4
4
  import { useSyncExternalStore as d } from "react";
5
- import { Toast as h } from "./Toast.js";
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 g } from "../../builders/Portal/Portal.js";
8
- const x = {
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
- }, u = (t) => {
26
- const s = t.startsWith("top"), r = t.endsWith("left"), a = t.endsWith("right"), l = t.endsWith("center"), i = r ? -40 : a ? 40 : 0;
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: s ? -16 : 16, scale: 0.95 },
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
- }, y = c({
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
- }), b = c({
43
+ }), v = c({
42
44
  pointerEvents: "auto",
43
45
  width: "100%"
44
46
  });
45
- function N({
47
+ function M({
46
48
  position: t = "top-right",
47
- className: s,
48
- itemClassName: r,
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 = u(t);
56
- return /* @__PURE__ */ n(g, { children: /* @__PURE__ */ n(
57
+ ), i = b(t);
58
+ return /* @__PURE__ */ n(x, { children: /* @__PURE__ */ n(
57
59
  "div",
58
60
  {
59
- className: m(y, s),
60
- style: x[t],
61
- children: /* @__PURE__ */ n(p, { initial: !1, children: l.map((e) => /* @__PURE__ */ n(
62
- f.div,
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(b, r),
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
- h,
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
- N as ToastContainer
90
+ M as ToastContainer
89
91
  };
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 n } from "./components/builders/Modal/index.js";
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 I } from "./components/controls/Checkbox/Checkbox.js";
16
- import { IconButton as v } from "./components/controls/IconButton/IconButton.js";
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 io } from "./components/shared/Dot/Dot.js";
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 Lo } from "./components/shared/Tooltip/Tooltip.js";
43
- import { ThemeProviderScoped as wo } from "./providers/ThemeProviderScoped/ThemeProviderScoped.js";
44
- import { THEME_DATA_ATTRIBUTE as Ko } from "./providers/ThemeProviderScoped/ThemeProviderScoped.const.js";
45
- import { ThemeContext as Ho, useUiKitTheme as Uo } from "./providers/ThemeProviderScoped/ThemeProviderScoped.context.js";
46
- import { useControlled as yo } from "./utils/hooks/useControlled.js";
47
- import { useBreakpoint as Fo } from "./utils/hooks/breakpoints/useBreakpoint/useBreakpoint.js";
48
- import { Breakpoints as No, BreakpointsBase as Xo } from "./utils/hooks/breakpoints/useBreakpoint/useBreakpoint.const.js";
49
- import { getFontWeightClass as jo } from "./utils/styles/getFontWeightClass/getFontWeightClass.js";
50
- import { getSizeClass as Jo } from "./utils/styles/getSizeClass/getSizeClass.js";
51
- import { getStyleClass as Vo } from "./utils/styles/getStyleClass/getStyleClass.js";
52
- import { theme as $o } from "./utils/theme/index.js";
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
- No as Breakpoints,
60
- Xo as BreakpointsBase,
60
+ Yo as Breakpoints,
61
+ jo as BreakpointsBase,
61
62
  _ as Button,
62
- I as Checkbox,
63
+ v as Checkbox,
63
64
  ao as Counter,
64
- io as Dot,
65
+ no as Dot,
65
66
  so as Hint,
66
- v as IconButton,
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
- n as Modal,
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
- Ko as THEME_DATA_ATTRIBUTE,
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
- Ho as ThemeContext,
93
- wo as ThemeProviderScoped,
94
+ Wo as ThemeContext,
95
+ Ko as ThemeProviderScoped,
94
96
  Eo as Toast,
95
97
  bo as ToastContainer,
96
- Lo as Tooltip,
98
+ Io as Tooltip,
97
99
  t as UiKitLocaleProvider,
98
100
  c as createColumnHelper,
99
- jo as getFontWeightClass,
100
- Jo as getSizeClass,
101
- Vo as getStyleClass,
102
- $o as theme,
101
+ Jo as getFontWeightClass,
102
+ Vo as getSizeClass,
103
+ $o as getStyleClass,
104
+ rr as theme,
103
105
  Ro as toast,
104
- Fo as useBreakpoint,
105
- yo as useControlled,
106
+ No as useBreakpoint,
107
+ Fo as useControlled,
106
108
  Mo as useToast,
107
- Uo as useUiKitTheme
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
+ };