@hai-dev/ui-kit 1.1.11 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/{Box-TrgOqpYk.js → Box-BgNAyP2L.js} +2 -2
  2. package/dist/{Button-BN3fv8kr.js → Button-DTV8ztWw.js} +5 -5
  3. package/dist/{ButtonBase-CSWuFxUv.js → ButtonBase-C4krg_zd.js} +3 -3
  4. package/dist/{CircularProgress-sPARyPfh.js → CircularProgress-BoaEg4rF.js} +3 -3
  5. package/dist/{Dialog-Cf0d7zi7.js → Dialog-BK9lMUKV.js} +12 -11
  6. package/dist/{DialogTitle-BtvmXSZP.js → DialogTitle-ByUfLB5M.js} +4 -4
  7. package/dist/{Typography-Bjd6ZHeX.js → Typography-BMyz0ZCh.js} +4 -4
  8. package/dist/assets/button.css +1 -1
  9. package/dist/assets/circular-progress-loader.css +1 -1
  10. package/dist/assets/code-input.css +1 -1
  11. package/dist/assets/error-upload-dialog.css +1 -1
  12. package/dist/assets/inter.css +1 -0
  13. package/dist/assets/photo-list.css +1 -1
  14. package/dist/assets/upload-dialog-errors.css +1 -1
  15. package/dist/button.module-C0UNQnBk.js +40 -0
  16. package/dist/chainPropTypes-DgqFdXGi.js +532 -0
  17. package/dist/components/button/button-content.js +11 -11
  18. package/dist/components/button/button.d.ts +18 -0
  19. package/dist/components/button/button.js +42 -35
  20. package/dist/components/button/constants.d.ts +17 -0
  21. package/dist/components/button/constants.js +28 -11
  22. package/dist/components/button/types.d.ts +11 -8
  23. package/dist/components/button/utils/get-button-classnames.d.ts +6 -0
  24. package/dist/components/button/utils/get-button-classnames.js +22 -10
  25. package/dist/components/circular-progress-loader/circular-progress-loader.js +14 -13
  26. package/dist/components/code-input/code-input.js +114 -112
  27. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +37 -34
  28. package/dist/components/photo-crop-uploader/components/error-upload-dialog/types.d.ts +2 -1
  29. package/dist/components/photo-crop-uploader/components/photo-list/constants.d.ts +5 -1
  30. package/dist/components/photo-crop-uploader/components/photo-list/constants.js +6 -2
  31. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +136 -33
  32. package/dist/components/photo-crop-uploader/components/photo-list/types.d.ts +2 -0
  33. package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.d.ts +4 -0
  34. package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.js +22 -0
  35. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
  36. package/dist/components/photo-crop-uploader/components/upload-dialog/constants.d.ts +1 -1
  37. package/dist/components/photo-crop-uploader/components/upload-dialog/constants.js +1 -1
  38. package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +2 -1
  39. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +4 -3
  40. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +159 -147
  41. package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.d.ts +4 -0
  42. package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.js +31 -0
  43. package/dist/components/photo-crop-uploader/locale.js +6 -2
  44. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +131 -128
  45. package/dist/components/photo-crop-uploader/types.d.ts +2 -1
  46. package/dist/constants.d.ts +2 -0
  47. package/dist/constants.js +5 -3
  48. package/dist/{createTheme-D8R2Cz2N.js → createTheme-BoOmbNvy.js} +426 -390
  49. package/dist/{extendSxProp-Cw_ym9sl.js → extendSxProp-BaUCVMKV.js} +2 -1
  50. package/dist/{index-CL3JU48X.js → index-h5oTv8GF.js} +3 -3
  51. package/dist/index.d.ts +3 -3
  52. package/dist/index.js +26 -24
  53. package/dist/{memoTheme-D5VCpQCz.js → memoTheme-BYBJ2Fe6.js} +1 -1
  54. package/dist/refType-CsohaiiT.js +60 -0
  55. package/dist/types.d.ts +2 -1
  56. package/dist/{upload-dialog-errors-Cyz6_7n4.js → upload-dialog-errors-CCRxzIZp.js} +69 -67
  57. package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
  58. package/dist/utils/debounce.d.ts +5 -0
  59. package/dist/utils/debounce.js +12 -0
  60. package/dist/utils/index.d.ts +1 -0
  61. package/dist/utils/index.js +4 -0
  62. package/package.json +10 -2
  63. package/dist/button.module-BZPPmSAS.js +0 -21
  64. package/dist/chainPropTypes-DiJb1lGa.js +0 -568
  65. package/dist/refType-CUEs_vK5.js +0 -61
@@ -4,19 +4,21 @@ import { useState as Ve, useRef as Pe, useEffect as he } from "react";
4
4
  import { c as We } from "../../index-YnD2EP-S.js";
5
5
  import { DEFAULT_CODE_LENGTH as je, NOT_CODE_REGEX as Ke, BACKSPACE_KEY as qe, ARROW_LEFT_KEY as Ue, ARROW_RIGHT_KEY as Ge, ENTER_KEY as $e, CODE_REGEX as Q, TAB_KEY as Ye } from "./constants.js";
6
6
  import { RU_LOCALE as Xe } from "../../constants.js";
7
- import { P as e, g as Ze, a as Je, c as ye, b as ne, l as Qe } from "../../createTheme-D8R2Cz2N.js";
8
- import { g as et } from "../../index-CL3JU48X.js";
9
- import { m as ve } from "../../memoTheme-D5VCpQCz.js";
10
- import { u as tt, c as nt, s as Ie } from "../../chainPropTypes-DiJb1lGa.js";
11
- import { u as Te, a as ot, b as oe, r as rt, e as it } from "../../refType-CUEs_vK5.js";
7
+ import '../../assets/inter.css';import '../../assets/code-input.css';/* empty css */
8
+ import { P as e, g as Ze, a as Je, c as ye, b as oe, l as Qe } from "../../createTheme-BoOmbNvy.js";
9
+ import { g as et } from "../../index-h5oTv8GF.js";
10
+ import { m as ve } from "../../memoTheme-BYBJ2Fe6.js";
11
+ import { u as tt, c as ot, s as Ie } from "../../chainPropTypes-DgqFdXGi.js";
12
+ import { u as Te, a as nt, r as rt, e as it } from "../../refType-CsohaiiT.js";
13
+ import { u as ne } from "../../useEnhancedEffect-CJGo-L3B.js";
12
14
  import { o as ge, i as be } from "../../isHostComponent-Dm_U9uOy.js";
13
15
  import { getCodeInputLabel as at } from "./utils/get-code-input-label.js";
14
16
  import { slideDownAnimation as ee } from "./utils/slide-down-animate.js";
15
- import '../../assets/code-input.css';function st(n, r = 166) {
17
+ function st(o, r = 166) {
16
18
  let i;
17
19
  function d(...s) {
18
20
  const y = () => {
19
- n.apply(this, s);
21
+ o.apply(this, s);
20
22
  };
21
23
  clearTimeout(i), i = setTimeout(y, r);
22
24
  }
@@ -24,8 +26,8 @@ import '../../assets/code-input.css';function st(n, r = 166) {
24
26
  clearTimeout(i);
25
27
  }, d;
26
28
  }
27
- function P(n) {
28
- return parseInt(n, 10) || 0;
29
+ function P(o) {
30
+ return parseInt(o, 10) || 0;
29
31
  }
30
32
  const lt = {
31
33
  shadow: {
@@ -42,13 +44,13 @@ const lt = {
42
44
  transform: "translateZ(0)"
43
45
  }
44
46
  };
45
- function ut(n) {
46
- for (const r in n)
47
+ function ut(o) {
48
+ for (const r in o)
47
49
  return !1;
48
50
  return !0;
49
51
  }
50
- function we(n) {
51
- return ut(n) || n.outerHeightStyle === 0 && !n.overflowing;
52
+ function we(o) {
53
+ return ut(o) || o.outerHeightStyle === 0 && !o.overflowing;
52
54
  }
53
55
  const Oe = /* @__PURE__ */ h.forwardRef(function(r, i) {
54
56
  const {
@@ -61,8 +63,8 @@ const Oe = /* @__PURE__ */ h.forwardRef(function(r, i) {
61
63
  } = r, {
62
64
  current: b
63
65
  } = h.useRef(I != null), g = h.useRef(null), p = Te(i, g), w = h.useRef(null), O = h.useRef(null), S = h.useCallback(() => {
64
- const t = g.current, o = O.current;
65
- if (!t || !o)
66
+ const t = g.current, n = O.current;
67
+ if (!t || !n)
66
68
  return;
67
69
  const c = ge(t).getComputedStyle(t);
68
70
  if (c.width === "0px")
@@ -70,11 +72,11 @@ const Oe = /* @__PURE__ */ h.forwardRef(function(r, i) {
70
72
  outerHeightStyle: 0,
71
73
  overflowing: !1
72
74
  };
73
- o.style.width = c.width, o.value = t.value || r.placeholder || "x", o.value.slice(-1) === `
74
- ` && (o.value += " ");
75
- const C = c.boxSizing, T = P(c.paddingBottom) + P(c.paddingTop), W = P(c.borderBottomWidth) + P(c.borderTopWidth), A = o.scrollHeight;
76
- o.value = "x";
77
- const M = o.scrollHeight;
75
+ n.style.width = c.width, n.value = t.value || r.placeholder || "x", n.value.slice(-1) === `
76
+ ` && (n.value += " ");
77
+ const C = c.boxSizing, T = P(c.paddingBottom) + P(c.paddingTop), W = P(c.borderBottomWidth) + P(c.borderTopWidth), A = n.scrollHeight;
78
+ n.value = "x";
79
+ const M = n.scrollHeight;
78
80
  let R = A;
79
81
  y && (R = Math.max(Number(y) * M, R)), s && (R = Math.min(Number(s) * M, R)), R = Math.max(R, M);
80
82
  const H = R + (C === "border-box" ? T + W : 0), j = Math.abs(R - A) <= 1;
@@ -82,41 +84,41 @@ const Oe = /* @__PURE__ */ h.forwardRef(function(r, i) {
82
84
  outerHeightStyle: H,
83
85
  overflowing: j
84
86
  };
85
- }, [s, y, r.placeholder]), N = ot(() => {
86
- const t = g.current, o = S();
87
- if (!t || !o || we(o))
87
+ }, [s, y, r.placeholder]), N = nt(() => {
88
+ const t = g.current, n = S();
89
+ if (!t || !n || we(n))
88
90
  return !1;
89
- const u = o.outerHeightStyle;
91
+ const u = n.outerHeightStyle;
90
92
  return w.current != null && w.current !== u;
91
- }), k = h.useCallback(() => {
92
- const t = g.current, o = S();
93
- if (!t || !o || we(o))
93
+ }), x = h.useCallback(() => {
94
+ const t = g.current, n = S();
95
+ if (!t || !n || we(n))
94
96
  return;
95
- const u = o.outerHeightStyle;
96
- w.current !== u && (w.current = u, t.style.height = `${u}px`), t.style.overflow = o.overflowing ? "hidden" : "";
97
+ const u = n.outerHeightStyle;
98
+ w.current !== u && (w.current = u, t.style.height = `${u}px`), t.style.overflow = n.overflowing ? "hidden" : "";
97
99
  }, [S]), l = h.useRef(-1);
98
- oe(() => {
99
- const t = st(k), o = g?.current;
100
- if (!o)
100
+ ne(() => {
101
+ const t = st(x), n = g?.current;
102
+ if (!n)
101
103
  return;
102
- const u = ge(o);
104
+ const u = ge(n);
103
105
  u.addEventListener("resize", t);
104
106
  let c;
105
107
  return typeof ResizeObserver < "u" && (c = new ResizeObserver(() => {
106
- N() && (c.unobserve(o), cancelAnimationFrame(l.current), k(), l.current = requestAnimationFrame(() => {
107
- c.observe(o);
108
+ N() && (c.unobserve(n), cancelAnimationFrame(l.current), x(), l.current = requestAnimationFrame(() => {
109
+ c.observe(n);
108
110
  }));
109
- }), c.observe(o)), () => {
111
+ }), c.observe(n)), () => {
110
112
  t.clear(), cancelAnimationFrame(l.current), u.removeEventListener("resize", t), c && c.disconnect();
111
113
  };
112
- }, [S, k, N]), oe(() => {
113
- k();
114
+ }, [S, x, N]), ne(() => {
115
+ x();
114
116
  });
115
117
  const a = (t) => {
116
- b || k();
117
- const o = t.target, u = o.value.length, c = o.value.endsWith(`
118
- `), C = o.selectionStart === u;
119
- c && C && o.setSelectionRange(u, u), d && d(t);
118
+ b || x();
119
+ const n = t.target, u = n.value.length, c = n.value.endsWith(`
120
+ `), C = n.selectionStart === u;
121
+ c && C && n.setSelectionRange(u, u), d && d(t);
120
122
  };
121
123
  return /* @__PURE__ */ te(h.Fragment, {
122
124
  children: [/* @__PURE__ */ D("textarea", {
@@ -177,39 +179,39 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
177
179
  value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
178
180
  });
179
181
  function ct({
180
- props: n,
182
+ props: o,
181
183
  states: r,
182
184
  muiFormControl: i
183
185
  }) {
184
- return r.reduce((d, s) => (d[s] = n[s], i && typeof n[s] > "u" && (d[s] = i[s]), d), {});
186
+ return r.reduce((d, s) => (d[s] = o[s], i && typeof o[s] > "u" && (d[s] = i[s]), d), {});
185
187
  }
186
188
  const ie = /* @__PURE__ */ h.createContext(void 0);
187
189
  process.env.NODE_ENV !== "production" && (ie.displayName = "FormControlContext");
188
190
  function dt() {
189
191
  return h.useContext(ie);
190
192
  }
191
- function Ce(n) {
192
- return n != null && !(Array.isArray(n) && n.length === 0);
193
+ function Ce(o) {
194
+ return o != null && !(Array.isArray(o) && o.length === 0);
193
195
  }
194
- function pt(n, r = !1) {
195
- return n && (Ce(n.value) && n.value !== "" || r && Ce(n.defaultValue) && n.defaultValue !== "");
196
+ function pt(o, r = !1) {
197
+ return o && (Ce(o.value) && o.value !== "" || r && Ce(o.defaultValue) && o.defaultValue !== "");
196
198
  }
197
- function ft(n) {
198
- return Ze("MuiInputBase", n);
199
+ function ft(o) {
200
+ return Ze("MuiInputBase", o);
199
201
  }
200
202
  const re = Je("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]);
201
203
  var Ee;
202
- const mt = (n, r) => {
204
+ const mt = (o, r) => {
203
205
  const {
204
206
  ownerState: i
205
- } = n;
206
- return [r.root, i.formControl && r.formControl, i.startAdornment && r.adornedStart, i.endAdornment && r.adornedEnd, i.error && r.error, i.size === "small" && r.sizeSmall, i.multiline && r.multiline, i.color && r[`color${ne(i.color)}`], i.fullWidth && r.fullWidth, i.hiddenLabel && r.hiddenLabel];
207
- }, ht = (n, r) => {
207
+ } = o;
208
+ return [r.root, i.formControl && r.formControl, i.startAdornment && r.adornedStart, i.endAdornment && r.adornedEnd, i.error && r.error, i.size === "small" && r.sizeSmall, i.multiline && r.multiline, i.color && r[`color${oe(i.color)}`], i.fullWidth && r.fullWidth, i.hiddenLabel && r.hiddenLabel];
209
+ }, ht = (o, r) => {
208
210
  const {
209
211
  ownerState: i
210
- } = n;
212
+ } = o;
211
213
  return [r.input, i.size === "small" && r.inputSizeSmall, i.multiline && r.inputMultiline, i.type === "search" && r.inputTypeSearch, i.startAdornment && r.inputAdornedStart, i.endAdornment && r.inputAdornedEnd, i.hiddenLabel && r.inputHiddenLabel];
212
- }, yt = (n) => {
214
+ }, yt = (o) => {
213
215
  const {
214
216
  classes: r,
215
217
  color: i,
@@ -225,20 +227,20 @@ const mt = (n, r) => {
225
227
  size: w,
226
228
  startAdornment: O,
227
229
  type: S
228
- } = n, N = {
229
- root: ["root", `color${ne(i)}`, d && "disabled", s && "error", z && "fullWidth", E && "focused", I && "formControl", w && w !== "medium" && `size${ne(w)}`, g && "multiline", O && "adornedStart", y && "adornedEnd", b && "hiddenLabel", p && "readOnly"],
230
+ } = o, N = {
231
+ root: ["root", `color${oe(i)}`, d && "disabled", s && "error", z && "fullWidth", E && "focused", I && "formControl", w && w !== "medium" && `size${oe(w)}`, g && "multiline", O && "adornedStart", y && "adornedEnd", b && "hiddenLabel", p && "readOnly"],
230
232
  input: ["input", d && "disabled", S === "search" && "inputTypeSearch", g && "inputMultiline", w === "small" && "inputSizeSmall", b && "inputHiddenLabel", O && "inputAdornedStart", y && "inputAdornedEnd", p && "readOnly"]
231
233
  };
232
- return nt(N, ft, r);
234
+ return ot(N, ft, r);
233
235
  }, gt = Ie("div", {
234
236
  name: "MuiInputBase",
235
237
  slot: "Root",
236
238
  overridesResolver: mt
237
239
  })(ve(({
238
- theme: n
240
+ theme: o
239
241
  }) => ({
240
- ...n.typography.body1,
241
- color: (n.vars || n).palette.text.primary,
242
+ ...o.typography.body1,
243
+ color: (o.vars || o).palette.text.primary,
242
244
  lineHeight: "1.4375em",
243
245
  // 23px
244
246
  boxSizing: "border-box",
@@ -248,7 +250,7 @@ const mt = (n, r) => {
248
250
  display: "inline-flex",
249
251
  alignItems: "center",
250
252
  [`&.${re.disabled}`]: {
251
- color: (n.vars || n).palette.text.disabled,
253
+ color: (o.vars || o).palette.text.disabled,
252
254
  cursor: "default"
253
255
  },
254
256
  variants: [{
@@ -279,22 +281,22 @@ const mt = (n, r) => {
279
281
  slot: "Input",
280
282
  overridesResolver: ht
281
283
  })(ve(({
282
- theme: n
284
+ theme: o
283
285
  }) => {
284
- const r = n.palette.mode === "light", i = {
286
+ const r = o.palette.mode === "light", i = {
285
287
  color: "currentColor",
286
- ...n.vars ? {
287
- opacity: n.vars.opacity.inputPlaceholder
288
+ ...o.vars ? {
289
+ opacity: o.vars.opacity.inputPlaceholder
288
290
  } : {
289
291
  opacity: r ? 0.42 : 0.5
290
292
  },
291
- transition: n.transitions.create("opacity", {
292
- duration: n.transitions.duration.shorter
293
+ transition: o.transitions.create("opacity", {
294
+ duration: o.transitions.duration.shorter
293
295
  })
294
296
  }, d = {
295
297
  opacity: "0 !important"
296
- }, s = n.vars ? {
297
- opacity: n.vars.opacity.inputPlaceholder
298
+ }, s = o.vars ? {
299
+ opacity: o.vars.opacity.inputPlaceholder
298
300
  } : {
299
301
  opacity: r ? 0.42 : 0.5
300
302
  };
@@ -347,7 +349,7 @@ const mt = (n, r) => {
347
349
  [`&.${re.disabled}`]: {
348
350
  opacity: 1,
349
351
  // Reset iOS opacity
350
- WebkitTextFillColor: (n.vars || n).palette.text.disabled
352
+ WebkitTextFillColor: (o.vars || o).palette.text.disabled
351
353
  // Fix opacity Safari bug
352
354
  },
353
355
  variants: [{
@@ -400,7 +402,7 @@ const mt = (n, r) => {
400
402
  display: "block"
401
403
  }
402
404
  }
403
- }), ke = /* @__PURE__ */ h.forwardRef(function(r, i) {
405
+ }), xe = /* @__PURE__ */ h.forwardRef(function(r, i) {
404
406
  const d = tt({
405
407
  props: r,
406
408
  name: "MuiInputBase"
@@ -417,11 +419,11 @@ const mt = (n, r) => {
417
419
  disableInjectingGlobalStyles: O,
418
420
  endAdornment: S,
419
421
  error: N,
420
- fullWidth: k = !1,
422
+ fullWidth: x = !1,
421
423
  id: l,
422
424
  inputComponent: a = "input",
423
425
  inputProps: t = {},
424
- inputRef: o,
426
+ inputRef: n,
425
427
  margin: u,
426
428
  maxRows: c,
427
429
  minRows: C,
@@ -432,7 +434,7 @@ const mt = (n, r) => {
432
434
  onClick: R,
433
435
  onFocus: H,
434
436
  onKeyDown: j,
435
- onKeyUp: xe,
437
+ onKeyUp: ke,
436
438
  placeholder: Ae,
437
439
  readOnly: K,
438
440
  renderSuffix: ae,
@@ -449,7 +451,7 @@ const mt = (n, r) => {
449
451
  } = h.useRef(V != null), F = h.useRef(), ze = h.useCallback((f) => {
450
452
  process.env.NODE_ENV !== "production" && f && f.nodeName !== "INPUT" && !f.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
451
453
  `));
452
- }, []), Me = Te(F, o, t.ref, ze), [U, G] = h.useState(!1), m = dt();
454
+ }, []), Me = Te(F, n, t.ref, ze), [U, G] = h.useState(!1), m = dt();
453
455
  process.env.NODE_ENV !== "production" && h.useEffect(() => {
454
456
  if (m)
455
457
  return m.registerEffect();
@@ -465,7 +467,7 @@ const mt = (n, r) => {
465
467
  const $ = m && m.onFilled, Y = m && m.onEmpty, B = h.useCallback((f) => {
466
468
  pt(f) ? $ && $() : Y && Y();
467
469
  }, [$, Y]);
468
- oe(() => {
470
+ ne(() => {
469
471
  q && B({
470
472
  value: V
471
473
  });
@@ -491,17 +493,17 @@ const mt = (n, r) => {
491
493
  const He = (f) => {
492
494
  F.current && f.currentTarget === f.target && F.current.focus(), R && R(f);
493
495
  };
494
- let X = a, x = t;
495
- T && X === "input" && (L ? (process.env.NODE_ENV !== "production" && (C || c) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), x = {
496
+ let X = a, k = t;
497
+ T && X === "input" && (L ? (process.env.NODE_ENV !== "production" && (C || c) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), k = {
496
498
  type: void 0,
497
499
  minRows: L,
498
500
  maxRows: L,
499
- ...x
500
- }) : x = {
501
+ ...k
502
+ }) : k = {
501
503
  type: void 0,
502
504
  maxRows: c,
503
505
  minRows: C,
504
- ...x
506
+ ...k
505
507
  }, X = Oe);
506
508
  const Le = (f) => {
507
509
  B(f.animationName === "mui-auto-fill-cancel" ? F.current : {
@@ -519,15 +521,15 @@ const mt = (n, r) => {
519
521
  error: v.error,
520
522
  focused: v.focused,
521
523
  formControl: m,
522
- fullWidth: k,
524
+ fullWidth: x,
523
525
  hiddenLabel: v.hiddenLabel,
524
526
  multiline: T,
525
527
  size: v.size,
526
528
  startAdornment: _,
527
529
  type: ue
528
530
  }, ce = yt(Z), de = le.root || b.Root || gt, J = se.root || g.root || {}, pe = le.input || b.Input || bt;
529
- return x = {
530
- ...x,
531
+ return k = {
532
+ ...k,
531
533
  ...se.input ?? g.input
532
534
  }, /* @__PURE__ */ te(h.Fragment, {
533
535
  children: [!O && typeof Se == "function" && // For Emotion/Styled-components, InputGlobalStyles will be a function
@@ -562,18 +564,18 @@ const mt = (n, r) => {
562
564
  rows: L,
563
565
  value: V,
564
566
  onKeyDown: j,
565
- onKeyUp: xe,
567
+ onKeyUp: ke,
566
568
  type: ue,
567
- ...x,
569
+ ...k,
568
570
  ...!be(pe) && {
569
571
  as: X,
570
572
  ownerState: {
571
573
  ...Z,
572
- ...x.ownerState
574
+ ...k.ownerState
573
575
  }
574
576
  },
575
577
  ref: Me,
576
- className: ye(ce.input, x.className, K && "MuiInputBase-readOnly"),
578
+ className: ye(ce.input, k.className, K && "MuiInputBase-readOnly"),
577
579
  onBlur: _e,
578
580
  onChange: Be,
579
581
  onFocus: Fe
@@ -585,7 +587,7 @@ const mt = (n, r) => {
585
587
  })]
586
588
  });
587
589
  });
588
- process.env.NODE_ENV !== "production" && (ke.propTypes = {
590
+ process.env.NODE_ENV !== "production" && (xe.propTypes = {
589
591
  // ┌────────────────────────────── Warning ──────────────────────────────┐
590
592
  // │ These PropTypes are generated from the TypeScript type definitions. │
591
593
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -813,10 +815,10 @@ process.env.NODE_ENV !== "production" && (ke.propTypes = {
813
815
  */
814
816
  value: e.any
815
817
  });
816
- const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
818
+ const wt = "_codeInput_5jwux_1", Ct = "_codeInputItem_5jwux_5", Re = {
817
819
  codeInput: wt,
818
820
  codeInputItem: Ct
819
- }, Ft = (n) => {
821
+ }, Bt = (o) => {
820
822
  const {
821
823
  className: r,
822
824
  autoFocus: i,
@@ -826,7 +828,7 @@ const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
826
828
  onChange: E,
827
829
  onComplete: I,
828
830
  locale: z = Xe
829
- } = n, [b, g] = Ve(
831
+ } = o, [b, g] = Ve(
830
832
  d.split("").slice(0, s)
831
833
  ), p = Pe([]);
832
834
  he(() => {
@@ -844,10 +846,10 @@ const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
844
846
  const t = l.target.value;
845
847
  if (t && !Q.test(t))
846
848
  return;
847
- const o = t.slice(-1), u = [...b];
848
- u[a] = o, g(u), ee(p.current[a]);
849
+ const n = t.slice(-1), u = [...b];
850
+ u[a] = n, g(u), ee(p.current[a]);
849
851
  const c = u.join("");
850
- E?.(c), o && a < s - 1 && queueMicrotask(() => p.current[a + 1]?.focus()), c.length === s && !o.includes("") && I?.(c);
852
+ E?.(c), n && a < s - 1 && queueMicrotask(() => p.current[a + 1]?.focus()), c.length === s && !n.includes("") && I?.(c);
851
853
  }, O = (l, a) => {
852
854
  if (l.key === qe) {
853
855
  if (!b[a] && a > 0) {
@@ -869,14 +871,14 @@ const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
869
871
  return;
870
872
  }
871
873
  if (l.key === $e) {
872
- const t = b.findIndex((o) => !o);
874
+ const t = b.findIndex((n) => !n);
873
875
  queueMicrotask(t !== -1 ? () => p.current[t]?.focus() : () => p.current[a - 1]?.focus()), l.preventDefault();
874
876
  }
875
877
  if (Q.test(l.key)) {
876
878
  l.preventDefault();
877
- const t = l.key, o = [...b];
878
- o[a] = t, g(o), ee(p.current[a]);
879
- const u = o.join("");
879
+ const t = l.key, n = [...b];
880
+ n[a] = t, g(n), ee(p.current[a]);
881
+ const u = n.join("");
880
882
  E?.(u), a < s - 1 && queueMicrotask(() => p.current[a + 1]?.focus()), u.length === s && !t.includes("") && I?.(u);
881
883
  return;
882
884
  }
@@ -886,26 +888,26 @@ const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
886
888
  const t = l.clipboardData.getData("text").trim().replace(Ke, "").slice(0, s);
887
889
  if (!t)
888
890
  return;
889
- const o = [...b];
891
+ const n = [...b];
890
892
  t.split("").forEach((C, T) => {
891
- T < s && (o[T] = C, ee(p.current[T]));
893
+ T < s && (n[T] = C, ee(p.current[T]));
892
894
  });
893
895
  for (let C = t.length; C < s; C++)
894
- o[C] = "";
895
- g(o);
896
- const u = o.join("");
896
+ n[C] = "";
897
+ g(n);
898
+ const u = n.join("");
897
899
  E?.(u);
898
- const c = o.findIndex(
900
+ const c = n.findIndex(
899
901
  (C, T) => T >= t.length && !C
900
902
  );
901
- queueMicrotask(c !== -1 ? () => p.current[c]?.focus() : () => p.current[Math.min(t.length, s - 1)]?.focus()), u.length === s && !o.includes("") && I?.(u);
903
+ queueMicrotask(c !== -1 ? () => p.current[c]?.focus() : () => p.current[Math.min(t.length, s - 1)]?.focus()), u.length === s && !n.includes("") && I?.(u);
902
904
  }, N = (l) => {
903
905
  y || p.current[l]?.select();
904
- }, k = (l) => {
906
+ }, x = (l) => {
905
907
  y || p.current[l]?.select();
906
908
  };
907
909
  return /* @__PURE__ */ D("div", { className: We(Re.codeInput, r), children: Array.from({ length: s }, (l, a) => /* @__PURE__ */ D(
908
- ke,
910
+ xe,
909
911
  {
910
912
  className: Re.codeInputItem,
911
913
  inputRef: (t) => {
@@ -919,7 +921,7 @@ const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
919
921
  inputMode: "numeric",
920
922
  value: b[a] || "",
921
923
  disabled: y,
922
- onSelect: () => k(a),
924
+ onSelect: () => x(a),
923
925
  onFocus: () => N(a),
924
926
  onChange: (t) => w(t, a),
925
927
  onKeyDown: (t) => O(t, a),
@@ -930,5 +932,5 @@ const wt = "_codeInput_4y25h_1", Ct = "_codeInputItem_4y25h_5", Re = {
930
932
  )) });
931
933
  };
932
934
  export {
933
- Ft as CodeInput
935
+ Bt as CodeInput
934
936
  };
@@ -1,19 +1,20 @@
1
1
  import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
2
  import { c as p } from "../../../../index-YnD2EP-S.js";
3
- import { localizedText as m } from "../../locale.js";
4
- import { EN_LOCALE as u } from "../../../../constants.js";
5
- import { D as x } from "../../../../Dialog-Cf0d7zi7.js";
6
- import { D as T, a as C, b as D } from "../../../../DialogTitle-BtvmXSZP.js";
7
- import * as y from "react";
8
- import { g as h, a as E, c as N, P as o } from "../../../../createTheme-D8R2Cz2N.js";
9
- import { u as _, c as b, s as P, r as j } from "../../../../chainPropTypes-DiJb1lGa.js";
10
- import { T as v } from "../../../../Typography-Bjd6ZHeX.js";
11
- import { B as w } from "../../../../Button-BN3fv8kr.js";
12
- import '../../../../assets/error-upload-dialog.css';function O(t) {
13
- return h("MuiDialogContentText", t);
3
+ import { localizedText as d } from "../../locale.js";
4
+ import { EN_LOCALE as T, DARK_THEME as u } from "../../../../constants.js";
5
+ import '../../../../assets/inter.css';import '../../../../assets/error-upload-dialog.css';/* empty css */
6
+ import { D as x } from "../../../../Dialog-BK9lMUKV.js";
7
+ import { D as C, a as D, b as y } from "../../../../DialogTitle-ByUfLB5M.js";
8
+ import * as h from "react";
9
+ import { g as E, a as _, c as N, P as o } from "../../../../createTheme-BoOmbNvy.js";
10
+ import { u as w, c as b, s as P, r as j } from "../../../../chainPropTypes-DgqFdXGi.js";
11
+ import { T as k } from "../../../../Typography-BMyz0ZCh.js";
12
+ import { B as M } from "../../../../Button-DTV8ztWw.js";
13
+ function O(t) {
14
+ return E("MuiDialogContentText", t);
14
15
  }
15
- E("MuiDialogContentText", ["root"]);
16
- const U = (t) => {
16
+ _("MuiDialogContentText", ["root"]);
17
+ const R = (t) => {
17
18
  const {
18
19
  classes: r
19
20
  } = t, s = b({
@@ -24,28 +25,28 @@ const U = (t) => {
24
25
  // forward classes to the Typography
25
26
  ...s
26
27
  };
27
- }, M = P(v, {
28
+ }, U = P(k, {
28
29
  shouldForwardProp: (t) => j(t) || t === "classes",
29
30
  name: "MuiDialogContentText",
30
31
  slot: "Root"
31
- })({}), g = /* @__PURE__ */ y.forwardRef(function(r, a) {
32
- const s = _({
32
+ })({}), g = /* @__PURE__ */ h.forwardRef(function(r, a) {
33
+ const s = w({
33
34
  props: r,
34
35
  name: "MuiDialogContentText"
35
36
  }), {
36
- children: n,
37
- className: l,
38
- ...i
39
- } = s, c = U(i);
40
- return /* @__PURE__ */ e(M, {
37
+ children: c,
38
+ className: n,
39
+ ...l
40
+ } = s, m = R(l);
41
+ return /* @__PURE__ */ e(U, {
41
42
  component: "p",
42
43
  variant: "body1",
43
44
  color: "textSecondary",
44
45
  ref: a,
45
- ownerState: i,
46
- className: N(c.root, l),
46
+ ownerState: l,
47
+ className: N(m.root, n),
47
48
  ...s,
48
- classes: c
49
+ classes: m
49
50
  });
50
51
  });
51
52
  process.env.NODE_ENV !== "production" && (g.propTypes = {
@@ -70,31 +71,33 @@ process.env.NODE_ENV !== "production" && (g.propTypes = {
70
71
  */
71
72
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
72
73
  });
73
- const R = "_dialog_lyvu5_1", S = "_dialogErrorText_lyvu5_1", d = {
74
- dialog: R,
75
- dialogErrorText: S
76
- }, I = (t) => {
74
+ const S = "_dialog_gmwe9_1", v = "_dark_gmwe9_4", A = "_dialogErrorText_gmwe9_8", i = {
75
+ dialog: S,
76
+ dark: v,
77
+ dialogErrorText: A
78
+ }, Q = (t) => {
77
79
  const {
78
80
  photoError: r,
79
81
  onCloseErrorDialog: a,
80
- locale: s = u,
82
+ locale: s = T,
83
+ theme: c = u,
81
84
  className: n,
82
85
  ...l
83
86
  } = t;
84
87
  return /* @__PURE__ */ f(
85
88
  x,
86
89
  {
87
- className: p(d.dialog, n),
90
+ className: p(i.dialog, n, i[c]),
88
91
  onClose: a,
89
92
  ...l,
90
93
  children: [
91
- /* @__PURE__ */ e(T, { children: m[s].error }),
92
- /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(g, { className: p(d.dialogErrorText), children: r }) }),
93
- /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(w, { onClick: a, children: m[s].back }) })
94
+ /* @__PURE__ */ e(C, { children: d[s].error }),
95
+ /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(g, { className: p(i.dialogErrorText), children: r }) }),
96
+ /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(M, { onClick: a, children: d[s].back }) })
94
97
  ]
95
98
  }
96
99
  );
97
100
  };
98
101
  export {
99
- I as ErrorUploadDialog
102
+ Q as ErrorUploadDialog
100
103
  };
@@ -1,9 +1,10 @@
1
1
  import { DialogProps } from '@mui/material';
2
- import { Locale } from '../../../../types';
2
+ import { Locale, Theme } from '../../../../types';
3
3
  type ErrorUploadDialogCustomProps = {
4
4
  onCloseErrorDialog?: () => void;
5
5
  photoError?: string;
6
6
  locale?: Locale;
7
+ theme?: Theme;
7
8
  };
8
9
  export type ErrorUploadDialogProps = ErrorUploadDialogCustomProps & DialogProps;
9
10
  export {};
@@ -1 +1,5 @@
1
- export declare const MAX_ITEMS_COUNT = 7;
1
+ export declare const DESKTOP_ITEM_SIZE = 80;
2
+ export declare const DESKTOP_MIN_GAP = 12;
3
+ export declare const MOBILE_ITEM_SIZE = 70;
4
+ export declare const MOBILE_MIN_GAP = 8;
5
+ export declare const FALLBACK_MAX_ITEMS = 7;
@@ -1,4 +1,8 @@
1
- const o = 7;
1
+ const _ = 80, E = 12, I = 70, M = 8, o = 7;
2
2
  export {
3
- o as MAX_ITEMS_COUNT
3
+ _ as DESKTOP_ITEM_SIZE,
4
+ E as DESKTOP_MIN_GAP,
5
+ o as FALLBACK_MAX_ITEMS,
6
+ I as MOBILE_ITEM_SIZE,
7
+ M as MOBILE_MIN_GAP
4
8
  };