@hybridcore/ui 1.5.26 → 1.5.28

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.
@@ -184,26 +184,26 @@ function Qn(e) {
184
184
  return qn(Me("", null, null, null, [""], e = Yn(e), 0, [0], e));
185
185
  }
186
186
  function Me(e, t, n, r, o, i, a, c, s) {
187
- for (var m = 0, g = 0, f = a, y = 0, v = 0, w = 0, A = 1, D = 1, E = 1, C = 0, S = "", p = o, b = i, h = r, l = S; D; )
187
+ for (var h = 0, m = 0, f = a, y = 0, v = 0, w = 0, A = 1, D = 1, E = 1, C = 0, S = "", l = o, b = i, g = r, p = S; D; )
188
188
  switch (w = C, C = H()) {
189
189
  case 40:
190
- if (w != 108 && R(l, f - 1) == 58) {
191
- je(l += u(rt(C), "&", "&\f"), "&\f", Qt(m ? c[m - 1] : 0)) != -1 && (E = -1);
190
+ if (w != 108 && R(p, f - 1) == 58) {
191
+ je(p += u(rt(C), "&", "&\f"), "&\f", Qt(h ? c[h - 1] : 0)) != -1 && (E = -1);
192
192
  break;
193
193
  }
194
194
  case 34:
195
195
  case 39:
196
196
  case 91:
197
- l += rt(C);
197
+ p += rt(C);
198
198
  break;
199
199
  case 9:
200
200
  case 10:
201
201
  case 13:
202
202
  case 32:
203
- l += Xn(w);
203
+ p += Xn(w);
204
204
  break;
205
205
  case 92:
206
- l += Zn(Le() - 1, 7);
206
+ p += Zn(Le() - 1, 7);
207
207
  continue;
208
208
  case 47:
209
209
  switch (oe()) {
@@ -212,11 +212,11 @@ function Me(e, t, n, r, o, i, a, c, s) {
212
212
  xe(er(Kn(H(), Le()), t, n, s), s);
213
213
  break;
214
214
  default:
215
- l += "/";
215
+ p += "/";
216
216
  }
217
217
  break;
218
218
  case 123 * A:
219
- c[m++] = B(l) * E;
219
+ c[h++] = B(p) * E;
220
220
  case 125 * A:
221
221
  case 59:
222
222
  case 0:
@@ -224,31 +224,31 @@ function Me(e, t, n, r, o, i, a, c, s) {
224
224
  case 0:
225
225
  case 125:
226
226
  D = 0;
227
- case 59 + g:
228
- E == -1 && (l = u(l, /\f/g, "")), v > 0 && B(l) - f && xe(v > 32 ? Nt(l + ";", r, n, f - 1, s) : Nt(u(l, " ", "") + ";", r, n, f - 2, s), s);
227
+ case 59 + m:
228
+ E == -1 && (p = u(p, /\f/g, "")), v > 0 && B(p) - f && xe(v > 32 ? Nt(p + ";", r, n, f - 1, s) : Nt(u(p, " ", "") + ";", r, n, f - 2, s), s);
229
229
  break;
230
230
  case 59:
231
- l += ";";
231
+ p += ";";
232
232
  default:
233
- if (xe(h = Ot(l, t, n, m, g, o, c, S, p = [], b = [], f, i), i), C === 123)
234
- if (g === 0)
235
- Me(l, t, h, h, p, i, f, c, b);
233
+ if (xe(g = Ot(p, t, n, h, m, o, c, S, l = [], b = [], f, i), i), C === 123)
234
+ if (m === 0)
235
+ Me(p, t, g, g, l, i, f, c, b);
236
236
  else
237
- switch (y === 99 && R(l, 3) === 110 ? 100 : y) {
237
+ switch (y === 99 && R(p, 3) === 110 ? 100 : y) {
238
238
  case 100:
239
239
  case 108:
240
240
  case 109:
241
241
  case 115:
242
- Me(e, h, h, r && xe(Ot(e, h, h, 0, 0, o, c, S, o, p = [], f, b), b), o, b, f, c, r ? p : b);
242
+ Me(e, g, g, r && xe(Ot(e, g, g, 0, 0, o, c, S, o, l = [], f, b), b), o, b, f, c, r ? l : b);
243
243
  break;
244
244
  default:
245
- Me(l, h, h, h, [""], b, 0, c, b);
245
+ Me(p, g, g, g, [""], b, 0, c, b);
246
246
  }
247
247
  }
248
- m = g = v = 0, A = E = 1, S = l = "", f = a;
248
+ h = m = v = 0, A = E = 1, S = p = "", f = a;
249
249
  break;
250
250
  case 58:
251
- f = 1 + B(l), v = w;
251
+ f = 1 + B(p), v = w;
252
252
  default:
253
253
  if (A < 1) {
254
254
  if (C == 123)
@@ -256,27 +256,27 @@ function Me(e, t, n, r, o, i, a, c, s) {
256
256
  else if (C == 125 && A++ == 0 && Wn() == 125)
257
257
  continue;
258
258
  }
259
- switch (l += vt(C), C * A) {
259
+ switch (p += vt(C), C * A) {
260
260
  case 38:
261
- E = g > 0 ? 1 : (l += "\f", -1);
261
+ E = m > 0 ? 1 : (p += "\f", -1);
262
262
  break;
263
263
  case 44:
264
- c[m++] = (B(l) - 1) * E, E = 1;
264
+ c[h++] = (B(p) - 1) * E, E = 1;
265
265
  break;
266
266
  case 64:
267
- oe() === 45 && (l += rt(H())), y = oe(), g = f = B(S = l += Jn(Le())), C++;
267
+ oe() === 45 && (p += rt(H())), y = oe(), m = f = B(S = p += Jn(Le())), C++;
268
268
  break;
269
269
  case 45:
270
- w === 45 && B(l) == 2 && (A = 0);
270
+ w === 45 && B(p) == 2 && (A = 0);
271
271
  }
272
272
  }
273
273
  return i;
274
274
  }
275
- function Ot(e, t, n, r, o, i, a, c, s, m, g, f) {
275
+ function Ot(e, t, n, r, o, i, a, c, s, h, m, f) {
276
276
  for (var y = o - 1, v = o === 0 ? i : [""], w = tn(v), A = 0, D = 0, E = 0; A < r; ++A)
277
- for (var C = 0, S = ue(e, y + 1, y = Qt(D = a[A])), p = e; C < w; ++C)
278
- (p = en(D > 0 ? v[C] + " " + S : u(S, /&\f/g, v[C]))) && (s[E++] = p);
279
- return Ye(e, t, n, o === 0 ? Ue : c, s, m, g, f);
277
+ for (var C = 0, S = ue(e, y + 1, y = Qt(D = a[A])), l = e; C < w; ++C)
278
+ (l = en(D > 0 ? v[C] + " " + S : u(S, /&\f/g, v[C]))) && (s[E++] = l);
279
+ return Ye(e, t, n, o === 0 ? Ue : c, s, h, m, f);
280
280
  }
281
281
  function er(e, t, n, r) {
282
282
  return Ye(e, t, n, Kt, vt(Un()), ue(e, 2, -2), 0, r);
@@ -404,8 +404,8 @@ function rn(e, t, n) {
404
404
  break;
405
405
  case 5152:
406
406
  case 5920:
407
- return u(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, i, a, c, s, m) {
408
- return N + o + ":" + i + m + (a ? N + o + "-span:" + (c ? s : +s - +i) + m : "") + e;
407
+ return u(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(r, o, i, a, c, s, h) {
408
+ return N + o + ":" + i + h + (a ? N + o + "-span:" + (c ? s : +s - +i) + h : "") + e;
409
409
  });
410
410
  case 4949:
411
411
  if (R(e, t + 6) === 121)
@@ -600,9 +600,9 @@ function fn(e, t, n) {
600
600
  for (var i = Tt(e), a = Tt(t), c = 0; c < o.length; ++c) {
601
601
  var s = o[c];
602
602
  if (!(s in mr || n && n[s] || a && s in a || i && s in i)) {
603
- var m = br(t, s);
603
+ var h = br(t, s);
604
604
  try {
605
- yr(e, s, m);
605
+ yr(e, s, h);
606
606
  } catch {
607
607
  }
608
608
  }
@@ -731,8 +731,8 @@ var kr = function() {
731
731
  if (c) {
732
732
  var s = c.match(Pr);
733
733
  if (s) {
734
- var m = 0 | parseInt(s[1], 10), g = s[2];
735
- m !== 0 && (Er(g, m), Or(e, g, s[3]), e.getTag().insertRules(m, o)), o.length = 0;
734
+ var h = 0 | parseInt(s[1], 10), m = s[2];
735
+ h !== 0 && (Er(m, h), Or(e, m, s[3]), e.getTag().insertRules(h, o)), o.length = 0;
736
736
  } else o.push(c);
737
737
  }
738
738
  }
@@ -808,7 +808,7 @@ var hn = function(e) {
808
808
  var o = this;
809
809
  this.options = $($({}, _r), t), this.gs = n, this.names = new Map(r), this.server = !!t.isServer, !this.server && Be && Lt && (Lt = !1, jt(this)), St(this, function() {
810
810
  return function(i) {
811
- for (var a = i.getTag(), c = a.length, s = "", m = function(f) {
811
+ for (var a = i.getTag(), c = a.length, s = "", h = function(f) {
812
812
  var y = function(E) {
813
813
  return Ge.get(E);
814
814
  }(f);
@@ -819,7 +819,7 @@ var hn = function(e) {
819
819
  v !== void 0 && v.forEach(function(E) {
820
820
  E.length > 0 && (D += "".concat(E, ","));
821
821
  }), s += "".concat(w).concat(A, '{content:"').concat(D, '"}').concat(bt);
822
- }, g = 0; g < c; g++) m(g);
822
+ }, m = 0; m < c; m++) h(m);
823
823
  return s;
824
824
  }(o);
825
825
  });
@@ -864,18 +864,18 @@ function gn(e, t) {
864
864
  });
865
865
  }
866
866
  function jr(e) {
867
- var t, n, r, o = fe, i = o.options, a = i === void 0 ? fe : i, c = o.plugins, s = c === void 0 ? Ze : c, m = function(y, v, w) {
867
+ var t, n, r, o = fe, i = o.options, a = i === void 0 ? fe : i, c = o.plugins, s = c === void 0 ? Ze : c, h = function(y, v, w) {
868
868
  return w.startsWith(n) && w.endsWith(n) && w.replaceAll(n, "").length > 0 ? ".".concat(t) : y;
869
- }, g = s.slice();
870
- g.push(function(y) {
871
- y.type === Ue && y.value.includes("&") && (y.props[0] = y.props[0].replace($r, n).replace(r, m));
872
- }), a.prefix && g.push(or), g.push(tr);
869
+ }, m = s.slice();
870
+ m.push(function(y) {
871
+ y.type === Ue && y.value.includes("&") && (y.props[0] = y.props[0].replace($r, n).replace(r, h));
872
+ }), a.prefix && m.push(or), m.push(tr);
873
873
  var f = function(y, v, w, A) {
874
874
  v === void 0 && (v = ""), w === void 0 && (w = ""), A === void 0 && (A = "&"), t = A, n = v, r = new RegExp("\\".concat(n, "\\b"), "g");
875
875
  var D = y.replace(zr, ""), E = Qn(w || v ? "".concat(w, " ").concat(v, " { ").concat(D, " }") : D);
876
876
  a.namespace && (E = gn(E, a.namespace));
877
877
  var C = [];
878
- return He(E, nr(g.concat(rr(function(S) {
878
+ return He(E, nr(m.concat(rr(function(S) {
879
879
  return C.push(S);
880
880
  })))), C;
881
881
  };
@@ -960,17 +960,17 @@ var Vr = cn(Xe), Hr = function() {
960
960
  o = re(o, a), this.staticRulesId = a;
961
961
  }
962
962
  else {
963
- for (var s = te(this.baseHash, r.hash), m = "", g = 0; g < this.rules.length; g++) {
964
- var f = this.rules[g];
965
- if (typeof f == "string") m += f, process.env.NODE_ENV !== "production" && (s = te(s, f));
963
+ for (var s = te(this.baseHash, r.hash), h = "", m = 0; m < this.rules.length; m++) {
964
+ var f = this.rules[m];
965
+ if (typeof f == "string") h += f, process.env.NODE_ENV !== "production" && (s = te(s, f));
966
966
  else if (f) {
967
967
  var y = zt(ie(f, t, n, r));
968
- s = te(s, y + g), m += y;
968
+ s = te(s, y + m), h += y;
969
969
  }
970
970
  }
971
- if (m) {
971
+ if (h) {
972
972
  var v = ft(s >>> 0);
973
- n.hasNameForId(this.componentId, v) || n.insertRules(this.componentId, v, r(m, ".".concat(v), void 0, this.componentId)), o = re(o, v);
973
+ n.hasNameForId(this.componentId, v) || n.insertRules(this.componentId, v, r(h, ".".concat(v), void 0, this.componentId)), o = re(o, v);
974
974
  }
975
975
  }
976
976
  return o;
@@ -979,61 +979,61 @@ var Vr = cn(Xe), Hr = function() {
979
979
  wn.Consumer;
980
980
  var at = {}, Ht = /* @__PURE__ */ new Set();
981
981
  function Br(e, t, n) {
982
- var r = wt(e), o = e, i = !it(e), a = t.attrs, c = a === void 0 ? Ze : a, s = t.componentId, m = s === void 0 ? function(p, b) {
983
- var h = typeof p != "string" ? "sc" : Rt(p);
984
- at[h] = (at[h] || 0) + 1;
985
- var l = "".concat(h, "-").concat(dr(Xe + h + at[h]));
986
- return b ? "".concat(b, "-").concat(l) : l;
987
- }(t.displayName, t.parentComponentId) : s, g = t.displayName, f = g === void 0 ? function(p) {
988
- return it(p) ? "styled.".concat(p) : "Styled(".concat(ln(p), ")");
989
- }(e) : g, y = t.displayName && t.componentId ? "".concat(Rt(t.displayName), "-").concat(t.componentId) : t.componentId || m, v = r && o.attrs ? o.attrs.concat(c).filter(Boolean) : c, w = t.shouldForwardProp;
982
+ var r = wt(e), o = e, i = !it(e), a = t.attrs, c = a === void 0 ? Ze : a, s = t.componentId, h = s === void 0 ? function(l, b) {
983
+ var g = typeof l != "string" ? "sc" : Rt(l);
984
+ at[g] = (at[g] || 0) + 1;
985
+ var p = "".concat(g, "-").concat(dr(Xe + g + at[g]));
986
+ return b ? "".concat(b, "-").concat(p) : p;
987
+ }(t.displayName, t.parentComponentId) : s, m = t.displayName, f = m === void 0 ? function(l) {
988
+ return it(l) ? "styled.".concat(l) : "Styled(".concat(ln(l), ")");
989
+ }(e) : m, y = t.displayName && t.componentId ? "".concat(Rt(t.displayName), "-").concat(t.componentId) : t.componentId || h, v = r && o.attrs ? o.attrs.concat(c).filter(Boolean) : c, w = t.shouldForwardProp;
990
990
  if (r && o.shouldForwardProp) {
991
991
  var A = o.shouldForwardProp;
992
992
  if (t.shouldForwardProp) {
993
993
  var D = t.shouldForwardProp;
994
- w = function(p, b) {
995
- return A(p, b) && D(p, b);
994
+ w = function(l, b) {
995
+ return A(l, b) && D(l, b);
996
996
  };
997
997
  } else w = A;
998
998
  }
999
999
  var E = new Hr(n, y, r ? o.componentStyle : void 0);
1000
- function C(p, b) {
1001
- return function(h, l, T) {
1002
- var G = h.attrs, Ke = h.componentStyle, ve = h.defaultProps, Pe = h.foldedComponentIds, Oe = h.styledComponentId, be = h.target, Ne = Ce.useContext(wn), Ie = Mt(), q = h.shouldForwardProp || Ie.shouldForwardProp;
1000
+ function C(l, b) {
1001
+ return function(g, p, T) {
1002
+ var G = g.attrs, Ke = g.componentStyle, ve = g.defaultProps, Pe = g.foldedComponentIds, Oe = g.styledComponentId, be = g.target, Ne = Ce.useContext(wn), Ie = Mt(), q = g.shouldForwardProp || Ie.shouldForwardProp;
1003
1003
  process.env.NODE_ENV !== "production" && kt(Oe);
1004
- var we = cr(l, Ne, ve) || fe, z = function(W, X, Q) {
1004
+ var we = cr(p, Ne, ve) || fe, z = function(W, X, Q) {
1005
1005
  for (var Z, V = $($({}, X), { className: void 0, theme: Q }), ee = 0; ee < W.length; ee += 1) {
1006
1006
  var K = he(Z = W[ee]) ? Z(V) : Z;
1007
1007
  for (var j in K) V[j] = j === "className" ? re(V[j], K[j]) : j === "style" ? $($({}, V[j]), K[j]) : K[j];
1008
1008
  }
1009
1009
  return X.className && (V.className = re(V.className, X.className)), V;
1010
- }(G, l, we), U = z.as || be, x = {};
1010
+ }(G, p, we), U = z.as || be, x = {};
1011
1011
  for (var P in z) z[P] === void 0 || P[0] === "$" || P === "as" || P === "theme" && z.theme === we || (P === "forwardedAs" ? x.as = z.forwardedAs : q && !q(P, U) || (x[P] = z[P], q || process.env.NODE_ENV !== "development" || Fn(P) || Ht.has(P) || !dt.has(U) || (Ht.add(P), console.warn('styled-components: it looks like an unknown prop "'.concat(P, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
1012
1012
  var _ = function(W, X) {
1013
1013
  var Q = Mt(), Z = W.generateAndInjectStyles(X, Q.styleSheet, Q.stylis);
1014
1014
  return process.env.NODE_ENV !== "production" && kt(Z), Z;
1015
1015
  }(Ke, z);
1016
- process.env.NODE_ENV !== "production" && h.warnTooManyClasses && h.warnTooManyClasses(_);
1016
+ process.env.NODE_ENV !== "production" && g.warnTooManyClasses && g.warnTooManyClasses(_);
1017
1017
  var F = re(Pe, Oe);
1018
1018
  return _ && (F += " " + _), z.className && (F += " " + z.className), x[it(U) && !dt.has(U) ? "class" : "className"] = F, T && (x.ref = T), Cn(U, x);
1019
- }(S, p, b);
1019
+ }(S, l, b);
1020
1020
  }
1021
1021
  C.displayName = f;
1022
1022
  var S = Ce.forwardRef(C);
1023
1023
  return S.attrs = v, S.componentStyle = E, S.displayName = f, S.shouldForwardProp = w, S.foldedComponentIds = r ? re(o.foldedComponentIds, o.styledComponentId) : "", S.styledComponentId = y, S.target = r ? o.target : e, Object.defineProperty(S, "defaultProps", { get: function() {
1024
1024
  return this._foldedDefaultProps;
1025
- }, set: function(p) {
1025
+ }, set: function(l) {
1026
1026
  this._foldedDefaultProps = r ? function(b) {
1027
- for (var h = [], l = 1; l < arguments.length; l++) h[l - 1] = arguments[l];
1028
- for (var T = 0, G = h; T < G.length; T++) ht(b, G[T], !0);
1027
+ for (var g = [], p = 1; p < arguments.length; p++) g[p - 1] = arguments[p];
1028
+ for (var T = 0, G = g; T < G.length; T++) ht(b, G[T], !0);
1029
1029
  return b;
1030
- }({}, o.defaultProps, p) : p;
1031
- } }), process.env.NODE_ENV !== "production" && (sr(f, y), S.warnTooManyClasses = /* @__PURE__ */ function(p, b) {
1032
- var h = {}, l = !1;
1030
+ }({}, o.defaultProps, l) : l;
1031
+ } }), process.env.NODE_ENV !== "production" && (sr(f, y), S.warnTooManyClasses = /* @__PURE__ */ function(l, b) {
1032
+ var g = {}, p = !1;
1033
1033
  return function(T) {
1034
- if (!l && (h[T] = !0, Object.keys(h).length >= 200)) {
1034
+ if (!p && (g[T] = !0, Object.keys(g).length >= 200)) {
1035
1035
  var G = b ? ' with the id of "'.concat(b, '"') : "";
1036
- console.warn("Over ".concat(200, " classes were generated for component ").concat(p).concat(G, `.
1036
+ console.warn("Over ".concat(200, " classes were generated for component ").concat(l).concat(G, `.
1037
1037
  `) + `Consider using the attrs method, together with a style object for frequently changed styles.
1038
1038
  Example:
1039
1039
  const Component = styled.div.attrs(props => ({
@@ -1042,7 +1042,7 @@ Example:
1042
1042
  },
1043
1043
  }))\`width: 100%;\`
1044
1044
 
1045
- <Component />`), l = !0, h = {};
1045
+ <Component />`), p = !0, g = {};
1046
1046
  }
1047
1047
  };
1048
1048
  }(f, y)), St(S, function() {
@@ -1281,13 +1281,13 @@ function Kr() {
1281
1281
  var st = 0, Jr = function(e, t, n, r, o, i) {
1282
1282
  return n ? d("span", { children: "File type/size error, Hovered on types!" }, void 0) : d(qr, { children: r ? d("span", { children: "Upload disabled" }, void 0) : d(ne, e || t ? { children: i ? d(ne, { children: d("span", { children: i }, void 0) }, void 0) : L(ne, { children: [d("span", { children: "Uploaded Successfully!" }, void 0), " Upload another?"] }, void 0) } : { children: L(ne, o ? { children: [d("span", { children: o.split(" ")[0] }, void 0), " ", o.substr(o.indexOf(" ") + 1)] } : { children: [d("span", { children: "Upload" }, void 0), " or drop a file right here"] }, void 0) }, void 0) }, void 0);
1283
1283
  }, Qr = function(e) {
1284
- var t = e.name, n = e.hoverTitle, r = e.types, o = e.handleChange, i = e.classes, a = e.children, c = e.maxSize, s = e.minSize, m = e.fileOrFiles, g = e.onSizeError, f = e.onTypeError, y = e.onSelect, v = e.onDrop, w = e.disabled, A = e.label, D = e.uploadedLabel, E = e.multiple, C = e.required, S = e.onDraggingStateChange, p = e.dropMessageStyle, b = e.ariaLabel, h = e.ariaDescribedby, l = ct(null), T = ct(null), G = le(!1), Ke = G[0], ve = G[1], Pe = le(null), Oe = Pe[0], be = Pe[1], Ne = le(!1), Ie = Ne[0], q = Ne[1], we = function(x) {
1284
+ var t = e.name, n = e.hoverTitle, r = e.types, o = e.handleChange, i = e.classes, a = e.children, c = e.maxSize, s = e.minSize, h = e.fileOrFiles, m = e.onSizeError, f = e.onTypeError, y = e.onSelect, v = e.onDrop, w = e.disabled, A = e.label, D = e.uploadedLabel, E = e.multiple, C = e.required, S = e.onDraggingStateChange, l = e.dropMessageStyle, b = e.ariaLabel, g = e.ariaDescribedby, p = ct(null), T = ct(null), G = le(!1), Ke = G[0], ve = G[1], Pe = le(null), Oe = Pe[0], be = Pe[1], Ne = le(!1), Ie = Ne[0], q = Ne[1], we = function(x) {
1285
1285
  return r && !function(P, _) {
1286
1286
  var F = P.name.split(".").pop();
1287
1287
  return _.map(function(W) {
1288
1288
  return W.toLowerCase();
1289
1289
  }).includes(F.toLowerCase());
1290
- }(x, r) ? (q(!0), f && f("File type is not supported"), !1) : c && Zt(x.size) > c ? (q(!0), g && g("File size is too big"), !1) : !(s && Zt(x.size) < s) || (q(!0), g && g("File size is too small"), !1);
1290
+ }(x, r) ? (q(!0), f && f("File type is not supported"), !1) : c && Zt(x.size) > c ? (q(!0), m && m("File size is too big"), !1) : !(s && Zt(x.size) < s) || (q(!0), m && m("File size is too small"), !1);
1291
1291
  }, z = function(x) {
1292
1292
  var P = !1;
1293
1293
  if (x) {
@@ -1322,19 +1322,19 @@ var st = 0, Jr = function(e, t, n, r, o, i) {
1322
1322
  O.removeEventListener("click", ee), O.removeEventListener("dragenter", K), O.removeEventListener("dragleave", j), O.removeEventListener("dragover", Je), O.removeEventListener("drop", Qe);
1323
1323
  };
1324
1324
  }, [ee, K, j, Je, Qe, P]), Z;
1325
- }({ labelRef: l, inputRef: T, multiple: E, handleChanges: z, onDrop: v });
1325
+ }({ labelRef: p, inputRef: T, multiple: E, handleChanges: z, onDrop: v });
1326
1326
  return et(function() {
1327
1327
  S == null || S(U);
1328
1328
  }, [U]), et(function() {
1329
- m ? (ve(!0), be(m)) : (T.current && (T.current.value = ""), ve(!1), be(null));
1330
- }, [m]), L(Ur, ae({ overRide: a, className: "".concat(i || "", " ").concat(w ? "is-disabled" : ""), ref: l, htmlFor: t, onClick: function(x) {
1329
+ h ? (ve(!0), be(h)) : (T.current && (T.current.value = ""), ve(!1), be(null));
1330
+ }, [h]), L(Ur, ae({ overRide: a, className: "".concat(i || "", " ").concat(w ? "is-disabled" : ""), ref: p, htmlFor: t, onClick: function(x) {
1331
1331
  x.preventDefault(), x.stopPropagation();
1332
- }, "aria-describedby": h, role: "button", "aria-label": b }, { children: [d("input", { onClick: function(x) {
1332
+ }, "aria-describedby": g, role: "button", "aria-label": b }, { children: [d("input", { onClick: function(x) {
1333
1333
  x.stopPropagation(), T && T.current && (T.current.value = "", T.current.click());
1334
1334
  }, onChange: function(x) {
1335
1335
  var P = x.target.files, _ = E ? P : P[0], F = z(_);
1336
1336
  y && F && y(_);
1337
- }, accept: Xr(r), ref: T, type: "file", id: t, name: t, disabled: w, multiple: E, required: C }, void 0), U && d(Wr, ae({ style: p }, { children: d("span", { children: n || "Drop Here" }, void 0) }), void 0), !a && L(ne, { children: [d(Kr, {}, void 0), L(Yr, ae({ error: Ie }, { children: [Jr(Oe, Ke, Ie, w, A, D), d(Zr, { types: r, minSize: s, maxSize: c }, void 0)] }), void 0)] }, void 0), a] }), void 0);
1337
+ }, accept: Xr(r), ref: T, type: "file", id: t, name: t, disabled: w, multiple: E, required: C }, void 0), U && d(Wr, ae({ style: l }, { children: d("span", { children: n || "Drop Here" }, void 0) }), void 0), !a && L(ne, { children: [d(Kr, {}, void 0), L(Yr, ae({ error: Ie }, { children: [Jr(Oe, Ke, Ie, w, A, D), d(Zr, { types: r, minSize: s, maxSize: c }, void 0)] }), void 0)] }, void 0), a] }), void 0);
1338
1338
  };
1339
1339
  const eo = ({ type: e }) => e === "AUDIO" ? /* @__PURE__ */ d(Rn, { sx: { ml: 1 }, fontSize: "small" }) : e === "VIDEO" ? /* @__PURE__ */ d(Dn, { sx: { ml: 1 }, fontSize: "small" }) : /* @__PURE__ */ d(Tn, { sx: { ml: 1 }, fontSize: "small" }), lo = ({
1340
1340
  type: e = "IMAGE",
@@ -1347,34 +1347,33 @@ const eo = ({ type: e }) => e === "AUDIO" ? /* @__PURE__ */ d(Rn, { sx: { ml: 1
1347
1347
  uploadAction: c,
1348
1348
  onChange: s
1349
1349
  }) => {
1350
- const [m, g] = le(!1), [f, y] = le(null), v = async (p) => {
1351
- let b = new FormData();
1352
- b.append(r, p), g(!0);
1353
- const h = await c(b);
1354
- g(!1), h && s && s([...n, h].filter((l) => l));
1355
- }, w = (p) => async () => {
1350
+ const [h, m] = le(!1), [f, y] = le(null), v = async (l) => {
1351
+ m(!0);
1352
+ const b = await c(l);
1353
+ m(!1), b && s && s([...n, b].filter((g) => g));
1354
+ }, w = (l) => async () => {
1356
1355
  await zn(
1357
1356
  "Are you sure?",
1358
1357
  `${nt.startCase(nt.lowerCase(e))} will be removed!`
1359
- ) && s && s(n.filter((b) => b !== p));
1358
+ ) && s && s(n.filter((b) => b !== l));
1360
1359
  }, A = () => {
1361
1360
  At("Error!", "Type error");
1362
1361
  }, D = () => {
1363
1362
  At("Error!", `File size is out of allowed limits!
1364
1363
  Max: ${i}mb`);
1365
- }, E = (p) => () => {
1366
- y(p);
1364
+ }, E = (l) => () => {
1365
+ y(l);
1367
1366
  }, C = () => {
1368
1367
  y(null);
1369
- }, S = (p) => () => {
1370
- window.open(p, "_blank");
1368
+ }, S = (l) => () => {
1369
+ window.open(l, "_blank");
1371
1370
  };
1372
1371
  return /* @__PURE__ */ L(ne, { children: [
1373
- n.length > 0 && /* @__PURE__ */ d(ne, { children: e === "IMAGE" ? /* @__PURE__ */ d(Et, { container: !0, spacing: 1, mb: 1, children: n.map((p, b) => /* @__PURE__ */ d(Et, { item: !0, xs: 2, children: /* @__PURE__ */ L(
1372
+ n.length > 0 && /* @__PURE__ */ d(ne, { children: e === "IMAGE" ? /* @__PURE__ */ d(Et, { container: !0, spacing: 1, mb: 1, children: n.map((l, b) => /* @__PURE__ */ d(Et, { item: !0, xs: 2, children: /* @__PURE__ */ L(
1374
1373
  An,
1375
1374
  {
1376
1375
  sx: {
1377
- background: `url(${p}) no-repeat center`,
1376
+ background: `url(${l}) no-repeat center`,
1378
1377
  backgroundSize: "cover"
1379
1378
  },
1380
1379
  children: [
@@ -1383,7 +1382,7 @@ Max: ${i}mb`);
1383
1382
  {
1384
1383
  size: "small",
1385
1384
  color: "primary",
1386
- onClick: E(p),
1385
+ onClick: E(l),
1387
1386
  children: /* @__PURE__ */ d(Pn, { fontSize: "small" })
1388
1387
  }
1389
1388
  ),
@@ -1392,19 +1391,19 @@ Max: ${i}mb`);
1392
1391
  {
1393
1392
  size: "small",
1394
1393
  color: "error",
1395
- onClick: w(p),
1394
+ onClick: w(l),
1396
1395
  children: /* @__PURE__ */ d(On, { fontSize: "small" })
1397
1396
  }
1398
1397
  )
1399
1398
  ]
1400
1399
  }
1401
- ) }, b)) }) : n.map((p, b) => /* @__PURE__ */ d(
1400
+ ) }, b)) }) : n.map((l, b) => /* @__PURE__ */ d(
1402
1401
  _n,
1403
1402
  {
1404
- label: p.split("/").pop(),
1403
+ label: l.split("/").pop(),
1405
1404
  icon: /* @__PURE__ */ d(eo, { type: e }),
1406
- onClick: S(p),
1407
- onDelete: w(p),
1405
+ onClick: S(l),
1406
+ onDelete: w(l),
1408
1407
  sx: { marginRight: 1, marginBottom: 1 }
1409
1408
  },
1410
1409
  b
@@ -1412,19 +1411,20 @@ Max: ${i}mb`);
1412
1411
  /* @__PURE__ */ d(
1413
1412
  Qr,
1414
1413
  {
1414
+ name: r,
1415
1415
  types: t,
1416
1416
  multiple: o,
1417
1417
  maxSize: i,
1418
1418
  minSize: a,
1419
- disabled: m,
1419
+ disabled: h,
1420
1420
  onTypeError: A,
1421
1421
  onSizeError: D,
1422
1422
  handleChange: v,
1423
- children: m ? /* @__PURE__ */ L(Ct, { children: [
1424
- /* @__PURE__ */ d(jn, { show: m, my: 1.15 }),
1423
+ children: h ? /* @__PURE__ */ L(Ct, { children: [
1424
+ /* @__PURE__ */ d(jn, { show: h, my: 1.15 }),
1425
1425
  /* @__PURE__ */ d(De, { variant: "subtitle1", fontWeight: 500, children: "Uploading..." }),
1426
1426
  /* @__PURE__ */ d(De, { variant: "caption", children: "please wait" })
1427
- ] }) : /* @__PURE__ */ L(Ct, { "aria-disabled": m, children: [
1427
+ ] }) : /* @__PURE__ */ L(Ct, { "aria-disabled": h, children: [
1428
1428
  /* @__PURE__ */ d(Nn, { color: "primary" }),
1429
1429
  /* @__PURE__ */ L(De, { variant: "subtitle1", fontWeight: 500, children: [
1430
1430
  "Drop your ",
package/dist/main.d.ts CHANGED
@@ -997,7 +997,7 @@ declare interface UploaderProps {
997
997
  maxSize?: number; // Max file size in mb
998
998
  minSize?: number; // Min file size in mb
999
999
  onChange?(urls: string[]): void;
1000
- uploadAction(formData: FormData): Promise<string>;
1000
+ uploadAction(file: any): Promise<string>;
1001
1001
  }
1002
1002
 
1003
1003
  export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.26",
4
+ "version": "1.5.28",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",