rc-lib-ui 1.4.5 → 1.4.6

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 (2) hide show
  1. package/dist/control-cards.js +115 -115
  2. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import * as N from "react";
2
2
  import b, { createContext as $n, useContext as hn, useCallback as S, useState as de, useEffect as V, useRef as $, forwardRef as _, createElement as le, cloneElement as zn, useMemo as mn, Component as Wn, useLayoutEffect as jn, memo as gn, isValidElement as Vn } from "react";
3
3
  import { u as vn } from "./browser-DJTk47DY.js";
4
- import { c as Fn } from "./react-CLnE01WS.js";
4
+ import { c as Hn } from "./react-CLnE01WS.js";
5
5
  import { keyframes as fe } from "@mui/material/styles";
6
- import { jsx as c, jsxs as w, Fragment as F } from "react/jsx-runtime";
7
- import { Box as M, styled as P, Card as xn, Typography as j, Button as yn, LinearProgress as Hn, Alert as ce, IconButton as me, keyframes as re, DialogTitle as Se, Divider as we, DialogContent as H, alpha as qn, DialogActions as je, Portal as Bn, Dialog as Xn } from "@mui/material";
6
+ import { jsx as c, jsxs as w, Fragment as H } from "react/jsx-runtime";
7
+ import { Box as M, styled as P, Card as xn, Typography as j, Button as yn, LinearProgress as Fn, Alert as ce, IconButton as me, keyframes as re, DialogTitle as Se, Divider as we, DialogContent as F, alpha as qn, DialogActions as je, Portal as Bn, Dialog as Xn } from "@mui/material";
8
8
  import Ve from "classnames";
9
9
  import { createPortal as Un } from "react-dom";
10
10
  import { Save as Yn, Close as ge, Delete as Gn, InfoOutlined as Kn, VerifiedUser as Zn, CheckCircle as bn, TaskAlt as Qn } from "@mui/icons-material";
@@ -14,7 +14,7 @@ import './control-cards.css';const En = $n(void 0), et = () => {
14
14
  if (!e)
15
15
  throw new Error("useInteractiveMessage must be used within an InteractiveMessageProvider");
16
16
  return e;
17
- }, kn = {}, nt = JSON.parse(JSON.stringify(kn)), Z = Fn(() => kn), Xe = {
17
+ }, kn = {}, nt = JSON.parse(JSON.stringify(kn)), Z = Hn(() => kn), Xe = {
18
18
  resetState: () => Z.setState(nt),
19
19
  setItems: ({ sectionDel: e, items: n, delPackID: r }) => Z.setState((o) => {
20
20
  Array.isArray(o[e]) || (o[e] = []);
@@ -88,9 +88,9 @@ const Ur = ({ list: e, keyAction: n, setMessage: r, onExpire: o, durationDelete:
88
88
  message: "Вы действительно хотите удалить ?",
89
89
  title: "",
90
90
  onConfirm: () => {
91
- const m = f.selectedIds.map((g) => {
92
- const { id: v, name: h } = e.find((y) => y.id === g);
93
- return { id: v, name: h };
91
+ const m = f.selectedIds.map((v) => {
92
+ const { id: g, name: h } = e.find((y) => y.id === v);
93
+ return { id: g, name: h };
94
94
  });
95
95
  f.clearSelection();
96
96
  const x = vn();
@@ -271,10 +271,10 @@ const Ur = ({ list: e, keyAction: n, setMessage: r, onExpire: o, durationDelete:
271
271
  ), p = S(
272
272
  (x) => {
273
273
  if (s.current || !i.current) return;
274
- let l, g;
275
- "touches" in x ? (l = x.touches[0].clientX, g = x.touches[0].clientY) : (l = x.clientX, g = x.clientY);
276
- const v = Math.abs(l - u.current.x), h = Math.abs(g - u.current.y);
277
- (v > t || h > t) && (s.current = !0, clearTimeout(i.current));
274
+ let l, v;
275
+ "touches" in x ? (l = x.touches[0].clientX, v = x.touches[0].clientY) : (l = x.clientX, v = x.clientY);
276
+ const g = Math.abs(l - u.current.x), h = Math.abs(v - u.current.y);
277
+ (g > t || h > t) && (s.current = !0, clearTimeout(i.current));
278
278
  },
279
279
  [t]
280
280
  ), m = S(
@@ -382,12 +382,12 @@ let pt = { data: "" }, ht = (e) => {
382
382
  }
383
383
  return o + t + (a ?? "");
384
384
  }, "");
385
- function Fe(e) {
385
+ function He(e) {
386
386
  let n = this || {}, r = e.call ? e(n.p) : e;
387
387
  return vt(r.unshift ? r.raw ? xt(r, [].slice.call(arguments, 1), n.p) : r.reduce((o, t) => Object.assign(o, t && t.call ? t(n.p) : t), {}) : r, ht(n.target), n.g, n.o, n.k);
388
388
  }
389
- Fe.bind({ g: 1 });
390
- Fe.bind({ k: 1 });
389
+ He.bind({ g: 1 });
390
+ He.bind({ k: 1 });
391
391
  function yt(e, n) {
392
392
  for (var r = 0; r < n.length; r++) {
393
393
  var o = n[r];
@@ -432,7 +432,7 @@ var Ge = function() {
432
432
  upSm: "@media (min-width:600px)"
433
433
  }, Ke = function(n) {
434
434
  return n.charAt(0).toUpperCase() + n.slice(1);
435
- }, He = function(n) {
435
+ }, Fe = function(n) {
436
436
  return "" + Ke(n.vertical) + Ke(n.horizontal);
437
437
  }, ve = function(n) {
438
438
  return !!n || n === 0;
@@ -661,7 +661,7 @@ function ye(e, n) {
661
661
  }
662
662
  }
663
663
  var Pn = /* @__PURE__ */ _(function(e, n) {
664
- var r = e.children, o = e.direction, t = o === void 0 ? "down" : o, i = e.in, a = e.style, s = e.timeout, u = s === void 0 ? 0 : s, f = e.onEnter, d = e.onEntered, p = e.onExit, m = e.onExited, x = pe(e, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), l = $(null), g = $e(r.ref, l), v = $e(g, n), h = function(C, A) {
664
+ var r = e.children, o = e.direction, t = o === void 0 ? "down" : o, i = e.in, a = e.style, s = e.timeout, u = s === void 0 ? 0 : s, f = e.onEnter, d = e.onEntered, p = e.onExit, m = e.onExited, x = pe(e, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), l = $(null), v = $e(r.ref, l), g = $e(v, n), h = function(C, A) {
665
665
  ye(t, C), In(C), f && f(C, A);
666
666
  }, y = function(C) {
667
667
  var A = (a == null ? void 0 : a.transitionTimingFunction) || ze.easeOut, L = Ce({
@@ -709,7 +709,7 @@ var Pn = /* @__PURE__ */ _(function(e, n) {
709
709
  timeout: u
710
710
  }, x), function(O, C) {
711
711
  return zn(r, k({
712
- ref: v,
712
+ ref: g,
713
713
  style: k({
714
714
  visibility: O === "exited" && !i ? "hidden" : void 0
715
715
  }, a, {}, r.props.style)
@@ -795,7 +795,7 @@ var Me = function(n) {
795
795
  function he(e) {
796
796
  return Object.entries(e).reduce(function(n, r) {
797
797
  var o, t = r[0], i = r[1];
798
- return k({}, n, (o = {}, o[t] = Fe(i), o));
798
+ return k({}, n, (o = {}, o[t] = He(i), o));
799
799
  }, {});
800
800
  }
801
801
  var ee = {
@@ -816,25 +816,25 @@ var ee = {
816
816
  }), Oe = "0px", Ne = 175, On = /* @__PURE__ */ _(function(e, n) {
817
817
  var r = e.children, o = e.in, t = e.onExited, i = $(null), a = $(null), s = $e(n, a), u = function() {
818
818
  return i.current ? i.current.clientHeight : 0;
819
- }, f = function(g) {
820
- g.style.height = Oe;
821
- }, d = function(g) {
822
- var v = u(), h = Ce({
819
+ }, f = function(v) {
820
+ v.style.height = Oe;
821
+ }, d = function(v) {
822
+ var g = u(), h = Ce({
823
823
  timeout: Ne,
824
824
  mode: "enter"
825
825
  }), y = h.duration, E = h.easing;
826
- g.style.transitionDuration = typeof y == "string" ? y : y + "ms", g.style.height = v + "px", g.style.transitionTimingFunction = E || "";
827
- }, p = function(g) {
828
- g.style.height = "auto";
829
- }, m = function(g) {
830
- g.style.height = u() + "px";
831
- }, x = function(g) {
832
- In(g);
833
- var v = Ce({
826
+ v.style.transitionDuration = typeof y == "string" ? y : y + "ms", v.style.height = g + "px", v.style.transitionTimingFunction = E || "";
827
+ }, p = function(v) {
828
+ v.style.height = "auto";
829
+ }, m = function(v) {
830
+ v.style.height = u() + "px";
831
+ }, x = function(v) {
832
+ In(v);
833
+ var g = Ce({
834
834
  timeout: Ne,
835
835
  mode: "exit"
836
- }), h = v.duration, y = v.easing;
837
- g.style.transitionDuration = typeof h == "string" ? h : h + "ms", g.style.height = Oe, g.style.transitionTimingFunction = y || "";
836
+ }), h = g.duration, y = g.easing;
837
+ v.style.transitionDuration = typeof h == "string" ? h : h + "ms", v.style.height = Oe, v.style.transitionTimingFunction = y || "";
838
838
  };
839
839
  return le(ie, {
840
840
  in: o,
@@ -847,7 +847,7 @@ var ee = {
847
847
  onExiting: x,
848
848
  nodeRef: a,
849
849
  timeout: Ne
850
- }, function(l, g) {
850
+ }, function(l, v) {
851
851
  return le("div", Object.assign({
852
852
  ref: s,
853
853
  className: U(en.root, l === "entered" && en.entered),
@@ -861,7 +861,7 @@ var ee = {
861
861
  }, {}, l === "exited" && !o && {
862
862
  visibility: "hidden"
863
863
  })
864
- }, g), le("div", {
864
+ }, v), le("div", {
865
865
  ref: i,
866
866
  className: ee.CollapseWrapper,
867
867
  // Hack to get children with a negative margin to not falsify the height computation.
@@ -881,7 +881,7 @@ var nn = {
881
881
  }, Ot = function(n) {
882
882
  return n.horizontal !== "center" ? nn[n.horizontal] : nn[n.vertical];
883
883
  }, Nt = function(n) {
884
- return "anchorOrigin" + He(n);
884
+ return "anchorOrigin" + Fe(n);
885
885
  }, Rt = function(n) {
886
886
  n === void 0 && (n = {});
887
887
  var r = {
@@ -936,21 +936,21 @@ var Nn = /* @__PURE__ */ _(function(e, n) {
936
936
  m.current && clearTimeout(m.current);
937
937
  };
938
938
  }, [f, t, l]);
939
- var g = function() {
939
+ var v = function() {
940
940
  m.current && clearTimeout(m.current);
941
- }, v = S(function() {
941
+ }, g = S(function() {
942
942
  t != null && l(t * 0.5);
943
943
  }, [t, l]), h = function(I) {
944
- p.onMouseEnter && p.onMouseEnter(I), g();
944
+ p.onMouseEnter && p.onMouseEnter(I), v();
945
945
  }, y = function(I) {
946
- p.onMouseLeave && p.onMouseLeave(I), v();
946
+ p.onMouseLeave && p.onMouseLeave(I), g();
947
947
  };
948
948
  return V(function() {
949
949
  if (!a && f)
950
- return window.addEventListener("focus", v), window.addEventListener("blur", g), function() {
951
- window.removeEventListener("focus", v), window.removeEventListener("blur", g);
950
+ return window.addEventListener("focus", g), window.addEventListener("blur", v), function() {
951
+ window.removeEventListener("focus", g), window.removeEventListener("blur", v);
952
952
  };
953
- }, [a, v, f]), le("div", Object.assign({
953
+ }, [a, g, f]), le("div", Object.assign({
954
954
  ref: n
955
955
  }, p, {
956
956
  className: U(ee.Snackbar, o),
@@ -1062,7 +1062,7 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1062
1062
  }, []);
1063
1063
  var f = n.snack, d = n.classes, p = n.Component, m = p === void 0 ? $t : p, x = mn(function() {
1064
1064
  return Rt(d);
1065
- }, [d]), l = f.open, g = f.SnackbarProps, v = f.TransitionComponent, h = f.TransitionProps, y = f.transitionDuration, E = f.disableWindowBlurListener, I = f.content, D = pe(f, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), O = k({
1065
+ }, [d]), l = f.open, v = f.SnackbarProps, g = f.TransitionComponent, h = f.TransitionProps, y = f.transitionDuration, E = f.disableWindowBlurListener, I = f.content, D = pe(f, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), O = k({
1066
1066
  direction: Ot(D.anchorOrigin),
1067
1067
  timeout: y
1068
1068
  }, h), C = I;
@@ -1080,9 +1080,9 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1080
1080
  disableWindowBlurListener: E,
1081
1081
  autoHideDuration: D.autoHideDuration,
1082
1082
  className: U(zt.wrappedRoot, x.root, x[Nt(D.anchorOrigin)]),
1083
- SnackbarProps: g,
1083
+ SnackbarProps: v,
1084
1084
  onClose: a
1085
- }, b.createElement(v, Object.assign({}, O, {
1085
+ }, b.createElement(g, Object.assign({}, O, {
1086
1086
  appear: !0,
1087
1087
  in: l,
1088
1088
  onExit: A.onExit,
@@ -1163,17 +1163,17 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1163
1163
  ke.root,
1164
1164
  // root should come after others to override maxWidth
1165
1165
  o.containerRoot,
1166
- o["containerAnchorOrigin" + He(t)],
1166
+ o["containerAnchorOrigin" + Fe(t)],
1167
1167
  i && ke.rootDense
1168
1168
  );
1169
1169
  return b.createElement("div", {
1170
1170
  className: s
1171
1171
  }, a);
1172
- }, Vt = /* @__PURE__ */ gn(jt), Ft = process.env.NODE_ENV !== "production", Ht = {
1172
+ }, Vt = /* @__PURE__ */ gn(jt), Ht = process.env.NODE_ENV !== "production", Ft = {
1173
1173
  NO_PERSIST_ALL: "Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."
1174
1174
  }, qt = function(e) {
1175
- if (Ft) {
1176
- var n = Ht[e];
1175
+ if (Ht) {
1176
+ var n = Ft[e];
1177
1177
  typeof console < "u" && console.error("WARNING - notistack: " + n);
1178
1178
  try {
1179
1179
  throw new Error(n);
@@ -1190,7 +1190,7 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1190
1190
  return t = e.call(this, o) || this, t.enqueueSnackbar = function(i, a) {
1191
1191
  if (a === void 0 && (a = {}), i == null)
1192
1192
  throw new Error("enqueueSnackbar called with invalid argument");
1193
- var s = an(i) ? i : a, u = an(i) ? i.message : i, f = s.key, d = s.preventDuplicate, p = pe(s, ["key", "preventDuplicate"]), m = ve(f), x = m ? f : (/* @__PURE__ */ new Date()).getTime() + Math.random(), l = Pt(p, t.props), g = k({
1193
+ var s = an(i) ? i : a, u = an(i) ? i.message : i, f = s.key, d = s.preventDuplicate, p = pe(s, ["key", "preventDuplicate"]), m = ve(f), x = m ? f : (/* @__PURE__ */ new Date()).getTime() + Math.random(), l = Pt(p, t.props), v = k({
1194
1194
  id: x
1195
1195
  }, p, {
1196
1196
  message: u,
@@ -1213,16 +1213,16 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1213
1213
  SnackbarProps: l("SnackbarProps", !0),
1214
1214
  className: U(t.props.className, p.className)
1215
1215
  });
1216
- return g.persist && (g.autoHideDuration = void 0), t.setState(function(v) {
1216
+ return v.persist && (v.autoHideDuration = void 0), t.setState(function(g) {
1217
1217
  if (d === void 0 && t.props.preventDuplicate || d) {
1218
1218
  var h = function(D) {
1219
1219
  return m ? D.id === x : D.message === u;
1220
- }, y = v.queue.findIndex(h) > -1, E = v.snacks.findIndex(h) > -1;
1220
+ }, y = g.queue.findIndex(h) > -1, E = g.snacks.findIndex(h) > -1;
1221
1221
  if (y || E)
1222
- return v;
1222
+ return g;
1223
1223
  }
1224
- return t.handleDisplaySnack(k({}, v, {
1225
- queue: [].concat(v.queue, [g])
1224
+ return t.handleDisplaySnack(k({}, g, {
1225
+ queue: [].concat(g.queue, [v])
1226
1226
  }));
1227
1227
  }), x;
1228
1228
  }, t.handleDisplaySnack = function(i) {
@@ -1311,13 +1311,13 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1311
1311
  }
1312
1312
  var r = n.prototype;
1313
1313
  return r.render = function() {
1314
- var t = this, i = this.state.contextValue, a = this.props, s = a.domRoot, u = a.children, f = a.dense, d = f === void 0 ? !1 : f, p = a.Components, m = p === void 0 ? {} : p, x = a.classes, l = this.state.snacks.reduce(function(v, h) {
1315
- var y, E = He(h.anchorOrigin), I = v[E] || [];
1316
- return k({}, v, (y = {}, y[E] = [].concat(I, [h]), y));
1317
- }, {}), g = Object.keys(l).map(function(v) {
1318
- var h = l[v], y = h[0];
1314
+ var t = this, i = this.state.contextValue, a = this.props, s = a.domRoot, u = a.children, f = a.dense, d = f === void 0 ? !1 : f, p = a.Components, m = p === void 0 ? {} : p, x = a.classes, l = this.state.snacks.reduce(function(g, h) {
1315
+ var y, E = Fe(h.anchorOrigin), I = g[E] || [];
1316
+ return k({}, g, (y = {}, y[E] = [].concat(I, [h]), y));
1317
+ }, {}), v = Object.keys(l).map(function(g) {
1318
+ var h = l[g], y = h[0];
1319
1319
  return b.createElement(Vt, {
1320
- key: v,
1320
+ key: g,
1321
1321
  dense: d,
1322
1322
  anchorOrigin: y.anchorOrigin,
1323
1323
  classes: x
@@ -1337,7 +1337,7 @@ var $t = /* @__PURE__ */ gn(Rn), zt = /* @__PURE__ */ he({
1337
1337
  });
1338
1338
  return b.createElement(Dn.Provider, {
1339
1339
  value: i
1340
- }, u, s ? Un(g, s) : g);
1340
+ }, u, s ? Un(v, s) : v);
1341
1341
  }, wn(n, [{
1342
1342
  key: "maxSnack",
1343
1343
  get: function() {
@@ -1405,7 +1405,7 @@ const Xt = P(M, {
1405
1405
  ] })
1406
1406
  ] }),
1407
1407
  /* @__PURE__ */ c(M, { children: /* @__PURE__ */ c(
1408
- Hn,
1408
+ Fn,
1409
1409
  {
1410
1410
  variant: "determinate",
1411
1411
  value: r,
@@ -1502,21 +1502,21 @@ const Xt = P(M, {
1502
1502
  m();
1503
1503
  return;
1504
1504
  }
1505
- const v = setInterval(() => {
1505
+ const g = setInterval(() => {
1506
1506
  d((h) => {
1507
1507
  const y = h - 1;
1508
- return y <= 0 && clearInterval(v), y;
1508
+ return y <= 0 && clearInterval(g), y;
1509
1509
  });
1510
1510
  }, 1e3);
1511
- return () => clearInterval(v);
1511
+ return () => clearInterval(g);
1512
1512
  }, [m, f]);
1513
1513
  const x = () => {
1514
1514
  t && t(), p(a);
1515
- }, l = f / Math.ceil(o / 1e3) * 100, g = {
1515
+ }, l = f / Math.ceil(o / 1e3) * 100, v = {
1516
1516
  ...(s == null ? void 0 : s.horizontal) === "center" && { justifyContent: "center" },
1517
1517
  ...e.style || {}
1518
1518
  };
1519
- return /* @__PURE__ */ c(qe, { ref: n, role: "alert", style: g, className: u, children: /* @__PURE__ */ c(
1519
+ return /* @__PURE__ */ c(qe, { ref: n, role: "alert", style: v, className: u, children: /* @__PURE__ */ c(
1520
1520
  Yt,
1521
1521
  {
1522
1522
  time: f,
@@ -1667,10 +1667,10 @@ const Ie = P("div")({
1667
1667
  )(({ theme: e }) => ({
1668
1668
  textTransform: "none",
1669
1669
  padding: "10px 16px"
1670
- })), tr = ({ modal: e, hideMessage: n }) => /* @__PURE__ */ w(F, { children: [
1670
+ })), tr = ({ modal: e, hideMessage: n }) => /* @__PURE__ */ w(H, { children: [
1671
1671
  /* @__PURE__ */ c(De, { color: e.severity || "", children: e.title || "" }),
1672
1672
  /* @__PURE__ */ c(we, {}),
1673
- /* @__PURE__ */ c(H, { sx: { paddingX: 1 }, children: e.message }),
1673
+ /* @__PURE__ */ c(F, { sx: { paddingX: 1 }, children: e.message }),
1674
1674
  /* @__PURE__ */ c(Ie, { sx: { justifyContent: "space-around" }, children: e.actions.map(({ text: r, onClick: o, ...t }) => /* @__PURE__ */ c(
1675
1675
  R,
1676
1676
  {
@@ -1688,9 +1688,9 @@ const Ie = P("div")({
1688
1688
  default:
1689
1689
  return /* @__PURE__ */ c(sn, { modal: e, hideMessage: n });
1690
1690
  }
1691
- }, ir = b.memo(rr), or = ({ modal: e }) => (e.view == "fullModal", /* @__PURE__ */ w(F, { children: [
1691
+ }, ir = b.memo(rr), or = ({ modal: e }) => (e.view == "fullModal", /* @__PURE__ */ w(H, { children: [
1692
1692
  /* @__PURE__ */ c(Se, { children: /* @__PURE__ */ c(M, { display: "flex", alignItems: "center", justifyContent: "space-between", children: e.title }) }),
1693
- /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(j, { children: e.message }) }),
1693
+ /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(j, { children: e.message }) }),
1694
1694
  /* @__PURE__ */ w(Ie, { children: [
1695
1695
  /* @__PURE__ */ c(R, { onClick: e.onCancel, variant: "outlined", children: "Отмена" }),
1696
1696
  /* @__PURE__ */ c(
@@ -1711,13 +1711,13 @@ const Ie = P("div")({
1711
1711
  default:
1712
1712
  return /* @__PURE__ */ c(cn, { modal: e });
1713
1713
  }
1714
- }, sr = b.memo(ar), cr = ({ modal: e }) => /* @__PURE__ */ w(F, { children: [
1714
+ }, sr = b.memo(ar), cr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
1715
1715
  /* @__PURE__ */ w(De, { color: e.severity || "info", children: [
1716
1716
  /* @__PURE__ */ c(Kn, { color: e.severity, sx: { marginRight: 1 } }),
1717
1717
  e.title || `Информация ${e.severity}`
1718
1718
  ] }),
1719
1719
  /* @__PURE__ */ c(we, { sx: (n) => ({ borderColor: qn(n.palette[e.severity || "info"].main, 0.6) }) }),
1720
- /* @__PURE__ */ c(H, { sx: { paddingX: 1 }, children: e.message }),
1720
+ /* @__PURE__ */ c(F, { sx: { paddingX: 1 }, children: e.message }),
1721
1721
  /* @__PURE__ */ c(Ie, { sx: { justifyContent: "end", pt: 1 }, children: /* @__PURE__ */ c(
1722
1722
  R,
1723
1723
  {
@@ -1734,13 +1734,13 @@ const Ie = P("div")({
1734
1734
  default:
1735
1735
  return /* @__PURE__ */ c(ln, { modal: e });
1736
1736
  }
1737
- }, ur = b.memo(lr), dr = ({ modal: e }) => /* @__PURE__ */ w(F, { children: [
1737
+ }, ur = b.memo(lr), dr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
1738
1738
  /* @__PURE__ */ c(Se, { sx: { p: 2.5, fontWeight: 600 }, children: /* @__PURE__ */ w(M, { display: "flex", alignItems: "center", gap: 1, children: [
1739
1739
  /* @__PURE__ */ c(Zn, { color: "success" }),
1740
1740
  /* @__PURE__ */ c("span", { children: e.title })
1741
1741
  ] }) }),
1742
1742
  /* @__PURE__ */ c(we, {}),
1743
- /* @__PURE__ */ c(H, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: typeof e.message == "string" ? /* @__PURE__ */ c(j, { variant: "h6", gutterBottom: !0, children: e.message }) : e.message }),
1743
+ /* @__PURE__ */ c(F, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: typeof e.message == "string" ? /* @__PURE__ */ c(j, { variant: "h6", gutterBottom: !0, children: e.message }) : e.message }),
1744
1744
  /* @__PURE__ */ c(je, { sx: { p: 2 }, children: /* @__PURE__ */ c(
1745
1745
  R,
1746
1746
  {
@@ -1753,9 +1753,9 @@ const Ie = P("div")({
1753
1753
  children: e.buttonText || "OK"
1754
1754
  }
1755
1755
  ) })
1756
- ] }), fr = b.memo(dr), pr = ({ modal: e }) => /* @__PURE__ */ w(F, { children: [
1756
+ ] }), fr = b.memo(dr), pr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
1757
1757
  /* @__PURE__ */ c(Se, { children: e.title }),
1758
- /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(j, { children: e.message }) }),
1758
+ /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(j, { children: e.message }) }),
1759
1759
  /* @__PURE__ */ c(je, { children: /* @__PURE__ */ c(
1760
1760
  R,
1761
1761
  {
@@ -1765,10 +1765,10 @@ const Ie = P("div")({
1765
1765
  children: e.buttonText || "OK"
1766
1766
  }
1767
1767
  ) })
1768
- ] }), hr = b.memo(pr), mr = ({ modal: e }) => /* @__PURE__ */ w(F, { children: [
1768
+ ] }), hr = b.memo(pr), mr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
1769
1769
  /* @__PURE__ */ c(De, { color: e.severity || "", children: e.title || "Успех" }),
1770
1770
  /* @__PURE__ */ c(we, {}),
1771
- /* @__PURE__ */ c(H, { sx: { paddingX: 1 }, children: typeof e.message == "string" ? /* @__PURE__ */ c(j, { variant: "h6", gutterBottom: !0, children: e.message }) : e.message }),
1771
+ /* @__PURE__ */ c(F, { sx: { paddingX: 1 }, children: typeof e.message == "string" ? /* @__PURE__ */ c(j, { variant: "h6", gutterBottom: !0, children: e.message }) : e.message }),
1772
1772
  /* @__PURE__ */ c(je, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: /* @__PURE__ */ c(
1773
1773
  R,
1774
1774
  {
@@ -1806,13 +1806,13 @@ const Ie = P("div")({
1806
1806
  color: "white",
1807
1807
  padding: e.spacing(3),
1808
1808
  textAlign: "center"
1809
- })), br = ({ modal: e }) => /* @__PURE__ */ w(F, { children: [
1809
+ })), br = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
1810
1810
  /* @__PURE__ */ w(yr, { children: [
1811
1811
  /* @__PURE__ */ c(Qn, { sx: { fontSize: 64, mb: 2 } }),
1812
1812
  /* @__PURE__ */ c(j, { variant: "h4", gutterBottom: !0, children: e.title }),
1813
1813
  /* @__PURE__ */ c(j, { variant: "body1", children: e.message })
1814
1814
  ] }),
1815
- /* @__PURE__ */ c(H, { sx: { textAlign: "center", py: 3 }, children: /* @__PURE__ */ c(
1815
+ /* @__PURE__ */ c(F, { sx: { textAlign: "center", py: 3 }, children: /* @__PURE__ */ c(
1816
1816
  R,
1817
1817
  {
1818
1818
  onClick: e.onCancel,
@@ -1836,9 +1836,9 @@ const Ie = P("div")({
1836
1836
  default:
1837
1837
  return /* @__PURE__ */ c(fr, { ...e });
1838
1838
  }
1839
- }, Cr = b.memo(kr), Sr = ({ modal: e }) => /* @__PURE__ */ w(F, { children: [
1839
+ }, Cr = b.memo(kr), Sr = ({ modal: e }) => /* @__PURE__ */ w(H, { children: [
1840
1840
  /* @__PURE__ */ c(De, { children: "Обновление" }),
1841
- /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(M, { py: 2, children: e.message }) }),
1841
+ /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(M, { py: 2, children: e.message }) }),
1842
1842
  /* @__PURE__ */ w(Ie, { children: [
1843
1843
  e.onCancel && /* @__PURE__ */ c(R, { onClick: e.onCancel, children: "Отмена" }),
1844
1844
  e.onConfirm && /* @__PURE__ */ c(R, { color: "primary", onClick: e.onConfirm, children: "Обновить" })
@@ -1979,47 +1979,47 @@ const Nr = {
1979
1979
  appear: !0,
1980
1980
  in: o,
1981
1981
  nodeRef: p,
1982
- onEnter: (v, h) => {
1983
- Be(v);
1982
+ onEnter: (g, h) => {
1983
+ Be(g);
1984
1984
  const { duration: y, delay: E, easing: I } = te({
1985
1985
  style: t,
1986
1986
  timeout: i,
1987
1987
  mode: "enter"
1988
1988
  });
1989
- v.style.transition = [
1989
+ g.style.transition = [
1990
1990
  T("opacity", { duration: y, delay: E }),
1991
1991
  T("transform", {
1992
1992
  delay: E,
1993
1993
  easing: I,
1994
1994
  duration: y * 0.666
1995
1995
  })
1996
- ].join(","), a && a(v, h);
1996
+ ].join(","), a && a(g, h);
1997
1997
  },
1998
1998
  onEntered: s,
1999
- onExit: (v) => {
1999
+ onExit: (g) => {
2000
2000
  const { duration: h, delay: y, easing: E } = te({
2001
2001
  style: t,
2002
2002
  timeout: i,
2003
2003
  mode: "exit"
2004
2004
  });
2005
- v.style.transition = [
2005
+ g.style.transition = [
2006
2006
  T("opacity", { duration: h, delay: y }),
2007
2007
  T("transform", {
2008
2008
  easing: E,
2009
2009
  duration: h * 0.666,
2010
2010
  delay: y || h * 0.333
2011
2011
  })
2012
- ].join(","), v.style.opacity = "0", v.style.transform = We(0.75), u && u(v);
2012
+ ].join(","), g.style.opacity = "0", g.style.transform = We(0.75), u && u(g);
2013
2013
  },
2014
2014
  onExited: f,
2015
2015
  timeout: i,
2016
2016
  ...d,
2017
- children: (v, h) => N.cloneElement(r, {
2017
+ children: (g, h) => N.cloneElement(r, {
2018
2018
  style: {
2019
2019
  opacity: 0,
2020
2020
  transform: We(0.75),
2021
- visibility: v === "exited" && !o ? "hidden" : void 0,
2022
- ...Nr[v],
2021
+ visibility: g === "exited" && !o ? "hidden" : void 0,
2022
+ ...Nr[g],
2023
2023
  ...t,
2024
2024
  ...r.props.style
2025
2025
  },
@@ -2107,29 +2107,29 @@ const Ar = N.memo(_n), pn = {
2107
2107
  Slide: void 0
2108
2108
  }, Lr = ({ children: e }) => {
2109
2109
  const [n, r] = de([]), { enqueueSnackbar: o, closeSnackbar: t } = Q(), a = _r((l) => {
2110
- const g = vn();
2111
- ["modal", "fullModal"].includes(l.view) && r((v) => [...v, { ...l, id: g, isExiting: !1 }]);
2112
- }), s = S((l, g) => {
2113
- g === "alert" && t(l), g === "modal" && r((v) => v.map((h) => h.id === l ? { ...h, isExiting: !0 } : h));
2110
+ const v = vn();
2111
+ ["modal", "fullModal"].includes(l.view) && r((g) => [...g, { ...l, id: v, isExiting: !1 }]);
2112
+ }), s = S((l, v) => {
2113
+ v === "alert" && t(l), v === "modal" && r((g) => g.map((h) => h.id === l ? { ...h, isExiting: !0 } : h));
2114
2114
  }, []), u = (l) => {
2115
2115
  s(l, "modal");
2116
2116
  }, f = (l) => {
2117
- r((g) => g.filter((v) => v.id !== l));
2117
+ r((v) => v.filter((g) => g.id !== l));
2118
2118
  }, d = S(() => {
2119
- r((l) => l.map((g) => ({ ...g, isExiting: !0 })));
2120
- }, []), p = S(({ variant: l, message: g, ...v }) => {
2121
- o(g, {
2122
- TransitionComponent: pn[v.animation || "Slide"],
2123
- variant: l || "info"
2124
- // ...(config.timeout && { autoHideDuration: config.timeout }),
2125
- // anchorOrigin: {
2126
- // vertical: 'bottom',
2127
- // horizontal: 'left'
2128
- // },
2129
- // ...config
2119
+ r((l) => l.map((v) => ({ ...v, isExiting: !0 })));
2120
+ }, []), p = S(({ variant: l, message: v, ...g }) => {
2121
+ o(v, {
2122
+ TransitionComponent: pn[g.animation || "Slide"],
2123
+ variant: l || "info",
2124
+ ...g.timeout && { autoHideDuration: g.timeout },
2125
+ anchorOrigin: {
2126
+ vertical: "bottom",
2127
+ horizontal: "left"
2128
+ },
2129
+ ...g
2130
2130
  });
2131
2131
  }, []), m = S(
2132
- ({ message: l, ...g }) => {
2132
+ ({ message: l, ...v }) => {
2133
2133
  o(l, {
2134
2134
  TransitionComponent: pn.Grow,
2135
2135
  variant: "deleteCountdown",
@@ -2141,7 +2141,7 @@ const Ar = N.memo(_n), pn = {
2141
2141
  vertical: "bottom",
2142
2142
  horizontal: "center"
2143
2143
  },
2144
- ...g
2144
+ ...v
2145
2145
  });
2146
2146
  },
2147
2147
  [o]
@@ -2154,18 +2154,18 @@ const Ar = N.memo(_n), pn = {
2154
2154
  };
2155
2155
  return /* @__PURE__ */ w(En.Provider, { value: x, children: [
2156
2156
  e,
2157
- n.filter((l) => ["modal", "fullModal"].includes(l.view)).map((l, g) => /* @__PURE__ */ c(Bn, { children: /* @__PURE__ */ w(
2157
+ n.filter((l) => ["modal", "fullModal"].includes(l.view)).map((l, v) => /* @__PURE__ */ c(Bn, { children: /* @__PURE__ */ w(
2158
2158
  Xn,
2159
2159
  {
2160
2160
  open: !l.isExiting,
2161
2161
  ...l.view == "fullModal" && { fullWidth: !0, fullScreen: !0 },
2162
- onClick: (v) => {
2162
+ onClick: (g) => {
2163
2163
  u(l.id);
2164
2164
  },
2165
2165
  maxWidth: "sm",
2166
2166
  fullWidth: !0,
2167
2167
  TransitionProps: {
2168
- onExited: (v) => {
2168
+ onExited: (g) => {
2169
2169
  l.isExiting && f(l.id);
2170
2170
  }
2171
2171
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rc-lib-ui",
3
3
  "private": false,
4
- "version": "1.4.5",
4
+ "version": "1.4.6",
5
5
  "author": "SinGlEBW",
6
6
  "license": "MIT",
7
7
  "type": "module",