@contentmunch/contentmunch-ui 1.0.28 → 1.0.29
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.cjs.js +5 -5
- package/lib/index.es.js +207 -209
- package/lib/index.umd.js +5 -5
- package/lib/input/Input.d.ts +1 -0
- package/lib/input/assets/input.css +8 -0
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import xe, { useState as T, Fragment as s, useRef as oe, useCallback as
|
|
2
|
-
var X = { exports: {} },
|
|
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 = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -10,8 +10,8 @@ var X = { exports: {} }, $ = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var te;
|
|
13
|
-
function
|
|
14
|
-
if (te) return
|
|
13
|
+
function je() {
|
|
14
|
+
if (te) return W;
|
|
15
15
|
te = 1;
|
|
16
16
|
var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
17
17
|
function r(c, i, a) {
|
|
@@ -29,9 +29,9 @@ function he() {
|
|
|
29
29
|
props: a
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return W.Fragment = t, W.jsx = r, W.jsxs = r, W;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var B = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -42,12 +42,12 @@ var W = {};
|
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
44
|
var le;
|
|
45
|
-
function
|
|
45
|
+
function ue() {
|
|
46
46
|
return le || (le = 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 ===
|
|
50
|
+
return l.$$typeof === H ? null : l.displayName || l.name || null;
|
|
51
51
|
if (typeof l == "string") return l;
|
|
52
52
|
switch (l) {
|
|
53
53
|
case v:
|
|
@@ -56,29 +56,29 @@ function je() {
|
|
|
56
56
|
return "Profiler";
|
|
57
57
|
case C:
|
|
58
58
|
return "StrictMode";
|
|
59
|
-
case
|
|
59
|
+
case M:
|
|
60
60
|
return "Suspense";
|
|
61
61
|
case y:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case L:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
66
|
if (typeof l == "object")
|
|
67
67
|
switch (typeof l.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
69
|
), l.$$typeof) {
|
|
70
|
-
case
|
|
70
|
+
case N:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case z:
|
|
73
|
-
return (l.displayName || "Context") + ".Provider";
|
|
74
72
|
case _:
|
|
73
|
+
return (l.displayName || "Context") + ".Provider";
|
|
74
|
+
case A:
|
|
75
75
|
return (l._context.displayName || "Context") + ".Consumer";
|
|
76
76
|
case S:
|
|
77
77
|
var p = l.render;
|
|
78
78
|
return l = l.displayName, l || (l = p.displayName || p.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
79
|
-
case
|
|
79
|
+
case k:
|
|
80
80
|
return p = l.displayName || null, p !== null ? p : n(l.type) || "Memo";
|
|
81
|
-
case
|
|
81
|
+
case z:
|
|
82
82
|
p = l._payload, l = l._init;
|
|
83
83
|
try {
|
|
84
84
|
return n(l(p));
|
|
@@ -99,8 +99,8 @@ function je() {
|
|
|
99
99
|
}
|
|
100
100
|
if (p) {
|
|
101
101
|
p = console;
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var b = p.error, E = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
103
|
+
return b.call(
|
|
104
104
|
p,
|
|
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
|
|
@@ -109,7 +109,7 @@ function je() {
|
|
|
109
109
|
}
|
|
110
110
|
function c(l) {
|
|
111
111
|
if (l === v) return "<>";
|
|
112
|
-
if (typeof l == "object" && l !== null && l.$$typeof ===
|
|
112
|
+
if (typeof l == "object" && l !== null && l.$$typeof === z)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
115
|
var p = n(l);
|
|
@@ -119,45 +119,45 @@ function je() {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function i() {
|
|
122
|
-
var l =
|
|
122
|
+
var l = D.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 (
|
|
129
|
+
if (Y.call(l, "key")) {
|
|
130
130
|
var p = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
131
131
|
if (p && p.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
133
|
return l.key !== void 0;
|
|
134
134
|
}
|
|
135
135
|
function o(l, p) {
|
|
136
|
-
function
|
|
137
|
-
|
|
136
|
+
function b() {
|
|
137
|
+
U || (U = !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
139
|
p
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
b.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
143
|
+
get: b,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function d() {
|
|
148
148
|
var l = n(this.type);
|
|
149
|
-
return
|
|
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,
|
|
154
|
-
return
|
|
153
|
+
function h(l, p, b, E, P, V, Q, Z) {
|
|
154
|
+
return b = V.ref, l = {
|
|
155
155
|
$$typeof: f,
|
|
156
156
|
type: l,
|
|
157
157
|
key: p,
|
|
158
158
|
props: V,
|
|
159
|
-
_owner:
|
|
160
|
-
}, (
|
|
159
|
+
_owner: P
|
|
160
|
+
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(l, "ref", {
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
get: d
|
|
163
163
|
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
@@ -182,7 +182,7 @@ function je() {
|
|
|
182
182
|
value: Z
|
|
183
183
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
184
184
|
}
|
|
185
|
-
function j(l, p,
|
|
185
|
+
function j(l, p, b, E, P, V, Q, Z) {
|
|
186
186
|
var R = p.children;
|
|
187
187
|
if (R !== void 0)
|
|
188
188
|
if (E)
|
|
@@ -195,12 +195,12 @@ function je() {
|
|
|
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 (
|
|
198
|
+
if (Y.call(p, "key")) {
|
|
199
199
|
R = n(l);
|
|
200
|
-
var
|
|
201
|
-
return
|
|
200
|
+
var I = Object.keys(p).filter(function(he) {
|
|
201
|
+
return he !== "key";
|
|
202
202
|
});
|
|
203
|
-
E = 0 <
|
|
203
|
+
E = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", re[R + E] || (I = 0 < I.length ? "{" + I.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,25 +209,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
<%s key={someKey} {...props} />`,
|
|
210
210
|
E,
|
|
211
211
|
R,
|
|
212
|
-
|
|
212
|
+
I,
|
|
213
213
|
R
|
|
214
214
|
), re[R + E] = !0);
|
|
215
215
|
}
|
|
216
|
-
if (R = null,
|
|
217
|
-
|
|
216
|
+
if (R = null, b !== void 0 && (r(b), R = "" + b), x(p) && (r(p.key), R = "" + p.key), "key" in p) {
|
|
217
|
+
b = {};
|
|
218
218
|
for (var ee in p)
|
|
219
|
-
ee !== "key" && (
|
|
220
|
-
} else
|
|
219
|
+
ee !== "key" && (b[ee] = p[ee]);
|
|
220
|
+
} else b = p;
|
|
221
221
|
return R && o(
|
|
222
|
-
|
|
222
|
+
b,
|
|
223
223
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
224
224
|
), h(
|
|
225
225
|
l,
|
|
226
226
|
R,
|
|
227
227
|
V,
|
|
228
|
-
|
|
228
|
+
P,
|
|
229
229
|
i(),
|
|
230
|
-
|
|
230
|
+
b,
|
|
231
231
|
Q,
|
|
232
232
|
Z
|
|
233
233
|
);
|
|
@@ -235,7 +235,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
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"),
|
|
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() {
|
|
239
239
|
return null;
|
|
240
240
|
};
|
|
241
241
|
m = {
|
|
@@ -243,42 +243,42 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
243
|
return l();
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
|
-
var
|
|
246
|
+
var U, $ = {}, se = m["react-stack-bottom-frame"].bind(
|
|
247
247
|
m,
|
|
248
248
|
a
|
|
249
|
-
)(), ne =
|
|
250
|
-
|
|
251
|
-
var V = 1e4 >
|
|
249
|
+
)(), ne = F(c(a)), re = {};
|
|
250
|
+
B.Fragment = v, B.jsx = function(l, p, b, E, P) {
|
|
251
|
+
var V = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
252
252
|
return j(
|
|
253
253
|
l,
|
|
254
254
|
p,
|
|
255
|
-
|
|
255
|
+
b,
|
|
256
256
|
!1,
|
|
257
257
|
E,
|
|
258
|
-
|
|
258
|
+
P,
|
|
259
259
|
V ? Error("react-stack-top-frame") : se,
|
|
260
|
-
V ?
|
|
260
|
+
V ? F(c(l)) : ne
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
var V = 1e4 >
|
|
262
|
+
}, B.jsxs = function(l, p, b, E, P) {
|
|
263
|
+
var V = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
264
264
|
return j(
|
|
265
265
|
l,
|
|
266
266
|
p,
|
|
267
|
-
|
|
267
|
+
b,
|
|
268
268
|
!0,
|
|
269
269
|
E,
|
|
270
|
-
|
|
270
|
+
P,
|
|
271
271
|
V ? Error("react-stack-top-frame") : se,
|
|
272
|
-
V ?
|
|
272
|
+
V ? F(c(l)) : ne
|
|
273
273
|
);
|
|
274
274
|
};
|
|
275
|
-
}()),
|
|
275
|
+
}()), B;
|
|
276
276
|
}
|
|
277
277
|
var ie;
|
|
278
|
-
function
|
|
279
|
-
return ie || (ie = 1, process.env.NODE_ENV === "production" ? X.exports =
|
|
278
|
+
function ye() {
|
|
279
|
+
return ie || (ie = 1, process.env.NODE_ENV === "production" ? X.exports = je() : X.exports = ue()), X.exports;
|
|
280
280
|
}
|
|
281
|
-
var e =
|
|
281
|
+
var e = ye();
|
|
282
282
|
const Ee = ({ variant: n, children: t }) => {
|
|
283
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) => {
|
|
284
284
|
const h = d.which.toString(), j = d.ctrlKey && h.match(/33|34/);
|
|
@@ -311,11 +311,11 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
311
311
|
"muncher-accordion-fold-" + h
|
|
312
312
|
)
|
|
313
313
|
) });
|
|
314
|
-
},
|
|
314
|
+
}, pe = ({
|
|
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,
|
|
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 = {
|
|
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
|
-
},
|
|
1072
|
+
}, w = ({ color: n, name: t, size: r = "small", weight: c = 2, onClick: i, 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 }) : "",
|
|
@@ -1103,8 +1103,8 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1103
1103
|
onClick: c,
|
|
1104
1104
|
...i,
|
|
1105
1105
|
children: [
|
|
1106
|
-
/* @__PURE__ */ e.jsx(
|
|
1107
|
-
r === "" ? "" : /* @__PURE__ */ e.jsx(
|
|
1106
|
+
/* @__PURE__ */ e.jsx(w, { name: t }),
|
|
1107
|
+
r === "" ? "" : /* @__PURE__ */ e.jsx(me, { variant: n, children: r })
|
|
1108
1108
|
]
|
|
1109
1109
|
}
|
|
1110
1110
|
), O = ({
|
|
@@ -1138,7 +1138,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1138
1138
|
children: u
|
|
1139
1139
|
}
|
|
1140
1140
|
);
|
|
1141
|
-
},
|
|
1141
|
+
}, fe = ({
|
|
1142
1142
|
variant: n,
|
|
1143
1143
|
size: t = "medium",
|
|
1144
1144
|
title: r,
|
|
@@ -1153,33 +1153,33 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1153
1153
|
showContent: u,
|
|
1154
1154
|
setShowContent: m,
|
|
1155
1155
|
withDropIcon: f,
|
|
1156
|
-
children:
|
|
1156
|
+
children: N,
|
|
1157
1157
|
...v
|
|
1158
1158
|
}) => {
|
|
1159
|
-
const C = oe(null), g = (
|
|
1160
|
-
|
|
1161
|
-
},
|
|
1159
|
+
const C = oe(null), g = (M) => {
|
|
1160
|
+
M.preventDefault(), h && h(M), m && m(!0);
|
|
1161
|
+
}, A = J(() => {
|
|
1162
1162
|
m(!1), j && j();
|
|
1163
|
-
}, [j, m]),
|
|
1164
|
-
|
|
1165
|
-
}, [
|
|
1163
|
+
}, [j, m]), _ = J((M) => {
|
|
1164
|
+
M.keyCode === 27 && A();
|
|
1165
|
+
}, [A]);
|
|
1166
1166
|
K(() => {
|
|
1167
|
-
const
|
|
1168
|
-
C && C.current && y.target instanceof HTMLElement && !C.current.contains(y.target) &&
|
|
1167
|
+
const M = (y) => {
|
|
1168
|
+
C && C.current && y.target instanceof HTMLElement && !C.current.contains(y.target) && A();
|
|
1169
1169
|
};
|
|
1170
|
-
return document.addEventListener("keydown",
|
|
1171
|
-
document.removeEventListener("keydown",
|
|
1170
|
+
return document.addEventListener("keydown", _, !1), document.addEventListener("mousedown", M), () => {
|
|
1171
|
+
document.removeEventListener("keydown", _, !1);
|
|
1172
1172
|
};
|
|
1173
|
-
}, [
|
|
1173
|
+
}, [_, A]);
|
|
1174
1174
|
const S = () => {
|
|
1175
|
-
var
|
|
1176
|
-
const
|
|
1177
|
-
if (
|
|
1178
|
-
if (
|
|
1179
|
-
if (y -
|
|
1180
|
-
if (y -
|
|
1181
|
-
const
|
|
1182
|
-
if (
|
|
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";
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
1185
|
switch (d) {
|
|
@@ -1215,7 +1215,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1215
1215
|
]
|
|
1216
1216
|
}
|
|
1217
1217
|
),
|
|
1218
|
-
u ? /* @__PURE__ */ e.jsx("div", { className: S(), children:
|
|
1218
|
+
u ? /* @__PURE__ */ e.jsx("div", { className: S(), children: N }) : ""
|
|
1219
1219
|
] });
|
|
1220
1220
|
}, Te = ({
|
|
1221
1221
|
title: n,
|
|
@@ -1239,15 +1239,15 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
),
|
|
1241
1241
|
/* @__PURE__ */ e.jsx("div", { className: "muncher-dropdown-nav--content", children: a })
|
|
1242
|
-
] }),
|
|
1242
|
+
] }), ve = (n) => {
|
|
1243
1243
|
navigator.clipboard.writeText(n);
|
|
1244
|
-
},
|
|
1244
|
+
}, ge = ({
|
|
1245
1245
|
text: n,
|
|
1246
1246
|
variant: t = "secondary",
|
|
1247
1247
|
size: r = "small"
|
|
1248
1248
|
}) => {
|
|
1249
1249
|
const [c, i] = T(), [a, x] = T("copy"), [o, d] = T("copy link"), h = () => {
|
|
1250
|
-
|
|
1250
|
+
ve(n), i("green"), x("check"), d("copied!"), setTimeout(function() {
|
|
1251
1251
|
i(""), x("copy");
|
|
1252
1252
|
}, 2e3);
|
|
1253
1253
|
};
|
|
@@ -1258,7 +1258,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1258
1258
|
variant: t,
|
|
1259
1259
|
title: o,
|
|
1260
1260
|
onClick: h,
|
|
1261
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1261
|
+
children: /* @__PURE__ */ e.jsx(w, { name: a, color: c })
|
|
1262
1262
|
}
|
|
1263
1263
|
);
|
|
1264
1264
|
}, Ae = ({
|
|
@@ -1268,14 +1268,14 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1268
1268
|
}) => {
|
|
1269
1269
|
const [c, i] = T(!1);
|
|
1270
1270
|
return /* @__PURE__ */ e.jsx("div", { className: "muncher-share", children: /* @__PURE__ */ e.jsxs(
|
|
1271
|
-
|
|
1271
|
+
fe,
|
|
1272
1272
|
{
|
|
1273
1273
|
title: "Share to Social Media",
|
|
1274
1274
|
showContent: c,
|
|
1275
1275
|
setShowContent: i,
|
|
1276
1276
|
variant: n,
|
|
1277
1277
|
size: t,
|
|
1278
|
-
element: /* @__PURE__ */ e.jsx(
|
|
1278
|
+
element: /* @__PURE__ */ e.jsx(w, { name: "share", orientation: "right", children: "Share" }),
|
|
1279
1279
|
children: [
|
|
1280
1280
|
/* @__PURE__ */ e.jsx(O, { size: "small", variant: n, children: /* @__PURE__ */ e.jsx(
|
|
1281
1281
|
"a",
|
|
@@ -1283,7 +1283,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1283
1283
|
href: "https://twitter.com/share?url=" + window.location.href + "&text=" + r,
|
|
1284
1284
|
target: "_blank",
|
|
1285
1285
|
title: "Share link to Twitter",
|
|
1286
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1286
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "twitter" })
|
|
1287
1287
|
}
|
|
1288
1288
|
) }),
|
|
1289
1289
|
/* @__PURE__ */ e.jsx(O, { size: "small", variant: n, children: /* @__PURE__ */ e.jsx(
|
|
@@ -1292,7 +1292,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1292
1292
|
href: "https://www.facebook.com/sharer/sharer.php?u=" + window.location.href,
|
|
1293
1293
|
target: "_blank",
|
|
1294
1294
|
title: "Share link to Facebook",
|
|
1295
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1295
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "facebook" })
|
|
1296
1296
|
}
|
|
1297
1297
|
) }),
|
|
1298
1298
|
/* @__PURE__ */ e.jsx(O, { size: "small", variant: n, children: /* @__PURE__ */ e.jsx(
|
|
@@ -1301,14 +1301,14 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1301
1301
|
href: "mailto:?subject=" + r + "&body=" + window.location.href,
|
|
1302
1302
|
target: "_blank",
|
|
1303
1303
|
title: "share link by Email",
|
|
1304
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1304
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "mail" })
|
|
1305
1305
|
}
|
|
1306
1306
|
) }),
|
|
1307
|
-
/* @__PURE__ */ e.jsx(
|
|
1307
|
+
/* @__PURE__ */ e.jsx(ge, { text: window.location.href })
|
|
1308
1308
|
]
|
|
1309
1309
|
}
|
|
1310
1310
|
) });
|
|
1311
|
-
},
|
|
1311
|
+
}, be = ({
|
|
1312
1312
|
header: n,
|
|
1313
1313
|
data: t,
|
|
1314
1314
|
filename: r,
|
|
@@ -1322,8 +1322,8 @@ 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(
|
|
1326
|
-
},
|
|
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 = ({
|
|
1327
1327
|
variant: n = "transparent",
|
|
1328
1328
|
size: t = "small",
|
|
1329
1329
|
title: r,
|
|
@@ -1333,7 +1333,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1333
1333
|
onClick: x,
|
|
1334
1334
|
children: o
|
|
1335
1335
|
}) => {
|
|
1336
|
-
const [d, h] = T(!1), j = () => !i || i && !d ? c ? /* @__PURE__ */ e.jsx(
|
|
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" });
|
|
1337
1337
|
return /* @__PURE__ */ e.jsxs(
|
|
1338
1338
|
O,
|
|
1339
1339
|
{
|
|
@@ -1387,12 +1387,12 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1387
1387
|
size: "small",
|
|
1388
1388
|
variant: i,
|
|
1389
1389
|
title: n === "left" ? "Navigate Left" : "Navigate Right",
|
|
1390
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1390
|
+
children: /* @__PURE__ */ e.jsx(w, { name: o(), size: t, weight: r })
|
|
1391
1391
|
}
|
|
1392
1392
|
)
|
|
1393
1393
|
}
|
|
1394
1394
|
);
|
|
1395
|
-
},
|
|
1395
|
+
}, G = ({ label: n, onClick: t, id: r, required: c = !1 }) => /* @__PURE__ */ e.jsxs("label", { htmlFor: r, onClick: t, children: [
|
|
1396
1396
|
n,
|
|
1397
1397
|
c ? /* @__PURE__ */ e.jsx("span", { className: "required", children: "*" }) : ""
|
|
1398
1398
|
] }), _e = ({
|
|
@@ -1420,7 +1420,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
),
|
|
1422
1422
|
i ? /* @__PURE__ */ e.jsx(
|
|
1423
|
-
|
|
1423
|
+
G,
|
|
1424
1424
|
{
|
|
1425
1425
|
label: i,
|
|
1426
1426
|
required: t,
|
|
@@ -1431,7 +1431,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
) : ""
|
|
1433
1433
|
] }) });
|
|
1434
|
-
},
|
|
1434
|
+
}, de = ({ size: n, ...t }) => /* @__PURE__ */ e.jsx(
|
|
1435
1435
|
"div",
|
|
1436
1436
|
{
|
|
1437
1437
|
className: n ? "muncher-spinner muncher-spinner-" + n : "muncher-spinner",
|
|
@@ -1455,11 +1455,11 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1455
1455
|
};
|
|
1456
1456
|
return /* @__PURE__ */ e.jsx("div", { className: "muncher-file-input--div", children: /* @__PURE__ */ e.jsxs("div", { className: "file-input-element", children: [
|
|
1457
1457
|
/* @__PURE__ */ e.jsxs("label", { htmlFor: n, className: u, children: [
|
|
1458
|
-
/* @__PURE__ */ e.jsx(
|
|
1458
|
+
/* @__PURE__ */ e.jsx(w, { name: "upload" }),
|
|
1459
1459
|
" ",
|
|
1460
1460
|
t || "Upload CSV",
|
|
1461
1461
|
i ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : "",
|
|
1462
|
-
x ? /* @__PURE__ */ e.jsx(
|
|
1462
|
+
x ? /* @__PURE__ */ e.jsx(de, { size: "tiny" }) : ""
|
|
1463
1463
|
] }),
|
|
1464
1464
|
/* @__PURE__ */ e.jsx(
|
|
1465
1465
|
"input",
|
|
@@ -1489,17 +1489,17 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1489
1489
|
maxFiles: h,
|
|
1490
1490
|
...j
|
|
1491
1491
|
}) => {
|
|
1492
|
-
const [u, m] = T(""), [f,
|
|
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 = (_) => {
|
|
1493
1493
|
if (d) {
|
|
1494
|
-
let S = Array.from(
|
|
1495
|
-
S.length > v && (S = S.slice(0, v),
|
|
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(", "));
|
|
1496
1496
|
} else
|
|
1497
|
-
x(Array.from(
|
|
1498
|
-
},
|
|
1497
|
+
x(Array.from(_.currentTarget.files[0])), m(_.currentTarget.files[0].name);
|
|
1498
|
+
}, A = () => 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
1501
|
/* @__PURE__ */ e.jsxs("label", { htmlFor: n, className: C, children: [
|
|
1502
|
-
/* @__PURE__ */ e.jsx(
|
|
1502
|
+
/* @__PURE__ */ e.jsx(w, { name: "image" }),
|
|
1503
1503
|
" ",
|
|
1504
1504
|
t,
|
|
1505
1505
|
i ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : ""
|
|
@@ -1520,7 +1520,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1520
1520
|
)
|
|
1521
1521
|
] }),
|
|
1522
1522
|
f !== "" ? /* @__PURE__ */ e.jsx("p", { className: "text-danger", children: f }) : "",
|
|
1523
|
-
|
|
1523
|
+
A() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: o }) }) : ""
|
|
1524
1524
|
] });
|
|
1525
1525
|
}, Me = ({
|
|
1526
1526
|
name: n,
|
|
@@ -1537,59 +1537,57 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1537
1537
|
onKeyDown: u,
|
|
1538
1538
|
error: m,
|
|
1539
1539
|
focus: f = !1,
|
|
1540
|
-
placeholder:
|
|
1540
|
+
placeholder: N,
|
|
1541
1541
|
onChange: v,
|
|
1542
1542
|
step: C,
|
|
1543
1543
|
value: g,
|
|
1544
|
-
maxLength:
|
|
1545
|
-
onEnterPress:
|
|
1546
|
-
|
|
1544
|
+
maxLength: A,
|
|
1545
|
+
onEnterPress: _,
|
|
1546
|
+
displayLoader: S,
|
|
1547
|
+
...M
|
|
1547
1548
|
}) => {
|
|
1548
|
-
const
|
|
1549
|
-
let
|
|
1550
|
-
return (i || a) && (
|
|
1551
|
-
},
|
|
1552
|
-
|
|
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);
|
|
1553
1554
|
};
|
|
1554
1555
|
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-input--div", children: [
|
|
1555
|
-
j !== "side" ?
|
|
1556
|
+
j !== "side" ? z() : "",
|
|
1556
1557
|
/* @__PURE__ */ e.jsxs("div", { className: "muncher-input-element", children: [
|
|
1557
|
-
j === "side" ?
|
|
1558
|
-
i ? /* @__PURE__ */ e.jsx(
|
|
1558
|
+
j === "side" ? z() : "",
|
|
1559
|
+
i ? /* @__PURE__ */ e.jsx(w, { name: i }) : "",
|
|
1559
1560
|
a ? /* @__PURE__ */ e.jsxs("span", { className: "muncher-icon-hover", children: [
|
|
1561
|
+
/* @__PURE__ */ e.jsx(w, { name: a, onClick: x }),
|
|
1562
|
+
" "
|
|
1563
|
+
] }) : "",
|
|
1564
|
+
/* @__PURE__ */ e.jsxs("div", { className: "muncher-input-wrapper", children: [
|
|
1560
1565
|
/* @__PURE__ */ e.jsx(
|
|
1561
|
-
|
|
1566
|
+
"input",
|
|
1562
1567
|
{
|
|
1563
|
-
|
|
1564
|
-
|
|
1568
|
+
id: n,
|
|
1569
|
+
className: k(),
|
|
1570
|
+
name: n,
|
|
1571
|
+
autoFocus: f,
|
|
1572
|
+
value: g,
|
|
1573
|
+
type: o || "text",
|
|
1574
|
+
autoComplete: "off",
|
|
1575
|
+
placeholder: N,
|
|
1576
|
+
onChange: v,
|
|
1577
|
+
required: r,
|
|
1578
|
+
readOnly: c,
|
|
1579
|
+
list: d,
|
|
1580
|
+
onKeyDown: L,
|
|
1581
|
+
onBlur: h,
|
|
1582
|
+
step: C,
|
|
1583
|
+
maxLength: A,
|
|
1584
|
+
...M
|
|
1565
1585
|
}
|
|
1566
1586
|
),
|
|
1567
|
-
" "
|
|
1568
|
-
] })
|
|
1569
|
-
/* @__PURE__ */ e.jsx(
|
|
1570
|
-
"input",
|
|
1571
|
-
{
|
|
1572
|
-
id: n,
|
|
1573
|
-
className: y(),
|
|
1574
|
-
name: n,
|
|
1575
|
-
autoFocus: f,
|
|
1576
|
-
value: g,
|
|
1577
|
-
type: o || "text",
|
|
1578
|
-
autoComplete: "off",
|
|
1579
|
-
placeholder: k,
|
|
1580
|
-
onChange: v,
|
|
1581
|
-
required: r,
|
|
1582
|
-
readOnly: c,
|
|
1583
|
-
list: d,
|
|
1584
|
-
onKeyDown: H,
|
|
1585
|
-
onBlur: h,
|
|
1586
|
-
step: C,
|
|
1587
|
-
maxLength: _,
|
|
1588
|
-
...S
|
|
1589
|
-
}
|
|
1590
|
-
)
|
|
1587
|
+
S ? /* @__PURE__ */ e.jsx(de, { size: "tiny" }) : ""
|
|
1588
|
+
] })
|
|
1591
1589
|
] }),
|
|
1592
|
-
|
|
1590
|
+
y() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: m }) }) : ""
|
|
1593
1591
|
] });
|
|
1594
1592
|
}, Se = ({ name: n, required: t = !1, onChange: r, checked: c = !1, label: i, ...a }) => {
|
|
1595
1593
|
const [x, o] = T(c || !1);
|
|
@@ -1608,7 +1606,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1608
1606
|
}
|
|
1609
1607
|
),
|
|
1610
1608
|
i ? /* @__PURE__ */ e.jsx(
|
|
1611
|
-
|
|
1609
|
+
G,
|
|
1612
1610
|
{
|
|
1613
1611
|
label: i,
|
|
1614
1612
|
required: t,
|
|
@@ -1635,7 +1633,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1635
1633
|
return h() && (u += " muncher-input-error"), u;
|
|
1636
1634
|
};
|
|
1637
1635
|
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-input--div", children: [
|
|
1638
|
-
r ? /* @__PURE__ */ e.jsx(
|
|
1636
|
+
r ? /* @__PURE__ */ e.jsx(G, { label: r, required: c, id: n }) : "",
|
|
1639
1637
|
/* @__PURE__ */ e.jsx("div", { className: "muncher-input-element", children: /* @__PURE__ */ e.jsxs(
|
|
1640
1638
|
"select",
|
|
1641
1639
|
{
|
|
@@ -1653,7 +1651,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1653
1651
|
]
|
|
1654
1652
|
}
|
|
1655
1653
|
) }),
|
|
1656
|
-
h() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(
|
|
1654
|
+
h() ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ e.jsx(w, { name: "alert", children: a }) }) : ""
|
|
1657
1655
|
] });
|
|
1658
1656
|
}, He = ({
|
|
1659
1657
|
name: n,
|
|
@@ -1668,11 +1666,11 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1668
1666
|
value: h,
|
|
1669
1667
|
...j
|
|
1670
1668
|
}) => {
|
|
1671
|
-
const [u, m] = T(h), f = (
|
|
1672
|
-
m(
|
|
1669
|
+
const [u, m] = T(h), f = (N) => {
|
|
1670
|
+
m(N.target.value), d && d(N);
|
|
1673
1671
|
};
|
|
1674
1672
|
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-input--div", children: [
|
|
1675
|
-
t ? /* @__PURE__ */ e.jsx(
|
|
1673
|
+
t ? /* @__PURE__ */ e.jsx(G, { label: t, required: r, id: n }) : "",
|
|
1676
1674
|
/* @__PURE__ */ e.jsx(
|
|
1677
1675
|
"textarea",
|
|
1678
1676
|
{
|
|
@@ -1710,9 +1708,9 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1710
1708
|
}) => {
|
|
1711
1709
|
const u = oe(null), m = (v) => {
|
|
1712
1710
|
i(!0), r(v.target.value);
|
|
1713
|
-
}, f =
|
|
1711
|
+
}, f = J(() => {
|
|
1714
1712
|
i(!1);
|
|
1715
|
-
}, [i]),
|
|
1713
|
+
}, [i]), N = J((v) => {
|
|
1716
1714
|
v.keyCode === 27 && f();
|
|
1717
1715
|
}, [f]);
|
|
1718
1716
|
return K(() => {
|
|
@@ -1722,10 +1720,10 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1722
1720
|
g && !g.contains(C.target) && f();
|
|
1723
1721
|
}
|
|
1724
1722
|
};
|
|
1725
|
-
return document.addEventListener("keydown",
|
|
1726
|
-
document.removeEventListener("keydown",
|
|
1723
|
+
return document.addEventListener("keydown", N, !1), document.addEventListener("mousedown", v), () => {
|
|
1724
|
+
document.removeEventListener("keydown", N, !1);
|
|
1727
1725
|
};
|
|
1728
|
-
}, [
|
|
1726
|
+
}, [N, f]), /* @__PURE__ */ e.jsxs("div", { className: "muncher-input-drop-down", ref: u, children: [
|
|
1729
1727
|
/* @__PURE__ */ e.jsx(
|
|
1730
1728
|
Me,
|
|
1731
1729
|
{
|
|
@@ -1743,7 +1741,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1743
1741
|
c ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-drop-down--content", children: j }) : ""
|
|
1744
1742
|
] });
|
|
1745
1743
|
}, 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(
|
|
1746
|
-
|
|
1744
|
+
w,
|
|
1747
1745
|
{
|
|
1748
1746
|
name: t,
|
|
1749
1747
|
weight: r,
|
|
@@ -1752,7 +1750,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1752
1750
|
children: a
|
|
1753
1751
|
}
|
|
1754
1752
|
) }), Pe = ({ show: n = !1, setShow: t, children: r, ...c }) => {
|
|
1755
|
-
const i =
|
|
1753
|
+
const i = J((a) => {
|
|
1756
1754
|
a.keyCode === 27 && t(!1);
|
|
1757
1755
|
}, [t]);
|
|
1758
1756
|
return K(() => (document.addEventListener("keydown", i, !1), () => {
|
|
@@ -1760,7 +1758,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1760
1758
|
}), [i]), K(() => {
|
|
1761
1759
|
n ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset";
|
|
1762
1760
|
}, [n]), /* @__PURE__ */ e.jsxs(xe.Fragment, { children: [
|
|
1763
|
-
/* @__PURE__ */ e.jsx(
|
|
1761
|
+
/* @__PURE__ */ e.jsx(pe, { show: n, backdropClickHandler: () => t(!1) }),
|
|
1764
1762
|
/* @__PURE__ */ e.jsx(
|
|
1765
1763
|
"div",
|
|
1766
1764
|
{
|
|
@@ -1778,7 +1776,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1778
1776
|
const c = () => n ? "muncher-paper muncher-paper-hover" : "muncher-paper";
|
|
1779
1777
|
return /* @__PURE__ */ e.jsx("section", { className: c(), onClick: t, children: r });
|
|
1780
1778
|
}, Fe = ({ pillCloseHandler: n, children: t, ...r }) => /* @__PURE__ */ e.jsxs("div", { className: "muncher-pill", ...r, children: [
|
|
1781
|
-
/* @__PURE__ */ e.jsx("div", { className: "close", onClick: n, children: /* @__PURE__ */ e.jsx(
|
|
1779
|
+
/* @__PURE__ */ e.jsx("div", { className: "close", onClick: n, children: /* @__PURE__ */ e.jsx(w, { name: "close" }) }),
|
|
1782
1780
|
/* @__PURE__ */ e.jsxs("div", { className: "content", children: [
|
|
1783
1781
|
" ",
|
|
1784
1782
|
t
|
|
@@ -1977,38 +1975,38 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1977
1975
|
footer: u,
|
|
1978
1976
|
children: m
|
|
1979
1977
|
}) => {
|
|
1980
|
-
const { header: f, rows:
|
|
1978
|
+
const { header: f, rows: N } = m, [v, C] = T(i || { index: 0 }), [g, A] = T({ num: 0, size: t || 50 }), _ = (y) => {
|
|
1981
1979
|
v.index === y ? C({ ...v, desc: !v.desc }) : C({ index: y });
|
|
1982
1980
|
}, S = () => {
|
|
1983
1981
|
if (f[v.index].sort) {
|
|
1984
|
-
const y =
|
|
1982
|
+
const y = N.sort(f[v.index].sort);
|
|
1985
1983
|
return v.desc ? y.reverse() : y;
|
|
1986
1984
|
}
|
|
1987
|
-
return
|
|
1988
|
-
(y,
|
|
1989
|
-
var
|
|
1990
|
-
if (((
|
|
1985
|
+
return N.sort(
|
|
1986
|
+
(y, k) => {
|
|
1987
|
+
var D, Y, q, F, U, $;
|
|
1988
|
+
if (((D = y[v.index]) == null ? void 0 : D.value) === null || ((Y = k[v.index]) == null ? void 0 : Y.value) === null)
|
|
1991
1989
|
return 0;
|
|
1992
|
-
const
|
|
1993
|
-
let
|
|
1994
|
-
return v.desc ? -
|
|
1990
|
+
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 : U.value) == null ? void 0 : $.toString().toLowerCase();
|
|
1991
|
+
let H = z.localeCompare(L);
|
|
1992
|
+
return v.desc ? -H : H;
|
|
1995
1993
|
}
|
|
1996
1994
|
);
|
|
1997
|
-
},
|
|
1995
|
+
}, M = () => (g.num + 1) * g.size;
|
|
1998
1996
|
return /* @__PURE__ */ e.jsxs("section", { className: "muncher-table", children: [
|
|
1999
1997
|
/* @__PURE__ */ e.jsx("div", { className: "row head", children: f.map(
|
|
2000
|
-
(y,
|
|
1998
|
+
(y, k) => y.visibility === "hidden" ? "" : /* @__PURE__ */ e.jsx(
|
|
2001
1999
|
"div",
|
|
2002
2000
|
{
|
|
2003
2001
|
title: y.title,
|
|
2004
2002
|
className: y.visibility ? "col main" : "col",
|
|
2005
2003
|
children: typeof y.name == "string" ? /* @__PURE__ */ e.jsx("div", { className: "sort-button", children: /* @__PURE__ */ e.jsx(
|
|
2006
|
-
|
|
2004
|
+
we,
|
|
2007
2005
|
{
|
|
2008
2006
|
onClick: () => {
|
|
2009
|
-
|
|
2007
|
+
_(k);
|
|
2010
2008
|
},
|
|
2011
|
-
active: v.index ===
|
|
2009
|
+
active: v.index === k,
|
|
2012
2010
|
sortAsc: !v.desc,
|
|
2013
2011
|
children: y.name
|
|
2014
2012
|
}
|
|
@@ -2017,28 +2015,28 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2017
2015
|
"row-head-" + y.name
|
|
2018
2016
|
)
|
|
2019
2017
|
) }),
|
|
2020
|
-
r || S().slice(g.num * g.size,
|
|
2021
|
-
(y,
|
|
2018
|
+
r || S().slice(g.num * g.size, M() - 1).map(
|
|
2019
|
+
(y, k) => /* @__PURE__ */ e.jsx("div", { className: "row", children: y.map((z, L) => f[L].visibility === "hidden" ? "" : /* @__PURE__ */ e.jsx(
|
|
2022
2020
|
"div",
|
|
2023
2021
|
{
|
|
2024
|
-
className: f[
|
|
2025
|
-
children:
|
|
2022
|
+
className: f[L].visibility ? "col main" : "col",
|
|
2023
|
+
children: z.content
|
|
2026
2024
|
},
|
|
2027
|
-
"row-col" +
|
|
2028
|
-
)) }, "row-" +
|
|
2025
|
+
"row-col" + k + L
|
|
2026
|
+
)) }, "row-" + k)
|
|
2029
2027
|
),
|
|
2030
2028
|
u || "",
|
|
2031
2029
|
/* @__PURE__ */ e.jsxs("div", { className: "row-footer", children: [
|
|
2032
2030
|
/* @__PURE__ */ e.jsxs("div", { className: "row-footer-buttons", children: [
|
|
2033
2031
|
a ? "" : /* @__PURE__ */ e.jsx(
|
|
2034
|
-
|
|
2032
|
+
be,
|
|
2035
2033
|
{
|
|
2036
2034
|
filename: n || "download",
|
|
2037
2035
|
variant: "secondary",
|
|
2038
2036
|
title: "Download",
|
|
2039
2037
|
header: f.filter((y) => !y.csvExclude).map((y) => typeof y.name == "string" ? y.name : ""),
|
|
2040
|
-
data:
|
|
2041
|
-
(y) => y.filter((
|
|
2038
|
+
data: N.map(
|
|
2039
|
+
(y) => y.filter((k, z) => !f[z].csvExclude).map((k) => k.csv ? k.csv ? k.csv : "" : k.value ? k.value : "")
|
|
2042
2040
|
)
|
|
2043
2041
|
}
|
|
2044
2042
|
),
|
|
@@ -2063,7 +2061,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2063
2061
|
options: ["50", "100", "500"],
|
|
2064
2062
|
value: g.size,
|
|
2065
2063
|
onChange: (y) => {
|
|
2066
|
-
|
|
2064
|
+
A({
|
|
2067
2065
|
...g,
|
|
2068
2066
|
size: parseInt(y.target.value)
|
|
2069
2067
|
});
|
|
@@ -2074,9 +2072,9 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2074
2072
|
/* @__PURE__ */ e.jsxs("div", { className: "center", children: [
|
|
2075
2073
|
g.num * g.size + 1,
|
|
2076
2074
|
" - ",
|
|
2077
|
-
|
|
2075
|
+
M() < N.length ? M() : N.length,
|
|
2078
2076
|
" of ",
|
|
2079
|
-
|
|
2077
|
+
N.length
|
|
2080
2078
|
] }),
|
|
2081
2079
|
/* @__PURE__ */ e.jsxs("div", { className: "right", children: [
|
|
2082
2080
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2086,21 +2084,21 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2086
2084
|
disabled: g.num === 0,
|
|
2087
2085
|
size: "small",
|
|
2088
2086
|
onClick: () => {
|
|
2089
|
-
|
|
2087
|
+
A({ ...g, num: g.num - 1 });
|
|
2090
2088
|
},
|
|
2091
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2089
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "chevron-left" })
|
|
2092
2090
|
}
|
|
2093
2091
|
),
|
|
2094
2092
|
/* @__PURE__ */ e.jsx(
|
|
2095
2093
|
O,
|
|
2096
2094
|
{
|
|
2097
2095
|
variant: "transparent",
|
|
2098
|
-
disabled:
|
|
2096
|
+
disabled: N.length - g.num * g.size <= g.size,
|
|
2099
2097
|
size: "small",
|
|
2100
2098
|
onClick: () => {
|
|
2101
|
-
|
|
2099
|
+
A({ ...g, num: g.num + 1 });
|
|
2102
2100
|
},
|
|
2103
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2101
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "chevron-right" })
|
|
2104
2102
|
}
|
|
2105
2103
|
)
|
|
2106
2104
|
] })
|
|
@@ -2110,23 +2108,23 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2110
2108
|
};
|
|
2111
2109
|
export {
|
|
2112
2110
|
Ee as Accordion,
|
|
2113
|
-
|
|
2114
|
-
|
|
2111
|
+
pe as Backdrop,
|
|
2112
|
+
me as Badge,
|
|
2115
2113
|
O as Button,
|
|
2116
2114
|
_e as Checkbox,
|
|
2117
|
-
|
|
2118
|
-
|
|
2115
|
+
ge as CopyButton,
|
|
2116
|
+
be as CsvButton,
|
|
2119
2117
|
Ne as CsvInput,
|
|
2120
|
-
|
|
2118
|
+
fe as DropdownButton,
|
|
2121
2119
|
Te as DropdownNavButton,
|
|
2122
2120
|
Be as Featured,
|
|
2123
2121
|
Ye as Hr,
|
|
2124
|
-
|
|
2122
|
+
w as Icon,
|
|
2125
2123
|
Re as IconBadge,
|
|
2126
2124
|
ze as ImageInput,
|
|
2127
2125
|
Me as Input,
|
|
2128
2126
|
Ue as ItemSlider,
|
|
2129
|
-
|
|
2127
|
+
G as Label,
|
|
2130
2128
|
Le as Li,
|
|
2131
2129
|
Pe as Modal,
|
|
2132
2130
|
ae as NavigateButton,
|
|
@@ -2138,13 +2136,13 @@ export {
|
|
|
2138
2136
|
ke as Select,
|
|
2139
2137
|
Ae as ShareButton,
|
|
2140
2138
|
We as Slider,
|
|
2141
|
-
|
|
2142
|
-
|
|
2139
|
+
we as SortButton,
|
|
2140
|
+
de as Spinner,
|
|
2143
2141
|
Je as Star,
|
|
2144
2142
|
qe as Table,
|
|
2145
2143
|
Ge as Tabs,
|
|
2146
2144
|
Oe as TextInputDropdown,
|
|
2147
2145
|
He as Textarea,
|
|
2148
2146
|
Ve as Ul,
|
|
2149
|
-
|
|
2147
|
+
ve as copyToClipboard
|
|
2150
2148
|
};
|