@hai-dev/ui-kit 1.1.12 → 1.2.1
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.
- package/dist/{Box-TrgOqpYk.js → Box-BgNAyP2L.js} +2 -2
- package/dist/{Button-BN3fv8kr.js → Button-DTV8ztWw.js} +5 -5
- package/dist/{ButtonBase-CSWuFxUv.js → ButtonBase-C4krg_zd.js} +3 -3
- package/dist/{CircularProgress-sPARyPfh.js → CircularProgress-BoaEg4rF.js} +3 -3
- package/dist/{Dialog-Cf0d7zi7.js → Dialog-BK9lMUKV.js} +12 -11
- package/dist/{DialogTitle-BtvmXSZP.js → DialogTitle-ByUfLB5M.js} +4 -4
- package/dist/{Typography-Bjd6ZHeX.js → Typography-BMyz0ZCh.js} +4 -4
- package/dist/assets/button.css +1 -1
- package/dist/assets/circular-progress-loader.css +1 -1
- package/dist/assets/code-input.css +1 -1
- package/dist/assets/error-upload-dialog.css +1 -1
- package/dist/assets/inter.css +1 -0
- package/dist/assets/photo-list.css +1 -1
- package/dist/assets/upload-dialog-errors.css +1 -1
- package/dist/button.module-C0UNQnBk.js +40 -0
- package/dist/chainPropTypes-DgqFdXGi.js +532 -0
- package/dist/components/button/button-content.js +11 -11
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +42 -35
- package/dist/components/button/constants.d.ts +17 -0
- package/dist/components/button/constants.js +28 -11
- package/dist/components/button/types.d.ts +11 -8
- package/dist/components/button/utils/get-button-classnames.d.ts +6 -0
- package/dist/components/button/utils/get-button-classnames.js +22 -10
- package/dist/components/circular-progress-loader/circular-progress-loader.js +14 -13
- package/dist/components/code-input/code-input.js +114 -112
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +39 -38
- package/dist/components/photo-crop-uploader/components/photo-list/constants.d.ts +5 -1
- package/dist/components/photo-crop-uploader/components/photo-list/constants.js +6 -2
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +136 -33
- package/dist/components/photo-crop-uploader/components/photo-list/types.d.ts +2 -0
- package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.d.ts +4 -0
- package/dist/components/photo-crop-uploader/components/photo-list/use-container-size.js +22 -0
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/constants.d.ts +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/constants.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +4 -3
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +156 -145
- package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.d.ts +4 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/use-scaled-min-dimension.js +31 -0
- package/dist/components/photo-crop-uploader/locale.js +6 -2
- package/dist/{createTheme-D8R2Cz2N.js → createTheme-BoOmbNvy.js} +426 -390
- package/dist/{extendSxProp-Cw_ym9sl.js → extendSxProp-BaUCVMKV.js} +2 -1
- package/dist/{index-CL3JU48X.js → index-h5oTv8GF.js} +3 -3
- package/dist/{memoTheme-D5VCpQCz.js → memoTheme-BYBJ2Fe6.js} +1 -1
- package/dist/refType-CsohaiiT.js +60 -0
- package/dist/{upload-dialog-errors-DHl0bh1n.js → upload-dialog-errors-BwQsTOc3.js} +46 -46
- package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
- package/dist/utils/debounce.d.ts +5 -0
- package/dist/utils/debounce.js +12 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +4 -0
- package/package.json +10 -2
- package/dist/button.module-BZPPmSAS.js +0 -21
- package/dist/chainPropTypes-DiJb1lGa.js +0 -568
- 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
|
|
8
|
-
import { g as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { u as
|
|
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
|
-
|
|
17
|
+
function st(o, r = 166) {
|
|
16
18
|
let i;
|
|
17
19
|
function d(...s) {
|
|
18
20
|
const y = () => {
|
|
19
|
-
|
|
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(
|
|
28
|
-
return parseInt(
|
|
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(
|
|
46
|
-
for (const r in
|
|
47
|
+
function ut(o) {
|
|
48
|
+
for (const r in o)
|
|
47
49
|
return !1;
|
|
48
50
|
return !0;
|
|
49
51
|
}
|
|
50
|
-
function we(
|
|
51
|
-
return ut(
|
|
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,
|
|
65
|
-
if (!t || !
|
|
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
|
-
|
|
74
|
-
` && (
|
|
75
|
-
const C = c.boxSizing, T = P(c.paddingBottom) + P(c.paddingTop), W = P(c.borderBottomWidth) + P(c.borderTopWidth), A =
|
|
76
|
-
|
|
77
|
-
const M =
|
|
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 =
|
|
86
|
-
const t = g.current,
|
|
87
|
-
if (!t || !
|
|
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 =
|
|
91
|
+
const u = n.outerHeightStyle;
|
|
90
92
|
return w.current != null && w.current !== u;
|
|
91
|
-
}),
|
|
92
|
-
const t = g.current,
|
|
93
|
-
if (!t || !
|
|
93
|
+
}), x = h.useCallback(() => {
|
|
94
|
+
const t = g.current, n = S();
|
|
95
|
+
if (!t || !n || we(n))
|
|
94
96
|
return;
|
|
95
|
-
const u =
|
|
96
|
-
w.current !== u && (w.current = u, t.style.height = `${u}px`), t.style.overflow =
|
|
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
|
-
|
|
99
|
-
const t = st(
|
|
100
|
-
if (!
|
|
100
|
+
ne(() => {
|
|
101
|
+
const t = st(x), n = g?.current;
|
|
102
|
+
if (!n)
|
|
101
103
|
return;
|
|
102
|
-
const u = ge(
|
|
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(
|
|
107
|
-
c.observe(
|
|
108
|
+
N() && (c.unobserve(n), cancelAnimationFrame(l.current), x(), l.current = requestAnimationFrame(() => {
|
|
109
|
+
c.observe(n);
|
|
108
110
|
}));
|
|
109
|
-
}), c.observe(
|
|
111
|
+
}), c.observe(n)), () => {
|
|
110
112
|
t.clear(), cancelAnimationFrame(l.current), u.removeEventListener("resize", t), c && c.disconnect();
|
|
111
113
|
};
|
|
112
|
-
}, [S,
|
|
113
|
-
|
|
114
|
+
}, [S, x, N]), ne(() => {
|
|
115
|
+
x();
|
|
114
116
|
});
|
|
115
117
|
const a = (t) => {
|
|
116
|
-
b ||
|
|
117
|
-
const
|
|
118
|
-
`), C =
|
|
119
|
-
c && C &&
|
|
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:
|
|
182
|
+
props: o,
|
|
181
183
|
states: r,
|
|
182
184
|
muiFormControl: i
|
|
183
185
|
}) {
|
|
184
|
-
return r.reduce((d, s) => (d[s] =
|
|
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(
|
|
192
|
-
return
|
|
193
|
+
function Ce(o) {
|
|
194
|
+
return o != null && !(Array.isArray(o) && o.length === 0);
|
|
193
195
|
}
|
|
194
|
-
function pt(
|
|
195
|
-
return
|
|
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(
|
|
198
|
-
return Ze("MuiInputBase",
|
|
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 = (
|
|
204
|
+
const mt = (o, r) => {
|
|
203
205
|
const {
|
|
204
206
|
ownerState: i
|
|
205
|
-
} =
|
|
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${
|
|
207
|
-
}, ht = (
|
|
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
|
-
} =
|
|
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 = (
|
|
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
|
-
} =
|
|
229
|
-
root: ["root", `color${
|
|
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
|
|
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:
|
|
240
|
+
theme: o
|
|
239
241
|
}) => ({
|
|
240
|
-
...
|
|
241
|
-
color: (
|
|
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: (
|
|
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:
|
|
284
|
+
theme: o
|
|
283
285
|
}) => {
|
|
284
|
-
const r =
|
|
286
|
+
const r = o.palette.mode === "light", i = {
|
|
285
287
|
color: "currentColor",
|
|
286
|
-
...
|
|
287
|
-
opacity:
|
|
288
|
+
...o.vars ? {
|
|
289
|
+
opacity: o.vars.opacity.inputPlaceholder
|
|
288
290
|
} : {
|
|
289
291
|
opacity: r ? 0.42 : 0.5
|
|
290
292
|
},
|
|
291
|
-
transition:
|
|
292
|
-
duration:
|
|
293
|
+
transition: o.transitions.create("opacity", {
|
|
294
|
+
duration: o.transitions.duration.shorter
|
|
293
295
|
})
|
|
294
296
|
}, d = {
|
|
295
297
|
opacity: "0 !important"
|
|
296
|
-
}, s =
|
|
297
|
-
opacity:
|
|
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: (
|
|
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
|
-
}),
|
|
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:
|
|
422
|
+
fullWidth: x = !1,
|
|
421
423
|
id: l,
|
|
422
424
|
inputComponent: a = "input",
|
|
423
425
|
inputProps: t = {},
|
|
424
|
-
inputRef:
|
|
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:
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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."),
|
|
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
|
-
...
|
|
500
|
-
}) :
|
|
501
|
+
...k
|
|
502
|
+
}) : k = {
|
|
501
503
|
type: void 0,
|
|
502
504
|
maxRows: c,
|
|
503
505
|
minRows: C,
|
|
504
|
-
...
|
|
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:
|
|
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
|
|
530
|
-
...
|
|
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:
|
|
567
|
+
onKeyUp: ke,
|
|
566
568
|
type: ue,
|
|
567
|
-
...
|
|
569
|
+
...k,
|
|
568
570
|
...!be(pe) && {
|
|
569
571
|
as: X,
|
|
570
572
|
ownerState: {
|
|
571
573
|
...Z,
|
|
572
|
-
...
|
|
574
|
+
...k.ownerState
|
|
573
575
|
}
|
|
574
576
|
},
|
|
575
577
|
ref: Me,
|
|
576
|
-
className: ye(ce.input,
|
|
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" && (
|
|
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 = "
|
|
818
|
+
const wt = "_codeInput_5jwux_1", Ct = "_codeInputItem_5jwux_5", Re = {
|
|
817
819
|
codeInput: wt,
|
|
818
820
|
codeInputItem: Ct
|
|
819
|
-
},
|
|
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
|
-
} =
|
|
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
|
|
848
|
-
u[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),
|
|
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((
|
|
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,
|
|
878
|
-
|
|
879
|
-
const u =
|
|
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
|
|
891
|
+
const n = [...b];
|
|
890
892
|
t.split("").forEach((C, T) => {
|
|
891
|
-
T < s && (
|
|
893
|
+
T < s && (n[T] = C, ee(p.current[T]));
|
|
892
894
|
});
|
|
893
895
|
for (let C = t.length; C < s; C++)
|
|
894
|
-
|
|
895
|
-
g(
|
|
896
|
-
const u =
|
|
896
|
+
n[C] = "";
|
|
897
|
+
g(n);
|
|
898
|
+
const u = n.join("");
|
|
897
899
|
E?.(u);
|
|
898
|
-
const c =
|
|
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 && !
|
|
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
|
-
},
|
|
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
|
-
|
|
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: () =>
|
|
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
|
-
|
|
935
|
+
Bt as CodeInput
|
|
934
936
|
};
|
package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { localizedText as
|
|
4
|
-
import { EN_LOCALE as
|
|
5
|
-
import
|
|
6
|
-
import { D as
|
|
1
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../../../index-YnD2EP-S.js";
|
|
3
|
+
import { localizedText as d } from "../../locale.js";
|
|
4
|
+
import { EN_LOCALE as f, DARK_THEME as T } from "../../../../constants.js";
|
|
5
|
+
import '../../../../assets/inter.css';import '../../../../assets/error-upload-dialog.css';/* empty css */
|
|
6
|
+
import { D as u } from "../../../../Dialog-BK9lMUKV.js";
|
|
7
|
+
import { D as C, a as D, b as y } from "../../../../DialogTitle-ByUfLB5M.js";
|
|
7
8
|
import * as h from "react";
|
|
8
|
-
import { g as E, a as _, c as
|
|
9
|
-
import { u as
|
|
10
|
-
import { T as
|
|
11
|
-
import { B as
|
|
12
|
-
|
|
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 v, r as P } from "../../../../chainPropTypes-DgqFdXGi.js";
|
|
11
|
+
import { T as j } from "../../../../Typography-BMyz0ZCh.js";
|
|
12
|
+
import { B as k } from "../../../../Button-DTV8ztWw.js";
|
|
13
|
+
function M(t) {
|
|
13
14
|
return E("MuiDialogContentText", t);
|
|
14
15
|
}
|
|
15
16
|
_("MuiDialogContentText", ["root"]);
|
|
16
|
-
const
|
|
17
|
+
const O = (t) => {
|
|
17
18
|
const {
|
|
18
19
|
classes: r
|
|
19
20
|
} = t, s = b({
|
|
20
21
|
root: ["root"]
|
|
21
|
-
},
|
|
22
|
+
}, M, r);
|
|
22
23
|
return {
|
|
23
24
|
...r,
|
|
24
25
|
// forward classes to the Typography
|
|
25
26
|
...s
|
|
26
27
|
};
|
|
27
|
-
},
|
|
28
|
-
shouldForwardProp: (t) =>
|
|
28
|
+
}, R = v(j, {
|
|
29
|
+
shouldForwardProp: (t) => P(t) || t === "classes",
|
|
29
30
|
name: "MuiDialogContentText",
|
|
30
31
|
slot: "Root"
|
|
31
32
|
})({}), g = /* @__PURE__ */ h.forwardRef(function(r, a) {
|
|
32
|
-
const s =
|
|
33
|
+
const s = w({
|
|
33
34
|
props: r,
|
|
34
35
|
name: "MuiDialogContentText"
|
|
35
36
|
}), {
|
|
36
37
|
children: c,
|
|
37
|
-
className:
|
|
38
|
-
...
|
|
39
|
-
} = s, p =
|
|
40
|
-
return /* @__PURE__ */ e(
|
|
38
|
+
className: l,
|
|
39
|
+
...n
|
|
40
|
+
} = s, p = O(n);
|
|
41
|
+
return /* @__PURE__ */ e(R, {
|
|
41
42
|
component: "p",
|
|
42
43
|
variant: "body1",
|
|
43
44
|
color: "textSecondary",
|
|
44
45
|
ref: a,
|
|
45
|
-
ownerState:
|
|
46
|
-
className:
|
|
46
|
+
ownerState: n,
|
|
47
|
+
className: N(p.root, l),
|
|
47
48
|
...s,
|
|
48
49
|
classes: p
|
|
49
50
|
});
|
|
@@ -70,33 +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
|
|
74
|
-
dialog:
|
|
75
|
-
dark:
|
|
74
|
+
const U = "_dialog_1xvwn_1", S = "_dark_1xvwn_5", A = "_dialogErrorText_1xvwn_9", i = {
|
|
75
|
+
dialog: U,
|
|
76
|
+
dark: S,
|
|
76
77
|
dialogErrorText: A
|
|
77
|
-
},
|
|
78
|
+
}, Q = (t) => {
|
|
78
79
|
const {
|
|
79
80
|
photoError: r,
|
|
80
81
|
onCloseErrorDialog: a,
|
|
81
|
-
locale: s =
|
|
82
|
-
theme: c =
|
|
83
|
-
className:
|
|
84
|
-
...
|
|
82
|
+
locale: s = f,
|
|
83
|
+
theme: c = T,
|
|
84
|
+
className: l,
|
|
85
|
+
...n
|
|
85
86
|
} = t;
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
-
|
|
87
|
+
return /* @__PURE__ */ x(
|
|
88
|
+
u,
|
|
88
89
|
{
|
|
89
|
-
className:
|
|
90
|
+
className: m(i.dialog, l, i[c]),
|
|
90
91
|
onClose: a,
|
|
91
|
-
...
|
|
92
|
+
...n,
|
|
92
93
|
children: [
|
|
93
|
-
/* @__PURE__ */ e(C, { children:
|
|
94
|
-
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(g, { className:
|
|
95
|
-
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
|
|
94
|
+
/* @__PURE__ */ e(C, { children: d[s].error }),
|
|
95
|
+
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(g, { className: m(i.dialogErrorText), children: r }) }),
|
|
96
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { onClick: a, children: d[s].back }) })
|
|
96
97
|
]
|
|
97
98
|
}
|
|
98
99
|
);
|
|
99
100
|
};
|
|
100
101
|
export {
|
|
101
|
-
|
|
102
|
+
Q as ErrorUploadDialog
|
|
102
103
|
};
|