@layers-app/shared 0.2.6 → 0.2.7

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 (53) hide show
  1. package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
  2. package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
  3. package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
  4. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -22
  5. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  6. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +25 -25
  7. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +41 -41
  8. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1 -1
  9. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  10. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  11. package/dist/components/AppContainer/hooks/useAppContainer.js +40 -37
  12. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  13. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -2
  14. package/dist/components/AppContainer/types.d.ts +1 -0
  15. package/dist/components/AppContainer/types.d.ts.map +1 -1
  16. package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
  17. package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
  18. package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
  19. package/dist/components/FormViewer/store/formStoreApi.js +13 -13
  20. package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -1
  21. package/dist/components/ImageCropper/ImageCropper.js +185 -183
  22. package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
  23. package/dist/components/LanguagePicker/LanguagePicker.js +41 -32
  24. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
  25. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  26. package/dist/components/NavMenu/components/NavMenuItem.js +53 -50
  27. package/dist/components/NavMenu/types.d.ts +1 -0
  28. package/dist/components/NavMenu/types.d.ts.map +1 -1
  29. package/dist/components/SocialLinkRow/index.d.ts.map +1 -1
  30. package/dist/components/SocialLinkRow/index.js +80 -58
  31. package/dist/components/TimezonePicker/index.d.ts.map +1 -1
  32. package/dist/components/TimezonePicker/index.js +42 -41
  33. package/dist/components/UserAvatar/index.d.ts.map +1 -1
  34. package/dist/components/UserAvatar/index.js +11 -10
  35. package/dist/components/WorkspaceMenu/WorkspaceItem.js +1 -1
  36. package/dist/helpers/showFeatureFeedback.d.ts +16 -0
  37. package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
  38. package/dist/helpers/showFeatureFeedback.js +109 -0
  39. package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
  40. package/dist/helpers/showNotifications.d.ts.map +1 -1
  41. package/dist/helpers/showNotifications.js +81 -113
  42. package/dist/helpers/showNotifications.module.css.js +10 -10
  43. package/dist/hooks/useFeatureFeedback.d.ts +23 -0
  44. package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
  45. package/dist/hooks/useFeatureFeedback.js +48 -0
  46. package/dist/index.css +1 -1
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +322 -310
  50. package/dist/lib/layersVisitData.d.ts +13 -0
  51. package/dist/lib/layersVisitData.d.ts.map +1 -0
  52. package/dist/lib/layersVisitData.js +37 -0
  53. package/package.json +1 -1
@@ -1,250 +1,252 @@
1
- import { jsxs as X, jsx as g, Fragment as T } from "react/jsx-runtime";
2
- import { useRef as R, useState as E, useMemo as he, useEffect as q, useCallback as C } from "react";
3
- import { Box as se } from "@mantine/core";
4
- import { useElementSize as re } from "@mantine/hooks";
5
- import r from "./ImageCropper.module.css.js";
6
- const ge = ({
7
- src: z,
8
- variant: Y = "square",
9
- aspectRatio: c = 1,
10
- minSize: f = 50,
11
- maxSize: v,
12
- onCropComplete: F,
13
- onCropDataChange: O
1
+ import { jsxs as b, jsx as a, Fragment as O } from "react/jsx-runtime";
2
+ import { useRef as ne, useState as H, useMemo as ce, useEffect as j, useCallback as G } from "react";
3
+ import { Box as oe } from "@mantine/core";
4
+ import { useElementSize as ae } from "@mantine/hooks";
5
+ import h from "./ImageCropper.module.css.js";
6
+ const fe = ({
7
+ src: ie,
8
+ variant: I = "square",
9
+ aspectRatio: o = 1,
10
+ minSize: m = 50,
11
+ maxSize: X,
12
+ onCropComplete: J,
13
+ onCropDataChange: K
14
14
  }) => {
15
15
  const {
16
- ref: ee,
17
- width: M,
18
- height: L
19
- } = re(), $ = R(null), j = R(null), [H, te] = E(!1), [m, ne] = E({ width: 0, height: 0 }), o = he(() => {
20
- if (!H || M === 0 || L === 0 || m.width === 0)
21
- return { x: 0, y: 0, width: M, height: L };
22
- const i = M / L, h = m.width / m.height;
23
- if (h > i) {
24
- const d = M / h;
16
+ ref: he,
17
+ width: v,
18
+ height: M
19
+ } = ae(), W = ne(null), Q = ne(null), [Y, se] = H(!1), [f, de] = H({ width: 0, height: 0 }), r = ce(() => {
20
+ if (!Y || v === 0 || M === 0 || f.width === 0)
21
+ return { x: 0, y: 0, width: v, height: M };
22
+ const n = v / M, i = f.width / f.height;
23
+ if (i > n) {
24
+ const s = v / i;
25
25
  return {
26
26
  x: 0,
27
- y: (L - d) / 2,
28
- width: M,
29
- height: d
27
+ y: (M - s) / 2,
28
+ width: v,
29
+ height: s
30
30
  };
31
31
  } else {
32
- const d = L * h;
32
+ const s = M * i;
33
33
  return {
34
- x: (M - d) / 2,
34
+ x: (v - s) / 2,
35
35
  y: 0,
36
- width: d,
37
- height: L
36
+ width: s,
37
+ height: M
38
38
  };
39
39
  }
40
- }, [H, M, L, m]), [t, G] = E({
40
+ }, [Y, v, M, f]), [t, U] = H({
41
41
  x: 0,
42
42
  y: 0,
43
43
  width: 200,
44
44
  height: 200
45
- }), [W, K] = E(!1), [D, Q] = E(!1), [w, U] = E(null), [J, V] = E({ x: 0, y: 0 }), [e, Z] = E({
45
+ }), [P, Z] = H(!1), [T, _] = H(!1), [l, S] = H(null), [V, R] = H({ x: 0, y: 0 }), [e, z] = H({
46
46
  x: 0,
47
47
  y: 0,
48
48
  width: 0,
49
49
  height: 0
50
50
  });
51
- q(() => {
52
- if (!H || M === 0 || L === 0 || o.width === 0)
51
+ j(() => {
52
+ if (!Y || v === 0 || M === 0 || r.width === 0)
53
53
  return;
54
- let i, h, d = Math.min(o.width, o.height) * 0.8;
55
- v && (d = Math.min(d, v)), c >= 1 ? (i = d, h = d / c) : (h = d, i = d * c);
56
- const u = o.x + (o.width - i) / 2, b = o.y + (o.height - h) / 2;
57
- G({ x: u, y: b, width: i, height: h });
54
+ let n, i, s = Math.min(r.width, r.height) * 0.8;
55
+ X && (s = Math.min(s, X)), o >= 1 ? (n = s, i = s / o) : (i = s, n = s * o);
56
+ const u = r.x + (r.width - n) / 2, k = r.y + (r.height - i) / 2;
57
+ U({ x: u, y: k, width: n, height: i });
58
58
  }, [
59
- H,
60
- c,
61
- M,
62
- L,
59
+ Y,
63
60
  o,
64
- v
61
+ v,
62
+ M,
63
+ r,
64
+ X
65
65
  ]);
66
- const ie = C(() => {
67
- $.current && (ne({
68
- width: $.current.naturalWidth,
69
- height: $.current.naturalHeight
70
- }), te(!0));
71
- }, []), _ = C(
72
- (i) => {
73
- i.preventDefault(), i.stopPropagation();
74
- const h = "touches" in i ? i.touches[0].clientX : i.clientX, d = "touches" in i ? i.touches[0].clientY : i.clientY;
75
- K(!0), V({ x: h, y: d }), Z({ ...t });
66
+ const re = G(() => {
67
+ W.current && (de({
68
+ width: W.current.naturalWidth,
69
+ height: W.current.naturalHeight
70
+ }), se(!0));
71
+ }, []), ee = G(
72
+ (n) => {
73
+ n.preventDefault(), n.stopPropagation();
74
+ const i = "touches" in n ? n.touches[0].clientX : n.clientX, s = "touches" in n ? n.touches[0].clientY : n.clientY;
75
+ Z(!0), R({ x: i, y: s }), z({ ...t });
76
76
  },
77
77
  [t]
78
- ), A = C(
79
- (i) => (h) => {
80
- h.preventDefault(), h.stopPropagation();
81
- const d = "touches" in h ? h.touches[0].clientX : h.clientX, u = "touches" in h ? h.touches[0].clientY : h.clientY;
82
- Q(!0), U(i), V({ x: d, y: u }), Z({ ...t });
78
+ ), q = G(
79
+ (n) => (i) => {
80
+ i.preventDefault(), i.stopPropagation();
81
+ const s = "touches" in i ? i.touches[0].clientX : i.clientX, u = "touches" in i ? i.touches[0].clientY : i.clientY;
82
+ _(!0), S(n), R({ x: s, y: u }), z({ ...t });
83
83
  },
84
84
  [t]
85
85
  );
86
- q(() => {
87
- const i = (d) => {
88
- if (!W && !D) return;
89
- const u = "touches" in d ? d.touches[0].clientX : d.clientX, b = "touches" in d ? d.touches[0].clientY : d.clientY, y = u - J.x, k = b - J.y, p = o.x, x = o.y, N = o.x + o.width, I = o.y + o.height;
90
- if (W) {
91
- let a = e.x + y, l = e.y + k;
92
- a = Math.max(p, Math.min(a, N - t.width)), l = Math.max(x, Math.min(l, I - t.height)), G((n) => ({ ...n, x: a, y: l }));
86
+ j(() => {
87
+ const n = (s) => {
88
+ if (!P && !T) return;
89
+ const u = "touches" in s ? s.touches[0].clientX : s.clientX, k = "touches" in s ? s.touches[0].clientY : s.clientY, y = u - V.x, D = k - V.y, B = r.x, L = r.y, N = r.x + r.width, A = r.y + r.height;
90
+ if (P) {
91
+ let g = e.x + y, w = e.y + D;
92
+ g = Math.max(B, Math.min(g, N - t.width)), w = Math.max(L, Math.min(w, A - t.height)), U((d) => ({ ...d, x: g, y: w }));
93
93
  }
94
- if (D && w) {
95
- let a = e.x, l = e.y, n = e.width, s = e.height;
96
- switch (w) {
94
+ if (T && l) {
95
+ let g = e.x, w = e.y, d = e.width, c = e.height;
96
+ switch (l) {
97
97
  case "se":
98
- n = Math.max(f, e.width + y), s = n / c;
98
+ d = Math.max(m, e.width + y), c = d / o;
99
99
  break;
100
100
  case "sw":
101
- n = Math.max(f, e.width - y), s = n / c, a = e.x + e.width - n;
101
+ d = Math.max(m, e.width - y), c = d / o, g = e.x + e.width - d;
102
102
  break;
103
103
  case "ne":
104
- n = Math.max(f, e.width + y), s = n / c, l = e.y + e.height - s;
104
+ d = Math.max(m, e.width + y), c = d / o, w = e.y + e.height - c;
105
105
  break;
106
106
  case "nw":
107
- n = Math.max(f, e.width - y), s = n / c, a = e.x + e.width - n, l = e.y + e.height - s;
107
+ d = Math.max(m, e.width - y), c = d / o, g = e.x + e.width - d, w = e.y + e.height - c;
108
108
  break;
109
109
  case "e":
110
- n = Math.max(f, e.width + y), s = n / c, l = e.y + (e.height - s) / 2;
110
+ d = Math.max(m, e.width + y), c = d / o, w = e.y + (e.height - c) / 2;
111
111
  break;
112
112
  case "w":
113
- n = Math.max(f, e.width - y), s = n / c, a = e.x + e.width - n, l = e.y + (e.height - s) / 2;
113
+ d = Math.max(m, e.width - y), c = d / o, g = e.x + e.width - d, w = e.y + (e.height - c) / 2;
114
114
  break;
115
115
  case "s":
116
- s = Math.max(f, e.height + k), n = s * c, a = e.x + (e.width - n) / 2;
116
+ c = Math.max(m, e.height + D), d = c * o, g = e.x + (e.width - d) / 2;
117
117
  break;
118
118
  case "n":
119
- s = Math.max(f, e.height - k), n = s * c, a = e.x + (e.width - n) / 2, l = e.y + e.height - s;
119
+ c = Math.max(m, e.height - D), d = c * o, g = e.x + (e.width - d) / 2, w = e.y + e.height - c;
120
120
  break;
121
121
  }
122
- v && (c >= 1 ? n > v && (n = v, s = n / c, w.includes("w") && (a = e.x + e.width - n), w.includes("n") && (l = e.y + e.height - s), (w === "e" || w === "w") && (l = e.y + (e.height - s) / 2), (w === "n" || w === "s") && (a = e.x + (e.width - n) / 2)) : s > v && (s = v, n = s * c, w.includes("w") && (a = e.x + e.width - n), w.includes("n") && (l = e.y + e.height - s), (w === "e" || w === "w") && (l = e.y + (e.height - s) / 2), (w === "n" || w === "s") && (a = e.x + (e.width - n) / 2))), a < p && (n += a - p, s = n / c, a = p), l < x && (s += l - x, n = s * c, l = x), a + n > N && (n = N - a, s = n / c), l + s > I && (s = I - l, n = s * c), n >= f && s >= f && G({ x: a, y: l, width: n, height: s });
122
+ const p = l.includes("w") ? e.x + e.width : l.includes("e") ? e.x : e.x + e.width / 2, $ = l.includes("n") ? e.y + e.height : l.includes("s") ? e.y : e.y + e.height / 2;
123
+ let x, E;
124
+ l.includes("w") ? x = p - B : l.includes("e") ? x = N - p : x = Math.min(p - B, N - p) * 2, l.includes("n") ? E = $ - L : l.includes("s") ? E = A - $ : E = Math.min($ - L, A - $) * 2, X && (o >= 1 ? x = Math.min(x, X) : E = Math.min(E, X)), x / o < E ? E = x / o : x = E * o, d > x && (d = x, c = d / o), l.includes("w") ? g = p - d : l.includes("e") ? g = p : g = p - d / 2, l.includes("n") ? w = $ - c : l.includes("s") ? w = $ : w = $ - c / 2, d >= m && c >= m && U({ x: g, y: w, width: d, height: c });
123
125
  }
124
- }, h = () => {
125
- K(!1), Q(!1), U(null);
126
+ }, i = () => {
127
+ Z(!1), _(!1), S(null);
126
128
  };
127
- return (W || D) && (window.addEventListener("mousemove", i), window.addEventListener("mouseup", h), window.addEventListener("touchmove", i), window.addEventListener("touchend", h)), () => {
128
- window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", h), window.removeEventListener("touchmove", i), window.removeEventListener("touchend", h);
129
+ return (P || T) && (window.addEventListener("mousemove", n), window.addEventListener("mouseup", i), window.addEventListener("touchmove", n), window.addEventListener("touchend", i)), () => {
130
+ window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", i), window.removeEventListener("touchmove", n), window.removeEventListener("touchend", i);
129
131
  };
130
132
  }, [
131
- W,
132
- D,
133
- w,
134
- J,
133
+ P,
134
+ T,
135
+ l,
136
+ V,
135
137
  e,
136
- o,
138
+ r,
137
139
  t.width,
138
140
  t.height,
139
- c,
140
- f,
141
- v
142
- ]), q(() => {
143
- if (O && H && o.width > 0) {
144
- const i = m.width / o.width, h = m.height / o.height;
145
- O({
146
- x: (t.x - o.x) * i,
147
- y: (t.y - o.y) * h,
148
- width: t.width * i,
149
- height: t.height * h,
150
- scale: i
141
+ o,
142
+ m,
143
+ X
144
+ ]), j(() => {
145
+ if (K && Y && r.width > 0) {
146
+ const n = f.width / r.width, i = f.height / r.height;
147
+ K({
148
+ x: (t.x - r.x) * n,
149
+ y: (t.y - r.y) * i,
150
+ width: t.width * n,
151
+ height: t.height * i,
152
+ scale: n
151
153
  });
152
154
  }
153
- }, [t, m, o, H, O]);
154
- const S = C(() => new Promise((i, h) => {
155
- if (!$.current || !j.current) {
156
- h(new Error("Image or canvas not ready"));
155
+ }, [t, f, r, Y, K]);
156
+ const te = G(() => new Promise((n, i) => {
157
+ if (!W.current || !Q.current) {
158
+ i(new Error("Image or canvas not ready"));
157
159
  return;
158
160
  }
159
- const d = j.current, u = d.getContext("2d");
161
+ const s = Q.current, u = s.getContext("2d");
160
162
  if (!u) {
161
- h(new Error("Could not get canvas context"));
163
+ i(new Error("Could not get canvas context"));
162
164
  return;
163
165
  }
164
- const b = m.width / o.width, y = m.height / o.height, k = (t.x - o.x) * b, p = (t.y - o.y) * y, x = t.width * b, N = t.height * y;
165
- d.width = x, d.height = N, Y === "rounded" && (u.beginPath(), u.arc(
166
- x / 2,
166
+ const k = f.width / r.width, y = f.height / r.height, D = (t.x - r.x) * k, B = (t.y - r.y) * y, L = t.width * k, N = t.height * y;
167
+ s.width = L, s.height = N, I === "rounded" && (u.beginPath(), u.arc(
168
+ L / 2,
167
169
  N / 2,
168
- Math.min(x, N) / 2,
170
+ Math.min(L, N) / 2,
169
171
  0,
170
172
  Math.PI * 2
171
173
  ), u.closePath(), u.clip()), u.drawImage(
172
- $.current,
173
- k,
174
- p,
175
- x,
174
+ W.current,
175
+ D,
176
+ B,
177
+ L,
176
178
  N,
177
179
  0,
178
180
  0,
179
- x,
181
+ L,
180
182
  N
181
- ), d.toBlob(
182
- (I) => {
183
- I ? i(I) : h(new Error("Failed to create blob"));
183
+ ), s.toBlob(
184
+ (A) => {
185
+ A ? n(A) : i(new Error("Failed to create blob"));
184
186
  },
185
187
  "image/png",
186
188
  1
187
189
  );
188
- }), [t, m, o, Y]);
189
- q(() => {
190
- F && S().then(F).catch(() => {
190
+ }), [t, f, r, I]);
191
+ j(() => {
192
+ J && te().then(J).catch(() => {
191
193
  });
192
- }, [S, F]);
193
- const B = (i) => {
194
- const h = {
195
- nw: r.handleNW,
196
- ne: r.handleNE,
197
- sw: r.handleSW,
198
- se: r.handleSE
194
+ }, [te, J]);
195
+ const C = (n) => {
196
+ const i = {
197
+ nw: h.handleNW,
198
+ ne: h.handleNE,
199
+ sw: h.handleSW,
200
+ se: h.handleSE
199
201
  };
200
- return /* @__PURE__ */ X(
202
+ return /* @__PURE__ */ b(
201
203
  "div",
202
204
  {
203
- className: `${r.cornerHandle} ${h[i]}`,
204
- onMouseDown: A(i),
205
- onTouchStart: A(i),
205
+ className: `${h.cornerHandle} ${i[n]}`,
206
+ onMouseDown: q(n),
207
+ onTouchStart: q(n),
206
208
  children: [
207
- /* @__PURE__ */ g("div", { className: r.cornerHandleArm, "data-direction": "horizontal" }),
208
- /* @__PURE__ */ g("div", { className: r.cornerHandleArm, "data-direction": "vertical" })
209
+ /* @__PURE__ */ a("div", { className: h.cornerHandleArm, "data-direction": "horizontal" }),
210
+ /* @__PURE__ */ a("div", { className: h.cornerHandleArm, "data-direction": "vertical" })
209
211
  ]
210
212
  }
211
213
  );
212
- }, P = (i) => {
213
- const h = {
214
- n: r.handleN,
215
- s: r.handleS,
216
- e: r.handleE,
217
- w: r.handleW
214
+ }, F = (n) => {
215
+ const i = {
216
+ n: h.handleN,
217
+ s: h.handleS,
218
+ e: h.handleE,
219
+ w: h.handleW
218
220
  };
219
- return /* @__PURE__ */ g(
221
+ return /* @__PURE__ */ a(
220
222
  "div",
221
223
  {
222
- className: `${r.edgeHandle} ${h[i]}`,
223
- onMouseDown: A(i),
224
- onTouchStart: A(i),
225
- children: /* @__PURE__ */ g("div", { className: r.edgeHandleBar })
224
+ className: `${h.edgeHandle} ${i[n]}`,
225
+ onMouseDown: q(n),
226
+ onTouchStart: q(n),
227
+ children: /* @__PURE__ */ a("div", { className: h.edgeHandleBar })
226
228
  }
227
229
  );
228
230
  };
229
- return /* @__PURE__ */ X(se, { className: r.container, ref: ee, children: [
230
- /* @__PURE__ */ g("canvas", { ref: j, style: { display: "none" } }),
231
- /* @__PURE__ */ g(
231
+ return /* @__PURE__ */ b(oe, { className: h.container, ref: he, children: [
232
+ /* @__PURE__ */ a("canvas", { ref: Q, style: { display: "none" } }),
233
+ /* @__PURE__ */ a(
232
234
  "img",
233
235
  {
234
- ref: $,
235
- src: z,
236
+ ref: W,
237
+ src: ie,
236
238
  alt: "Crop preview",
237
- className: r.image,
238
- onLoad: ie,
239
+ className: h.image,
240
+ onLoad: re,
239
241
  draggable: !1
240
242
  }
241
243
  ),
242
- H && /* @__PURE__ */ X(T, { children: [
243
- Y === "square" ? /* @__PURE__ */ X(T, { children: [
244
- /* @__PURE__ */ g(
244
+ Y && /* @__PURE__ */ b(O, { children: [
245
+ I === "square" ? /* @__PURE__ */ b(O, { children: [
246
+ /* @__PURE__ */ a(
245
247
  "div",
246
248
  {
247
- className: r.overlay,
249
+ className: h.overlay,
248
250
  style: {
249
251
  top: 0,
250
252
  left: 0,
@@ -253,10 +255,10 @@ const ge = ({
253
255
  }
254
256
  }
255
257
  ),
256
- /* @__PURE__ */ g(
258
+ /* @__PURE__ */ a(
257
259
  "div",
258
260
  {
259
- className: r.overlay,
261
+ className: h.overlay,
260
262
  style: {
261
263
  top: t.y + t.height,
262
264
  left: 0,
@@ -265,10 +267,10 @@ const ge = ({
265
267
  }
266
268
  }
267
269
  ),
268
- /* @__PURE__ */ g(
270
+ /* @__PURE__ */ a(
269
271
  "div",
270
272
  {
271
- className: r.overlay,
273
+ className: h.overlay,
272
274
  style: {
273
275
  top: t.y,
274
276
  left: 0,
@@ -277,10 +279,10 @@ const ge = ({
277
279
  }
278
280
  }
279
281
  ),
280
- /* @__PURE__ */ g(
282
+ /* @__PURE__ */ a(
281
283
  "div",
282
284
  {
283
- className: r.overlay,
285
+ className: h.overlay,
284
286
  style: {
285
287
  top: t.y,
286
288
  left: t.x + t.width,
@@ -289,10 +291,10 @@ const ge = ({
289
291
  }
290
292
  }
291
293
  )
292
- ] }) : /* @__PURE__ */ g(
294
+ ] }) : /* @__PURE__ */ a(
293
295
  "div",
294
296
  {
295
- className: r.circularOverlay,
297
+ className: h.circularOverlay,
296
298
  style: {
297
299
  left: t.x + t.width / 2,
298
300
  top: t.y + t.height / 2,
@@ -301,49 +303,49 @@ const ge = ({
301
303
  }
302
304
  }
303
305
  ),
304
- /* @__PURE__ */ X(
306
+ /* @__PURE__ */ b(
305
307
  "div",
306
308
  {
307
- className: `${r.cropArea} ${Y === "rounded" ? r.cropAreaRounded : ""}`,
309
+ className: `${h.cropArea} ${I === "rounded" ? h.cropAreaRounded : ""}`,
308
310
  style: {
309
311
  left: t.x,
310
312
  top: t.y,
311
313
  width: t.width,
312
314
  height: t.height
313
315
  },
314
- onMouseDown: _,
315
- onTouchStart: _,
316
+ onMouseDown: ee,
317
+ onTouchStart: ee,
316
318
  children: [
317
- Y === "square" ? /* @__PURE__ */ g("div", { className: r.dashedBorder }) : /* @__PURE__ */ X(T, { children: [
318
- /* @__PURE__ */ g("div", { className: `${r.edgeLine} ${r.edgeLineTop}` }),
319
- /* @__PURE__ */ g(
319
+ I === "square" ? /* @__PURE__ */ a("div", { className: h.dashedBorder }) : /* @__PURE__ */ b(O, { children: [
320
+ /* @__PURE__ */ a("div", { className: `${h.edgeLine} ${h.edgeLineTop}` }),
321
+ /* @__PURE__ */ a(
320
322
  "div",
321
323
  {
322
- className: `${r.edgeLine} ${r.edgeLineBottom}`
324
+ className: `${h.edgeLine} ${h.edgeLineBottom}`
323
325
  }
324
326
  ),
325
- /* @__PURE__ */ g(
327
+ /* @__PURE__ */ a(
326
328
  "div",
327
329
  {
328
- className: `${r.edgeLine} ${r.edgeLineLeft}`
330
+ className: `${h.edgeLine} ${h.edgeLineLeft}`
329
331
  }
330
332
  ),
331
- /* @__PURE__ */ g(
333
+ /* @__PURE__ */ a(
332
334
  "div",
333
335
  {
334
- className: `${r.edgeLine} ${r.edgeLineRight}`
336
+ className: `${h.edgeLine} ${h.edgeLineRight}`
335
337
  }
336
338
  )
337
339
  ] }),
338
- B("nw"),
339
- B("ne"),
340
- B("sw"),
341
- B("se"),
342
- Y === "square" && /* @__PURE__ */ X(T, { children: [
343
- P("n"),
344
- P("s"),
345
- P("e"),
346
- P("w")
340
+ C("nw"),
341
+ C("ne"),
342
+ C("sw"),
343
+ C("se"),
344
+ I === "square" && /* @__PURE__ */ b(O, { children: [
345
+ F("n"),
346
+ F("s"),
347
+ F("e"),
348
+ F("w")
347
349
  ] })
348
350
  ]
349
351
  }
@@ -352,5 +354,5 @@ const ge = ({
352
354
  ] });
353
355
  };
354
356
  export {
355
- ge as ImageCropper
357
+ fe as ImageCropper
356
358
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LanguagePicker.d.ts","sourceRoot":"","sources":["../../../src/components/LanguagePicker/LanguagePicker.tsx"],"names":[],"mappings":"AAiBA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD,eAAO,MAAM,cAAc,GAAI,6BAI5B,mBAAmB,4CA+BrB,CAAC"}
1
+ {"version":3,"file":"LanguagePicker.d.ts","sourceRoot":"","sources":["../../../src/components/LanguagePicker/LanguagePicker.tsx"],"names":[],"mappings":"AAkBA,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0BD,eAAO,MAAM,cAAc,GAAI,6BAI5B,mBAAmB,4CAkBrB,CAAC"}
@@ -1,45 +1,54 @@
1
- import { jsx as a, jsxs as g } from "react/jsx-runtime";
2
- import { useMemo as f } from "react";
3
- import { Select as u, Image as l, Group as x } from "@mantine/core";
4
- import { IconCheck as d } from "@tabler/icons-react";
5
- import b from "../../assets/svg/flags/es.svg.js";
6
- import h from "../../assets/svg/flags/ru.svg.js";
1
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
+ import { useMemo as p } from "react";
3
+ import { Tick02Icon as g } from "@hugeicons/core-free-icons";
4
+ import { HugeiconsIcon as f } from "@hugeicons/react";
5
+ import { Select as u, Image as n, Group as d } from "@mantine/core";
6
+ import x from "../../assets/svg/flags/es.svg.js";
7
+ import b from "../../assets/svg/flags/ru.svg.js";
7
8
  import y from "../../assets/svg/flags/us.svg.js";
8
- import o from "./LanguagePicker.module.css.js";
9
- const s = {
10
- ru: h,
9
+ import l from "./LanguagePicker.module.css.js";
10
+ const m = {
11
+ ru: b,
11
12
  en: y,
12
- es: b
13
- }, t = [
14
- { value: "ru", label: "Русский" },
13
+ es: x
14
+ }, s = [
15
15
  { value: "en", label: "English" },
16
+ { value: "ru", label: "Русский" },
16
17
  { value: "es", label: "Español (España)" }
17
- ], M = ({
18
- value: r,
19
- onChange: n,
20
- label: m
18
+ ], E = ({
19
+ option: e,
20
+ checked: a
21
+ }) => /* @__PURE__ */ c(d, { flex: "1", gap: "xs", children: [
22
+ /* @__PURE__ */ o(n, { src: m[e.value], className: l.image }),
23
+ e.label,
24
+ a && /* @__PURE__ */ o(
25
+ f,
26
+ {
27
+ color: "var(--mantine-primary-color-filled)",
28
+ size: 16,
29
+ icon: g,
30
+ className: l.tickIcon
31
+ }
32
+ )
33
+ ] }), O = ({
34
+ value: e,
35
+ onChange: a,
36
+ label: t
21
37
  }) => {
22
- const i = ({
23
- option: e,
24
- checked: c
25
- }) => /* @__PURE__ */ g(x, { flex: "1", gap: "xs", children: [
26
- /* @__PURE__ */ a(l, { src: s[e.value], className: o.image }),
27
- e.label,
28
- c && /* @__PURE__ */ a(d, { style: { marginInlineStart: "auto" }, stroke: 1.2 })
29
- ] }), p = f(() => t.find((e) => e.value === r) ? r : "en", [r]);
30
- return /* @__PURE__ */ a(
38
+ const i = p(() => s.find((r) => r.value === e) ? e : "en", [e]);
39
+ return /* @__PURE__ */ o(
31
40
  u,
32
41
  {
33
- label: m,
42
+ label: t,
34
43
  flex: 1,
35
- onChange: (e) => e && n(e),
36
- leftSection: /* @__PURE__ */ a(l, { src: s[r], className: o.image }),
37
- value: p,
38
- data: t,
39
- renderOption: i
44
+ onChange: (r) => r && a(r),
45
+ leftSection: /* @__PURE__ */ o(n, { src: m[e], className: l.image }),
46
+ value: i,
47
+ data: s,
48
+ renderOption: E
40
49
  }
41
50
  );
42
51
  };
43
52
  export {
44
- M as LanguagePicker
53
+ O as LanguagePicker
45
54
  };
@@ -1,7 +1,9 @@
1
- const e = "_image_vcu25_1", a = {
2
- image: e
1
+ const c = "_image_1re3l_1", t = "_tickIcon_1re3l_8", e = {
2
+ image: c,
3
+ tickIcon: t
3
4
  };
4
5
  export {
5
- a as default,
6
- e as image
6
+ e as default,
7
+ c as image,
8
+ t as tickIcon
7
9
  };