@layers-app/shared 0.3.5 → 0.3.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.
@@ -13,18 +13,18 @@ import { IconEntity as I, IconType as A } from "../ProjectIcon/ProjectIcon.js";
13
13
  import { customIcons as D } from "./custom-icons/customIcons.js";
14
14
  import { getIconsList as F, getRandomIcon as ae } from "./utils.js";
15
15
  import h from "./EmojiPicker.module.css.js";
16
- async function le(c, a, l = 500) {
17
- const u = [], p = c.length;
16
+ async function le(a, c, l = 500) {
17
+ const u = [], p = a.length;
18
18
  for (let r = 0; r < p; r += l) {
19
- const w = c.slice(r, r + l).filter(a);
19
+ const w = a.slice(r, r + l).filter(c);
20
20
  u.push(...w), await new Promise((f) => setTimeout(f, 0));
21
21
  }
22
22
  return u;
23
23
  }
24
24
  const Ce = M(
25
25
  ({
26
- showColors: c,
27
- locales: a,
26
+ showColors: a,
27
+ locales: c,
28
28
  onChange: l,
29
29
  value: u,
30
30
  onClose: p,
@@ -65,7 +65,7 @@ const Ce = M(
65
65
  color: i?.color,
66
66
  type: i?.type || A.FILLED
67
67
  })
68
- ), c || p());
68
+ ), a || p());
69
69
  }), n = J({
70
70
  color: i?.color || ie.COLORS[0],
71
71
  theme: w
@@ -77,11 +77,11 @@ const Ce = M(
77
77
  "--icon-color-hover": K(n.value, 0.2)
78
78
  }, [n]), q = async () => {
79
79
  const o = await ae(r);
80
- S([]), l?.(I.stringify({ icon: o, color: i?.color })), !c && !C && p();
80
+ S([]), l?.(I.stringify({ icon: o, color: i?.color })), !a && !C && p();
81
81
  };
82
82
  return /* @__PURE__ */ m(y, { w: "100%", gap: "sm", pt: 12, pb: 8, h: "100%", children: [
83
- c && /* @__PURE__ */ m(y, { gap: 4, px: 8, w: "100%", children: [
84
- /* @__PURE__ */ e(b, { lh: "140%", fw: 500, c: "dimmed", fz: "xs", children: a?.chooseColor || k("chooseColor") }),
83
+ a && /* @__PURE__ */ m(y, { gap: 4, px: 8, w: "100%", children: [
84
+ /* @__PURE__ */ e(b, { lh: "140%", fw: 500, c: "dimmed", fz: "xs", children: c?.chooseColor || k("chooseColor") }),
85
85
  /* @__PURE__ */ e(
86
86
  ne,
87
87
  {
@@ -117,7 +117,7 @@ const Ce = M(
117
117
  {
118
118
  leftSection: /* @__PURE__ */ e(L, { size: 16, icon: Q }),
119
119
  value: f,
120
- placeholder: `${a?.search}...`,
120
+ placeholder: `${c?.search}...`,
121
121
  "data-autofocus": !0,
122
122
  styles: {
123
123
  input: {
@@ -130,7 +130,7 @@ const Ce = M(
130
130
  radius: "var(--mantine-radius-default)"
131
131
  }
132
132
  ) }),
133
- /* @__PURE__ */ e(Z, { withArrow: !0, label: k("random"), children: /* @__PURE__ */ e(
133
+ /* @__PURE__ */ e(Z, { withArrow: !0, label: c?.random || k("random"), children: /* @__PURE__ */ e(
134
134
  ee,
135
135
  {
136
136
  h: 36,
@@ -168,7 +168,7 @@ const Ce = M(
168
168
  top: -1,
169
169
  style: { zIndex: 1 },
170
170
  bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-6))",
171
- children: /* @__PURE__ */ e(b, { fz: "xs", fw: 500, lh: "140%", c: "dimmed", children: a?.searchResults })
171
+ children: /* @__PURE__ */ e(b, { fz: "xs", fw: 500, lh: "140%", c: "dimmed", children: c?.searchResults })
172
172
  }
173
173
  ),
174
174
  T.length ? /* @__PURE__ */ e(N, { cols: 8, spacing: 0, children: T.map((o) => {
@@ -203,7 +203,7 @@ const Ce = M(
203
203
  ce,
204
204
  {
205
205
  size: 100,
206
- description: a?.searchNoResults,
206
+ description: c?.searchNoResults,
207
207
  descriptionProps: {
208
208
  fz: "sm"
209
209
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"AAsBA,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CA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as n } from "react/jsx-runtime";
2
- import { File01Icon as f, Folder02Icon as d, Folder01Icon as p } from "@hugeicons/core-free-icons";
3
- import { HugeiconsIcon as a } from "@hugeicons/react";
4
- import { Text as c, Box as u, Avatar as h, useMantineTheme as y, parseThemeColor as g } from "@mantine/core";
5
- import I from "../assets/enitityIcons/flow.svg.js";
6
- import v from "../assets/enitityIcons/form.svg.js";
7
- import z from "../assets/enitityIcons/page.svg.js";
8
- import C from "../assets/enitityIcons/sprint.svg.js";
9
- import { IconEntity as i, ProjectIcon as t, renderIcon as F } from "./ProjectIcon/ProjectIcon.js";
10
- const w = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?.pathById?.findIndex((r) => r === o?.parentId) === 1, m = ({
2
+ import { File01Icon as p, Folder02Icon as u, Folder01Icon as h } from "@hugeicons/core-free-icons";
3
+ import { HugeiconsIcon as f } from "@hugeicons/react";
4
+ import { Text as a, Box as y, Avatar as g, useMantineTheme as I, parseThemeColor as C } from "@mantine/core";
5
+ import v from "../assets/enitityIcons/flow.svg.js";
6
+ import z from "../assets/enitityIcons/form.svg.js";
7
+ import F from "../assets/enitityIcons/page.svg.js";
8
+ import O from "../assets/enitityIcons/sprint.svg.js";
9
+ import { DEFAULT_VALUES as l } from "../constants.js";
10
+ import { IconEntity as i, ProjectIcon as c, renderIcon as E } from "./ProjectIcon/ProjectIcon.js";
11
+ const s = (o) => !!o && l.COLORS.includes(o), R = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?.pathById?.findIndex((r) => r === o?.parentId) === 1, H = ({
11
12
  item: o
12
13
  }) => {
13
14
  const r = o?.size || 16;
14
15
  if (!o) return null;
15
- if (w(o)) {
16
- const e = i.parse(o.icon);
17
- return /* @__PURE__ */ n(x, { color: e?.color, size: r, opened: o.isOpen });
16
+ if (R(o)) {
17
+ const e = i.parse(o.icon), t = s(e?.color) ? e.color : l.FOLDER_COLOR;
18
+ return /* @__PURE__ */ n(S, { color: t, size: r, opened: o.isOpen });
18
19
  }
19
20
  if (o.type === "ATTACHMENT")
20
- return /* @__PURE__ */ n(a, { icon: f, size: r });
21
+ return /* @__PURE__ */ n(f, { icon: p, size: r });
21
22
  if (o.type === "PAGE")
22
23
  return /* @__PURE__ */ n(
23
- t,
24
+ c,
24
25
  {
25
26
  fallbackColor: o.icon ? void 0 : "var(--default-page-icon-color)",
26
27
  name: o.title,
27
28
  icon: o.icon,
28
- fallback: /* @__PURE__ */ n(z, { width: r, height: r })
29
+ fallback: /* @__PURE__ */ n(F, { width: r, height: r })
29
30
  }
30
31
  );
31
32
  if (o.type === "FORM")
32
33
  return /* @__PURE__ */ n(
33
- t,
34
+ c,
34
35
  {
35
36
  fallbackColor: "var(--default-form-icon-color)",
36
37
  icon: o.icon,
37
- fallback: /* @__PURE__ */ n(v, { width: r, height: r })
38
+ fallback: /* @__PURE__ */ n(z, { width: r, height: r })
38
39
  }
39
40
  );
40
41
  if (o.type === "FLOW")
41
42
  return /* @__PURE__ */ n(
42
- t,
43
+ c,
43
44
  {
44
45
  icon: o.icon,
45
46
  fallbackColor: "var(--default-flow-icon-color)",
46
- fallback: /* @__PURE__ */ n(I, { width: r, height: r })
47
+ fallback: /* @__PURE__ */ n(v, { width: r, height: r })
47
48
  }
48
49
  );
49
50
  if (o.type === "SPRINT") {
50
- const e = i.parse(o.icon);
51
+ const e = i.parse(o.icon), t = s(e?.color) ? e.color : l.SPRINT_COLOR;
51
52
  return /* @__PURE__ */ n(
52
- c,
53
+ a,
53
54
  {
54
55
  fz: r,
55
- c: e?.color || "yellow.6",
56
+ c: t,
56
57
  style: {
57
58
  display: "flex",
58
59
  alignItems: "center",
@@ -60,14 +61,14 @@ const w = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?
60
61
  lineHeight: "normal",
61
62
  width: r + 4
62
63
  },
63
- children: /* @__PURE__ */ n(C, {})
64
+ children: /* @__PURE__ */ n(O, {})
64
65
  }
65
66
  );
66
67
  }
67
68
  if (o.type === "PROJECT") {
68
69
  const e = i.parse(o.icon);
69
70
  return e?.emoji ? /* @__PURE__ */ n(
70
- u,
71
+ y,
71
72
  {
72
73
  bg: "gray.1",
73
74
  style: {
@@ -79,7 +80,7 @@ const w = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?
79
80
  height: r
80
81
  },
81
82
  children: /* @__PURE__ */ n(
82
- t,
83
+ c,
83
84
  {
84
85
  p: 0,
85
86
  icon: o.icon,
@@ -89,7 +90,7 @@ const w = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?
89
90
  )
90
91
  }
91
92
  ) : /* @__PURE__ */ n(
92
- h,
93
+ g,
93
94
  {
94
95
  variant: "filled",
95
96
  radius: 4,
@@ -97,7 +98,7 @@ const w = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?
97
98
  size: o.size ?? 16,
98
99
  color: e?.color || "initials",
99
100
  children: /* @__PURE__ */ n(
100
- c,
101
+ a,
101
102
  {
102
103
  fz: o.fz ?? 12,
103
104
  fw: 500,
@@ -109,31 +110,31 @@ const w = (o) => o.type === "FOLDER" || o.isFolder || o.type === "PROJECT" && o?
109
110
  justifyContent: "center",
110
111
  lineHeight: "normal"
111
112
  },
112
- children: F(e, void 0, !0, o.title)
113
+ children: E(e, void 0, !0, o.title)
113
114
  }
114
115
  )
115
116
  }
116
117
  );
117
118
  }
118
119
  return null;
119
- }, x = ({
120
+ }, S = ({
120
121
  color: o,
121
122
  size: r,
122
123
  opened: e
123
124
  }) => {
124
- const l = y(), s = g({
125
+ const t = I(), d = C({
125
126
  color: o || "gray",
126
- theme: l
127
+ theme: t
127
128
  });
128
129
  return /* @__PURE__ */ n(
129
- a,
130
+ f,
130
131
  {
131
- color: s.value || void 0,
132
- icon: e ? d : p,
132
+ color: d.value || void 0,
133
+ icon: e ? u : h,
133
134
  size: r
134
135
  }
135
136
  );
136
137
  };
137
138
  export {
138
- m as EntityIcon
139
+ H as EntityIcon
139
140
  };
package/dist/constants.js CHANGED
@@ -14,7 +14,7 @@ const r = [
14
14
  return this.COLORS[1];
15
15
  },
16
16
  get FOLDER_COLOR() {
17
- return this.COLORS[5];
17
+ return this.COLORS[8];
18
18
  },
19
19
  get PROJECT_COLOR() {
20
20
  return this.COLORS[1];
@@ -1 +1 @@
1
- {"version":3,"file":"showNotifications.d.ts","sourceRoot":"","sources":["../../src/helpers/showNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUlC,OAAO,EACL,gBAAgB,EAGjB,MAAM,wBAAwB,CAAC;AAKhC,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAetD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IACzE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAChC,CAAC;AAmEF,eAAO,MAAM,wBAAwB,GACnC,QAAQ,EACR,OAAO,SAAS,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,EAErD,SAAS,OAAO,EAChB,UAAS;IACP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK,WAAW,CAAC,GAAG,WAAW,CAAC;IAC5D,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,WAAW,CAAC,GAAG,WAAW,CAAC;CACjD,iBA+BP,CAAC;AAwCF,eAAO,MAAM,uBAAuB,GAAI,OAAO,wBAAwB,SAKtE,CAAC;AAqCF,eAAO,MAAM,yBAAyB,GACpC,OAAO,wBA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,wBAAwB,SAKtE,CAAC;AAwBF,eAAO,MAAM,yBAAyB,GACpC,OAAO,wBAAwB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,SAMjD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,wBAAwB,SAKtE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,wBAAwB,SAKtE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,wBAAwB,SAKpE,CAAC"}
@@ -1,15 +1,15 @@
1
- import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
- import { InformationCircleIcon as I, CheckmarkCircle02Icon as b, Alert01Icon as y, Alert02Icon as B } from "@hugeicons/core-free-icons";
3
- import { HugeiconsIcon as d } from "@hugeicons/react";
4
- import { CloseButton as k, Box as u, Button as S } from "@mantine/core";
5
- import { showNotification as x, notifications as w } from "@mantine/notifications";
6
- import { isFunction as h, isObject as N } from "lodash-es";
7
- import c from "./showNotifications.module.css.js";
8
- let z = 0;
9
- const M = /* @__PURE__ */ t(d, { icon: b, size: 14, color: "white" }), O = /* @__PURE__ */ t(d, { icon: B, size: 14, color: "white" }), R = /* @__PURE__ */ t(d, { icon: y, size: 14, color: "white" }), g = /* @__PURE__ */ t(d, { icon: I, size: 14, color: "white" }), v = (o, n) => n?.length ? /* @__PURE__ */ l(u, { children: [
10
- /* @__PURE__ */ t(u, { children: o }),
11
- /* @__PURE__ */ t(u, { className: c.actions, children: n.map((i, e) => /* @__PURE__ */ t(
12
- S,
1
+ import { jsxs as I, jsx as e } from "react/jsx-runtime";
2
+ import { InformationCircleIcon as N, CheckmarkCircle02Icon as y, Alert01Icon as B, Alert02Icon as b } from "@hugeicons/core-free-icons";
3
+ import { HugeiconsIcon as a } from "@hugeicons/react";
4
+ import { Box as u, Button as z } from "@mantine/core";
5
+ import { notifications as h } from "@mantine/notifications";
6
+ import { isFunction as f, isObject as d } from "lodash-es";
7
+ import l from "./showNotifications.module.css.js";
8
+ let M = 0;
9
+ const O = /* @__PURE__ */ e(a, { icon: y, size: 14, color: "white" }), k = /* @__PURE__ */ e(a, { icon: b, size: 14, color: "white" }), x = /* @__PURE__ */ e(a, { icon: B, size: 14, color: "white" }), w = /* @__PURE__ */ e(a, { icon: N, size: 14, color: "white" }), g = (o, t) => t?.length ? /* @__PURE__ */ I(u, { children: [
10
+ /* @__PURE__ */ e(u, { children: o }),
11
+ /* @__PURE__ */ e(u, { className: l.actions, children: t.map((i, s) => /* @__PURE__ */ e(
12
+ z,
13
13
  {
14
14
  size: "compact-sm",
15
15
  variant: i.variant ?? "default",
@@ -17,150 +17,98 @@ const M = /* @__PURE__ */ t(d, { icon: b, size: 14, color: "white" }), O = /* @_
17
17
  radius: "md",
18
18
  children: i.label
19
19
  },
20
- e
20
+ s
21
21
  )) })
22
- ] }) : o;
23
- function C({
24
- id: o,
25
- title: n,
26
- icon: i,
27
- children: e
28
- }) {
29
- return /* @__PURE__ */ l("div", { className: c.root, children: [
30
- /* @__PURE__ */ l("div", { className: n ? c.contentRow : c.contentRowCentered, children: [
31
- /* @__PURE__ */ t("div", { className: c.icon, children: i }),
32
- /* @__PURE__ */ l("div", { className: c.body, children: [
33
- n && /* @__PURE__ */ t("div", { className: c.title, children: n }),
34
- e && /* @__PURE__ */ t(
35
- "div",
36
- {
37
- className: n ? c.description : c.descriptionWithoutTitle,
38
- children: e
39
- }
40
- )
41
- ] })
42
- ] }),
43
- /* @__PURE__ */ t("div", { className: c.closeButtonWrapper, children: /* @__PURE__ */ t(
44
- k,
45
- {
46
- className: c.closeButton,
47
- size: 24,
48
- onClick: () => w.hide(o)
49
- }
50
- ) })
51
- ] });
52
- }
53
- const D = (o, n = {}) => {
54
- const { successMsg: i, errorMsg: e } = n;
55
- return o.then((r) => {
22
+ ] }) : o, R = (o, t = {}) => {
23
+ const { successMsg: i, errorMsg: s } = t;
24
+ return o.then((c) => {
56
25
  if (i) {
57
- const s = h(i) ? i(r) : i, a = {
58
- id: n.notifyId,
59
- ...N(s) ? s : { message: s }
26
+ const n = f(i) ? i(c) : i, r = {
27
+ id: t.notifyId,
28
+ ...d(n) ? n : { message: n }
60
29
  };
61
- j(a);
30
+ j(r);
62
31
  }
63
- return r;
64
- }).catch((r) => {
65
- if (e) {
66
- const s = h(e) ? e(r) : e, a = {
67
- id: n.notifyId,
68
- ...N(s) ? s : { message: s }
32
+ return c;
33
+ }).catch((c) => {
34
+ if (s) {
35
+ const n = f(s) ? s(c) : s, r = {
36
+ id: t.notifyId,
37
+ ...d(n) ? n : { message: n }
69
38
  };
70
- q(a);
39
+ v(r);
71
40
  }
72
- return r;
41
+ return c;
73
42
  });
74
- }, m = (o, n) => {
75
- const { actions: i, title: e, message: r, onClose: s, ...a } = o, p = `ntf-${++z}`, f = a.id ?? p;
76
- x({
77
- color: n.color,
43
+ }, p = {
44
+ root: l.root,
45
+ icon: l.icon,
46
+ title: l.title,
47
+ description: l.description
48
+ }, m = (o, t) => {
49
+ const { actions: i, message: s, onClose: c, ...n } = o, r = `ntf-${++M}`, C = n.id ?? r;
50
+ h.show({
51
+ color: t.color,
78
52
  radius: 12,
79
- ...a,
80
- id: f,
81
- icon: void 0,
82
- title: void 0,
83
- withCloseButton: !1,
84
- withBorder: !1,
85
- p: 0,
86
- classNames: { root: c.mantineRoot },
87
- styles: {
88
- root: { background: "none", border: "none", boxShadow: "none" },
89
- body: { margin: 0 }
90
- },
53
+ p: "sm",
54
+ ...n,
55
+ id: C,
56
+ icon: t.icon,
57
+ withCloseButton: !0,
58
+ withBorder: !0,
59
+ classNames: p,
91
60
  onClose: () => {
92
- s?.(o);
61
+ c?.(o);
93
62
  },
94
- message: /* @__PURE__ */ t(
95
- C,
96
- {
97
- id: f,
98
- title: e,
99
- icon: n.icon,
100
- children: v(r, i)
101
- }
102
- )
63
+ message: g(s, i)
103
64
  });
104
- }, G = (o) => {
65
+ }, $ = (o) => {
105
66
  m(o, {
106
- color: "var(--mantine-color-blue-outline)",
107
- icon: g
67
+ color: "blue",
68
+ icon: w
108
69
  });
109
- }, W = (o, n) => {
110
- const { actions: i, title: e, message: r, onClose: s, ...a } = o;
111
- w.update({
112
- color: n.color,
70
+ }, S = (o, t) => {
71
+ const { actions: i, message: s, onClose: c, ...n } = o;
72
+ h.update({
73
+ color: t.color,
113
74
  radius: 12,
114
- ...a,
115
- icon: void 0,
116
- title: void 0,
117
- withCloseButton: !1,
118
- withBorder: !1,
119
- p: 0,
120
- classNames: { root: c.mantineRoot },
121
- styles: {
122
- root: { background: "none", border: "none", boxShadow: "none" },
123
- body: { margin: 0 }
124
- },
75
+ p: "sm",
76
+ ...n,
77
+ icon: t.icon,
78
+ withCloseButton: !0,
79
+ withBorder: !0,
80
+ classNames: p,
125
81
  onClose: () => {
126
- s?.(o);
82
+ c?.(o);
127
83
  },
128
- message: /* @__PURE__ */ t(
129
- C,
130
- {
131
- id: o.id,
132
- title: e,
133
- icon: n.icon,
134
- children: v(r, i)
135
- }
136
- )
84
+ message: g(s, i)
137
85
  });
138
- }, J = (o) => {
139
- W(o, {
86
+ }, D = (o) => {
87
+ S(o, {
140
88
  color: "var(--mantine-color-blue-outline)",
141
- icon: g
89
+ icon: w
142
90
  });
143
91
  }, j = (o) => {
144
92
  m(o, {
145
- color: "var(--mantine-color-green-outline)",
146
- icon: M
93
+ color: "green",
94
+ icon: O
147
95
  });
148
- }, K = (o) => {
96
+ }, G = (o) => {
149
97
  m(o, {
150
- color: "var(--mantine-color-yellow-outline)",
151
- icon: R
98
+ color: "yellow",
99
+ icon: x
152
100
  });
153
- }, q = (o) => {
101
+ }, v = (o) => {
154
102
  m(o, {
155
- color: "var(--mantine-color-red-outline)",
156
- icon: O
103
+ color: "red",
104
+ icon: k
157
105
  });
158
106
  };
159
107
  export {
160
- q as showErrorNotification,
161
- G as showMessageNotification,
162
- D as showRequestNotifications,
108
+ v as showErrorNotification,
109
+ $ as showMessageNotification,
110
+ R as showRequestNotifications,
163
111
  j as showSuccessNotification,
164
- K as showWarningNotification,
165
- J as updateMessageNotification
112
+ G as showWarningNotification,
113
+ D as updateMessageNotification
166
114
  };
@@ -1,29 +1,15 @@
1
- const t = "_mantineRoot_mgqj0_1", o = "_root_mgqj0_9", n = "_contentRow_mgqj0_31", e = "_contentRowCentered_mgqj0_41", c = "_icon_mgqj0_51", _ = "_body_mgqj0_77", s = "_title_mgqj0_87", i = "_description_mgqj0_111", r = "_descriptionWithoutTitle_mgqj0_123", m = "_closeButtonWrapper_mgqj0_137", l = "_closeButton_mgqj0_137", d = "_actions_mgqj0_157", p = {
2
- mantineRoot: t,
3
- root: o,
4
- contentRow: n,
5
- contentRowCentered: e,
6
- icon: c,
7
- body: _,
8
- title: s,
9
- description: i,
10
- descriptionWithoutTitle: r,
11
- closeButtonWrapper: m,
12
- closeButton: l,
13
- actions: d
1
+ const t = "_root_zr3bj_1", o = "_icon_zr3bj_15", c = "_title_zr3bj_49", s = "_description_zr3bj_65", i = "_actions_zr3bj_77", n = {
2
+ root: t,
3
+ icon: o,
4
+ title: c,
5
+ description: s,
6
+ actions: i
14
7
  };
15
8
  export {
16
- d as actions,
17
- _ as body,
18
- l as closeButton,
19
- m as closeButtonWrapper,
20
- n as contentRow,
21
- e as contentRowCentered,
22
- p as default,
23
- i as description,
24
- r as descriptionWithoutTitle,
25
- c as icon,
26
- t as mantineRoot,
27
- o as root,
28
- s as title
9
+ i as actions,
10
+ n as default,
11
+ s as description,
12
+ o as icon,
13
+ t as root,
14
+ c as title
29
15
  };