UNPKG

kylin-ui-component

Version:

A React UI library for some developers to develop quickly

29 lines (25 loc) 14.3 kB
(function(g,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],E):(g=typeof globalThis<"u"?globalThis:g||self,E(g.Layout={},g.React))})(this,function(g,E){"use strict";var G={exports:{}},D={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var re;function je(){if(re)return D;re=1;var _=E,R=Symbol.for("react.element"),T=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,w=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,P={key:!0,ref:!0,__self:!0,__source:!0};function N(O,l,j){var v,y={},C=null,M=null;j!==void 0&&(C=""+j),l.key!==void 0&&(C=""+l.key),l.ref!==void 0&&(M=l.ref);for(v in l)m.call(l,v)&&!P.hasOwnProperty(v)&&(y[v]=l[v]);if(O&&O.defaultProps)for(v in l=O.defaultProps,l)y[v]===void 0&&(y[v]=l[v]);return{$$typeof:R,type:O,key:C,ref:M,props:y,_owner:w.current}}return D.Fragment=T,D.jsx=N,D.jsxs=N,D}var A={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var te;function xe(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var _=E,R=Symbol.for("react.element"),T=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),O=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),ae=Symbol.iterator,Ne="@@iterator";function Ie(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[Ne];return typeof r=="function"?r:null}var x=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];We("error",e,t)}}function We(e,r,t){{var n=x.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ye=!1,Le=!1,Me=!1,Ve=!1,$e=!1,oe;oe=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===m||e===P||$e||e===w||e===j||e===v||Ve||e===M||Ye||Le||Me||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===y||e.$$typeof===N||e.$$typeof===O||e.$$typeof===l||e.$$typeof===oe||e.getModuleId!==void 0))}function Be(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ie(e){return e.displayName||"Context"}function h(e){if(e==null)return null;if(typeof e.tag=="number"&&c("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 m:return"Fragment";case T:return"Portal";case P:return"Profiler";case w:return"StrictMode";case j:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case O:var r=e;return ie(r)+".Consumer";case N:var t=e;return ie(t._context)+".Provider";case l:return Be(e,e.render,"ForwardRef");case y:var n=e.displayName||null;return n!==null?n:h(e.type)||"Memo";case C:{var i=e,u=i._payload,o=i._init;try{return h(o(u))}catch{return null}}}return null}var S=Object.assign,I=0,ue,se,fe,le,ce,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Je(){{if(I===0){ue=console.log,se=console.info,fe=console.warn,le=console.error,ce=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})}I++}}function Ge(){{if(I--,I===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:ue}),info:S({},e,{value:se}),warn:S({},e,{value:fe}),error:S({},e,{value:le}),group:S({},e,{value:ce}),groupCollapsed:S({},e,{value:de}),groupEnd:S({},e,{value:ve})})}I<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=x.ReactCurrentDispatcher,q;function V(e,r,t){{if(q===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return` `+q+e}}var z=!1,$;{var He=typeof WeakMap=="function"?WeakMap:Map;$=new He}function ge(e,r){if(!e||z)return"";{var t=$.get(e);if(t!==void 0)return t}var n;z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=H.current,H.current=null,Je();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(b){n=b}Reflect.construct(e,[],o)}else{try{o.call()}catch(b){n=b}e.call(o.prototype)}}else{try{throw Error()}catch(b){n=b}e()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var a=b.stack.split(` `),d=n.stack.split(` `),s=a.length-1,f=d.length-1;s>=1&&f>=0&&a[s]!==d[f];)f--;for(;s>=1&&f>=0;s--,f--)if(a[s]!==d[f]){if(s!==1||f!==1)do if(s--,f--,f<0||a[s]!==d[f]){var p=` `+a[s].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),typeof e=="function"&&$.set(e,p),p}while(s>=1&&f>=0);break}}}finally{z=!1,H.current=u,Ge(),Error.prepareStackTrace=i}var F=e?e.displayName||e.name:"",Pe=F?V(F):"";return typeof e=="function"&&$.set(e,Pe),Pe}function qe(e,r,t){return ge(e,!1)}function ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return ge(e,ze(e));if(typeof e=="string")return V(e);switch(e){case j:return V("Suspense");case v:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return qe(e.render);case y:return U(e.type,r,t);case C:{var n=e,i=n._payload,u=n._init;try{return U(u(i),r,t)}catch{}}}return""}var B=Object.prototype.hasOwnProperty,me={},ye=x.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function Ke(e,r,t,n,i){{var u=Function.call.bind(B);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var d=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(J(i),c("%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,o,typeof a),J(null)),a instanceof Error&&!(a.message in me)&&(me[a.message]=!0,J(i),c("Failed %s type: %s",t,a.message),J(null))}}}var Xe=Array.isArray;function K(e){return Xe(e)}function Ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return he(e),!1}catch{return!0}}function he(e){return""+e}function be(e){if(Qe(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),he(e)}var W=x.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Ee,Re,X;X={};function rr(e){if(B.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(B.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){if(typeof e.ref=="string"&&W.current&&r&&W.current.stateNode!==r){var t=h(W.current.type);X[t]||(c('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',h(W.current.type),e.ref),X[t]=!0)}}function ar(e,r){{var t=function(){Ee||(Ee=!0,c("%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 or(e,r){{var t=function(){Re||(Re=!0,c("%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 ir=function(e,r,t,n,i,u,o){var a={$$typeof:R,type:e,key:r,ref:t,props:o,_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:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ur(e,r,t,n,i){{var u,o={},a=null,d=null;t!==void 0&&(be(t),a=""+t),tr(r)&&(be(r.key),a=""+r.key),rr(r)&&(d=r.ref,nr(r,i));for(u in r)B.call(r,u)&&!er.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||d){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ar(o,f),d&&or(o,f)}return ir(e,a,d,i,n,W.current,o)}}var Z=x.ReactCurrentOwner,_e=x.ReactDebugCurrentFrame;function k(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(t)}else _e.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===R}function Te(){{if(Z.current){var e=h(Z.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` Check your code at `+r+":"+t+"."}return""}}var Oe={};function fr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` 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=fr(r);if(Oe[t])return;Oe[t]=!0;var n="";e&&e._owner&&e._owner!==Z.current&&(n=" It was passed a child from "+h(e._owner.type)+"."),k(e),c('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 Se(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var n=e[t];ee(n)&&Ce(n,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var i=Ie(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)ee(o.value)&&Ce(o.value,r)}}}function lr(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===l||r.$$typeof===y))t=r.propTypes;else return;if(t){var n=h(r);Ke(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var i=h(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cr(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),c("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),c("Invalid attribute `ref` supplied to `React.Fragment`."),k(null))}}function we(e,r,t,n,i,u){{var o=Ue(e);if(!o){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 d=sr(i);d?a+=d:a+=Te();var s;e===null?s="null":K(e)?s="array":e!==void 0&&e.$$typeof===R?(s="<"+(h(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var f=ur(e,r,t,i,u);if(f==null)return f;if(o){var p=r.children;if(p!==void 0)if(n)if(K(p)){for(var F=0;F<p.length;F++)Se(p[F],e);Object.freeze&&Object.freeze(p)}else c("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 Se(p,e)}return e===m?cr(f):lr(f),f}}function dr(e,r,t){return we(e,r,t,!0)}function vr(e,r,t){return we(e,r,t,!1)}var pr=vr,gr=dr;A.Fragment=m,A.jsx=pr,A.jsxs=gr}()),A}process.env.NODE_ENV==="production"?G.exports=je():G.exports=xe();var ke=G.exports;const ne=ke.jsx;function Y({tagName:_,displayName:R}){return T=>E.forwardRef((w,P)=>ne(T,{ref:P,...w,tagName:_}))}const L=E.forwardRef((_,R)=>{const{tagName:T,...m}=_;return ne(T,{ref:R,...m})});Y({tagName:"section",displayName:"Layout"})(L);const Fe=Y({tagName:"header",displayName:"Header"})(L),De=Y({tagName:"footer",displayName:"Footer"})(L),Ae=Y({tagName:"main",displayName:"Content"})(L);g.Content=Ae,g.Footer=De,g.Header=Fe,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=index.umd.cjs.map