@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.
Files changed (33) hide show
  1. package/dist/{Box-CiYPzbPd.js → Box-D8oKffw9.js} +18 -17
  2. package/dist/{Button-chJUX25I.js → Button-BBF8hp7e.js} +16 -15
  3. package/dist/{ButtonBase-DZwhOh56.js → ButtonBase-T2KH9jsD.js} +2 -2
  4. package/dist/{CircularProgress-BCrSQadM.js → CircularProgress-BQQkuSse.js} +110 -136
  5. package/dist/{DialogTitle-BUcXvkzd.js → Dialog-B97c7WYP.js} +765 -1010
  6. package/dist/DialogTitle-Du4tqTs0.js +254 -0
  7. package/dist/{Typography-BmYEfS8y.js → Typography-r_TXEM1e.js} +4 -4
  8. package/dist/assets/upload-dialog-errors.css +1 -0
  9. package/dist/assets/upload-dialog.css +1 -1
  10. package/dist/{chainPropTypes-HYSaT0L0.js → chainPropTypes-KIxDwPzf.js} +15 -15
  11. package/dist/components/button/button.js +1 -1
  12. package/dist/components/circular-progress-loader/circular-progress-loader.js +3 -3
  13. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +26 -25
  14. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +1 -1
  15. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +17 -17
  16. package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +12 -1
  17. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.d.ts +3 -0
  18. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +10 -0
  19. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +152 -129
  20. package/dist/components/photo-crop-uploader/constants.d.ts +3 -0
  21. package/dist/components/photo-crop-uploader/constants.js +35 -32
  22. package/dist/components/photo-crop-uploader/locale.js +8 -2
  23. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +169 -145
  24. package/dist/components/photo-crop-uploader/types.d.ts +4 -0
  25. package/dist/constants.d.ts +1 -0
  26. package/dist/constants.js +2 -1
  27. package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +30 -0
  28. package/dist/{createTheme-BfVKUMHQ.js → createTheme-RvzX1VSA.js} +9 -9
  29. package/dist/extendSxProp-BW9e6LtL.js +36 -0
  30. package/dist/upload-dialog-errors-ku54UrUb.js +365 -0
  31. package/dist/useTheme-CsjkCBFJ.js +16 -0
  32. package/package.json +1 -1
  33. package/dist/extendSxProp-bpz0eCso.js +0 -49
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { UploadDialogErrorsProps } from './types';
3
+ export declare const UploadDialogErrors: FC<UploadDialogErrorsProps>;
@@ -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 N, jsx as a, Fragment as E } from "react/jsx-runtime";
2
- import { S as D } from "../../../../index-BiffjjQq.js";
3
- import { c as r } from "../../../../index-B2JRaoNz.js";
4
- import { PhotoList as M } from "../photo-list/photo-list.js";
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 W } from "../../../../constants.js";
7
- import { CLOSE_ICON_SIZE as R } from "./constants.js";
8
- import { DEFAULT_MIN_DIMENSION as j, DEFAULT_ASPECT_RATIO as F } from "../../constants.js";
9
- import { D as U, c as x, a as $, b as V } from "../../../../DialogTitle-BUcXvkzd.js";
10
- import * as L from "react";
11
- import { g as H, d as Z, c as Y, e as m, P as t } from "../../../../createTheme-BfVKUMHQ.js";
12
- import { m as A, c as O, C as q } from "../../../../CircularProgress-BCrSQadM.js";
13
- import { u as G, s as w, c as J, d as K } from "../../../../chainPropTypes-HYSaT0L0.js";
14
- import { u as Q } from "../../../../useId-CK6Kn3Tn.js";
15
- import { B as X } from "../../../../ButtonBase-DZwhOh56.js";
16
- import { Button as T } from "../../../button/button.js";
17
- import '../../../../assets/upload-dialog.css';function oo(o) {
18
- return Z("MuiIconButton", o);
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 k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]), to = (o) => {
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: n,
27
+ disabled: r,
24
28
  color: c,
25
29
  edge: g,
26
- size: b,
27
- loading: f
30
+ size: f,
31
+ loading: b
28
32
  } = o, u = {
29
- root: ["root", f && "loading", n && "disabled", c !== "default" && `color${m(c)}`, g && `edge${m(g)}`, `size${m(b)}`],
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 J(u, oo, e);
34
- }, eo = w(X, {
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: n
43
+ ownerState: r
40
44
  } = o;
41
- return [e.root, n.loading && e.loading, n.color !== "default" && e[`color${m(n.color)}`], n.edge && e[`edge${m(n.edge)}`], e[`size${m(n.size)}`]];
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(O()).map(([e]) => ({
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(O()).map(([e]) => ({
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
- [`&.${k.disabled}`]: {
143
+ [`&.${U.disabled}`]: {
140
144
  backgroundColor: "transparent",
141
145
  color: (o.vars || o).palette.action.disabled
142
146
  },
143
- [`&.${k.loading}`]: {
147
+ [`&.${U.loading}`]: {
144
148
  color: "transparent"
145
149
  }
146
- }))), no = w("span", {
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
- })), P = /* @__PURE__ */ L.forwardRef(function(e, n) {
168
- const c = G({
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: b,
174
- className: f,
177
+ children: f,
178
+ className: b,
175
179
  color: u = "default",
176
- disabled: C = !1,
180
+ disabled: y = !1,
177
181
  disableFocusRipple: I = !1,
178
- size: B = "medium",
179
- id: h,
180
- loading: d = null,
181
- loadingIndicator: s,
182
- ...S
183
- } = c, _ = Q(h), v = s ?? /* @__PURE__ */ a(q, {
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
- }), l = {
191
+ }), h = {
188
192
  ...c,
189
193
  edge: g,
190
194
  color: u,
191
- disabled: C,
195
+ disabled: y,
192
196
  disableFocusRipple: I,
193
- loading: d,
194
- loadingIndicator: v,
195
- size: B
196
- }, y = to(l);
197
- return /* @__PURE__ */ N(eo, {
198
- id: d ? _ : h,
199
- className: Y(y.root, f),
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: C || d,
203
- ref: n,
204
- ...S,
205
- ownerState: l,
206
- children: [typeof d == "boolean" && // use plain HTML span to minimize the runtime overhead
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: y.loadingWrapper,
212
+ className: d.loadingWrapper,
209
213
  style: {
210
214
  display: "contents"
211
215
  },
212
- children: /* @__PURE__ */ a(no, {
213
- className: y.loadingIndicator,
214
- ownerState: l,
215
- children: d && v
216
+ children: /* @__PURE__ */ a(co, {
217
+ className: d.loadingIndicator,
218
+ ownerState: h,
219
+ children: l && B
216
220
  })
217
- }), b]
221
+ }), f]
218
222
  });
219
223
  });
220
- process.env.NODE_ENV !== "production" && (P.propTypes = {
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: K(t.node, (o) => L.Children.toArray(o.children).some((n) => /* @__PURE__ */ L.isValidElement(n) && n.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(`
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 ao = "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", io = "_dialog_1d9zm_1", ro = "_topActions_1d9zm_7", so = "_close_1d9zm_13", lo = "_botActions_1d9zm_17", co = "_button_1d9zm_22", po = "_title_1d9zm_26", go = "_content_1d9zm_32", uo = "_many_1d9zm_40", mo = "_crop_1d9zm_47", bo = "_dialogText_1d9zm_56", i = {
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: n = [],
306
+ photoSources: r = [],
314
307
  photoCrops: c = [],
315
308
  onCropChange: g = () => {
316
309
  },
317
- onPhotoLoad: b,
318
- imageRef: f,
310
+ onPhotoLoad: f,
311
+ imageRef: b,
319
312
  photoError: u,
320
- onPhotoCrop: C,
313
+ onPhotoCrop: y,
321
314
  onNextPhoto: I,
322
- onSkipCrop: B,
323
- minDimension: h = j,
324
- aspectRatio: d = F,
325
- locale: s = W,
326
- circular: S,
327
- keepSelection: _ = !0,
328
- className: v,
329
- photoIndex: l,
330
- ...y
331
- } = o, z = n.slice(l).length > 1;
332
- return /* @__PURE__ */ N(
333
- U,
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: r(i.dialog, v),
332
+ className: i(n.dialog, d),
336
333
  onClose: e,
337
- ...y,
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(x, { className: r(i.topActions), children: /* @__PURE__ */ a(
340
- P,
361
+ /* @__PURE__ */ a(O, { className: i(n.topActions), children: /* @__PURE__ */ a(
362
+ j,
341
363
  {
342
364
  onClick: e,
343
- className: r(i.close),
365
+ className: i(n.close),
344
366
  "aria-label": p[s].back,
345
367
  children: /* @__PURE__ */ a(
346
368
  "img",
347
369
  {
348
- width: R,
349
- height: R,
350
- src: ao,
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($, { className: r(i.title), children: p[s]["photo-crop"] }),
357
- /* @__PURE__ */ N(V, { className: r(i.content, z && i.many), children: [
358
- z && /* @__PURE__ */ a("span", {}),
359
- !!n.length && /* @__PURE__ */ a(
360
- D,
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: r(i.crop),
363
- crop: c[l],
364
- circularCrop: S,
365
- keepSelection: _,
366
- aspect: d,
367
- minWidth: h,
368
- minHeight: h,
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: b,
374
- src: n[l],
375
- ref: f,
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
- z && /* @__PURE__ */ a(M, { photoSources: n, photoIndex: l })
405
+ S && /* @__PURE__ */ a(H, { photoSources: r, photoIndex: C })
383
406
  ] }),
384
- u && /* @__PURE__ */ a(x, { className: r(i.dialogText), children: u }),
385
- /* @__PURE__ */ a(x, { className: r(i.botActions), children: z ? /* @__PURE__ */ N(E, { children: [
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
- T,
410
+ E,
388
411
  {
389
412
  buttonSize: "small",
390
413
  buttonColor: "blue",
391
414
  buttonVariant: "outlined",
392
415
  buttonWeight: 500,
393
- className: r(i.button),
394
- onClick: B,
416
+ className: i(n.button),
417
+ onClick: z,
395
418
  children: p[s].skip
396
419
  }
397
420
  ),
398
421
  /* @__PURE__ */ a(
399
- T,
422
+ E,
400
423
  {
401
424
  buttonSize: "small",
402
425
  buttonColor: "blue",
403
426
  buttonVariant: "filled",
404
427
  buttonWeight: 500,
405
- className: r(i.button),
428
+ className: i(n.button),
406
429
  onClick: I,
407
430
  children: p[s].continue
408
431
  }
409
432
  )
410
433
  ] }) : /* @__PURE__ */ a(
411
- T,
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: r(i.button),
419
- onClick: C,
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
- Ao as UploadDialog
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 T } from "../../constants.js";
2
- const m = 1, C = 670, _ = ".jpg", E = ".jpeg", M = ".png", P = ".svg", G = ".bmp", A = ".gif", I = ".ico", o = ".webp", e = [
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
- M,
5
+ A,
6
6
  P,
7
7
  G,
8
- A,
8
+ M,
9
9
  o,
10
- I
11
- ], n = "image/jpg", c = "image/jpeg", s = "image/png", t = "image/svg+xml", O = "image/bmp", Y = "image/gif", g = "image/webp", S = "image/x-icon", N = "image/vnd.microsoft.icon", X = [
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
- ], p = {
21
+ ], e = {
22
22
  JPEG_IMAGE_TYPE: [_, E],
23
23
  JPG_IMAGE_TYPE: [_, E],
24
- PNG_IMAGE_TYPE: [M],
25
- GIF_IMAGE_TYPE: [A],
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: [I],
30
- MICROSOFT_ICO_IMAGE_TYPE: [I]
31
- }, U = 500, F = 5 * T * T, B = "2d", L = "high", R = "%", a = "px", D = "ms", J = "mb", b = 1, f = 100, j = 2, r = 0.5;
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
- F as DEFAULT_FILE_MAX_SIZE,
37
- C as DEFAULT_MIN_DIMENSION,
38
- U as DEFAULT_TIMEOUT,
39
- f as FULL_CROP_SIZE,
40
- A as GIF_IMAGE_EXT,
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
- I as ICO_IMAGE_EXT,
43
- S as ICO_IMAGE_TYPE,
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
- j as MAX_ASPECT_RATIO,
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
- p as MIME_TO_EXT,
53
- r as MIN_ASPECT_RATIO,
54
- D as MS_UNIT,
55
- B as PHOTO_CANVAS_CONTEXT,
56
- L as PHOTO_SMOOTHING_QUALITY,
57
- a as PIXEL_UNIT,
58
- M as PNG_IMAGE_EXT,
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
- R as PRECENT_UNIT,
61
- e as SUPPORTED_IMAGE_EXTENSIONS,
62
- X as SUPPORTED_IMAGE_MIME_TYPES,
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
- g as WEBP_IMAGE_TYPE
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 {