ovirt-ui-toolkit 0.0.40 → 0.0.42
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,5 +1,5 @@
|
|
|
1
1
|
import Se, { forwardRef as pr, useState as ke, useEffect as hr } from "react";
|
|
2
|
-
var
|
|
2
|
+
var U = { exports: {} }, F = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -152,7 +152,7 @@ function mr() {
|
|
|
152
152
|
D++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Le() {
|
|
156
156
|
{
|
|
157
157
|
if (D--, D === 0) {
|
|
158
158
|
var e = {
|
|
@@ -203,8 +203,8 @@ function mr() {
|
|
|
203
203
|
}
|
|
204
204
|
var q = !1, V;
|
|
205
205
|
{
|
|
206
|
-
var
|
|
207
|
-
V = new
|
|
206
|
+
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
V = new Ue();
|
|
208
208
|
}
|
|
209
209
|
function ue(e, r) {
|
|
210
210
|
if (!e || q)
|
|
@@ -272,7 +272,7 @@ function mr() {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
q = !1, B.current = v,
|
|
275
|
+
q = !1, B.current = v, Le(), Error.prepareStackTrace = d;
|
|
276
276
|
}
|
|
277
277
|
var $ = e ? e.displayName || e.name : "", k = $ ? Y($) : "";
|
|
278
278
|
return typeof e == "function" && V.set(e, k), k;
|
|
@@ -314,7 +314,7 @@ function mr() {
|
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
316
|
var A = Object.prototype.hasOwnProperty, fe = {}, de = N.ReactDebugCurrentFrame;
|
|
317
|
-
function
|
|
317
|
+
function L(e) {
|
|
318
318
|
if (e) {
|
|
319
319
|
var r = e._owner, n = M(e.type, e._source, r ? r.type : null);
|
|
320
320
|
de.setExtraStackFrame(n);
|
|
@@ -336,7 +336,7 @@ function mr() {
|
|
|
336
336
|
} catch (x) {
|
|
337
337
|
c = x;
|
|
338
338
|
}
|
|
339
|
-
c && !(c instanceof Error) && (
|
|
339
|
+
c && !(c instanceof Error) && (L(d), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", i || "React class", n, u, typeof c), L(null)), c instanceof Error && !(c.message in fe) && (fe[c.message] = !0, L(d), y("Failed %s type: %s", n, c.message), L(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -625,7 +625,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
625
625
|
}
|
|
626
626
|
var we;
|
|
627
627
|
function xr() {
|
|
628
|
-
return we || (we = 1, process.env.NODE_ENV === "production" ?
|
|
628
|
+
return we || (we = 1, process.env.NODE_ENV === "production" ? U.exports = br() : U.exports = mr()), U.exports;
|
|
629
629
|
}
|
|
630
630
|
var t = xr();
|
|
631
631
|
const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), gr = ({ items: a, className: s }) => /* @__PURE__ */ t.jsx("ol", { className: `breadcrumb ${s || ""}`.trim(), children: a.map((l, o) => /* @__PURE__ */ t.jsx("li", { className: l.active ? "active" : "", children: l.active ? l.title : /* @__PURE__ */ t.jsx("a", { href: l.href, children: l.title }) }, o)) }), jr = /* @__PURE__ */ t.jsx("span", { className: "loading-spinner mr-2", children: /* @__PURE__ */ t.jsxs(
|
|
@@ -677,7 +677,6 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), gr =
|
|
|
677
677
|
onClick: f,
|
|
678
678
|
disabled: p || b,
|
|
679
679
|
children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-center", children: [
|
|
680
|
-
b && /* @__PURE__ */ t.jsx("span", { children: "hello" }),
|
|
681
680
|
b && jr,
|
|
682
681
|
h || o,
|
|
683
682
|
" ",
|
|
@@ -909,7 +908,7 @@ const Tr = () => /* @__PURE__ */ t.jsx("div", { className: "toolbar-pf" }), gr =
|
|
|
909
908
|
const o = `alert alert-${a} ${l || ""}`;
|
|
910
909
|
return ["success", "info", "warning", "danger"].includes(a) || (console.warn(`Unsupported alert variant: "${a}". Defaulting to "info".`), a = "info"), /* @__PURE__ */ t.jsx("div", { className: o.trim(), role: "alert", children: s });
|
|
911
910
|
};
|
|
912
|
-
function
|
|
911
|
+
function Lr(a, s) {
|
|
913
912
|
hr(() => {
|
|
914
913
|
if (!a)
|
|
915
914
|
return;
|
|
@@ -921,7 +920,7 @@ function Ur(a, s) {
|
|
|
921
920
|
}
|
|
922
921
|
const _r = ({
|
|
923
922
|
children: a
|
|
924
|
-
}) => /* @__PURE__ */ t.jsx("div", { className: "btn-group", children: a }),
|
|
923
|
+
}) => /* @__PURE__ */ t.jsx("div", { className: "btn-group", children: a }), Ur = () => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
925
924
|
/* @__PURE__ */ t.jsx(
|
|
926
925
|
gr,
|
|
927
926
|
{
|
|
@@ -947,7 +946,7 @@ export {
|
|
|
947
946
|
kr as Modal,
|
|
948
947
|
Er as Pagination,
|
|
949
948
|
Rr as ReloadButton,
|
|
950
|
-
|
|
949
|
+
Ur as SampleComp,
|
|
951
950
|
wr as Tab,
|
|
952
951
|
Pr as Table,
|
|
953
952
|
Wr as TableToolbar,
|
|
@@ -959,5 +958,5 @@ export {
|
|
|
959
958
|
Fr as Thead,
|
|
960
959
|
Tr as ToolbarContainer,
|
|
961
960
|
Ir as Tr,
|
|
962
|
-
|
|
961
|
+
Lr as useIntervalLoader
|
|
963
962
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var re;function Ie(){if(re)return F;re=1;var a=O,s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
9
|
+
*/var re;function Ie(){if(re)return F;re=1;var a=O,s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function h(C,m,w){var y,g={},_=null,B=null;w!==void 0&&(_=""+w),m.key!==void 0&&(_=""+m.key),m.ref!==void 0&&(B=m.ref);for(y in m)o.call(m,y)&&!b.hasOwnProperty(y)&&(g[y]=m[y]);if(C&&C.defaultProps)for(y in m=C.defaultProps,m)g[y]===void 0&&(g[y]=m[y]);return{$$typeof:s,type:C,key:_,ref:B,props:g,_owner:f.current}}return F.Fragment=l,F.jsx=h,F.jsxs=h,F}var $={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var te;function Fe(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var a=O,s=Symbol.for("react.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),
|
|
18
|
-
`+G+e}}var q=!1,U;{var
|
|
17
|
+
*/var te;function Fe(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var a=O,s=Symbol.for("react.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),C=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),ce=Symbol.iterator,ar="@@iterator";function sr(e){if(e===null||typeof e!="object")return null;var r=ce&&e[ce]||e[ar];return typeof r=="function"?r:null}var D=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];ir("error",e,n)}}function ir(e,r,n){{var i=D.ReactDebugCurrentFrame,d=i.getStackAddendum();d!==""&&(r+="%s",n=n.concat([d]));var p=n.map(function(u){return String(u)});p.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,p)}}var or=!1,lr=!1,cr=!1,ur=!1,fr=!1,ue;ue=Symbol.for("react.module.reference");function dr(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===b||fr||e===f||e===w||e===y||ur||e===B||or||lr||cr||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===g||e.$$typeof===h||e.$$typeof===C||e.$$typeof===m||e.$$typeof===ue||e.getModuleId!==void 0))}function vr(e,r,n){var i=e.displayName;if(i)return i;var d=r.displayName||r.name||"";return d!==""?n+"("+d+")":n}function fe(e){return e.displayName||"Context"}function k(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case l:return"Portal";case b:return"Profiler";case f:return"StrictMode";case w:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var r=e;return fe(r)+".Consumer";case h:var n=e;return fe(n._context)+".Provider";case m:return vr(e,e.render,"ForwardRef");case g:var i=e.displayName||null;return i!==null?i:k(e.type)||"Memo";case _:{var d=e,p=d._payload,u=d._init;try{return k(u(p))}catch{return null}}}return null}var N=Object.assign,W=0,de,ve,pe,be,he,me,ge;function je(){}je.__reactDisabledLog=!0;function pr(){{if(W===0){de=console.log,ve=console.info,pe=console.warn,be=console.error,he=console.group,me=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function br(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:de}),info:N({},e,{value:ve}),warn:N({},e,{value:pe}),error:N({},e,{value:be}),group:N({},e,{value:he}),groupCollapsed:N({},e,{value:me}),groupEnd:N({},e,{value:ge})})}W<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=D.ReactCurrentDispatcher,G;function L(e,r,n){{if(G===void 0)try{throw Error()}catch(d){var i=d.stack.trim().match(/\n( *(at )?)/);G=i&&i[1]||""}return`
|
|
18
|
+
`+G+e}}var q=!1,U;{var hr=typeof WeakMap=="function"?WeakMap:Map;U=new hr}function xe(e,r){if(!e||q)return"";{var n=U.get(e);if(n!==void 0)return n}var i;q=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=z.current,z.current=null,pr();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(T){i=T}Reflect.construct(e,[],u)}else{try{u.call()}catch(T){i=T}e.call(u.prototype)}}else{try{throw Error()}catch(T){i=T}e()}}catch(T){if(T&&i&&typeof T.stack=="string"){for(var c=T.stack.split(`
|
|
19
19
|
`),E=i.stack.split(`
|
|
20
20
|
`),j=c.length-1,x=E.length-1;j>=1&&x>=0&&c[j]!==E[x];)x--;for(;j>=1&&x>=0;j--,x--)if(c[j]!==E[x]){if(j!==1||x!==1)do if(j--,x--,x<0||c[j]!==E[x]){var S=`
|
|
21
|
-
`+c[j].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,S),S}while(j>=1&&x>=0);break}}}finally{q=!1,z.current=p,
|
|
21
|
+
`+c[j].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,S),S}while(j>=1&&x>=0);break}}}finally{q=!1,z.current=p,br(),Error.prepareStackTrace=d}var I=e?e.displayName||e.name:"",P=I?L(I):"";return typeof e=="function"&&U.set(e,P),P}function mr(e,r,n){return xe(e,!1)}function gr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,n){if(e==null)return"";if(typeof e=="function")return xe(e,gr(e));if(typeof e=="string")return L(e);switch(e){case w:return L("Suspense");case y:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return mr(e.render);case g:return J(e.type,r,n);case _:{var i=e,d=i._payload,p=i._init;try{return J(p(d),r,n)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,ye={},Re=D.ReactDebugCurrentFrame;function H(e){if(e){var r=e._owner,n=J(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(n)}else Re.setExtraStackFrame(null)}function jr(e,r,n,i,d){{var p=Function.call.bind(Y);for(var u in e)if(p(e,u)){var c=void 0;try{if(typeof e[u]!="function"){var E=Error((i||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}c=e[u](r,u,i,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(j){c=j}c&&!(c instanceof Error)&&(H(d),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",i||"React class",n,u,typeof c),H(null)),c instanceof Error&&!(c.message in ye)&&(ye[c.message]=!0,H(d),R("Failed %s type: %s",n,c.message),H(null))}}}var xr=Array.isArray;function X(e){return xr(e)}function yr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Rr(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function _e(e){if(Rr(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",yr(e)),Ee(e)}var Te=D.ReactCurrentOwner,Er={key:!0,ref:!0,__self:!0,__source:!0},Ce,we;function _r(e){if(Y.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Tr(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Cr(e,r){typeof e.ref=="string"&&Te.current}function wr(e,r){{var n=function(){Ce||(Ce=!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))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function Sr(e,r){{var n=function(){we||(we=!0,R("%s: `ref` 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))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var Or=function(e,r,n,i,d,p,u){var c={$$typeof:s,type:e,key:r,ref:n,props:u,_owner:p};return c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function kr(e,r,n,i,d){{var p,u={},c=null,E=null;n!==void 0&&(_e(n),c=""+n),Tr(r)&&(_e(r.key),c=""+r.key),_r(r)&&(E=r.ref,Cr(r,d));for(p in r)Y.call(r,p)&&!Er.hasOwnProperty(p)&&(u[p]=r[p]);if(e&&e.defaultProps){var j=e.defaultProps;for(p in j)u[p]===void 0&&(u[p]=j[p])}if(c||E){var x=typeof e=="function"?e.displayName||e.name||"Unknown":e;c&&wr(u,x),E&&Sr(u,x)}return Or(e,c,E,d,i,Te.current,u)}}var Z=D.ReactCurrentOwner,Se=D.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,n=J(e.type,e._source,r?r.type:null);Se.setExtraStackFrame(n)}else Se.setExtraStackFrame(null)}var Q;Q=!1;function K(e){return typeof e=="object"&&e!==null&&e.$$typeof===s}function Oe(){{if(Z.current){var e=k(Z.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function Nr(e){return""}var ke={};function Pr(e){{var r=Oe();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
|
|
24
24
|
|
|
@@ -27,4 +27,4 @@ Check the top-level render call using <`+n+">.")}return r}}function Ne(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} />`,ee,P,Yr,P),De[P+ee]=!0}}return e===o?Ar(x):Dr(x),x}}function Ir(e,r,n){return Ae(e,r,n,!0)}function Fr(e,r,n){return Ae(e,r,n,!1)}var $r=Fr,Wr=Ir;$.Fragment=o,$.jsx=$r,$.jsxs=Wr}()),$}var ne;function $e(){return ne||(ne=1,process.env.NODE_ENV==="production"?M.exports=Ie():M.exports=Fe()),M.exports}var t=$e();const We=()=>t.jsx("div",{className:"toolbar-pf"}),ae=({items:a,className:s})=>t.jsx("ol",{className:`breadcrumb ${s||""}`.trim(),children:a.map((l,o)=>t.jsx("li",{className:l.active?"active":"",children:l.active?l.title:t.jsx("a",{href:l.href,children:l.title})},o))}),Ye=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"})]})}),V=({type:a="default",title:s,size:l,label:o,onClick:f,isDisabled:
|
|
30
|
+
<%s key={someKey} {...props} />`,ee,P,Yr,P),De[P+ee]=!0}}return e===o?Ar(x):Dr(x),x}}function Ir(e,r,n){return Ae(e,r,n,!0)}function Fr(e,r,n){return Ae(e,r,n,!1)}var $r=Fr,Wr=Ir;$.Fragment=o,$.jsx=$r,$.jsxs=Wr}()),$}var ne;function $e(){return ne||(ne=1,process.env.NODE_ENV==="production"?M.exports=Ie():M.exports=Fe()),M.exports}var t=$e();const We=()=>t.jsx("div",{className:"toolbar-pf"}),ae=({items:a,className:s})=>t.jsx("ol",{className:`breadcrumb ${s||""}`.trim(),children:a.map((l,o)=>t.jsx("li",{className:l.active?"active":"",children:l.active?l.title:t.jsx("a",{href:l.href,children:l.title})},o))}),Ye=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"})]})}),V=({type:a="default",title:s,size:l,label:o,onClick:f,isDisabled:b=!1,children:h,className:C="",isLoading:m=!1})=>{const w=`btn-${a}`,y=l?`btn-${l}`:"",_=`${`btn ${w} ${y}`.trim()} ${C}`.trim();return t.jsx("button",{className:_,type:"button",onClick:f,disabled:b||m,children:t.jsxs("div",{className:"flex items-center justify-center",children:[m&&Ye,h||o," ",s&&t.jsx("span",{children:s})]})})},Me=({children:a,eventKey:s,active:l})=>t.jsx("div",{className:`tab-pane ${l?"active":""}`,id:`${s}-panel`,role:"tabpanel","aria-labelledby":`${s}-tab`,children:a},s),Ve=({activeKey:a,onSelect:s,children:l})=>t.jsxs("div",{className:"tabs-container",children:[t.jsx("ul",{className:"nav nav-tabs",role:"tablist",children:l.map(({props:{eventKey:o,title:f}})=>t.jsx("li",{className:a===o?"active":"",children:t.jsx("a",{href:`#${o}`,onClick:b=>{b.preventDefault(),s(o)},children:f})},o))}),t.jsx("div",{className:"tabs-container",children:t.jsx("div",{className:"tab-content pf-c-tab-content",children:l.map(({props:{eventKey:o,children:f}})=>t.jsx("div",{className:`tab-pane ${a===o?"active":""}`,id:`${o}-panel`,role:"tabpanel","aria-labelledby":`${o}-tab`,children:f},o))})})]}),Be=O.forwardRef(({id:a,type:s,placeholder:l="",value:o,onChange:f,className:b="form-control"},h)=>t.jsx("input",{type:s,id:a,className:b,placeholder:l,value:o,onChange:f,ref:h})),Le=({title:a,isOpen:s,onClose:l,children:o,size:f})=>{if(!s)return null;const b=f?`modal-${f}`:"";return t.jsx("div",{className:"modal fade in",style:{display:"block"},tabIndex:-1,role:"dialog",children:t.jsx("div",{className:`modal-dialog ${b}`,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:l,"aria-hidden":"true",children:t.jsx("span",{className:"pficon pficon-close"})}),t.jsx("h4",{className:"modal-title",children:a})]}),t.jsx("div",{className:"modal-body",children:o})]})})})},Ue=({variant:a,children:s})=>{const o={warning:"text-yellow-600",success:"text-green-600",error:"text-red-600"}[a]||"";return t.jsx("p",{className:o,children:s})},Je=({children:a,...s})=>t.jsx("table",{...s,children:a}),He=({children:a,...s})=>t.jsx("tbody",{...s,children:a}),ze=({children:a,...s})=>t.jsx("td",{...s,children:a}),Ge=({children:a,...s})=>t.jsx("th",{...s,children:a}),qe=({children:a,...s})=>t.jsx("thead",{...s,children:a}),Xe=({children:a,...s})=>t.jsx("tr",{...s,children:a}),se=({items:a,selected:s,title:l,onChange:o,isDisabled:f})=>{const[b,h]=O.useState(!1),C=()=>{h(g=>!g)},m=g=>{h(!1),o(g)},w=g=>{const _=g.id===s;return t.jsx("li",{onClick:()=>m(g),className:_?"active":"",children:t.jsx("a",{href:"#",children:g.title})},g.id)},y=b?"dropdown open":"dropdown";return t.jsxs("div",{className:y,style:{display:"inline-block"},children:[t.jsx("button",{type:"button",disabled:f,className:"btn btn-default dropdown-toggle",onClick:C,children:t.jsxs("div",{className:"flex items-center",children:[l&&t.jsx("div",{className:"mr-2",children:l}),t.jsx("span",{className:"caret"})]})}),b&&t.jsx("ul",{className:"dropdown-menu",children:a.map(w)})]})},ie=({currentPage:a,total:s,onPageChange:l,pageSize:o})=>{const f=Math.ceil(s/o),b=()=>{a>1&&l(a-1)},h=()=>{a<f&&l(a+1)};return t.jsxs("div",{children:[t.jsx("span",{children:t.jsxs("span",{className:"pagination-pf-items-current",children:[a," - ",f]})}),t.jsxs("div",{className:"btn-group ml-2",children:[t.jsx("button",{type:"button",className:`btn btn-default ${a===1?"disabled":""}`,disabled:a===1,onClick:b,children:t.jsx("i",{className:"fa fa-angle-left"})}),t.jsx("button",{type:"button",className:`btn btn-default ${a===f?"disabled":""}`,disabled:a===f,onClick:h,children:t.jsx("i",{className:"fa fa-angle-right"})})]})]})},oe=[{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}],le=({onChange:a,value:s,onRefresh:l})=>{var b;const o=h=>{a(h.data)},f=(b=oe.find(h=>h.data===s))==null?void 0:b.id;return t.jsxs("div",{className:"flex",children:[t.jsx(V,{type:"default",onClick:l,children:t.jsx("i",{className:"fa fa-refresh"})}),t.jsx(se,{onChange:o,items:oe,selected:f})]})},Ze=({interval:a,page:s,total:l,onRefresh:o,onChangeInterval:f,onPageChange:b,pageSize:h})=>t.jsxs("div",{className:"flex justify-between bg-[#f5f5f5] border border-[#d1d1d1]",children:[t.jsx("div",{className:"m-[5px]",children:t.jsx(le,{value:a,onChange:f,onRefresh:o})}),t.jsx("div",{className:"m-[5px]",children:t.jsx(ie,{pageSize:h,currentPage:s,total:l,onPageChange:b})})]}),Qe=({id:a,label:s,isChecked:l=!1,onChange:o,className:f="checkbox"})=>t.jsx("div",{className:f,children:t.jsxs("label",{htmlFor:a,children:[t.jsx("input",{type:"checkbox",id:a,checked:l,onChange:o}),` ${s}`]})}),Ke=({placeholder:a="",rows:s=3,maxLength:l,value:o,onChange:f,isDisabled:b=!1,className:h=""})=>{const[C,m]=O.useState(o||""),w=o!==void 0?o:C,y=g=>{const _=g.target.value;f?f(_):m(_)};return t.jsx("textarea",{className:h,placeholder:a,rows:s,maxLength:l,value:w,onChange:y,disabled:b})},er=({variant:a,title:s,className:l})=>{const o=`alert alert-${a} ${l||""}`;return["success","info","warning","danger"].includes(a)||(console.warn(`Unsupported alert variant: "${a}". Defaulting to "info".`),a="info"),t.jsx("div",{className:o.trim(),role:"alert",children:s})};function rr(a,s){O.useEffect(()=>{if(!a)return;const l=setInterval(()=>{s()},a);return()=>clearInterval(l)},[a])}const tr=({children:a})=>t.jsx("div",{className:"btn-group",children:a}),nr=()=>t.jsxs("div",{children:[t.jsx(ae,{items:[{title:"Дополнения",active:!0},{title:"Название плагина",href:"#Название плагина"}]}),t.jsxs(tr,{children:[t.jsx(V,{children:"Hello"}),t.jsx(V,{children:"Hello"})]})]});v.Alert=er,v.Breadcrumb=ae,v.Button=V,v.Checkbox=Qe,v.Dropdown=se,v.HelpText=Ue,v.Input=Be,v.Modal=Le,v.Pagination=ie,v.ReloadButton=le,v.SampleComp=nr,v.Tab=Me,v.Table=Je,v.TableToolbar=Ze,v.Tabs=Ve,v.Tbody=He,v.Td=ze,v.TextArea=Ke,v.Th=Ge,v.Thead=qe,v.ToolbarContainer=We,v.Tr=Xe,v.useIntervalLoader=rr,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|