@hai-dev/ui-kit 1.0.5 → 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 (55) hide show
  1. package/dist/Box-D8oKffw9.js +57 -0
  2. package/dist/{Button-DDlVTM6i.js → Button-BBF8hp7e.js} +30 -27
  3. package/dist/ButtonBase-T2KH9jsD.js +966 -0
  4. package/dist/CircularProgress-BQQkuSse.js +273 -0
  5. package/dist/{DialogTitle-KN1sayHD.js → Dialog-B97c7WYP.js} +910 -1401
  6. package/dist/DialogTitle-Du4tqTs0.js +254 -0
  7. package/dist/Typography-r_TXEM1e.js +257 -0
  8. package/dist/assets/circular-progress-loader.css +1 -0
  9. package/dist/assets/upload-dialog-errors.css +1 -0
  10. package/dist/assets/upload-dialog.css +1 -1
  11. package/dist/chainPropTypes-KIxDwPzf.js +387 -0
  12. package/dist/components/button/button.js +1 -1
  13. package/dist/components/circular-progress-loader/circular-progress-loader.d.ts +3 -0
  14. package/dist/components/circular-progress-loader/circular-progress-loader.js +44 -0
  15. package/dist/components/circular-progress-loader/circular-progress-loader.stories.d.ts +7 -0
  16. package/dist/components/circular-progress-loader/constants.d.ts +2 -0
  17. package/dist/components/circular-progress-loader/constants.js +5 -0
  18. package/dist/components/circular-progress-loader/index.d.ts +1 -0
  19. package/dist/components/circular-progress-loader/index.js +4 -0
  20. package/dist/components/circular-progress-loader/types.d.ts +6 -0
  21. package/dist/components/circular-progress-loader/types.js +1 -0
  22. package/dist/components/index.d.ts +1 -0
  23. package/dist/components/index.js +6 -4
  24. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +41 -39
  25. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +22 -73
  26. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +17 -17
  27. package/dist/components/photo-crop-uploader/components/upload-dialog/types.d.ts +12 -1
  28. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.d.ts +3 -0
  29. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +10 -0
  30. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +152 -127
  31. package/dist/components/photo-crop-uploader/constants.d.ts +3 -0
  32. package/dist/components/photo-crop-uploader/constants.js +35 -32
  33. package/dist/components/photo-crop-uploader/locale.js +8 -2
  34. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +169 -145
  35. package/dist/components/photo-crop-uploader/types.d.ts +4 -0
  36. package/dist/constants.d.ts +2 -0
  37. package/dist/constants.js +3 -1
  38. package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +30 -0
  39. package/dist/{createTheme-DSHGFfg6.js → createTheme-RvzX1VSA.js} +4 -4
  40. package/dist/decorators/centered-decorator.d.ts +3 -0
  41. package/dist/decorators/centered-decorator.js +16 -0
  42. package/dist/decorators/index.d.ts +1 -0
  43. package/dist/decorators/index.js +4 -0
  44. package/dist/decorators/types.d.ts +4 -0
  45. package/dist/decorators/types.js +1 -0
  46. package/dist/extendSxProp-BW9e6LtL.js +36 -0
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.js +16 -14
  49. package/dist/upload-dialog-errors-ku54UrUb.js +365 -0
  50. package/dist/useId-CK6Kn3Tn.js +21 -0
  51. package/dist/useTheme-CsjkCBFJ.js +16 -0
  52. package/package.json +8 -8
  53. package/dist/ButtonBase-CXGZ-DBC.js +0 -1346
  54. package/dist/CircularProgress-CscJm1An.js +0 -291
  55. package/dist/extendSxProp-CzeED7BH.js +0 -49
@@ -1,42 +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-KN1sayHD.js";
10
- import * as L from "react";
11
- import { a as H, g as Z, b as Y, e as m, P as t } from "../../../../createTheme-DSHGFfg6.js";
12
- import { u as q, m as A, c as O, C as G } from "../../../../CircularProgress-CscJm1An.js";
13
- import { u as J, s as w, c as K, B as Q, b as X } from "../../../../ButtonBase-CXGZ-DBC.js";
14
- import { Button as T } from "../../../button/button.js";
15
- import '../../../../assets/upload-dialog.css';function oo(o) {
16
- 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);
17
23
  }
18
- 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) => {
19
25
  const {
20
26
  classes: e,
21
- disabled: n,
27
+ disabled: r,
22
28
  color: c,
23
29
  edge: g,
24
- size: b,
25
- loading: f
30
+ size: f,
31
+ loading: b
26
32
  } = o, u = {
27
- 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)}`],
28
34
  loadingIndicator: ["loadingIndicator"],
29
35
  loadingWrapper: ["loadingWrapper"]
30
36
  };
31
- return K(u, oo, e);
32
- }, eo = w(Q, {
37
+ return eo(u, io, e);
38
+ }, lo = W(ro, {
33
39
  name: "MuiIconButton",
34
40
  slot: "Root",
35
41
  overridesResolver: (o, e) => {
36
42
  const {
37
- ownerState: n
43
+ ownerState: r
38
44
  } = o;
39
- 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)}`]];
40
46
  }
41
47
  })(A(({
42
48
  theme: o
@@ -103,14 +109,14 @@ const k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
103
109
  style: {
104
110
  color: "inherit"
105
111
  }
106
- }, ...Object.entries(o.palette).filter(O()).map(([e]) => ({
112
+ }, ...Object.entries(o.palette).filter(M()).map(([e]) => ({
107
113
  props: {
108
114
  color: e
109
115
  },
110
116
  style: {
111
117
  color: (o.vars || o).palette[e].main
112
118
  }
113
- })), ...Object.entries(o.palette).filter(O()).map(([e]) => ({
119
+ })), ...Object.entries(o.palette).filter(M()).map(([e]) => ({
114
120
  props: {
115
121
  color: e
116
122
  },
@@ -134,14 +140,14 @@ const k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
134
140
  fontSize: o.typography.pxToRem(28)
135
141
  }
136
142
  }],
137
- [`&.${k.disabled}`]: {
143
+ [`&.${U.disabled}`]: {
138
144
  backgroundColor: "transparent",
139
145
  color: (o.vars || o).palette.action.disabled
140
146
  },
141
- [`&.${k.loading}`]: {
147
+ [`&.${U.loading}`]: {
142
148
  color: "transparent"
143
149
  }
144
- }))), no = w("span", {
150
+ }))), co = W("span", {
145
151
  name: "MuiIconButton",
146
152
  slot: "LoadingIndicator"
147
153
  })(({
@@ -162,60 +168,60 @@ const k = H("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
162
168
  display: "flex"
163
169
  }
164
170
  }]
165
- })), P = /* @__PURE__ */ L.forwardRef(function(e, n) {
166
- const c = J({
171
+ })), j = /* @__PURE__ */ P.forwardRef(function(e, r) {
172
+ const c = oo({
167
173
  props: e,
168
174
  name: "MuiIconButton"
169
175
  }), {
170
176
  edge: g = !1,
171
- children: b,
172
- className: f,
177
+ children: f,
178
+ className: b,
173
179
  color: u = "default",
174
- disabled: C = !1,
180
+ disabled: y = !1,
175
181
  disableFocusRipple: I = !1,
176
- size: B = "medium",
177
- id: h,
178
- loading: d = null,
179
- loadingIndicator: s,
180
- ...S
181
- } = c, _ = q(h), v = s ?? /* @__PURE__ */ a(G, {
182
- "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,
183
189
  color: "inherit",
184
190
  size: 16
185
- }), l = {
191
+ }), h = {
186
192
  ...c,
187
193
  edge: g,
188
194
  color: u,
189
- disabled: C,
195
+ disabled: y,
190
196
  disableFocusRipple: I,
191
- loading: d,
192
- loadingIndicator: v,
193
- size: B
194
- }, y = to(l);
195
- return /* @__PURE__ */ N(eo, {
196
- id: d ? _ : h,
197
- 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),
198
204
  centerRipple: !0,
199
205
  focusRipple: !I,
200
- disabled: C || d,
201
- ref: n,
202
- ...S,
203
- ownerState: l,
204
- 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
205
211
  /* @__PURE__ */ a("span", {
206
- className: y.loadingWrapper,
212
+ className: d.loadingWrapper,
207
213
  style: {
208
214
  display: "contents"
209
215
  },
210
- children: /* @__PURE__ */ a(no, {
211
- className: y.loadingIndicator,
212
- ownerState: l,
213
- children: d && v
216
+ children: /* @__PURE__ */ a(co, {
217
+ className: d.loadingIndicator,
218
+ ownerState: h,
219
+ children: l && B
214
220
  })
215
- }), b]
221
+ }), f]
216
222
  });
217
223
  });
218
- process.env.NODE_ENV !== "production" && (P.propTypes = {
224
+ process.env.NODE_ENV !== "production" && (j.propTypes = {
219
225
  // ┌────────────────────────────── Warning ──────────────────────────────┐
220
226
  // │ These PropTypes are generated from the TypeScript type definitions. │
221
227
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -223,7 +229,7 @@ process.env.NODE_ENV !== "production" && (P.propTypes = {
223
229
  /**
224
230
  * The icon to display.
225
231
  */
226
- children: X(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(`
227
233
  `)) : null),
228
234
  /**
229
235
  * Override or extend the styles applied to the component.
@@ -294,127 +300,146 @@ process.env.NODE_ENV !== "production" && (P.propTypes = {
294
300
  */
295
301
  sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
296
302
  });
297
- 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 = {
298
- dialog: io,
299
- topActions: ro,
300
- close: so,
301
- botActions: lo,
302
- button: co,
303
- title: po,
304
- content: go,
305
- many: uo,
306
- crop: mo,
307
- dialogText: bo
308
- }, Lo = (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) => {
309
304
  const {
310
305
  onCloseDialogHandler: e,
311
- photoSources: n = [],
306
+ photoSources: r = [],
312
307
  photoCrops: c = [],
313
308
  onCropChange: g = () => {
314
309
  },
315
- onPhotoLoad: b,
316
- imageRef: f,
310
+ onPhotoLoad: f,
311
+ imageRef: b,
317
312
  photoError: u,
318
- onPhotoCrop: C,
313
+ onPhotoCrop: y,
319
314
  onNextPhoto: I,
320
- onSkipCrop: B,
321
- minDimension: h = j,
322
- aspectRatio: d = F,
323
- locale: s = W,
324
- circular: S,
325
- keepSelection: _ = !0,
326
- className: v,
327
- photoIndex: l,
328
- ...y
329
- } = o, z = n.slice(l).length > 1;
330
- return /* @__PURE__ */ N(
331
- 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,
332
331
  {
333
- className: r(i.dialog, v),
332
+ className: i(n.dialog, d),
334
333
  onClose: e,
335
- ...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,
336
360
  children: [
337
- /* @__PURE__ */ a(x, { className: r(i.topActions), children: /* @__PURE__ */ a(
338
- P,
361
+ /* @__PURE__ */ a(O, { className: i(n.topActions), children: /* @__PURE__ */ a(
362
+ j,
339
363
  {
340
364
  onClick: e,
341
- className: r(i.close),
365
+ className: i(n.close),
342
366
  "aria-label": p[s].back,
343
367
  children: /* @__PURE__ */ a(
344
368
  "img",
345
369
  {
346
- width: R,
347
- height: R,
348
- src: ao,
370
+ width: w,
371
+ height: w,
372
+ src: po,
349
373
  alt: p[s].back
350
374
  }
351
375
  )
352
376
  }
353
377
  ) }),
354
- /* @__PURE__ */ a($, { className: r(i.title), children: p[s]["photo-crop"] }),
355
- /* @__PURE__ */ N(V, { className: r(i.content, z && i.many), children: [
356
- z && /* @__PURE__ */ a("span", {}),
357
- !!n.length && /* @__PURE__ */ a(
358
- 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
+ $,
359
383
  {
360
- className: r(i.crop),
361
- crop: c[l],
362
- circularCrop: S,
363
- keepSelection: _,
364
- aspect: d,
365
- minWidth: h,
366
- 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,
367
391
  onChange: g,
368
392
  children: /* @__PURE__ */ a(
369
393
  "img",
370
394
  {
371
- onLoad: b,
372
- src: n[l],
373
- ref: f,
395
+ onLoad: f,
396
+ src: r[C],
397
+ ref: b,
374
398
  alt: p[s]["photo-crop"],
375
399
  draggable: !1
376
- }
400
+ },
401
+ C
377
402
  )
378
403
  }
379
404
  ),
380
- z && /* @__PURE__ */ a(M, { photoSources: n, photoIndex: l })
405
+ S && /* @__PURE__ */ a(H, { photoSources: r, photoIndex: C })
381
406
  ] }),
382
- u && /* @__PURE__ */ a(x, { className: r(i.dialogText), children: u }),
383
- /* @__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: [
384
409
  /* @__PURE__ */ a(
385
- T,
410
+ E,
386
411
  {
387
412
  buttonSize: "small",
388
413
  buttonColor: "blue",
389
414
  buttonVariant: "outlined",
390
415
  buttonWeight: 500,
391
- className: r(i.button),
392
- onClick: B,
416
+ className: i(n.button),
417
+ onClick: z,
393
418
  children: p[s].skip
394
419
  }
395
420
  ),
396
421
  /* @__PURE__ */ a(
397
- T,
422
+ E,
398
423
  {
399
424
  buttonSize: "small",
400
425
  buttonColor: "blue",
401
426
  buttonVariant: "filled",
402
427
  buttonWeight: 500,
403
- className: r(i.button),
428
+ className: i(n.button),
404
429
  onClick: I,
405
430
  children: p[s].continue
406
431
  }
407
432
  )
408
433
  ] }) : /* @__PURE__ */ a(
409
- T,
434
+ E,
410
435
  {
411
436
  minWidth: "100%",
412
437
  buttonSize: "small",
413
438
  buttonColor: "blue",
414
439
  buttonVariant: "filled",
415
440
  buttonWeight: 500,
416
- className: r(i.button),
417
- onClick: C,
441
+ className: i(n.button),
442
+ onClick: y,
418
443
  children: p[s].crop
419
444
  }
420
445
  ) })
@@ -423,5 +448,5 @@ const ao = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%20
423
448
  );
424
449
  };
425
450
  export {
426
- Lo as UploadDialog
451
+ Eo as UploadDialog
427
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 {