@contentmunch/contentmunch-ui 1.0.32 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import xe, { useState as T, Fragment as s, useRef as oe, useCallback as J, useEffect as K } from "react";
2
- var X = { exports: {} }, W = {};
1
+ import oe, { useState as A, Fragment as s, useRef as de, useCallback as G, useEffect as Q, useMemo as te } from "react";
2
+ var K = { exports: {} }, B = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.js
@@ -9,29 +9,29 @@ var X = { exports: {} }, W = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var te;
13
- function je() {
14
- if (te) return W;
15
- te = 1;
12
+ var le;
13
+ function ue() {
14
+ if (le) return B;
15
+ le = 1;
16
16
  var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
17
- function r(c, i, a) {
17
+ function r(i, c, a) {
18
18
  var x = null;
19
- if (a !== void 0 && (x = "" + a), i.key !== void 0 && (x = "" + i.key), "key" in i) {
19
+ if (a !== void 0 && (x = "" + a), c.key !== void 0 && (x = "" + c.key), "key" in c) {
20
20
  a = {};
21
- for (var o in i)
22
- o !== "key" && (a[o] = i[o]);
23
- } else a = i;
24
- return i = a.ref, {
21
+ for (var o in c)
22
+ o !== "key" && (a[o] = c[o]);
23
+ } else a = c;
24
+ return c = a.ref, {
25
25
  $$typeof: n,
26
- type: c,
26
+ type: i,
27
27
  key: x,
28
- ref: i !== void 0 ? i : null,
28
+ ref: c !== void 0 ? c : null,
29
29
  props: a
30
30
  };
31
31
  }
32
- return W.Fragment = t, W.jsx = r, W.jsxs = r, W;
32
+ return B.Fragment = t, B.jsx = r, B.jsxs = r, B;
33
33
  }
34
- var B = {};
34
+ var J = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -41,26 +41,26 @@ var B = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var le;
45
- function ue() {
46
- return le || (le = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var ce;
45
+ function ye() {
46
+ return ce || (ce = 1, process.env.NODE_ENV !== "production" && function() {
47
47
  function n(l) {
48
48
  if (l == null) return null;
49
49
  if (typeof l == "function")
50
- return l.$$typeof === H ? null : l.displayName || l.name || null;
50
+ return l.$$typeof === C ? null : l.displayName || l.name || null;
51
51
  if (typeof l == "string") return l;
52
52
  switch (l) {
53
- case v:
54
- return "Fragment";
55
53
  case g:
54
+ return "Fragment";
55
+ case v:
56
56
  return "Profiler";
57
- case C:
57
+ case T:
58
58
  return "StrictMode";
59
- case M:
59
+ case k:
60
60
  return "Suspense";
61
- case y:
61
+ case H:
62
62
  return "SuspenseList";
63
- case L:
63
+ case M:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof l == "object")
@@ -69,19 +69,19 @@ function ue() {
69
69
  ), l.$$typeof) {
70
70
  case N:
71
71
  return "Portal";
72
- case _:
72
+ case S:
73
73
  return (l.displayName || "Context") + ".Provider";
74
- case A:
74
+ case _:
75
75
  return (l._context.displayName || "Context") + ".Consumer";
76
- case S:
77
- var p = l.render;
78
- return l = l.displayName, l || (l = p.displayName || p.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
79
- case k:
80
- return p = l.displayName || null, p !== null ? p : n(l.type) || "Memo";
81
76
  case z:
82
- p = l._payload, l = l._init;
77
+ var y = l.render;
78
+ return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
79
+ case P:
80
+ return y = l.displayName || null, y !== null ? y : n(l.type) || "Memo";
81
+ case m:
82
+ y = l._payload, l = l._init;
83
83
  try {
84
- return n(l(p));
84
+ return n(l(y));
85
85
  } catch {
86
86
  }
87
87
  }
@@ -93,50 +93,50 @@ function ue() {
93
93
  function r(l) {
94
94
  try {
95
95
  t(l);
96
- var p = !1;
96
+ var y = !1;
97
97
  } catch {
98
- p = !0;
98
+ y = !0;
99
99
  }
100
- if (p) {
101
- p = console;
102
- var b = p.error, E = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
100
+ if (y) {
101
+ y = console;
102
+ var b = y.error, E = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
103
103
  return b.call(
104
- p,
104
+ y,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
106
  E
107
107
  ), t(l);
108
108
  }
109
109
  }
110
- function c(l) {
111
- if (l === v) return "<>";
112
- if (typeof l == "object" && l !== null && l.$$typeof === z)
110
+ function i(l) {
111
+ if (l === g) return "<>";
112
+ if (typeof l == "object" && l !== null && l.$$typeof === m)
113
113
  return "<...>";
114
114
  try {
115
- var p = n(l);
116
- return p ? "<" + p + ">" : "<...>";
115
+ var y = n(l);
116
+ return y ? "<" + y + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function i() {
122
- var l = D.A;
121
+ function c() {
122
+ var l = L.A;
123
123
  return l === null ? null : l.getOwner();
124
124
  }
125
125
  function a() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
128
  function x(l) {
129
- if (Y.call(l, "key")) {
130
- var p = Object.getOwnPropertyDescriptor(l, "key").get;
131
- if (p && p.isReactWarning) return !1;
129
+ if (X.call(l, "key")) {
130
+ var y = Object.getOwnPropertyDescriptor(l, "key").get;
131
+ if (y && y.isReactWarning) return !1;
132
132
  }
133
133
  return l.key !== void 0;
134
134
  }
135
- function o(l, p) {
135
+ function o(l, y) {
136
136
  function b() {
137
- $ || ($ = !0, console.error(
137
+ Y || (Y = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- p
139
+ y
140
140
  ));
141
141
  }
142
142
  b.isReactWarning = !0, Object.defineProperty(l, "key", {
@@ -146,17 +146,17 @@ function ue() {
146
146
  }
147
147
  function d() {
148
148
  var l = n(this.type);
149
- return U[l] || (U[l] = !0, console.error(
149
+ return $[l] || ($[l] = !0, console.error(
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), l = this.props.ref, l !== void 0 ? l : null;
152
152
  }
153
- function h(l, p, b, E, P, V, Q, Z) {
153
+ function h(l, y, b, E, D, V, ee, se) {
154
154
  return b = V.ref, l = {
155
155
  $$typeof: f,
156
156
  type: l,
157
- key: p,
157
+ key: y,
158
158
  props: V,
159
- _owner: P
159
+ _owner: D
160
160
  }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(l, "ref", {
161
161
  enumerable: !1,
162
162
  get: d
@@ -174,19 +174,19 @@ function ue() {
174
174
  configurable: !1,
175
175
  enumerable: !1,
176
176
  writable: !0,
177
- value: Q
177
+ value: ee
178
178
  }), Object.defineProperty(l, "_debugTask", {
179
179
  configurable: !1,
180
180
  enumerable: !1,
181
181
  writable: !0,
182
- value: Z
182
+ value: se
183
183
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
184
184
  }
185
- function j(l, p, b, E, P, V, Q, Z) {
186
- var R = p.children;
185
+ function j(l, y, b, E, D, V, ee, se) {
186
+ var R = y.children;
187
187
  if (R !== void 0)
188
188
  if (E)
189
- if (q(R)) {
189
+ if (Z(R)) {
190
190
  for (E = 0; E < R.length; E++)
191
191
  u(R[E]);
192
192
  Object.freeze && Object.freeze(R);
@@ -195,12 +195,12 @@ function ue() {
195
195
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
196
196
  );
197
197
  else u(R);
198
- if (Y.call(p, "key")) {
198
+ if (X.call(y, "key")) {
199
199
  R = n(l);
200
- var I = Object.keys(p).filter(function(he) {
201
- return he !== "key";
200
+ var F = Object.keys(y).filter(function(je) {
201
+ return je !== "key";
202
202
  });
203
- E = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", re[R + E] || (I = 0 < I.length ? "{" + I.join(": ..., ") + ": ...}" : "{}", console.error(
203
+ E = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", re[R + E] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
204
204
  `A props object containing a "key" prop is being spread into JSX:
205
205
  let props = %s;
206
206
  <%s {...props} />
@@ -209,15 +209,15 @@ React keys must be passed directly to JSX without using spread:
209
209
  <%s key={someKey} {...props} />`,
210
210
  E,
211
211
  R,
212
- I,
212
+ F,
213
213
  R
214
214
  ), re[R + E] = !0);
215
215
  }
216
- if (R = null, b !== void 0 && (r(b), R = "" + b), x(p) && (r(p.key), R = "" + p.key), "key" in p) {
216
+ if (R = null, b !== void 0 && (r(b), R = "" + b), x(y) && (r(y.key), R = "" + y.key), "key" in y) {
217
217
  b = {};
218
- for (var ee in p)
219
- ee !== "key" && (b[ee] = p[ee]);
220
- } else b = p;
218
+ for (var ne in y)
219
+ ne !== "key" && (b[ne] = y[ne]);
220
+ } else b = y;
221
221
  return R && o(
222
222
  b,
223
223
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
@@ -225,68 +225,68 @@ React keys must be passed directly to JSX without using spread:
225
225
  l,
226
226
  R,
227
227
  V,
228
- P,
229
- i(),
228
+ D,
229
+ c(),
230
230
  b,
231
- Q,
232
- Z
231
+ ee,
232
+ se
233
233
  );
234
234
  }
235
235
  function u(l) {
236
236
  typeof l == "object" && l !== null && l.$$typeof === f && l._store && (l._store.validated = 1);
237
237
  }
238
- var m = xe, f = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), D = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, q = Array.isArray, F = console.createTask ? console.createTask : function() {
238
+ var p = oe, f = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), S = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, Z = Array.isArray, I = console.createTask ? console.createTask : function() {
239
239
  return null;
240
240
  };
241
- m = {
241
+ p = {
242
242
  "react-stack-bottom-frame": function(l) {
243
243
  return l();
244
244
  }
245
245
  };
246
- var $, U = {}, se = m["react-stack-bottom-frame"].bind(
247
- m,
246
+ var Y, $ = {}, U = p["react-stack-bottom-frame"].bind(
247
+ p,
248
248
  a
249
- )(), ne = F(c(a)), re = {};
250
- B.Fragment = v, B.jsx = function(l, p, b, E, P) {
251
- var V = 1e4 > D.recentlyCreatedOwnerStacks++;
249
+ )(), W = I(i(a)), re = {};
250
+ J.Fragment = g, J.jsx = function(l, y, b, E, D) {
251
+ var V = 1e4 > L.recentlyCreatedOwnerStacks++;
252
252
  return j(
253
253
  l,
254
- p,
254
+ y,
255
255
  b,
256
256
  !1,
257
257
  E,
258
- P,
259
- V ? Error("react-stack-top-frame") : se,
260
- V ? F(c(l)) : ne
258
+ D,
259
+ V ? Error("react-stack-top-frame") : U,
260
+ V ? I(i(l)) : W
261
261
  );
262
- }, B.jsxs = function(l, p, b, E, P) {
263
- var V = 1e4 > D.recentlyCreatedOwnerStacks++;
262
+ }, J.jsxs = function(l, y, b, E, D) {
263
+ var V = 1e4 > L.recentlyCreatedOwnerStacks++;
264
264
  return j(
265
265
  l,
266
- p,
266
+ y,
267
267
  b,
268
268
  !0,
269
269
  E,
270
- P,
271
- V ? Error("react-stack-top-frame") : se,
272
- V ? F(c(l)) : ne
270
+ D,
271
+ V ? Error("react-stack-top-frame") : U,
272
+ V ? I(i(l)) : W
273
273
  );
274
274
  };
275
- }()), B;
275
+ }()), J;
276
276
  }
277
277
  var ie;
278
- function ye() {
279
- return ie || (ie = 1, process.env.NODE_ENV === "production" ? X.exports = je() : X.exports = ue()), X.exports;
278
+ function pe() {
279
+ return ie || (ie = 1, process.env.NODE_ENV === "production" ? K.exports = ue() : K.exports = ye()), K.exports;
280
280
  }
281
- var e = ye();
282
- const Ee = ({ variant: n, children: t }) => {
283
- const { folds: r } = t, [c, i] = T(0), a = (d) => d === c ? "fold active" : "fold", x = (d) => "fold-button" + (n ? " fold-button--" + n : "") + (r[d].foldColor ? " fold-button--primary fold-button--" + r[d].foldColor : ""), o = (d) => {
281
+ var e = pe();
282
+ const Re = ({ variant: n, children: t }) => {
283
+ const { folds: r } = t, [i, c] = A(0), a = (d) => d === i ? "fold active" : "fold", x = (d) => "fold-button" + (n ? " fold-button--" + n : "") + (r[d].foldColor ? " fold-button--primary fold-button--" + r[d].foldColor : ""), o = (d) => {
284
284
  const h = d.which.toString(), j = d.ctrlKey && h.match(/33|34/);
285
285
  if (h.match(/38|40/) || j) {
286
- const u = h.match(/34|40/) ? 1 : -1, m = r.length, f = (c + m + u) % m;
287
- i(f);
286
+ const u = h.match(/34|40/) ? 1 : -1, p = r.length, f = (i + p + u) % p;
287
+ c(f);
288
288
  } else
289
- h === "36" && i(0), h === "35" && i(r.length - 1);
289
+ h === "36" && c(0), h === "35" && c(r.length - 1);
290
290
  d.preventDefault();
291
291
  };
292
292
  return /* @__PURE__ */ e.jsx("div", { className: "muncher-accordion", children: r.map(
@@ -294,14 +294,14 @@ const Ee = ({ variant: n, children: t }) => {
294
294
  "div",
295
295
  {
296
296
  className: a(h),
297
- "aria-expanded": c === h,
297
+ "aria-expanded": i === h,
298
298
  children: [
299
299
  /* @__PURE__ */ e.jsx(
300
300
  "button",
301
301
  {
302
302
  className: x(h),
303
303
  onKeyDown: o,
304
- onClick: () => i(h),
304
+ onClick: () => c(h),
305
305
  children: /* @__PURE__ */ e.jsx("span", { children: d.heading })
306
306
  }
307
307
  ),
@@ -311,11 +311,11 @@ const Ee = ({ variant: n, children: t }) => {
311
311
  "muncher-accordion-fold-" + h
312
312
  )
313
313
  ) });
314
- }, pe = ({
314
+ }, me = ({
315
315
  show: n = !1,
316
316
  backdropClickHandler: t,
317
317
  ...r
318
- }) => n ? /* @__PURE__ */ e.jsx("div", { className: "muncher-backdrop", onClick: t, ...r }) : null, me = ({ variant: n, children: t, ...r }) => /* @__PURE__ */ e.jsx("div", { className: n ? "muncher-badge muncher-badge--" + n : "muncher-badge", ...r, children: t }), ce = {
318
+ }) => n ? /* @__PURE__ */ e.jsx("div", { className: "muncher-backdrop", onClick: t, ...r }) : null, fe = ({ variant: n, children: t, ...r }) => /* @__PURE__ */ e.jsx("div", { className: n ? "muncher-badge muncher-badge--" + n : "muncher-badge", ...r, children: t }), ae = {
319
319
  "align-center": /* @__PURE__ */ e.jsxs(s, { children: [
320
320
  /* @__PURE__ */ e.jsx("line", { x1: "18", y1: "10", x2: "6", y2: "10" }),
321
321
  /* @__PURE__ */ e.jsx("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
@@ -1069,7 +1069,7 @@ const Ee = ({ variant: n, children: t }) => {
1069
1069
  /* @__PURE__ */ e.jsx("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" }),
1070
1070
  /* @__PURE__ */ e.jsx("text", { x: "6", y: "14", fontSize: "6", fontFamily: "'Lucida Grande', sans-serif", children: "360" })
1071
1071
  ] })
1072
- }, w = ({ color: n, name: t, size: r = "small", weight: c = 2, onClick: i, iconString: a, orientation: x, children: o }) => {
1072
+ }, w = ({ color: n, name: t, size: r = "small", weight: i = 2, onClick: c, iconString: a, orientation: x, children: o }) => {
1073
1073
  const d = r ? "muncher-icon--" + r : "muncher-icon--small";
1074
1074
  return /* @__PURE__ */ e.jsxs("span", { className: "muncher-icon", children: [
1075
1075
  o && x && x === "right" ? /* @__PURE__ */ e.jsx("span", { className: "content-left", children: o }) : "",
@@ -1081,38 +1081,38 @@ const Ee = ({ variant: n, children: t }) => {
1081
1081
  xmlns: "http://www.w3.org/2000/svg",
1082
1082
  viewBox: "0 0 24 24",
1083
1083
  fill: "none",
1084
- strokeWidth: c || 2,
1084
+ strokeWidth: i || 2,
1085
1085
  strokeLinecap: "round",
1086
1086
  strokeLinejoin: "round",
1087
- onClick: i,
1088
- children: t ? ce[t] : a ? Object(ce)[a] : ""
1087
+ onClick: c,
1088
+ children: t ? ae[t] : a ? Object(ae)[a] : ""
1089
1089
  }
1090
1090
  ),
1091
1091
  o && (!x || x === "left") ? /* @__PURE__ */ e.jsx("span", { className: "content-right", children: o }) : ""
1092
1092
  ] });
1093
- }, Re = ({
1093
+ }, Te = ({
1094
1094
  variant: n = "primary",
1095
1095
  icon: t = "bell",
1096
1096
  text: r,
1097
- onClick: c,
1098
- ...i
1097
+ onClick: i,
1098
+ ...c
1099
1099
  }) => /* @__PURE__ */ e.jsxs(
1100
1100
  "div",
1101
1101
  {
1102
1102
  className: "muncher-icon-badge",
1103
- onClick: c,
1104
- ...i,
1103
+ onClick: i,
1104
+ ...c,
1105
1105
  children: [
1106
1106
  /* @__PURE__ */ e.jsx(w, { name: t }),
1107
- r === "" ? "" : /* @__PURE__ */ e.jsx(me, { variant: n, children: r })
1107
+ r === "" ? "" : /* @__PURE__ */ e.jsx(fe, { variant: n, children: r })
1108
1108
  ]
1109
1109
  }
1110
1110
  ), O = ({
1111
1111
  type: n = "button",
1112
1112
  variant: t,
1113
1113
  size: r = "medium",
1114
- title: c,
1115
- active: i,
1114
+ title: i,
1115
+ active: c,
1116
1116
  disabled: a,
1117
1117
  rounded: x,
1118
1118
  onClick: o,
@@ -1120,30 +1120,30 @@ const Ee = ({ variant: n, children: t }) => {
1120
1120
  onMouseEnter: h,
1121
1121
  onMouseLeave: j,
1122
1122
  children: u,
1123
- ...m
1123
+ ...p
1124
1124
  }) => {
1125
- const f = "muncher-button" + (n && n === "nav" ? " muncher-button--nav" : "") + (t ? " muncher-button--" + t : "") + (r ? " muncher-button--" + r : "") + (i ? " muncher-button--active" : "") + (x ? " muncher-button--rounded" : "");
1125
+ const f = "muncher-button" + (n && n === "nav" ? " muncher-button--nav" : "") + (t ? " muncher-button--" + t : "") + (r ? " muncher-button--" + r : "") + (c ? " muncher-button--active" : "") + (x ? " muncher-button--rounded" : "");
1126
1126
  return /* @__PURE__ */ e.jsx(
1127
1127
  "button",
1128
1128
  {
1129
1129
  type: n && n !== "nav" ? n : "button",
1130
1130
  className: f,
1131
1131
  disabled: !!a,
1132
- title: c,
1132
+ title: i,
1133
1133
  onClick: o,
1134
1134
  onMouseDown: d,
1135
1135
  onMouseEnter: h,
1136
1136
  onMouseLeave: j,
1137
- ...m,
1137
+ ...p,
1138
1138
  children: u
1139
1139
  }
1140
1140
  );
1141
- }, fe = ({
1141
+ }, ve = ({
1142
1142
  variant: n,
1143
1143
  size: t = "medium",
1144
1144
  title: r,
1145
- active: c,
1146
- disabled: i,
1145
+ active: i,
1146
+ disabled: c,
1147
1147
  element: a,
1148
1148
  onMouseDown: x,
1149
1149
  rounded: o,
@@ -1151,35 +1151,35 @@ const Ee = ({ variant: n, children: t }) => {
1151
1151
  onClick: h,
1152
1152
  onClose: j,
1153
1153
  showContent: u,
1154
- setShowContent: m,
1154
+ setShowContent: p,
1155
1155
  withDropIcon: f,
1156
1156
  children: N,
1157
- ...v
1157
+ ...g
1158
1158
  }) => {
1159
- const C = oe(null), g = (M) => {
1160
- M.preventDefault(), h && h(M), m && m(!0);
1161
- }, A = J(() => {
1162
- m(!1), j && j();
1163
- }, [j, m]), _ = J((M) => {
1164
- M.keyCode === 27 && A();
1165
- }, [A]);
1166
- K(() => {
1167
- const M = (y) => {
1168
- C && C.current && y.target instanceof HTMLElement && !C.current.contains(y.target) && A();
1159
+ const T = de(null), v = (k) => {
1160
+ k.preventDefault(), h && h(k), p && p(!0);
1161
+ }, _ = G(() => {
1162
+ p(!1), j && j();
1163
+ }, [j, p]), S = G((k) => {
1164
+ k.keyCode === 27 && _();
1165
+ }, [_]);
1166
+ Q(() => {
1167
+ const k = (H) => {
1168
+ T && T.current && H.target instanceof HTMLElement && !T.current.contains(H.target) && _();
1169
1169
  };
1170
- return document.addEventListener("keydown", _, !1), document.addEventListener("mousedown", M), () => {
1171
- document.removeEventListener("keydown", _, !1);
1170
+ return document.addEventListener("keydown", S, !1), document.addEventListener("mousedown", k), () => {
1171
+ document.removeEventListener("keydown", S, !1);
1172
1172
  };
1173
- }, [_, A]);
1174
- const S = () => {
1175
- var k;
1176
- const M = (k = C.current) == null ? void 0 : k.offsetLeft, y = window.innerWidth;
1177
- if (M) {
1178
- if (M < 100) return "muncher-dropdown--content";
1179
- if (y - M < 150) return "muncher-dropdown--content drop-left";
1180
- if (y - M < 250) {
1181
- const z = Math.round((y - M) / y * 100);
1182
- if (z > 40 || z < 60) return "muncher-dropdown--content drop-middle";
1173
+ }, [S, _]);
1174
+ const z = () => {
1175
+ var P;
1176
+ const k = (P = T.current) == null ? void 0 : P.offsetLeft, H = window.innerWidth;
1177
+ if (k) {
1178
+ if (k < 100) return "muncher-dropdown--content";
1179
+ if (H - k < 150) return "muncher-dropdown--content drop-left";
1180
+ if (H - k < 250) {
1181
+ const m = Math.round((H - k) / H * 100);
1182
+ if (m > 40 || m < 60) return "muncher-dropdown--content drop-middle";
1183
1183
  }
1184
1184
  }
1185
1185
  switch (d) {
@@ -1191,18 +1191,18 @@ const Ee = ({ variant: n, children: t }) => {
1191
1191
  return "muncher-dropdown--content";
1192
1192
  }
1193
1193
  };
1194
- return /* @__PURE__ */ e.jsxs("div", { className: "muncher-dropdown", ref: C, children: [
1194
+ return /* @__PURE__ */ e.jsxs("div", { className: "muncher-dropdown", ref: T, children: [
1195
1195
  /* @__PURE__ */ e.jsxs(
1196
1196
  O,
1197
1197
  {
1198
- onMouseDown: g,
1198
+ onMouseDown: v,
1199
1199
  title: r,
1200
- disabled: i,
1200
+ disabled: c,
1201
1201
  rounded: o,
1202
- active: c,
1202
+ active: i,
1203
1203
  variant: n,
1204
1204
  size: t,
1205
- ...v,
1205
+ ...g,
1206
1206
  children: [
1207
1207
  a,
1208
1208
  f ? /* @__PURE__ */ e.jsx(
@@ -1215,14 +1215,14 @@ const Ee = ({ variant: n, children: t }) => {
1215
1215
  ]
1216
1216
  }
1217
1217
  ),
1218
- u ? /* @__PURE__ */ e.jsx("div", { className: S(), children: N }) : ""
1218
+ u ? /* @__PURE__ */ e.jsx("div", { className: z(), children: N }) : ""
1219
1219
  ] });
1220
- }, Te = ({
1220
+ }, Ae = ({
1221
1221
  title: n,
1222
1222
  active: t,
1223
1223
  disabled: r,
1224
- element: c,
1225
- rounded: i,
1224
+ element: i,
1225
+ rounded: c,
1226
1226
  children: a,
1227
1227
  ...x
1228
1228
  }) => /* @__PURE__ */ e.jsxs("div", { className: "muncher-dropdown-nav", children: [
@@ -1232,23 +1232,23 @@ const Ee = ({ variant: n, children: t }) => {
1232
1232
  type: "nav",
1233
1233
  title: n,
1234
1234
  disabled: r,
1235
- rounded: i,
1235
+ rounded: c,
1236
1236
  active: t,
1237
1237
  ...x,
1238
- children: c
1238
+ children: i
1239
1239
  }
1240
1240
  ),
1241
1241
  /* @__PURE__ */ e.jsx("div", { className: "muncher-dropdown-nav--content", children: a })
1242
- ] }), ve = (n) => {
1242
+ ] }), ge = (n) => {
1243
1243
  navigator.clipboard.writeText(n);
1244
- }, ge = ({
1244
+ }, be = ({
1245
1245
  text: n,
1246
1246
  variant: t = "secondary",
1247
1247
  size: r = "small"
1248
1248
  }) => {
1249
- const [c, i] = T(), [a, x] = T("copy"), [o, d] = T("copy link"), h = () => {
1250
- ve(n), i("green"), x("check"), d("copied!"), setTimeout(function() {
1251
- i(""), x("copy");
1249
+ const [i, c] = A(), [a, x] = A("copy"), [o, d] = A("copy link"), h = () => {
1250
+ ge(n), c("green"), x("check"), d("copied!"), setTimeout(function() {
1251
+ c(""), x("copy");
1252
1252
  }, 2e3);
1253
1253
  };
1254
1254
  return /* @__PURE__ */ e.jsx(
@@ -1258,21 +1258,21 @@ const Ee = ({ variant: n, children: t }) => {
1258
1258
  variant: t,
1259
1259
  title: o,
1260
1260
  onClick: h,
1261
- children: /* @__PURE__ */ e.jsx(w, { name: a, color: c })
1261
+ children: /* @__PURE__ */ e.jsx(w, { name: a, color: i })
1262
1262
  }
1263
1263
  );
1264
- }, Ae = ({
1264
+ }, _e = ({
1265
1265
  variant: n = "secondary",
1266
1266
  size: t = "medium",
1267
1267
  title: r
1268
1268
  }) => {
1269
- const [c, i] = T(!1);
1269
+ const [i, c] = A(!1);
1270
1270
  return /* @__PURE__ */ e.jsx("div", { className: "muncher-share", children: /* @__PURE__ */ e.jsxs(
1271
- fe,
1271
+ ve,
1272
1272
  {
1273
1273
  title: "Share to Social Media",
1274
- showContent: c,
1275
- setShowContent: i,
1274
+ showContent: i,
1275
+ setShowContent: c,
1276
1276
  variant: n,
1277
1277
  size: t,
1278
1278
  element: /* @__PURE__ */ e.jsx(w, { name: "share", orientation: "right", children: "Share" }),
@@ -1304,16 +1304,16 @@ const Ee = ({ variant: n, children: t }) => {
1304
1304
  children: /* @__PURE__ */ e.jsx(w, { name: "mail" })
1305
1305
  }
1306
1306
  ) }),
1307
- /* @__PURE__ */ e.jsx(ge, { text: window.location.href })
1307
+ /* @__PURE__ */ e.jsx(be, { text: window.location.href })
1308
1308
  ]
1309
1309
  }
1310
1310
  ) });
1311
- }, be = ({
1311
+ }, we = ({
1312
1312
  header: n,
1313
1313
  data: t,
1314
1314
  filename: r,
1315
- variant: c,
1316
- size: i,
1315
+ variant: i,
1316
+ size: c,
1317
1317
  title: a,
1318
1318
  active: x,
1319
1319
  disabled: o,
@@ -1322,18 +1322,18 @@ const Ee = ({ variant: n, children: t }) => {
1322
1322
  const h = encodeURI("data:text/csv;charset=utf-8," + n.join(",") + `
1323
1323
  ` + t.map((j) => j.join(",")).join(`
1324
1324
  `));
1325
- return /* @__PURE__ */ e.jsx("div", { className: "muncher-csv", children: /* @__PURE__ */ e.jsx(O, { variant: c, size: i, active: x, disabled: o, rounded: d, children: /* @__PURE__ */ e.jsx("a", { href: h, download: r + ".csv", children: /* @__PURE__ */ e.jsx(w, { name: "download", children: a || "Download" }) }) }) });
1326
- }, we = ({
1325
+ return /* @__PURE__ */ e.jsx("div", { className: "muncher-csv", children: /* @__PURE__ */ e.jsx(O, { variant: i, size: c, active: x, disabled: o, rounded: d, children: /* @__PURE__ */ e.jsx("a", { href: h, download: r + ".csv", children: /* @__PURE__ */ e.jsx(w, { name: "download", children: a || "Download" }) }) }) });
1326
+ }, Ne = ({
1327
1327
  variant: n = "transparent",
1328
1328
  size: t = "small",
1329
1329
  title: r,
1330
- sortAsc: c = "true",
1331
- active: i,
1330
+ sortAsc: i = "true",
1331
+ active: c,
1332
1332
  rounded: a,
1333
1333
  onClick: x,
1334
1334
  children: o
1335
1335
  }) => {
1336
- const [d, h] = T(!1), j = () => !i || i && !d ? c ? /* @__PURE__ */ e.jsx(w, { name: "sort-asc" }) : /* @__PURE__ */ e.jsx(w, { name: "sort-desc" }) : c ? /* @__PURE__ */ e.jsx(w, { name: "sort-desc" }) : /* @__PURE__ */ e.jsx(w, { name: "sort-asc" });
1336
+ const [d, h] = A(!1), j = () => !c || c && !d ? i ? /* @__PURE__ */ e.jsx(w, { name: "sort-asc" }) : /* @__PURE__ */ e.jsx(w, { name: "sort-desc" }) : i ? /* @__PURE__ */ e.jsx(w, { name: "sort-desc" }) : /* @__PURE__ */ e.jsx(w, { name: "sort-asc" });
1337
1337
  return /* @__PURE__ */ e.jsxs(
1338
1338
  O,
1339
1339
  {
@@ -1350,16 +1350,16 @@ const Ee = ({ variant: n, children: t }) => {
1350
1350
  onClick: x,
1351
1351
  children: [
1352
1352
  o,
1353
- i || d ? /* @__PURE__ */ e.jsx(j, {}) : ""
1353
+ c || d ? /* @__PURE__ */ e.jsx(j, {}) : ""
1354
1354
  ]
1355
1355
  }
1356
1356
  );
1357
- }, ae = ({
1357
+ }, xe = ({
1358
1358
  direction: n,
1359
1359
  size: t = "small",
1360
1360
  weight: r,
1361
- isDisabled: c,
1362
- variant: i = "primary",
1361
+ isDisabled: i,
1362
+ variant: c = "primary",
1363
1363
  navIcon: a = "chevron",
1364
1364
  onClick: x
1365
1365
  }) => {
@@ -1383,27 +1383,27 @@ const Ee = ({ variant: n, children: t }) => {
1383
1383
  O,
1384
1384
  {
1385
1385
  onClick: x,
1386
- disabled: c,
1386
+ disabled: i,
1387
1387
  size: "small",
1388
- variant: i,
1388
+ variant: c,
1389
1389
  title: n === "left" ? "Navigate Left" : "Navigate Right",
1390
1390
  children: /* @__PURE__ */ e.jsx(w, { name: o(), size: t, weight: r })
1391
1391
  }
1392
1392
  )
1393
1393
  }
1394
1394
  );
1395
- }, G = ({ label: n, onClick: t, id: r, required: c = !1 }) => /* @__PURE__ */ e.jsxs("label", { htmlFor: r, onClick: t, children: [
1395
+ }, q = ({ label: n, onClick: t, id: r, required: i = !1 }) => /* @__PURE__ */ e.jsxs("label", { htmlFor: r, onClick: t, children: [
1396
1396
  n,
1397
- c ? /* @__PURE__ */ e.jsx("span", { className: "required", children: "*" }) : ""
1398
- ] }), _e = ({
1397
+ i ? /* @__PURE__ */ e.jsx("span", { className: "required", children: "*" }) : ""
1398
+ ] }), Se = ({
1399
1399
  name: n,
1400
1400
  required: t = !1,
1401
1401
  onChange: r,
1402
- checked: c = !1,
1403
- label: i,
1402
+ checked: i = !1,
1403
+ label: c,
1404
1404
  ...a
1405
1405
  }) => {
1406
- const [x, o] = T(c || !1);
1406
+ const [x, o] = A(i || !1);
1407
1407
  return /* @__PURE__ */ e.jsx("div", { className: "muncher-input--div", children: /* @__PURE__ */ e.jsxs("div", { className: "muncher-checkbox", children: [
1408
1408
  /* @__PURE__ */ e.jsx(
1409
1409
  "input",
@@ -1419,10 +1419,10 @@ const Ee = ({ variant: n, children: t }) => {
1419
1419
  ...a
1420
1420
  }
1421
1421
  ),
1422
- i ? /* @__PURE__ */ e.jsx(
1423
- G,
1422
+ c ? /* @__PURE__ */ e.jsx(
1423
+ q,
1424
1424
  {
1425
- label: i,
1425
+ label: c,
1426
1426
  required: t,
1427
1427
  id: n,
1428
1428
  onClick: (d) => {
@@ -1431,18 +1431,18 @@ const Ee = ({ variant: n, children: t }) => {
1431
1431
  }
1432
1432
  ) : ""
1433
1433
  ] }) });
1434
- }, de = ({ size: n, ...t }) => /* @__PURE__ */ e.jsx(
1434
+ }, he = ({ size: n, ...t }) => /* @__PURE__ */ e.jsx(
1435
1435
  "div",
1436
1436
  {
1437
1437
  className: n ? "muncher-spinner muncher-spinner-" + n : "muncher-spinner",
1438
1438
  ...t
1439
1439
  }
1440
- ), Ne = ({
1440
+ ), Me = ({
1441
1441
  name: n,
1442
1442
  label: t,
1443
1443
  variant: r = "secondary",
1444
- size: c = "medium",
1445
- required: i,
1444
+ size: i = "medium",
1445
+ required: c,
1446
1446
  active: a,
1447
1447
  isUploading: x,
1448
1448
  handleOnChange: o,
@@ -1450,7 +1450,7 @@ const Ee = ({ variant: n, children: t }) => {
1450
1450
  successMessage: h,
1451
1451
  ...j
1452
1452
  }) => {
1453
- const u = "muncher-button" + (r ? " muncher-button--" + r : "") + (c ? " muncher-button--" + c : "") + (a ? " muncher-button--active" : ""), m = (f) => {
1453
+ const u = "muncher-button" + (r ? " muncher-button--" + r : "") + (i ? " muncher-button--" + i : "") + (a ? " muncher-button--active" : ""), p = (f) => {
1454
1454
  o && o(f.currentTarget.files[0]);
1455
1455
  };
1456
1456
  return /* @__PURE__ */ e.jsx("div", { className: "muncher-file-input--div", children: /* @__PURE__ */ e.jsxs("div", { className: "file-input-element", children: [
@@ -1458,8 +1458,8 @@ const Ee = ({ variant: n, children: t }) => {
1458
1458
  /* @__PURE__ */ e.jsx(w, { name: "upload" }),
1459
1459
  " ",
1460
1460
  t || "Upload CSV",
1461
- i ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : "",
1462
- x ? /* @__PURE__ */ e.jsx(de, { size: "tiny" }) : ""
1461
+ c ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : "",
1462
+ x ? /* @__PURE__ */ e.jsx(he, { size: "tiny" }) : ""
1463
1463
  ] }),
1464
1464
  /* @__PURE__ */ e.jsx(
1465
1465
  "input",
@@ -1467,8 +1467,8 @@ const Ee = ({ variant: n, children: t }) => {
1467
1467
  id: n,
1468
1468
  type: "file",
1469
1469
  className: "muncher-file-input",
1470
- required: i,
1471
- onChange: m,
1470
+ required: c,
1471
+ onChange: p,
1472
1472
  accept: "text/csv",
1473
1473
  ...j
1474
1474
  }
@@ -1480,8 +1480,8 @@ const Ee = ({ variant: n, children: t }) => {
1480
1480
  name: n,
1481
1481
  label: t,
1482
1482
  variant: r = "secondary",
1483
- size: c = "large",
1484
- required: i,
1483
+ size: i = "large",
1484
+ required: c,
1485
1485
  active: a,
1486
1486
  setFiles: x,
1487
1487
  error: o,
@@ -1489,20 +1489,20 @@ const Ee = ({ variant: n, children: t }) => {
1489
1489
  maxFiles: h,
1490
1490
  ...j
1491
1491
  }) => {
1492
- const [u, m] = T(""), [f, N] = T(""), v = h || 3, C = "muncher-button" + (r ? " muncher-button--" + r : "") + (c ? " muncher-button--" + c : "") + (a ? " muncher-button--active" : ""), g = (_) => {
1492
+ const [u, p] = A(""), [f, N] = A(""), g = h || 3, T = "muncher-button" + (r ? " muncher-button--" + r : "") + (i ? " muncher-button--" + i : "") + (a ? " muncher-button--active" : ""), v = (S) => {
1493
1493
  if (d) {
1494
- let S = Array.from(_.currentTarget.files);
1495
- S.length > v && (S = S.slice(0, v), N("Only first " + v + " files included")), x(S), m(S.map((M) => M.name).join(", "));
1494
+ let z = Array.from(S.currentTarget.files);
1495
+ z.length > g && (z = z.slice(0, g), N("Only first " + g + " files included")), x(z), p(z.map((k) => k.name).join(", "));
1496
1496
  } else
1497
- x(Array.from(_.currentTarget.files[0])), m(_.currentTarget.files[0].name);
1498
- }, A = () => o && o !== "";
1497
+ x(Array.from(S.currentTarget.files[0])), p(S.currentTarget.files[0].name);
1498
+ }, _ = () => o && o !== "";
1499
1499
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-file-input--div", children: [
1500
1500
  /* @__PURE__ */ e.jsxs("div", { className: "file-input-element", children: [
1501
- /* @__PURE__ */ e.jsxs("label", { htmlFor: n, className: C, children: [
1501
+ /* @__PURE__ */ e.jsxs("label", { htmlFor: n, className: T, children: [
1502
1502
  /* @__PURE__ */ e.jsx(w, { name: "image" }),
1503
1503
  " ",
1504
1504
  t,
1505
- i ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : ""
1505
+ c ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : ""
1506
1506
  ] }),
1507
1507
  /* @__PURE__ */ e.jsx("span", { className: "span-file-name", children: u }),
1508
1508
  /* @__PURE__ */ e.jsx(
@@ -1512,7 +1512,7 @@ const Ee = ({ variant: n, children: t }) => {
1512
1512
  type: "file",
1513
1513
  className: "muncher-file-input",
1514
1514
  name: n,
1515
- onChange: g,
1515
+ onChange: v,
1516
1516
  multiple: d,
1517
1517
  accept: "image/*",
1518
1518
  ...j
@@ -1520,14 +1520,14 @@ const Ee = ({ variant: n, children: t }) => {
1520
1520
  )
1521
1521
  ] }),
1522
1522
  f !== "" ? /* @__PURE__ */ e.jsx("p", { className: "text-danger", children: f }) : "",
1523
- A() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: o }) }) : ""
1523
+ _() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: o }) }) : ""
1524
1524
  ] });
1525
- }, Me = ({
1525
+ }, ke = ({
1526
1526
  name: n,
1527
1527
  label: t,
1528
1528
  required: r,
1529
- readOnly: c,
1530
- icon: i,
1529
+ readOnly: i,
1530
+ icon: c,
1531
1531
  hoverIcon: a,
1532
1532
  onHoverIconClick: x,
1533
1533
  type: o = "text",
@@ -1535,28 +1535,28 @@ const Ee = ({ variant: n, children: t }) => {
1535
1535
  onBlur: h,
1536
1536
  labelPosition: j = "top",
1537
1537
  onKeyDown: u,
1538
- error: m,
1538
+ error: p,
1539
1539
  focus: f = !1,
1540
1540
  placeholder: N,
1541
- onChange: v,
1542
- step: C,
1543
- value: g,
1544
- maxLength: A,
1545
- onEnterPress: _,
1546
- displayLoader: S,
1547
- ...M
1541
+ onChange: g,
1542
+ step: T,
1543
+ value: v,
1544
+ maxLength: _,
1545
+ onEnterPress: S,
1546
+ displayLoader: z,
1547
+ ...k
1548
1548
  }) => {
1549
- const y = () => m && m !== "", k = () => {
1550
- let H = "muncher-input";
1551
- return (i || a) && (H += " muncher-input-icon"), y() && (H += " muncher-input-error"), j === "side" && (H += " muncher-label-side"), H;
1552
- }, z = () => t ? /* @__PURE__ */ e.jsx(G, { label: t, required: r, id: n }) : "", L = (H) => {
1553
- H.key === "Enter" && _ && _(), u && u(H);
1549
+ const H = () => p && p !== "", P = () => {
1550
+ let C = "muncher-input";
1551
+ return (c || a) && (C += " muncher-input-icon"), H() && (C += " muncher-input-error"), j === "side" && (C += " muncher-label-side"), C;
1552
+ }, m = () => t ? /* @__PURE__ */ e.jsx(q, { label: t, required: r, id: n }) : "", M = (C) => {
1553
+ C.key === "Enter" && S && S(), u && u(C);
1554
1554
  };
1555
1555
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-input--div", children: [
1556
- j !== "side" ? z() : "",
1556
+ j !== "side" ? m() : "",
1557
1557
  /* @__PURE__ */ e.jsxs("div", { className: "muncher-input-element", children: [
1558
- j === "side" ? z() : "",
1559
- i ? /* @__PURE__ */ e.jsx(w, { name: i }) : "",
1558
+ j === "side" ? m() : "",
1559
+ c ? /* @__PURE__ */ e.jsx(w, { name: c }) : "",
1560
1560
  a ? /* @__PURE__ */ e.jsxs("span", { className: "muncher-icon-hover", children: [
1561
1561
  /* @__PURE__ */ e.jsx(w, { name: a, onClick: x }),
1562
1562
  " "
@@ -1566,63 +1566,56 @@ const Ee = ({ variant: n, children: t }) => {
1566
1566
  "input",
1567
1567
  {
1568
1568
  id: n,
1569
- className: k(),
1569
+ className: P(),
1570
1570
  name: n,
1571
1571
  autoFocus: f,
1572
- value: g,
1572
+ value: v,
1573
1573
  type: o || "text",
1574
1574
  autoComplete: "off",
1575
1575
  placeholder: N,
1576
- onChange: v,
1576
+ onChange: g,
1577
1577
  required: r,
1578
- readOnly: c,
1578
+ readOnly: i,
1579
1579
  list: d,
1580
- onKeyDown: L,
1580
+ onKeyDown: M,
1581
1581
  onBlur: h,
1582
- step: C,
1583
- maxLength: A,
1584
- ...M
1582
+ step: T,
1583
+ maxLength: _,
1584
+ ...k
1585
1585
  }
1586
1586
  ),
1587
- S ? /* @__PURE__ */ e.jsx(de, { size: "tiny" }) : ""
1587
+ z ? /* @__PURE__ */ e.jsx(he, { size: "tiny" }) : ""
1588
1588
  ] })
1589
1589
  ] }),
1590
- y() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: m }) }) : ""
1590
+ H() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: p }) }) : ""
1591
1591
  ] });
1592
- }, Se = ({ name: n, required: t = !1, onChange: r, checked: c = !1, label: i, ...a }) => {
1593
- const [x, o] = T(c || !1);
1594
- return /* @__PURE__ */ e.jsx("div", { className: "muncher-input--div", children: /* @__PURE__ */ e.jsxs("div", { className: "muncher-radio", children: [
1595
- /* @__PURE__ */ e.jsx(
1596
- "input",
1597
- {
1598
- id: n,
1599
- type: "radio",
1600
- name: n,
1601
- onChange: (d) => {
1602
- o(d.target.checked), r && r();
1603
- },
1604
- checked: x,
1605
- ...a
1606
- }
1607
- ),
1608
- i ? /* @__PURE__ */ e.jsx(
1609
- G,
1610
- {
1611
- label: i,
1612
- required: t,
1613
- id: n,
1614
- onClick: () => {
1615
- o(!x), r && r();
1616
- }
1592
+ }, He = ({ name: n, required: t = !1, onChange: r, checked: i = !1, label: c, ...a }) => /* @__PURE__ */ e.jsx("div", { className: "muncher-input--div", children: /* @__PURE__ */ e.jsxs("div", { className: "muncher-radio", children: [
1593
+ /* @__PURE__ */ e.jsx(
1594
+ "input",
1595
+ {
1596
+ type: "radio",
1597
+ name: n,
1598
+ onChange: r,
1599
+ checked: i,
1600
+ ...a
1601
+ }
1602
+ ),
1603
+ c ? /* @__PURE__ */ e.jsx(
1604
+ q,
1605
+ {
1606
+ label: c,
1607
+ required: t,
1608
+ onClick: () => {
1609
+ r && r();
1617
1610
  }
1618
- ) : ""
1619
- ] }) });
1620
- }, ke = ({
1611
+ }
1612
+ ) : ""
1613
+ ] }) }), Ce = ({
1621
1614
  name: n,
1622
1615
  options: t,
1623
1616
  label: r,
1624
- required: c,
1625
- multiple: i,
1617
+ required: i,
1618
+ multiple: c,
1626
1619
  error: a,
1627
1620
  onChange: x,
1628
1621
  value: o,
@@ -1633,7 +1626,7 @@ const Ee = ({ variant: n, children: t }) => {
1633
1626
  return h() && (u += " muncher-input-error"), u;
1634
1627
  };
1635
1628
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-input--div", children: [
1636
- r ? /* @__PURE__ */ e.jsx(G, { label: r, required: c, id: n }) : "",
1629
+ r ? /* @__PURE__ */ e.jsx(q, { label: r, required: i, id: n }) : "",
1637
1630
  /* @__PURE__ */ e.jsx("div", { className: "muncher-input-element", children: /* @__PURE__ */ e.jsxs(
1638
1631
  "select",
1639
1632
  {
@@ -1642,25 +1635,25 @@ const Ee = ({ variant: n, children: t }) => {
1642
1635
  name: n,
1643
1636
  value: o,
1644
1637
  onChange: x,
1645
- required: c,
1646
- multiple: i,
1638
+ required: i,
1639
+ multiple: c,
1647
1640
  ...d,
1648
1641
  children: [
1649
- c ? /* @__PURE__ */ e.jsx("option", { value: "", children: "-- Select --" }) : "",
1642
+ i ? /* @__PURE__ */ e.jsx("option", { value: "", children: "-- Select --" }) : "",
1650
1643
  t.map(
1651
- (u, m) => /* @__PURE__ */ e.jsx("option", { value: u.value, children: u.label }, `select-option-${m}`)
1644
+ (u, p) => /* @__PURE__ */ e.jsx("option", { value: u.value, children: u.label }, `select-option-${p}`)
1652
1645
  )
1653
1646
  ]
1654
1647
  }
1655
1648
  ) }),
1656
1649
  h() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: a }) }) : ""
1657
1650
  ] });
1658
- }, He = ({
1651
+ }, Oe = ({
1659
1652
  name: n,
1660
1653
  label: t,
1661
1654
  required: r,
1662
- readOnly: c = !1,
1663
- rows: i = 6,
1655
+ readOnly: i = !1,
1656
+ rows: c = 6,
1664
1657
  maxLength: a = 1e3,
1665
1658
  focus: x = !1,
1666
1659
  placeholder: o,
@@ -1668,17 +1661,17 @@ const Ee = ({ variant: n, children: t }) => {
1668
1661
  value: h,
1669
1662
  ...j
1670
1663
  }) => {
1671
- const [u, m] = T(h), f = (N) => {
1672
- m(N.target.value), d && d(N);
1664
+ const [u, p] = A(h), f = (N) => {
1665
+ p(N.target.value), d && d(N);
1673
1666
  };
1674
1667
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-input--div", children: [
1675
- t ? /* @__PURE__ */ e.jsx(G, { label: t, required: r, id: n }) : "",
1668
+ t ? /* @__PURE__ */ e.jsx(q, { label: t, required: r, id: n }) : "",
1676
1669
  /* @__PURE__ */ e.jsx(
1677
1670
  "textarea",
1678
1671
  {
1679
1672
  id: n,
1680
1673
  className: "muncher-textarea",
1681
- rows: i,
1674
+ rows: c,
1682
1675
  maxLength: a,
1683
1676
  name: n,
1684
1677
  autoFocus: x,
@@ -1686,7 +1679,7 @@ const Ee = ({ variant: n, children: t }) => {
1686
1679
  placeholder: o,
1687
1680
  onChange: f,
1688
1681
  required: r,
1689
- readOnly: c,
1682
+ readOnly: i,
1690
1683
  ...j
1691
1684
  }
1692
1685
  ),
@@ -1695,12 +1688,12 @@ const Ee = ({ variant: n, children: t }) => {
1695
1688
  " characters left"
1696
1689
  ] })
1697
1690
  ] });
1698
- }, Oe = ({
1691
+ }, Ve = ({
1699
1692
  focus: n = !1,
1700
1693
  inputPlaceHolder: t,
1701
1694
  handleInputChange: r,
1702
- showContent: c = !1,
1703
- setShowContent: i,
1695
+ showContent: i = !1,
1696
+ setShowContent: c,
1704
1697
  readOnly: a,
1705
1698
  value: x,
1706
1699
  label: o,
@@ -1708,31 +1701,31 @@ const Ee = ({ variant: n, children: t }) => {
1708
1701
  required: h,
1709
1702
  children: j
1710
1703
  }) => {
1711
- const u = oe(null), m = (v) => {
1712
- i(!0), r(v.target.value);
1713
- }, f = J(() => {
1714
- i(!1);
1715
- }, [i]), N = J((v) => {
1716
- v.keyCode === 27 && f();
1704
+ const u = de(null), p = (g) => {
1705
+ c(!0), r(g.target.value);
1706
+ }, f = G(() => {
1707
+ c(!1);
1708
+ }, [c]), N = G((g) => {
1709
+ g.keyCode === 27 && f();
1717
1710
  }, [f]);
1718
- return K(() => {
1719
- const v = (C) => {
1711
+ return Q(() => {
1712
+ const g = (T) => {
1720
1713
  if (u && u !== null) {
1721
- const g = u.current;
1722
- g && !g.contains(C.target) && f();
1714
+ const v = u.current;
1715
+ v && !v.contains(T.target) && f();
1723
1716
  }
1724
1717
  };
1725
- return document.addEventListener("keydown", N, !1), document.addEventListener("mousedown", v), () => {
1718
+ return document.addEventListener("keydown", N, !1), document.addEventListener("mousedown", g), () => {
1726
1719
  document.removeEventListener("keydown", N, !1);
1727
1720
  };
1728
1721
  }, [N, f]), /* @__PURE__ */ e.jsxs("div", { className: "muncher-input-drop-down", ref: u, children: [
1729
1722
  /* @__PURE__ */ e.jsx(
1730
- Me,
1723
+ ke,
1731
1724
  {
1732
1725
  focus: n,
1733
1726
  placeholder: t,
1734
1727
  name: "query",
1735
- onChange: m,
1728
+ onChange: p,
1736
1729
  readOnly: a,
1737
1730
  value: x,
1738
1731
  label: o,
@@ -1740,27 +1733,27 @@ const Ee = ({ variant: n, children: t }) => {
1740
1733
  error: d
1741
1734
  }
1742
1735
  ),
1743
- c ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-drop-down--content", children: j }) : ""
1736
+ i ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-drop-down--content", children: j }) : ""
1744
1737
  ] });
1745
- }, Ve = ({ children: n }) => /* @__PURE__ */ e.jsx("ul", { className: "muncher-ul", children: n }), Le = ({ isFeatured: n, bulletIcon: t = "arrow-right", bulletWeight: r = 2, bulletSize: c = "small", bulletColor: i, children: a }) => /* @__PURE__ */ e.jsx("li", { className: n ? "muncher-li featured" : "muncher-li", children: /* @__PURE__ */ e.jsx(
1738
+ }, Le = ({ children: n }) => /* @__PURE__ */ e.jsx("ul", { className: "muncher-ul", children: n }), Pe = ({ isFeatured: n, bulletIcon: t = "arrow-right", bulletWeight: r = 2, bulletSize: i = "small", bulletColor: c, children: a }) => /* @__PURE__ */ e.jsx("li", { className: n ? "muncher-li featured" : "muncher-li", children: /* @__PURE__ */ e.jsx(
1746
1739
  w,
1747
1740
  {
1748
1741
  name: t,
1749
1742
  weight: r,
1750
- size: c,
1751
- color: i,
1743
+ size: i,
1744
+ color: c,
1752
1745
  children: a
1753
1746
  }
1754
- ) }), Pe = ({ show: n = !1, setShow: t, children: r, ...c }) => {
1755
- const i = J((a) => {
1747
+ ) }), De = ({ show: n = !1, setShow: t, children: r, ...i }) => {
1748
+ const c = G((a) => {
1756
1749
  a.keyCode === 27 && t(!1);
1757
1750
  }, [t]);
1758
- return K(() => (document.addEventListener("keydown", i, !1), () => {
1759
- document.removeEventListener("keydown", i, !1);
1760
- }), [i]), K(() => {
1751
+ return Q(() => (document.addEventListener("keydown", c, !1), () => {
1752
+ document.removeEventListener("keydown", c, !1);
1753
+ }), [c]), Q(() => {
1761
1754
  n ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset";
1762
- }, [n]), /* @__PURE__ */ e.jsxs(xe.Fragment, { children: [
1763
- /* @__PURE__ */ e.jsx(pe, { show: n, backdropClickHandler: () => t(!1) }),
1755
+ }, [n]), /* @__PURE__ */ e.jsxs(oe.Fragment, { children: [
1756
+ /* @__PURE__ */ e.jsx(me, { show: n, backdropClickHandler: () => t(!1) }),
1764
1757
  /* @__PURE__ */ e.jsx(
1765
1758
  "div",
1766
1759
  {
@@ -1769,53 +1762,53 @@ const Ee = ({ variant: n, children: t }) => {
1769
1762
  transform: n ? "translateY(0)" : "translateY(-100vh)",
1770
1763
  opacity: n ? "1" : "0"
1771
1764
  },
1772
- ...c,
1765
+ ...i,
1773
1766
  children: r
1774
1767
  }
1775
1768
  )
1776
1769
  ] });
1777
- }, De = ({ showHoverEffect: n, onClick: t, children: r }) => {
1778
- const c = () => n ? "muncher-paper muncher-paper-hover" : "muncher-paper";
1779
- return /* @__PURE__ */ e.jsx("section", { className: c(), onClick: t, children: r });
1780
- }, Fe = ({ pillCloseHandler: n, children: t, ...r }) => /* @__PURE__ */ e.jsxs("div", { className: "muncher-pill", ...r, children: [
1770
+ }, Fe = ({ showHoverEffect: n, onClick: t, children: r }) => {
1771
+ const i = () => n ? "muncher-paper muncher-paper-hover" : "muncher-paper";
1772
+ return /* @__PURE__ */ e.jsx("section", { className: i(), onClick: t, children: r });
1773
+ }, Ie = ({ pillCloseHandler: n, children: t, ...r }) => /* @__PURE__ */ e.jsxs("div", { className: "muncher-pill", ...r, children: [
1781
1774
  /* @__PURE__ */ e.jsx("div", { className: "close", onClick: n, children: /* @__PURE__ */ e.jsx(w, { name: "close" }) }),
1782
1775
  /* @__PURE__ */ e.jsxs("div", { className: "content", children: [
1783
1776
  " ",
1784
1777
  t
1785
1778
  ] })
1786
- ] }), Ie = ({ value: n, max: t, label: r }) => {
1787
- const c = () => {
1788
- const i = Math.round(n / t * 100) + "%";
1789
- return r ? r + " " + i : i;
1779
+ ] }), Ye = ({ value: n, max: t, label: r }) => {
1780
+ const i = () => {
1781
+ const c = Math.round(n / t * 100) + "%";
1782
+ return r ? r + " " + c : c;
1790
1783
  };
1791
1784
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-progress", children: [
1792
- /* @__PURE__ */ e.jsx("label", { htmlFor: "progress", children: c() }),
1793
- /* @__PURE__ */ e.jsx("progress", { id: "progress", value: n, max: t, children: c() })
1785
+ /* @__PURE__ */ e.jsx("label", { htmlFor: "progress", children: i() }),
1786
+ /* @__PURE__ */ e.jsx("progress", { id: "progress", value: n, max: t, children: i() })
1794
1787
  ] });
1795
- }, Ye = ({ variant: n, size: t, style: r }) => {
1796
- const c = "muncher-hr" + (n ? " muncher-hr--" + n : "") + (t ? " muncher-hr--" + t : "") + (r ? " muncher-hr--" + r : "");
1797
- return /* @__PURE__ */ e.jsx("hr", { className: c });
1798
- }, $e = ({ sliderItems: n, navButtonSize: t = "large", navButtonWeight: r = 2, variant: c, navIcon: i, navButtonPlacement: a = "inside" }) => {
1799
- const [x, o] = T(0), [d, h] = T(0), j = () => n.length > 1 && x > 0 ? /* @__PURE__ */ e.jsx(
1800
- ae,
1788
+ }, $e = ({ variant: n, size: t, style: r }) => {
1789
+ const i = "muncher-hr" + (n ? " muncher-hr--" + n : "") + (t ? " muncher-hr--" + t : "") + (r ? " muncher-hr--" + r : "");
1790
+ return /* @__PURE__ */ e.jsx("hr", { className: i });
1791
+ }, Ue = ({ sliderItems: n, navButtonSize: t = "large", navButtonWeight: r = 2, variant: i, navIcon: c, navButtonPlacement: a = "inside" }) => {
1792
+ const [x, o] = A(0), [d, h] = A(0), j = () => n.length > 1 && x > 0 ? /* @__PURE__ */ e.jsx(
1793
+ xe,
1801
1794
  {
1802
1795
  direction: "left",
1803
1796
  size: t,
1804
- variant: c,
1805
- navIcon: i,
1797
+ variant: i,
1798
+ navIcon: c,
1806
1799
  weight: r,
1807
1800
  onClick: () => {
1808
1801
  x === 0 ? (h(-(n.length - 1) * 100), o(n.length - 1)) : (h(d + 100), o(x - 1));
1809
1802
  }
1810
1803
  }
1811
1804
  ) : "", u = () => n.length > 1 && x < n.length - 1 ? /* @__PURE__ */ e.jsx(
1812
- ae,
1805
+ xe,
1813
1806
  {
1814
1807
  direction: "right",
1815
1808
  size: t,
1816
1809
  weight: r,
1817
- navIcon: i,
1818
- variant: c,
1810
+ navIcon: c,
1811
+ variant: i,
1819
1812
  onClick: () => {
1820
1813
  x === n.length - 1 ? (o(0), h(0)) : (h(d - 100), o(x + 1));
1821
1814
  }
@@ -1826,12 +1819,12 @@ const Ee = ({ variant: n, children: t }) => {
1826
1819
  /* @__PURE__ */ e.jsxs("div", { className: "muncher-item-slider", children: [
1827
1820
  a === "inside" ? j() : "",
1828
1821
  /* @__PURE__ */ e.jsx("div", { className: "slider-container", style: { width: `${100 * n.length}%` }, children: n.map(
1829
- (m, f) => /* @__PURE__ */ e.jsx(
1822
+ (p, f) => /* @__PURE__ */ e.jsx(
1830
1823
  "div",
1831
1824
  {
1832
1825
  className: "slider-item",
1833
1826
  style: { transform: `translateX(${d}%)` },
1834
- children: m
1827
+ children: p
1835
1828
  },
1836
1829
  "slider-item" + f
1837
1830
  )
@@ -1840,12 +1833,12 @@ const Ee = ({ variant: n, children: t }) => {
1840
1833
  ] }),
1841
1834
  a === "outside" ? u() : ""
1842
1835
  ] });
1843
- }, Ue = ({
1836
+ }, We = ({
1844
1837
  min: n,
1845
1838
  max: t,
1846
1839
  minValue: r,
1847
- maxValue: c,
1848
- setMinValue: i,
1840
+ maxValue: i,
1841
+ setMinValue: c,
1849
1842
  setMaxValue: a,
1850
1843
  numberFormatter: x = (o) => new Intl.NumberFormat("en-US", {
1851
1844
  style: "currency",
@@ -1853,14 +1846,14 @@ const Ee = ({ variant: n, children: t }) => {
1853
1846
  }).format(o)
1854
1847
  }) => {
1855
1848
  const o = (j) => {
1856
- const u = +j.target.value, m = u < c - 1 ? u : r;
1857
- i(m);
1849
+ const u = +j.target.value, p = u < i - 1 ? u : r;
1850
+ c(p);
1858
1851
  }, d = (j) => {
1859
- const u = +j.target.value, m = u > r + 1 ? u : c;
1860
- a(m);
1852
+ const u = +j.target.value, p = u > r + 1 ? u : i;
1853
+ a(p);
1861
1854
  }, h = (j) => x && j ? x(j) : j;
1862
1855
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-slider", children: [
1863
- /* @__PURE__ */ e.jsx("div", { className: "slider-header", children: /* @__PURE__ */ e.jsx("p", { children: h(r) + " - " + h(c) }) }),
1856
+ /* @__PURE__ */ e.jsx("div", { className: "slider-header", children: /* @__PURE__ */ e.jsx("p", { children: h(r) + " - " + h(i) }) }),
1864
1857
  /* @__PURE__ */ e.jsx(
1865
1858
  "input",
1866
1859
  {
@@ -1879,7 +1872,7 @@ const Ee = ({ variant: n, children: t }) => {
1879
1872
  type: "range",
1880
1873
  min: n,
1881
1874
  max: t,
1882
- value: c,
1875
+ value: i,
1883
1876
  onChange: d
1884
1877
  }
1885
1878
  ),
@@ -1888,19 +1881,19 @@ const Ee = ({ variant: n, children: t }) => {
1888
1881
  /* @__PURE__ */ e.jsx("div", { className: "slider-max", children: h(t) })
1889
1882
  ] })
1890
1883
  ] });
1891
- }, We = ({
1884
+ }, Be = ({
1892
1885
  min: n,
1893
1886
  max: t,
1894
1887
  value: r,
1895
- setValue: c,
1896
- numberFormatter: i = (a) => new Intl.NumberFormat("en-US", {
1888
+ setValue: i,
1889
+ numberFormatter: c = (a) => new Intl.NumberFormat("en-US", {
1897
1890
  style: "currency",
1898
1891
  currency: "USD"
1899
1892
  }).format(a)
1900
1893
  }) => {
1901
- const a = (o) => i ? i(o) : o, x = (o) => {
1894
+ const a = (o) => c ? c(o) : o, x = (o) => {
1902
1895
  const d = +o.target.value;
1903
- c(d);
1896
+ i(d);
1904
1897
  };
1905
1898
  return /* @__PURE__ */ e.jsxs("div", { className: "muncher-slider", children: [
1906
1899
  /* @__PURE__ */ e.jsx("div", { className: "slider-header", children: /* @__PURE__ */ e.jsx("p", { children: a(r) }) }),
@@ -1920,20 +1913,20 @@ const Ee = ({ variant: n, children: t }) => {
1920
1913
  /* @__PURE__ */ e.jsx("div", { className: "slider-max", children: a(t) })
1921
1914
  ] })
1922
1915
  ] });
1923
- }, Be = ({ isFeatured: n, onClick: t }) => /* @__PURE__ */ e.jsx("span", { className: "span-featured", children: /* @__PURE__ */ e.jsx("span", { className: n ? "featured-star" : "un-featured-star", onClick: t }) }), Je = ({ rating: n, color: t, size: r, ...c }) => {
1924
- const i = {
1916
+ }, Je = ({ isFeatured: n, onClick: t }) => /* @__PURE__ */ e.jsx("span", { className: "span-featured", children: /* @__PURE__ */ e.jsx("span", { className: n ? "featured-star" : "un-featured-star", onClick: t }) }), Ge = ({ rating: n, color: t, size: r, ...i }) => {
1917
+ const c = {
1925
1918
  "--r": n
1926
1919
  }, a = () => {
1927
1920
  let x = "muncher-star";
1928
1921
  return t && (x += " star-" + t), r && (x += " star-" + r), x;
1929
1922
  };
1930
- return /* @__PURE__ */ e.jsx("span", { className: a(), style: i, ...c });
1931
- }, Ge = ({ handleTabSelected: n, children: t }) => {
1932
- const [r, c] = T(0), { tabs: i } = t, a = (x) => {
1933
- c(x), n && n(x);
1923
+ return /* @__PURE__ */ e.jsx("span", { className: a(), style: c, ...i });
1924
+ }, qe = ({ handleTabSelected: n, children: t }) => {
1925
+ const [r, i] = A(0), { tabs: c } = t, a = (x) => {
1926
+ i(x), n && n(x);
1934
1927
  };
1935
1928
  return /* @__PURE__ */ e.jsxs("section", { className: "muncher-tabs", children: [
1936
- /* @__PURE__ */ e.jsx("header", { children: i.map(
1929
+ /* @__PURE__ */ e.jsx("header", { children: c.map(
1937
1930
  (x, o) => /* @__PURE__ */ e.jsxs("div", { className: "muncher-tab-header--item", children: [
1938
1931
  /* @__PURE__ */ e.jsx(
1939
1932
  O,
@@ -1948,10 +1941,10 @@ const Ee = ({ variant: n, children: t }) => {
1948
1941
  children: x.header
1949
1942
  }
1950
1943
  ),
1951
- o !== i.length - 1 ? /* @__PURE__ */ e.jsx("span", { className: "spacer", children: "|" }) : ""
1944
+ o !== c.length - 1 ? /* @__PURE__ */ e.jsx("span", { className: "spacer", children: "|" }) : ""
1952
1945
  ] }, "muncher-tab-header" + o)
1953
1946
  ) }),
1954
- i.map(
1947
+ c.map(
1955
1948
  (x, o) => /* @__PURE__ */ e.jsx(
1956
1949
  "section",
1957
1950
  {
@@ -1962,12 +1955,12 @@ const Ee = ({ variant: n, children: t }) => {
1962
1955
  )
1963
1956
  )
1964
1957
  ] });
1965
- }, qe = ({
1958
+ }, Xe = ({
1966
1959
  fileName: n,
1967
- defaultPageSize: t,
1960
+ defaultPageSize: t = 50,
1968
1961
  skeleton: r,
1969
- handleOnUpload: c,
1970
- sortBy: i,
1962
+ handleOnUpload: i,
1963
+ sortBy: c,
1971
1964
  excludeDownload: a,
1972
1965
  includeUpload: x,
1973
1966
  isUploading: o,
@@ -1975,109 +1968,101 @@ const Ee = ({ variant: n, children: t }) => {
1975
1968
  uploadSuccessMessage: h,
1976
1969
  excludePagination: j,
1977
1970
  footer: u,
1978
- children: m
1971
+ children: p
1979
1972
  }) => {
1980
- const { header: f, rows: N } = m, [v, C] = T(i || { index: 0 }), [g, A] = T({ num: 0, size: t || 50 }), _ = (y) => {
1981
- v.index === y ? C({ ...v, desc: !v.desc }) : C({ index: y });
1982
- }, S = () => {
1983
- if (f[v.index].sort) {
1984
- const y = N.sort(f[v.index].sort);
1985
- return v.desc ? y.reverse() : y;
1986
- }
1987
- return N.sort(
1988
- (y, k) => {
1989
- var D, Y, q, F, $, U;
1990
- if (((D = y[v.index]) == null ? void 0 : D.value) === null || ((Y = k[v.index]) == null ? void 0 : Y.value) === null)
1991
- return 0;
1992
- const z = (F = (q = y[v.index]) == null ? void 0 : q.value) == null ? void 0 : F.toString().toLowerCase(), L = (U = ($ = k[v.index]) == null ? void 0 : $.value) == null ? void 0 : U.toString().toLowerCase();
1993
- let H = z.localeCompare(L);
1994
- return v.desc ? -H : H;
1995
- }
1973
+ const { header: f, rows: N } = p, [g, T] = A(c ?? { index: 0 }), [v, _] = A({ num: 0, size: t }), S = (m) => {
1974
+ T(
1975
+ (M) => M.index === m ? { ...M, desc: !M.desc } : { index: m }
1996
1976
  );
1997
- }, M = () => (g.num + 1) * g.size;
1977
+ }, z = te(() => {
1978
+ var C;
1979
+ const m = [...N], M = (C = f[g.index]) == null ? void 0 : C.sort;
1980
+ return M ? m.sort(M) : m.sort((L, X) => {
1981
+ var Y, $, U, W;
1982
+ const Z = (($ = (Y = L[g.index]) == null ? void 0 : Y.value) == null ? void 0 : $.toString().toLowerCase()) ?? "", I = ((W = (U = X[g.index]) == null ? void 0 : U.value) == null ? void 0 : W.toString().toLowerCase()) ?? "";
1983
+ return Z.localeCompare(I);
1984
+ }), g.desc ? m.reverse() : m;
1985
+ }, [N, g, f]), k = te(
1986
+ () => z.slice(v.num * v.size, (v.num + 1) * v.size),
1987
+ [z, v]
1988
+ ), H = f.filter((m) => !m.csvExclude).map((m) => typeof m.name == "string" ? m.name : ""), P = N.map(
1989
+ (m) => m.filter((M, C) => !f[C].csvExclude).map((M) => M.csv ?? M.value ?? "")
1990
+ );
1998
1991
  return /* @__PURE__ */ e.jsxs("section", { className: "muncher-table", children: [
1999
1992
  /* @__PURE__ */ e.jsx("div", { className: "row head", children: f.map(
2000
- (y, k) => y.visibility === "hidden" ? "" : /* @__PURE__ */ e.jsx(
1993
+ (m, M) => m.visibility === "hidden" ? null : /* @__PURE__ */ e.jsx(
2001
1994
  "div",
2002
1995
  {
2003
- title: y.title,
2004
- className: y.visibility ? "col main" : "col",
2005
- children: typeof y.name == "string" ? /* @__PURE__ */ e.jsx("div", { className: "sort-button", children: /* @__PURE__ */ e.jsx(
2006
- we,
1996
+ title: m.title,
1997
+ className: m.visibility ? "col main" : "col",
1998
+ children: typeof m.name == "string" ? /* @__PURE__ */ e.jsx("div", { className: "sort-button", children: /* @__PURE__ */ e.jsx(
1999
+ Ne,
2007
2000
  {
2008
- onClick: () => {
2009
- _(k);
2010
- },
2011
- active: v.index === k,
2012
- sortAsc: !v.desc,
2013
- children: y.name
2001
+ onClick: () => S(M),
2002
+ active: g.index === M,
2003
+ sortAsc: !g.desc,
2004
+ children: m.name
2014
2005
  }
2015
- ) }) : y.name
2006
+ ) }) : m.name
2016
2007
  },
2017
- "row-head-" + y.name
2008
+ `row-head-${M}`
2018
2009
  )
2019
2010
  ) }),
2020
- r || S().slice(g.num * g.size, M() - 1).map(
2021
- (y, k) => /* @__PURE__ */ e.jsx("div", { className: "row", children: y.map((z, L) => f[L].visibility === "hidden" ? "" : /* @__PURE__ */ e.jsx(
2011
+ r || k.map((m, M) => /* @__PURE__ */ e.jsx("div", { className: "row", children: m.map(
2012
+ (C, L) => f[L].visibility === "hidden" ? null : /* @__PURE__ */ e.jsx(
2022
2013
  "div",
2023
2014
  {
2024
2015
  className: f[L].visibility ? "col main" : "col",
2025
- children: z.content
2016
+ children: C.content
2026
2017
  },
2027
- "row-col" + k + L
2028
- )) }, "row-" + k)
2029
- ),
2030
- u || "",
2018
+ `row-col-${M}-${L}`
2019
+ )
2020
+ ) }, `row-${M}`)),
2021
+ u ?? null,
2031
2022
  /* @__PURE__ */ e.jsxs("div", { className: "row-footer", children: [
2032
2023
  /* @__PURE__ */ e.jsxs("div", { className: "row-footer-buttons", children: [
2033
- a ? "" : /* @__PURE__ */ e.jsx(
2034
- be,
2024
+ !a && /* @__PURE__ */ e.jsx(
2025
+ we,
2035
2026
  {
2036
- filename: n || "download",
2027
+ filename: n ?? "download",
2037
2028
  variant: "secondary",
2038
2029
  title: "Download",
2039
- header: f.filter((y) => !y.csvExclude).map((y) => typeof y.name == "string" ? y.name : ""),
2040
- data: N.map(
2041
- (y) => y.filter((k, z) => !f[z].csvExclude).map((k) => k.csv ? k.csv ? k.csv : "" : k.value ? k.value : "")
2042
- )
2030
+ header: H,
2031
+ data: P
2043
2032
  }
2044
2033
  ),
2045
- x ? /* @__PURE__ */ e.jsx(
2046
- Ne,
2034
+ x && /* @__PURE__ */ e.jsx(
2035
+ Me,
2047
2036
  {
2048
2037
  name: "csv-input-file",
2049
- handleOnChange: c,
2038
+ handleOnChange: i,
2050
2039
  isUploading: o,
2051
2040
  warningMessage: d,
2052
2041
  successMessage: h
2053
2042
  }
2054
- ) : ""
2043
+ )
2055
2044
  ] }),
2056
- j ? "" : /* @__PURE__ */ e.jsxs("div", { className: "pagination", children: [
2045
+ !j && /* @__PURE__ */ e.jsxs("div", { className: "pagination", children: [
2057
2046
  /* @__PURE__ */ e.jsxs("div", { className: "left", children: [
2058
- "Rows: ",
2047
+ "Rows:",
2059
2048
  /* @__PURE__ */ e.jsx(
2060
- ke,
2049
+ Ce,
2061
2050
  {
2062
2051
  name: "pageSize",
2063
- options: [{ label: "50", value: "50" }, {
2064
- label: "100",
2065
- value: "100"
2066
- }, { label: "500", value: "500" }],
2067
- value: g.size,
2068
- onChange: (y) => {
2069
- A({
2070
- ...g,
2071
- size: parseInt(y.target.value)
2072
- });
2073
- }
2052
+ options: [
2053
+ { label: "50", value: "50" },
2054
+ { label: "100", value: "100" },
2055
+ { label: "500", value: "500" }
2056
+ ],
2057
+ value: String(v.size),
2058
+ onChange: (m) => _({ num: 0, size: parseInt(m.target.value, 10) })
2074
2059
  }
2075
2060
  )
2076
2061
  ] }),
2077
2062
  /* @__PURE__ */ e.jsxs("div", { className: "center", children: [
2078
- g.num * g.size + 1,
2079
- " - ",
2080
- M() < N.length ? M() : N.length,
2063
+ v.num * v.size + 1,
2064
+ " -",
2065
+ Math.min((v.num + 1) * v.size, N.length),
2081
2066
  " of ",
2082
2067
  N.length
2083
2068
  ] }),
@@ -2086,11 +2071,9 @@ const Ee = ({ variant: n, children: t }) => {
2086
2071
  O,
2087
2072
  {
2088
2073
  variant: "transparent",
2089
- disabled: g.num === 0,
2074
+ disabled: v.num === 0,
2090
2075
  size: "small",
2091
- onClick: () => {
2092
- A({ ...g, num: g.num - 1 });
2093
- },
2076
+ onClick: () => _({ ...v, num: v.num - 1 }),
2094
2077
  children: /* @__PURE__ */ e.jsx(w, { name: "chevron-left" })
2095
2078
  }
2096
2079
  ),
@@ -2098,11 +2081,9 @@ const Ee = ({ variant: n, children: t }) => {
2098
2081
  O,
2099
2082
  {
2100
2083
  variant: "transparent",
2101
- disabled: N.length - g.num * g.size <= g.size,
2084
+ disabled: (v.num + 1) * v.size >= N.length,
2102
2085
  size: "small",
2103
- onClick: () => {
2104
- A({ ...g, num: g.num + 1 });
2105
- },
2086
+ onClick: () => _({ ...v, num: v.num + 1 }),
2106
2087
  children: /* @__PURE__ */ e.jsx(w, { name: "chevron-right" })
2107
2088
  }
2108
2089
  )
@@ -2112,42 +2093,42 @@ const Ee = ({ variant: n, children: t }) => {
2112
2093
  ] });
2113
2094
  };
2114
2095
  export {
2115
- Ee as Accordion,
2116
- pe as Backdrop,
2117
- me as Badge,
2096
+ Re as Accordion,
2097
+ me as Backdrop,
2098
+ fe as Badge,
2118
2099
  O as Button,
2119
- _e as Checkbox,
2120
- ge as CopyButton,
2121
- be as CsvButton,
2122
- Ne as CsvInput,
2123
- fe as DropdownButton,
2124
- Te as DropdownNavButton,
2125
- Be as Featured,
2126
- Ye as Hr,
2100
+ Se as Checkbox,
2101
+ be as CopyButton,
2102
+ we as CsvButton,
2103
+ Me as CsvInput,
2104
+ ve as DropdownButton,
2105
+ Ae as DropdownNavButton,
2106
+ Je as Featured,
2107
+ $e as Hr,
2127
2108
  w as Icon,
2128
- Re as IconBadge,
2109
+ Te as IconBadge,
2129
2110
  ze as ImageInput,
2130
- Me as Input,
2131
- $e as ItemSlider,
2132
- G as Label,
2133
- Le as Li,
2134
- Pe as Modal,
2135
- ae as NavigateButton,
2136
- De as Paper,
2137
- Fe as Pill,
2138
- Ie as Progress,
2139
- Se as Radio,
2140
- Ue as RangeSlider,
2141
- ke as Select,
2142
- Ae as ShareButton,
2143
- We as Slider,
2144
- we as SortButton,
2145
- de as Spinner,
2146
- Je as Star,
2147
- qe as Table,
2148
- Ge as Tabs,
2149
- Oe as TextInputDropdown,
2150
- He as Textarea,
2151
- Ve as Ul,
2152
- ve as copyToClipboard
2111
+ ke as Input,
2112
+ Ue as ItemSlider,
2113
+ q as Label,
2114
+ Pe as Li,
2115
+ De as Modal,
2116
+ xe as NavigateButton,
2117
+ Fe as Paper,
2118
+ Ie as Pill,
2119
+ Ye as Progress,
2120
+ He as Radio,
2121
+ We as RangeSlider,
2122
+ Ce as Select,
2123
+ _e as ShareButton,
2124
+ Be as Slider,
2125
+ Ne as SortButton,
2126
+ he as Spinner,
2127
+ Ge as Star,
2128
+ Xe as Table,
2129
+ qe as Tabs,
2130
+ Ve as TextInputDropdown,
2131
+ Oe as Textarea,
2132
+ Le as Ul,
2133
+ ge as copyToClipboard
2153
2134
  };