mimir-ui-kit 1.43.15 → 1.43.18

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.
@@ -1,103 +1,104 @@
1
1
  import { jsxs as u, jsx as a } from "react/jsx-runtime";
2
- import { c as P } from "../../index-DIxK0V-G.js";
3
- import { useState as G } from "react";
4
- import { week as U, COUNT_WORK_DAYS as V } from "./constants.js";
5
- import { useDatePickerPosition as W } from "./hooks.js";
2
+ import { c as A } from "../../index-DIxK0V-G.js";
3
+ import { useState as U } from "react";
4
+ import { week as V, COUNT_WORK_DAYS as W } from "./constants.js";
5
+ import { useDatePickerPosition as E } from "./hooks.js";
6
6
  import { c as n } from "../../styles.module-Cuqm31CO.js";
7
- import { getUpdateDate as A } from "./utils.js";
8
- import { Icon as E } from "../../icons/Icon.js";
7
+ import { getUpdateDate as B } from "./utils.js";
8
+ import { Icon as K } from "../../icons/Icon.js";
9
9
  import { formating as m } from "../../utils/index.js";
10
- import { Button as B } from "../Button/Button.js";
11
- import { parseDate as H } from "../../utils/formating/Date.js";
12
- const at = ({
10
+ import { Button as H } from "../Button/Button.js";
11
+ import { parseDate as I } from "../../utils/formating/Date.js";
12
+ const mt = ({
13
13
  date: i,
14
14
  selectedDate: d,
15
- onChangeValue: I,
16
- setIsActive: O,
17
- before: p,
15
+ onChangeValue: O,
16
+ setIsActive: S,
17
+ before: g,
18
18
  onChangeType: D,
19
- disableFuture: S = !1,
20
- disablePast: T = !1,
21
- disabledDate: h,
22
- validRange: N
19
+ disableFuture: T = !1,
20
+ disablePast: _ = !1,
21
+ disabledDate: p,
22
+ validRange: N,
23
+ dateFormat: w
23
24
  }) => {
24
- var $;
25
+ var k;
25
26
  i = isNaN(new Date(i).getTime()) ? /* @__PURE__ */ new Date() : i;
26
- const l = H(i), f = d ? H(d) : l, y = {
27
+ const l = I(i), f = d ? I(d) : l, y = {
27
28
  y: f.getFullYear(),
28
29
  d: f.getDate(),
29
30
  m: f.getMonth() + 1
30
- }, w = {
31
+ }, v = {
31
32
  y: l.getFullYear(),
32
33
  d: l.getDate(),
33
34
  m: l.getMonth() + 1
34
- }, [r, b] = G({ y: w.y, m: w.m }), _ = W([r]), j = (t) => {
35
+ }, [r, b] = U({ y: v.y, m: v.m }), j = E([r]), C = (t) => {
35
36
  let e = t.getDay();
36
37
  return e === 0 && (e = 7), e - 1;
37
- }, v = r.m - 1, c = new Date(r.y, v), g = [], x = (() => {
38
+ }, x = r.m - 1, c = new Date(r.y, x), h = [], M = (() => {
38
39
  const t = new Date(c);
39
40
  t.setDate(t.getDate() - 1);
40
41
  const e = t.getDate(), o = [];
41
- for (let s = 0; s < j(c); s++)
42
+ for (let s = 0; s < C(c); s++)
42
43
  o.push(e - s);
43
44
  return o.reverse(), o;
44
45
  })();
45
- for (; c.getMonth() === v; )
46
- g.push(c.getDate()), c.setDate(c.getDate() + 1);
47
- const C = (() => {
48
- const e = 42 - (x.length + g.length), o = [];
46
+ for (; c.getMonth() === x; )
47
+ h.push(c.getDate()), c.setDate(c.getDate() + 1);
48
+ const L = (() => {
49
+ const e = 42 - (M.length + h.length), o = [];
49
50
  for (let s = 1; s <= e; s++)
50
51
  o.push(s);
51
52
  return o;
52
- })(), F = () => {
53
- O(!1);
54
- }, L = () => {
55
- b(A(r.m + 1, r.y));
56
- }, Y = () => {
57
- b(A(r.m - 1, r.y));
58
- }, M = (t) => {
53
+ })(), Y = () => {
54
+ S(!1);
55
+ }, z = () => {
56
+ b(B(r.m + 1, r.y));
57
+ }, F = () => {
58
+ b(B(r.m - 1, r.y));
59
+ }, $ = (t) => {
59
60
  const e = new Date(t);
60
- if (e.setHours(0, 0, 0, 0), p && p.getTime() > t)
61
+ if (e.setHours(0, 0, 0, 0), g && g.getTime() > t)
61
62
  return !0;
62
- if (S) {
63
+ if (T) {
63
64
  const o = /* @__PURE__ */ new Date();
64
65
  if (o.setHours(0, 0, 0, 0), e.getTime() > o.getTime()) return !0;
65
66
  }
66
- if (T) {
67
+ if (_) {
67
68
  const o = /* @__PURE__ */ new Date();
68
69
  if (o.setHours(0, 0, 0, 0), t < o.getTime()) return !0;
69
70
  }
70
- if (h && h(e)) return !0;
71
+ if (p && p(e)) return !0;
71
72
  if (N) {
72
- const [o, s] = N, k = new Date(t);
73
- if (o.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0), k < o || k > s) return !0;
73
+ const [o, s] = N, P = new Date(t);
74
+ if (o.setHours(0, 0, 0, 0), s.setHours(0, 0, 0, 0), P < o || P > s) return !0;
74
75
  }
75
76
  return !1;
76
- }, z = (t) => {
77
- M(
77
+ }, G = (t) => {
78
+ $(
78
79
  (/* @__PURE__ */ new Date(
79
80
  `${r.y}-${m.Number(2, r.m)}-${m.Number(2, t)}`
80
81
  )).getTime()
81
- ) || (I(
82
+ ) || (O(
82
83
  /* @__PURE__ */ new Date(
83
84
  `${r.y}-${m.Number(2, r.m)}-${m.Number(2, t)}`
84
85
  )
85
- ), F());
86
+ ), Y());
86
87
  };
87
88
  return /* @__PURE__ */ u(
88
89
  "div",
89
90
  {
90
91
  className: n["calendar-block"],
91
- ref: _,
92
+ ref: j,
92
93
  "data-testid": "calendar-modal",
93
94
  children: [
94
95
  /* @__PURE__ */ u("div", { className: n.h, children: [
95
96
  /* @__PURE__ */ a(
96
- B,
97
+ H,
97
98
  {
98
99
  isIconButton: !0,
99
100
  iconName: "DropdownArrowLeft16px",
100
- onClick: Y,
101
+ onClick: F,
101
102
  variant: "secondary-gray",
102
103
  size: "l"
103
104
  }
@@ -107,46 +108,46 @@ const at = ({
107
108
  {
108
109
  type: "button",
109
110
  className: n.d,
110
- onClick: () => D == null ? void 0 : D("months"),
111
111
  "data-testid": "month-year-button",
112
+ onClick: w === "month" ? void 0 : () => D == null ? void 0 : D("months"),
112
113
  children: [
113
- ($ = m.Month(r.m)) == null ? void 0 : $.name,
114
+ (k = m.Month(r.m)) == null ? void 0 : k.name,
114
115
  "’",
115
116
  r.y.toString().slice(-2),
116
- /* @__PURE__ */ a(E, { iconName: "DropdownArrowBottom16px" })
117
+ w !== "month" && /* @__PURE__ */ a(K, { iconName: "DropdownArrowBottom16px" })
117
118
  ]
118
119
  }
119
120
  ),
120
121
  /* @__PURE__ */ a(
121
- B,
122
+ H,
122
123
  {
123
124
  isIconButton: !0,
124
125
  iconName: "DropdownArrowRight16px",
125
- onClick: L,
126
+ onClick: z,
126
127
  variant: "secondary-gray",
127
128
  size: "l"
128
129
  }
129
130
  )
130
131
  ] }),
131
132
  /* @__PURE__ */ u("div", { className: n.b, children: [
132
- U.map((t, e) => /* @__PURE__ */ a(
133
+ V.map((t, e) => /* @__PURE__ */ a(
133
134
  "div",
134
135
  {
135
- className: P(n.m, {
136
- [n.orange]: e > V
136
+ className: A(n.m, {
137
+ [n.orange]: e > W
137
138
  }),
138
139
  children: t
139
140
  },
140
141
  `v${e}`
141
142
  )),
142
- x.map((t, e) => /* @__PURE__ */ a("div", { className: n.m, children: t }, e)),
143
- g.map((t, e) => /* @__PURE__ */ a(
143
+ M.map((t, e) => /* @__PURE__ */ a("div", { className: n.m, children: t }, e)),
144
+ h.map((t, e) => /* @__PURE__ */ a(
144
145
  "button",
145
146
  {
146
147
  type: "button",
147
- onClick: () => z(t),
148
- className: P(
149
- M(
148
+ onClick: () => G(t),
149
+ className: A(
150
+ $(
150
151
  (/* @__PURE__ */ new Date(
151
152
  `${r.y}-${m.Number(2, r.m)}-${m.Number(2, t)}`
152
153
  )).getTime()
@@ -159,12 +160,12 @@ const at = ({
159
160
  },
160
161
  e
161
162
  )),
162
- C.map((t, e) => /* @__PURE__ */ a("div", { className: n.m, children: t }, e))
163
+ L.map((t, e) => /* @__PURE__ */ a("div", { className: n.m, children: t }, e))
163
164
  ] })
164
165
  ]
165
166
  }
166
167
  );
167
168
  };
168
169
  export {
169
- at as DatePickerModal
170
+ mt as DatePickerModal
170
171
  };
@@ -9,6 +9,7 @@ type TProps = {
9
9
  disablePast?: boolean;
10
10
  disabledDate?: (date: Date) => boolean;
11
11
  validRange?: [Date, Date];
12
+ dateFormat?: 'full' | 'month' | 'year';
12
13
  };
13
- export declare const MonthPickerModal: ({ date, selectedDate, onChangeValue, before, onChangeType, onChangeMonth, disableFuture, disablePast, disabledDate, validRange }: TProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const MonthPickerModal: ({ date, selectedDate, onChangeValue, before, onChangeType, onChangeMonth, disableFuture, disablePast, disabledDate, validRange, dateFormat }: TProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export {};
@@ -1,66 +1,67 @@
1
1
  import { jsxs as w, jsx as f } from "react/jsx-runtime";
2
- import { c as R } from "../../index-DIxK0V-G.js";
3
- import { useState as _ } from "react";
4
- import { months as C } from "./constants.js";
5
- import { useDatePickerPosition as L } from "./hooks.js";
2
+ import { c as _ } from "../../index-DIxK0V-G.js";
3
+ import { useState as C } from "react";
4
+ import { months as L } from "./constants.js";
5
+ import { useDatePickerPosition as b } from "./hooks.js";
6
6
  import { c } from "../../styles.module-Cuqm31CO.js";
7
- import { Icon as b } from "../../icons/Icon.js";
8
- import { formating as F } from "../../utils/index.js";
9
- import { Button as H } from "../Button/Button.js";
10
- const Z = ({
11
- date: P,
7
+ import { Icon as q } from "../../icons/Icon.js";
8
+ import { formating as P } from "../../utils/index.js";
9
+ import { Button as A } from "../Button/Button.js";
10
+ const T = ({
11
+ date: F,
12
12
  selectedDate: D,
13
- onChangeValue: A,
13
+ onChangeValue: G,
14
14
  before: m,
15
15
  onChangeType: y,
16
16
  onChangeMonth: g,
17
- disableFuture: G = !1,
18
- disablePast: I = !1,
17
+ disableFuture: I = !1,
18
+ disablePast: N = !1,
19
19
  disabledDate: u,
20
- validRange: M
20
+ validRange: h,
21
+ dateFormat: M
21
22
  }) => {
22
- const N = L(), d = new Date(P), p = D ? new Date(D) : d, h = {
23
+ const O = b(), d = new Date(F), p = D ? new Date(D) : d, k = {
23
24
  y: p.getFullYear(),
24
25
  d: p.getDate(),
25
26
  m: p.getMonth() + 1
26
- }, k = {
27
+ }, x = {
27
28
  y: d.getFullYear(),
28
29
  d: d.getDate(),
29
30
  m: d.getMonth() + 1
30
- }, [t, x] = _(k.y), O = () => {
31
- x(t + 1);
32
- }, S = () => {
33
- x(t - 1);
34
- }, Y = (e) => {
35
- const i = /* @__PURE__ */ new Date(), n = i.getFullYear(), l = i.getMonth() + 1;
36
- if (M) {
37
- const [r, a] = M, o = new Date(t, e - 1, 1), s = new Date(t, e, 0);
31
+ }, [t, Y] = C(x.y), S = () => {
32
+ Y(t + 1);
33
+ }, $ = () => {
34
+ Y(t - 1);
35
+ }, v = (e) => {
36
+ const i = /* @__PURE__ */ new Date(), r = i.getFullYear(), l = i.getMonth() + 1;
37
+ if (h) {
38
+ const [n, a] = h, o = new Date(t, e - 1, 1), s = new Date(t, e, 0);
38
39
  o.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999);
39
- const v = new Date(r), B = new Date(a);
40
- v.setHours(0, 0, 0, 0), B.setHours(23, 59, 59, 999);
41
- const j = s < v, z = o > B;
42
- if (j || z)
40
+ const B = new Date(n), H = new Date(a);
41
+ B.setHours(0, 0, 0, 0), H.setHours(23, 59, 59, 999);
42
+ const z = s < B, R = o > H;
43
+ if (z || R)
43
44
  return !0;
44
45
  }
45
46
  if (m) {
46
- const r = m.getFullYear(), a = m.getMonth() + 1;
47
- if (r > t || r === t && a > e)
47
+ const n = m.getFullYear(), a = m.getMonth() + 1;
48
+ if (n > t || n === t && a > e)
48
49
  return !0;
49
50
  }
50
- if (G && (t > n || t === n && e > l) || I && (t < n || t === n && e < l))
51
+ if (I && (t > r || t === r && e > l) || N && (t < r || t === r && e < l))
51
52
  return !0;
52
53
  if (u) {
53
- const r = new Date(t, e, 0).getDate(), a = [1, Math.ceil(r / 2), r];
54
+ const n = new Date(t, e, 0).getDate(), a = [1, Math.ceil(n / 2), n];
54
55
  for (const o of a) {
55
56
  const s = new Date(t, e - 1, o);
56
57
  if (!u(s)) return !1;
57
58
  }
58
- for (let o = 2; o < r; o += 3) {
59
+ for (let o = 2; o < n; o += 3) {
59
60
  if (a.includes(o)) continue;
60
61
  const s = new Date(t, e - 1, o);
61
62
  if (!u(s)) return !1;
62
63
  }
63
- for (let o = 1; o <= r; o++) {
64
+ for (let o = 1; o <= n; o++) {
64
65
  if (a.includes(o) || (o - 2) % 3 === 0) continue;
65
66
  const s = new Date(t, e - 1, o);
66
67
  if (!u(s)) return !1;
@@ -68,21 +69,21 @@ const Z = ({
68
69
  return !0;
69
70
  }
70
71
  return !1;
71
- }, $ = (e) => {
72
- Y(e) || (g ? g(t, e) : A(
72
+ }, j = (e) => {
73
+ v(e) || (g ? g(t, e) : G(
73
74
  /* @__PURE__ */ new Date(
74
- `${t}-${F.Number(2, e)}-${F.Number(2, k.d)}`
75
+ `${t}-${P.Number(2, e)}-${P.Number(2, x.d)}`
75
76
  )
76
77
  ));
77
78
  };
78
- return /* @__PURE__ */ w("div", { className: c["calendar-block"], ref: N, children: [
79
+ return /* @__PURE__ */ w("div", { className: c["calendar-block"], ref: O, children: [
79
80
  /* @__PURE__ */ w("div", { className: c.h, children: [
80
81
  /* @__PURE__ */ f(
81
- H,
82
+ A,
82
83
  {
83
84
  isIconButton: !0,
84
85
  iconName: "DropdownArrowLeft16px",
85
- onClick: S,
86
+ onClick: $,
86
87
  variant: "secondary-gray",
87
88
  size: "l"
88
89
  }
@@ -91,36 +92,36 @@ const Z = ({
91
92
  "button",
92
93
  {
93
94
  type: "button",
94
- onClick: () => y == null ? void 0 : y("years"),
95
95
  className: c.d,
96
96
  "data-testid": "year-button",
97
+ onClick: M === "month" ? void 0 : () => y == null ? void 0 : y("years"),
97
98
  children: [
98
99
  t.toString(),
99
- /* @__PURE__ */ f(b, { iconName: "DropdownArrowBottom16px" })
100
+ M !== "month" && /* @__PURE__ */ f(q, { iconName: "DropdownArrowBottom16px" })
100
101
  ]
101
102
  }
102
103
  ),
103
104
  /* @__PURE__ */ f(
104
- H,
105
+ A,
105
106
  {
106
107
  isIconButton: !0,
107
108
  iconName: "DropdownArrowRight16px",
108
- onClick: O,
109
+ onClick: S,
109
110
  variant: "secondary-gray",
110
111
  size: "l"
111
112
  }
112
113
  )
113
114
  ] }),
114
- /* @__PURE__ */ f("div", { className: c.monthGrid, "data-testid": "month-picker", children: C.map((e, i) => {
115
- const n = i + 1, l = Y(n);
115
+ /* @__PURE__ */ f("div", { className: c.monthGrid, "data-testid": "month-picker", children: L.map((e, i) => {
116
+ const r = i + 1, l = v(r);
116
117
  return /* @__PURE__ */ f(
117
118
  "button",
118
119
  {
119
120
  type: "button",
120
- onClick: () => $(n),
121
+ onClick: () => j(r),
121
122
  disabled: l,
122
- className: R(l ? c.m : c.a, {
123
- [c.current]: D && h.y === t && h.m === n
123
+ className: _(l ? c.m : c.a, {
124
+ [c.current]: D && k.y === t && k.m === r
124
125
  }),
125
126
  children: e
126
127
  },
@@ -130,5 +131,5 @@ const Z = ({
130
131
  ] });
131
132
  };
132
133
  export {
133
- Z as MonthPickerModal
134
+ T as MonthPickerModal
134
135
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "../../index-DIxK0V-G.js";
3
3
  import "react";
4
4
  import "./constants.js";
5
- import { P as s } from "../../ProgressBar-COdzy3fY.js";
5
+ import { P as s } from "../../ProgressBar-DA7-pT_u.js";
6
6
  export {
7
7
  s as ProgressBar
8
8
  };
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { c as P } from "../../index-DIxK0V-G.js";
3
3
  import { memo as L, useRef as _, useState as B } from "react";
4
4
  import { ANIMATION_VARIABLES_MAP as D, EToastPosition as S, EToastVariant as w, DEFAULT_TOAST_DURATION as O } from "./constants.js";
5
- import { c as s, P as T } from "../../ProgressBar-COdzy3fY.js";
5
+ import { c as s, P as T } from "../../ProgressBar-DA7-pT_u.js";
6
6
  import { useTimer as U } from "../../hooks/useTimer/index.js";
7
7
  import { Button as j } from "../Button/Button.js";
8
8
  const g = L(
@@ -2,7 +2,7 @@ import { jsx as m } from "react/jsx-runtime";
2
2
  import { c as a } from "../../index-DIxK0V-G.js";
3
3
  import { memo as e, useRef as f, useCallback as T, useEffect as u } from "react";
4
4
  import { EToastPosition as i } from "./constants.js";
5
- import { c as l } from "../../ProgressBar-COdzy3fY.js";
5
+ import { c as l } from "../../ProgressBar-DA7-pT_u.js";
6
6
  import { Toast as d } from "./Toast.js";
7
7
  const O = e(
8
8
  ({ toasts: r, position: s = i.TOP_RIGHT, onToastRemove: n }) => {
@@ -1,31 +1,32 @@
1
- import { jsxs as R, jsx as T } from "react/jsx-runtime";
2
- import { useReducer as u, useCallback as m, useMemo as l } from "react";
1
+ import { jsxs as p, jsx as T } from "react/jsx-runtime";
2
+ import { useReducer as u, useCallback as m, useMemo as E } from "react";
3
3
  import { EToastVariant as o } from "./constants.js";
4
- import { ToastContext as E } from "./hooks.js";
5
- import { reducer as A, initialState as C, actionCreators as c } from "./store.js";
6
- import { c as L } from "../../ProgressBar-COdzy3fY.js";
4
+ import { ToastContext as l } from "./hooks.js";
5
+ import { reducer as L, initialState as A, actionCreators as c } from "./store.js";
6
+ import { c as C } from "../../ProgressBar-DA7-pT_u.js";
7
7
  import { ToastList as S } from "./ToastList.js";
8
- const O = ({ children: d }) => {
9
- const [i, r] = u(A, C), a = m((t) => {
8
+ const F = ({ children: d }) => {
9
+ const [i, r] = u(L, A), a = m((t) => {
10
10
  r(c.setToasts(t));
11
- }, []), p = l(
11
+ }, []), R = E(
12
12
  () => ({
13
13
  [o.DEFAULT]: (t) => a({ variant: o.DEFAULT, ...t }),
14
14
  [o.SUCCESS]: (t) => a({ variant: o.SUCCESS, ...t }),
15
15
  [o.ALARM]: (t) => a({ variant: o.ALARM, ...t }),
16
- [o.ERROR]: (t) => a({ variant: o.ERROR, ...t })
16
+ [o.ERROR]: (t) => a({ variant: o.ERROR, ...t }),
17
+ [o.PURPLE]: (t) => a({ variant: o.PURPLE, ...t })
17
18
  }),
18
19
  [a]
19
20
  ), v = m(
20
21
  (t, s) => {
21
22
  var n, e;
22
- (n = s == null ? void 0 : s.current) == null || n.classList.add(L["toast-out"]), (e = s == null ? void 0 : s.current) == null || e.addEventListener("animationend", () => {
23
+ (n = s == null ? void 0 : s.current) == null || n.classList.add(C["toast-out"]), (e = s == null ? void 0 : s.current) == null || e.addEventListener("animationend", () => {
23
24
  r(c.removeToast(t));
24
25
  });
25
26
  },
26
27
  []
27
28
  );
28
- return /* @__PURE__ */ R(E.Provider, { value: p, children: [
29
+ return /* @__PURE__ */ p(l.Provider, { value: R, children: [
29
30
  d,
30
31
  /* @__PURE__ */ T(
31
32
  S,
@@ -38,5 +39,5 @@ const O = ({ children: d }) => {
38
39
  ] });
39
40
  };
40
41
  export {
41
- O as ToastProvider
42
+ F as ToastProvider
42
43
  };
@@ -2,7 +2,8 @@ export declare enum EToastVariant {
2
2
  DEFAULT = "default",
3
3
  ALARM = "alarm",
4
4
  SUCCESS = "success",
5
- ERROR = "error"
5
+ ERROR = "error",
6
+ PURPLE = "purple"
6
7
  }
7
8
  export declare enum EToastPosition {
8
9
  TOP_LEFT = "top-left",
@@ -1,4 +1,4 @@
1
- var e = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.ALARM = "alarm", t.SUCCESS = "success", t.ERROR = "error", t))(e || {}), r = /* @__PURE__ */ ((t) => (t.TOP_LEFT = "top-left", t.TOP_CENTER = "top-center", t.TOP_RIGHT = "top-right", t.BOTTOM_RIGHT = "bottom-right", t.BOTTOM_CENTER = "bottom-center", t.BOTTOM_LEFT = "bottom-left", t))(r || {});
1
+ var e = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.ALARM = "alarm", t.SUCCESS = "success", t.ERROR = "error", t.PURPLE = "purple", t))(e || {}), r = /* @__PURE__ */ ((t) => (t.TOP_LEFT = "top-left", t.TOP_CENTER = "top-center", t.TOP_RIGHT = "top-right", t.BOTTOM_RIGHT = "bottom-right", t.BOTTOM_CENTER = "bottom-center", t.BOTTOM_LEFT = "bottom-left", t))(r || {});
2
2
  const p = {
3
3
  "top-right": "translateX(1000px)",
4
4
  "top-center": "translateY(-1300px)",
@@ -6,10 +6,10 @@ const p = {
6
6
  "bottom-left": "translateX(-1000px)",
7
7
  "bottom-center": "translateY(1300px)",
8
8
  "bottom-right": "translateX(1000px)"
9
- }, O = 3e3;
9
+ }, l = 3e3;
10
10
  export {
11
11
  p as ANIMATION_VARIABLES_MAP,
12
- O as DEFAULT_TOAST_DURATION,
12
+ l as DEFAULT_TOAST_DURATION,
13
13
  r as EToastPosition,
14
14
  e as EToastVariant
15
15
  };
@@ -7,9 +7,11 @@ const o = t({
7
7
  error: () => {
8
8
  },
9
9
  success: () => {
10
+ },
11
+ purple: () => {
10
12
  }
11
- }), r = () => e(o);
13
+ }), s = () => e(o);
12
14
  export {
13
15
  o as ToastContext,
14
- r as useToast
16
+ s as useToast
15
17
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.43.15",
4
+ "version": "1.43.18",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -1,67 +0,0 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { c as u } from "./index-DIxK0V-G.js";
3
- import { memo as p, useRef as r, useEffect as f } from "react";
4
- import { DEFAULT_TOAST_DURATION as z, EToastVariant as g } from "./components/Toasts/constants.js";
5
- import './assets/ProgressBar.css';const d = "_title_1z0br_37", A = "_timer_1z0br_41", T = "_seconds_1z0br_51", h = "_message_1z0br_61", w = "_progress_1z0br_69", D = "_slot_1z0br_95", F = "_success_1z0br_104", R = "_alarm_1z0br_109", E = "_error_1z0br_114", o = {
6
- "toast-list": "_toast-list_1z0br_2",
7
- "toast-wrapper": "_toast-wrapper_1z0br_24",
8
- title: d,
9
- timer: A,
10
- "timer-title": "_timer-title_1z0br_49",
11
- seconds: T,
12
- message: h,
13
- progress: w,
14
- "progress-bar": "_progress-bar_1z0br_78",
15
- "close-button": "_close-button_1z0br_89",
16
- slot: D,
17
- default: "_default_1z0br_99",
18
- success: F,
19
- alarm: R,
20
- error: E,
21
- "top-right": "_top-right_1z0br_119",
22
- "top-center": "_top-center_1z0br_125",
23
- "top-left": "_top-left_1z0br_131",
24
- "bottom-left": "_bottom-left_1z0br_136",
25
- "bottom-center": "_bottom-center_1z0br_141",
26
- "bottom-right": "_bottom-right_1z0br_147",
27
- "toast-in": "_toast-in_1z0br_179",
28
- "toast-out": "_toast-out_1z0br_183"
29
- }, x = p(
30
- ({
31
- duration: _ = z,
32
- variant: b = g.DEFAULT,
33
- isPaused: n = !1
34
- }) => {
35
- const t = r(), e = r(null), c = r(Date.now()), s = r(0);
36
- return f(() => {
37
- if (n)
38
- t.current && cancelAnimationFrame(t.current);
39
- else {
40
- c.current = Date.now() - s.current;
41
- const a = () => {
42
- const l = Date.now();
43
- s.current = l - c.current;
44
- const i = Math.min(
45
- s.current / _ * 100,
46
- 100
47
- );
48
- e.current && (e.current.style.width = `${i}%`), i < 100 && (t.current = requestAnimationFrame(a));
49
- };
50
- t.current = requestAnimationFrame(a);
51
- }
52
- return () => {
53
- t.current && cancelAnimationFrame(t.current);
54
- };
55
- }, [_, n]), /* @__PURE__ */ m("div", { className: o.progress, "data-testid": "progress-bar", children: /* @__PURE__ */ m(
56
- "div",
57
- {
58
- ref: e,
59
- className: u(o["progress-bar"], o[b])
60
- }
61
- ) });
62
- }
63
- );
64
- export {
65
- x as P,
66
- o as c
67
- };