@hai-dev/ui-kit 1.0.6 → 1.0.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.
- package/dist/{Box-CiYPzbPd.js → Box-D8oKffw9.js} +18 -17
- package/dist/{Button-chJUX25I.js → Button-BBF8hp7e.js} +16 -15
- package/dist/{ButtonBase-DZwhOh56.js → ButtonBase-T2KH9jsD.js} +2 -2
- package/dist/{CircularProgress-BCrSQadM.js → CircularProgress-BQQkuSse.js} +110 -136
- package/dist/{DialogTitle-BUcXvkzd.js → Dialog-B97c7WYP.js} +765 -1010
- package/dist/DialogTitle-Du4tqTs0.js +254 -0
- package/dist/{Typography-BmYEfS8y.js → Typography-r_TXEM1e.js} +4 -4
- package/dist/assets/upload-dialog-errors.css +1 -0
- package/dist/assets/upload-dialog.css +1 -1
- package/dist/{chainPropTypes-HYSaT0L0.js → chainPropTypes-KIxDwPzf.js} +15 -15
- package/dist/components/button/button.js +1 -1
- package/dist/components/circular-progress-loader/circular-progress-loader.js +3 -3
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +26 -25
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +17 -17
- package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +12 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.d.ts +3 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +10 -0
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +152 -129
- package/dist/components/photo-crop-uploader/constants.d.ts +3 -0
- package/dist/components/photo-crop-uploader/constants.js +35 -32
- package/dist/components/photo-crop-uploader/locale.js +8 -2
- package/dist/components/photo-crop-uploader/photo-crop-uploader.js +169 -145
- package/dist/components/photo-crop-uploader/types.d.ts +4 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +30 -0
- package/dist/{createTheme-BfVKUMHQ.js → createTheme-RvzX1VSA.js} +9 -9
- package/dist/extendSxProp-BW9e6LtL.js +36 -0
- package/dist/upload-dialog-errors-ku54UrUb.js +365 -0
- package/dist/useTheme-CsjkCBFJ.js +16 -0
- package/package.json +1 -1
- package/dist/extendSxProp-bpz0eCso.js +0 -49
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../../../index-B2JRaoNz.js";
|
|
3
|
+
import "../../locale.js";
|
|
4
|
+
import "../../../../constants.js";
|
|
5
|
+
import { U as s } from "../../../../upload-dialog-errors-ku54UrUb.js";
|
|
6
|
+
import "../../../../DialogTitle-Du4tqTs0.js";
|
|
7
|
+
import "../../../button/button.js";
|
|
8
|
+
export {
|
|
9
|
+
s as UploadDialogErrors
|
|
10
|
+
};
|
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as L, jsx as a, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import * as P from "react";
|
|
3
|
+
import { S as $ } from "../../../../index-BiffjjQq.js";
|
|
4
|
+
import { c as i } from "../../../../index-B2JRaoNz.js";
|
|
5
|
+
import { s as n, U as V } from "../../../../upload-dialog-errors-ku54UrUb.js";
|
|
6
|
+
import { PhotoList as H } from "../photo-list/photo-list.js";
|
|
5
7
|
import { localizedText as p } from "../../locale.js";
|
|
6
|
-
import { EN_LOCALE as
|
|
7
|
-
import { CLOSE_ICON_SIZE as
|
|
8
|
-
import { DEFAULT_MIN_DIMENSION as
|
|
9
|
-
import { D as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
8
|
+
import { EN_LOCALE as Z } from "../../../../constants.js";
|
|
9
|
+
import { CLOSE_ICON_SIZE as w } from "./constants.js";
|
|
10
|
+
import { DEFAULT_MIN_DIMENSION as Y, DEFAULT_ASPECT_RATIO as q } from "../../constants.js";
|
|
11
|
+
import { D as T } from "../../../../Dialog-B97c7WYP.js";
|
|
12
|
+
import { a as D, b as O, D as G } from "../../../../DialogTitle-Du4tqTs0.js";
|
|
13
|
+
import { CircularProgressLoader as J } from "../../../circular-progress-loader/circular-progress-loader.js";
|
|
14
|
+
import { a as K, g as Q, c as X, b as m, P as t } from "../../../../createTheme-RvzX1VSA.js";
|
|
15
|
+
import { m as A, c as M } from "../../../../createSimplePaletteValueFilter-nb0wSOzC.js";
|
|
16
|
+
import { u as oo, s as W, c as eo, b as to } from "../../../../chainPropTypes-KIxDwPzf.js";
|
|
17
|
+
import { u as ao } from "../../../../useId-CK6Kn3Tn.js";
|
|
18
|
+
import { B as ro } from "../../../../ButtonBase-T2KH9jsD.js";
|
|
19
|
+
import { C as no } from "../../../../CircularProgress-BQQkuSse.js";
|
|
20
|
+
import { Button as E } from "../../../button/button.js";
|
|
21
|
+
import '../../../../assets/upload-dialog.css';function io(o) {
|
|
22
|
+
return Q("MuiIconButton", o);
|
|
19
23
|
}
|
|
20
|
-
const
|
|
24
|
+
const U = K("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]), so = (o) => {
|
|
21
25
|
const {
|
|
22
26
|
classes: e,
|
|
23
|
-
disabled:
|
|
27
|
+
disabled: r,
|
|
24
28
|
color: c,
|
|
25
29
|
edge: g,
|
|
26
|
-
size:
|
|
27
|
-
loading:
|
|
30
|
+
size: f,
|
|
31
|
+
loading: b
|
|
28
32
|
} = o, u = {
|
|
29
|
-
root: ["root",
|
|
33
|
+
root: ["root", b && "loading", r && "disabled", c !== "default" && `color${m(c)}`, g && `edge${m(g)}`, `size${m(f)}`],
|
|
30
34
|
loadingIndicator: ["loadingIndicator"],
|
|
31
35
|
loadingWrapper: ["loadingWrapper"]
|
|
32
36
|
};
|
|
33
|
-
return
|
|
34
|
-
},
|
|
37
|
+
return eo(u, io, e);
|
|
38
|
+
}, lo = W(ro, {
|
|
35
39
|
name: "MuiIconButton",
|
|
36
40
|
slot: "Root",
|
|
37
41
|
overridesResolver: (o, e) => {
|
|
38
42
|
const {
|
|
39
|
-
ownerState:
|
|
43
|
+
ownerState: r
|
|
40
44
|
} = o;
|
|
41
|
-
return [e.root,
|
|
45
|
+
return [e.root, r.loading && e.loading, r.color !== "default" && e[`color${m(r.color)}`], r.edge && e[`edge${m(r.edge)}`], e[`size${m(r.size)}`]];
|
|
42
46
|
}
|
|
43
47
|
})(A(({
|
|
44
48
|
theme: o
|
|
@@ -105,14 +109,14 @@ const k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
105
109
|
style: {
|
|
106
110
|
color: "inherit"
|
|
107
111
|
}
|
|
108
|
-
}, ...Object.entries(o.palette).filter(
|
|
112
|
+
}, ...Object.entries(o.palette).filter(M()).map(([e]) => ({
|
|
109
113
|
props: {
|
|
110
114
|
color: e
|
|
111
115
|
},
|
|
112
116
|
style: {
|
|
113
117
|
color: (o.vars || o).palette[e].main
|
|
114
118
|
}
|
|
115
|
-
})), ...Object.entries(o.palette).filter(
|
|
119
|
+
})), ...Object.entries(o.palette).filter(M()).map(([e]) => ({
|
|
116
120
|
props: {
|
|
117
121
|
color: e
|
|
118
122
|
},
|
|
@@ -136,14 +140,14 @@ const k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
136
140
|
fontSize: o.typography.pxToRem(28)
|
|
137
141
|
}
|
|
138
142
|
}],
|
|
139
|
-
[`&.${
|
|
143
|
+
[`&.${U.disabled}`]: {
|
|
140
144
|
backgroundColor: "transparent",
|
|
141
145
|
color: (o.vars || o).palette.action.disabled
|
|
142
146
|
},
|
|
143
|
-
[`&.${
|
|
147
|
+
[`&.${U.loading}`]: {
|
|
144
148
|
color: "transparent"
|
|
145
149
|
}
|
|
146
|
-
}))),
|
|
150
|
+
}))), co = W("span", {
|
|
147
151
|
name: "MuiIconButton",
|
|
148
152
|
slot: "LoadingIndicator"
|
|
149
153
|
})(({
|
|
@@ -164,60 +168,60 @@ const k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
164
168
|
display: "flex"
|
|
165
169
|
}
|
|
166
170
|
}]
|
|
167
|
-
})),
|
|
168
|
-
const c =
|
|
171
|
+
})), j = /* @__PURE__ */ P.forwardRef(function(e, r) {
|
|
172
|
+
const c = oo({
|
|
169
173
|
props: e,
|
|
170
174
|
name: "MuiIconButton"
|
|
171
175
|
}), {
|
|
172
176
|
edge: g = !1,
|
|
173
|
-
children:
|
|
174
|
-
className:
|
|
177
|
+
children: f,
|
|
178
|
+
className: b,
|
|
175
179
|
color: u = "default",
|
|
176
|
-
disabled:
|
|
180
|
+
disabled: y = !1,
|
|
177
181
|
disableFocusRipple: I = !1,
|
|
178
|
-
size:
|
|
179
|
-
id:
|
|
180
|
-
loading:
|
|
181
|
-
loadingIndicator:
|
|
182
|
-
...
|
|
183
|
-
} = c,
|
|
184
|
-
"aria-labelledby":
|
|
182
|
+
size: z = "medium",
|
|
183
|
+
id: v,
|
|
184
|
+
loading: l = null,
|
|
185
|
+
loadingIndicator: R,
|
|
186
|
+
...s
|
|
187
|
+
} = c, N = ao(v), B = R ?? /* @__PURE__ */ a(no, {
|
|
188
|
+
"aria-labelledby": N,
|
|
185
189
|
color: "inherit",
|
|
186
190
|
size: 16
|
|
187
|
-
}),
|
|
191
|
+
}), h = {
|
|
188
192
|
...c,
|
|
189
193
|
edge: g,
|
|
190
194
|
color: u,
|
|
191
|
-
disabled:
|
|
195
|
+
disabled: y,
|
|
192
196
|
disableFocusRipple: I,
|
|
193
|
-
loading:
|
|
194
|
-
loadingIndicator:
|
|
195
|
-
size:
|
|
196
|
-
},
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
id:
|
|
199
|
-
className:
|
|
197
|
+
loading: l,
|
|
198
|
+
loadingIndicator: B,
|
|
199
|
+
size: z
|
|
200
|
+
}, d = so(h);
|
|
201
|
+
return /* @__PURE__ */ L(lo, {
|
|
202
|
+
id: l ? N : v,
|
|
203
|
+
className: X(d.root, b),
|
|
200
204
|
centerRipple: !0,
|
|
201
205
|
focusRipple: !I,
|
|
202
|
-
disabled:
|
|
203
|
-
ref:
|
|
204
|
-
...
|
|
205
|
-
ownerState:
|
|
206
|
-
children: [typeof
|
|
206
|
+
disabled: y || l,
|
|
207
|
+
ref: r,
|
|
208
|
+
...s,
|
|
209
|
+
ownerState: h,
|
|
210
|
+
children: [typeof l == "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
207
211
|
/* @__PURE__ */ a("span", {
|
|
208
|
-
className:
|
|
212
|
+
className: d.loadingWrapper,
|
|
209
213
|
style: {
|
|
210
214
|
display: "contents"
|
|
211
215
|
},
|
|
212
|
-
children: /* @__PURE__ */ a(
|
|
213
|
-
className:
|
|
214
|
-
ownerState:
|
|
215
|
-
children:
|
|
216
|
+
children: /* @__PURE__ */ a(co, {
|
|
217
|
+
className: d.loadingIndicator,
|
|
218
|
+
ownerState: h,
|
|
219
|
+
children: l && B
|
|
216
220
|
})
|
|
217
|
-
}),
|
|
221
|
+
}), f]
|
|
218
222
|
});
|
|
219
223
|
});
|
|
220
|
-
process.env.NODE_ENV !== "production" && (
|
|
224
|
+
process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
221
225
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
222
226
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
223
227
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -225,7 +229,7 @@ process.env.NODE_ENV !== "production" && (P.propTypes = {
|
|
|
225
229
|
/**
|
|
226
230
|
* The icon to display.
|
|
227
231
|
*/
|
|
228
|
-
children:
|
|
232
|
+
children: to(t.node, (o) => P.Children.toArray(o.children).some((r) => /* @__PURE__ */ P.isValidElement(r) && r.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
229
233
|
`)) : null),
|
|
230
234
|
/**
|
|
231
235
|
* Override or extend the styles applied to the component.
|
|
@@ -296,127 +300,146 @@ process.env.NODE_ENV !== "production" && (P.propTypes = {
|
|
|
296
300
|
*/
|
|
297
301
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
298
302
|
});
|
|
299
|
-
const
|
|
300
|
-
dialog: io,
|
|
301
|
-
topActions: ro,
|
|
302
|
-
close: so,
|
|
303
|
-
botActions: lo,
|
|
304
|
-
button: co,
|
|
305
|
-
title: po,
|
|
306
|
-
content: go,
|
|
307
|
-
many: uo,
|
|
308
|
-
crop: mo,
|
|
309
|
-
dialogText: bo
|
|
310
|
-
}, Ao = (o) => {
|
|
303
|
+
const po = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.3434%2015.4595C16.8227%2014.9388%2015.9785%2014.9388%2015.4578%2015.4595C14.9371%2015.9802%2014.9371%2016.8244%2015.4578%2017.3451L21.1146%2023.002L15.4578%2028.6588C14.9371%2029.1795%2014.9371%2030.0237%2015.4578%2030.5444C15.9785%2031.0651%2016.8227%2031.0651%2017.3434%2030.5444L23.0002%2024.8876L28.6571%2030.5444C29.1778%2031.0651%2030.022%2031.0651%2030.5427%2030.5444C31.0634%2030.0237%2031.0634%2029.1795%2030.5427%2028.6588L24.8858%2023.002L30.5427%2017.3451C31.0634%2016.8244%2031.0634%2015.9802%2030.5427%2015.4595C30.022%2014.9388%2029.1778%2014.9388%2028.6571%2015.4595L23.0002%2021.1163L17.3434%2015.4595Z'%20fill='%233AA8FF'/%3e%3c/svg%3e", Eo = (o) => {
|
|
311
304
|
const {
|
|
312
305
|
onCloseDialogHandler: e,
|
|
313
|
-
photoSources:
|
|
306
|
+
photoSources: r = [],
|
|
314
307
|
photoCrops: c = [],
|
|
315
308
|
onCropChange: g = () => {
|
|
316
309
|
},
|
|
317
|
-
onPhotoLoad:
|
|
318
|
-
imageRef:
|
|
310
|
+
onPhotoLoad: f,
|
|
311
|
+
imageRef: b,
|
|
319
312
|
photoError: u,
|
|
320
|
-
onPhotoCrop:
|
|
313
|
+
onPhotoCrop: y,
|
|
321
314
|
onNextPhoto: I,
|
|
322
|
-
onSkipCrop:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
315
|
+
onSkipCrop: z,
|
|
316
|
+
onClearErrors: v,
|
|
317
|
+
minDimension: l = Y,
|
|
318
|
+
aspectRatio: R = q,
|
|
319
|
+
locale: s = Z,
|
|
320
|
+
circular: N,
|
|
321
|
+
keepSelection: B = !0,
|
|
322
|
+
photoSourceLoading: h,
|
|
323
|
+
className: d,
|
|
324
|
+
photoIndex: C,
|
|
325
|
+
loadingValue: F,
|
|
326
|
+
errors: k,
|
|
327
|
+
...x
|
|
328
|
+
} = o, S = r.slice(C).length > 1;
|
|
329
|
+
return h ? /* @__PURE__ */ a(
|
|
330
|
+
T,
|
|
334
331
|
{
|
|
335
|
-
className:
|
|
332
|
+
className: i(n.dialog, d),
|
|
336
333
|
onClose: e,
|
|
337
|
-
...
|
|
334
|
+
...x,
|
|
335
|
+
children: /* @__PURE__ */ a(D, { className: i(n.content), children: /* @__PURE__ */ a(J, { value: F }) })
|
|
336
|
+
}
|
|
337
|
+
) : k?.length ? /* @__PURE__ */ a(
|
|
338
|
+
T,
|
|
339
|
+
{
|
|
340
|
+
className: i(n.dialog, d),
|
|
341
|
+
onClose: e,
|
|
342
|
+
...x,
|
|
343
|
+
children: /* @__PURE__ */ a(
|
|
344
|
+
V,
|
|
345
|
+
{
|
|
346
|
+
locale: s,
|
|
347
|
+
photoSources: r,
|
|
348
|
+
errors: k,
|
|
349
|
+
onCloseDialogHandler: e,
|
|
350
|
+
onClearErrors: v
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
}
|
|
354
|
+
) : /* @__PURE__ */ L(
|
|
355
|
+
T,
|
|
356
|
+
{
|
|
357
|
+
className: i(n.dialog, d),
|
|
358
|
+
onClose: e,
|
|
359
|
+
...x,
|
|
338
360
|
children: [
|
|
339
|
-
/* @__PURE__ */ a(
|
|
340
|
-
|
|
361
|
+
/* @__PURE__ */ a(O, { className: i(n.topActions), children: /* @__PURE__ */ a(
|
|
362
|
+
j,
|
|
341
363
|
{
|
|
342
364
|
onClick: e,
|
|
343
|
-
className:
|
|
365
|
+
className: i(n.close),
|
|
344
366
|
"aria-label": p[s].back,
|
|
345
367
|
children: /* @__PURE__ */ a(
|
|
346
368
|
"img",
|
|
347
369
|
{
|
|
348
|
-
width:
|
|
349
|
-
height:
|
|
350
|
-
src:
|
|
370
|
+
width: w,
|
|
371
|
+
height: w,
|
|
372
|
+
src: po,
|
|
351
373
|
alt: p[s].back
|
|
352
374
|
}
|
|
353
375
|
)
|
|
354
376
|
}
|
|
355
377
|
) }),
|
|
356
|
-
/* @__PURE__ */ a(
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
|
|
359
|
-
!!
|
|
360
|
-
|
|
378
|
+
/* @__PURE__ */ a(G, { className: i(n.title), children: p[s]["photo-crop"] }),
|
|
379
|
+
/* @__PURE__ */ L(D, { className: i(n.content, S && n.many), children: [
|
|
380
|
+
S && /* @__PURE__ */ a("span", {}),
|
|
381
|
+
!!r.length && /* @__PURE__ */ a(
|
|
382
|
+
$,
|
|
361
383
|
{
|
|
362
|
-
className:
|
|
363
|
-
crop: c[
|
|
364
|
-
circularCrop:
|
|
365
|
-
keepSelection:
|
|
366
|
-
aspect:
|
|
367
|
-
minWidth:
|
|
368
|
-
minHeight:
|
|
384
|
+
className: i(n.crop),
|
|
385
|
+
crop: c[C],
|
|
386
|
+
circularCrop: N,
|
|
387
|
+
keepSelection: B,
|
|
388
|
+
aspect: R,
|
|
389
|
+
minWidth: l,
|
|
390
|
+
minHeight: l,
|
|
369
391
|
onChange: g,
|
|
370
392
|
children: /* @__PURE__ */ a(
|
|
371
393
|
"img",
|
|
372
394
|
{
|
|
373
|
-
onLoad:
|
|
374
|
-
src:
|
|
375
|
-
ref:
|
|
395
|
+
onLoad: f,
|
|
396
|
+
src: r[C],
|
|
397
|
+
ref: b,
|
|
376
398
|
alt: p[s]["photo-crop"],
|
|
377
399
|
draggable: !1
|
|
378
|
-
}
|
|
400
|
+
},
|
|
401
|
+
C
|
|
379
402
|
)
|
|
380
403
|
}
|
|
381
404
|
),
|
|
382
|
-
|
|
405
|
+
S && /* @__PURE__ */ a(H, { photoSources: r, photoIndex: C })
|
|
383
406
|
] }),
|
|
384
|
-
u && /* @__PURE__ */ a(
|
|
385
|
-
/* @__PURE__ */ a(
|
|
407
|
+
u && /* @__PURE__ */ a(O, { className: i(n.dialogText), children: u }),
|
|
408
|
+
/* @__PURE__ */ a(O, { className: i(n.botActions), children: S ? /* @__PURE__ */ L(_, { children: [
|
|
386
409
|
/* @__PURE__ */ a(
|
|
387
|
-
|
|
410
|
+
E,
|
|
388
411
|
{
|
|
389
412
|
buttonSize: "small",
|
|
390
413
|
buttonColor: "blue",
|
|
391
414
|
buttonVariant: "outlined",
|
|
392
415
|
buttonWeight: 500,
|
|
393
|
-
className:
|
|
394
|
-
onClick:
|
|
416
|
+
className: i(n.button),
|
|
417
|
+
onClick: z,
|
|
395
418
|
children: p[s].skip
|
|
396
419
|
}
|
|
397
420
|
),
|
|
398
421
|
/* @__PURE__ */ a(
|
|
399
|
-
|
|
422
|
+
E,
|
|
400
423
|
{
|
|
401
424
|
buttonSize: "small",
|
|
402
425
|
buttonColor: "blue",
|
|
403
426
|
buttonVariant: "filled",
|
|
404
427
|
buttonWeight: 500,
|
|
405
|
-
className:
|
|
428
|
+
className: i(n.button),
|
|
406
429
|
onClick: I,
|
|
407
430
|
children: p[s].continue
|
|
408
431
|
}
|
|
409
432
|
)
|
|
410
433
|
] }) : /* @__PURE__ */ a(
|
|
411
|
-
|
|
434
|
+
E,
|
|
412
435
|
{
|
|
413
436
|
minWidth: "100%",
|
|
414
437
|
buttonSize: "small",
|
|
415
438
|
buttonColor: "blue",
|
|
416
439
|
buttonVariant: "filled",
|
|
417
440
|
buttonWeight: 500,
|
|
418
|
-
className:
|
|
419
|
-
onClick:
|
|
441
|
+
className: i(n.button),
|
|
442
|
+
onClick: y,
|
|
420
443
|
children: p[s].crop
|
|
421
444
|
}
|
|
422
445
|
) })
|
|
@@ -425,5 +448,5 @@ const ao = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%20
|
|
|
425
448
|
);
|
|
426
449
|
};
|
|
427
450
|
export {
|
|
428
|
-
|
|
451
|
+
Eo as UploadDialog
|
|
429
452
|
};
|
|
@@ -42,3 +42,6 @@ export declare const MB_FRACTION_DIGITS = 1;
|
|
|
42
42
|
export declare const FULL_CROP_SIZE = 100;
|
|
43
43
|
export declare const MAX_ASPECT_RATIO = 2;
|
|
44
44
|
export declare const MIN_ASPECT_RATIO = 0.5;
|
|
45
|
+
export declare const FULL_PROGRESS_VALUE = 100;
|
|
46
|
+
export declare const PHOTO_LOADING_DELAY = 100;
|
|
47
|
+
export declare const RESET_DATA_DELAY = 500;
|
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import { BYTE_TO_KILOBYTE as
|
|
2
|
-
const m = 1,
|
|
1
|
+
import { BYTE_TO_KILOBYTE as I } from "../../constants.js";
|
|
2
|
+
const m = 1, L = 670, _ = ".jpg", E = ".jpeg", A = ".png", P = ".svg", G = ".bmp", M = ".gif", T = ".ico", o = ".webp", C = [
|
|
3
3
|
_,
|
|
4
4
|
E,
|
|
5
|
-
|
|
5
|
+
A,
|
|
6
6
|
P,
|
|
7
7
|
G,
|
|
8
|
-
|
|
8
|
+
M,
|
|
9
9
|
o,
|
|
10
|
-
|
|
11
|
-
], n = "image/jpg", c = "image/jpeg", s = "image/png", t = "image/svg+xml", O = "image/bmp", Y = "image/gif",
|
|
10
|
+
T
|
|
11
|
+
], n = "image/jpg", c = "image/jpeg", s = "image/png", t = "image/svg+xml", O = "image/bmp", Y = "image/gif", S = "image/webp", g = "image/x-icon", N = "image/vnd.microsoft.icon", U = [
|
|
12
12
|
n,
|
|
13
13
|
c,
|
|
14
14
|
s,
|
|
15
15
|
t,
|
|
16
16
|
O,
|
|
17
17
|
Y,
|
|
18
|
-
g,
|
|
19
18
|
S,
|
|
19
|
+
g,
|
|
20
20
|
N
|
|
21
|
-
],
|
|
21
|
+
], e = {
|
|
22
22
|
JPEG_IMAGE_TYPE: [_, E],
|
|
23
23
|
JPG_IMAGE_TYPE: [_, E],
|
|
24
|
-
PNG_IMAGE_TYPE: [
|
|
25
|
-
GIF_IMAGE_TYPE: [
|
|
24
|
+
PNG_IMAGE_TYPE: [A],
|
|
25
|
+
GIF_IMAGE_TYPE: [M],
|
|
26
26
|
SVG_IMAGE_TYPE: [P],
|
|
27
27
|
BMP_IMAGE_TYPE: [G],
|
|
28
28
|
WEBP_IMAGE_TYPE: [o],
|
|
29
|
-
ICO_IMAGE_TYPE: [
|
|
30
|
-
MICROSOFT_ICO_IMAGE_TYPE: [
|
|
31
|
-
},
|
|
29
|
+
ICO_IMAGE_TYPE: [T],
|
|
30
|
+
MICROSOFT_ICO_IMAGE_TYPE: [T]
|
|
31
|
+
}, X = 500, p = 5 * I * I, F = "2d", R = "high", D = "%", B = "px", a = "ms", J = "mb", b = 1, V = 100, f = 2, j = 0.5, r = 100, x = 100, H = 500;
|
|
32
32
|
export {
|
|
33
33
|
G as BMP_IMAGE_EXT,
|
|
34
34
|
O as BMP_IMAGE_TYPE,
|
|
35
35
|
m as DEFAULT_ASPECT_RATIO,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
p as DEFAULT_FILE_MAX_SIZE,
|
|
37
|
+
L as DEFAULT_MIN_DIMENSION,
|
|
38
|
+
X as DEFAULT_TIMEOUT,
|
|
39
|
+
V as FULL_CROP_SIZE,
|
|
40
|
+
r as FULL_PROGRESS_VALUE,
|
|
41
|
+
M as GIF_IMAGE_EXT,
|
|
41
42
|
Y as GIF_IMAGE_TYPE,
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
T as ICO_IMAGE_EXT,
|
|
44
|
+
g as ICO_IMAGE_TYPE,
|
|
44
45
|
E as JPEG_IMAGE_EXT,
|
|
45
46
|
c as JPEG_IMAGE_TYPE,
|
|
46
47
|
_ as JPG_IMAGE_EXT,
|
|
47
48
|
n as JPG_IMAGE_TYPE,
|
|
48
|
-
|
|
49
|
+
f as MAX_ASPECT_RATIO,
|
|
49
50
|
b as MB_FRACTION_DIGITS,
|
|
50
51
|
J as MB_UNIT,
|
|
51
52
|
N as MICROSOFT_ICO_IMAGE_TYPE,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
e as MIME_TO_EXT,
|
|
54
|
+
j as MIN_ASPECT_RATIO,
|
|
55
|
+
a as MS_UNIT,
|
|
56
|
+
F as PHOTO_CANVAS_CONTEXT,
|
|
57
|
+
x as PHOTO_LOADING_DELAY,
|
|
58
|
+
R as PHOTO_SMOOTHING_QUALITY,
|
|
59
|
+
B as PIXEL_UNIT,
|
|
60
|
+
A as PNG_IMAGE_EXT,
|
|
59
61
|
s as PNG_IMAGE_TYPE,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
D as PRECENT_UNIT,
|
|
63
|
+
H as RESET_DATA_DELAY,
|
|
64
|
+
C as SUPPORTED_IMAGE_EXTENSIONS,
|
|
65
|
+
U as SUPPORTED_IMAGE_MIME_TYPES,
|
|
63
66
|
P as SVG_IMAGE_EXT,
|
|
64
67
|
t as SVG_IMAGE_TYPE,
|
|
65
68
|
o as WEBP_IMAGE_EXT,
|
|
66
|
-
|
|
69
|
+
S as WEBP_IMAGE_TYPE
|
|
67
70
|
};
|
|
@@ -21,7 +21,10 @@ const e = {
|
|
|
21
21
|
"paint-abort": "Rendering of photo was interrupted",
|
|
22
22
|
continue: "Continue",
|
|
23
23
|
skip: "Skip area selection",
|
|
24
|
-
aspect: "The aspect ratio of the cropped image must not be greater than 2"
|
|
24
|
+
aspect: "The aspect ratio of the cropped image must not be greater than 2",
|
|
25
|
+
close: "Close",
|
|
26
|
+
"not-uploaded": "Photos were not uploaded",
|
|
27
|
+
"some-not-uploaded": "Some photos were not uploaded"
|
|
25
28
|
},
|
|
26
29
|
ru: {
|
|
27
30
|
upload: "Загрузить фото",
|
|
@@ -45,7 +48,10 @@ const e = {
|
|
|
45
48
|
"paint-abort": "Отрисовка фотографии была прервана",
|
|
46
49
|
continue: "Продолжить",
|
|
47
50
|
skip: "Пропустить выбор области",
|
|
48
|
-
aspect: "Соотношение сторон обрезаемого изображения не должно быть больше 2"
|
|
51
|
+
aspect: "Соотношение сторон обрезаемого изображения не должно быть больше 2",
|
|
52
|
+
close: "Закрыть",
|
|
53
|
+
"not-uploaded": "Фотографии не были загружены",
|
|
54
|
+
"some-not-uploaded": "Некоторые фотографии не были загружены"
|
|
49
55
|
}
|
|
50
56
|
};
|
|
51
57
|
export {
|