xtreme-ui 0.0.1 → 0.0.4
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/base/Button/Button.d.ts +3 -32
- package/dist/components/base/Button/Button.d.ts.map +1 -1
- package/dist/components/base/Button/types.d.ts +32 -0
- package/dist/components/base/Button/types.d.ts.map +1 -0
- package/dist/components/base/Icon/Icon.d.ts +3 -12
- package/dist/components/base/Icon/Icon.d.ts.map +1 -1
- package/dist/components/base/Icon/types.d.ts +12 -0
- package/dist/components/base/Icon/types.d.ts.map +1 -0
- package/dist/components/base/ProgressBar/ProgressBar.d.ts +3 -6
- package/dist/components/base/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/base/ProgressBar/types.d.ts +6 -0
- package/dist/components/base/ProgressBar/types.d.ts.map +1 -0
- package/dist/components/base/Textfield/Textfield.d.ts +3 -22
- package/dist/components/base/Textfield/Textfield.d.ts.map +1 -1
- package/dist/components/base/Textfield/types.d.ts +21 -1
- package/dist/components/base/Textfield/types.d.ts.map +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layout/Navigation/Navigation.d.ts +3 -7
- package/dist/components/layout/Navigation/Navigation.d.ts.map +1 -1
- package/dist/components/layout/Navigation/types.d.ts +5 -0
- package/dist/components/layout/Navigation/types.d.ts.map +1 -1
- package/dist/components/layout/Sider/Sider.d.ts +3 -18
- package/dist/components/layout/Sider/Sider.d.ts.map +1 -1
- package/dist/components/layout/Sider/types.d.ts +18 -0
- package/dist/components/layout/Sider/types.d.ts.map +1 -0
- package/dist/index.es.js +603 -603
- package/dist/index.umd.js +10 -10
- package/dist/style.css +1 -1
- package/dist/utils/function/mergeRefs.d.ts +3 -0
- package/dist/utils/function/mergeRefs.d.ts.map +1 -0
- package/package.json +3 -4
- package/dist/components/base/Button/Button.stories.d.ts +0 -57
- package/dist/components/base/Button/Button.stories.d.ts.map +0 -1
- package/dist/components/base/Icon/Icon.stories.d.ts +0 -38
- package/dist/components/base/Icon/Icon.stories.d.ts.map +0 -1
- package/dist/components/base/ProgressBar/ProgressBar.stories.d.ts +0 -33
- package/dist/components/base/ProgressBar/ProgressBar.stories.d.ts.map +0 -1
- package/dist/components/base/Textfield/Textfield.stories.d.ts +0 -37
- package/dist/components/base/Textfield/Textfield.stories.d.ts.map +0 -1
- package/dist/components/layout/Navigation/Navigation.stories.d.ts +0 -16
- package/dist/components/layout/Navigation/Navigation.stories.d.ts.map +0 -1
- package/dist/components/layout/Navigation/Routes.d.ts +0 -3
- package/dist/components/layout/Navigation/Routes.d.ts.map +0 -1
- package/dist/components/layout/Sider/Sider.stories.d.ts +0 -41
- package/dist/components/layout/Sider/Sider.stories.d.ts.map +0 -1
- package/dist/utils/helper/fontHelper.d.ts +0 -1
- package/dist/utils/helper/fontHelper.d.ts.map +0 -1
- package/dist/vite.svg +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(h,
|
|
1
|
+
(function(h,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(h=typeof globalThis<"u"?globalThis:h||self,w(h.XtremeUI={},h.require$$0))})(this,function(h,w){"use strict";const nn="",re=typeof window<"u",L=re?window:void 0,te=(r,n)=>re?getComputedStyle((n==null?void 0:n.current)||document.documentElement).getPropertyValue(r):"",yr=(r,n)=>parseInt(te(r,n).replace(/px/g,"")),gr=(r,n)=>{const a=parseInt(te(r,n).replace(/vh/g,""));return[((L==null?void 0:L.innerHeight)??0)*a/100,a]},mr=(r,n)=>{const a=parseInt(te(r,n).replace(/vw/g,""));return[((L==null?void 0:L.innerWidth)??0)*a/100,a]},_r=(r,n,a)=>re?((a==null?void 0:a.current)||document.documentElement).style.setProperty(r,n):"",br=r=>new Promise(n=>{let a=document.querySelector(r);if(a)return n(a);const o=new MutationObserver(()=>{a=document.querySelector(r),a&&(n(a),o.disconnect())});o.observe(document.body,{childList:!0,subtree:!0})}),hr=(r,n)=>{var a;(a=n==null?void 0:n.forEach)==null||a.call(n,o=>{let l;new MutationObserver(p=>{var c;document.querySelector(o)&&(l=document.querySelector(o)),(c=p==null?void 0:p.forEach)==null||c.call(p,g=>{g.type==="childList"&&(Array.from(g.addedNodes).indexOf(l)>-1&&r(l,"added",g),Array.from(g.removedNodes).indexOf(l)>-1&&r(l,"removed",g))})}).observe(document.body,{childList:!0,subtree:!0})})};var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ue={exports:{}},J={};/**
|
|
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 Oe;function Sr(){if(Oe)return J;Oe=1;var r=w,n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function p(d,c,g){var _,b={},O=null,P=null;g!==void 0&&(O=""+g),c.key!==void 0&&(O=""+c.key),c.ref!==void 0&&(P=c.ref);for(_ in c)o.call(c,_)&&!m.hasOwnProperty(_)&&(b[_]=c[_]);if(d&&d.defaultProps)for(_ in c=d.defaultProps,c)b[_]===void 0&&(b[_]=c[_]);return{$$typeof:n,type:d,key:O,ref:P,props:b,_owner:l.current}}return J.Fragment=a,J.jsx=p,J.jsxs=p,J}var X={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
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
|
-
`),j=
|
|
21
|
-
`+
|
|
17
|
+
*/var xe;function Rr(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&function(){var r=w,n=Symbol.for("react.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),d=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),Y=Symbol.iterator,V="@@iterator";function U(e){if(e===null||typeof e!="object")return null;var t=Y&&e[Y]||e[V];return typeof t=="function"?t:null}var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(e){{for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];ge("error",e,i)}}function ge(e,t,i){{var s=x.ReactDebugCurrentFrame,v=s.getStackAddendum();v!==""&&(t+="%s",i=i.concat([v]));var y=i.map(function(f){return String(f)});y.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,y)}}var me=!1,K=!1,R=!1,D=!1,z=!1,Z;Z=Symbol.for("react.module.reference");function Pt(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===m||z||e===l||e===g||e===_||D||e===P||me||K||R||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===b||e.$$typeof===p||e.$$typeof===d||e.$$typeof===c||e.$$typeof===Z||e.getModuleId!==void 0))}function kt(e,t,i){var s=e.displayName;if(s)return s;var v=t.displayName||t.name||"";return v!==""?i+"("+v+")":i}function Be(e){return e.displayName||"Context"}function $(e){if(e==null)return null;if(typeof e.tag=="number"&&S("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 a:return"Portal";case m:return"Profiler";case l:return"StrictMode";case g:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var t=e;return Be(t)+".Consumer";case p:var i=e;return Be(i._context)+".Provider";case c:return kt(e,e.render,"ForwardRef");case b:var s=e.displayName||null;return s!==null?s:$(e.type)||"Memo";case O:{var v=e,y=v._payload,f=v._init;try{return $(f(y))}catch{return null}}}return null}var q=Object.assign,Q=0,Ge,Je,Xe,He,Ke,Ze,Qe;function er(){}er.__reactDisabledLog=!0;function Nt(){{if(Q===0){Ge=console.log,Je=console.info,Xe=console.warn,He=console.error,Ke=console.group,Ze=console.groupCollapsed,Qe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:er,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Q++}}function Dt(){{if(Q--,Q===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},e,{value:Ge}),info:q({},e,{value:Je}),warn:q({},e,{value:Xe}),error:q({},e,{value:He}),group:q({},e,{value:Ke}),groupCollapsed:q({},e,{value:Ze}),groupEnd:q({},e,{value:Qe})})}Q<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var _e=x.ReactCurrentDispatcher,be;function ae(e,t,i){{if(be===void 0)try{throw Error()}catch(v){var s=v.stack.trim().match(/\n( *(at )?)/);be=s&&s[1]||""}return`
|
|
18
|
+
`+be+e}}var he=!1,oe;{var $t=typeof WeakMap=="function"?WeakMap:Map;oe=new $t}function rr(e,t){if(!e||he)return"";{var i=oe.get(e);if(i!==void 0)return i}var s;he=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=_e.current,_e.current=null,Nt();try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(I){s=I}Reflect.construct(e,[],f)}else{try{f.call()}catch(I){s=I}e.call(f.prototype)}}else{try{throw Error()}catch(I){s=I}e()}}catch(I){if(I&&s&&typeof I.stack=="string"){for(var u=I.stack.split(`
|
|
19
|
+
`),C=s.stack.split(`
|
|
20
|
+
`),j=u.length-1,E=C.length-1;j>=1&&E>=0&&u[j]!==C[E];)E--;for(;j>=1&&E>=0;j--,E--)if(u[j]!==C[E]){if(j!==1||E!==1)do if(j--,E--,E<0||u[j]!==C[E]){var k=`
|
|
21
|
+
`+u[j].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),typeof e=="function"&&oe.set(e,k),k}while(j>=1&&E>=0);break}}}finally{he=!1,_e.current=y,Dt(),Error.prepareStackTrace=v}var G=e?e.displayName||e.name:"",pr=G?ae(G):"";return typeof e=="function"&&oe.set(e,pr),pr}function It(e,t,i){return rr(e,!1)}function Ft(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function se(e,t,i){if(e==null)return"";if(typeof e=="function")return rr(e,Ft(e));if(typeof e=="string")return ae(e);switch(e){case g:return ae("Suspense");case _:return ae("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return It(e.render);case b:return se(e.type,t,i);case O:{var s=e,v=s._payload,y=s._init;try{return se(y(v),t,i)}catch{}}}return""}var le=Object.prototype.hasOwnProperty,tr={},nr=x.ReactDebugCurrentFrame;function ce(e){if(e){var t=e._owner,i=se(e.type,e._source,t?t.type:null);nr.setExtraStackFrame(i)}else nr.setExtraStackFrame(null)}function At(e,t,i,s,v){{var y=Function.call.bind(le);for(var f in e)if(y(e,f)){var u=void 0;try{if(typeof e[f]!="function"){var C=Error((s||"React class")+": "+i+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}u=e[f](t,f,s,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(j){u=j}u&&!(u instanceof Error)&&(ce(v),S("%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).",s||"React class",i,f,typeof u),ce(null)),u instanceof Error&&!(u.message in tr)&&(tr[u.message]=!0,ce(v),S("Failed %s type: %s",i,u.message),ce(null))}}}var Lt=Array.isArray;function Te(e){return Lt(e)}function Wt(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,i=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function Mt(e){try{return ir(e),!1}catch{return!0}}function ir(e){return""+e}function ar(e){if(Mt(e))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Wt(e)),ir(e)}var ee=x.ReactCurrentOwner,zt={key:!0,ref:!0,__self:!0,__source:!0},or,sr,Se;Se={};function qt(e){if(le.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Yt(e){if(le.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function Vt(e,t){if(typeof e.ref=="string"&&ee.current&&t&&ee.current.stateNode!==t){var i=$(ee.current.type);Se[i]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',$(ee.current.type),e.ref),Se[i]=!0)}}function Ut(e,t){{var i=function(){or||(or=!0,S("%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)",t))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function Bt(e,t){{var i=function(){sr||(sr=!0,S("%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)",t))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var Gt=function(e,t,i,s,v,y,f){var u={$$typeof:n,type:e,key:t,ref:i,props:f,_owner:y};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function Jt(e,t,i,s,v){{var y,f={},u=null,C=null;i!==void 0&&(ar(i),u=""+i),Yt(t)&&(ar(t.key),u=""+t.key),qt(t)&&(C=t.ref,Vt(t,v));for(y in t)le.call(t,y)&&!zt.hasOwnProperty(y)&&(f[y]=t[y]);if(e&&e.defaultProps){var j=e.defaultProps;for(y in j)f[y]===void 0&&(f[y]=j[y])}if(u||C){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&Ut(f,E),C&&Bt(f,E)}return Gt(e,u,C,v,s,ee.current,f)}}var Re=x.ReactCurrentOwner,lr=x.ReactDebugCurrentFrame;function B(e){if(e){var t=e._owner,i=se(e.type,e._source,t?t.type:null);lr.setExtraStackFrame(i)}else lr.setExtraStackFrame(null)}var je;je=!1;function Ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function cr(){{if(Re.current){var e=$(Re.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 Xt(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),i=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+t+":"+i+"."}return""}}var
|
|
25
|
+
Check your code at `+t+":"+i+"."}return""}}var ur={};function Ht(e){{var t=cr();if(!t){var i=typeof e=="string"?e:e.displayName||e.name;i&&(t=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+i+">.")}return t}}function ar(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=Jt(t);if(ir[i])return;ir[i]=!0;var s="";e&&e._owner&&e._owner!==Te.current&&(s=" It was passed a child from "+I(e._owner.type)+"."),V(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,s),V(null)}}function or(e,t){{if(typeof e!="object")return;if(be(e))for(var i=0;i<e.length;i++){var s=e[i];je(s)&&ar(s,t)}else if(je(e))e._store&&(e._store.validated=!0);else if(e){var v=N(e);if(typeof v=="function"&&v!==e.entries)for(var p=v.call(e),u;!(u=p.next()).done;)je(u.value)&&ar(u.value,t)}}}function Xt(e){{var t=e.type;if(t==null||typeof t=="string")return;var i;if(typeof t=="function")i=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===d||t.$$typeof===y))i=t.propTypes;else return;if(i){var s=I(t);Dt(i,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!Se){Se=!0;var v=I(t);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ht(e){{for(var t=Object.keys(e.props),i=0;i<t.length;i++){var s=t[i];if(s!=="children"&&s!=="key"){V(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),V(null);break}}e.ref!==null&&(V(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}function sr(e,t,i,s,v,p){{var u=Ct(e);if(!u){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" 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 x=Gt(v);x?l+=x:l+=nr();var j;e===null?j="null":be(e)?j="array":e!==void 0&&e.$$typeof===n?(j="<"+(I(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):j=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",j,l)}var E=Ut(e,t,i,v,p);if(E==null)return E;if(u){var w=t.children;if(w!==void 0)if(s)if(be(w)){for(var U=0;U<w.length;U++)or(w[U],e);Object.freeze&&Object.freeze(w)}else R("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 or(w,e)}return e===o?Ht(E):Xt(E),E}}function Kt(e,t,i){return sr(e,t,i,!0)}function Zt(e,t,i){return sr(e,t,i,!1)}var Qt=Zt,en=Kt;J.Fragment=o,J.jsx=Qt,J.jsxs=en}()),J}process.env.NODE_ENV==="production"?ce.exports=_r():ce.exports=mr();var T=ce.exports;function Oe(r){var n,a,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r))for(n=0;n<r.length;n++)r[n]&&(a=Oe(r[n]))&&(o&&(o+=" "),o+=a);else for(n in r)r[n]&&(o&&(o+=" "),o+=n);return o}function A(){for(var r,n,a=0,o="";a<arguments.length;)(r=arguments[a++])&&(n=Oe(r))&&(o&&(o+=" "),o+=n);return o}function yr(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}var ue=yr,br=typeof ne=="object"&&ne&&ne.Object===Object&&ne,hr=br,Tr=hr,Sr=typeof self=="object"&&self&&self.Object===Object&&self,jr=Tr||Sr||Function("return this")(),xe=jr,Er=xe,Rr=function(){return Er.Date.now()},Or=Rr,xr=/\s/;function Cr(r){for(var n=r.length;n--&&xr.test(r.charAt(n)););return n}var wr=Cr,Pr=wr,kr=/^\s+/;function $r(r){return r&&r.slice(0,Pr(r)+1).replace(kr,"")}var Nr=$r,Ir=xe,Dr=Ir.Symbol,Ce=Dr,we=Ce,Pe=Object.prototype,Fr=Pe.hasOwnProperty,Ar=Pe.toString,X=we?we.toStringTag:void 0;function Lr(r){var n=Fr.call(r,X),a=r[X];try{r[X]=void 0;var o=!0}catch{}var c=Ar.call(r);return o&&(n?r[X]=a:delete r[X]),c}var Wr=Lr,zr=Object.prototype,qr=zr.toString;function Mr(r){return qr.call(r)}var Br=Mr,ke=Ce,Yr=Wr,Vr=Br,Ur="[object Null]",Gr="[object Undefined]",$e=ke?ke.toStringTag:void 0;function Jr(r){return r==null?r===void 0?Gr:Ur:$e&&$e in Object(r)?Yr(r):Vr(r)}var Xr=Jr;function Hr(r){return r!=null&&typeof r=="object"}var Kr=Hr,Zr=Xr,Qr=Kr,et="[object Symbol]";function rt(r){return typeof r=="symbol"||Qr(r)&&Zr(r)==et}var tt=rt,nt=Nr,Ne=ue,it=tt,Ie=0/0,at=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,st=/^0o[0-7]+$/i,lt=parseInt;function ct(r){if(typeof r=="number")return r;if(it(r))return Ie;if(Ne(r)){var n=typeof r.valueOf=="function"?r.valueOf():r;r=Ne(n)?n+"":n}if(typeof r!="string")return r===0?r:+r;r=nt(r);var a=ot.test(r);return a||st.test(r)?lt(r.slice(2),a?2:8):at.test(r)?Ie:+r}var ut=ct,ft=ue,fe=Or,De=ut,dt="Expected a function",vt=Math.max,pt=Math.min;function gt(r,n,a){var o,c,b,g,f,d,_=0,m=!1,y=!1,O=!0;if(typeof r!="function")throw new TypeError(dt);n=De(n)||0,ft(a)&&(m=!!a.leading,y="maxWait"in a,b=y?vt(De(a.maxWait)||0,n):b,O="trailing"in a?!!a.trailing:O);function k(S){var $=o,B=c;return o=c=void 0,_=S,g=r.apply(B,$),g}function M(S){return _=S,f=setTimeout(C,n),m?k(S):g}function H(S){var $=S-d,B=S-_,Z=n-$;return y?pt(Z,b-B):Z}function N(S){var $=S-d,B=S-_;return d===void 0||$>=n||$<0||y&&B>=b}function C(){var S=fe();if(N(S))return R(S);f=setTimeout(C,H(S))}function R(S){return f=void 0,O&&o?k(S):(o=c=void 0,g)}function pe(){f!==void 0&&clearTimeout(f),_=0,o=d=c=f=void 0}function ge(){return f===void 0?g:R(fe())}function K(){var S=fe(),$=N(S);if(o=arguments,c=this,d=S,$){if(f===void 0)return M(d);if(y)return clearTimeout(f),f=setTimeout(C,n),k(d)}return f===void 0&&(f=setTimeout(C,n)),g}return K.cancel=pe,K.flush=ge,K}var _t=gt,mt=_t,yt=ue,bt="Expected a function";function ht(r,n,a){var o=!0,c=!0;if(typeof r!="function")throw new TypeError(bt);return yt(a)&&(o="leading"in a?!!a.leading:o,c="trailing"in a?!!a.trailing:c),mt(r,n,{leading:o,maxWait:n,trailing:c})}var Tt=ht;const St=gr(Tt),Fe={icon:"_icon_99rko_2",filled:"_filled_99rko_7"},de=r=>{const{className:n,name:a,size:o,filled:c}=r,b=A(Fe.icon,n,c&&Fe.filled);return T.jsx("span",{className:b,style:{fontSize:`${o}px`},children:a})},jt={mini:16,default:24,large:32},ve={progressBar:"_progressBar_luf46_1",progress:"_progress_luf46_1",intermediate:"_intermediate_luf46_31",barberPole:"_barberPole_luf46_1"},Ae=r=>{const{className:n,progress:a=100,intermediate:o=!1}=r,c=o?150:Math.min(Math.max(a,0),100),b=A(ve.progressBar,o&&ve.intermediate,n);return T.jsx("div",{className:b,children:T.jsx("span",{className:ve.progress,style:{width:`${c}%`}})})},P={button:"_button_1qj4y_1",label:"_label_1qj4y_17",icon:"_icon_1qj4y_23",filled:"_filled_1qj4y_28",underline:"_underline_1qj4y_31",primaryType:"_primaryType_1qj4y_54",primaryDangerType:"_primaryDangerType_1qj4y_54",secondaryType:"_secondaryType_1qj4y_59",secondaryDangerType:"_secondaryDangerType_1qj4y_59",linkType:"_linkType_1qj4y_64",linkDangerType:"_linkDangerType_1qj4y_64",miniSize:"_miniSize_1qj4y_93",iconOnly:"_iconOnly_1qj4y_107",defaultSize:"_defaultSize_1qj4y_114",largeSize:"_largeSize_1qj4y_135",clicked:"_clicked_1qj4y_171",ripple:"_ripple_1qj4y_1",loading:"_loading_1qj4y_180",barberPole:"_barberPole_1qj4y_1",spin:"_spin_1qj4y_1"},Le=100;let We;const Et=r=>{const{className:n,label:a,type:o="primary",size:c="default",disabled:b=!1,loading:g=!1,iconName:f,iconFilled:d=!1,iconPosition:_="left",onClick:m}=r,y=F.useRef(null),O=St(()=>{var N;clearTimeout(We),(N=y.current)==null||N.classList.add(P.clicked),We=window.setTimeout(()=>{var C;(C=y.current)==null||C.classList.remove(P.clicked)},600+Le)},Le),k=N=>{m==null||m(N),o.includes("link")||O()},M=()=>f?T.jsx(de,{className:A(P.icon,d&&P.filled),name:f,size:jt[c]}):null,H=A(P.button,P[`${o}Type`],P[`${c}Size`],!a&&P.iconOnly,g&&P.loading,n);return!a&&!f?null:T.jsxs("button",{className:H,ref:y,onClick:k,disabled:b,children:[o.includes("link")&&T.jsx(Ae,{className:P.underline,intermediate:g}),_==="left"&&T.jsx(M,{}),a&&T.jsx("span",{className:P.label,children:a}),_==="right"&&T.jsx(M,{})]})},z={textfield:"_textfield_p93uo_1",icon:"_icon_p93uo_28",filled:"_filled_p93uo_38",input:"_input_p93uo_41",textarea:"_textarea_p93uo_55",withIcon:"_withIcon_p93uo_60"},Rt=r=>{const{className:n,type:a="text",textarea:o,placeholder:c,autoComplete:b="off",autoFocus:g,iconName:f,iconFilled:d=!1,value:_,onChange:m}=r,y=F.useMemo(()=>{if(o===!0)return null;if(f)return f;if(a==="number")return"numbers";if(a==="search")return"search";if(a==="password")return"shield"},[o,f,a]),O=A(z.textfield,y&&z.withIcon,o&&z.textarea,n);return T.jsxs("div",{className:O,children:[!!y&&!o&&T.jsx(de,{className:A(z.icon,d&&z.filled),name:y,size:20,filled:d}),o?T.jsx("textarea",{className:z.input,autoFocus:g,placeholder:c,autoComplete:b,value:_,onChange:m}):T.jsx("input",{className:z.input,type:a,autoFocus:g,placeholder:c,autoComplete:b,value:_,onChange:m})]})},L={sider:"_sider_9guyz_1",leftSiderContainer:"_leftSiderContainer_9guyz_13",rightSiderContainer:"_rightSiderContainer_9guyz_20",content:"_content_9guyz_27",miniLeftSider:"_miniLeftSider_9guyz_37",miniRightSider:"_miniRightSider_9guyz_44",leftOpen:"_leftOpen_9guyz_51",rightOpen:"_rightOpen_9guyz_57"},Ot=r=>{const{className:n,children:a,leftSider:o,showMiniLeftSider:c=!0,rightSider:b,showMiniRightSider:g=!1,open:f="closed",setOpen:d}=r,_=A(L.sider,f==="left"&&L.leftOpen,c&&L.miniLeftSider,f==="right"&&L.rightOpen,g&&L.miniRightSider,n);return T.jsxs("section",{className:_,role:"sider",children:[T.jsx("div",{className:L.leftSiderContainer,children:o}),T.jsx("div",{className:L.rightSiderContainer,children:b}),T.jsx("div",{className:L.content,children:a})]})},q={navigation:"_navigation_1mgj4_1",brand:"_brand_1mgj4_9",routeList:"_routeList_1mgj4_18",route:"_route_1mgj4_18",icon:"_icon_1mgj4_59",label:"_label_1mgj4_71",active:"_active_1mgj4_83"},xt=r=>{const{className:n,Routes:a}=r,o=A(q.navigation,n);return T.jsxs("section",{className:o,role:"navigation",children:[T.jsx("div",{className:q.brand,children:"🎲 XtremeUI"}),T.jsx("div",{className:q.routeList,children:!!a&&T.jsx(a,{className:q.route,activeClassName:q.active,iconClassName:q.icon,labelClassName:q.label})})]})};h.Button=Et,h.Icon=de,h.Navigation=xt,h.ProgressBar=Ae,h.Sider=Ot,h.Textfield=Rt,h.dom=W,h.elementObserver=pr,h.getCssProperty=te,h.getCssPropertyPx=cr,h.getCssPropertyVh=ur,h.getCssPropertyVw=fr,h.isClient=re,h.setCssProperty=dr,h.waitForElement=vr,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
Check the top-level render call using <`+i+">.")}return t}}function fr(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=Ht(t);if(ur[i])return;ur[i]=!0;var s="";e&&e._owner&&e._owner!==Re.current&&(s=" It was passed a child from "+$(e._owner.type)+"."),B(e),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,s),B(null)}}function dr(e,t){{if(typeof e!="object")return;if(Te(e))for(var i=0;i<e.length;i++){var s=e[i];Ee(s)&&fr(s,t)}else if(Ee(e))e._store&&(e._store.validated=!0);else if(e){var v=U(e);if(typeof v=="function"&&v!==e.entries)for(var y=v.call(e),f;!(f=y.next()).done;)Ee(f.value)&&fr(f.value,t)}}}function Kt(e){{var t=e.type;if(t==null||typeof t=="string")return;var i;if(typeof t=="function")i=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===c||t.$$typeof===b))i=t.propTypes;else return;if(i){var s=$(t);At(i,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!je){je=!0;var v=$(t);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Zt(e){{for(var t=Object.keys(e.props),i=0;i<t.length;i++){var s=t[i];if(s!=="children"&&s!=="key"){B(e),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),B(null);break}}e.ref!==null&&(B(e),S("Invalid attribute `ref` supplied to `React.Fragment`."),B(null))}}function vr(e,t,i,s,v,y){{var f=Pt(e);if(!f){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" 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 C=Xt(v);C?u+=C:u+=cr();var j;e===null?j="null":Te(e)?j="array":e!==void 0&&e.$$typeof===n?(j="<"+($(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,u)}var E=Jt(e,t,i,v,y);if(E==null)return E;if(f){var k=t.children;if(k!==void 0)if(s)if(Te(k)){for(var G=0;G<k.length;G++)dr(k[G],e);Object.freeze&&Object.freeze(k)}else S("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 dr(k,e)}return e===o?Zt(E):Kt(E),E}}function Qt(e,t,i){return vr(e,t,i,!0)}function en(e,t,i){return vr(e,t,i,!1)}var rn=en,tn=Qt;X.Fragment=o,X.jsx=rn,X.jsxs=tn}()),X}process.env.NODE_ENV==="production"?ue.exports=Sr():ue.exports=Rr();var T=ue.exports;function Ce(r){var n,a,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r))for(n=0;n<r.length;n++)r[n]&&(a=Ce(r[n]))&&(o&&(o+=" "),o+=a);else for(n in r)r[n]&&(o&&(o+=" "),o+=n);return o}function F(){for(var r,n,a=0,o="";a<arguments.length;)(r=arguments[a++])&&(n=Ce(r))&&(o&&(o+=" "),o+=n);return o}function jr(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}var fe=jr,Er=typeof ne=="object"&&ne&&ne.Object===Object&&ne,Or=Er,xr=Or,Cr=typeof self=="object"&&self&&self.Object===Object&&self,wr=xr||Cr||Function("return this")(),we=wr,Pr=we,kr=function(){return Pr.Date.now()},Nr=kr,Dr=/\s/;function $r(r){for(var n=r.length;n--&&Dr.test(r.charAt(n)););return n}var Ir=$r,Fr=Ir,Ar=/^\s+/;function Lr(r){return r&&r.slice(0,Fr(r)+1).replace(Ar,"")}var Wr=Lr,Mr=we,zr=Mr.Symbol,Pe=zr,ke=Pe,Ne=Object.prototype,qr=Ne.hasOwnProperty,Yr=Ne.toString,H=ke?ke.toStringTag:void 0;function Vr(r){var n=qr.call(r,H),a=r[H];try{r[H]=void 0;var o=!0}catch{}var l=Yr.call(r);return o&&(n?r[H]=a:delete r[H]),l}var Ur=Vr,Br=Object.prototype,Gr=Br.toString;function Jr(r){return Gr.call(r)}var Xr=Jr,De=Pe,Hr=Ur,Kr=Xr,Zr="[object Null]",Qr="[object Undefined]",$e=De?De.toStringTag:void 0;function et(r){return r==null?r===void 0?Qr:Zr:$e&&$e in Object(r)?Hr(r):Kr(r)}var rt=et;function tt(r){return r!=null&&typeof r=="object"}var nt=tt,it=rt,at=nt,ot="[object Symbol]";function st(r){return typeof r=="symbol"||at(r)&&it(r)==ot}var lt=st,ct=Wr,Ie=fe,ut=lt,Fe=0/0,ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,vt=/^0o[0-7]+$/i,pt=parseInt;function yt(r){if(typeof r=="number")return r;if(ut(r))return Fe;if(Ie(r)){var n=typeof r.valueOf=="function"?r.valueOf():r;r=Ie(n)?n+"":n}if(typeof r!="string")return r===0?r:+r;r=ct(r);var a=dt.test(r);return a||vt.test(r)?pt(r.slice(2),a?2:8):ft.test(r)?Fe:+r}var gt=yt,mt=fe,de=Nr,Ae=gt,_t="Expected a function",bt=Math.max,ht=Math.min;function Tt(r,n,a){var o,l,m,p,d,c,g=0,_=!1,b=!1,O=!0;if(typeof r!="function")throw new TypeError(_t);n=Ae(n)||0,mt(a)&&(_=!!a.leading,b="maxWait"in a,m=b?bt(Ae(a.maxWait)||0,n):m,O="trailing"in a?!!a.trailing:O);function P(R){var D=o,z=l;return o=l=void 0,g=R,p=r.apply(z,D),p}function Y(R){return g=R,d=setTimeout(x,n),_?P(R):p}function V(R){var D=R-c,z=R-g,Z=n-D;return b?ht(Z,m-z):Z}function U(R){var D=R-c,z=R-g;return c===void 0||D>=n||D<0||b&&z>=m}function x(){var R=de();if(U(R))return S(R);d=setTimeout(x,V(R))}function S(R){return d=void 0,O&&o?P(R):(o=l=void 0,p)}function ge(){d!==void 0&&clearTimeout(d),g=0,o=c=l=d=void 0}function me(){return d===void 0?p:S(de())}function K(){var R=de(),D=U(R);if(o=arguments,l=this,c=R,D){if(d===void 0)return Y(c);if(b)return clearTimeout(d),d=setTimeout(x,n),P(c)}return d===void 0&&(d=setTimeout(x,n)),p}return K.cancel=ge,K.flush=me,K}var St=Tt,Rt=St,jt=fe,Et="Expected a function";function Ot(r,n,a){var o=!0,l=!0;if(typeof r!="function")throw new TypeError(Et);return jt(a)&&(o="leading"in a?!!a.leading:o,l="trailing"in a?!!a.trailing:l),Rt(r,n,{leading:o,maxWait:n,trailing:l})}var xt=Ot;const Ct=Tr(xt),wt=r=>n=>{r.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})},Le={icon:"_icon_1r2n7_2",filled:"_filled_1r2n7_18"};var We=(r=>(r[r.mini=16]="mini",r[r.default=24]="default",r[r.large=32]="large",r))(We||{});const ie=w.forwardRef((r,n)=>{const{className:a,name:o,size:l,filled:m}=r,p=l?`${typeof l=="number"?l:We[l]}px`:void 0,d=F(Le.icon,a,m&&Le.filled);return T.jsx("span",{className:d,ref:n,style:{fontSize:p},children:o})});ie.displayName="Icon";const ve={progressBar:"_progressBar_luf46_1",progress:"_progress_luf46_1",intermediate:"_intermediate_luf46_31",barberPole:"_barberPole_luf46_1"},pe=w.forwardRef((r,n)=>{const{className:a,progress:o=100,intermediate:l=!1}=r,m=l?150:Math.min(Math.max(o,0),100),p=F(ve.progressBar,l&&ve.intermediate,a);return T.jsx("div",{className:p,ref:n,children:T.jsx("span",{className:ve.progress,style:{width:`${m}%`}})})});pe.displayName="ProgressBar";const N={button:"_button_1qj4y_1",label:"_label_1qj4y_17",icon:"_icon_1qj4y_23",filled:"_filled_1qj4y_28",underline:"_underline_1qj4y_31",primaryType:"_primaryType_1qj4y_54",primaryDangerType:"_primaryDangerType_1qj4y_54",secondaryType:"_secondaryType_1qj4y_59",secondaryDangerType:"_secondaryDangerType_1qj4y_59",linkType:"_linkType_1qj4y_64",linkDangerType:"_linkDangerType_1qj4y_64",miniSize:"_miniSize_1qj4y_93",iconOnly:"_iconOnly_1qj4y_107",defaultSize:"_defaultSize_1qj4y_114",largeSize:"_largeSize_1qj4y_135",clicked:"_clicked_1qj4y_171",ripple:"_ripple_1qj4y_1",loading:"_loading_1qj4y_180",barberPole:"_barberPole_1qj4y_1",spin:"_spin_1qj4y_1"};var ye=(r=>(r.primary="primary",r.primaryDanger="primaryDanger",r.secondary="secondary",r.secondaryDanger="secondaryDanger",r.link="link",r.linkDanger="linkDanger",r))(ye||{});const Me=100;let ze;const qe=w.forwardRef((r,n)=>{const{className:a,label:o,type:l="primary",size:m="default",disabled:p=!1,loading:d=!1,iconName:c,iconFilled:g=!1,iconPosition:_="left",onClick:b}=r,O=w.useRef(null),P=Ct(()=>{var x;clearTimeout(ze),(x=O.current)==null||x.classList.add(N.clicked),ze=window.setTimeout(()=>{var S;(S=O.current)==null||S.classList.remove(N.clicked)},600+Me)},Me),Y=x=>{b==null||b(x),l.includes(ye.link)||P()},V=()=>c?T.jsx(ie,{className:F(N.icon,g&&N.filled),name:c,size:m}):null,U=F(N.button,N[`${l}Type`],N[`${m}Size`],!o&&N.iconOnly,d&&N.loading,a);return!o&&!c?null:T.jsxs("button",{className:U,ref:wt([O,n]),onClick:Y,disabled:p,children:[l.includes(ye.link)&&T.jsx(pe,{className:N.underline,intermediate:d}),_==="left"&&T.jsx(V,{}),o&&T.jsx("span",{className:N.label,children:o}),_==="right"&&T.jsx(V,{})]})});qe.displayName="Button";const W={textfield:"_textfield_p93uo_1",icon:"_icon_p93uo_28",filled:"_filled_p93uo_38",input:"_input_p93uo_41",textarea:"_textarea_p93uo_55",withIcon:"_withIcon_p93uo_60"},Ye=w.forwardRef((r,n)=>{const{className:a,type:o="text",textarea:l,placeholder:m,autoComplete:p="off",autoFocus:d,iconName:c,iconFilled:g=!1,value:_,onChange:b}=r,O=w.useMemo(()=>{if(l===!0)return null;if(c)return c;if(o==="number")return"numbers";if(o==="search")return"search";if(o==="password")return"shield"},[l,c,o]),P=F(W.textfield,O&&W.withIcon,l&&W.textarea,a);return T.jsxs("div",{className:P,ref:n,children:[!!O&&!l&&T.jsx(ie,{className:F(W.icon,g&&W.filled),name:O,size:20,filled:g}),l?T.jsx("textarea",{className:W.input,autoFocus:d,placeholder:m,autoComplete:p,value:_,onChange:b}):T.jsx("input",{className:W.input,type:o,autoFocus:d,placeholder:m,autoComplete:p,value:_,onChange:b})]})});Ye.displayName="Textfield";const A={sider:"_sider_9guyz_1",leftSiderContainer:"_leftSiderContainer_9guyz_13",rightSiderContainer:"_rightSiderContainer_9guyz_20",content:"_content_9guyz_27",miniLeftSider:"_miniLeftSider_9guyz_37",miniRightSider:"_miniRightSider_9guyz_44",leftOpen:"_leftOpen_9guyz_51",rightOpen:"_rightOpen_9guyz_57"},Ve=w.forwardRef((r,n)=>{const{className:a,children:o,leftSider:l,showMiniLeftSider:m=!0,rightSider:p,showMiniRightSider:d=!1,open:c="closed"}=r,g=F(A.sider,c==="left"&&A.leftOpen,m&&A.miniLeftSider,c==="right"&&A.rightOpen,d&&A.miniRightSider,a);return T.jsxs("section",{className:g,ref:n,role:"sider",children:[T.jsx("div",{className:A.leftSiderContainer,children:l}),T.jsx("div",{className:A.rightSiderContainer,children:p}),T.jsx("div",{className:A.content,children:o})]})});Ve.displayName="Sider";const M={navigation:"_navigation_3y1yg_1",brand:"_brand_3y1yg_9",routeList:"_routeList_3y1yg_18",route:"_route_3y1yg_18",icon:"_icon_3y1yg_59",label:"_label_3y1yg_71",active:"_active_3y1yg_83"},Ue=w.forwardRef((r,n)=>{const{className:a,Routes:o}=r,l=F(M.navigation,a);return T.jsxs("section",{className:l,ref:n,role:"navigation",children:[T.jsx("div",{className:M.brand,children:"🎲 XtremeUI"}),T.jsx("div",{className:M.routeList,children:!!o&&T.jsx(o,{className:M.route,activeClassName:M.active,iconClassName:M.icon,labelClassName:M.label})})]})});Ue.displayName="Navigation",h.Button=qe,h.Icon=ie,h.Navigation=Ue,h.ProgressBar=pe,h.Sider=Ve,h.Textfield=Ye,h.dom=L,h.elementObserver=hr,h.getCssProperty=te,h.getCssPropertyPx=yr,h.getCssPropertyVh=gr,h.getCssPropertyVw=mr,h.isClient=re,h.setCssProperty=_r,h.waitForElement=br,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|