@cfx-dev/ui-components 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +38 -38
  2. package/dist/Button.module-Cv-7p0xt.js +16 -0
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/Flex.css +1 -1
  5. package/dist/assets/Flyout.css +1 -1
  6. package/dist/assets/Input.css +1 -1
  7. package/dist/assets/Island.css +1 -1
  8. package/dist/assets/Pad.css +1 -1
  9. package/dist/assets/Popover.css +1 -1
  10. package/dist/assets/RichInput.css +1 -1
  11. package/dist/assets/Spacer.css +1 -1
  12. package/dist/assets/Textarea.css +1 -1
  13. package/dist/assets/global.css +1 -1
  14. package/dist/components/Button/Button.d.ts +1 -1
  15. package/dist/components/Button/Button.js +1 -1
  16. package/dist/components/Button/ButtonBar.js +1 -1
  17. package/dist/components/Flyout/Flyout.js +39 -39
  18. package/dist/components/Input/Input.d.ts +0 -1
  19. package/dist/components/Input/Input.js +58 -61
  20. package/dist/components/Input/RichInput.js +27 -27
  21. package/dist/components/InputDropzone/InputDropzone.js +122 -119
  22. package/dist/components/InputDropzone/ItemPreview.js +1 -1
  23. package/dist/components/Island/Island.js +23 -23
  24. package/dist/components/Layout/Flex/Flex.d.ts +1 -1
  25. package/dist/components/Layout/Flex/Flex.js +44 -43
  26. package/dist/components/Layout/Pad/Pad.d.ts +1 -1
  27. package/dist/components/Layout/Pad/Pad.js +30 -29
  28. package/dist/components/Modal/Modal.d.ts +2 -0
  29. package/dist/components/Modal/Modal.js +25 -23
  30. package/dist/components/Overlay/Overlay.js +13 -13
  31. package/dist/components/Popover/Popover.js +18 -18
  32. package/dist/components/Select/Select.d.ts +1 -1
  33. package/dist/components/Select/Select.js +239 -229
  34. package/dist/components/Spacer/Spacer.d.ts +1 -1
  35. package/dist/components/Spacer/Spacer.js +13 -12
  36. package/dist/components/Table/Table.js +41 -35
  37. package/dist/components/Text/Text.types.d.ts +1 -1
  38. package/dist/components/Textarea/Textarea.d.ts +0 -1
  39. package/dist/components/Textarea/Textarea.js +37 -40
  40. package/dist/iconBase-Bipuk9tK.js +112 -0
  41. package/dist/main.d.ts +1 -1
  42. package/dist/main.js +112 -113
  43. package/dist/style-guide/Icons/IconDisplayGrid.js +3 -3
  44. package/dist/style-guide/Icons/Icons.d.ts +14 -13
  45. package/dist/style-guide/Icons/Icons.js +36 -7
  46. package/dist/style-guide/Icons/NewIcons/UpArrow.d.ts +5 -0
  47. package/dist/style-guide/Icons/NewIcons/UpArrow.js +27 -0
  48. package/dist/styles-scss/_ui.scss +167 -195
  49. package/dist/styles-scss/assets/images/checkered_dark.svg +7 -7
  50. package/dist/styles-scss/assets/images/checkered_light.svg +7 -7
  51. package/dist/styles-scss/global.scss +73 -75
  52. package/dist/styles-scss/theme_dark.scss +24 -24
  53. package/dist/styles-scss/theme_light.scss +54 -54
  54. package/dist/styles-scss/themes.scss +2 -2
  55. package/dist/styles-scss/tokens.scss +272 -274
  56. package/dist/utils/string.d.ts +16 -1
  57. package/dist/utils/string.js +46 -39
  58. package/package.json +71 -72
  59. package/dist/Button.module-Z6njvP9Z.js +0 -17
  60. package/dist/Icons-CIXYyG0c.js +0 -106
  61. package/dist/index.esm-BkynlSN6.js +0 -72
@@ -2,11 +2,11 @@ import { jsxs as he, jsx as N } from "react/jsx-runtime";
2
2
  import er, { useMemo as L, useRef as te, useReducer as br, useEffect as De, useCallback as D, forwardRef as hr, useImperativeHandle as Dr, Fragment as Ar } from "react";
3
3
  import { P as l } from "../../index-DQMInta3.js";
4
4
  import { a as M, b as $, c as We, d as Be } from "../../tslib.es6-CBKHJX9H.js";
5
- import { F as wr } from "../../Icons-CIXYyG0c.js";
5
+ import { G as wr } from "../../iconBase-Bipuk9tK.js";
6
6
  import { Icon as _r } from "../Icon/Icon.js";
7
- import { clsx as Fr } from "../../utils/clsx.js";
7
+ import { clsx as xr } from "../../utils/clsx.js";
8
8
  import { ItemPreview as Or } from "./ItemPreview.js";
9
- import '../../assets/InputDropzone.css';var xr = /* @__PURE__ */ new Map([
9
+ import '../../assets/InputDropzone.css';var Fr = /* @__PURE__ */ new Map([
10
10
  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
11
11
  ["aac", "audio/aac"],
12
12
  ["abw", "application/x-abiword"],
@@ -90,7 +90,7 @@ import '../../assets/InputDropzone.css';var xr = /* @__PURE__ */ new Map([
90
90
  ["mov", "video/quicktime"],
91
91
  ["msg", "application/vnd.ms-outlook"]
92
92
  ]);
93
- function Y(e, r) {
93
+ function G(e, r) {
94
94
  var t = Er(e);
95
95
  if (typeof t.path != "string") {
96
96
  var n = e.webkitRelativePath;
@@ -106,7 +106,7 @@ function Y(e, r) {
106
106
  function Er(e) {
107
107
  var r = e.name, t = r && r.lastIndexOf(".") !== -1;
108
108
  if (t && !e.type) {
109
- var n = r.split(".").pop().toLowerCase(), i = xr.get(n);
109
+ var n = r.split(".").pop().toLowerCase(), i = Fr.get(n);
110
110
  i && Object.defineProperty(e, "type", {
111
111
  value: i,
112
112
  writable: !1,
@@ -125,9 +125,9 @@ var jr = [
125
125
  function Pr(e) {
126
126
  return M(this, void 0, void 0, function() {
127
127
  return $(this, function(r) {
128
- return oe(e) && Tr(e.dataTransfer) ? [2, Rr(e.dataTransfer, e.type)] : Ir(e) ? [2, Sr(e)] : Array.isArray(e) && e.every(function(t) {
128
+ return oe(e) && Tr(e.dataTransfer) ? [2, kr(e.dataTransfer, e.type)] : Ir(e) ? [2, Cr(e)] : Array.isArray(e) && e.every(function(t) {
129
129
  return "getFile" in t && typeof t.getFile == "function";
130
- }) ? [2, Cr(e)] : [2, []];
130
+ }) ? [2, Sr(e)] : [2, []];
131
131
  });
132
132
  });
133
133
  }
@@ -140,12 +140,12 @@ function Ir(e) {
140
140
  function oe(e) {
141
141
  return typeof e == "object" && e !== null;
142
142
  }
143
- function Sr(e) {
143
+ function Cr(e) {
144
144
  return we(e.target.files).map(function(r) {
145
- return Y(r);
145
+ return G(r);
146
146
  });
147
147
  }
148
- function Cr(e) {
148
+ function Sr(e) {
149
149
  return M(this, void 0, void 0, function() {
150
150
  var r;
151
151
  return $(this, function(t) {
@@ -156,13 +156,13 @@ function Cr(e) {
156
156
  }))];
157
157
  case 1:
158
158
  return r = t.sent(), [2, r.map(function(n) {
159
- return Y(n);
159
+ return G(n);
160
160
  })];
161
161
  }
162
162
  });
163
163
  });
164
164
  }
165
- function Rr(e, r) {
165
+ function kr(e, r) {
166
166
  return M(this, void 0, void 0, function() {
167
167
  var t, n;
168
168
  return $(this, function(i) {
@@ -170,12 +170,12 @@ function Rr(e, r) {
170
170
  case 0:
171
171
  return e.items ? (t = we(e.items).filter(function(a) {
172
172
  return a.kind === "file";
173
- }), r !== "drop" ? [2, t] : [4, Promise.all(t.map(kr))]) : [3, 2];
173
+ }), r !== "drop" ? [2, t] : [4, Promise.all(t.map(Rr))]) : [3, 2];
174
174
  case 1:
175
175
  return n = i.sent(), [2, Ne(rr(n))];
176
176
  case 2:
177
177
  return [2, Ne(we(e.files).map(function(a) {
178
- return Y(a);
178
+ return G(a);
179
179
  }))];
180
180
  }
181
181
  });
@@ -195,7 +195,7 @@ function we(e) {
195
195
  }
196
196
  return r;
197
197
  }
198
- function kr(e) {
198
+ function Rr(e) {
199
199
  if (typeof e.webkitGetAsEntry != "function")
200
200
  return Ue(e);
201
201
  var r = e.webkitGetAsEntry();
@@ -210,7 +210,7 @@ function Ue(e) {
210
210
  var r = e.getAsFile();
211
211
  if (!r)
212
212
  return Promise.reject("".concat(e, " is not a File"));
213
- var t = Y(r);
213
+ var t = G(r);
214
214
  return Promise.resolve(t);
215
215
  }
216
216
  function zr(e) {
@@ -264,7 +264,7 @@ function Lr(e) {
264
264
  return $(this, function(r) {
265
265
  return [2, new Promise(function(t, n) {
266
266
  e.file(function(i) {
267
- var a = Y(i, e.fullPath);
267
+ var a = G(i, e.fullPath);
268
268
  t(a);
269
269
  }, function(i) {
270
270
  n(i);
@@ -283,7 +283,7 @@ var Mr = function(e, r) {
283
283
  }
284
284
  return !0;
285
285
  };
286
- function Ye(e) {
286
+ function Ge(e) {
287
287
  return Hr(e) || Kr(e) || or(e) || $r();
288
288
  }
289
289
  function $r() {
@@ -296,7 +296,7 @@ function Kr(e) {
296
296
  function Hr(e) {
297
297
  if (Array.isArray(e)) return _e(e);
298
298
  }
299
- function Ge(e, r) {
299
+ function Ye(e, r) {
300
300
  var t = Object.keys(e);
301
301
  if (Object.getOwnPropertySymbols) {
302
302
  var n = Object.getOwnPropertySymbols(e);
@@ -309,9 +309,9 @@ function Ge(e, r) {
309
309
  function qe(e) {
310
310
  for (var r = 1; r < arguments.length; r++) {
311
311
  var t = arguments[r] != null ? arguments[r] : {};
312
- r % 2 ? Ge(Object(t), !0).forEach(function(n) {
312
+ r % 2 ? Ye(Object(t), !0).forEach(function(n) {
313
313
  nr(e, n, t[n]);
314
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Ge(Object(t)).forEach(function(n) {
314
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Ye(Object(t)).forEach(function(n) {
315
315
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
316
316
  });
317
317
  }
@@ -363,7 +363,7 @@ function Br(e, r) {
363
363
  function Nr(e) {
364
364
  if (Array.isArray(e)) return e;
365
365
  }
366
- var Ur = "file-invalid-type", Yr = "file-too-large", Gr = "file-too-small", qr = "too-many-files", Jr = function(r) {
366
+ var Ur = "file-invalid-type", Gr = "file-too-large", Yr = "file-too-small", qr = "too-many-files", Jr = function(r) {
367
367
  r = Array.isArray(r) && r.length === 1 ? r[0] : r;
368
368
  var t = Array.isArray(r) ? "one of ".concat(r.join(", ")) : r;
369
369
  return {
@@ -372,12 +372,12 @@ var Ur = "file-invalid-type", Yr = "file-too-large", Gr = "file-too-small", qr =
372
372
  };
373
373
  }, Je = function(r) {
374
374
  return {
375
- code: Yr,
375
+ code: Gr,
376
376
  message: "File is larger than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
377
377
  };
378
378
  }, Ve = function(r) {
379
379
  return {
380
- code: Gr,
380
+ code: Yr,
381
381
  message: "File is smaller than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
382
382
  };
383
383
  }, Vr = {
@@ -389,23 +389,23 @@ function ir(e, r) {
389
389
  return [t, t ? null : Jr(r)];
390
390
  }
391
391
  function ar(e, r, t) {
392
- if (S(e.size))
393
- if (S(r) && S(t)) {
392
+ if (C(e.size))
393
+ if (C(r) && C(t)) {
394
394
  if (e.size > t) return [!1, Je(t)];
395
395
  if (e.size < r) return [!1, Ve(r)];
396
396
  } else {
397
- if (S(r) && e.size < r) return [!1, Ve(r)];
398
- if (S(t) && e.size > t) return [!1, Je(t)];
397
+ if (C(r) && e.size < r) return [!1, Ve(r)];
398
+ if (C(t) && e.size > t) return [!1, Je(t)];
399
399
  }
400
400
  return [!0, null];
401
401
  }
402
- function S(e) {
402
+ function C(e) {
403
403
  return e != null;
404
404
  }
405
405
  function Qr(e) {
406
406
  var r = e.files, t = e.accept, n = e.minSize, i = e.maxSize, a = e.multiple, s = e.maxFiles, u = e.validator;
407
407
  return !a && r.length > 1 || a && s >= 1 && r.length > s ? !1 : r.every(function(d) {
408
- var A = ir(d, t), w = U(A, 1), v = w[0], x = ar(d, n, i), E = U(x, 1), j = E[0], P = u ? u(d) : null;
408
+ var A = ir(d, t), w = U(A, 1), v = w[0], F = ar(d, n, i), E = U(F, 1), j = E[0], P = u ? u(d) : null;
409
409
  return v && j && !P;
410
410
  });
411
411
  }
@@ -445,7 +445,7 @@ function rt() {
445
445
  return "showOpenFilePicker" in window;
446
446
  }
447
447
  function tt(e) {
448
- if (S(e)) {
448
+ if (C(e)) {
449
449
  var r = Object.entries(e).filter(function(t) {
450
450
  var n = U(t, 2), i = n[0], a = n[1], s = !0;
451
451
  return cr(i) || (console.warn('Skipped "'.concat(i, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), s = !1), (!Array.isArray(a) || !a.every(ur)) && (console.warn('Skipped "'.concat(i, '" because an invalid file extension was provided.')), s = !1), s;
@@ -462,10 +462,10 @@ function tt(e) {
462
462
  return e;
463
463
  }
464
464
  function nt(e) {
465
- if (S(e))
465
+ if (C(e))
466
466
  return Object.entries(e).reduce(function(r, t) {
467
467
  var n = U(t, 2), i = n[0], a = n[1];
468
- return [].concat(Ye(r), [i], Ye(a));
468
+ return [].concat(Ge(r), [i], Ge(a));
469
469
  }, []).filter(function(r) {
470
470
  return cr(r) || ur(r);
471
471
  }).join(",");
@@ -494,30 +494,30 @@ function pt(e) {
494
494
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
495
495
  }
496
496
  function dt(e) {
497
- if (Array.isArray(e)) return Fe(e);
497
+ if (Array.isArray(e)) return xe(e);
498
498
  }
499
499
  function Ae(e, r) {
500
- return vt(e) || gt(e, r) || sr(e, r) || mt();
500
+ return vt(e) || mt(e, r) || sr(e, r) || gt();
501
501
  }
502
- function mt() {
502
+ function gt() {
503
503
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
504
504
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
505
505
  }
506
506
  function sr(e, r) {
507
507
  if (e) {
508
- if (typeof e == "string") return Fe(e, r);
508
+ if (typeof e == "string") return xe(e, r);
509
509
  var t = Object.prototype.toString.call(e).slice(8, -1);
510
510
  if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
511
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Fe(e, r);
511
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return xe(e, r);
512
512
  }
513
513
  }
514
- function Fe(e, r) {
514
+ function xe(e, r) {
515
515
  (r == null || r > e.length) && (r = e.length);
516
516
  for (var t = 0, n = new Array(r); t < r; t++)
517
517
  n[t] = e[t];
518
518
  return n;
519
519
  }
520
- function gt(e, r) {
520
+ function mt(e, r) {
521
521
  var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
522
522
  if (t != null) {
523
523
  var n = [], i = !0, a = !1, s, u;
@@ -776,7 +776,7 @@ Ee.propTypes = {
776
776
  */
777
777
  validator: l.func
778
778
  };
779
- var xe = {
779
+ var Fe = {
780
780
  isFocused: !1,
781
781
  isFileDialogActive: !1,
782
782
  isDragActive: !1,
@@ -786,7 +786,7 @@ var xe = {
786
786
  fileRejections: []
787
787
  };
788
788
  function fr() {
789
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = f(f({}, lr), e), t = r.accept, n = r.disabled, i = r.getFilesFromEvent, a = r.maxSize, s = r.minSize, u = r.multiple, d = r.maxFiles, A = r.onDragEnter, w = r.onDragLeave, v = r.onDragOver, x = r.onDrop, E = r.onDropAccepted, j = r.onDropRejected, P = r.onFileDialogCancel, K = r.onFileDialogOpen, G = r.useFsAccessApi, q = r.autoFocus, O = r.preventDropOnDocument, je = r.noClick, ce = r.noKeyboard, Pe = r.noDrag, T = r.noDragEventsBubbling, ue = r.onError, H = r.validator, W = L(function() {
789
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = f(f({}, lr), e), t = r.accept, n = r.disabled, i = r.getFilesFromEvent, a = r.maxSize, s = r.minSize, u = r.multiple, d = r.maxFiles, A = r.onDragEnter, w = r.onDragLeave, v = r.onDragOver, F = r.onDrop, E = r.onDropAccepted, j = r.onDropRejected, P = r.onFileDialogCancel, K = r.onFileDialogOpen, Y = r.useFsAccessApi, q = r.autoFocus, O = r.preventDropOnDocument, je = r.noClick, ce = r.noKeyboard, Pe = r.noDrag, T = r.noDragEventsBubbling, ue = r.onError, H = r.validator, W = L(function() {
790
790
  return nt(t);
791
791
  }, [t]), Te = L(function() {
792
792
  return tt(t);
@@ -794,8 +794,8 @@ function fr() {
794
794
  return typeof K == "function" ? K : Ze;
795
795
  }, [K]), J = L(function() {
796
796
  return typeof P == "function" ? P : Ze;
797
- }, [P]), g = te(null), h = te(null), pr = br(bt, xe), Ie = Ae(pr, 2), le = Ie[0], y = Ie[1], dr = le.isFocused, Se = le.isFileDialogActive, V = te(typeof window < "u" && window.isSecureContext && G && rt()), Ce = function() {
798
- !V.current && Se && setTimeout(function() {
797
+ }, [P]), m = te(null), h = te(null), pr = br(bt, Fe), Ie = Ae(pr, 2), le = Ie[0], y = Ie[1], dr = le.isFocused, Ce = le.isFileDialogActive, V = te(typeof window < "u" && window.isSecureContext && Y && rt()), Se = function() {
798
+ !V.current && Ce && setTimeout(function() {
799
799
  if (h.current) {
800
800
  var c = h.current.files;
801
801
  c.length || (y({
@@ -805,27 +805,27 @@ function fr() {
805
805
  }, 300);
806
806
  };
807
807
  De(function() {
808
- return window.addEventListener("focus", Ce, !1), function() {
809
- window.removeEventListener("focus", Ce, !1);
808
+ return window.addEventListener("focus", Se, !1), function() {
809
+ window.removeEventListener("focus", Se, !1);
810
810
  };
811
- }, [h, Se, J, V]);
812
- var C = te([]), Re = function(c) {
813
- g.current && g.current.contains(c.target) || (c.preventDefault(), C.current = []);
811
+ }, [h, Ce, J, V]);
812
+ var S = te([]), ke = function(c) {
813
+ m.current && m.current.contains(c.target) || (c.preventDefault(), S.current = []);
814
814
  };
815
815
  De(function() {
816
- return O && (document.addEventListener("dragover", Qe, !1), document.addEventListener("drop", Re, !1)), function() {
817
- O && (document.removeEventListener("dragover", Qe), document.removeEventListener("drop", Re));
816
+ return O && (document.addEventListener("dragover", Qe, !1), document.addEventListener("drop", ke, !1)), function() {
817
+ O && (document.removeEventListener("dragover", Qe), document.removeEventListener("drop", ke));
818
818
  };
819
- }, [g, O]), De(function() {
820
- return !n && q && g.current && g.current.focus(), function() {
819
+ }, [m, O]), De(function() {
820
+ return !n && q && m.current && m.current.focus(), function() {
821
821
  };
822
- }, [g, q, n]);
822
+ }, [m, q, n]);
823
823
  var I = D(function(o) {
824
824
  ue ? ue(o) : console.error(o);
825
- }, [ue]), ke = D(function(o) {
826
- o.preventDefault(), o.persist(), ee(o), C.current = [].concat(lt(C.current), [o.target]), ne(o) && Promise.resolve(i(o)).then(function(c) {
825
+ }, [ue]), Re = D(function(o) {
826
+ o.preventDefault(), o.persist(), ee(o), S.current = [].concat(lt(S.current), [o.target]), ne(o) && Promise.resolve(i(o)).then(function(c) {
827
827
  if (!(ie(o) && !T)) {
828
- var p = c.length, m = p > 0 && Qr({
828
+ var p = c.length, g = p > 0 && Qr({
829
829
  files: c,
830
830
  accept: W,
831
831
  minSize: s,
@@ -833,9 +833,9 @@ function fr() {
833
833
  multiple: u,
834
834
  maxFiles: d,
835
835
  validator: H
836
- }), b = p > 0 && !m;
836
+ }), b = p > 0 && !g;
837
837
  y({
838
- isDragAccept: m,
838
+ isDragAccept: g,
839
839
  isDragReject: b,
840
840
  isDragActive: !0,
841
841
  type: "setDraggedFiles"
@@ -855,24 +855,24 @@ function fr() {
855
855
  return c && v && v(o), !1;
856
856
  }, [v, T]), Le = D(function(o) {
857
857
  o.preventDefault(), o.persist(), ee(o);
858
- var c = C.current.filter(function(m) {
859
- return g.current && g.current.contains(m);
858
+ var c = S.current.filter(function(g) {
859
+ return m.current && m.current.contains(g);
860
860
  }), p = c.indexOf(o.target);
861
- p !== -1 && c.splice(p, 1), C.current = c, !(c.length > 0) && (y({
861
+ p !== -1 && c.splice(p, 1), S.current = c, !(c.length > 0) && (y({
862
862
  type: "setDraggedFiles",
863
863
  isDragActive: !1,
864
864
  isDragAccept: !1,
865
865
  isDragReject: !1
866
866
  }), ne(o) && w && w(o));
867
- }, [g, w, T]), Q = D(function(o, c) {
868
- var p = [], m = [];
867
+ }, [m, w, T]), Q = D(function(o, c) {
868
+ var p = [], g = [];
869
869
  o.forEach(function(b) {
870
- var B = ir(b, W), z = Ae(B, 2), pe = z[0], de = z[1], me = ar(b, s, a), re = Ae(me, 2), ge = re[0], ve = re[1], ye = H ? H(b) : null;
871
- if (pe && ge && !ye)
870
+ var B = ir(b, W), z = Ae(B, 2), pe = z[0], de = z[1], ge = ar(b, s, a), re = Ae(ge, 2), me = re[0], ve = re[1], ye = H ? H(b) : null;
871
+ if (pe && me && !ye)
872
872
  p.push(b);
873
873
  else {
874
874
  var be = [de, ve];
875
- ye && (be = be.concat(ye)), m.push({
875
+ ye && (be = be.concat(ye)), g.push({
876
876
  file: b,
877
877
  errors: be.filter(function(yr) {
878
878
  return yr;
@@ -880,24 +880,24 @@ function fr() {
880
880
  });
881
881
  }
882
882
  }), (!u && p.length > 1 || u && d >= 1 && p.length > d) && (p.forEach(function(b) {
883
- m.push({
883
+ g.push({
884
884
  file: b,
885
885
  errors: [Vr]
886
886
  });
887
887
  }), p.splice(0)), y({
888
888
  acceptedFiles: p,
889
- fileRejections: m,
889
+ fileRejections: g,
890
890
  type: "setFiles"
891
- }), x && x(p, m, c), m.length > 0 && j && j(m, c), p.length > 0 && E && E(p, c);
892
- }, [y, u, W, s, a, d, x, E, j, H]), X = D(function(o) {
893
- o.preventDefault(), o.persist(), ee(o), C.current = [], ne(o) && Promise.resolve(i(o)).then(function(c) {
891
+ }), F && F(p, g, c), g.length > 0 && j && j(g, c), p.length > 0 && E && E(p, c);
892
+ }, [y, u, W, s, a, d, F, E, j, H]), X = D(function(o) {
893
+ o.preventDefault(), o.persist(), ee(o), S.current = [], ne(o) && Promise.resolve(i(o)).then(function(c) {
894
894
  ie(o) && !T || Q(c, o);
895
895
  }).catch(function(c) {
896
896
  return I(c);
897
897
  }), y({
898
898
  type: "reset"
899
899
  });
900
- }, [i, Q, I, T]), R = D(function() {
900
+ }, [i, Q, I, T]), k = D(function() {
901
901
  if (V.current) {
902
902
  y({
903
903
  type: "openDialog"
@@ -922,9 +922,9 @@ function fr() {
922
922
  h.current && (y({
923
923
  type: "openDialog"
924
924
  }), se(), h.current.value = null, h.current.click());
925
- }, [y, se, J, G, Q, I, Te, u]), Me = D(function(o) {
926
- !g.current || !g.current.isEqualNode(o.target) || (o.key === " " || o.key === "Enter" || o.keyCode === 32 || o.keyCode === 13) && (o.preventDefault(), R());
927
- }, [g, R]), $e = D(function() {
925
+ }, [y, se, J, Y, Q, I, Te, u]), Me = D(function(o) {
926
+ !m.current || !m.current.isEqualNode(o.target) || (o.key === " " || o.key === "Enter" || o.keyCode === 32 || o.keyCode === 13) && (o.preventDefault(), k());
927
+ }, [m, k]), $e = D(function() {
928
928
  y({
929
929
  type: "focus"
930
930
  });
@@ -933,45 +933,45 @@ function fr() {
933
933
  type: "blur"
934
934
  });
935
935
  }, []), He = D(function() {
936
- je || (et() ? setTimeout(R, 0) : R());
937
- }, [je, R]), k = function(c) {
936
+ je || (et() ? setTimeout(k, 0) : k());
937
+ }, [je, k]), R = function(c) {
938
938
  return n ? null : c;
939
939
  }, fe = function(c) {
940
- return ce ? null : k(c);
940
+ return ce ? null : R(c);
941
941
  }, Z = function(c) {
942
- return Pe ? null : k(c);
942
+ return Pe ? null : R(c);
943
943
  }, ee = function(c) {
944
944
  T && c.stopPropagation();
945
- }, mr = L(function() {
945
+ }, gr = L(function() {
946
946
  return function() {
947
- var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, p = c === void 0 ? "ref" : c, m = o.role, b = o.onKeyDown, B = o.onFocus, z = o.onBlur, pe = o.onClick, de = o.onDragEnter, me = o.onDragOver, re = o.onDragLeave, ge = o.onDrop, ve = ae(o, ut);
947
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, p = c === void 0 ? "ref" : c, g = o.role, b = o.onKeyDown, B = o.onFocus, z = o.onBlur, pe = o.onClick, de = o.onDragEnter, ge = o.onDragOver, re = o.onDragLeave, me = o.onDrop, ve = ae(o, ut);
948
948
  return f(f(Oe({
949
949
  onKeyDown: fe(_(b, Me)),
950
950
  onFocus: fe(_(B, $e)),
951
951
  onBlur: fe(_(z, Ke)),
952
- onClick: k(_(pe, He)),
953
- onDragEnter: Z(_(de, ke)),
954
- onDragOver: Z(_(me, ze)),
952
+ onClick: R(_(pe, He)),
953
+ onDragEnter: Z(_(de, Re)),
954
+ onDragOver: Z(_(ge, ze)),
955
955
  onDragLeave: Z(_(re, Le)),
956
- onDrop: Z(_(ge, X)),
957
- role: typeof m == "string" && m !== "" ? m : "presentation"
958
- }, p, g), !n && !ce ? {
956
+ onDrop: Z(_(me, X)),
957
+ role: typeof g == "string" && g !== "" ? g : "presentation"
958
+ }, p, m), !n && !ce ? {
959
959
  tabIndex: 0
960
960
  } : {}), ve);
961
961
  };
962
- }, [g, Me, $e, Ke, He, ke, ze, Le, X, ce, Pe, n]), gr = D(function(o) {
962
+ }, [m, Me, $e, Ke, He, Re, ze, Le, X, ce, Pe, n]), mr = D(function(o) {
963
963
  o.stopPropagation();
964
964
  }, []), vr = L(function() {
965
965
  return function() {
966
- var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, p = c === void 0 ? "ref" : c, m = o.onChange, b = o.onClick, B = ae(o, st), z = Oe({
966
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = o.refKey, p = c === void 0 ? "ref" : c, g = o.onChange, b = o.onClick, B = ae(o, st), z = Oe({
967
967
  accept: W,
968
968
  multiple: u,
969
969
  type: "file",
970
970
  style: {
971
971
  display: "none"
972
972
  },
973
- onChange: k(_(m, X)),
974
- onClick: k(_(b, gr)),
973
+ onChange: R(_(g, X)),
974
+ onClick: R(_(b, mr)),
975
975
  tabIndex: -1
976
976
  }, p, h);
977
977
  return f(f({}, z), B);
@@ -979,11 +979,11 @@ function fr() {
979
979
  }, [h, t, u, X, n]);
980
980
  return f(f({}, le), {}, {
981
981
  isFocused: dr && !n,
982
- getRootProps: mr,
982
+ getRootProps: gr,
983
983
  getInputProps: vr,
984
- rootRef: g,
984
+ rootRef: m,
985
985
  inputRef: h,
986
- open: k(R)
986
+ open: R(k)
987
987
  });
988
988
  }
989
989
  function bt(e, r) {
@@ -997,7 +997,7 @@ function bt(e, r) {
997
997
  isFocused: !1
998
998
  });
999
999
  case "openDialog":
1000
- return f(f({}, xe), {}, {
1000
+ return f(f({}, Fe), {}, {
1001
1001
  isFileDialogActive: !0
1002
1002
  });
1003
1003
  case "closeDialog":
@@ -1016,21 +1016,24 @@ function bt(e, r) {
1016
1016
  fileRejections: r.fileRejections
1017
1017
  });
1018
1018
  case "reset":
1019
- return f({}, xe);
1019
+ return f({}, Fe);
1020
1020
  default:
1021
1021
  return e;
1022
1022
  }
1023
1023
  }
1024
1024
  function Ze() {
1025
1025
  }
1026
- const ht = "_root_1kc1u_1", Dt = "_dropzone_1kc1u_1", At = "_text_1kc1u_21", wt = "_disabled_1kc1u_30", _t = "_focused_1kc1u_41", Ft = "_dragActive_1kc1u_41", Ot = "_linkText_1kc1u_47", F = {
1027
- root: ht,
1028
- dropzone: Dt,
1029
- text: At,
1030
- disabled: wt,
1031
- focused: _t,
1032
- dragActive: Ft,
1033
- linkText: Ot
1026
+ function ht(e) {
1027
+ return wr({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }, child: [] }, { tag: "polyline", attr: { points: "17 8 12 3 7 8" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "3", x2: "12", y2: "15" }, child: [] }] })(e);
1028
+ }
1029
+ const Dt = "_root_1kc1u_1", At = "_dropzone_1kc1u_1", wt = "_text_1kc1u_21", _t = "_disabled_1kc1u_30", xt = "_focused_1kc1u_41", Ot = "_dragActive_1kc1u_41", Ft = "_linkText_1kc1u_47", x = {
1030
+ root: Dt,
1031
+ dropzone: At,
1032
+ text: wt,
1033
+ disabled: _t,
1034
+ focused: xt,
1035
+ dragActive: Ot,
1036
+ linkText: Ft
1034
1037
  };
1035
1038
  function Rt(e) {
1036
1039
  const {
@@ -1046,22 +1049,22 @@ function Rt(e) {
1046
1049
  isFocused: A,
1047
1050
  isDragActive: w,
1048
1051
  isDragAccept: v,
1049
- isDragReject: x,
1052
+ isDragReject: F,
1050
1053
  isFileDialogActive: E,
1051
1054
  acceptedFiles: j,
1052
1055
  getRootProps: P,
1053
1056
  getInputProps: K
1054
- } = fr(d), G = er.useCallback((O) => {
1057
+ } = fr(d), Y = er.useCallback((O) => {
1055
1058
  u && u(O);
1056
- }, [u]), q = Fr(F.dropzone, {
1057
- [F.disabled]: d.disabled,
1058
- [F.focused]: A,
1059
- [F.dragActive]: w,
1060
- [F.dragAccept]: v,
1061
- [F.dragReject]: x,
1062
- [F.fileDialogActive]: E
1059
+ }, [u]), q = xr(x.dropzone, {
1060
+ [x.disabled]: d.disabled,
1061
+ [x.focused]: A,
1062
+ [x.dragActive]: w,
1063
+ [x.dragAccept]: v,
1064
+ [x.dragReject]: F,
1065
+ [x.fileDialogActive]: E
1063
1066
  });
1064
- return /* @__PURE__ */ he("section", { className: F.root, children: [
1067
+ return /* @__PURE__ */ he("section", { className: x.root, children: [
1065
1068
  /* @__PURE__ */ he(
1066
1069
  "div",
1067
1070
  {
@@ -1079,10 +1082,10 @@ function Rt(e) {
1079
1082
  })
1080
1083
  }
1081
1084
  ),
1082
- /* @__PURE__ */ N(_r, { size: "xxlarge", children: /* @__PURE__ */ N(wr, {}) }),
1083
- /* @__PURE__ */ he("span", { className: F.text, children: [
1085
+ /* @__PURE__ */ N(_r, { size: "xxlarge", children: /* @__PURE__ */ N(ht, {}) }),
1086
+ /* @__PURE__ */ he("span", { className: x.text, children: [
1084
1087
  i ? `${n} ` : n,
1085
- !!i && /* @__PURE__ */ N("span", { className: F.linkText, children: i })
1088
+ !!i && /* @__PURE__ */ N("span", { className: x.linkText, children: i })
1086
1089
  ] })
1087
1090
  ]
1088
1091
  }
@@ -1092,7 +1095,7 @@ function Rt(e) {
1092
1095
  {
1093
1096
  removeAriaLabel: a,
1094
1097
  file: O,
1095
- onRemoveFile: G
1098
+ onRemoveFile: Y
1096
1099
  },
1097
1100
  O.path
1098
1101
  ))
@@ -1,7 +1,7 @@
1
1
  import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
2
  import c from "react";
3
3
  import { Button as i } from "../Button/Button.js";
4
- import { I as m } from "../../Icons-CIXYyG0c.js";
4
+ import { Icons as m } from "../../style-guide/Icons/Icons.js";
5
5
  import '../../assets/ItemPreview.css';const h = "_root_15ual_1", p = "_filePath_15ual_13", n = {
6
6
  root: h,
7
7
  filePath: p
@@ -1,34 +1,34 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import h from "react";
3
- import { ui as d } from "../ui.js";
4
- import { clsx as c } from "../../utils/clsx.js";
5
- import '../../assets/Island.css';const a = "_root_aa951_1", w = "_grow_aa951_15", t = {
6
- root: a,
7
- grow: w,
8
- "no-round-border-top-left": "_no-round-border-top-left_aa951_19",
9
- "no-round-border-top-right": "_no-round-border-top-right_aa951_22",
10
- "no-round-border-bottom-left": "_no-round-border-bottom-left_aa951_25",
11
- "no-round-border-bottom-right": "_no-round-border-bottom-right_aa951_28"
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { ui as h } from "../ui.js";
4
+ import { clsx as d } from "../../utils/clsx.js";
5
+ import '../../assets/Island.css';const w = "_root_cg6qz_1", R = "_grow_cg6qz_7", t = {
6
+ root: w,
7
+ grow: R,
8
+ "no-round-border-top-left": "_no-round-border-top-left_cg6qz_11",
9
+ "no-round-border-top-right": "_no-round-border-top-right_cg6qz_14",
10
+ "no-round-border-bottom-left": "_no-round-border-bottom-left_cg6qz_17",
11
+ "no-round-border-bottom-right": "_no-round-border-bottom-right_cg6qz_20"
12
12
  };
13
- var R = /* @__PURE__ */ ((o) => (o[o.TopLeft = 1] = "TopLeft", o[o.TopRight = 2] = "TopRight", o[o.BottomLeft = 4] = "BottomLeft", o[o.BottomRight = 8] = "BottomRight", o[o.Top = 3] = "Top", o[o.Left = 5] = "Left", o[o.Right = 10] = "Right", o[o.Bottom = 12] = "Bottom", o[o.All = 15] = "All", o))(R || {});
14
- const s = h.forwardRef(function(f, e) {
13
+ var q = /* @__PURE__ */ ((o) => (o[o.TopLeft = 1] = "TopLeft", o[o.TopRight = 2] = "TopRight", o[o.BottomLeft = 4] = "BottomLeft", o[o.BottomRight = 8] = "BottomRight", o[o.Top = 3] = "Top", o[o.Left = 5] = "Left", o[o.Right = 10] = "Right", o[o.Bottom = 12] = "Bottom", o[o.All = 15] = "All", o))(q || {});
14
+ const n = u.forwardRef(function(m, f) {
15
15
  const {
16
- grow: _ = !1,
17
- widthQ: i = 0,
16
+ grow: e = !1,
17
+ widthQ: g = 0,
18
18
  straightCorner: r = 0,
19
- children: b,
20
- className: g
21
- } = f, p = c(t.root, g, {
22
- [t.grow]: _,
19
+ children: _,
20
+ className: c
21
+ } = m, b = d(t.root, c, {
22
+ [t.grow]: e,
23
23
  [t["no-round-border-top-left"]]: r & 1,
24
24
  [t["no-round-border-top-right"]]: r & 2,
25
25
  [t["no-round-border-bottom-left"]]: r & 4,
26
26
  [t["no-round-border-bottom-right"]]: r & 8
27
27
  /* BottomRight */
28
- }), m = {};
29
- return i > 0 && (m.width = d.q(i)), /* @__PURE__ */ u("div", { className: p, style: m, ref: e, children: b });
28
+ }), i = {};
29
+ return g > 0 && (i.width = h.q(g)), /* @__PURE__ */ p("div", { className: b, style: i, ref: f, children: _ });
30
30
  });
31
31
  export {
32
- s as Island,
33
- R as IslandCorner
32
+ n as Island,
33
+ q as IslandCorner
34
34
  };