ovirt-ui-toolkit 0.0.78 → 0.0.79
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Ne, { forwardRef as
|
|
1
|
+
import Ne, { forwardRef as hr, useState as Q, useEffect as br } from "react";
|
|
2
2
|
var U = { exports: {} }, A = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -14,11 +14,11 @@ function xr() {
|
|
|
14
14
|
if (Ce) return A;
|
|
15
15
|
Ce = 1;
|
|
16
16
|
var n = Ne, s = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, c = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
-
function v(j,
|
|
17
|
+
function v(j, m, T) {
|
|
18
18
|
var y, b = {}, _ = null, W = null;
|
|
19
|
-
T !== void 0 && (_ = "" + T),
|
|
20
|
-
for (y in
|
|
21
|
-
if (j && j.defaultProps) for (y in
|
|
19
|
+
T !== void 0 && (_ = "" + T), m.key !== void 0 && (_ = "" + m.key), m.ref !== void 0 && (W = m.ref);
|
|
20
|
+
for (y in m) i.call(m, y) && !d.hasOwnProperty(y) && (b[y] = m[y]);
|
|
21
|
+
if (j && j.defaultProps) for (y in m = j.defaultProps, m) b[y] === void 0 && (b[y] = m[y]);
|
|
22
22
|
return { $$typeof: s, type: j, key: _, ref: W, props: b, _owner: c.current };
|
|
23
23
|
}
|
|
24
24
|
return A.Fragment = o, A.jsx = v, A.jsxs = v, A;
|
|
@@ -36,7 +36,7 @@ var I = {};
|
|
|
36
36
|
var Te;
|
|
37
37
|
function gr() {
|
|
38
38
|
return Te || (Te = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var n = Ne, s = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), j = Symbol.for("react.context"),
|
|
39
|
+
var n = Ne, s = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), j = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), K = Symbol.iterator, $e = "@@iterator";
|
|
40
40
|
function De(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
@@ -55,16 +55,16 @@ function gr() {
|
|
|
55
55
|
{
|
|
56
56
|
var l = k.ReactDebugCurrentFrame, p = l.getStackAddendum();
|
|
57
57
|
p !== "" && (r += "%s", a = a.concat([p]));
|
|
58
|
-
var
|
|
58
|
+
var h = a.map(function(f) {
|
|
59
59
|
return String(f);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
var Ae = !1, Ie = !1, We = !1, Ye = !1, Ve = !1, ee;
|
|
65
65
|
ee = Symbol.for("react.module.reference");
|
|
66
66
|
function Le(e) {
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || Ve || e === c || e === T || e === y || Ye || e === W || Ae || Ie || We || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === b || e.$$typeof === v || e.$$typeof === j || e.$$typeof ===
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || Ve || e === c || e === T || e === y || Ye || e === W || Ae || Ie || We || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === b || e.$$typeof === v || e.$$typeof === j || e.$$typeof === m || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
@@ -109,15 +109,15 @@ function gr() {
|
|
|
109
109
|
case v:
|
|
110
110
|
var a = e;
|
|
111
111
|
return re(a._context) + ".Provider";
|
|
112
|
-
case
|
|
112
|
+
case m:
|
|
113
113
|
return Me(e, e.render, "ForwardRef");
|
|
114
114
|
case b:
|
|
115
115
|
var l = e.displayName || null;
|
|
116
116
|
return l !== null ? l : O(e.type) || "Memo";
|
|
117
117
|
case _: {
|
|
118
|
-
var p = e,
|
|
118
|
+
var p = e, h = p._payload, f = p._init;
|
|
119
119
|
try {
|
|
120
|
-
return O(f(
|
|
120
|
+
return O(f(h));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -218,8 +218,8 @@ function gr() {
|
|
|
218
218
|
q = !0;
|
|
219
219
|
var p = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var h;
|
|
222
|
+
h = B.current, B.current = null, Ue();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var f = function() {
|
|
@@ -272,7 +272,7 @@ function gr() {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
q = !1, B.current =
|
|
275
|
+
q = !1, B.current = h, Be(), Error.prepareStackTrace = p;
|
|
276
276
|
}
|
|
277
277
|
var $ = e ? e.displayName || e.name : "", S = $ ? Y($) : "";
|
|
278
278
|
return typeof e == "function" && V.set(e, S), S;
|
|
@@ -299,14 +299,14 @@ function gr() {
|
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
302
|
+
case m:
|
|
303
303
|
return qe(e.render);
|
|
304
304
|
case b:
|
|
305
305
|
return L(e.type, r, a);
|
|
306
306
|
case _: {
|
|
307
|
-
var l = e, p = l._payload,
|
|
307
|
+
var l = e, p = l._payload, h = l._init;
|
|
308
308
|
try {
|
|
309
|
-
return L(
|
|
309
|
+
return L(h(p), r, a);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -323,9 +323,9 @@ function gr() {
|
|
|
323
323
|
}
|
|
324
324
|
function Ge(e, r, a, l, p) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var h = Function.call.bind(F);
|
|
327
327
|
for (var f in e)
|
|
328
|
-
if (
|
|
328
|
+
if (h(e, f)) {
|
|
329
329
|
var u = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof e[f] != "function") {
|
|
@@ -364,12 +364,12 @@ function gr() {
|
|
|
364
364
|
if (Ze(e))
|
|
365
365
|
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), ve(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var me = k.ReactCurrentOwner, Qe = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
372
|
+
}, he, be;
|
|
373
373
|
function Ke(e) {
|
|
374
374
|
if (F.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -387,12 +387,12 @@ function gr() {
|
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
389
|
function rr(e, r) {
|
|
390
|
-
typeof e.ref == "string" &&
|
|
390
|
+
typeof e.ref == "string" && me.current;
|
|
391
391
|
}
|
|
392
392
|
function tr(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var a = function() {
|
|
395
|
-
|
|
395
|
+
he || (he = !0, R("%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://reactjs.org/link/special-props)", r));
|
|
396
396
|
};
|
|
397
397
|
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
398
|
get: a,
|
|
@@ -411,7 +411,7 @@ function gr() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var ar = function(e, r, a, l, p,
|
|
414
|
+
var ar = function(e, r, a, l, p, h, f) {
|
|
415
415
|
var u = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
417
|
$$typeof: s,
|
|
@@ -421,7 +421,7 @@ function gr() {
|
|
|
421
421
|
ref: a,
|
|
422
422
|
props: f,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: h
|
|
425
425
|
};
|
|
426
426
|
return u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -442,20 +442,20 @@ function gr() {
|
|
|
442
442
|
};
|
|
443
443
|
function sr(e, r, a, l, p) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
445
|
+
var h, f = {}, u = null, E = null;
|
|
446
446
|
a !== void 0 && (pe(a), u = "" + a), er(r) && (pe(r.key), u = "" + r.key), Ke(r) && (E = r.ref, rr(r, p));
|
|
447
|
-
for (
|
|
448
|
-
F.call(r,
|
|
447
|
+
for (h in r)
|
|
448
|
+
F.call(r, h) && !Qe.hasOwnProperty(h) && (f[h] = r[h]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
450
|
var x = e.defaultProps;
|
|
451
|
-
for (
|
|
452
|
-
f[
|
|
451
|
+
for (h in x)
|
|
452
|
+
f[h] === void 0 && (f[h] = x[h]);
|
|
453
453
|
}
|
|
454
454
|
if (u || E) {
|
|
455
455
|
var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
456
|
u && tr(f, g), E && nr(f, g);
|
|
457
457
|
}
|
|
458
|
-
return ar(e, u, E, p, l,
|
|
458
|
+
return ar(e, u, E, p, l, me.current, f);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
var G = k.ReactCurrentOwner, xe = k.ReactDebugCurrentFrame;
|
|
@@ -526,7 +526,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
526
526
|
else if (e) {
|
|
527
527
|
var p = De(e);
|
|
528
528
|
if (typeof p == "function" && p !== e.entries)
|
|
529
|
-
for (var
|
|
529
|
+
for (var h = p.call(e), f; !(f = h.next()).done; )
|
|
530
530
|
X(f.value) && ye(f.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
@@ -539,7 +539,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
539
539
|
var a;
|
|
540
540
|
if (typeof r == "function")
|
|
541
541
|
a = r.propTypes;
|
|
542
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
542
|
+
else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
544
|
r.$$typeof === b))
|
|
545
545
|
a = r.propTypes;
|
|
@@ -569,7 +569,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
var Ee = {};
|
|
572
|
-
function _e(e, r, a, l, p,
|
|
572
|
+
function _e(e, r, a, l, p, h) {
|
|
573
573
|
{
|
|
574
574
|
var f = Le(e);
|
|
575
575
|
if (!f) {
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
580
580
|
var x;
|
|
581
581
|
e === null ? x = "null" : z(e) ? x = "array" : e !== void 0 && e.$$typeof === s ? (x = "<" + (O(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, u);
|
|
582
582
|
}
|
|
583
|
-
var g = sr(e, r, a, p,
|
|
583
|
+
var g = sr(e, r, a, p, h);
|
|
584
584
|
if (g == null)
|
|
585
585
|
return g;
|
|
586
586
|
if (f) {
|
|
@@ -597,8 +597,8 @@ Check the top-level render call using <` + a + ">.");
|
|
|
597
597
|
Re(w, e);
|
|
598
598
|
}
|
|
599
599
|
if (F.call(r, "key")) {
|
|
600
|
-
var S = O(e), C = Object.keys(r).filter(function(
|
|
601
|
-
return
|
|
600
|
+
var S = O(e), C = Object.keys(r).filter(function(mr) {
|
|
601
|
+
return mr !== "key";
|
|
602
602
|
}), Z = C.length > 0 ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
603
|
if (!Ee[S + Z]) {
|
|
604
604
|
var pr = C.length > 0 ? "{" + C.join(": ..., ") + ": ...}" : "{}";
|
|
@@ -666,7 +666,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
666
666
|
isDisabled: d = !1,
|
|
667
667
|
children: v,
|
|
668
668
|
className: j = "",
|
|
669
|
-
isLoading:
|
|
669
|
+
isLoading: m = !1
|
|
670
670
|
}) => {
|
|
671
671
|
const T = `btn-${n}`, y = o ? `btn-${o}` : "", _ = `${`btn ${T} ${y}`.trim()} ${j}`.trim();
|
|
672
672
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -675,9 +675,9 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
675
675
|
className: _,
|
|
676
676
|
type: "button",
|
|
677
677
|
onClick: c,
|
|
678
|
-
disabled: d ||
|
|
678
|
+
disabled: d || m,
|
|
679
679
|
children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-center", children: [
|
|
680
|
-
|
|
680
|
+
m && Rr,
|
|
681
681
|
v || i,
|
|
682
682
|
" ",
|
|
683
683
|
s && /* @__PURE__ */ t.jsx("span", { children: s })
|
|
@@ -716,7 +716,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
716
716
|
},
|
|
717
717
|
i
|
|
718
718
|
)) }) })
|
|
719
|
-
] }), Nr =
|
|
719
|
+
] }), Nr = hr(
|
|
720
720
|
({
|
|
721
721
|
id: n,
|
|
722
722
|
type: s,
|
|
@@ -726,13 +726,13 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
726
726
|
className: d = "form-control",
|
|
727
727
|
...v
|
|
728
728
|
}, j) => {
|
|
729
|
-
const
|
|
729
|
+
const m = `form-control ${d}`;
|
|
730
730
|
return /* @__PURE__ */ t.jsx(
|
|
731
731
|
"input",
|
|
732
732
|
{
|
|
733
733
|
type: s,
|
|
734
734
|
id: n,
|
|
735
|
-
className:
|
|
735
|
+
className: m,
|
|
736
736
|
placeholder: o,
|
|
737
737
|
value: i,
|
|
738
738
|
onChange: c,
|
|
@@ -769,14 +769,14 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
769
769
|
}) => {
|
|
770
770
|
const j = (b) => {
|
|
771
771
|
c(!b);
|
|
772
|
-
},
|
|
772
|
+
}, m = (b) => {
|
|
773
773
|
c(!1), d(b);
|
|
774
774
|
}, T = (b) => {
|
|
775
775
|
const _ = b.id === s;
|
|
776
776
|
return /* @__PURE__ */ t.jsx(
|
|
777
777
|
"li",
|
|
778
778
|
{
|
|
779
|
-
onClick: () =>
|
|
779
|
+
onClick: () => m(b),
|
|
780
780
|
className: _ ? "active" : "",
|
|
781
781
|
children: /* @__PURE__ */ t.jsx("a", { href: "#", children: b.title })
|
|
782
782
|
},
|
|
@@ -823,7 +823,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
823
823
|
}) => {
|
|
824
824
|
const v = Math.ceil(s / d), j = () => {
|
|
825
825
|
c ? c() : n > 1 && o(n - 1);
|
|
826
|
-
},
|
|
826
|
+
}, m = () => {
|
|
827
827
|
i ? i() : n < v && o(n + 1);
|
|
828
828
|
};
|
|
829
829
|
return /* @__PURE__ */ t.jsxs("div", { children: [
|
|
@@ -849,7 +849,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
849
849
|
type: "button",
|
|
850
850
|
className: `btn btn-default ${n === v ? "disabled" : ""}`,
|
|
851
851
|
disabled: n === v,
|
|
852
|
-
onClick:
|
|
852
|
+
onClick: m,
|
|
853
853
|
children: /* @__PURE__ */ t.jsx("i", { className: "fa fa-angle-right" })
|
|
854
854
|
}
|
|
855
855
|
)
|
|
@@ -897,7 +897,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
897
897
|
onPageChange: d,
|
|
898
898
|
pageSize: v,
|
|
899
899
|
onNextPage: j,
|
|
900
|
-
onPrevPage:
|
|
900
|
+
onPrevPage: m
|
|
901
901
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between bg-[#f5f5f5] border border-[#d1d1d1]", children: [
|
|
902
902
|
/* @__PURE__ */ t.jsx("div", { className: "m-[5px]", children: /* @__PURE__ */ t.jsx(
|
|
903
903
|
_r,
|
|
@@ -911,7 +911,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
911
911
|
Er,
|
|
912
912
|
{
|
|
913
913
|
onNextPage: j,
|
|
914
|
-
onPrevPage:
|
|
914
|
+
onPrevPage: m,
|
|
915
915
|
pageSize: v,
|
|
916
916
|
currentPage: s,
|
|
917
917
|
total: o,
|
|
@@ -944,9 +944,9 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
944
944
|
isDisabled: d = !1,
|
|
945
945
|
className: v = ""
|
|
946
946
|
}) => {
|
|
947
|
-
const [j,
|
|
947
|
+
const [j, m] = Q(i || ""), T = i !== void 0 ? i : j, y = (b) => {
|
|
948
948
|
const _ = b.target.value;
|
|
949
|
-
c ? c(_) :
|
|
949
|
+
c ? c(_) : m(_);
|
|
950
950
|
};
|
|
951
951
|
return /* @__PURE__ */ t.jsx(
|
|
952
952
|
"textarea",
|
|
@@ -976,10 +976,10 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), yr =
|
|
|
976
976
|
}
|
|
977
977
|
};
|
|
978
978
|
i.includes(n) || (console.warn(`Unsupported alert variant: "${n}". Defaulting to "info".`), n = "info");
|
|
979
|
-
const d = `flex items-center alert alert-${n} ${o || ""}`.trim();
|
|
979
|
+
const d = `flex pl-[5px] items-center alert alert-${n} ${o || ""}`.trim();
|
|
980
980
|
return /* @__PURE__ */ t.jsxs("div", { className: d, role: "alert", children: [
|
|
981
981
|
/* @__PURE__ */ t.jsx("span", { className: c(n) }),
|
|
982
|
-
/* @__PURE__ */ t.jsx("div", { children: s })
|
|
982
|
+
/* @__PURE__ */ t.jsx("div", { className: "ml-5", children: s })
|
|
983
983
|
] });
|
|
984
984
|
}, Ur = ({ variant: n, children: s, onClick: o }) => {
|
|
985
985
|
const i = `label label-${n}`, c = o ? { tabIndex: 0, role: "button", "aria-pressed": !1 } : {};
|
|
@@ -27,4 +27,4 @@ Check the top-level render call using <`+a+">.")}return r}}function Pe(e,r){{if(
|
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,te,P,Vr,P),Fe[P+te]=!0}}return e===i?$r(x):Ar(x),x}}function Wr(e,r,a){return Ie(e,r,a,!0)}function Yr(e,r,a){return Ie(e,r,a,!1)}var Lr=Yr,Mr=Wr;$.Fragment=i,$.jsx=Lr,$.jsxs=Mr}()),$}var se;function We(){return se||(se=1,process.env.NODE_ENV==="production"?L.exports=Ae():L.exports=$e()),L.exports}var t=We();const Ye=()=>t.jsx("div",{className:"toolbar-pf"}),ie=({items:n,className:s})=>t.jsx("ol",{className:`breadcrumb ${s||""}`.trim(),children:n.map((o,i)=>t.jsx("li",{className:o.active?"active":"",children:o.active?o.title:t.jsx("a",{href:o.href,children:o.title})},i))}),Le=t.jsx("span",{className:"loading-spinner mr-2",children:t.jsxs("svg",{className:"animate-spin h-5 w-5 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),G=({type:n="default",title:s,size:o,label:i,onClick:c,isDisabled:v=!1,children:p,className:y="",isLoading:m=!1})=>{const w=`btn-${n}`,R=o?`btn-${o}`:"",T=`${`btn ${w} ${R}`.trim()} ${y}`.trim();return t.jsx("button",{className:T,type:"button",onClick:c,disabled:v||m,children:t.jsxs("div",{className:"flex items-center justify-center",children:[m&&Le,p||i," ",s&&t.jsx("span",{children:s})]})})},Me=({children:n,eventKey:s,active:o})=>t.jsx("div",{className:`tab-pane ${o?"active":""}`,id:`${s}-panel`,role:"tabpanel","aria-labelledby":`${s}-tab`,children:n},s),Ve=({activeKey:n,onSelect:s,children:o})=>t.jsxs("div",{className:"tabs-container",children:[t.jsx("ul",{className:"nav nav-tabs",role:"tablist",children:o.map(({props:{eventKey:i,title:c}})=>t.jsx("li",{className:n===i?"active":"",children:t.jsx("a",{href:`#${i}`,onClick:v=>{v.preventDefault(),s(i)},children:c})},i))}),t.jsx("div",{className:"tabs-container",children:t.jsx("div",{className:"tab-content pf-c-tab-content",children:o.map(({props:{eventKey:i,children:c}})=>t.jsx("div",{className:`tab-pane ${n===i?"active":""}`,id:`${i}-panel`,role:"tabpanel","aria-labelledby":`${i}-tab`,children:c},i))})})]}),Be=O.forwardRef(({id:n,type:s,placeholder:o="",value:i,onChange:c,className:v="form-control",...p},y)=>{const m=`form-control ${v}`;return t.jsx("input",{type:s,id:n,className:m,placeholder:o,value:i,onChange:c,ref:y,...p})}),Ue=({title:n,isOpen:s,onClose:o,children:i,size:c})=>{if(!s)return null;const v=c?`modal-${c}`:"";return t.jsx("div",{className:"modal fade in",style:{display:"block"},tabIndex:-1,role:"dialog",children:t.jsx("div",{className:`modal-dialog ${v}`,role:"document",children:t.jsxs("div",{className:"modal-content",children:[t.jsxs("div",{className:"modal-header",children:[t.jsx("button",{type:"button",className:"close",onClick:o,"aria-hidden":"true",children:t.jsx("span",{className:"pficon pficon-close"})}),t.jsx("h4",{className:"modal-title",children:n})]}),t.jsx("div",{className:"modal-body",children:i})]})})})},Je=({variant:n,children:s,className:o=""})=>{const i={warning:"text-yellow-600",success:"text-green-600",error:"text-red-600"},c=o+" "+i[n]||"";return t.jsx("p",{className:c,children:s})},Ge=({children:n,...s})=>t.jsx("table",{...s,children:n}),ze=({children:n,...s})=>t.jsx("tbody",{...s,children:n}),He=({children:n,...s})=>t.jsx("td",{...s,children:n}),Xe=({children:n,...s})=>t.jsx("th",{...s,children:n}),qe=({children:n,...s})=>t.jsx("thead",{...s,children:n}),Ze=({children:n,...s})=>t.jsx("tr",{...s,children:n}),z=({items:n,selected:s,title:o,isOpen:i,setIsOpen:c,onChange:v,className:p=""})=>{const y=g=>{c(!g)},m=g=>{c(!1),v(g)},w=g=>{const T=g.id===s;return t.jsx("li",{onClick:()=>m(g),className:T?"active":"",children:t.jsx("a",{href:"#",children:g.title})},g.id)},R=`btn btn-default dropdown-toggle flex-1 ${p}`;return t.jsxs(t.Fragment,{children:[t.jsx("button",{style:{marginLeft:"0px",left:"-1px"},className:R,onClick:()=>y(i),"data-toggle":"dropdown",type:"button",children:t.jsxs("div",{className:"flex items-center justify-center",children:[o&&t.jsx("div",{className:"mr-2",children:o})," ",t.jsx("span",{className:"caret"})," "]})}),t.jsx("ul",{className:"dropdown-menu",role:"menu",children:n.map(w)})]})},Qe=n=>{const[s,o]=O.useState(!1),i=n.selected,c=n.items.find(v=>v.id==i);return n.debug&&(console.log(n),console.log(c)),t.jsx("div",{className:`btn-group ${s?"open":""}`,children:t.jsx(z,{...n,title:(c==null?void 0:c.title)||n.title,setIsOpen:o,isOpen:s})})},oe=({currentPage:n,total:s,onPageChange:o,onNextPage:i,onPrevPage:c,pageSize:v})=>{const p=Math.ceil(s/v),y=()=>{c?c():n>1&&o(n-1)},m=()=>{i?i():n<p&&o(n+1)};return t.jsxs("div",{children:[t.jsx("span",{children:t.jsxs("span",{className:"pagination-pf-items-current",children:[n," - ",p]})}),t.jsxs("div",{className:"btn-group ml-2",children:[t.jsx("button",{type:"button",className:`btn btn-default ${n===1?"disabled":""}`,disabled:n===1,onClick:y,children:t.jsx("i",{className:"fa fa-angle-left"})}),t.jsx("button",{type:"button",className:`btn btn-default ${n===p?"disabled":""}`,disabled:n===p,onClick:m,children:t.jsx("i",{className:"fa fa-angle-right"})})]})]})},H=({children:n,onChange:s,items:o,selected:i,className:c=""})=>{const[v,p]=O.useState(!1);return t.jsx("div",{className:`btn-group ${c} ${v?"open":""}`,children:t.jsxs(t.Fragment,{children:[n,t.jsx(z,{setIsOpen:p,isOpen:v,onChange:s,items:o,selected:i})]})})},le=[{id:1,title:"5 сек",data:5e3},{id:2,title:"10 сек",data:1e4},{id:3,title:"20 сек",data:2e4},{id:4,title:"30 сек",data:3e4},{id:5,title:"60 сек",data:6e4}],ce=({onChange:n,value:s,onRefresh:o})=>{var v;const i=p=>{n(p.data)},c=(v=le.find(p=>p.data===s))==null?void 0:v.id;return t.jsx(H,{className:"flex",items:le,onChange:i,selected:c,children:t.jsx(G,{className:"m-0",type:"default",onClick:o,children:t.jsx("i",{className:"fa fa-refresh"})})})},Ke=({interval:n,page:s,total:o,onRefresh:i,onChangeInterval:c,onPageChange:v,pageSize:p,onNextPage:y,onPrevPage:m})=>t.jsxs("div",{className:"flex justify-between bg-[#f5f5f5] border border-[#d1d1d1]",children:[t.jsx("div",{className:"m-[5px]",children:t.jsx(ce,{value:n,onChange:c,onRefresh:i})}),t.jsx("div",{className:"m-[5px]",children:t.jsx(oe,{onNextPage:y,onPrevPage:m,pageSize:p,currentPage:s,total:o,onPageChange:v})})]}),er=({id:n,label:s,isChecked:o=!1,onChange:i,className:c="checkbox"})=>t.jsx("div",{className:c,children:t.jsxs("label",{htmlFor:n,children:[t.jsx("input",{type:"checkbox",id:n,checked:o,onChange:i}),` ${s}`]})}),rr=({placeholder:n="",rows:s=3,maxLength:o,value:i,onChange:c,isDisabled:v=!1,className:p=""})=>{const[y,m]=O.useState(i||""),w=i!==void 0?i:y,R=g=>{const T=g.target.value;c?c(T):m(T)};return t.jsx("textarea",{className:p,placeholder:n,rows:s,maxLength:o,value:w,onChange:R,disabled:v})},tr=({variant:n,title:s,className:o})=>{const i=["success","info","warning","danger"],c=p=>{switch(p){case"success":return"pficon pficon-ok";case"info":return"pficon pficon-info";case"warning":return"pficon pficon-warning-triangle-o";case"danger":return"pficon pficon-error-circle-o";default:return"pficon pficon-info"}};i.includes(n)||(console.warn(`Unsupported alert variant: "${n}". Defaulting to "info".`),n="info");const v=`flex items-center alert alert-${n} ${o||""}`.trim();return t.jsxs("div",{className:v,role:"alert",children:[t.jsx("span",{className:c(n)}),t.jsx("div",{children:s})]})},nr=({variant:n,children:s,onClick:o})=>{const i=`label label-${n}`,c=o?{tabIndex:0,role:"button","aria-pressed":!1}:{};return t.jsx("span",{className:i,onClick:o,...c,style:{cursor:o?"pointer":void 0},children:s})},ar=n=>{const{label:s,isChecked:o=!1,id:i="radio1",onChange:c,name:v}=n;return t.jsx("div",{className:"radio",children:t.jsxs("label",{htmlFor:i,children:[t.jsx("input",{type:"radio",name:v,id:i,checked:o,onChange:p=>c(p.target.checked)}),s]})})};function sr(n,s){O.useEffect(()=>{if(!n)return;const o=setInterval(()=>{s()},n);return()=>clearInterval(o)},[n])}const ir=()=>t.jsxs("div",{children:[t.jsx(ie,{items:[{title:"Дополнения",active:!0},{title:"Название плагина",href:"#Название плагина"}]}),t.jsx(H,{onChange:()=>{},items:[{id:0,title:"5 сек"},{id:1,title:"10 сек"},{id:2,title:"20 сек"}],children:t.jsx(G,{children:"Hello"})})]});d.Alert=tr,d.Breadcrumb=ie,d.Button=G,d.Checkbox=er,d.Dropdown=z,d.DropdownSelect=Qe,d.GroupButtonContainer=H,d.HelpText=Je,d.Input=Be,d.Label=nr,d.Modal=Ue,d.Pagination=oe,d.Radio=ar,d.ReloadButton=ce,d.SampleComp=ir,d.Tab=Me,d.Table=Ge,d.TableToolbar=Ke,d.Tabs=Ve,d.Tbody=ze,d.Td=He,d.TextArea=rr,d.Th=Xe,d.Thead=qe,d.ToolbarContainer=Ye,d.Tr=Ze,d.useIntervalLoader=sr,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
30
|
+
<%s key={someKey} {...props} />`,te,P,Vr,P),Fe[P+te]=!0}}return e===i?$r(x):Ar(x),x}}function Wr(e,r,a){return Ie(e,r,a,!0)}function Yr(e,r,a){return Ie(e,r,a,!1)}var Lr=Yr,Mr=Wr;$.Fragment=i,$.jsx=Lr,$.jsxs=Mr}()),$}var se;function We(){return se||(se=1,process.env.NODE_ENV==="production"?L.exports=Ae():L.exports=$e()),L.exports}var t=We();const Ye=()=>t.jsx("div",{className:"toolbar-pf"}),ie=({items:n,className:s})=>t.jsx("ol",{className:`breadcrumb ${s||""}`.trim(),children:n.map((o,i)=>t.jsx("li",{className:o.active?"active":"",children:o.active?o.title:t.jsx("a",{href:o.href,children:o.title})},i))}),Le=t.jsx("span",{className:"loading-spinner mr-2",children:t.jsxs("svg",{className:"animate-spin h-5 w-5 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),G=({type:n="default",title:s,size:o,label:i,onClick:c,isDisabled:v=!1,children:p,className:y="",isLoading:m=!1})=>{const w=`btn-${n}`,R=o?`btn-${o}`:"",T=`${`btn ${w} ${R}`.trim()} ${y}`.trim();return t.jsx("button",{className:T,type:"button",onClick:c,disabled:v||m,children:t.jsxs("div",{className:"flex items-center justify-center",children:[m&&Le,p||i," ",s&&t.jsx("span",{children:s})]})})},Me=({children:n,eventKey:s,active:o})=>t.jsx("div",{className:`tab-pane ${o?"active":""}`,id:`${s}-panel`,role:"tabpanel","aria-labelledby":`${s}-tab`,children:n},s),Ve=({activeKey:n,onSelect:s,children:o})=>t.jsxs("div",{className:"tabs-container",children:[t.jsx("ul",{className:"nav nav-tabs",role:"tablist",children:o.map(({props:{eventKey:i,title:c}})=>t.jsx("li",{className:n===i?"active":"",children:t.jsx("a",{href:`#${i}`,onClick:v=>{v.preventDefault(),s(i)},children:c})},i))}),t.jsx("div",{className:"tabs-container",children:t.jsx("div",{className:"tab-content pf-c-tab-content",children:o.map(({props:{eventKey:i,children:c}})=>t.jsx("div",{className:`tab-pane ${n===i?"active":""}`,id:`${i}-panel`,role:"tabpanel","aria-labelledby":`${i}-tab`,children:c},i))})})]}),Be=O.forwardRef(({id:n,type:s,placeholder:o="",value:i,onChange:c,className:v="form-control",...p},y)=>{const m=`form-control ${v}`;return t.jsx("input",{type:s,id:n,className:m,placeholder:o,value:i,onChange:c,ref:y,...p})}),Ue=({title:n,isOpen:s,onClose:o,children:i,size:c})=>{if(!s)return null;const v=c?`modal-${c}`:"";return t.jsx("div",{className:"modal fade in",style:{display:"block"},tabIndex:-1,role:"dialog",children:t.jsx("div",{className:`modal-dialog ${v}`,role:"document",children:t.jsxs("div",{className:"modal-content",children:[t.jsxs("div",{className:"modal-header",children:[t.jsx("button",{type:"button",className:"close",onClick:o,"aria-hidden":"true",children:t.jsx("span",{className:"pficon pficon-close"})}),t.jsx("h4",{className:"modal-title",children:n})]}),t.jsx("div",{className:"modal-body",children:i})]})})})},Je=({variant:n,children:s,className:o=""})=>{const i={warning:"text-yellow-600",success:"text-green-600",error:"text-red-600"},c=o+" "+i[n]||"";return t.jsx("p",{className:c,children:s})},Ge=({children:n,...s})=>t.jsx("table",{...s,children:n}),ze=({children:n,...s})=>t.jsx("tbody",{...s,children:n}),He=({children:n,...s})=>t.jsx("td",{...s,children:n}),Xe=({children:n,...s})=>t.jsx("th",{...s,children:n}),qe=({children:n,...s})=>t.jsx("thead",{...s,children:n}),Ze=({children:n,...s})=>t.jsx("tr",{...s,children:n}),z=({items:n,selected:s,title:o,isOpen:i,setIsOpen:c,onChange:v,className:p=""})=>{const y=g=>{c(!g)},m=g=>{c(!1),v(g)},w=g=>{const T=g.id===s;return t.jsx("li",{onClick:()=>m(g),className:T?"active":"",children:t.jsx("a",{href:"#",children:g.title})},g.id)},R=`btn btn-default dropdown-toggle flex-1 ${p}`;return t.jsxs(t.Fragment,{children:[t.jsx("button",{style:{marginLeft:"0px",left:"-1px"},className:R,onClick:()=>y(i),"data-toggle":"dropdown",type:"button",children:t.jsxs("div",{className:"flex items-center justify-center",children:[o&&t.jsx("div",{className:"mr-2",children:o})," ",t.jsx("span",{className:"caret"})," "]})}),t.jsx("ul",{className:"dropdown-menu",role:"menu",children:n.map(w)})]})},Qe=n=>{const[s,o]=O.useState(!1),i=n.selected,c=n.items.find(v=>v.id==i);return n.debug&&(console.log(n),console.log(c)),t.jsx("div",{className:`btn-group ${s?"open":""}`,children:t.jsx(z,{...n,title:(c==null?void 0:c.title)||n.title,setIsOpen:o,isOpen:s})})},oe=({currentPage:n,total:s,onPageChange:o,onNextPage:i,onPrevPage:c,pageSize:v})=>{const p=Math.ceil(s/v),y=()=>{c?c():n>1&&o(n-1)},m=()=>{i?i():n<p&&o(n+1)};return t.jsxs("div",{children:[t.jsx("span",{children:t.jsxs("span",{className:"pagination-pf-items-current",children:[n," - ",p]})}),t.jsxs("div",{className:"btn-group ml-2",children:[t.jsx("button",{type:"button",className:`btn btn-default ${n===1?"disabled":""}`,disabled:n===1,onClick:y,children:t.jsx("i",{className:"fa fa-angle-left"})}),t.jsx("button",{type:"button",className:`btn btn-default ${n===p?"disabled":""}`,disabled:n===p,onClick:m,children:t.jsx("i",{className:"fa fa-angle-right"})})]})]})},H=({children:n,onChange:s,items:o,selected:i,className:c=""})=>{const[v,p]=O.useState(!1);return t.jsx("div",{className:`btn-group ${c} ${v?"open":""}`,children:t.jsxs(t.Fragment,{children:[n,t.jsx(z,{setIsOpen:p,isOpen:v,onChange:s,items:o,selected:i})]})})},le=[{id:1,title:"5 сек",data:5e3},{id:2,title:"10 сек",data:1e4},{id:3,title:"20 сек",data:2e4},{id:4,title:"30 сек",data:3e4},{id:5,title:"60 сек",data:6e4}],ce=({onChange:n,value:s,onRefresh:o})=>{var v;const i=p=>{n(p.data)},c=(v=le.find(p=>p.data===s))==null?void 0:v.id;return t.jsx(H,{className:"flex",items:le,onChange:i,selected:c,children:t.jsx(G,{className:"m-0",type:"default",onClick:o,children:t.jsx("i",{className:"fa fa-refresh"})})})},Ke=({interval:n,page:s,total:o,onRefresh:i,onChangeInterval:c,onPageChange:v,pageSize:p,onNextPage:y,onPrevPage:m})=>t.jsxs("div",{className:"flex justify-between bg-[#f5f5f5] border border-[#d1d1d1]",children:[t.jsx("div",{className:"m-[5px]",children:t.jsx(ce,{value:n,onChange:c,onRefresh:i})}),t.jsx("div",{className:"m-[5px]",children:t.jsx(oe,{onNextPage:y,onPrevPage:m,pageSize:p,currentPage:s,total:o,onPageChange:v})})]}),er=({id:n,label:s,isChecked:o=!1,onChange:i,className:c="checkbox"})=>t.jsx("div",{className:c,children:t.jsxs("label",{htmlFor:n,children:[t.jsx("input",{type:"checkbox",id:n,checked:o,onChange:i}),` ${s}`]})}),rr=({placeholder:n="",rows:s=3,maxLength:o,value:i,onChange:c,isDisabled:v=!1,className:p=""})=>{const[y,m]=O.useState(i||""),w=i!==void 0?i:y,R=g=>{const T=g.target.value;c?c(T):m(T)};return t.jsx("textarea",{className:p,placeholder:n,rows:s,maxLength:o,value:w,onChange:R,disabled:v})},tr=({variant:n,title:s,className:o})=>{const i=["success","info","warning","danger"],c=p=>{switch(p){case"success":return"pficon pficon-ok";case"info":return"pficon pficon-info";case"warning":return"pficon pficon-warning-triangle-o";case"danger":return"pficon pficon-error-circle-o";default:return"pficon pficon-info"}};i.includes(n)||(console.warn(`Unsupported alert variant: "${n}". Defaulting to "info".`),n="info");const v=`flex pl-[5px] items-center alert alert-${n} ${o||""}`.trim();return t.jsxs("div",{className:v,role:"alert",children:[t.jsx("span",{className:c(n)}),t.jsx("div",{className:"ml-5",children:s})]})},nr=({variant:n,children:s,onClick:o})=>{const i=`label label-${n}`,c=o?{tabIndex:0,role:"button","aria-pressed":!1}:{};return t.jsx("span",{className:i,onClick:o,...c,style:{cursor:o?"pointer":void 0},children:s})},ar=n=>{const{label:s,isChecked:o=!1,id:i="radio1",onChange:c,name:v}=n;return t.jsx("div",{className:"radio",children:t.jsxs("label",{htmlFor:i,children:[t.jsx("input",{type:"radio",name:v,id:i,checked:o,onChange:p=>c(p.target.checked)}),s]})})};function sr(n,s){O.useEffect(()=>{if(!n)return;const o=setInterval(()=>{s()},n);return()=>clearInterval(o)},[n])}const ir=()=>t.jsxs("div",{children:[t.jsx(ie,{items:[{title:"Дополнения",active:!0},{title:"Название плагина",href:"#Название плагина"}]}),t.jsx(H,{onChange:()=>{},items:[{id:0,title:"5 сек"},{id:1,title:"10 сек"},{id:2,title:"20 сек"}],children:t.jsx(G,{children:"Hello"})})]});d.Alert=tr,d.Breadcrumb=ie,d.Button=G,d.Checkbox=er,d.Dropdown=z,d.DropdownSelect=Qe,d.GroupButtonContainer=H,d.HelpText=Je,d.Input=Be,d.Label=nr,d.Modal=Ue,d.Pagination=oe,d.Radio=ar,d.ReloadButton=ce,d.SampleComp=ir,d.Tab=Me,d.Table=Ge,d.TableToolbar=Ke,d.Tabs=Ve,d.Tbody=ze,d.Td=He,d.TextArea=rr,d.Th=Xe,d.Thead=qe,d.ToolbarContainer=Ye,d.Tr=Ze,d.useIntervalLoader=sr,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|