@contentmunch/contentmunch-ui 1.0.27 → 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 +424 -422
- package/lib/index.umd.js +5 -5
- package/lib/input/Input.d.ts +1 -0
- package/lib/input/assets/input.css +8 -0
- package/lib/slider/ItemSlider.d.ts +1 -0
- package/lib/slider/assets/item-slider.css +29 -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,28 +10,28 @@ 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
|
-
function r(
|
|
17
|
+
function r(c, i, a) {
|
|
18
18
|
var x = null;
|
|
19
|
-
if (a !== void 0 && (x = "" + a),
|
|
19
|
+
if (a !== void 0 && (x = "" + a), i.key !== void 0 && (x = "" + i.key), "key" in i) {
|
|
20
20
|
a = {};
|
|
21
|
-
for (var o in
|
|
22
|
-
o !== "key" && (a[o] =
|
|
23
|
-
} else a =
|
|
24
|
-
return
|
|
21
|
+
for (var o in i)
|
|
22
|
+
o !== "key" && (a[o] = i[o]);
|
|
23
|
+
} else a = i;
|
|
24
|
+
return i = a.ref, {
|
|
25
25
|
$$typeof: n,
|
|
26
|
-
type:
|
|
26
|
+
type: c,
|
|
27
27
|
key: x,
|
|
28
|
-
ref:
|
|
28
|
+
ref: i !== void 0 ? i : null,
|
|
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,43 +42,43 @@ 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
|
-
case
|
|
53
|
+
case v:
|
|
54
54
|
return "Fragment";
|
|
55
55
|
case g:
|
|
56
56
|
return "Profiler";
|
|
57
57
|
case C:
|
|
58
58
|
return "StrictMode";
|
|
59
|
-
case
|
|
59
|
+
case M:
|
|
60
60
|
return "Suspense";
|
|
61
|
-
case
|
|
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,17 +99,17 @@ 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
|
|
107
107
|
), t(l);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (l ===
|
|
112
|
-
if (typeof l == "object" && l !== null && l.$$typeof ===
|
|
110
|
+
function c(l) {
|
|
111
|
+
if (l === v) return "<>";
|
|
112
|
+
if (typeof l == "object" && l !== null && l.$$typeof === z)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
115
|
var p = n(l);
|
|
@@ -118,46 +118,46 @@ function je() {
|
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var l =
|
|
121
|
+
function i() {
|
|
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
|
|
155
|
-
$$typeof:
|
|
153
|
+
function h(l, p, b, E, P, V, Q, Z) {
|
|
154
|
+
return b = V.ref, l = {
|
|
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,25 +182,25 @@ 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)
|
|
189
189
|
if (q(R)) {
|
|
190
190
|
for (E = 0; E < R.length; E++)
|
|
191
|
-
|
|
191
|
+
u(R[E]);
|
|
192
192
|
Object.freeze && Object.freeze(R);
|
|
193
193
|
} else
|
|
194
194
|
console.error(
|
|
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
|
-
else
|
|
198
|
-
if (
|
|
197
|
+
else u(R);
|
|
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,33 +209,33 @@ 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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
P,
|
|
229
|
+
i(),
|
|
230
|
+
b,
|
|
231
231
|
Q,
|
|
232
232
|
Z
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
typeof l == "object" && l !== null && l.$$typeof ===
|
|
235
|
+
function u(l) {
|
|
236
|
+
typeof l == "object" && l !== null && l.$$typeof === f && l._store && (l._store.validated = 1);
|
|
237
237
|
}
|
|
238
|
-
var m = xe,
|
|
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,50 +243,50 @@ 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
|
-
var
|
|
278
|
-
function
|
|
279
|
-
return
|
|
277
|
+
var ie;
|
|
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
|
-
const { folds: r } = 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) => {
|
|
284
284
|
const h = d.which.toString(), j = d.ctrlKey && h.match(/33|34/);
|
|
285
285
|
if (h.match(/38|40/) || j) {
|
|
286
|
-
const
|
|
287
|
-
|
|
286
|
+
const u = h.match(/34|40/) ? 1 : -1, m = r.length, f = (c + m + u) % m;
|
|
287
|
+
i(f);
|
|
288
288
|
} else
|
|
289
|
-
h === "36" &&
|
|
289
|
+
h === "36" && i(0), h === "35" && i(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":
|
|
297
|
+
"aria-expanded": c === 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: () =>
|
|
304
|
+
onClick: () => i(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
|
-
},
|
|
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 }) : "",
|
|
@@ -1081,11 +1081,11 @@ 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:
|
|
1084
|
+
strokeWidth: c || 2,
|
|
1085
1085
|
strokeLinecap: "round",
|
|
1086
1086
|
strokeLinejoin: "round",
|
|
1087
|
-
onClick:
|
|
1088
|
-
children: t ?
|
|
1087
|
+
onClick: i,
|
|
1088
|
+
children: t ? ce[t] : a ? Object(ce)[a] : ""
|
|
1089
1089
|
}
|
|
1090
1090
|
),
|
|
1091
1091
|
o && (!x || x === "left") ? /* @__PURE__ */ e.jsx("span", { className: "content-right", children: o }) : ""
|
|
@@ -1094,92 +1094,92 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1094
1094
|
variant: n = "primary",
|
|
1095
1095
|
icon: t = "bell",
|
|
1096
1096
|
text: r,
|
|
1097
|
-
onClick:
|
|
1098
|
-
...
|
|
1097
|
+
onClick: c,
|
|
1098
|
+
...i
|
|
1099
1099
|
}) => /* @__PURE__ */ e.jsxs(
|
|
1100
1100
|
"div",
|
|
1101
1101
|
{
|
|
1102
1102
|
className: "muncher-icon-badge",
|
|
1103
|
-
onClick:
|
|
1104
|
-
...
|
|
1103
|
+
onClick: c,
|
|
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 = ({
|
|
1111
1111
|
type: n = "button",
|
|
1112
1112
|
variant: t,
|
|
1113
1113
|
size: r = "medium",
|
|
1114
|
-
title:
|
|
1115
|
-
active:
|
|
1114
|
+
title: c,
|
|
1115
|
+
active: i,
|
|
1116
1116
|
disabled: a,
|
|
1117
1117
|
rounded: x,
|
|
1118
1118
|
onClick: o,
|
|
1119
1119
|
onMouseDown: d,
|
|
1120
1120
|
onMouseEnter: h,
|
|
1121
1121
|
onMouseLeave: j,
|
|
1122
|
-
children:
|
|
1122
|
+
children: u,
|
|
1123
1123
|
...m
|
|
1124
1124
|
}) => {
|
|
1125
|
-
const
|
|
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" : "");
|
|
1126
1126
|
return /* @__PURE__ */ e.jsx(
|
|
1127
1127
|
"button",
|
|
1128
1128
|
{
|
|
1129
1129
|
type: n && n !== "nav" ? n : "button",
|
|
1130
|
-
className:
|
|
1130
|
+
className: f,
|
|
1131
1131
|
disabled: !!a,
|
|
1132
|
-
title:
|
|
1132
|
+
title: c,
|
|
1133
1133
|
onClick: o,
|
|
1134
1134
|
onMouseDown: d,
|
|
1135
1135
|
onMouseEnter: h,
|
|
1136
1136
|
onMouseLeave: j,
|
|
1137
1137
|
...m,
|
|
1138
|
-
children:
|
|
1138
|
+
children: u
|
|
1139
1139
|
}
|
|
1140
1140
|
);
|
|
1141
|
-
},
|
|
1141
|
+
}, fe = ({
|
|
1142
1142
|
variant: n,
|
|
1143
1143
|
size: t = "medium",
|
|
1144
1144
|
title: r,
|
|
1145
|
-
active:
|
|
1146
|
-
disabled:
|
|
1145
|
+
active: c,
|
|
1146
|
+
disabled: i,
|
|
1147
1147
|
element: a,
|
|
1148
1148
|
onMouseDown: x,
|
|
1149
1149
|
rounded: o,
|
|
1150
1150
|
drop: d,
|
|
1151
1151
|
onClick: h,
|
|
1152
1152
|
onClose: j,
|
|
1153
|
-
showContent:
|
|
1153
|
+
showContent: u,
|
|
1154
1154
|
setShowContent: m,
|
|
1155
|
-
withDropIcon:
|
|
1156
|
-
children:
|
|
1157
|
-
...
|
|
1155
|
+
withDropIcon: f,
|
|
1156
|
+
children: N,
|
|
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 &&
|
|
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 (
|
|
1180
|
-
if (
|
|
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) {
|
|
@@ -1197,15 +1197,15 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1197
1197
|
{
|
|
1198
1198
|
onMouseDown: g,
|
|
1199
1199
|
title: r,
|
|
1200
|
-
disabled:
|
|
1200
|
+
disabled: i,
|
|
1201
1201
|
rounded: o,
|
|
1202
|
-
active:
|
|
1202
|
+
active: c,
|
|
1203
1203
|
variant: n,
|
|
1204
1204
|
size: t,
|
|
1205
|
-
...
|
|
1205
|
+
...v,
|
|
1206
1206
|
children: [
|
|
1207
1207
|
a,
|
|
1208
|
-
|
|
1208
|
+
f ? /* @__PURE__ */ e.jsx(
|
|
1209
1209
|
"span",
|
|
1210
1210
|
{
|
|
1211
1211
|
className: "small",
|
|
@@ -1215,14 +1215,14 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1215
1215
|
]
|
|
1216
1216
|
}
|
|
1217
1217
|
),
|
|
1218
|
-
|
|
1218
|
+
u ? /* @__PURE__ */ e.jsx("div", { className: S(), children: N }) : ""
|
|
1219
1219
|
] });
|
|
1220
1220
|
}, Te = ({
|
|
1221
1221
|
title: n,
|
|
1222
1222
|
active: t,
|
|
1223
1223
|
disabled: r,
|
|
1224
|
-
element:
|
|
1225
|
-
rounded:
|
|
1224
|
+
element: c,
|
|
1225
|
+
rounded: i,
|
|
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:
|
|
1235
|
+
rounded: i,
|
|
1236
1236
|
active: t,
|
|
1237
1237
|
...x,
|
|
1238
|
-
children:
|
|
1238
|
+
children: c
|
|
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
|
-
const [
|
|
1250
|
-
|
|
1251
|
-
|
|
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");
|
|
1252
1252
|
}, 2e3);
|
|
1253
1253
|
};
|
|
1254
1254
|
return /* @__PURE__ */ e.jsx(
|
|
@@ -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 = ({
|
|
@@ -1266,16 +1266,16 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1266
1266
|
size: t = "medium",
|
|
1267
1267
|
title: r
|
|
1268
1268
|
}) => {
|
|
1269
|
-
const [
|
|
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
|
-
showContent:
|
|
1275
|
-
setShowContent:
|
|
1274
|
+
showContent: c,
|
|
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,19 +1301,19 @@ 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,
|
|
1315
|
-
variant:
|
|
1316
|
-
size:
|
|
1315
|
+
variant: c,
|
|
1316
|
+
size: i,
|
|
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:
|
|
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,
|
|
1330
|
-
sortAsc:
|
|
1331
|
-
active:
|
|
1330
|
+
sortAsc: c = "true",
|
|
1331
|
+
active: i,
|
|
1332
1332
|
rounded: a,
|
|
1333
1333
|
onClick: x,
|
|
1334
1334
|
children: o
|
|
1335
1335
|
}) => {
|
|
1336
|
-
const [d, h] = T(!1), j = () => !
|
|
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
|
{
|
|
@@ -1350,7 +1350,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1350
1350
|
onClick: x,
|
|
1351
1351
|
children: [
|
|
1352
1352
|
o,
|
|
1353
|
-
|
|
1353
|
+
i || d ? /* @__PURE__ */ e.jsx(j, {}) : ""
|
|
1354
1354
|
]
|
|
1355
1355
|
}
|
|
1356
1356
|
);
|
|
@@ -1358,8 +1358,8 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1358
1358
|
direction: n,
|
|
1359
1359
|
size: t = "small",
|
|
1360
1360
|
weight: r,
|
|
1361
|
-
isDisabled:
|
|
1362
|
-
variant:
|
|
1361
|
+
isDisabled: c,
|
|
1362
|
+
variant: i = "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:
|
|
1386
|
+
disabled: c,
|
|
1387
1387
|
size: "small",
|
|
1388
|
-
variant:
|
|
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 = ({
|
|
1399
1399
|
name: n,
|
|
1400
1400
|
required: t = !1,
|
|
1401
1401
|
onChange: r,
|
|
1402
|
-
checked:
|
|
1403
|
-
label:
|
|
1402
|
+
checked: c = !1,
|
|
1403
|
+
label: i,
|
|
1404
1404
|
...a
|
|
1405
1405
|
}) => {
|
|
1406
|
-
const [x, o] = T(
|
|
1406
|
+
const [x, o] = T(c || !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
|
-
|
|
1423
|
-
|
|
1422
|
+
i ? /* @__PURE__ */ e.jsx(
|
|
1423
|
+
G,
|
|
1424
1424
|
{
|
|
1425
|
-
label:
|
|
1425
|
+
label: i,
|
|
1426
1426
|
required: t,
|
|
1427
1427
|
id: n,
|
|
1428
1428
|
onClick: (d) => {
|
|
@@ -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",
|
|
@@ -1441,8 +1441,8 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1441
1441
|
name: n,
|
|
1442
1442
|
label: t,
|
|
1443
1443
|
variant: r = "secondary",
|
|
1444
|
-
size:
|
|
1445
|
-
required:
|
|
1444
|
+
size: c = "medium",
|
|
1445
|
+
required: i,
|
|
1446
1446
|
active: a,
|
|
1447
1447
|
isUploading: x,
|
|
1448
1448
|
handleOnChange: o,
|
|
@@ -1450,16 +1450,16 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1450
1450
|
successMessage: h,
|
|
1451
1451
|
...j
|
|
1452
1452
|
}) => {
|
|
1453
|
-
const
|
|
1454
|
-
o && o(
|
|
1453
|
+
const u = "muncher-button" + (r ? " muncher-button--" + r : "") + (c ? " muncher-button--" + c : "") + (a ? " muncher-button--active" : ""), m = (f) => {
|
|
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: [
|
|
1457
|
-
/* @__PURE__ */ e.jsxs("label", { htmlFor: n, className:
|
|
1458
|
-
/* @__PURE__ */ e.jsx(
|
|
1457
|
+
/* @__PURE__ */ e.jsxs("label", { htmlFor: n, className: u, children: [
|
|
1458
|
+
/* @__PURE__ */ e.jsx(w, { name: "upload" }),
|
|
1459
1459
|
" ",
|
|
1460
1460
|
t || "Upload CSV",
|
|
1461
|
-
|
|
1462
|
-
x ? /* @__PURE__ */ e.jsx(
|
|
1461
|
+
i ? /* @__PURE__ */ e.jsx("span", { className: "required", children: " *" }) : "",
|
|
1462
|
+
x ? /* @__PURE__ */ e.jsx(de, { size: "tiny" }) : ""
|
|
1463
1463
|
] }),
|
|
1464
1464
|
/* @__PURE__ */ e.jsx(
|
|
1465
1465
|
"input",
|
|
@@ -1467,7 +1467,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1467
1467
|
id: n,
|
|
1468
1468
|
type: "file",
|
|
1469
1469
|
className: "muncher-file-input",
|
|
1470
|
-
required:
|
|
1470
|
+
required: i,
|
|
1471
1471
|
onChange: m,
|
|
1472
1472
|
accept: "text/csv",
|
|
1473
1473
|
...j
|
|
@@ -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:
|
|
1484
|
-
required:
|
|
1483
|
+
size: c = "large",
|
|
1484
|
+
required: i,
|
|
1485
1485
|
active: a,
|
|
1486
1486
|
setFiles: x,
|
|
1487
1487
|
error: o,
|
|
@@ -1489,22 +1489,22 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1489
1489
|
maxFiles: h,
|
|
1490
1490
|
...j
|
|
1491
1491
|
}) => {
|
|
1492
|
-
const [
|
|
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 >
|
|
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: " *" }) : ""
|
|
1506
1506
|
] }),
|
|
1507
|
-
/* @__PURE__ */ e.jsx("span", { className: "span-file-name", children:
|
|
1507
|
+
/* @__PURE__ */ e.jsx("span", { className: "span-file-name", children: u }),
|
|
1508
1508
|
/* @__PURE__ */ e.jsx(
|
|
1509
1509
|
"input",
|
|
1510
1510
|
{
|
|
@@ -1519,80 +1519,78 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
)
|
|
1521
1521
|
] }),
|
|
1522
|
-
|
|
1523
|
-
|
|
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 }) }) : ""
|
|
1524
1524
|
] });
|
|
1525
1525
|
}, Me = ({
|
|
1526
1526
|
name: n,
|
|
1527
1527
|
label: t,
|
|
1528
1528
|
required: r,
|
|
1529
|
-
readOnly:
|
|
1530
|
-
icon:
|
|
1529
|
+
readOnly: c,
|
|
1530
|
+
icon: i,
|
|
1531
1531
|
hoverIcon: a,
|
|
1532
1532
|
onHoverIconClick: x,
|
|
1533
1533
|
type: o = "text",
|
|
1534
1534
|
list: d,
|
|
1535
1535
|
onBlur: h,
|
|
1536
1536
|
labelPosition: j = "top",
|
|
1537
|
-
onKeyDown:
|
|
1537
|
+
onKeyDown: u,
|
|
1538
1538
|
error: m,
|
|
1539
|
-
focus:
|
|
1540
|
-
placeholder:
|
|
1541
|
-
onChange:
|
|
1539
|
+
focus: f = !1,
|
|
1540
|
+
placeholder: N,
|
|
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 (
|
|
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
|
-
|
|
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: u(),
|
|
1574
|
-
name: n,
|
|
1575
|
-
autoFocus: v,
|
|
1576
|
-
value: g,
|
|
1577
|
-
type: o || "text",
|
|
1578
|
-
autoComplete: "off",
|
|
1579
|
-
placeholder: k,
|
|
1580
|
-
onChange: f,
|
|
1581
|
-
required: r,
|
|
1582
|
-
readOnly: i,
|
|
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
|
-
}, Se = ({ name: n, required: t = !1, onChange: r, checked:
|
|
1595
|
-
const [x, o] = T(
|
|
1592
|
+
}, Se = ({ name: n, required: t = !1, onChange: r, checked: c = !1, label: i, ...a }) => {
|
|
1593
|
+
const [x, o] = T(c || !1);
|
|
1596
1594
|
return /* @__PURE__ */ e.jsx("div", { className: "muncher-input--div", children: /* @__PURE__ */ e.jsxs("div", { className: "muncher-radio", children: [
|
|
1597
1595
|
/* @__PURE__ */ e.jsx(
|
|
1598
1596
|
"input",
|
|
@@ -1607,10 +1605,10 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1607
1605
|
...a
|
|
1608
1606
|
}
|
|
1609
1607
|
),
|
|
1610
|
-
|
|
1611
|
-
|
|
1608
|
+
i ? /* @__PURE__ */ e.jsx(
|
|
1609
|
+
G,
|
|
1612
1610
|
{
|
|
1613
|
-
label:
|
|
1611
|
+
label: i,
|
|
1614
1612
|
required: t,
|
|
1615
1613
|
id: n,
|
|
1616
1614
|
onClick: () => {
|
|
@@ -1623,19 +1621,19 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1623
1621
|
name: n,
|
|
1624
1622
|
options: t,
|
|
1625
1623
|
label: r,
|
|
1626
|
-
required:
|
|
1627
|
-
multiple:
|
|
1624
|
+
required: c,
|
|
1625
|
+
multiple: i,
|
|
1628
1626
|
error: a,
|
|
1629
1627
|
onChange: x,
|
|
1630
1628
|
value: o,
|
|
1631
1629
|
...d
|
|
1632
1630
|
}) => {
|
|
1633
1631
|
const h = () => a && a !== "", j = () => {
|
|
1634
|
-
let
|
|
1635
|
-
return h() && (
|
|
1632
|
+
let u = "muncher-input";
|
|
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
|
{
|
|
@@ -1644,23 +1642,23 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1644
1642
|
name: n,
|
|
1645
1643
|
value: o,
|
|
1646
1644
|
onChange: x,
|
|
1647
|
-
required:
|
|
1648
|
-
multiple:
|
|
1645
|
+
required: c,
|
|
1646
|
+
multiple: i,
|
|
1649
1647
|
...d,
|
|
1650
1648
|
children: [
|
|
1651
|
-
|
|
1652
|
-
t.map((
|
|
1649
|
+
c ? /* @__PURE__ */ e.jsx("option", {}) : "",
|
|
1650
|
+
t.map((u, m) => /* @__PURE__ */ e.jsx("option", { value: u, children: u }, "select-option-" + m))
|
|
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,
|
|
1660
1658
|
label: t,
|
|
1661
1659
|
required: r,
|
|
1662
|
-
readOnly:
|
|
1663
|
-
rows:
|
|
1660
|
+
readOnly: c = !1,
|
|
1661
|
+
rows: i = 6,
|
|
1664
1662
|
maxLength: a = 1e3,
|
|
1665
1663
|
focus: x = !1,
|
|
1666
1664
|
placeholder: o,
|
|
@@ -1668,30 +1666,30 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1668
1666
|
value: h,
|
|
1669
1667
|
...j
|
|
1670
1668
|
}) => {
|
|
1671
|
-
const [
|
|
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
|
{
|
|
1679
1677
|
id: n,
|
|
1680
1678
|
className: "muncher-textarea",
|
|
1681
|
-
rows:
|
|
1679
|
+
rows: i,
|
|
1682
1680
|
maxLength: a,
|
|
1683
1681
|
name: n,
|
|
1684
1682
|
autoFocus: x,
|
|
1685
1683
|
value: h,
|
|
1686
1684
|
placeholder: o,
|
|
1687
|
-
onChange:
|
|
1685
|
+
onChange: f,
|
|
1688
1686
|
required: r,
|
|
1689
|
-
readOnly:
|
|
1687
|
+
readOnly: c,
|
|
1690
1688
|
...j
|
|
1691
1689
|
}
|
|
1692
1690
|
),
|
|
1693
1691
|
/* @__PURE__ */ e.jsxs("p", { children: [
|
|
1694
|
-
|
|
1692
|
+
u ? a ? a - u.length : 1e3 : a,
|
|
1695
1693
|
" characters left"
|
|
1696
1694
|
] })
|
|
1697
1695
|
] });
|
|
@@ -1699,8 +1697,8 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1699
1697
|
focus: n = !1,
|
|
1700
1698
|
inputPlaceHolder: t,
|
|
1701
1699
|
handleInputChange: r,
|
|
1702
|
-
showContent:
|
|
1703
|
-
setShowContent:
|
|
1700
|
+
showContent: c = !1,
|
|
1701
|
+
setShowContent: i,
|
|
1704
1702
|
readOnly: a,
|
|
1705
1703
|
value: x,
|
|
1706
1704
|
label: o,
|
|
@@ -1708,24 +1706,24 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1708
1706
|
required: h,
|
|
1709
1707
|
children: j
|
|
1710
1708
|
}) => {
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1713
|
-
},
|
|
1714
|
-
|
|
1715
|
-
}, [
|
|
1716
|
-
|
|
1717
|
-
}, [
|
|
1709
|
+
const u = oe(null), m = (v) => {
|
|
1710
|
+
i(!0), r(v.target.value);
|
|
1711
|
+
}, f = J(() => {
|
|
1712
|
+
i(!1);
|
|
1713
|
+
}, [i]), N = J((v) => {
|
|
1714
|
+
v.keyCode === 27 && f();
|
|
1715
|
+
}, [f]);
|
|
1718
1716
|
return K(() => {
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1721
|
-
const g =
|
|
1722
|
-
g && !g.contains(C.target) &&
|
|
1717
|
+
const v = (C) => {
|
|
1718
|
+
if (u && u !== null) {
|
|
1719
|
+
const g = u.current;
|
|
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
|
{
|
|
@@ -1740,27 +1738,27 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1740
1738
|
error: d
|
|
1741
1739
|
}
|
|
1742
1740
|
),
|
|
1743
|
-
|
|
1741
|
+
c ? /* @__PURE__ */ e.jsx("div", { className: "muncher-input-drop-down--content", children: j }) : ""
|
|
1744
1742
|
] });
|
|
1745
|
-
}, Ve = ({ children: n }) => /* @__PURE__ */ e.jsx("ul", { className: "muncher-ul", children: n }), Le = ({ isFeatured: n, bulletIcon: t = "arrow-right", bulletWeight: r = 2, bulletSize:
|
|
1746
|
-
|
|
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(
|
|
1744
|
+
w,
|
|
1747
1745
|
{
|
|
1748
1746
|
name: t,
|
|
1749
1747
|
weight: r,
|
|
1750
|
-
size:
|
|
1751
|
-
color:
|
|
1748
|
+
size: c,
|
|
1749
|
+
color: i,
|
|
1752
1750
|
children: a
|
|
1753
1751
|
}
|
|
1754
|
-
) }), Pe = ({ show: n = !1, setShow: t, children: r, ...
|
|
1755
|
-
const
|
|
1752
|
+
) }), Pe = ({ show: n = !1, setShow: t, children: r, ...c }) => {
|
|
1753
|
+
const i = J((a) => {
|
|
1756
1754
|
a.keyCode === 27 && t(!1);
|
|
1757
1755
|
}, [t]);
|
|
1758
|
-
return K(() => (document.addEventListener("keydown",
|
|
1759
|
-
document.removeEventListener("keydown",
|
|
1760
|
-
}), [
|
|
1756
|
+
return K(() => (document.addEventListener("keydown", i, !1), () => {
|
|
1757
|
+
document.removeEventListener("keydown", i, !1);
|
|
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
|
{
|
|
@@ -1769,79 +1767,83 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1769
1767
|
transform: n ? "translateY(0)" : "translateY(-100vh)",
|
|
1770
1768
|
opacity: n ? "1" : "0"
|
|
1771
1769
|
},
|
|
1772
|
-
...
|
|
1770
|
+
...c,
|
|
1773
1771
|
children: r
|
|
1774
1772
|
}
|
|
1775
1773
|
)
|
|
1776
1774
|
] });
|
|
1777
1775
|
}, De = ({ showHoverEffect: n, onClick: t, children: r }) => {
|
|
1778
|
-
const
|
|
1779
|
-
return /* @__PURE__ */ e.jsx("section", { className:
|
|
1776
|
+
const c = () => n ? "muncher-paper muncher-paper-hover" : "muncher-paper";
|
|
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
|
|
1785
1783
|
] })
|
|
1786
1784
|
] }), Ie = ({ value: n, max: t, label: r }) => {
|
|
1787
|
-
const
|
|
1788
|
-
const
|
|
1789
|
-
return r ? r + " " +
|
|
1785
|
+
const c = () => {
|
|
1786
|
+
const i = Math.round(n / t * 100) + "%";
|
|
1787
|
+
return r ? r + " " + i : i;
|
|
1790
1788
|
};
|
|
1791
1789
|
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-progress", children: [
|
|
1792
|
-
/* @__PURE__ */ e.jsx("label", { htmlFor: "progress", children:
|
|
1793
|
-
/* @__PURE__ */ e.jsx("progress", { id: "progress", value: n, max: t, children:
|
|
1790
|
+
/* @__PURE__ */ e.jsx("label", { htmlFor: "progress", children: c() }),
|
|
1791
|
+
/* @__PURE__ */ e.jsx("progress", { id: "progress", value: n, max: t, children: c() })
|
|
1794
1792
|
] });
|
|
1795
1793
|
}, Ye = ({ variant: n, size: t, style: r }) => {
|
|
1796
|
-
const
|
|
1797
|
-
return /* @__PURE__ */ e.jsx("hr", { className:
|
|
1798
|
-
}, Ue = ({ sliderItems: n, navButtonSize: t = "large", navButtonWeight: r = 2, variant:
|
|
1799
|
-
const [
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
onClick: () => {
|
|
1810
|
-
a === 0 ? (d(-(n.length - 1) * 100), x(n.length - 1)) : (d(o + 100), x(a - 1));
|
|
1811
|
-
}
|
|
1794
|
+
const c = "muncher-hr" + (n ? " muncher-hr--" + n : "") + (t ? " muncher-hr--" + t : "") + (r ? " muncher-hr--" + r : "");
|
|
1795
|
+
return /* @__PURE__ */ e.jsx("hr", { className: c });
|
|
1796
|
+
}, Ue = ({ sliderItems: n, navButtonSize: t = "large", navButtonWeight: r = 2, variant: c, navIcon: i, navButtonPlacement: a = "inside" }) => {
|
|
1797
|
+
const [x, o] = T(0), [d, h] = T(0), j = () => n.length > 1 && x > 0 ? /* @__PURE__ */ e.jsx(
|
|
1798
|
+
ae,
|
|
1799
|
+
{
|
|
1800
|
+
direction: "left",
|
|
1801
|
+
size: t,
|
|
1802
|
+
variant: c,
|
|
1803
|
+
navIcon: i,
|
|
1804
|
+
weight: r,
|
|
1805
|
+
onClick: () => {
|
|
1806
|
+
x === 0 ? (h(-(n.length - 1) * 100), o(n.length - 1)) : (h(d + 100), o(x - 1));
|
|
1812
1807
|
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
) }),
|
|
1825
|
-
n.length > 1 && a < n.length - 1 ? /* @__PURE__ */ e.jsx(
|
|
1826
|
-
ae,
|
|
1827
|
-
{
|
|
1828
|
-
direction: "right",
|
|
1829
|
-
size: t,
|
|
1830
|
-
weight: r,
|
|
1831
|
-
navIcon: c,
|
|
1832
|
-
variant: i,
|
|
1833
|
-
onClick: () => {
|
|
1834
|
-
a === n.length - 1 ? (x(0), d(0)) : (d(o - 100), x(a + 1));
|
|
1835
|
-
}
|
|
1808
|
+
}
|
|
1809
|
+
) : "", u = () => n.length > 1 && x < n.length - 1 ? /* @__PURE__ */ e.jsx(
|
|
1810
|
+
ae,
|
|
1811
|
+
{
|
|
1812
|
+
direction: "right",
|
|
1813
|
+
size: t,
|
|
1814
|
+
weight: r,
|
|
1815
|
+
navIcon: i,
|
|
1816
|
+
variant: c,
|
|
1817
|
+
onClick: () => {
|
|
1818
|
+
x === n.length - 1 ? (o(0), h(0)) : (h(d - 100), o(x + 1));
|
|
1836
1819
|
}
|
|
1837
|
-
|
|
1820
|
+
}
|
|
1821
|
+
) : "";
|
|
1822
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-item-slider-wrapper--" + a, children: [
|
|
1823
|
+
a === "outside" ? j() : "",
|
|
1824
|
+
/* @__PURE__ */ e.jsxs("div", { className: "muncher-item-slider", children: [
|
|
1825
|
+
a === "inside" ? j() : "",
|
|
1826
|
+
/* @__PURE__ */ e.jsx("div", { className: "slider-container", style: { width: `${100 * n.length}%` }, children: n.map(
|
|
1827
|
+
(m, f) => /* @__PURE__ */ e.jsx(
|
|
1828
|
+
"div",
|
|
1829
|
+
{
|
|
1830
|
+
className: "slider-item",
|
|
1831
|
+
style: { transform: `translateX(${d}%)` },
|
|
1832
|
+
children: m
|
|
1833
|
+
},
|
|
1834
|
+
"slider-item" + f
|
|
1835
|
+
)
|
|
1836
|
+
) }),
|
|
1837
|
+
a === "inside" ? u() : ""
|
|
1838
|
+
] }),
|
|
1839
|
+
a === "outside" ? u() : ""
|
|
1838
1840
|
] });
|
|
1839
1841
|
}, $e = ({
|
|
1840
1842
|
min: n,
|
|
1841
1843
|
max: t,
|
|
1842
1844
|
minValue: r,
|
|
1843
|
-
maxValue:
|
|
1844
|
-
setMinValue:
|
|
1845
|
+
maxValue: c,
|
|
1846
|
+
setMinValue: i,
|
|
1845
1847
|
setMaxValue: a,
|
|
1846
1848
|
numberFormatter: x = (o) => new Intl.NumberFormat("en-US", {
|
|
1847
1849
|
style: "currency",
|
|
@@ -1849,14 +1851,14 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1849
1851
|
}).format(o)
|
|
1850
1852
|
}) => {
|
|
1851
1853
|
const o = (j) => {
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
+
const u = +j.target.value, m = u < c - 1 ? u : r;
|
|
1855
|
+
i(m);
|
|
1854
1856
|
}, d = (j) => {
|
|
1855
|
-
const
|
|
1857
|
+
const u = +j.target.value, m = u > r + 1 ? u : c;
|
|
1856
1858
|
a(m);
|
|
1857
1859
|
}, h = (j) => x && j ? x(j) : j;
|
|
1858
1860
|
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-slider", children: [
|
|
1859
|
-
/* @__PURE__ */ e.jsx("div", { className: "slider-header", children: /* @__PURE__ */ e.jsx("p", { children: h(r) + " - " + h(
|
|
1861
|
+
/* @__PURE__ */ e.jsx("div", { className: "slider-header", children: /* @__PURE__ */ e.jsx("p", { children: h(r) + " - " + h(c) }) }),
|
|
1860
1862
|
/* @__PURE__ */ e.jsx(
|
|
1861
1863
|
"input",
|
|
1862
1864
|
{
|
|
@@ -1875,7 +1877,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1875
1877
|
type: "range",
|
|
1876
1878
|
min: n,
|
|
1877
1879
|
max: t,
|
|
1878
|
-
value:
|
|
1880
|
+
value: c,
|
|
1879
1881
|
onChange: d
|
|
1880
1882
|
}
|
|
1881
1883
|
),
|
|
@@ -1888,15 +1890,15 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1888
1890
|
min: n,
|
|
1889
1891
|
max: t,
|
|
1890
1892
|
value: r,
|
|
1891
|
-
setValue:
|
|
1892
|
-
numberFormatter:
|
|
1893
|
+
setValue: c,
|
|
1894
|
+
numberFormatter: i = (a) => new Intl.NumberFormat("en-US", {
|
|
1893
1895
|
style: "currency",
|
|
1894
1896
|
currency: "USD"
|
|
1895
1897
|
}).format(a)
|
|
1896
1898
|
}) => {
|
|
1897
|
-
const a = (o) =>
|
|
1899
|
+
const a = (o) => i ? i(o) : o, x = (o) => {
|
|
1898
1900
|
const d = +o.target.value;
|
|
1899
|
-
|
|
1901
|
+
c(d);
|
|
1900
1902
|
};
|
|
1901
1903
|
return /* @__PURE__ */ e.jsxs("div", { className: "muncher-slider", children: [
|
|
1902
1904
|
/* @__PURE__ */ e.jsx("div", { className: "slider-header", children: /* @__PURE__ */ e.jsx("p", { children: a(r) }) }),
|
|
@@ -1916,20 +1918,20 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1916
1918
|
/* @__PURE__ */ e.jsx("div", { className: "slider-max", children: a(t) })
|
|
1917
1919
|
] })
|
|
1918
1920
|
] });
|
|
1919
|
-
}, 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, ...
|
|
1920
|
-
const
|
|
1921
|
+
}, 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 }) => {
|
|
1922
|
+
const i = {
|
|
1921
1923
|
"--r": n
|
|
1922
1924
|
}, a = () => {
|
|
1923
1925
|
let x = "muncher-star";
|
|
1924
1926
|
return t && (x += " star-" + t), r && (x += " star-" + r), x;
|
|
1925
1927
|
};
|
|
1926
|
-
return /* @__PURE__ */ e.jsx("span", { className: a(), style:
|
|
1928
|
+
return /* @__PURE__ */ e.jsx("span", { className: a(), style: i, ...c });
|
|
1927
1929
|
}, Ge = ({ handleTabSelected: n, children: t }) => {
|
|
1928
|
-
const [r,
|
|
1929
|
-
|
|
1930
|
+
const [r, c] = T(0), { tabs: i } = t, a = (x) => {
|
|
1931
|
+
c(x), n && n(x);
|
|
1930
1932
|
};
|
|
1931
1933
|
return /* @__PURE__ */ e.jsxs("section", { className: "muncher-tabs", children: [
|
|
1932
|
-
/* @__PURE__ */ e.jsx("header", { children:
|
|
1934
|
+
/* @__PURE__ */ e.jsx("header", { children: i.map(
|
|
1933
1935
|
(x, o) => /* @__PURE__ */ e.jsxs("div", { className: "muncher-tab-header--item", children: [
|
|
1934
1936
|
/* @__PURE__ */ e.jsx(
|
|
1935
1937
|
O,
|
|
@@ -1944,10 +1946,10 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1944
1946
|
children: x.header
|
|
1945
1947
|
}
|
|
1946
1948
|
),
|
|
1947
|
-
o !==
|
|
1949
|
+
o !== i.length - 1 ? /* @__PURE__ */ e.jsx("span", { className: "spacer", children: "|" }) : ""
|
|
1948
1950
|
] }, "muncher-tab-header" + o)
|
|
1949
1951
|
) }),
|
|
1950
|
-
|
|
1952
|
+
i.map(
|
|
1951
1953
|
(x, o) => /* @__PURE__ */ e.jsx(
|
|
1952
1954
|
"section",
|
|
1953
1955
|
{
|
|
@@ -1962,79 +1964,79 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
1962
1964
|
fileName: n,
|
|
1963
1965
|
defaultPageSize: t,
|
|
1964
1966
|
skeleton: r,
|
|
1965
|
-
handleOnUpload:
|
|
1966
|
-
sortBy:
|
|
1967
|
+
handleOnUpload: c,
|
|
1968
|
+
sortBy: i,
|
|
1967
1969
|
excludeDownload: a,
|
|
1968
1970
|
includeUpload: x,
|
|
1969
1971
|
isUploading: o,
|
|
1970
1972
|
uploadWarningMessage: d,
|
|
1971
1973
|
uploadSuccessMessage: h,
|
|
1972
1974
|
excludePagination: j,
|
|
1973
|
-
footer:
|
|
1975
|
+
footer: u,
|
|
1974
1976
|
children: m
|
|
1975
1977
|
}) => {
|
|
1976
|
-
const { header:
|
|
1977
|
-
|
|
1978
|
+
const { header: f, rows: N } = m, [v, C] = T(i || { index: 0 }), [g, A] = T({ num: 0, size: t || 50 }), _ = (y) => {
|
|
1979
|
+
v.index === y ? C({ ...v, desc: !v.desc }) : C({ index: y });
|
|
1978
1980
|
}, S = () => {
|
|
1979
|
-
if (v
|
|
1980
|
-
const
|
|
1981
|
-
return
|
|
1981
|
+
if (f[v.index].sort) {
|
|
1982
|
+
const y = N.sort(f[v.index].sort);
|
|
1983
|
+
return v.desc ? y.reverse() : y;
|
|
1982
1984
|
}
|
|
1983
|
-
return
|
|
1984
|
-
(
|
|
1985
|
-
var
|
|
1986
|
-
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)
|
|
1987
1989
|
return 0;
|
|
1988
|
-
const
|
|
1989
|
-
let
|
|
1990
|
-
return
|
|
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;
|
|
1991
1993
|
}
|
|
1992
1994
|
);
|
|
1993
|
-
},
|
|
1995
|
+
}, M = () => (g.num + 1) * g.size;
|
|
1994
1996
|
return /* @__PURE__ */ e.jsxs("section", { className: "muncher-table", children: [
|
|
1995
|
-
/* @__PURE__ */ e.jsx("div", { className: "row head", children:
|
|
1996
|
-
(
|
|
1997
|
+
/* @__PURE__ */ e.jsx("div", { className: "row head", children: f.map(
|
|
1998
|
+
(y, k) => y.visibility === "hidden" ? "" : /* @__PURE__ */ e.jsx(
|
|
1997
1999
|
"div",
|
|
1998
2000
|
{
|
|
1999
|
-
title:
|
|
2000
|
-
className:
|
|
2001
|
-
children: typeof
|
|
2002
|
-
|
|
2001
|
+
title: y.title,
|
|
2002
|
+
className: y.visibility ? "col main" : "col",
|
|
2003
|
+
children: typeof y.name == "string" ? /* @__PURE__ */ e.jsx("div", { className: "sort-button", children: /* @__PURE__ */ e.jsx(
|
|
2004
|
+
we,
|
|
2003
2005
|
{
|
|
2004
2006
|
onClick: () => {
|
|
2005
|
-
|
|
2007
|
+
_(k);
|
|
2006
2008
|
},
|
|
2007
|
-
active:
|
|
2008
|
-
sortAsc: !
|
|
2009
|
-
children:
|
|
2009
|
+
active: v.index === k,
|
|
2010
|
+
sortAsc: !v.desc,
|
|
2011
|
+
children: y.name
|
|
2010
2012
|
}
|
|
2011
|
-
) }) :
|
|
2013
|
+
) }) : y.name
|
|
2012
2014
|
},
|
|
2013
|
-
"row-head-" +
|
|
2015
|
+
"row-head-" + y.name
|
|
2014
2016
|
)
|
|
2015
2017
|
) }),
|
|
2016
|
-
r || S().slice(g.num * g.size,
|
|
2017
|
-
(
|
|
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(
|
|
2018
2020
|
"div",
|
|
2019
2021
|
{
|
|
2020
|
-
className:
|
|
2021
|
-
children:
|
|
2022
|
+
className: f[L].visibility ? "col main" : "col",
|
|
2023
|
+
children: z.content
|
|
2022
2024
|
},
|
|
2023
|
-
"row-col" +
|
|
2024
|
-
)) }, "row-" +
|
|
2025
|
+
"row-col" + k + L
|
|
2026
|
+
)) }, "row-" + k)
|
|
2025
2027
|
),
|
|
2026
|
-
|
|
2028
|
+
u || "",
|
|
2027
2029
|
/* @__PURE__ */ e.jsxs("div", { className: "row-footer", children: [
|
|
2028
2030
|
/* @__PURE__ */ e.jsxs("div", { className: "row-footer-buttons", children: [
|
|
2029
2031
|
a ? "" : /* @__PURE__ */ e.jsx(
|
|
2030
|
-
|
|
2032
|
+
be,
|
|
2031
2033
|
{
|
|
2032
2034
|
filename: n || "download",
|
|
2033
2035
|
variant: "secondary",
|
|
2034
2036
|
title: "Download",
|
|
2035
|
-
header:
|
|
2036
|
-
data:
|
|
2037
|
-
(
|
|
2037
|
+
header: f.filter((y) => !y.csvExclude).map((y) => typeof y.name == "string" ? y.name : ""),
|
|
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 : "")
|
|
2038
2040
|
)
|
|
2039
2041
|
}
|
|
2040
2042
|
),
|
|
@@ -2042,7 +2044,7 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2042
2044
|
Ne,
|
|
2043
2045
|
{
|
|
2044
2046
|
name: "csv-input-file",
|
|
2045
|
-
handleOnChange:
|
|
2047
|
+
handleOnChange: c,
|
|
2046
2048
|
isUploading: o,
|
|
2047
2049
|
warningMessage: d,
|
|
2048
2050
|
successMessage: h
|
|
@@ -2058,10 +2060,10 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2058
2060
|
name: "pageSize",
|
|
2059
2061
|
options: ["50", "100", "500"],
|
|
2060
2062
|
value: g.size,
|
|
2061
|
-
onChange: (
|
|
2062
|
-
|
|
2063
|
+
onChange: (y) => {
|
|
2064
|
+
A({
|
|
2063
2065
|
...g,
|
|
2064
|
-
size: parseInt(
|
|
2066
|
+
size: parseInt(y.target.value)
|
|
2065
2067
|
});
|
|
2066
2068
|
}
|
|
2067
2069
|
}
|
|
@@ -2070,9 +2072,9 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2070
2072
|
/* @__PURE__ */ e.jsxs("div", { className: "center", children: [
|
|
2071
2073
|
g.num * g.size + 1,
|
|
2072
2074
|
" - ",
|
|
2073
|
-
|
|
2075
|
+
M() < N.length ? M() : N.length,
|
|
2074
2076
|
" of ",
|
|
2075
|
-
|
|
2077
|
+
N.length
|
|
2076
2078
|
] }),
|
|
2077
2079
|
/* @__PURE__ */ e.jsxs("div", { className: "right", children: [
|
|
2078
2080
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2082,21 +2084,21 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2082
2084
|
disabled: g.num === 0,
|
|
2083
2085
|
size: "small",
|
|
2084
2086
|
onClick: () => {
|
|
2085
|
-
|
|
2087
|
+
A({ ...g, num: g.num - 1 });
|
|
2086
2088
|
},
|
|
2087
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2089
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "chevron-left" })
|
|
2088
2090
|
}
|
|
2089
2091
|
),
|
|
2090
2092
|
/* @__PURE__ */ e.jsx(
|
|
2091
2093
|
O,
|
|
2092
2094
|
{
|
|
2093
2095
|
variant: "transparent",
|
|
2094
|
-
disabled:
|
|
2096
|
+
disabled: N.length - g.num * g.size <= g.size,
|
|
2095
2097
|
size: "small",
|
|
2096
2098
|
onClick: () => {
|
|
2097
|
-
|
|
2099
|
+
A({ ...g, num: g.num + 1 });
|
|
2098
2100
|
},
|
|
2099
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2101
|
+
children: /* @__PURE__ */ e.jsx(w, { name: "chevron-right" })
|
|
2100
2102
|
}
|
|
2101
2103
|
)
|
|
2102
2104
|
] })
|
|
@@ -2106,23 +2108,23 @@ const Ee = ({ variant: n, children: t }) => {
|
|
|
2106
2108
|
};
|
|
2107
2109
|
export {
|
|
2108
2110
|
Ee as Accordion,
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
+
pe as Backdrop,
|
|
2112
|
+
me as Badge,
|
|
2111
2113
|
O as Button,
|
|
2112
2114
|
_e as Checkbox,
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
+
ge as CopyButton,
|
|
2116
|
+
be as CsvButton,
|
|
2115
2117
|
Ne as CsvInput,
|
|
2116
|
-
|
|
2118
|
+
fe as DropdownButton,
|
|
2117
2119
|
Te as DropdownNavButton,
|
|
2118
2120
|
Be as Featured,
|
|
2119
2121
|
Ye as Hr,
|
|
2120
|
-
|
|
2122
|
+
w as Icon,
|
|
2121
2123
|
Re as IconBadge,
|
|
2122
2124
|
ze as ImageInput,
|
|
2123
2125
|
Me as Input,
|
|
2124
2126
|
Ue as ItemSlider,
|
|
2125
|
-
|
|
2127
|
+
G as Label,
|
|
2126
2128
|
Le as Li,
|
|
2127
2129
|
Pe as Modal,
|
|
2128
2130
|
ae as NavigateButton,
|
|
@@ -2134,13 +2136,13 @@ export {
|
|
|
2134
2136
|
ke as Select,
|
|
2135
2137
|
Ae as ShareButton,
|
|
2136
2138
|
We as Slider,
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
+
we as SortButton,
|
|
2140
|
+
de as Spinner,
|
|
2139
2141
|
Je as Star,
|
|
2140
2142
|
qe as Table,
|
|
2141
2143
|
Ge as Tabs,
|
|
2142
2144
|
Oe as TextInputDropdown,
|
|
2143
2145
|
He as Textarea,
|
|
2144
2146
|
Ve as Ul,
|
|
2145
|
-
|
|
2147
|
+
ve as copyToClipboard
|
|
2146
2148
|
};
|