@mi-avalon/libs 0.0.16 → 0.0.18

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/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './constants';
3
+ // export * from './hooks';
4
+ // export * from './utils';
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(d,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","antd"],_):(d=typeof globalThis<"u"?globalThis:d||self,_(d.MiAvalonLibs={},d.React,d.antd))})(this,function(d,_,S){"use strict";var yr=Object.defineProperty;var Or=(d,_,S)=>_ in d?yr(d,_,{enumerable:!0,configurable:!0,writable:!0,value:S}):d[_]=S;var f=(d,_,S)=>(Or(d,typeof _!="symbol"?_+"":_,S),S);const ae=(h=>h&&h.__esModule?h:{default:h})(_);var J={exports:{}},P={};/**
1
+ (function(d,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","antd"],_):(d=typeof globalThis<"u"?globalThis:d||self,_(d.MiAvalonLibs={},d.React,d.antd))})(this,function(d,_,w){"use strict";var yr=Object.defineProperty;var Sr=(d,_,w)=>_ in d?yr(d,_,{enumerable:!0,configurable:!0,writable:!0,value:w}):d[_]=w;var l=(d,_,w)=>(Sr(d,typeof _!="symbol"?_+"":_,w),w);const ue=(E=>E&&E.__esModule?E:{default:E})(_);var G={exports:{}},N={};/**
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 ie;function ke(){if(ie)return P;ie=1;var h=ae.default,y=Symbol.for("react.element"),w=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,z=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,L={key:!0,ref:!0,__self:!0,__source:!0};function F(D,p,A){var b,O={},T=null,H=null;A!==void 0&&(T=""+A),p.key!==void 0&&(T=""+p.key),p.ref!==void 0&&(H=p.ref);for(b in p)C.call(p,b)&&!L.hasOwnProperty(b)&&(O[b]=p[b]);if(D&&D.defaultProps)for(b in p=D.defaultProps,p)O[b]===void 0&&(O[b]=p[b]);return{$$typeof:y,type:D,key:T,ref:H,props:O,_owner:z.current}}return P.Fragment=w,P.jsx=F,P.jsxs=F,P}var M={};/**
9
+ */var le;function Me(){if(le)return N;le=1;var E=ue.default,C=Symbol.for("react.element"),Y=Symbol.for("react.fragment"),S=Object.prototype.hasOwnProperty,D=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function h(x,v,A){var g,y={},T=null,M=null;A!==void 0&&(T=""+A),v.key!==void 0&&(T=""+v.key),v.ref!==void 0&&(M=v.ref);for(g in v)S.call(v,g)&&!P.hasOwnProperty(g)&&(y[g]=v[g]);if(x&&x.defaultProps)for(g in v=x.defaultProps,v)y[g]===void 0&&(y[g]=v[g]);return{$$typeof:C,type:x,key:T,ref:M,props:y,_owner:D.current}}return N.Fragment=Y,N.jsx=h,N.jsxs=h,N}var H={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,19 +14,19 @@
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 oe;function $e(){return oe||(oe=1,process.env.NODE_ENV!=="production"&&function(){var h=ae.default,y=Symbol.for("react.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),D=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),H=Symbol.for("react.offscreen"),se=Symbol.iterator,We="@@iterator";function Ne(e){if(e===null||typeof e!="object")return null;var r=se&&e[se]||e[We];return typeof r=="function"?r:null}var x=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ze("error",e,t)}}function ze(e,r,t){{var n=x.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Le=!1,He=!1,Ue=!1,Ve=!1,Ze=!1,fe;fe=Symbol.for("react.module.reference");function Be(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===L||Ze||e===z||e===A||e===b||Ve||e===H||Le||He||Ue||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===O||e.$$typeof===F||e.$$typeof===D||e.$$typeof===p||e.$$typeof===fe||e.getModuleId!==void 0))}function Je(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ce(e){return e.displayName||"Context"}function R(e){if(e==null)return null;if(typeof e.tag=="number"&&v("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 w:return"Portal";case L:return"Profiler";case z:return"StrictMode";case A:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case D:var r=e;return ce(r)+".Consumer";case F:var t=e;return ce(t._context)+".Provider";case p:return Je(e,e.render,"ForwardRef");case O:var n=e.displayName||null;return n!==null?n:R(e.type)||"Memo";case T:{var o=e,u=o._payload,i=o._init;try{return R(i(u))}catch{return null}}}return null}var j=Object.assign,I=0,le,de,ve,pe,ge,me,_e;function he(){}he.__reactDisabledLog=!0;function qe(){{if(I===0){le=console.log,de=console.info,ve=console.warn,pe=console.error,ge=console.group,me=console.groupCollapsed,_e=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}}function Ge(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:le}),info:j({},e,{value:de}),warn:j({},e,{value:ve}),error:j({},e,{value:pe}),group:j({},e,{value:ge}),groupCollapsed:j({},e,{value:me}),groupEnd:j({},e,{value:_e})})}I<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=x.ReactCurrentDispatcher,G;function U(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 K=!1,V;{var Ke=typeof WeakMap=="function"?WeakMap:Map;V=new Ke}function be(e,r){if(!e||K)return"";{var t=V.get(e);if(t!==void 0)return t}var n;K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,qe();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(m){n=m}Reflect.construct(e,[],i)}else{try{i.call()}catch(m){n=m}e.call(i.prototype)}}else{try{throw Error()}catch(m){n=m}e()}}catch(m){if(m&&n&&typeof m.stack=="string"){for(var a=m.stack.split(`
19
- `),g=n.stack.split(`
20
- `),c=a.length-1,l=g.length-1;c>=1&&l>=0&&a[c]!==g[l];)l--;for(;c>=1&&l>=0;c--,l--)if(a[c]!==g[l]){if(c!==1||l!==1)do if(c--,l--,l<0||a[c]!==g[l]){var E=`
21
- `+a[c].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,E),E}while(c>=1&&l>=0);break}}}finally{K=!1,q.current=u,Ge(),Error.prepareStackTrace=o}var $=e?e.displayName||e.name:"",Y=$?U($):"";return typeof e=="function"&&V.set(e,Y),Y}function Xe(e,r,t){return be(e,!1)}function Qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Z(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,Qe(e));if(typeof e=="string")return U(e);switch(e){case A:return U("Suspense");case b:return U("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Xe(e.render);case O:return Z(e.type,r,t);case T:{var n=e,o=n._payload,u=n._init;try{return Z(u(o),r,t)}catch{}}}return""}var W=Object.prototype.hasOwnProperty,Ee={},Re=x.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=Z(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function er(e,r,t,n,o){{var u=Function.call.bind(W);for(var i in e)if(u(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(c){a=c}a&&!(a instanceof Error)&&(B(o),v("%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),B(null)),a instanceof Error&&!(a.message in Ee)&&(Ee[a.message]=!0,B(o),v("Failed %s type: %s",t,a.message),B(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 ye(e),!1}catch{return!0}}function ye(e){return""+e}function Oe(e){if(nr(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),ye(e)}var N=x.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},Se,Ce,Q;Q={};function ir(e){if(W.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(W.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=R(N.current.type);Q[t]||(v('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',R(N.current.type),e.ref),Q[t]=!0)}}function sr(e,r){{var t=function(){Se||(Se=!0,v("%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 fr(e,r){{var t=function(){Ce||(Ce=!0,v("%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,u,i){var a={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:u};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 lr(e,r,t,n,o){{var u,i={},a=null,g=null;t!==void 0&&(Oe(t),a=""+t),or(r)&&(Oe(r.key),a=""+r.key),ir(r)&&(g=r.ref,ur(r,o));for(u in r)W.call(r,u)&&!ar.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var c=e.defaultProps;for(u in c)i[u]===void 0&&(i[u]=c[u])}if(a||g){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&sr(i,l),g&&fr(i,l)}return cr(e,a,g,o,n,N.current,i)}}var ee=x.ReactCurrentOwner,we=x.ReactDebugCurrentFrame;function k(e){if(e){var r=e._owner,t=Z(e.type,e._source,r?r.type:null);we.setExtraStackFrame(t)}else we.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function De(){{if(ee.current){var e=R(ee.current.type);if(e)return`
17
+ */var ce;function Fe(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){var E=ue.default,C=Symbol.for("react.element"),Y=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),x=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),V=Symbol.iterator,F="@@iterator";function X(e){if(e===null||typeof e!="object")return null;var r=V&&e[V]||e[F];return typeof r=="function"?r:null}var j=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];He("error",e,t)}}function He(e,r,t){{var n=j.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 ze=!1,Le=!1,Ue=!1,Ve=!1,Ze=!1,de;de=Symbol.for("react.module.reference");function Be(e){return!!(typeof e=="string"||typeof e=="function"||e===S||e===P||Ze||e===D||e===A||e===g||Ve||e===M||ze||Le||Ue||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===y||e.$$typeof===h||e.$$typeof===x||e.$$typeof===v||e.$$typeof===de||e.getModuleId!==void 0))}function Je(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ve(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&p("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 S:return"Fragment";case Y:return"Portal";case P:return"Profiler";case D:return"StrictMode";case A:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var r=e;return ve(r)+".Consumer";case h:var t=e;return ve(t._context)+".Provider";case v:return Je(e,e.render,"ForwardRef");case y:var n=e.displayName||null;return n!==null?n:O(e.type)||"Memo";case T:{var o=e,s=o._payload,i=o._init;try{return O(i(s))}catch{return null}}}return null}var $=Object.assign,z=0,pe,ge,be,he,me,_e,Ee;function Re(){}Re.__reactDisabledLog=!0;function qe(){{if(z===0){pe=console.log,ge=console.info,be=console.warn,he=console.error,me=console.group,_e=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function Ge(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:pe}),info:$({},e,{value:ge}),warn:$({},e,{value:be}),error:$({},e,{value:he}),group:$({},e,{value:me}),groupCollapsed:$({},e,{value:_e}),groupEnd:$({},e,{value:Ee})})}z<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=j.ReactCurrentDispatcher,ee;function Z(e,r,t){{if(ee===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);ee=n&&n[1]||""}return`
18
+ `+ee+e}}var re=!1,B;{var Ke=typeof WeakMap=="function"?WeakMap:Map;B=new Ke}function ye(e,r){if(!e||re)return"";{var t=B.get(e);if(t!==void 0)return t}var n;re=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=Q.current,Q.current=null,qe();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(m){n=m}Reflect.construct(e,[],i)}else{try{i.call()}catch(m){n=m}e.call(i.prototype)}}else{try{throw Error()}catch(m){n=m}e()}}catch(m){if(m&&n&&typeof m.stack=="string"){for(var a=m.stack.split(`
19
+ `),b=n.stack.split(`
20
+ `),c=a.length-1,f=b.length-1;c>=1&&f>=0&&a[c]!==b[f];)f--;for(;c>=1&&f>=0;c--,f--)if(a[c]!==b[f]){if(c!==1||f!==1)do if(c--,f--,f<0||a[c]!==b[f]){var R=`
21
+ `+a[c].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,R),R}while(c>=1&&f>=0);break}}}finally{re=!1,Q.current=s,Ge(),Error.prepareStackTrace=o}var W=e?e.displayName||e.name:"",k=W?Z(W):"";return typeof e=="function"&&B.set(e,k),k}function Xe(e,r,t){return ye(e,!1)}function Qe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,Qe(e));if(typeof e=="string")return Z(e);switch(e){case A:return Z("Suspense");case g:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case v:return Xe(e.render);case y:return J(e.type,r,t);case T:{var n=e,o=n._payload,s=n._init;try{return J(s(o),r,t)}catch{}}}return""}var L=Object.prototype.hasOwnProperty,Se={},Oe=j.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(t)}else Oe.setExtraStackFrame(null)}function er(e,r,t,n,o){{var s=Function.call.bind(L);for(var i in e)if(s(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var b=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 b.name="Invariant Violation",b}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(q(o),p("%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),q(null)),a instanceof Error&&!(a.message in Se)&&(Se[a.message]=!0,q(o),p("Failed %s type: %s",t,a.message),q(null))}}}var rr=Array.isArray;function te(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 we(e),!1}catch{return!0}}function we(e){return""+e}function Ce(e){if(nr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(e)),we(e)}var U=j.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},De,xe,ne;ne={};function ir(e){if(L.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(L.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){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=O(U.current.type);ne[t]||(p('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',O(U.current.type),e.ref),ne[t]=!0)}}function ur(e,r){{var t=function(){De||(De=!0,p("%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 lr(e,r){{var t=function(){xe||(xe=!0,p("%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:C,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,b=null;t!==void 0&&(Ce(t),a=""+t),or(r)&&(Ce(r.key),a=""+r.key),ir(r)&&(b=r.ref,sr(r,o));for(s in r)L.call(r,s)&&!ar.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)i[s]===void 0&&(i[s]=c[s])}if(a||b){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ur(i,f),b&&lr(i,f)}return cr(e,a,b,o,n,U.current,i)}}var ae=j.ReactCurrentOwner,Te=j.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}var ie;ie=!1;function oe(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}function je(){{if(ae.current){var e=O(ae.current.type);if(e)return`
22
22
 
23
23
  Check the render method of \``+e+"`."}return""}}function dr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
24
24
 
25
- Check your code at `+r+":"+t+"."}return""}}var Te={};function vr(e){{var r=De();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
25
+ Check your code at `+r+":"+t+"."}return""}}var Ae={};function vr(e){{var r=je();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
26
26
 
27
- Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==ee.current&&(n=" It was passed a child from "+R(e._owner.type)+"."),k(e),v('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),k(null)}}function Ye(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var n=e[t];te(n)&&je(n,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var o=Ne(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)te(i.value)&&je(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===O))t=r.propTypes;else return;if(t){var n=R(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var o=R(r);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){k(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),k(null);break}}e.ref!==null&&(k(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),k(null))}}var Ae={};function xe(e,r,t,n,o,u){{var i=Be(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(o);g?a+=g:a+=De();var c;e===null?c="null":X(e)?c="array":e!==void 0&&e.$$typeof===y?(c="<"+(R(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var l=lr(e,r,t,o,u);if(l==null)return l;if(i){var E=r.children;if(E!==void 0)if(n)if(X(E)){for(var $=0;$<E.length;$++)Ye(E[$],e);Object.freeze&&Object.freeze(E)}else v("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 Ye(E,e)}if(W.call(r,"key")){var Y=R(e),m=Object.keys(r).filter(function(Rr){return Rr!=="key"}),ne=m.length>0?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}";if(!Ae[Y+ne]){var Er=m.length>0?"{"+m.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+t+">.")}return r}}function Ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(Ae[t])return;Ae[t]=!0;var n="";e&&e._owner&&e._owner!==ae.current&&(n=" It was passed a child from "+O(e._owner.type)+"."),I(e),p('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),I(null)}}function $e(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var n=e[t];oe(n)&&Ye(n,r)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=X(e);if(typeof o=="function"&&o!==e.entries)for(var s=o.call(e),i;!(i=s.next()).done;)oe(i.value)&&Ye(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===v||r.$$typeof===y))t=r.propTypes;else return;if(t){var n=O(r);er(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ie){ie=!0;var o=O(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){I(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),I(null);break}}e.ref!==null&&(I(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}var ke={};function Pe(e,r,t,n,o,s){{var i=Be(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 b=dr(o);b?a+=b:a+=je();var c;e===null?c="null":te(e)?c="array":e!==void 0&&e.$$typeof===C?(c="<"+(O(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var f=fr(e,r,t,o,s);if(f==null)return f;if(i){var R=r.children;if(R!==void 0)if(n)if(te(R)){for(var W=0;W<R.length;W++)$e(R[W],e);Object.freeze&&Object.freeze(R)}else p("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 $e(R,e)}if(L.call(r,"key")){var k=O(e),m=Object.keys(r).filter(function(Rr){return Rr!=="key"}),se=m.length>0?"{key: someKey, "+m.join(": ..., ")+": ...}":"{key: someKey}";if(!ke[k+se]){var Er=m.length>0?"{"+m.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
28
28
  let props = %s;
29
29
  <%s {...props} />
30
30
  React keys must be passed directly to JSX without using spread:
31
31
  let props = %s;
32
- <%s key={someKey} {...props} />`,ne,Y,Er,Y),Ae[Y+ne]=!0}}return e===C?gr(l):pr(l),l}}function mr(e,r,t){return xe(e,r,t,!0)}function _r(e,r,t){return xe(e,r,t,!1)}var hr=_r,br=mr;M.Fragment=C,M.jsx=hr,M.jsxs=br}()),M}process.env.NODE_ENV==="production"?J.exports=ke():J.exports=$e();var ue=J.exports;const Cr="",Pe=({type:h="primary",children:y,onClick:w,custom:C})=>ue.jsx(S.Button,{type:h,onClick:w,className:"my-button",children:C||y}),wr="",Me=({value:h,placeholder:y,onChange:w})=>ue.jsx(S.Input,{value:h,placeholder:y,onChange:w,className:"my-input"}),Fe={YMD_Hms:"YYYY-MM-DD HH:mm:ss",YMD:"YYYY-MM-DD",YMD2:"YYYYMMDD",YMD_POINT:"YYYY.M.DD",Hms:"HH:mm:ss",Hm:"HH:mm",YMD_000:"YYYY-MM-DD 00:00:00",YMD_end:"YYYY-MM-DD 23:59:59",YMD_Hm:"YYYYMMDD HHmm"},Ie=10;class s{}f(s,"integerRegex",/^-?\d+$/),f(s,"positiveIntegerRegex",/^[1-9]\d*$/),f(s,"negativeIntegerRegex",/^-[1-9]\d*$/),f(s,"floatRegex",/^-?\d+(\.\d+)?$/),f(s,"letter",/^[a-zA-Z]+$/),f(s,"chinese",/^[\u4e00-\u9fa5]+$/),f(s,"number",/^[0-9]*$/),f(s,"username",/^[a-zA-Z]\w{3,15}$/),f(s,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),f(s,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),f(s,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),f(s,"phone",/^1[3-9]\d{9}$/),f(s,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),f(s,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),f(s,"idCard",/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/),f(s,"bankCard",/^[1-9]\d{3,30}$/),f(s,"zipCode",/^[1-9]\d{5}$/),f(s,"ip",/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/),f(s,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),f(s,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),f(s,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),f(s,"date",/^(\d{4})-(\d{2})-(\d{2})$/),d.DATE_FORMAT=Fe,d.MyButton=Pe,d.MyInput=Me,d.PAGE_SIZE=Ie,d.PatternType=s,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
32
+ <%s key={someKey} {...props} />`,se,k,Er,k),ke[k+se]=!0}}return e===S?gr(f):pr(f),f}}function br(e,r,t){return Pe(e,r,t,!0)}function hr(e,r,t){return Pe(e,r,t,!1)}var mr=hr,_r=br;H.Fragment=S,H.jsx=mr,H.jsxs=_r}()),H}process.env.NODE_ENV==="production"?G.exports=Me():G.exports=Fe();var K=G.exports;const fe=E=>{const{data:C,title:Y,column:S=3,lineHeight:D,align:P="left",itemLayout:h,colon:x=!0,bordered:v=!1,style:A,className:g,labelStyle:y,contentStyle:T}=E,M={...D?{lineHeight:`${D}px`}:{},textAlign:P,...h!=null&&h.label?{width:`${h.label}px`}:{},...y},V={...D?{lineHeight:`${D}px`}:{},...h!=null&&h.value?{width:`${h.value}px`}:{},...T};return K.jsx(w.Descriptions,{title:Y,column:S,colon:x,bordered:v,style:A,className:g,labelStyle:M,contentStyle:V,children:C.map((F,X)=>{var j;return K.jsx(w.Descriptions.Item,{label:F.label,span:F.span,children:F.value||"-"},((j=F.label)==null?void 0:j.toString())||X)})})};fe.displayName="MDescriptions";const wr="",Ie=({type:E="primary",children:C,onClick:Y,custom:S})=>K.jsx(w.Button,{type:E,onClick:Y,className:"my-button",children:S||C}),We={YMD_Hms:"YYYY-MM-DD HH:mm:ss",YMD:"YYYY-MM-DD",YMD2:"YYYYMMDD",YMD_POINT:"YYYY.M.DD",Hms:"HH:mm:ss",Hm:"HH:mm",YMD_000:"YYYY-MM-DD 00:00:00",YMD_end:"YYYY-MM-DD 23:59:59",YMD_Hm:"YYYYMMDD HHmm"},Ne=10;class u{}l(u,"integerRegex",/^-?\d+$/),l(u,"positiveIntegerRegex",/^[1-9]\d*$/),l(u,"negativeIntegerRegex",/^-[1-9]\d*$/),l(u,"floatRegex",/^-?\d+(\.\d+)?$/),l(u,"letter",/^[a-zA-Z]+$/),l(u,"chinese",/^[\u4e00-\u9fa5]+$/),l(u,"number",/^[0-9]*$/),l(u,"username",/^[a-zA-Z]\w{3,15}$/),l(u,"strongUsername",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/),l(u,"password",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/),l(u,"strongPassword",/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/),l(u,"phone",/^1[3-9]\d{9}$/),l(u,"phoneWithAreaCode",/^\+?\d{2,3}-?\d{8,11}$/),l(u,"email",/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),l(u,"idCard",/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/),l(u,"bankCard",/^[1-9]\d{3,30}$/),l(u,"zipCode",/^[1-9]\d{5}$/),l(u,"ip",/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/),l(u,"url",/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/),l(u,"carNumber",/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/),l(u,"time",/^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/),l(u,"date",/^(\d{4})-(\d{2})-(\d{2})$/),d.DATE_FORMAT=We,d.MDescriptions=fe,d.MyButton=Ie,d.PAGE_SIZE=Ne,d.PatternType=u,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .my-button{font-weight:700}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mi-avalon/libs",
3
3
  "private": false,
4
- "version": "0.0.16",
4
+ "version": "0.0.18",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
7
7
  "module": "./dist/index.es.js",
@@ -11,19 +11,18 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "dev": "vite",
14
- "build": "vite build && tsc --declaration --emitDeclarationOnly --outDir dist",
14
+ "build": "vite build && tsc",
15
15
  "preview": "vite preview"
16
16
  },
17
- "dependencies": {
18
- "antd": "^4.0.0 || ^5.0.0",
19
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
20
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
21
- },
22
17
  "devDependencies": {
23
18
  "@types/node": "^20.0.0",
24
19
  "@types/react": "^18.0.0",
25
20
  "@types/react-dom": "^18.0.0",
26
21
  "@vitejs/plugin-react": "^4.7.0",
22
+ "antd": "^5.0.0",
23
+ "react": "^18.0.0",
24
+ "react-dom": "^18.0.0",
25
+ "sass": "^1.89.2",
27
26
  "typescript": "^5.0.0",
28
27
  "vite": "^4.5.14"
29
28
  },
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './index.css';
3
- interface MyInputProps {
4
- value?: string;
5
- placeholder?: string;
6
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
- }
8
- declare const MyInput: React.FC<MyInputProps>;
9
- export default MyInput;