ovirt-ui-toolkit 0.0.2 → 0.0.5
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/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/HelpText/HelpText.d.ts +7 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/components/Modal/Modal.d.ts +10 -0
- package/dist/components/Tab/Tab.d.ts +9 -0
- package/dist/components/Tab/Tabs.d.ts +13 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/ui/Breadcrumb.d.ts +11 -0
- package/dist/components/toolbarContainer/index.d.ts +1 -0
- package/dist/components/toolbarContainer/ui/TollbarContainer.d.ts +5 -0
- package/dist/dev.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/ovirt-ui-toolkit.css +16 -0
- package/dist/ovirt-ui-toolkit.es.js +363 -263
- package/dist/ovirt-ui-toolkit.umd.js +10 -10
- package/package.json +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(R,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],D):(R=typeof globalThis<"u"?globalThis:R||self,D(R["ovirt-ui-toolkit"]={},R.React))})(this,function(R,D){"use strict";var M={exports:{}},A={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -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
|
|
9
|
+
*/var ee;function we(){if(ee)return A;ee=1;var b=D,u=Symbol.for("react.element"),v=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,m=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function S(x,p,C){var y,T={},P=null,L=null;C!==void 0&&(P=""+C),p.key!==void 0&&(P=""+p.key),p.ref!==void 0&&(L=p.ref);for(y in p)c.call(p,y)&&!_.hasOwnProperty(y)&&(T[y]=p[y]);if(x&&x.defaultProps)for(y in p=x.defaultProps,p)T[y]===void 0&&(T[y]=p[y]);return{$$typeof:u,type:x,key:P,ref:L,props:T,_owner:m.current}}return A.Fragment=v,A.jsx=S,A.jsxs=S,A}var I={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
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
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+a[
|
|
17
|
+
*/var re;function ke(){return re||(re=1,process.env.NODE_ENV!=="production"&&function(){var b=D,u=Symbol.for("react.element"),v=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),x=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),ae=Symbol.iterator,Ye="@@iterator";function Me(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[Ye];return typeof r=="function"?r:null}var F=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Le("error",e,t)}}function Le(e,r,t){{var n=F.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var s=t.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var Ve=!1,Ue=!1,Be=!1,Je=!1,qe=!1,ie;ie=Symbol.for("react.module.reference");function Ge(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===_||qe||e===m||e===C||e===y||Je||e===L||Ve||Ue||Be||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===T||e.$$typeof===S||e.$$typeof===x||e.$$typeof===p||e.$$typeof===ie||e.getModuleId!==void 0))}function ze(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function oe(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&h("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 c:return"Fragment";case v:return"Portal";case _:return"Profiler";case m:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var r=e;return oe(r)+".Consumer";case S:var t=e;return oe(t._context)+".Provider";case p:return ze(e,e.render,"ForwardRef");case T:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case P:{var o=e,s=o._payload,i=o._init;try{return O(i(s))}catch{return null}}}return null}var w=Object.assign,W=0,se,le,ue,ce,fe,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Xe(){{if(W===0){se=console.log,le=console.info,ue=console.warn,ce=console.error,fe=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function He(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:w({},e,{value:se}),info:w({},e,{value:le}),warn:w({},e,{value:ue}),error:w({},e,{value:ce}),group:w({},e,{value:fe}),groupCollapsed:w({},e,{value:de}),groupEnd:w({},e,{value:ve})})}W<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=F.ReactCurrentDispatcher,G;function V(e,r,t){{if(G===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);G=n&&n[1]||""}return`
|
|
18
|
+
`+G+e}}var z=!1,U;{var Ze=typeof WeakMap=="function"?WeakMap:Map;U=new Ze}function be(e,r){if(!e||z)return"";{var t=U.get(e);if(t!==void 0)return t}var n;z=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=q.current,q.current=null,Xe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(E){n=E}Reflect.construct(e,[],i)}else{try{i.call()}catch(E){n=E}e.call(i.prototype)}}else{try{throw Error()}catch(E){n=E}e()}}catch(E){if(E&&n&&typeof E.stack=="string"){for(var a=E.stack.split(`
|
|
19
|
+
`),g=n.stack.split(`
|
|
20
|
+
`),f=a.length-1,d=g.length-1;f>=1&&d>=0&&a[f]!==g[d];)d--;for(;f>=1&&d>=0;f--,d--)if(a[f]!==g[d]){if(f!==1||d!==1)do if(f--,d--,d<0||a[f]!==g[d]){var j=`
|
|
21
|
+
`+a[f].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,j),j}while(f>=1&&d>=0);break}}}finally{z=!1,q.current=s,He(),Error.prepareStackTrace=o}var N=e?e.displayName||e.name:"",k=N?V(N):"";return typeof e=="function"&&U.set(e,k),k}function Qe(e,r,t){return be(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function B(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,Ke(e));if(typeof e=="string")return V(e);switch(e){case C:return V("Suspense");case y:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Qe(e.render);case T:return B(e.type,r,t);case P:{var n=e,o=n._payload,s=n._init;try{return B(s(o),r,t)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,me={},he=F.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function er(e,r,t,n,o){{var s=Function.call.bind(Y);for(var i in e)if(s(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var g=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f){a=f}a&&!(a instanceof Error)&&(J(o),h("%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).",n||"React class",t,i,typeof a),J(null)),a instanceof Error&&!(a.message in me)&&(me[a.message]=!0,J(o),h("Failed %s type: %s",t,a.message),J(null))}}}var rr=Array.isArray;function X(e){return rr(e)}function tr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function ye(e){if(nr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),ge(e)}var Ee=F.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},Re,_e;function ir(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 or(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 sr(e,r){typeof e.ref=="string"&&Ee.current}function lr(e,r){{var t=function(){Re||(Re=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ur(e,r){{var t=function(){_e||(_e=!0,h("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var cr=function(e,r,t,n,o,s,i){var a={$$typeof:u,type:e,key:r,ref:t,props:i,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function fr(e,r,t,n,o){{var s,i={},a=null,g=null;t!==void 0&&(ye(t),a=""+t),or(r)&&(ye(r.key),a=""+r.key),ir(r)&&(g=r.ref,sr(r,o));for(s in r)Y.call(r,s)&&!ar.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var f=e.defaultProps;for(s in f)i[s]===void 0&&(i[s]=f[s])}if(a||g){var d=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&lr(i,d),g&&ur(i,d)}return cr(e,a,g,o,n,Ee.current,i)}}var H=F.ReactCurrentOwner,je=F.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=B(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function Te(){{if(H.current){var e=O(H.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function dr(e){return""}var xe={};function vr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(xe[t])return;xe[t]=!0;var n="";e&&e._owner&&e._owner!==H.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),$(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),$(null)}}function Oe(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&Ce(n,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var o=Me(e);if(typeof o=="function"&&o!==e.entries)for(var s=o.call(e),i;!(i=s.next()).done;)Q(i.value)&&Ce(i.value,r)}}}function pr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===T))t=r.propTypes;else return;if(t){var n=O(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Z){Z=!0;var o=O(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function br(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){$(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),$(null);break}}e.ref!==null&&($(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}var Se={};function Pe(e,r,t,n,o,s){{var i=Ge(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=dr();g?a+=g:a+=Te();var f;e===null?f="null":X(e)?f="array":e!==void 0&&e.$$typeof===u?(f="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):f=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f,a)}var d=fr(e,r,t,o,s);if(d==null)return d;if(i){var j=r.children;if(j!==void 0)if(n)if(X(j)){for(var N=0;N<j.length;N++)Oe(j[N],e);Object.freeze&&Object.freeze(j)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Oe(j,e)}if(Y.call(r,"key")){var k=O(e),E=Object.keys(r).filter(function(Rr){return Rr!=="key"}),K=E.length>0?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}";if(!Se[k+K]){var Er=E.length>0?"{"+E.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
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} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,K,k,Er,k),Se[k+K]=!0}}return e===c?br(d):pr(d),d}}function mr(e,r,t){return Pe(e,r,t,!0)}function hr(e,r,t){return Pe(e,r,t,!1)}var gr=hr,yr=mr;I.Fragment=c,I.jsx=gr,I.jsxs=yr}()),I}var te;function De(){return te||(te=1,process.env.NODE_ENV==="production"?M.exports=we():M.exports=ke()),M.exports}var l=De();const ne=({type:b="default",title:u,size:v,label:c,onClick:m,isDisabled:_=!1,children:S,className:x=""})=>{const p=`btn-${b}`,C=v?`btn-${v}`:"",T=`${`btn ${p} ${C}`.trim()} ${x}`.trim();return l.jsx("button",{className:T,type:"button",onClick:m,disabled:_,children:l.jsxs("div",{className:"flex items-center",children:[S||c," ",u]})})},Fe=({children:b,eventKey:u,active:v})=>l.jsx("div",{className:`tab-pane ${v?"active":""}`,id:`${u}-panel`,role:"tabpanel","aria-labelledby":`${u}-tab`,children:b},u),$e=({activeKey:b,onSelect:u,children:v})=>l.jsxs("div",{className:"tabs-container",children:[l.jsx("ul",{className:"nav nav-tabs",role:"tablist",children:v.map(({props:{eventKey:c,title:m}})=>l.jsx("li",{className:b===c?"active":"",children:l.jsx("a",{href:`#${c}`,onClick:_=>{_.preventDefault(),u(c)},children:m})},c))}),l.jsx("div",{className:"tabs-container",children:l.jsx("div",{className:"tab-content pf-c-tab-content",children:v.map(({props:{eventKey:c,children:m}})=>l.jsx("div",{className:`tab-pane ${b===c?"active":""}`,id:`${c}-panel`,role:"tabpanel","aria-labelledby":`${c}-tab`,children:m},c))})})]}),Ne=({id:b,type:u,placeholder:v="",value:c,onChange:m,className:_="form-control"})=>l.jsx("input",{type:u,id:b,className:_,placeholder:v,value:c,onChange:m}),Ae=({title:b,isOpen:u,onClose:v,children:c,size:m})=>{if(!u)return null;const _=m?`modal-${m}`:"";return l.jsx("div",{className:"modal fade in",style:{display:"block"},tabIndex:-1,role:"dialog",children:l.jsx("div",{className:`modal-dialog ${_}`,role:"document",children:l.jsxs("div",{className:"modal-content",children:[l.jsxs("div",{className:"modal-header",children:[l.jsx("button",{type:"button",className:"close",onClick:v,"aria-hidden":"true",children:l.jsx("span",{className:"pficon pficon-close"})}),l.jsx("h4",{className:"modal-title",children:b})]}),l.jsx("div",{className:"modal-body",children:c})]})})})},Ie=({items:b})=>l.jsx("ol",{className:"breadcrumb",children:b.map((u,v)=>l.jsx("li",{className:u.active?"active":"",children:u.active?u.title:l.jsx("a",{href:u.href,children:u.title})},v))}),We=()=>l.jsxs("div",{children:[l.jsx(Ie,{items:[{title:"Дополнения",active:!0},{title:"Название плагина",href:"#Название плагина"}]}),l.jsx(ne,{children:"Hello"})]});R.Button=ne,R.Input=Ne,R.Modal=Ae,R.SampleComp=We,R.Tab=Fe,R.Tabs=$e,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ovirt-ui-toolkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/ovirt-ui-toolkit.umd.js",
|
|
6
6
|
"module": "./dist/ovirt-ui-toolkit.es.js",
|
|
@@ -16,12 +16,16 @@
|
|
|
16
16
|
"preview": "vite preview"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"bootstrap": "^3.4.1",
|
|
20
|
+
"jquery": "^3.7.1",
|
|
21
|
+
"patternfly": "^3.59.5",
|
|
19
22
|
"react": "^18.2.0",
|
|
20
23
|
"react-dom": "^18.2.0",
|
|
21
24
|
"vite-plugin-dts": "^4.5.3"
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@eslint/js": "^9.21.0",
|
|
28
|
+
"@types/jquery": "^3.5.32",
|
|
25
29
|
"@types/react": "^19.0.10",
|
|
26
30
|
"@types/react-dom": "^19.0.4",
|
|
27
31
|
"@vitejs/plugin-react": "^4.3.4",
|