@zjpcy/simple-design 1.5.2 → 1.5.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.
Files changed (49) hide show
  1. package/dist/cjs/index.css +37 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/es/Anchor/index.js +1 -1
  4. package/dist/es/Calendar/index.js +1 -1
  5. package/dist/es/Carousel/index.js +1 -1
  6. package/dist/es/Cascader/index.js +1 -1
  7. package/dist/es/Checkbox/index.js +1 -1
  8. package/dist/es/ColorPicker/index.js +1 -1
  9. package/dist/es/DatePicker/RangePicker.js +1 -1
  10. package/dist/es/DatePicker/index.js +1 -1
  11. package/dist/es/Drawer/index.js +1 -1
  12. package/dist/es/Dropdown/index.js +1 -1
  13. package/dist/es/Form/index.js +1 -1
  14. package/dist/es/Grid/index.js +1 -1
  15. package/dist/es/Icon/Icon.js +1 -1
  16. package/dist/es/Layout/index.js +1 -1
  17. package/dist/es/Layout/styles.js +1 -1
  18. package/dist/es/Marquee/index.js +1 -1
  19. package/dist/es/Masonry/index.js +1 -1
  20. package/dist/es/Menu/index.js +1 -1
  21. package/dist/es/Message/index.js +1 -1
  22. package/dist/es/Modal/index.js +1 -1
  23. package/dist/es/Notification/Notification.js +1 -1
  24. package/dist/es/Pagination/index.js +1 -1
  25. package/dist/es/Popconfirm/index.js +1 -1
  26. package/dist/es/Radio/index.js +1 -1
  27. package/dist/es/Rate/index.js +1 -1
  28. package/dist/es/Select/index.js +1 -1
  29. package/dist/es/Slider/index.js +1 -1
  30. package/dist/es/Space/index.js +1 -1
  31. package/dist/es/Spin/index.js +1 -1
  32. package/dist/es/Splitter/index.js +1 -1
  33. package/dist/es/Steps/index.js +1 -1
  34. package/dist/es/Switch/index.js +1 -1
  35. package/dist/es/Table/index.js +1 -1
  36. package/dist/es/Tabs/index.js +1 -1
  37. package/dist/es/Tag/index.js +1 -1
  38. package/dist/es/TimePicker/RangePicker.js +1 -1
  39. package/dist/es/TimePicker/index.js +1 -1
  40. package/dist/es/Tooltip/Tooltip.js +1 -1
  41. package/dist/es/Top/index.js +1 -1
  42. package/dist/es/Transfer/index.js +1 -1
  43. package/dist/es/Tree/index.js +1 -1
  44. package/dist/es/TreeSelect/index.js +1 -1
  45. package/dist/es/Upload/index.js +1 -1
  46. package/dist/es/index.css +37 -0
  47. package/dist/types/components/Space/types.d.ts +4 -0
  48. package/dist/variables.css +14 -0
  49. package/package.json +2 -1
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as r,__generator as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as n,jsxs as a}from"react/jsx-runtime";import l,{createContext as i,useState as o,useRef as s,useCallback as u,useEffect as c,useContext as d}from"react";import{FormWrapper as v,FormItemWrapper as f,FormLabel as m,FormControl as p,FormError as h,FormHelp as b}from"./styles.js";var y=i(null),g=function(a){var i=a.children,d=a.className,f=void 0===d?"":d,m=a.style,p=a.layout,h=void 0===p?"horizontal":p,b=a.labelSpan,g=a.wrapperSpan,w=a.initialValues,V=void 0===w?{}:w,N=a.onFinish,k=a.onFinishFailed,E=a.colon,$=void 0===E||E,S=a.requiredMark,q=void 0===S||S,C=a.styles,j=a.formRef,x=a.form,z=o(V),A=z[0],I=z[1],M=o({}),L=M[0],P=M[1],D=s(null),O=s(new Map),R=s(null),_=u(function(r,t){I(function(n){var a;return e(e({},n),((a={})[r]=t,a))}),L[r]&&P(function(t){var n=e({},t);return delete n[r],n})},[L]),B=u(function(e){return A[e]},[A]),G=u(function(r){I(function(t){return e(e({},t),r)}),Object.keys(r).forEach(function(r){L[r]&&P(function(t){var n=e({},t);return delete n[r],n})})},[L]),H=u(function(n){return r(void 0,void 0,void 0,function(){var r,a,l,i,o,s,u,c;return t(this,function(d){switch(d.label){case 0:if(!(r=O.current.get(n)))return[2];if(a=r.rules,l=A[n],!a||0===a.length)return[2];i=function(r){var a,i,o,s,u,c,d,v,f;return t(this,function(t){switch(t.label){case 0:if(r.required&&(null==l||""===l))return a=r.message||"".concat(n," is required"),P(function(r){var t;return e(e({},r),((t={})[n]=a,t))}),[2,{value:a}];if(r.pattern&&!r.pattern.test(l))return i=r.message||"".concat(n," format is invalid"),P(function(r){var t;return e(e({},r),((t={})[n]=i,t))}),[2,{value:i}];if(r.type){switch(o=!0,r.type){case"email":o=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l);break;case"url":o=/^https?:\/\/.+$/.test(l);break;case"number":o=!isNaN(Number(l));break;case"integer":o=Number.isInteger(Number(l));break;case"float":o=!isNaN(parseFloat(l))&&isFinite(l);break;case"string":o="string"==typeof l;break;case"boolean":o="boolean"==typeof l;break;case"array":o=Array.isArray(l);break;case"object":o="object"==typeof l&&null!==l&&!Array.isArray(l)}if(!o)return s=r.message||"".concat(n," must be a ").concat(r.type),P(function(r){var t;return e(e({},r),((t={})[n]=s,t))}),[2,{value:s}]}if(void 0!==r.min&&l.length<r.min)return u=r.message||"".concat(n," must be at least ").concat(r.min," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=u,t))}),[2,{value:u}];if(void 0!==r.max&&l.length>r.max)return c=r.message||"".concat(n," must be at most ").concat(r.max," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=c,t))}),[2,{value:c}];if(void 0!==r.len&&l.length!==r.len)return d=r.message||"".concat(n," must be exactly ").concat(r.len," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=d,t))}),[2,{value:d}];if(!r.validator)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r.validator(r,l)];case 2:return t.sent(),[3,4];case 3:return v=t.sent(),f=v instanceof Error?v.message:r.message||"".concat(n," validation failed"),P(function(r){var t;return e(e({},r),((t={})[n]=f,t))}),[2,{value:f}];case 4:return[2]}})},o=0,s=a,d.label=1;case 1:return o<s.length?(u=s[o],[5,i(u)]):[3,4];case 2:if("object"==typeof(c=d.sent()))return[2,c.value];d.label=3;case 3:return o++,[3,1];case 4:return P(function(r){var t=e({},r);return delete t[n],t}),[2,null]}})})},[A]),J=u(function(e){return r(void 0,void 0,void 0,function(){var r,n;return t(this,function(t){switch(t.label){case 0:return r=e||Array.from(O.current.keys()),[4,Promise.all(r.map(function(e){return H(e)}))];case 1:if(n=t.sent(),n.some(function(e){return null!==e}))throw new Error("Validation failed");return[2,A]}})})},[H,A]),K=u(function(r){if(r){var t=e({},A);r.forEach(function(e){t[e]=V[e]||void 0}),I(t)}else I(V);P({})},[A,V]),Q={getFieldValue:B,getFieldsValue:function(e){if(!e)return A;var r={};return e.forEach(function(e){r[e]=A[e]}),r},setFieldValue:_,setFieldsValue:G,setFields:function(r){var t=e({},A),n=e({},L);r.forEach(function(e){void 0!==e.value&&(t[e.name]=e.value),e.errors&&e.errors.length>0?n[e.name]=e.errors[0]:delete n[e.name]}),I(t),P(n)},resetFields:K,validateFields:J,submit:function(){J().then(function(){var e=document.querySelector("form");e&&e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})},destroy:function(){I({}),P({}),O.current.clear(),R.current=null}};c(function(){R.current=Q,j&&(j.current=Q),x&&(x.getFieldValue=Q.getFieldValue,x.getFieldsValue=Q.getFieldsValue,x.setFieldValue=Q.setFieldValue,x.setFieldsValue=Q.setFieldsValue,x.setFields=Q.setFields,x.resetFields=Q.resetFields,x.validateFields=Q.validateFields,x.submit=Q.submit,x.destroy=Q.destroy)},[Q,j,x]);var T=u(function(e,r){return O.current.set(e,r),function(){O.current.delete(e)}},[]),U={layout:h,labelSpan:b,wrapperSpan:g,colon:$,requiredMark:q,values:A,errors:L,setFieldValue:_,getFieldValue:B,setFieldValueList:G,validateField:H,validateFields:J,resetFields:K};return n(y.Provider,{value:U,children:n(v,{ref:D,className:"form-wrapper ".concat(f),style:m,$styles:null==C?void 0:C.wrapper,onSubmit:function(e){return r(void 0,void 0,void 0,function(){var r;return t(this,function(t){switch(t.label){case 0:e.preventDefault(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,J()];case 2:return t.sent(),null==N||N(A),[3,4];case 3:return r=t.sent(),null==k||k({error:r,values:A}),[3,4];case 4:return[2]}})})},children:l.Children.map(i,function(e){return l.isValidElement(e)&&e.type===F?l.cloneElement(e,{registerItem:T}):e})})})},F=function(r){var t=r.name,i=r.label,s=r.required,u=r.rules,v=void 0===u?[]:u,g=r.className,F=void 0===g?"":g,w=r.style,V=r.help,N=r.validateStatus,k=r.colon,E=r.labelSpan,$=r.wrapperSpan,S=r.hidden,q=void 0!==S&&S,C=r.extra,j=r.styles,x=r.registerItem,z=r.children,A=d(y),I=o(t&&(null==A?void 0:A.values[t])?A.values[t]:""),M=I[0],L=I[1];c(function(){if(x&&t)return x(t,{rules:v})},[x,t,v]),c(function(){A&&t&&L(A.values[t])},[A,t,null==A?void 0:A.values]);var P=s||v.some(function(e){return e.required}),D=A&&t?A.errors[t]:"",O=!!D||"error"===N,R=void 0!==E?E:null==A?void 0:A.labelSpan,_=void 0!==$?$:null==A?void 0:A.wrapperSpan,B=R?R/24*100:void 0,G=void 0;if(void 0!==R){var H=24-R,J=void 0!==_?_:H;J>H&&(J=H),J<1&&(J=1),G=J/24*100}return q?null:a(f,{className:"form-item ".concat(F),style:w,$layout:(null==A?void 0:A.layout)||"horizontal",$styles:null==j?void 0:j.wrapper,children:[i&&n(m,{className:"form-label",$required:P,$colon:void 0!==k?k:null==A?void 0:A.colon,$styles:e(e({},null==j?void 0:j.label),void 0!==B?{width:"".concat(B,"%")}:{}),children:i}),a(p,{className:"form-control",$styles:e(e({},null==j?void 0:j.input),void 0!==G?{width:"".concat(G,"%")}:{}),children:[l.Children.map(l.Children.toArray(z).filter(function(e){return l.isValidElement(e)}),function(e){var r=e.props,n=r.autoComplete||function(e){if(e)return{username:"username",email:"email",password:"current-password","new-password":"new-password","current-password":"current-password",name:"name","given-name":"given-name","family-name":"family-name",tel:"tel",phone:"tel",address:"street-address",city:"address-level2",country:"country-name",zipcode:"postal-code","postal-code":"postal-code",organization:"organization",company:"organization"}[e.toLowerCase()]}(t);return l.cloneElement(e,{value:M,onChange:function(e){var n,a;!function(e){L(e),t&&(null==A||A.setFieldValue(t,e))}(void 0!==(null===(n=null==e?void 0:e.target)||void 0===n?void 0:n.value)?e.target.value:e),null===(a=r.onChange)||void 0===a||a.call(r,e)},error:O||void 0,autoComplete:n})}),O&&n(h,{className:"form-error ".concat(O?"form-error-visible":""),$styles:null==j?void 0:j.error,children:D}),V&&!O&&n(b,{className:"form-help",$styles:null==j?void 0:j.help,children:V}),C&&!O&&n(b,{className:"form-help",$styles:null==j?void 0:j.help,children:C})]})]})};g.Item=F;var w=g;export{w as default};
1
+ "use client";import{__assign as e,__awaiter as r,__generator as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as n,jsxs as a}from"react/jsx-runtime";import l,{createContext as i,useState as o,useRef as s,useCallback as u,useEffect as c,useContext as d}from"react";import{FormWrapper as v,FormItemWrapper as f,FormLabel as m,FormControl as p,FormError as h,FormHelp as b}from"./styles.js";var y=i(null),g=function(a){var i=a.children,d=a.className,f=void 0===d?"":d,m=a.style,p=a.layout,h=void 0===p?"horizontal":p,b=a.labelSpan,g=a.wrapperSpan,w=a.initialValues,V=void 0===w?{}:w,N=a.onFinish,k=a.onFinishFailed,E=a.colon,$=void 0===E||E,S=a.requiredMark,q=void 0===S||S,C=a.styles,j=a.formRef,x=a.form,z=o(V),A=z[0],I=z[1],M=o({}),L=M[0],P=M[1],D=s(null),O=s(new Map),R=s(null),_=u(function(r,t){I(function(n){var a;return e(e({},n),((a={})[r]=t,a))}),L[r]&&P(function(t){var n=e({},t);return delete n[r],n})},[L]),B=u(function(e){return A[e]},[A]),G=u(function(r){I(function(t){return e(e({},t),r)}),Object.keys(r).forEach(function(r){L[r]&&P(function(t){var n=e({},t);return delete n[r],n})})},[L]),H=u(function(n){return r(void 0,void 0,void 0,function(){var r,a,l,i,o,s,u,c;return t(this,function(d){switch(d.label){case 0:if(!(r=O.current.get(n)))return[2];if(a=r.rules,l=A[n],!a||0===a.length)return[2];i=function(r){var a,i,o,s,u,c,d,v,f;return t(this,function(t){switch(t.label){case 0:if(r.required&&(null==l||""===l))return a=r.message||"".concat(n," is required"),P(function(r){var t;return e(e({},r),((t={})[n]=a,t))}),[2,{value:a}];if(r.pattern&&!r.pattern.test(l))return i=r.message||"".concat(n," format is invalid"),P(function(r){var t;return e(e({},r),((t={})[n]=i,t))}),[2,{value:i}];if(r.type){switch(o=!0,r.type){case"email":o=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l);break;case"url":o=/^https?:\/\/.+$/.test(l);break;case"number":o=!isNaN(Number(l));break;case"integer":o=Number.isInteger(Number(l));break;case"float":o=!isNaN(parseFloat(l))&&isFinite(l);break;case"string":o="string"==typeof l;break;case"boolean":o="boolean"==typeof l;break;case"array":o=Array.isArray(l);break;case"object":o="object"==typeof l&&null!==l&&!Array.isArray(l)}if(!o)return s=r.message||"".concat(n," must be a ").concat(r.type),P(function(r){var t;return e(e({},r),((t={})[n]=s,t))}),[2,{value:s}]}if(void 0!==r.min&&l.length<r.min)return u=r.message||"".concat(n," must be at least ").concat(r.min," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=u,t))}),[2,{value:u}];if(void 0!==r.max&&l.length>r.max)return c=r.message||"".concat(n," must be at most ").concat(r.max," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=c,t))}),[2,{value:c}];if(void 0!==r.len&&l.length!==r.len)return d=r.message||"".concat(n," must be exactly ").concat(r.len," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=d,t))}),[2,{value:d}];if(!r.validator)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r.validator(r,l)];case 2:return t.sent(),[3,4];case 3:return v=t.sent(),f=v instanceof Error?v.message:r.message||"".concat(n," validation failed"),P(function(r){var t;return e(e({},r),((t={})[n]=f,t))}),[2,{value:f}];case 4:return[2]}})},o=0,s=a,d.label=1;case 1:return o<s.length?(u=s[o],[5,i(u)]):[3,4];case 2:if("object"==typeof(c=d.sent()))return[2,c.value];d.label=3;case 3:return o++,[3,1];case 4:return P(function(r){var t=e({},r);return delete t[n],t}),[2,null]}})})},[A]),J=u(function(e){return r(void 0,void 0,void 0,function(){var r,n;return t(this,function(t){switch(t.label){case 0:return r=e||Array.from(O.current.keys()),[4,Promise.all(r.map(function(e){return H(e)}))];case 1:if(n=t.sent(),n.some(function(e){return null!==e}))throw new Error("Validation failed");return[2,A]}})})},[H,A]),K=u(function(r){if(r){var t=e({},A);r.forEach(function(e){t[e]=V[e]||void 0}),I(t)}else I(V);P({})},[A,V]),Q={getFieldValue:B,getFieldsValue:function(e){if(!e)return A;var r={};return e.forEach(function(e){r[e]=A[e]}),r},setFieldValue:_,setFieldsValue:G,setFields:function(r){var t=e({},A),n=e({},L);r.forEach(function(e){void 0!==e.value&&(t[e.name]=e.value),e.errors&&e.errors.length>0?n[e.name]=e.errors[0]:delete n[e.name]}),I(t),P(n)},resetFields:K,validateFields:J,submit:function(){J().then(function(){var e=document.querySelector("form");e&&e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})},destroy:function(){I({}),P({}),O.current.clear(),R.current=null}};c(function(){R.current=Q,j&&(j.current=Q),x&&(x.getFieldValue=Q.getFieldValue,x.getFieldsValue=Q.getFieldsValue,x.setFieldValue=Q.setFieldValue,x.setFieldsValue=Q.setFieldsValue,x.setFields=Q.setFields,x.resetFields=Q.resetFields,x.validateFields=Q.validateFields,x.submit=Q.submit,x.destroy=Q.destroy)},[Q,j,x]);var T=u(function(e,r){return O.current.set(e,r),function(){O.current.delete(e)}},[]),U={layout:h,labelSpan:b,wrapperSpan:g,colon:$,requiredMark:q,values:A,errors:L,setFieldValue:_,getFieldValue:B,setFieldValueList:G,validateField:H,validateFields:J,resetFields:K};return n(y.Provider,{value:U,children:n(v,{ref:D,className:"form-wrapper ".concat(f),style:m,$styles:null==C?void 0:C.wrapper,onSubmit:function(e){return r(void 0,void 0,void 0,function(){var r;return t(this,function(t){switch(t.label){case 0:e.preventDefault(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,J()];case 2:return t.sent(),null==N||N(A),[3,4];case 3:return r=t.sent(),null==k||k({error:r,values:A}),[3,4];case 4:return[2]}})})},children:l.Children.map(i,function(e){return l.isValidElement(e)&&e.type===F?l.cloneElement(e,{registerItem:T}):e})})})},F=function(r){var t=r.name,i=r.label,s=r.required,u=r.rules,v=void 0===u?[]:u,g=r.className,F=void 0===g?"":g,w=r.style,V=r.help,N=r.validateStatus,k=r.colon,E=r.labelSpan,$=r.wrapperSpan,S=r.hidden,q=void 0!==S&&S,C=r.extra,j=r.styles,x=r.registerItem,z=r.children,A=d(y),I=o(t&&(null==A?void 0:A.values[t])?A.values[t]:""),M=I[0],L=I[1];c(function(){if(x&&t)return x(t,{rules:v})},[x,t,v]),c(function(){A&&t&&L(A.values[t])},[A,t,null==A?void 0:A.values]);var P=s||v.some(function(e){return e.required}),D=A&&t?A.errors[t]:"",O=!!D||"error"===N,R=void 0!==E?E:null==A?void 0:A.labelSpan,_=void 0!==$?$:null==A?void 0:A.wrapperSpan,B=R?R/24*100:void 0,G=void 0;if(void 0!==R){var H=24-R,J=void 0!==_?_:H;J>H&&(J=H),J<1&&(J=1),G=J/24*100}return q?null:a(f,{className:"form-item ".concat(F),style:w,$layout:(null==A?void 0:A.layout)||"horizontal",$styles:null==j?void 0:j.wrapper,children:[i&&n(m,{className:"form-label",$required:P,$colon:void 0!==k?k:null==A?void 0:A.colon,$styles:e(e({},null==j?void 0:j.label),void 0!==B?{width:"".concat(B,"%")}:{}),children:i}),a(p,{className:"form-control",$styles:e(e({},null==j?void 0:j.input),void 0!==G?{width:"".concat(G,"%")}:{}),children:[l.Children.map(l.Children.toArray(z).filter(function(e){return l.isValidElement(e)}),function(e){var r=e.props,n=r.autoComplete||function(e){if(e)return{username:"username",email:"email",password:"current-password","new-password":"new-password","current-password":"current-password",name:"name","given-name":"given-name","family-name":"family-name",tel:"tel",phone:"tel",address:"street-address",city:"address-level2",country:"country-name",zipcode:"postal-code","postal-code":"postal-code",organization:"organization",company:"organization"}[e.toLowerCase()]}(t);return l.cloneElement(e,{value:M,onChange:function(e){var n,a;!function(e){L(e),t&&(null==A||A.setFieldValue(t,e))}(void 0!==(null===(n=null==e?void 0:e.target)||void 0===n?void 0:n.value)?e.target.value:e),null===(a=r.onChange)||void 0===a||a.call(r,e)},error:O||void 0,autoComplete:n})}),O&&n(h,{className:"form-error ".concat(O?"form-error-visible":""),$styles:null==j?void 0:j.error,children:D}),V&&!O&&n(b,{className:"form-help",$styles:null==j?void 0:j.help,children:V}),C&&!O&&n(b,{className:"form-help",$styles:null==j?void 0:j.help,children:C})]})]})};g.Item=F;var w=g;export{w as default};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useContext as i}from"react";import l from"classnames";import{ColWrapper as s,RowWrapper as o,GridWrapper as d}from"./styles.js";var p=e({}),n=e({}),t=a.forwardRef(function(a,e){var o=a.children,d=a.className,p=a.style,t=a.span,c=a.offset,f=a.push,g=a.pull,u=a.order,m=a.gap,h=i(n),v=null==h?void 0:h.gap,y=void 0!==m?m:v;return r(s,{ref:e,className:l("zjpcy-grid-col",d),style:p,span:t,offset:c,push:f,pull:g,order:u,gap:y,children:o})});t.displayName="Grid.Col";var c=a.forwardRef(function(a,e){var s=a.children,d=a.className,t=a.style,c=a.span,f=a.gap,g=a.rowGap,u=a.align,m=a.justify,h=a.wrap,v=void 0===h||h,y=i(p),w=null==y?void 0:y.gap,j=void 0!==f?f:w;return r(n.Provider,{value:{gap:j},children:r(o,{ref:e,className:l("zjpcy-grid-row",d),style:t,span:c,rowGap:g,align:u,justify:m,wrap:v,children:s})})});c.displayName="Grid.Row";var f=Object.assign(c,{Col:t}),g=a.forwardRef(function(a,e){var i=a.children,s=a.className,o=a.style,n=a.width,t=a.height,c=a.gap,f=a.padding,g=a.backgroundColor;return r(p.Provider,{value:{gap:c},children:r(d,{ref:e,className:l("zjpcy-grid",s),style:o,width:n,height:t,gap:c,padding:f,backgroundColor:g,children:i})})});g.displayName="Grid";var u=Object.assign(g,{Row:f,Col:t});export{t as Col,f as Row,u as default};
1
+ "use client";import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useContext as i}from"react";import l from"classnames";import{ColWrapper as s,RowWrapper as o,GridWrapper as d}from"./styles.js";var n=e({}),p=e({}),t=a.forwardRef(function(a,e){var o=a.children,d=a.className,n=a.style,t=a.span,c=a.offset,f=a.push,g=a.pull,u=a.order,m=a.gap,h=i(p),v=null==h?void 0:h.gap,y=void 0!==m?m:v;return r(s,{ref:e,className:l("zjpcy-grid-col",d),style:n,span:t,offset:c,push:f,pull:g,order:u,gap:y,children:o})});t.displayName="Grid.Col";var c=a.forwardRef(function(a,e){var s=a.children,d=a.className,t=a.style,c=a.span,f=a.gap,g=a.rowGap,u=a.align,m=a.justify,h=a.wrap,v=void 0===h||h,y=i(n),w=null==y?void 0:y.gap,j=void 0!==f?f:w;return r(p.Provider,{value:{gap:j},children:r(o,{ref:e,className:l("zjpcy-grid-row",d),style:t,span:c,rowGap:g,align:u,justify:m,wrap:v,children:s})})});c.displayName="Grid.Row";var f=Object.assign(c,{Col:t}),g=a.forwardRef(function(a,e){var i=a.children,s=a.className,o=a.style,p=a.width,t=a.height,c=a.gap,f=a.padding,g=a.backgroundColor;return r(n.Provider,{value:{gap:c},children:r(d,{ref:e,className:l("zjpcy-grid",s),style:o,width:p,height:t,gap:c,padding:f,backgroundColor:g,children:i})})});g.displayName="Grid";var u=Object.assign(g,{Row:f,Col:t});export{t as Col,f as Row,u as default};
@@ -1 +1 @@
1
- import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{useMemo as o}from"react";import{presetIcons as t,searchIcon as i,loadingIcon as n,userIcon as a,closeIcon as l,checkIcon as c,plusIcon as u,minusIcon as s,arrowLeftIcon as f,arrowRightIcon as d,arrowUpIcon as m,arrowDownIcon as v,leftIcon as h,rightIcon as p,doubleLeftIcon as g,doubleRightIcon as w}from"./path.js";var y={search:i,loading:n,user:a,close:l,check:c,plus:u,minus:s,arrowLeft:f,arrowRight:d,arrowUp:m,arrowDown:v,left:h,right:p,"double-left":g,"double-right":w},b=function(r){return y[r]?y[r]:t[r]},x={small:12,medium:16,large:24},j=function(t){var i=t.type,n=t.path,a=t.viewBox,l=void 0===a?"0 0 24 24":a,c=t.size,u=void 0===c?"medium":c,s=t.color,f=void 0===s?"#339af0":s,d=t.hoverColor,m=t.spin,v=void 0!==m&&m,h=t.rotate,p=t.align,g=void 0===p?"center":p,w=t.className,y=void 0===w?"":w,j=t.style,k=t.onClick,B=o(function(){return"number"==typeof u?u:x[u]||16},[u]),C=o(function(){if(n)return n;if(i){var r=b(i);return(null==r?void 0:r.path)||""}return""},[i,n]),N=o(function(){if("0 0 24 24"!==l)return l;if(i){var r=b(i);return(null==r?void 0:r.viewBox)||"0 0 24 24"}return"0 0 24 24"},[i,l]);if(!C)return null;var L=r({width:B,height:B,fill:f,transform:h?"rotate(".concat(h,"deg)"):void 0},j);return e("div",{className:"icon-container icon-align-".concat(g," ").concat(y),children:e("svg",{viewBox:N,className:"icon ".concat(v?"icon-spin":""),style:L,onMouseEnter:function(r){d&&(r.currentTarget.style.fill=d)},onMouseLeave:function(r){d&&(r.currentTarget.style.fill=f)},onClick:k,children:e("path",{d:C})})})};export{j as default};
1
+ "use client";import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{useMemo as o}from"react";import{presetIcons as t,searchIcon as i,loadingIcon as n,userIcon as l,closeIcon as a,checkIcon as c,plusIcon as u,minusIcon as s,arrowLeftIcon as f,arrowRightIcon as d,arrowUpIcon as m,arrowDownIcon as v,leftIcon as h,rightIcon as p,doubleLeftIcon as g,doubleRightIcon as w}from"./path.js";var y={search:i,loading:n,user:l,close:a,check:c,plus:u,minus:s,arrowLeft:f,arrowRight:d,arrowUp:m,arrowDown:v,left:h,right:p,"double-left":g,"double-right":w},b=function(r){return y[r]?y[r]:t[r]},x={small:12,medium:16,large:24},j=function(t){var i=t.type,n=t.path,l=t.viewBox,a=void 0===l?"0 0 24 24":l,c=t.size,u=void 0===c?"medium":c,s=t.color,f=void 0===s?"#339af0":s,d=t.hoverColor,m=t.spin,v=void 0!==m&&m,h=t.rotate,p=t.align,g=void 0===p?"center":p,w=t.className,y=void 0===w?"":w,j=t.style,k=t.onClick,B=o(function(){return"number"==typeof u?u:x[u]||16},[u]),C=o(function(){if(n)return n;if(i){var r=b(i);return(null==r?void 0:r.path)||""}return""},[i,n]),N=o(function(){if("0 0 24 24"!==a)return a;if(i){var r=b(i);return(null==r?void 0:r.viewBox)||"0 0 24 24"}return"0 0 24 24"},[i,a]);if(!C)return null;var L=r({width:B,height:B,fill:f,transform:h?"rotate(".concat(h,"deg)"):void 0},j);return e("div",{className:"icon-container icon-align-".concat(g," ").concat(y),children:e("svg",{viewBox:N,className:"icon ".concat(v?"icon-spin":""),style:L,onMouseEnter:function(r){d&&(r.currentTarget.style.fill=d)},onMouseLeave:function(r){d&&(r.currentTarget.style.fill=f)},onClick:k,children:e("path",{d:C})})})};export{j as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import i from"../Icon/Icon.js";import{LayoutWrapper as r,HeaderWrapper as d,SiderWrapper as l,SiderContentWrapper as a,SiderTrigger as n,ContentWrapper as c,ZeroWidthTriggerInContent as s,FooterWrapper as h}from"./styles.js";import{LayoutProvider as m,useLayoutContext as u}from"./LayoutContext.js";var f=o.createContext({isNested:!1}),v=function(t){var o=t.className,i=void 0===o?"":o,r=t.style,l=void 0===r?{}:r,a=t.children,n=t.height,c=t.fixed,s=void 0!==c&&c,h=t.theme,m=void 0===h?"light":h,u=(null==l?void 0:l.background)||"#3030302b";return e(d,{className:"layout-header layout-header-".concat(m," ").concat(i),style:l,$height:n,$fixed:s,$theme:m,$bgColor:u,children:a})},p=function(r){var d=r.className,c=void 0===d?"":d,s=r.style,h=void 0===s?{}:s,m=r.children,v=r.width,p=void 0===v?200:v,y=r.collapsedWidth,$=void 0===y?60:y,g=r.collapsible,N=void 0!==g&&g,x=r.collapsed,C=void 0!==x&&x,b=r.onCollapse,W=r.trigger,w=r.triggerPlacement,z=void 0===w?"bottom":w,E=r.zeroWidthMode,j=void 0!==E&&E,k=r.fixed,M=void 0!==k&&k,S=r.theme,L=void 0===S?"light":S,I=o.useContext(f).isNested,P=u(),A=P.setSiderCollapsed,F=P.setZeroWidthMode,H=P.setOnExpand;o.useEffect(function(){A(C),F(j)},[C,j,A,F]);var O=function(){null==b||b(!C)};o.useEffect(function(){H(function(){return O})},[C,b,H]);var R=j&&C?0:$;return t(l,{className:"layout-sider ".concat(C?"collapsed":""," ").concat(c),style:h,$width:p,$collapsedWidth:R,$collapsed:C,$fixed:M,$theme:L,$inNestedLayout:I,children:[e(a,{children:m}),N&&e(n,{className:"layout-sider-trigger",$collapsed:C,$placement:j?"top":z,onClick:O,$zeroWidthMode:j,$theme:L,children:W||e(i,{type:C?"arrowRight":"arrowLeft",size:20,color:"dark"===L?"#fff":"rgba(0, 0, 0, 0.65)"})})]})},y=function(o){var r=o.className,d=void 0===r?"":r,l=o.style,a=void 0===l?{}:l,n=o.children,h=o.theme,m=void 0===h?"light":h,f=u(),v=f.siderCollapsed,p=f.zeroWidthMode,y=f.onExpand;return t(c,{className:"layout-content ".concat(d),style:a,$theme:m,children:[p&&v&&e(s,{onClick:y,children:e(i,{type:"menu",size:24,color:"#fff"})}),n]})},$=function(t){var o=t.className,i=void 0===o?"":o,r=t.style,d=void 0===r?{}:r,l=t.children,a=t.height,n=t.fixed,c=void 0!==n&&n,s=t.theme;return e(h,{className:"layout-footer ".concat(i),style:d,$height:a,$fixed:c,$theme:s,children:l})},g=function(t){var i=t.className,d=void 0===i?"":i,l=t.style,a=void 0===l?{}:l,n=t.children,c=t.hasSider,s=t.theme,h=void 0!==c?c:function(e){return!!e&&o.Children.toArray(e).some(function(e){return o.isValidElement(e)&&e.type===p})}(n);return e(m,{children:e(f.Provider,{value:{isNested:!0},children:e(r,{className:"layout-wrapper ".concat(d),style:a,$hasSider:h,$theme:s,children:n})})})};g.Header=v,g.Sider=p,g.Content=y,g.Footer=$;var N=g;export{y as Content,$ as Footer,v as Header,p as Sider,N as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import i from"../Icon/Icon.js";import{LayoutWrapper as l,HeaderWrapper as d,SiderWrapper as r,SiderContentWrapper as a,SiderTrigger as n,ContentWrapper as c,ZeroWidthTriggerInContent as s,FooterWrapper as h}from"./styles.js";import{LayoutProvider as u,useLayoutContext as m}from"./LayoutContext.js";var f=o.createContext({isNested:!1}),v=function(t){var o=t.className,i=void 0===o?"":o,l=t.style,r=void 0===l?{}:l,a=t.children,n=t.height,c=t.fixed,s=void 0!==c&&c,h=t.theme,u=void 0===h?"light":h,m=null!=u?u:"light",f=(null==r?void 0:r.background)||"#3030302b";return e(d,{className:"layout-header layout-header-".concat(m," ").concat(i),style:r,$height:n,$fixed:s,$theme:m,$bgColor:f,"data-theme":m,children:a})},p=function(l){var d=l.className,c=void 0===d?"":d,s=l.style,h=void 0===s?{}:s,u=l.children,v=l.width,p=void 0===v?200:v,y=l.collapsedWidth,g=void 0===y?60:y,$=l.collapsible,N=void 0!==$&&$,x=l.collapsed,C=void 0!==x&&x,b=l.onCollapse,E=l.trigger,W=l.triggerPlacement,w=void 0===W?"bottom":W,z=l.zeroWidthMode,S=void 0!==z&&z,j=l.fixed,k=void 0!==j&&j,M=l.theme,L=void 0===M?"light":M,I=null!=L?L:"light",P=o.useContext(f).isNested,A=m(),F=A.setSiderCollapsed,H=A.setZeroWidthMode,O=A.setOnExpand;o.useEffect(function(){F(C),H(S)},[C,S,F,H]);var R=function(){null==b||b(!C)};o.useEffect(function(){O(function(){return R})},[C,b,O]);var V=S&&C?0:g;return t(r,{className:"layout-sider ".concat(C?"collapsed":""," ").concat(c),style:h,$width:p,$collapsedWidth:V,$collapsed:C,$fixed:k,$theme:I,$inNestedLayout:P,"data-theme":I,children:[e(a,{children:u}),N&&e(n,{className:"layout-sider-trigger",$collapsed:C,$placement:S?"top":w,onClick:R,$zeroWidthMode:S,$theme:I,children:E||e(i,{type:C?"arrowRight":"arrowLeft",size:20,color:"dark"===I?"#fff":"rgba(0, 0, 0, 0.65)"})})]})},y=function(o){var l=o.className,d=void 0===l?"":l,r=o.style,a=void 0===r?{}:r,n=o.children,h=o.theme,u=void 0===h?"light":h,f=null!=u?u:"light",v=m(),p=v.siderCollapsed,y=v.zeroWidthMode,g=v.onExpand;return t(c,{className:"layout-content ".concat(d),style:a,$theme:f,"data-theme":f,children:[y&&p&&e(s,{onClick:g,children:e(i,{type:"menu",size:24,color:"#fff"})}),n]})},g=function(t){var o=t.className,i=void 0===o?"":o,l=t.style,d=void 0===l?{}:l,r=t.children,a=t.height,n=t.fixed,c=void 0!==n&&n,s=t.theme,u=void 0===s?"light":s,m=null!=u?u:"light";return e(h,{className:"layout-footer ".concat(i),style:d,$height:a,$fixed:c,$theme:m,"data-theme":m,children:r})},$=function(t){var i=t.className,d=void 0===i?"":i,r=t.style,a=void 0===r?{}:r,n=t.children,c=t.hasSider,s=t.theme,h=void 0===s?"light":s,m=void 0!==c?c:function(e){return!!e&&o.Children.toArray(e).some(function(e){return o.isValidElement(e)&&e.type===p})}(n),v=o.useState(!1),y=v[0],g=v[1];return o.useEffect(function(){g(!0)},[]),e(u,{children:e(f.Provider,{value:{isNested:!0},children:e(l,{className:"layout-wrapper ".concat(d).concat(y?" layout-mounted":""),style:a,$hasSider:m,$theme:h,"data-theme":h,children:n})})})};$.Header=v,$.Sider=p,$.Content=y,$.Footer=g;var N=$;export{y as Content,g as Footer,v as Header,p as Sider,N as default};
@@ -1 +1 @@
1
- import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import o from"styled-components";var r=function(n,o){return"var(".concat(n,", ").concat(o,")")},e=o.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n min-height: ",";\n max-height: 100vh;\n background: ",";\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n flex: 1;\n\n &.layout-wrapper {\n /* 外部可通过 .layout-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n flex-direction: column;\n min-height: ",";\n max-height: 100vh;\n background: ",";\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n flex: 1;\n\n &.layout-wrapper {\n /* 外部可通过 .layout-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-min-height","100vh"),function(n){return"dark"===n.$theme?"linear-gradient(180deg, ".concat(r("--layout-bg-dark","#000")," 0%, ").concat(r("--zjpcy-text-color","rgba(0, 0, 0, 0.85)")," 100%)"):"linear-gradient(180deg, ".concat(r("--layout-bg-light","#f5f5f5")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return n.$hasSider&&"\n flex-direction: row;\n align-items: stretch;\n "}),t=o.header(u||(u=n(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n background: ",";\n color: ",";\n height: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-header-light {\n border-bottom: ",";\n }\n\n &.layout-header-dark {\n border-bottom: 1px solid transparent;\n }\n\n &.layout-header {\n /* 外部可通过 .layout-header 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n background: ",";\n color: ",";\n height: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-header-light {\n border-bottom: ",";\n }\n\n &.layout-header-dark {\n border-bottom: 1px solid transparent;\n }\n\n &.layout-header {\n /* 外部可通过 .layout-header 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-header-padding","0 24px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-header-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-header-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-header-color-dark","#fff"):r("--layout-header-color-light","rgba(0, 0, 0, 0.85)")},function(n){var o=n.$height;return"number"==typeof o?"".concat(o,"px"):o||r("--layout-header-height","60px")},r("--layout-header-z-index","10"),r("--layout-header-transition","all 0.2s ease-in-out"),function(n){var o=n.$bgColor;return"1px solid ".concat(o)},function(n){return n.$fixed&&"\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n box-shadow: ".concat(r("--layout-header-box-shadow","0 2px 8px rgba(0, 0, 0, 0.15)"),";\n ")}),a=o.aside(s||(s=n(["\n display: flex;\n flex-direction: column;\n background: ",";\n color: ",";\n z-index: ",";\n transition: ",";\n flex: ",";\n box-sizing: border-box;\n border-right: ",";\n box-shadow: ",";\n\n\n &.layout-sider {\n /* 外部可通过 .layout-sider 选择器覆盖样式 */\n }\n\n /* 让子元素占据剩余空间,使 trigger 可以固定在底部 */\n & > *:not(.layout-sider-trigger) {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n ","\n\n ","\n\n /* ============================================\n 集成 Menu 组件样式 - 与 Menu.css 保持一致\n ============================================ */\n \n /* 覆盖 Menu 组件基础样式 */\n .zjpcy-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .zjpcy-menu-item {\n border-radius: ",";\n \n /* Light 主题 - 与 Menu.css 保持一致 */\n &.light {\n color: ",";\n \n &:hover:not(.disabled) {\n background: ",";\n color: ",";\n }\n \n &.selected {\n background-color: ",";\n color: ",";\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: ",";\n }\n }\n }\n \n /* Dark 主题 - 与 Menu.css 保持一致 */\n &.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: rgba(24, 144, 255, 0.35);\n }\n }\n }\n }\n\n /* 子菜单样式 */\n .zjpcy-menu-submenu {\n .zjpcy-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .zjpcy-menu-submenu.horizontal-popup,\n .zjpcy-menu-submenu.horizontal-popup .zjpcy-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .zjpcy-menu-submenu .zjpcy-menu-item.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n }\n }\n"],["\n display: flex;\n flex-direction: column;\n background: ",";\n color: ",";\n z-index: ",";\n transition: ",";\n flex: ",";\n box-sizing: border-box;\n border-right: ",";\n box-shadow: ",";\n\n\n &.layout-sider {\n /* 外部可通过 .layout-sider 选择器覆盖样式 */\n }\n\n /* 让子元素占据剩余空间,使 trigger 可以固定在底部 */\n & > *:not(.layout-sider-trigger) {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n ","\n\n ","\n\n /* ============================================\n 集成 Menu 组件样式 - 与 Menu.css 保持一致\n ============================================ */\n \n /* 覆盖 Menu 组件基础样式 */\n .zjpcy-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .zjpcy-menu-item {\n border-radius: ",";\n \n /* Light 主题 - 与 Menu.css 保持一致 */\n &.light {\n color: ",";\n \n &:hover:not(.disabled) {\n background: ",";\n color: ",";\n }\n \n &.selected {\n background-color: ",";\n color: ",";\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: ",";\n }\n }\n }\n \n /* Dark 主题 - 与 Menu.css 保持一致 */\n &.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: rgba(24, 144, 255, 0.35);\n }\n }\n }\n }\n\n /* 子菜单样式 */\n .zjpcy-menu-submenu {\n .zjpcy-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .zjpcy-menu-submenu.horizontal-popup,\n .zjpcy-menu-submenu.horizontal-popup .zjpcy-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .zjpcy-menu-submenu .zjpcy-menu-item.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n }\n }\n"])),function(n){var o=n.$theme,e=n.style;return void 0!==(null==e?void 0:e.background)?e.background:"dark"===o?"linear-gradient(180deg, ".concat(r("--layout-sider-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(180deg, ".concat(r("--layout-sider-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){var o=n.$theme,e=n.style;return void 0!==(null==e?void 0:e.color)?e.color:"dark"===o?r("--layout-sider-color-dark","#fff"):r("--layout-sider-color-light","rgba(0, 0, 0, 0.85)")},r("--layout-sider-z-index","10"),r("--layout-sider-transition","all 0.2s ease-in-out"),r("--layout-sider-flex","0 0 200px"),function(n){return"dark"===n.$theme?"var(--layout-sider-border, 1px solid #303030)":"var(--layout-sider-border, 1px solid ".concat(r("--zjpcy-border-color-light","#f0f0f0"),")")},function(n){return"dark"===n.$theme?"2px 0 8px rgba(0, 0, 0, 0.3)":r("--zjpcy-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.08)")},function(n){var o=n.$width,e=n.$collapsedWidth,t=n.$collapsed,a="number"==typeof o?"".concat(o,"px"):o||r("--layout-sider-width","200px"),i=void 0!==e?"".concat(e,"px"):r("--layout-sider-collapsed-width","60px");return"\n width: ".concat(t?i:a,";\n min-width: ").concat(t?i:a,";\n max-width: ").concat(t?i:a,";\n ")},function(n){return n.$fixed&&"\n position: fixed;\n top: ".concat(r("--layout-header-height","64px"),";\n left: 0;\n bottom: 0;\n overflow-y: auto;\n box-shadow: ").concat(r("--layout-sider-box-shadow","0 4px 12px rgba(0, 0, 0, 0.15)"),";\n ")},r("--zjpcy-border-radius-sm","4px"),r("--zjpcy-text-color","rgba(0, 0, 0, 0.85)"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.06)"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.12)"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.18)"),r("--zjpcy-primary-color","#1890ff")),i=o.div(g||(g=n(["\n flex: 1;\n overflow-y: auto;\n overflow-x: ",";\n\n /* 内容过渡动画 */\n & > * {\n transition: all "," ease;\n }\n\n /* 收缩状态下的内容样式 */\n ","\n"],["\n flex: 1;\n overflow-y: auto;\n overflow-x: ",";\n\n /* 内容过渡动画 */\n & > * {\n transition: all "," ease;\n }\n\n /* 收缩状态下的内容样式 */\n ","\n"])),function(n){return n.$collapsed?"visible":"hidden"},r("--zjpcy-transition-duration","0.2s"),function(n){return n.$collapsed&&"\n & > * {\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "}),l=o.div(f||(f=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ",";\n background: ",";\n color: ",";\n cursor: pointer;\n transition: ",";\n user-select: none;\n order: ",";\n\n &.layout-sider-trigger {\n /* 外部可通过 .layout-sider-trigger 选择器覆盖样式 */\n }\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n /* 分割线 */\n ","\n\n ","\n\n /* 零宽度模式下,收缩时隐藏触发器 */\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ",";\n background: ",";\n color: ",";\n cursor: pointer;\n transition: ",";\n user-select: none;\n order: ",";\n\n &.layout-sider-trigger {\n /* 外部可通过 .layout-sider-trigger 选择器覆盖样式 */\n }\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n /* 分割线 */\n ","\n\n ","\n\n /* 零宽度模式下,收缩时隐藏触发器 */\n ","\n"])),r("--layout-trigger-height","48px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-sider-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-sider-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-sider-color-dark","#fff"):r("--layout-sider-color-light","rgba(0, 0, 0, 0.85)")},r("--layout-trigger-transition","all 0.2s ease-in-out"),function(n){return"top"===n.$placement?"-1":"auto"},function(n){return"dark"===n.$theme?"linear-gradient(135deg, #002140 0%, ".concat(r("--zjpcy-primary-color","#1890ff")," 100%)"):"linear-gradient(135deg, ".concat(r("--zjpcy-primary-light-color","rgba(24, 100, 240, 0.1)")," 0%, ").concat(r("--zjpcy-bg-color-light","#f5f5f5")," 100%)")},function(n){return"dark"===n.$theme?"#fff":r("--zjpcy-primary-color","#1890ff")},function(n){var o=n.$placement,e=n.$theme;return"top"===o&&"\n border-bottom: 1px solid ".concat("dark"===e?"#303030":r("--zjpcy-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$placement,e=n.$theme;return"top"!==o&&"\n border-top: 1px solid ".concat("dark"===e?"#303030":r("--zjpcy-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$zeroWidthMode,r=n.$collapsed;return o&&r&&"\n display: none;\n "}),c=o.div(b||(b=n(["\n position: absolute;\n top: 16px;\n left: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, "," 0%, "," 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: ",";\n z-index: 100;\n transition: all "," ",";\n\n &:hover {\n background: linear-gradient(135deg, "," 0%, #69c0ff 100%);\n box-shadow: ",";\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n box-shadow: ",";\n }\n"],["\n position: absolute;\n top: 16px;\n left: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, "," 0%, "," 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: ",";\n z-index: 100;\n transition: all "," ",";\n\n &:hover {\n background: linear-gradient(135deg, "," 0%, #69c0ff 100%);\n box-shadow: ",";\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n box-shadow: ",";\n }\n"])),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-hover-color","#40a9ff"),r("--zjpcy-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.15)"),r("--zjpcy-transition-duration","0.2s"),r("--zjpcy-transition-timing-function","ease-in-out"),r("--zjpcy-primary-hover-color","#40a9ff"),r("--zjpcy-shadow-md","0 4px 12px rgba(0, 0, 0, 0.25)"),r("--zjpcy-shadow-extra-light","0 2px 8px rgba(0, 0, 0, 0.08)"));o.div(p||(p=n(["\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n\n ","\n"],["\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n\n ","\n"])),function(n){return n.$hasSider&&"\n flex-direction: row;\n "});var d,u,s,g,f,b,p,h,y,x=o.main(h||(h=n(["\n flex: 1;\n padding: ",";\n background: ",";\n min-height: ",";\n transition: ",";\n overflow-y: auto;\n box-sizing: border-box;\n position: relative;\n\n &.layout-content {\n /* 外部可通过 .layout-content 选择器覆盖样式 */\n }\n\n ","\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ",";\n border-radius: ",";\n transition: background-color "," ease;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n\n /* Dark 主题滚动条样式 */\n ","\n"],["\n flex: 1;\n padding: ",";\n background: ",";\n min-height: ",";\n transition: ",";\n overflow-y: auto;\n box-sizing: border-box;\n position: relative;\n\n &.layout-content {\n /* 外部可通过 .layout-content 选择器覆盖样式 */\n }\n\n ","\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ",";\n border-radius: ",";\n transition: background-color "," ease;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n\n /* Dark 主题滚动条样式 */\n ","\n"])),r("--layout-content-padding","24px"),r("--layout-content-bg","transparent"),r("--layout-content-min-height","280px"),r("--layout-content-transition","all 0.2s ease-in-out"),function(n){return n.$fixed&&"\n overflow-y: auto;\n "},r("--zjpcy-border-color-extra-light","#d9d9d9"),r("--zjpcy-border-radius-sm","4px"),r("--zjpcy-transition-duration","0.2s"),r("--zjpcy-text-color-tertiary","rgba(0, 0, 0, 0.45)"),function(n){return"dark"===n.$theme&&"\n &::-webkit-scrollbar-thumb {\n background-color: color-mix(in srgb, ".concat(r("--zjpcy-primary-color","#1890ff")," 50%, transparent);\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: color-mix(in srgb, ").concat(r("--zjpcy-primary-color","#1890ff")," 70%, transparent);\n }\n\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, ").concat(r("--zjpcy-primary-color","#1890ff")," 50%, transparent) transparent;\n ")}),m=o.footer(y||(y=n(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n background: ",";\n color: ",";\n height: ",";\n border-top: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-footer {\n /* 外部可通过 .layout-footer 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n background: ",";\n color: ",";\n height: ",";\n border-top: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-footer {\n /* 外部可通过 .layout-footer 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-footer-padding","24px 50px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-footer-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-footer-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-footer-color-dark","#fff"):r("--layout-footer-color-light","rgba(0, 0, 0, 0.85)")},function(n){var o=n.$height;return"number"==typeof o?"".concat(o,"px"):o||r("--layout-footer-height","48px")},function(n){return"dark"===n.$theme?"var(--layout-footer-border, 1px solid #303030)":"var(--layout-footer-border, 1px solid ".concat(r("--zjpcy-border-color-light","#f0f0f0"),")")},r("--layout-footer-z-index","10"),r("--layout-footer-transition","all 0.2s ease-in-out"),function(n){return n.$fixed&&"\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);\n "});export{x as ContentWrapper,m as FooterWrapper,t as HeaderWrapper,e as LayoutWrapper,i as SiderContentWrapper,l as SiderTrigger,a as SiderWrapper,c as ZeroWidthTriggerInContent};
1
+ import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import o from"styled-components";var r=function(n,o){return"var(".concat(n,", ").concat(o,")")},e=o.div(d||(d=n(["\n display: flex;\n flex-direction: column;\n min-height: ",";\n max-height: 100vh;\n /* 使用更明确的默认值,避免 SSR 时 theme 为 undefined 导致黑色背景闪烁 */\n background: ",";\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n flex: 1;\n\n /* SSR 安全:确保服务端和客户端初始渲染一致 */\n @media (prefers-color-scheme: dark) {\n /* 在暗色模式下默认使用 light 主题避免闪烁,由 JS 控制实际主题 */\n }\n\n &.layout-wrapper {\n /* 外部可通过 .layout-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n flex-direction: column;\n min-height: ",";\n max-height: 100vh;\n /* 使用更明确的默认值,避免 SSR 时 theme 为 undefined 导致黑色背景闪烁 */\n background: ",";\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n flex: 1;\n\n /* SSR 安全:确保服务端和客户端初始渲染一致 */\n @media (prefers-color-scheme: dark) {\n /* 在暗色模式下默认使用 light 主题避免闪烁,由 JS 控制实际主题 */\n }\n\n &.layout-wrapper {\n /* 外部可通过 .layout-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-min-height","100vh"),function(n){return"dark"===n.$theme?"linear-gradient(180deg, ".concat(r("--layout-bg-dark","#001529")," 0%, ").concat(r("--zjpcy-text-color","rgba(0, 0, 0, 0.85)")," 100%)"):"linear-gradient(180deg, ".concat(r("--layout-bg-light","#f5f5f5")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return n.$hasSider&&"\n flex-direction: row;\n align-items: stretch;\n "}),t=o.header(u||(u=n(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* 确保默认使用亮色主题,避免 SSR 闪烁 */\n background: ",";\n color: ",";\n height: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-header-light {\n border-bottom: ",";\n }\n\n &.layout-header-dark {\n border-bottom: 1px solid transparent;\n }\n\n &.layout-header {\n /* 外部可通过 .layout-header 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* 确保默认使用亮色主题,避免 SSR 闪烁 */\n background: ",";\n color: ",";\n height: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-header-light {\n border-bottom: ",";\n }\n\n &.layout-header-dark {\n border-bottom: 1px solid transparent;\n }\n\n &.layout-header {\n /* 外部可通过 .layout-header 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-header-padding","0 24px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-header-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-header-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-header-color-dark","#fff"):r("--layout-header-color-light","rgba(0, 0, 0, 0.85)")},function(n){var o=n.$height;return"number"==typeof o?"".concat(o,"px"):o||r("--layout-header-height","60px")},r("--layout-header-z-index","10"),r("--layout-header-transition","all 0.2s ease-in-out"),function(n){var o=n.$bgColor;return"1px solid ".concat(o)},function(n){return n.$fixed&&"\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n box-shadow: ".concat(r("--layout-header-box-shadow","0 2px 8px rgba(0, 0, 0, 0.15)"),";\n ")}),a=o.aside(s||(s=n(["\n display: flex;\n flex-direction: column;\n /* SSR 安全:明确处理 theme 为 undefined 的情况,默认使用亮色主题 */\n background: ",";\n color: ",";\n z-index: ",";\n transition: ",";\n flex: ",";\n box-sizing: border-box;\n border-right: ",";\n box-shadow: ",";\n\n\n &.layout-sider {\n /* 外部可通过 .layout-sider 选择器覆盖样式 */\n }\n\n /* 让子元素占据剩余空间,使 trigger 可以固定在底部 */\n & > *:not(.layout-sider-trigger) {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n ","\n\n ","\n\n /* ============================================\n 集成 Menu 组件样式 - 与 Menu.css 保持一致\n ============================================ */\n \n /* 覆盖 Menu 组件基础样式 */\n .zjpcy-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .zjpcy-menu-item {\n border-radius: ",";\n \n /* Light 主题 - 与 Menu.css 保持一致 */\n &.light {\n color: ",";\n \n &:hover:not(.disabled) {\n background: ",";\n color: ",";\n }\n \n &.selected {\n background-color: ",";\n color: ",";\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: ",";\n }\n }\n }\n \n /* Dark 主题 - 与 Menu.css 保持一致 */\n &.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: rgba(24, 144, 255, 0.35);\n }\n }\n }\n }\n\n /* 子菜单样式 */\n .zjpcy-menu-submenu {\n .zjpcy-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .zjpcy-menu-submenu.horizontal-popup,\n .zjpcy-menu-submenu.horizontal-popup .zjpcy-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .zjpcy-menu-submenu .zjpcy-menu-item.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n }\n }\n"],["\n display: flex;\n flex-direction: column;\n /* SSR 安全:明确处理 theme 为 undefined 的情况,默认使用亮色主题 */\n background: ",";\n color: ",";\n z-index: ",";\n transition: ",";\n flex: ",";\n box-sizing: border-box;\n border-right: ",";\n box-shadow: ",";\n\n\n &.layout-sider {\n /* 外部可通过 .layout-sider 选择器覆盖样式 */\n }\n\n /* 让子元素占据剩余空间,使 trigger 可以固定在底部 */\n & > *:not(.layout-sider-trigger) {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n ","\n\n ","\n\n /* ============================================\n 集成 Menu 组件样式 - 与 Menu.css 保持一致\n ============================================ */\n \n /* 覆盖 Menu 组件基础样式 */\n .zjpcy-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .zjpcy-menu-item {\n border-radius: ",";\n \n /* Light 主题 - 与 Menu.css 保持一致 */\n &.light {\n color: ",";\n \n &:hover:not(.disabled) {\n background: ",";\n color: ",";\n }\n \n &.selected {\n background-color: ",";\n color: ",";\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: ",";\n }\n }\n }\n \n /* Dark 主题 - 与 Menu.css 保持一致 */\n &.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n box-shadow: inset 3px 0 0 ",";\n font-weight: 600;\n \n &:hover {\n background-color: rgba(24, 144, 255, 0.35);\n }\n }\n }\n }\n\n /* 子菜单样式 */\n .zjpcy-menu-submenu {\n .zjpcy-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .zjpcy-menu-submenu.horizontal-popup,\n .zjpcy-menu-submenu.horizontal-popup .zjpcy-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .zjpcy-menu-submenu .zjpcy-menu-item.dark {\n color: rgba(255, 255, 255, 0.85);\n \n &:hover:not(.disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #fff;\n }\n \n &.selected {\n background-color: rgba(24, 144, 255, 0.25);\n color: #fff;\n }\n }\n"])),function(n){var o=n.$theme,e=n.style;return void 0!==(null==e?void 0:e.background)?e.background:"dark"===o?"linear-gradient(180deg, ".concat(r("--layout-sider-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(180deg, ".concat(r("--layout-sider-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){var o=n.$theme,e=n.style;return void 0!==(null==e?void 0:e.color)?e.color:"dark"===o?r("--layout-sider-color-dark","#fff"):r("--layout-sider-color-light","rgba(0, 0, 0, 0.85)")},r("--layout-sider-z-index","10"),r("--layout-sider-transition","all 0.2s ease-in-out"),r("--layout-sider-flex","0 0 200px"),function(n){return"dark"===n.$theme?"var(--layout-sider-border, 1px solid #303030)":"var(--layout-sider-border, 1px solid ".concat(r("--zjpcy-border-color-light","#f0f0f0"),")")},function(n){return"dark"===n.$theme?"2px 0 8px rgba(0, 0, 0, 0.3)":r("--zjpcy-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.08)")},function(n){var o=n.$width,e=n.$collapsedWidth,t=n.$collapsed,a="number"==typeof o?"".concat(o,"px"):o||r("--layout-sider-width","200px"),i=void 0!==e?"".concat(e,"px"):r("--layout-sider-collapsed-width","60px");return"\n width: ".concat(t?i:a,";\n min-width: ").concat(t?i:a,";\n max-width: ").concat(t?i:a,";\n ")},function(n){return n.$fixed&&"\n position: fixed;\n top: ".concat(r("--layout-header-height","64px"),";\n left: 0;\n bottom: 0;\n overflow-y: auto;\n box-shadow: ").concat(r("--layout-sider-box-shadow","0 4px 12px rgba(0, 0, 0, 0.15)"),";\n ")},r("--zjpcy-border-radius-sm","4px"),r("--zjpcy-text-color","rgba(0, 0, 0, 0.85)"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.06)"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.12)"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-light-color","rgba(24, 144, 255, 0.18)"),r("--zjpcy-primary-color","#1890ff")),i=o.div(g||(g=n(["\n flex: 1;\n overflow-y: auto;\n overflow-x: ",";\n\n /* 内容过渡动画 */\n & > * {\n transition: all "," ease;\n }\n\n /* 收缩状态下的内容样式 */\n ","\n"],["\n flex: 1;\n overflow-y: auto;\n overflow-x: ",";\n\n /* 内容过渡动画 */\n & > * {\n transition: all "," ease;\n }\n\n /* 收缩状态下的内容样式 */\n ","\n"])),function(n){return n.$collapsed?"visible":"hidden"},r("--zjpcy-transition-duration","0.2s"),function(n){return n.$collapsed&&"\n & > * {\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "}),l=o.div(f||(f=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n cursor: pointer;\n transition: ",";\n user-select: none;\n order: ",";\n\n &.layout-sider-trigger {\n /* 外部可通过 .layout-sider-trigger 选择器覆盖样式 */\n }\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n /* 分割线 */\n ","\n\n ","\n\n /* 零宽度模式下,收缩时隐藏触发器 */\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n cursor: pointer;\n transition: ",";\n user-select: none;\n order: ",";\n\n &.layout-sider-trigger {\n /* 外部可通过 .layout-sider-trigger 选择器覆盖样式 */\n }\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n /* 分割线 */\n ","\n\n ","\n\n /* 零宽度模式下,收缩时隐藏触发器 */\n ","\n"])),r("--layout-trigger-height","48px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-sider-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-sider-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-sider-color-dark","#fff"):r("--layout-sider-color-light","rgba(0, 0, 0, 0.85)")},r("--layout-trigger-transition","all 0.2s ease-in-out"),function(n){return"top"===n.$placement?"-1":"auto"},function(n){return"dark"===n.$theme?"linear-gradient(135deg, #002140 0%, ".concat(r("--zjpcy-primary-color","#1890ff")," 100%)"):"linear-gradient(135deg, ".concat(r("--zjpcy-primary-light-color","rgba(24, 100, 240, 0.1)")," 0%, ").concat(r("--zjpcy-bg-color-light","#f5f5f5")," 100%)")},function(n){return"dark"===n.$theme?"#fff":r("--zjpcy-primary-color","#1890ff")},function(n){var o=n.$placement,e=n.$theme;return"top"===o&&"\n border-bottom: 1px solid ".concat("dark"===e?"#303030":r("--zjpcy-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$placement,e=n.$theme;return"top"!==o&&"\n border-top: 1px solid ".concat("dark"===e?"#303030":r("--zjpcy-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$zeroWidthMode,r=n.$collapsed;return o&&r&&"\n display: none;\n "}),c=o.div(b||(b=n(["\n position: absolute;\n top: 16px;\n left: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, "," 0%, "," 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: ",";\n z-index: 100;\n transition: all "," ",";\n\n &:hover {\n background: linear-gradient(135deg, "," 0%, #69c0ff 100%);\n box-shadow: ",";\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n box-shadow: ",";\n }\n"],["\n position: absolute;\n top: 16px;\n left: 16px;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: linear-gradient(135deg, "," 0%, "," 100%);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: ",";\n z-index: 100;\n transition: all "," ",";\n\n &:hover {\n background: linear-gradient(135deg, "," 0%, #69c0ff 100%);\n box-shadow: ",";\n transform: scale(1.05);\n }\n\n &:active {\n transform: scale(0.95);\n box-shadow: ",";\n }\n"])),r("--zjpcy-primary-color","#1890ff"),r("--zjpcy-primary-hover-color","#40a9ff"),r("--zjpcy-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.15)"),r("--zjpcy-transition-duration","0.2s"),r("--zjpcy-transition-timing-function","ease-in-out"),r("--zjpcy-primary-hover-color","#40a9ff"),r("--zjpcy-shadow-md","0 4px 12px rgba(0, 0, 0, 0.25)"),r("--zjpcy-shadow-extra-light","0 2px 8px rgba(0, 0, 0, 0.08)"));o.div(p||(p=n(["\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n\n ","\n"],["\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n\n ","\n"])),function(n){return n.$hasSider&&"\n flex-direction: row;\n "});var d,u,s,g,f,b,p,h,y,x=o.main(h||(h=n(["\n flex: 1;\n padding: ",";\n background: ",";\n min-height: ",";\n transition: ",";\n overflow-y: auto;\n box-sizing: border-box;\n position: relative;\n\n &.layout-content {\n /* 外部可通过 .layout-content 选择器覆盖样式 */\n }\n\n ","\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ",";\n border-radius: ",";\n transition: background-color "," ease;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n\n /* Dark 主题滚动条样式 */\n ","\n"],["\n flex: 1;\n padding: ",";\n background: ",";\n min-height: ",";\n transition: ",";\n overflow-y: auto;\n box-sizing: border-box;\n position: relative;\n\n &.layout-content {\n /* 外部可通过 .layout-content 选择器覆盖样式 */\n }\n\n ","\n\n /* 滚动条样式 */\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ",";\n border-radius: ",";\n transition: background-color "," ease;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ",";\n }\n\n /* Dark 主题滚动条样式 */\n ","\n"])),r("--layout-content-padding","24px"),r("--layout-content-bg","transparent"),r("--layout-content-min-height","280px"),r("--layout-content-transition","all 0.2s ease-in-out"),function(n){return n.$fixed&&"\n overflow-y: auto;\n "},r("--zjpcy-border-color-extra-light","#d9d9d9"),r("--zjpcy-border-radius-sm","4px"),r("--zjpcy-transition-duration","0.2s"),r("--zjpcy-text-color-tertiary","rgba(0, 0, 0, 0.45)"),function(n){return"dark"===n.$theme&&"\n &::-webkit-scrollbar-thumb {\n background-color: color-mix(in srgb, ".concat(r("--zjpcy-primary-color","#1890ff")," 50%, transparent);\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: color-mix(in srgb, ").concat(r("--zjpcy-primary-color","#1890ff")," 70%, transparent);\n }\n\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, ").concat(r("--zjpcy-primary-color","#1890ff")," 50%, transparent) transparent;\n ")}),m=o.footer(y||(y=n(["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n height: ",";\n border-top: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-footer {\n /* 外部可通过 .layout-footer 选择器覆盖样式 */\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n flex-shrink: 0;\n padding: ",";\n /* SSR 安全:默认使用亮色主题 */\n background: ",";\n color: ",";\n height: ",";\n border-top: ",";\n z-index: ",";\n transition: ",";\n box-sizing: border-box;\n\n &.layout-footer {\n /* 外部可通过 .layout-footer 选择器覆盖样式 */\n }\n\n ","\n"])),r("--layout-footer-padding","24px 50px"),function(n){return"dark"===n.$theme?"linear-gradient(135deg, ".concat(r("--layout-footer-bg-dark","#001529")," 0%, #002140 100%)"):"linear-gradient(135deg, ".concat(r("--layout-footer-bg-light","#fff")," 0%, ").concat(r("--zjpcy-bg-color","#fafafa")," 100%)")},function(n){return"dark"===n.$theme?r("--layout-footer-color-dark","#fff"):r("--layout-footer-color-light","rgba(0, 0, 0, 0.85)")},function(n){var o=n.$height;return"number"==typeof o?"".concat(o,"px"):o||r("--layout-footer-height","48px")},function(n){return"dark"===n.$theme?"var(--layout-footer-border, 1px solid #303030)":"var(--layout-footer-border, 1px solid ".concat(r("--zjpcy-border-color-light","#f0f0f0"),")")},r("--layout-footer-z-index","10"),r("--layout-footer-transition","all 0.2s ease-in-out"),function(n){return n.$fixed&&"\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);\n "});export{x as ContentWrapper,m as FooterWrapper,t as HeaderWrapper,e as LayoutWrapper,i as SiderContentWrapper,l as SiderTrigger,a as SiderWrapper,c as ZeroWidthTriggerInContent};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as t,useEffect as i}from"react";import{IoClose as o}from"../node_modules/react-icons/io5/index.js";var c=function(c){var a=c.announcement,u=c.height,s=void 0===u?40:u,l=c.speed,f=void 0===l?50:l,d=c.backgroundColor,m=void 0===d?"linear-gradient(to right, #e8eaf6 0%, #f5f5f5 50%, #e8eaf6 100%)":d,v=c.visible,p=void 0===v||v,h=c.fixed,x=void 0!==h&&h,g=c.fixedTop,y=void 0===g?0:g,q=c.isIcon,A=void 0===q||q,L=c.onClose;if(!a)return null;var E=r(!0),F=E[0],b=E[1],k=p&&F,C=t(null),N=t(null),W=t(void 0),j=t(!1),M=t(!0);return i(function(){if(k&&C.current&&N.current){var e=C.current,n=N.current;n.style.left="".concat(e.offsetWidth,"px");var r=function(){if(M.current&&n)if(j.current)W.current=requestAnimationFrame(r);else{var t=parseFloat(n.style.left)||0;t<-n.offsetWidth?n.style.left="".concat(e.offsetWidth,"px"):n.style.left="".concat(t-f/100,"px"),W.current=requestAnimationFrame(r)}};W.current=requestAnimationFrame(r);var t=function(){j.current=!0},i=function(){j.current=!1};return e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",i),function(){W.current&&cancelAnimationFrame(W.current),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",i)}}},[f,a,k]),k?e("div",{ref:C,className:"marquee-container ".concat(x?"marquee-container-fixed":""),style:{height:"".concat(s,"px"),background:m,top:x?"".concat(y,"px"):void 0},children:[n("div",{ref:N,className:"marquee-text",children:Array.isArray(a)?n("span",{children:a.map(function(r,t){return e("span",{style:0==t?{}:{marginLeft:"100px"},children:[n("span",{style:{marginRight:"5px"},children:A?"📢":null}),r]},t)})}):a}),n("div",{className:"marquee-close",style:{height:"".concat(s,"px"),width:"45px",background:m},onClick:function(){M.current=!1,b(!1),L&&L()},onMouseEnter:function(){j.current=!0},onMouseLeave:function(){j.current=!1},children:n(o,{size:18,color:"#666"})})]}):null};export{c as default};
1
+ "use client";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as t,useEffect as i}from"react";import{IoClose as o}from"../node_modules/react-icons/io5/index.js";var c=function(c){var a=c.announcement,u=c.height,s=void 0===u?40:u,l=c.speed,f=void 0===l?50:l,d=c.backgroundColor,m=void 0===d?"linear-gradient(to right, #e8eaf6 0%, #f5f5f5 50%, #e8eaf6 100%)":d,v=c.visible,p=void 0===v||v,h=c.fixed,x=void 0!==h&&h,g=c.fixedTop,y=void 0===g?0:g,q=c.isIcon,A=void 0===q||q,L=c.onClose;if(!a)return null;var E=r(!0),F=E[0],b=E[1],k=p&&F,C=t(null),N=t(null),W=t(void 0),j=t(!1),M=t(!0);return i(function(){if(k&&C.current&&N.current){var e=C.current,n=N.current;n.style.left="".concat(e.offsetWidth,"px");var r=function(){if(M.current&&n)if(j.current)W.current=requestAnimationFrame(r);else{var t=parseFloat(n.style.left)||0;t<-n.offsetWidth?n.style.left="".concat(e.offsetWidth,"px"):n.style.left="".concat(t-f/100,"px"),W.current=requestAnimationFrame(r)}};W.current=requestAnimationFrame(r);var t=function(){j.current=!0},i=function(){j.current=!1};return e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",i),function(){W.current&&cancelAnimationFrame(W.current),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",i)}}},[f,a,k]),k?e("div",{ref:C,className:"marquee-container ".concat(x?"marquee-container-fixed":""),style:{height:"".concat(s,"px"),background:m,top:x?"".concat(y,"px"):void 0},children:[n("div",{ref:N,className:"marquee-text",children:Array.isArray(a)?n("span",{children:a.map(function(r,t){return e("span",{style:0==t?{}:{marginLeft:"100px"},children:[n("span",{style:{marginRight:"5px"},children:A?"📢":null}),r]},t)})}):a}),n("div",{className:"marquee-close",style:{height:"".concat(s,"px"),width:"45px",background:m},onClick:function(){M.current=!1,b(!1),L&&L()},onMouseEnter:function(){j.current=!0},onMouseLeave:function(){j.current=!1},children:n(o,{size:18,color:"#666"})})]}):null};export{c as default};
@@ -1 +1 @@
1
- import{__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as t}from"react/jsx-runtime";import{useRef as e,useState as r,useEffect as o,useMemo as c}from"react";var i=function(i){var u=i.items,a=i.columns,s=void 0===a?3:a,l=i.gutter,m=void 0===l?20:l,f=i.className,y=i.style,d=i.classNames,p=void 0===d?{}:d,v=i.styles,h=void 0===v?{}:v,x=i.onLayoutChange,j=e(null),w=r(3),g=w[0],N=w[1],b=r(20),z=b[0],A=b[1],E=function(n,t,e){if(null!==n&&"object"==typeof n&&!Array.isArray(n)){for(var r=n,o=0,c=Object.keys(r).map(Number).sort(function(n,t){return t-n});o<c.length;o++){var i=c[o];if(e>=i&&r.hasOwnProperty(i))return r[i]}return t}return n};o(function(){var n,t=function(){clearTimeout(n),n=window.setTimeout(function(){if(j.current){var n=j.current.offsetWidth,t=E(s,3,n),e=E(m,20,n);N(t),A(e),x&&x(t,u)}},100)};return t(),window.addEventListener("resize",t),function(){clearTimeout(n),window.removeEventListener("resize",t)}},[s,m,u,x]);var L=c(function(){var n=Array.from({length:g},function(){return[]});return u.filter(function(t){return!(void 0!==t.column&&t.column>=0&&t.column<g)||(n[t.column].push(t),!1)}).forEach(function(t,e){n[e%g].push(t)}),n},[u,g]),T=function(n,t){var e=p[n];return"function"==typeof e?e(t):e||""},k=function(n,t){var e=h[n];return"function"==typeof e?e(t):e||{}};return t("div",{ref:j,className:"zjpcy-masonry ".concat(f||""," ").concat(T("container",0)),style:n(n({display:"flex",gap:"".concat(z,"px")},y),k("container",0)),children:L.map(function(e,r){return t("div",{className:"zjpcy-masonry-column ".concat(T("column",r)),style:n({flex:1,display:"flex",flexDirection:"column",gap:"".concat(z,"px")},k("column",r)),children:e.map(function(e,r){return t("div",{className:"zjpcy-masonry-item ".concat(T("item",r)),style:n({},k("item",r)),children:e.content},e.key)})},"column-".concat(r))})})};export{i as default};
1
+ "use client";import{__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as t}from"react/jsx-runtime";import{useRef as e,useState as r,useEffect as o,useMemo as c}from"react";var i=function(i){var u=i.items,a=i.columns,s=void 0===a?3:a,l=i.gutter,m=void 0===l?20:l,f=i.className,y=i.style,d=i.classNames,p=void 0===d?{}:d,v=i.styles,h=void 0===v?{}:v,x=i.onLayoutChange,j=e(null),w=r(3),g=w[0],N=w[1],b=r(20),z=b[0],A=b[1],E=function(n,t,e){if(null!==n&&"object"==typeof n&&!Array.isArray(n)){for(var r=n,o=0,c=Object.keys(r).map(Number).sort(function(n,t){return t-n});o<c.length;o++){var i=c[o];if(e>=i&&r.hasOwnProperty(i))return r[i]}return t}return n};o(function(){var n,t=function(){clearTimeout(n),n=window.setTimeout(function(){if(j.current){var n=j.current.offsetWidth,t=E(s,3,n),e=E(m,20,n);N(t),A(e),x&&x(t,u)}},100)};return t(),window.addEventListener("resize",t),function(){clearTimeout(n),window.removeEventListener("resize",t)}},[s,m,u,x]);var L=c(function(){var n=Array.from({length:g},function(){return[]});return u.filter(function(t){return!(void 0!==t.column&&t.column>=0&&t.column<g)||(n[t.column].push(t),!1)}).forEach(function(t,e){n[e%g].push(t)}),n},[u,g]),T=function(n,t){var e=p[n];return"function"==typeof e?e(t):e||""},k=function(n,t){var e=h[n];return"function"==typeof e?e(t):e||{}};return t("div",{ref:j,className:"zjpcy-masonry ".concat(f||""," ").concat(T("container",0)),style:n(n({display:"flex",gap:"".concat(z,"px")},y),k("container",0)),children:L.map(function(e,r){return t("div",{className:"zjpcy-masonry-column ".concat(T("column",r)),style:n({flex:1,display:"flex",flexDirection:"column",gap:"".concat(z,"px")},k("column",r)),children:e.map(function(e,r){return t("div",{className:"zjpcy-masonry-item ".concat(T("item",r)),style:n({},k("item",r)),children:e.content},e.key)})},"column-".concat(r))})})};export{i as default};
@@ -1 +1 @@
1
- import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as n,jsx as i,Fragment as t}from"react/jsx-runtime";import l,{useCallback as c,useRef as r,useState as o,useMemo as a,useEffect as m}from"react";import u from"classnames";import{useClickOutside as p}from"../Hooks/useClickOutside.js";var s=function(e){var n,i=e.trim();return i&&(null===(n=Array.from(i)[0])||void 0===n?void 0:n.toUpperCase())||""},d=l.memo(function(e){var l,r,a,p=e.item,y=e.level,h=e.mode,v=e.collapsed,z=e.theme,f=e.openKeySet,j=e.selectedKey,b=e.onItemClick,g=e.onToggleOpen,k=!!p.children&&p.children.length>0,w=f.has(p.key),N=j===p.key,C="horizontal"===h,K="inline"===h,x="vertical-flat"===h,O=0===y,S=c(function(e){e.stopPropagation(),p.disabled||(k&&!x&&g(p.key),x&&k||b(p,p.key))},[p,b,g,k,x]),T=C&&O?16:K?12+24*y:v?0:12+16*y,A=w&&(!v||C),I=function(e){var n=o(e),i=n[0],t=n[1],l=o(e),c=l[0],r=l[1];return m(function(){var n;return e?(r(!0),n=requestAnimationFrame(function(){t(!0)})):(t(!1),n=setTimeout(function(){r(!1)},150)),function(){"number"==typeof n?cancelAnimationFrame(n):clearTimeout(n)}},[e]),{isVisible:i,shouldRender:c}}(A&&C&&O),F=I.isVisible,H=I.shouldRender,M=k&&(!v||!O)&&!x,R=z||"light",V=u("zjpcy-menu-item-wrapper",{"zjpcy-menu-item-wrapper-root":O,"zjpcy-menu-item-wrapper-collapsed":v&&O}),q=u("zjpcy-menu-item",((l={})["zjpcy-menu-item-".concat(R)]=!0,l["zjpcy-menu-item-".concat(R,"-selected")]=N,l["zjpcy-menu-item-".concat(R,"-selected-vertical")]=N&&("vertical"===h||"inline"===h||"vertical-flat"===h),l["zjpcy-menu-item-disabled"]=p.disabled,l["zjpcy-menu-item-has-children"]=k,l["zjpcy-menu-item-has-children-selected"]=k&&N,l["zjpcy-menu-item-".concat(R,"-has-children")]=k,l["zjpcy-menu-item-root"]=O,l["zjpcy-menu-item-collapsed"]=v&&O,l)),B=u("zjpcy-menu-item-icon",{"zjpcy-menu-item-icon-collapsed":v}),P=u("zjpcy-menu-item-arrow",{"zjpcy-menu-item-arrow-open":A,"zjpcy-menu-item-arrow-horizontal":C,"zjpcy-menu-item-arrow-horizontal-open":A&&C}),U=u("zjpcy-menu-submenu-wrapper",((r={})["zjpcy-menu-submenu-wrapper-".concat(h)]=!0,r["zjpcy-menu-submenu-wrapper-horizontal-popup"]=C&&O,r["zjpcy-menu-submenu-wrapper-vertical-flat"]=x,r["zjpcy-menu-submenu-wrapper-vertical-flat-container"]=x,r));return n("div",{className:V,children:[i("div",{className:q,style:{padding:"0px ".concat(T,"px")},title:v&&O?p.label:void 0,onClick:S,children:n("div",{className:"zjpcy-menu-item-content",children:[v?i(t,{children:p.icon?i("span",{className:B,children:p.icon}):i("span",{className:"zjpcy-menu-item-collapsed-label",children:s(p.label)})}):n(t,{children:[p.icon&&i("span",{className:"zjpcy-menu-item-icon",children:p.icon}),n("div",{className:"zjpcy-menu-item-text",children:[i("span",{className:"zjpcy-menu-item-label",children:p.label}),p.description&&!k&&i("span",{className:"zjpcy-menu-item-description",children:p.description})]})]}),M&&i("span",{className:P,children:i("svg",{viewBox:"0 0 1024 1024",width:"10",height:"10",fill:"currentColor",children:i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 25.7-18.5 40.5l328.4 402.4c9.4 11.6 26.7 11.6 36.1 0l328.4-402.4c12.2-14.8 1.2-40.5-18.5-40.5z"})})})]})}),k&&(!C||!O||H)&&i("div",{className:U,children:i("div",{className:x?"zjpcy-menu-submenu-vertical-flat zjpcy-menu-submenu-vertical-flat-open":C&&O?u("zjpcy-menu-submenu-horizontal-popup",{"zjpcy-menu-submenu-horizontal-popup-open":F}):K?u("zjpcy-menu-submenu-inline",{"zjpcy-menu-submenu-inline-open":A}):u("zjpcy-menu-submenu-vertical",{"zjpcy-menu-submenu-vertical-open":A}),children:i("div",{className:"zjpcy-menu-submenu-content",children:null===(a=p.children)||void 0===a?void 0:a.map(function(e){return i(d,{item:e,level:y+1,mode:h,collapsed:v,theme:z,openKeySet:f,selectedKey:j,onItemClick:b,onToggleOpen:g},e.key)})})})})]})});d.displayName="MenuItemComponent";var y=function(n){var t,l=n.mode,s=void 0===l?"vertical":l,y=n.items,h=n.className,v=void 0===h?"":h,z=n.style,f=n.selectedKey,j=n.defaultOpenKeys,b=void 0===j?[]:j,g=n.openKeys,k=n.collapsed,w=void 0!==k&&k,N=n.open,C=n.theme,K=void 0===C?"light":C,x=n.onChange,O=n.onOpenChange,S=r(null),T=o(!0)[0],A=o(b),I=A[0],F=A[1],H=o(""),M=H[0],R=H[1],V=void 0!==g,q=void 0!==f,B=V?g:I,P=q?f:M,U=void 0!==N?N:T,_=a(function(){return new Set(B)},[B]);m(function(){void 0!==f&&R(f)},[f]),m(function(){if(P&&!V&&"horizontal"!==s&&"vertical-flat"!==s){var n=function(i,t,l){void 0===l&&(l=[]);for(var c=0,r=i;c<r.length;c++){var o=r[c];if(o.key===t)return l;if(o.children&&o.children.length>0){var a=n(o.children,t,e(e([],l,!0),[o.key],!1));if(a.length>0)return a}}return[]},i=n(y,P);i.length>0&&F(function(n){var t=new Set(e(e([],n,!0),i,!0));return Array.from(t)})}},[P,y,V,s]);var D=c(function(e,n){q||R(n),null==x||x(e,n),"horizontal"===s&&(!e.children||0===e.children.length)&&B.length>0&&(V||F([]),null==O||O([]))},[x,q,s,B.length,V,O]),E=c(function(n){if(V){var i=_.has(n)?B.filter(function(e){return e!==n}):e(e([],B,!0),[n],!1);null==O||O(i)}else F(function(i){var t=i.includes(n)?i.filter(function(e){return e!==n}):e(e([],i,!0),[n],!1);return null==O||O(t),t})},[_,B,V,O]),G="horizontal"!==s&&w;if(p(S,c(function(){"horizontal"===s&&B.length>0&&(V||F([]),null==O||O([]))},[s,B.length,V,O])),!U)return null;var J=u("zjpcy-menu","zjpcy-menu-".concat(K),((t={})["zjpcy-menu-".concat(s)]=!0,t["zjpcy-menu-".concat(s,"-collapsed")]=G,t["zjpcy-menu-dark-vertical-flat"]="dark"===K&&"vertical-flat"===s,t),v);return i("div",{ref:S,className:J,style:z,role:"menu",children:y.map(function(e){return i(d,{item:e,level:0,mode:s,collapsed:G,theme:K,openKeySet:_,selectedKey:P,onItemClick:D,onToggleOpen:E},e.key)})})};export{y as default};
1
+ "use client";import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as n,jsx as i,Fragment as t}from"react/jsx-runtime";import l,{useCallback as c,useRef as r,useState as o,useMemo as a,useEffect as m}from"react";import u from"classnames";import{useClickOutside as p}from"../Hooks/useClickOutside.js";var s=function(e){var n,i=e.trim();return i&&(null===(n=Array.from(i)[0])||void 0===n?void 0:n.toUpperCase())||""},d=l.memo(function(e){var l,r,a,p=e.item,y=e.level,h=e.mode,v=e.collapsed,z=e.theme,f=e.openKeySet,j=e.selectedKey,b=e.onItemClick,g=e.onToggleOpen,k=!!p.children&&p.children.length>0,w=f.has(p.key),N=j===p.key,C="horizontal"===h,K="inline"===h,x="vertical-flat"===h,O=0===y,S=c(function(e){e.stopPropagation(),p.disabled||(k&&!x&&g(p.key),x&&k||b(p,p.key))},[p,b,g,k,x]),T=C&&O?16:K?12+24*y:v?0:12+16*y,A=w&&(!v||C),I=function(e){var n=o(e),i=n[0],t=n[1],l=o(e),c=l[0],r=l[1];return m(function(){var n;return e?(r(!0),n=requestAnimationFrame(function(){t(!0)})):(t(!1),n=setTimeout(function(){r(!1)},150)),function(){"number"==typeof n?cancelAnimationFrame(n):clearTimeout(n)}},[e]),{isVisible:i,shouldRender:c}}(A&&C&&O),F=I.isVisible,H=I.shouldRender,M=k&&(!v||!O)&&!x,R=z||"light",V=u("zjpcy-menu-item-wrapper",{"zjpcy-menu-item-wrapper-root":O,"zjpcy-menu-item-wrapper-collapsed":v&&O}),q=u("zjpcy-menu-item",((l={})["zjpcy-menu-item-".concat(R)]=!0,l["zjpcy-menu-item-".concat(R,"-selected")]=N,l["zjpcy-menu-item-".concat(R,"-selected-vertical")]=N&&("vertical"===h||"inline"===h||"vertical-flat"===h),l["zjpcy-menu-item-disabled"]=p.disabled,l["zjpcy-menu-item-has-children"]=k,l["zjpcy-menu-item-has-children-selected"]=k&&N,l["zjpcy-menu-item-".concat(R,"-has-children")]=k,l["zjpcy-menu-item-root"]=O,l["zjpcy-menu-item-collapsed"]=v&&O,l)),B=u("zjpcy-menu-item-icon",{"zjpcy-menu-item-icon-collapsed":v}),P=u("zjpcy-menu-item-arrow",{"zjpcy-menu-item-arrow-open":A,"zjpcy-menu-item-arrow-horizontal":C,"zjpcy-menu-item-arrow-horizontal-open":A&&C}),U=u("zjpcy-menu-submenu-wrapper",((r={})["zjpcy-menu-submenu-wrapper-".concat(h)]=!0,r["zjpcy-menu-submenu-wrapper-horizontal-popup"]=C&&O,r["zjpcy-menu-submenu-wrapper-vertical-flat"]=x,r["zjpcy-menu-submenu-wrapper-vertical-flat-container"]=x,r));return n("div",{className:V,children:[i("div",{className:q,style:{padding:"0px ".concat(T,"px")},title:v&&O?p.label:void 0,onClick:S,children:n("div",{className:"zjpcy-menu-item-content",children:[v?i(t,{children:p.icon?i("span",{className:B,children:p.icon}):i("span",{className:"zjpcy-menu-item-collapsed-label",children:s(p.label)})}):n(t,{children:[p.icon&&i("span",{className:"zjpcy-menu-item-icon",children:p.icon}),n("div",{className:"zjpcy-menu-item-text",children:[i("span",{className:"zjpcy-menu-item-label",children:p.label}),p.description&&!k&&i("span",{className:"zjpcy-menu-item-description",children:p.description})]})]}),M&&i("span",{className:P,children:i("svg",{viewBox:"0 0 1024 1024",width:"10",height:"10",fill:"currentColor",children:i("path",{d:"M840.4 300H183.6c-19.7 0-30.7 25.7-18.5 40.5l328.4 402.4c9.4 11.6 26.7 11.6 36.1 0l328.4-402.4c12.2-14.8 1.2-40.5-18.5-40.5z"})})})]})}),k&&(!C||!O||H)&&i("div",{className:U,children:i("div",{className:x?"zjpcy-menu-submenu-vertical-flat zjpcy-menu-submenu-vertical-flat-open":C&&O?u("zjpcy-menu-submenu-horizontal-popup",{"zjpcy-menu-submenu-horizontal-popup-open":F}):K?u("zjpcy-menu-submenu-inline",{"zjpcy-menu-submenu-inline-open":A}):u("zjpcy-menu-submenu-vertical",{"zjpcy-menu-submenu-vertical-open":A}),children:i("div",{className:"zjpcy-menu-submenu-content",children:null===(a=p.children)||void 0===a?void 0:a.map(function(e){return i(d,{item:e,level:y+1,mode:h,collapsed:v,theme:z,openKeySet:f,selectedKey:j,onItemClick:b,onToggleOpen:g},e.key)})})})})]})});d.displayName="MenuItemComponent";var y=function(n){var t,l=n.mode,s=void 0===l?"vertical":l,y=n.items,h=n.className,v=void 0===h?"":h,z=n.style,f=n.selectedKey,j=n.defaultOpenKeys,b=void 0===j?[]:j,g=n.openKeys,k=n.collapsed,w=void 0!==k&&k,N=n.open,C=n.theme,K=void 0===C?"light":C,x=n.onChange,O=n.onOpenChange,S=r(null),T=o(!0)[0],A=o(b),I=A[0],F=A[1],H=o(""),M=H[0],R=H[1],V=void 0!==g,q=void 0!==f,B=V?g:I,P=q?f:M,U=void 0!==N?N:T,_=a(function(){return new Set(B)},[B]);m(function(){void 0!==f&&R(f)},[f]),m(function(){if(P&&!V&&"horizontal"!==s&&"vertical-flat"!==s){var n=function(i,t,l){void 0===l&&(l=[]);for(var c=0,r=i;c<r.length;c++){var o=r[c];if(o.key===t)return l;if(o.children&&o.children.length>0){var a=n(o.children,t,e(e([],l,!0),[o.key],!1));if(a.length>0)return a}}return[]},i=n(y,P);i.length>0&&F(function(n){var t=new Set(e(e([],n,!0),i,!0));return Array.from(t)})}},[P,y,V,s]);var D=c(function(e,n){q||R(n),null==x||x(e,n),"horizontal"===s&&(!e.children||0===e.children.length)&&B.length>0&&(V||F([]),null==O||O([]))},[x,q,s,B.length,V,O]),E=c(function(n){if(V){var i=_.has(n)?B.filter(function(e){return e!==n}):e(e([],B,!0),[n],!1);null==O||O(i)}else F(function(i){var t=i.includes(n)?i.filter(function(e){return e!==n}):e(e([],i,!0),[n],!1);return null==O||O(t),t})},[_,B,V,O]),G="horizontal"!==s&&w;if(p(S,c(function(){"horizontal"===s&&B.length>0&&(V||F([]),null==O||O([]))},[s,B.length,V,O])),!U)return null;var J=u("zjpcy-menu","zjpcy-menu-".concat(K),((t={})["zjpcy-menu-".concat(s)]=!0,t["zjpcy-menu-".concat(s,"-collapsed")]=G,t["zjpcy-menu-dark-vertical-flat"]="dark"===K&&"vertical-flat"===s,t),v);return i("div",{ref:S,className:J,style:z,role:"menu",children:y.map(function(e){return i(d,{item:e,level:0,mode:s,collapsed:G,theme:K,openKeySet:_,selectedKey:P,onItemClick:D,onToggleOpen:E},e.key)})})};export{y as default};
@@ -1 +1 @@
1
- import{__spreadArray as n}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{createContext as r,useState as o,useCallback as i,useContext as u}from"react";import{createRoot as c}from"react-dom/client";import s from"./Message.js";var f=0,a=new Map,d=function(n){var t=a.get(n);if(t){var e=t.container;t.root.unmount(),document.body.contains(e)&&document.body.removeChild(e),a.delete(n)}},l=function(n,t,r){void 0===r&&(r=3e3);var o=++f,i=function(){var n=document.createElement("div");return n.style.position="fixed",n.style.top="20px",n.style.left="50%",n.style.transform="translateX(-50%)",n.style.zIndex="1050",n.style.pointerEvents="none",document.body.appendChild(n),n}(),u=c(i);u.render(e(s,{type:n,content:t,duration:r,onClose:function(){d(o)}})),a.set(o,{container:i,root:u});var l=setTimeout(function(){d(o)},r);return{close:function(){clearTimeout(l),d(o)}}},m={success:function(n,t){l("success",n,t)},warning:function(n,t){l("warning",n,t)},error:function(n,t){l("error",n,t)},info:function(n,t){l("info",n,t)},close:function(){a.forEach(function(n,t){return d(t)})}},p=r({message:null}),v=function(r){var u=r.children,c=o([]),f=c[0],a=c[1],d=o(0),l=d[0],m=d[1],v=i(function(t,e,r){void 0===r&&(r=3e3);var o=l;m(function(n){return n+1}),a(function(i){return n(n([],i,!0),[{id:o,type:t,content:e,duration:r}],!1)});var i=setTimeout(function(){u(o)},r),u=function(n){a(function(t){return t.filter(function(t){return t.id!==n})})};return{close:function(){clearTimeout(i),u(o)}}},[l]),y={success:function(n,t){return v("success",n,t)},warning:function(n,t){return v("warning",n,t)},error:function(n,t){return v("error",n,t)},info:function(n,t){return v("info",n,t)},close:function(){return a([])}};return t(p.Provider,{value:{message:y},children:[u,f.map(function(n){return e(s,{type:n.type,content:n.content,duration:n.duration,onClose:function(){return a(function(t){return t.filter(function(t){return t.id!==n.id})})}},n.id)})]})},y=function(){var n=u(p);return(null==n?void 0:n.message)?n.message:m};export{v as MessageProvider,s as default,m as message,y as useMessage};
1
+ "use client";import{__spreadArray as n}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{createContext as r,useState as o,useCallback as i,useContext as u}from"react";import{createRoot as c}from"react-dom/client";import s from"./Message.js";var f=0,a=new Map,l=function(n){var t=a.get(n);if(t){var e=t.container;t.root.unmount(),document.body.contains(e)&&document.body.removeChild(e),a.delete(n)}},d=function(n,t,r){void 0===r&&(r=3e3);var o=++f,i=function(){var n=document.createElement("div");return n.style.position="fixed",n.style.top="20px",n.style.left="50%",n.style.transform="translateX(-50%)",n.style.zIndex="1050",n.style.pointerEvents="none",document.body.appendChild(n),n}(),u=c(i);u.render(e(s,{type:n,content:t,duration:r,onClose:function(){l(o)}})),a.set(o,{container:i,root:u});var d=setTimeout(function(){l(o)},r);return{close:function(){clearTimeout(d),l(o)}}},m={success:function(n,t){d("success",n,t)},warning:function(n,t){d("warning",n,t)},error:function(n,t){d("error",n,t)},info:function(n,t){d("info",n,t)},close:function(){a.forEach(function(n,t){return l(t)})}},p=r({message:null}),v=function(r){var u=r.children,c=o([]),f=c[0],a=c[1],l=o(0),d=l[0],m=l[1],v=i(function(t,e,r){void 0===r&&(r=3e3);var o=d;m(function(n){return n+1}),a(function(i){return n(n([],i,!0),[{id:o,type:t,content:e,duration:r}],!1)});var i=setTimeout(function(){u(o)},r),u=function(n){a(function(t){return t.filter(function(t){return t.id!==n})})};return{close:function(){clearTimeout(i),u(o)}}},[d]),y={success:function(n,t){return v("success",n,t)},warning:function(n,t){return v("warning",n,t)},error:function(n,t){return v("error",n,t)},info:function(n,t){return v("info",n,t)},close:function(){return a([])}};return t(p.Provider,{value:{message:y},children:[u,f.map(function(n){return e(s,{type:n.type,content:n.content,duration:n.duration,onClose:function(){return a(function(t){return t.filter(function(t){return t.id!==n.id})})}},n.id)})]})},y=function(){var n=u(p);return(null==n?void 0:n.message)?n.message:m};export{v as MessageProvider,s as default,m as message,y as useMessage};
@@ -1 +1 @@
1
- import{__assign as o}from"../node_modules/tslib/tslib.es6.js";import{jsx as n,jsxs as e}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as r}from"react";import{createPortal as c}from"react-dom";import a from"classnames";import l from"../Icon/Icon.js";import d from"../Flex/index.js";import m from"../Button/Button.js";var s=function(s){var p,u=s.visible,y=s.title,v=void 0===y?"标题":y,f=s.width,h=void 0===f?600:f,g=s.height,j=void 0===g?"auto":g,x=s.headerHeight,z=void 0===x?40:x,b=s.footerHeight,N=void 0===b?40:b,w=s.confirmLoading,k=void 0!==w&&w,C=s.direction,_=void 0===C?"normal":C,H=s.top,T=s.onCancel,I=s.onOk,W=s.children,B=s.footer,L=void 0===B?null:B,O=s.bordered,E=void 0!==O&&O,F=s.className,S=s.style,q=s.okText,A=void 0===q?"确认":q,M=s.cancelText,P=void 0===M?"取消":M,X=s.getContainer,Y=void 0===X?function(){return document.body}:X,$=s.maskStyle,D=s.maskClassName,G=s.zIndex,J=void 0===G?1e3:G,K=s.contentClassName,Q=s.contentStyle,R=s.destroyOnClose,U=void 0!==R&&R,V=s.loading,Z=void 0!==V&&V,oo=s.loadingIcon,no=t(!1),eo=no[0],to=no[1],io=t(!1),ro=io[0],co=io[1],ao=t(!1),lo=ao[0],mo=ao[1],so=t({x:0,y:0}),po=so[0],uo=so[1],yo=i(null),vo=_,fo=function(o){if("number"==typeof o)return o;var n=o.match(/^(\d+)px$/);return n?parseInt(n[1],10):0};r(function(){var o=function(o){yo.current={x:o.clientX,y:o.clientY}};return document.addEventListener("mousedown",o,!0),function(){document.removeEventListener("mousedown",o,!0)}},[]),r(function(){if(u){var o=function(){var o=yo.current;if(!o||"undefined"==typeof window)return{x:0,y:0};var n=j?fo(j):0;if("center"===vo&&void 0!==H){var e=window.innerWidth/2,t=H+(n>0?n/2:0);return{x:o.x-e,y:o.y-t}}if("center"===vo)return e=window.innerWidth/2,t=window.innerHeight/2,{x:o.x-e,y:o.y-t};if(void 0!==H&&n>0)return e=window.innerWidth/2,t=H+n/2,{x:o.x-e,y:o.y-t};return e=window.innerWidth/2,t=window.innerHeight/2,{x:o.x-e,y:o.y-t}}();uo(o),co(!1),requestAnimationFrame(function(){to(!0)});var n=setTimeout(function(){mo(!0)},50);return function(){return clearTimeout(n)}}co(!0),mo(!1);var e=setTimeout(function(){to(!1),co(!1)},550);return function(){return clearTimeout(e)}},[u,550,j,H,U]);var ho=function(){co(!0);var o=setTimeout(function(){to(!1),co(!1),null==T||T()},550);return function(){return clearTimeout(o)}},go=function(){null==I||I()},jo=o(((p={width:"number"==typeof h?"".concat(h,"px"):h,top:void 0!==H?"".concat(H,"px"):void 0})["--zjpcy-modal-origin-x"]="".concat(po.x,"px"),p["--zjpcy-modal-origin-y"]="".concat(po.y,"px"),p.visibility=lo?"visible":"hidden",p),S),xo={height:"number"==typeof z?"".concat(z,"px"):z},zo=j?fo(j):0,bo=fo(z),No=fo(N),wo=zo>0?Math.max(0,zo-bo-No):void 0,ko=o({},Q);if(!ko.maxHeight&&j){var Co=fo(j);ko.maxHeight="".concat(Co,"px")}!ko.maxHeight&&wo&&(ko.maxHeight="".concat(wo,"px"));var _o={height:"number"==typeof N?"".concat(N,"px"):N},Ho=function(){if(!eo&&!ro)return null;var t=o({zIndex:J},$);return n("div",{className:a("zjpcy-modal-overlay",{"zjpcy-modal-overlay--visible":eo&&!ro,"zjpcy-modal-overlay--closing":ro,"zjpcy-modal-overlay--custom-top":void 0!==H},F,D),onClick:ho,style:t,children:e("div",{className:a("zjpcy-modal-container",{"zjpcy-modal-container--center-top":lo&&!ro&&"center"===vo&&void 0!==H,"zjpcy-modal-container--center":lo&&!ro&&"center"===vo&&void 0===H,"zjpcy-modal-container--top-right":lo&&!ro&&"top-right"===vo,"zjpcy-modal-container--bottom-right":lo&&!ro&&"bottom-right"===vo,"zjpcy-modal-container--bottom-left":lo&&!ro&&"bottom-left"===vo,"zjpcy-modal-container--normal":lo&&!ro&&"normal"===vo,"zjpcy-modal-container--closing-center-top":ro&&"center"===vo&&void 0!==H,"zjpcy-modal-container--closing-center":ro&&"center"===vo&&void 0===H,"zjpcy-modal-container--closing-top-right":ro&&"top-right"===vo,"zjpcy-modal-container--closing-bottom-right":ro&&"bottom-right"===vo,"zjpcy-modal-container--closing-bottom-left":ro&&"bottom-left"===vo,"zjpcy-modal-container--closing-normal":ro&&"normal"===vo,"zjpcy-modal-container--bordered":E,"zjpcy-modal-container--has-height":void 0!==j}),style:jo,onClick:function(o){return o.stopPropagation()},children:[Z?n("div",oo?{className:"zjpcy-modal-loading",children:n("div",{className:"zjpcy-modal-loading-content",children:oo})}:{className:"zjpcy-modal-loading",children:n("div",{className:"zjpcy-modal-loading-content",children:n("div",{className:"zjpcy-modal-loading-spinner",children:e("svg",{viewBox:"0 0 24 24",className:"zjpcy-modal-loading-icon",children:[n("circle",{className:"zjpcy-modal-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),n("circle",{className:"zjpcy-modal-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null,e("div",{className:"zjpcy-modal-header",style:xo,children:[n("div",{className:"zjpcy-modal-header__left",children:n("span",{className:"zjpcy-modal-header__title",children:v})}),n("div",{className:"zjpcy-modal-header__right",children:n("div",{className:"zjpcy-modal-close-btn",onClick:ho,children:n(l,{type:"close",size:20,color:"currentColor"})})})]}),eo&&n("div",{className:a("zjpcy-modal-content",K),style:ko,children:U&&ro?null:W}),n(d,{className:"zjpcy-modal-footer",align:"center",justify:"flex-end",style:Object.assign({},_o,{padding:"0px 10px"}),gap:12,children:null===L?e(d,{className:"zjpcy-modal-footer__actions",justify:"flex-end",gap:12,children:[n(m,{variant:"secondary",onClick:ho,disabled:k,children:P||"取消"}),n(m,{variant:"primary",onClick:go,loading:k,children:A||"确认"})]}):L})]})})}();if(!Ho)return null;if(!1===Y)return Ho;var To="function"==typeof Y?Y():Y;return To?c(Ho,To):Ho};export{s as default};
1
+ "use client";import{__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as o,jsxs as e}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as r}from"react";import{createPortal as c}from"react-dom";import a from"classnames";import l from"../Icon/Icon.js";import d from"../Flex/index.js";import m from"../Button/Button.js";var s=function(s){var p,u=s.visible,y=s.title,v=void 0===y?"标题":y,f=s.width,h=void 0===f?600:f,g=s.height,j=void 0===g?"auto":g,x=s.headerHeight,z=void 0===x?40:x,b=s.footerHeight,N=void 0===b?40:b,w=s.confirmLoading,k=void 0!==w&&w,C=s.direction,_=void 0===C?"normal":C,H=s.top,T=s.onCancel,I=s.onOk,W=s.children,B=s.footer,L=void 0===B?null:B,O=s.bordered,E=void 0!==O&&O,F=s.className,S=s.style,q=s.okText,A=void 0===q?"确认":q,M=s.cancelText,P=void 0===M?"取消":M,X=s.getContainer,Y=void 0===X?function(){return document.body}:X,$=s.maskStyle,D=s.maskClassName,G=s.zIndex,J=void 0===G?1e3:G,K=s.contentClassName,Q=s.contentStyle,R=s.destroyOnClose,U=void 0!==R&&R,V=s.loading,Z=void 0!==V&&V,nn=s.loadingIcon,on=t(!1),en=on[0],tn=on[1],rn=t(!1),cn=rn[0],an=rn[1],ln=t(!1),dn=ln[0],mn=ln[1],sn=t({x:0,y:0}),pn=sn[0],un=sn[1],yn=i(null),vn=_,fn=function(n){if("number"==typeof n)return n;var o=n.match(/^(\d+)px$/);return o?parseInt(o[1],10):0};r(function(){var n=function(n){yn.current={x:n.clientX,y:n.clientY}};return document.addEventListener("mousedown",n,!0),function(){document.removeEventListener("mousedown",n,!0)}},[]),r(function(){if(u){var n=function(){var n=yn.current;if(!n||"undefined"==typeof window)return{x:0,y:0};var o=j?fn(j):0;if("center"===vn&&void 0!==H){var e=window.innerWidth/2,t=H+(o>0?o/2:0);return{x:n.x-e,y:n.y-t}}if("center"===vn)return e=window.innerWidth/2,t=window.innerHeight/2,{x:n.x-e,y:n.y-t};if(void 0!==H&&o>0)return e=window.innerWidth/2,t=H+o/2,{x:n.x-e,y:n.y-t};return e=window.innerWidth/2,t=window.innerHeight/2,{x:n.x-e,y:n.y-t}}();un(n),an(!1),requestAnimationFrame(function(){tn(!0)});var o=setTimeout(function(){mn(!0)},50);return function(){return clearTimeout(o)}}an(!0),mn(!1);var e=setTimeout(function(){tn(!1),an(!1)},550);return function(){return clearTimeout(e)}},[u,550,j,H,U]);var hn=function(){an(!0);var n=setTimeout(function(){tn(!1),an(!1),null==T||T()},550);return function(){return clearTimeout(n)}},gn=function(){null==I||I()},jn=n(((p={width:"number"==typeof h?"".concat(h,"px"):h,top:void 0!==H?"".concat(H,"px"):void 0})["--zjpcy-modal-origin-x"]="".concat(pn.x,"px"),p["--zjpcy-modal-origin-y"]="".concat(pn.y,"px"),p.visibility=dn?"visible":"hidden",p),S),xn={height:"number"==typeof z?"".concat(z,"px"):z},zn=j?fn(j):0,bn=fn(z),Nn=fn(N),wn=zn>0?Math.max(0,zn-bn-Nn):void 0,kn=n({},Q);if(!kn.maxHeight&&j){var Cn=fn(j);kn.maxHeight="".concat(Cn,"px")}!kn.maxHeight&&wn&&(kn.maxHeight="".concat(wn,"px"));var _n={height:"number"==typeof N?"".concat(N,"px"):N},Hn=function(){if(!en&&!cn)return null;var t=n({zIndex:J},$);return o("div",{className:a("zjpcy-modal-overlay",{"zjpcy-modal-overlay--visible":en&&!cn,"zjpcy-modal-overlay--closing":cn,"zjpcy-modal-overlay--custom-top":void 0!==H},F,D),onClick:hn,style:t,children:e("div",{className:a("zjpcy-modal-container",{"zjpcy-modal-container--center-top":dn&&!cn&&"center"===vn&&void 0!==H,"zjpcy-modal-container--center":dn&&!cn&&"center"===vn&&void 0===H,"zjpcy-modal-container--top-right":dn&&!cn&&"top-right"===vn,"zjpcy-modal-container--bottom-right":dn&&!cn&&"bottom-right"===vn,"zjpcy-modal-container--bottom-left":dn&&!cn&&"bottom-left"===vn,"zjpcy-modal-container--normal":dn&&!cn&&"normal"===vn,"zjpcy-modal-container--closing-center-top":cn&&"center"===vn&&void 0!==H,"zjpcy-modal-container--closing-center":cn&&"center"===vn&&void 0===H,"zjpcy-modal-container--closing-top-right":cn&&"top-right"===vn,"zjpcy-modal-container--closing-bottom-right":cn&&"bottom-right"===vn,"zjpcy-modal-container--closing-bottom-left":cn&&"bottom-left"===vn,"zjpcy-modal-container--closing-normal":cn&&"normal"===vn,"zjpcy-modal-container--bordered":E,"zjpcy-modal-container--has-height":void 0!==j}),style:jn,onClick:function(n){return n.stopPropagation()},children:[Z?o("div",nn?{className:"zjpcy-modal-loading",children:o("div",{className:"zjpcy-modal-loading-content",children:nn})}:{className:"zjpcy-modal-loading",children:o("div",{className:"zjpcy-modal-loading-content",children:o("div",{className:"zjpcy-modal-loading-spinner",children:e("svg",{viewBox:"0 0 24 24",className:"zjpcy-modal-loading-icon",children:[o("circle",{className:"zjpcy-modal-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),o("circle",{className:"zjpcy-modal-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null,e("div",{className:"zjpcy-modal-header",style:xn,children:[o("div",{className:"zjpcy-modal-header__left",children:o("span",{className:"zjpcy-modal-header__title",children:v})}),o("div",{className:"zjpcy-modal-header__right",children:o("div",{className:"zjpcy-modal-close-btn",onClick:hn,children:o(l,{type:"close",size:20,color:"currentColor"})})})]}),en&&o("div",{className:a("zjpcy-modal-content",K),style:kn,children:U&&cn?null:W}),o(d,{className:"zjpcy-modal-footer",align:"center",justify:"flex-end",style:Object.assign({},_n,{padding:"0px 10px"}),gap:12,children:null===L?e(d,{className:"zjpcy-modal-footer__actions",justify:"flex-end",gap:12,children:[o(m,{variant:"secondary",onClick:hn,disabled:k,children:P||"取消"}),o(m,{variant:"primary",onClick:gn,loading:k,children:A||"确认"})]}):L})]})})}();if(!Hn)return null;if(!1===Y)return Hn;var Tn="function"==typeof Y?Y():Y;return Tn?c(Hn,Tn):Hn};export{s as default};
@@ -1 +1 @@
1
- import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as c}from"react";var a=function(t){switch(t){case"success":return e("i",{className:"fas fa-check-circle"});case"warning":return e("i",{className:"fas fa-exclamation-triangle"});case"error":return e("i",{className:"fas fa-times-circle"});default:return e("i",{className:"fas fa-info-circle"})}},r=function(r){var s=r.message,u=r.duration,f=void 0===u?3e3:u,l=r.type,m=void 0===l?"info":l,d=r.position,p=void 0===d?"center":d,v=r.color,h=r.top,g=r.open,k=r.clickOutsideToClose,x=void 0!==k&&k,b=r.onClose,N=void 0!==g,T=o(!0),w=T[0],C=T[1],j=o(!0),y=j[0],E=j[1],L=i(null),O=N?g:w;if(c(function(){var t=function(t){x&&L.current&&!L.current.contains(t.target)&&(E(!1),setTimeout(function(){b&&b(),N||C(!1)},500))};return x&&O&&document.addEventListener("click",t),function(){document.removeEventListener("click",t)}},[x,O,N,b]),c(function(){N&&(g?E(!0):(E(!1),setTimeout(function(){b&&b()},500)))},[g,N,b]),c(function(){if(O){var t=setTimeout(function(){E(!1),setTimeout(function(){b&&b(),N||C(!1)},500)},f);return function(){return clearTimeout(t)}}},[f,O,N,b]),!O||!y)return null;var W="notification-".concat(m),X=v?"notification-custom":"",_=function(){var t={};if(void 0!==h)if(t.top="".concat(h,"px"),p.startsWith("top-"))switch(p){case"top-left":t.left="20px",t.right="auto";break;case"top-center":t.left="50%",t.transform="translateX(-50%)",t.right="auto";break;case"top-right":t.right="20px",t.left="auto"}else t.right="20px",t.left="auto",t.bottom="auto";return t}(),q=t({backgroundColor:v},_),z=void 0===h?"notification-".concat(p):"";return e("div",{ref:L,className:"notification ".concat(W," ").concat(z," ").concat(X," ").concat(y?"fade-in":"fade-out"),style:q,children:n("div",{className:"notification-content",children:[a(m),e("span",{children:s})]})})};export{r as default};
1
+ "use client";import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as c}from"react";var a=function(t){switch(t){case"success":return e("i",{className:"fas fa-check-circle"});case"warning":return e("i",{className:"fas fa-exclamation-triangle"});case"error":return e("i",{className:"fas fa-times-circle"});default:return e("i",{className:"fas fa-info-circle"})}},r=function(r){var s=r.message,u=r.duration,f=void 0===u?3e3:u,l=r.type,m=void 0===l?"info":l,d=r.position,p=void 0===d?"center":d,v=r.color,h=r.top,g=r.open,k=r.clickOutsideToClose,x=void 0!==k&&k,b=r.onClose,N=void 0!==g,T=o(!0),w=T[0],C=T[1],j=o(!0),y=j[0],E=j[1],L=i(null),O=N?g:w;if(c(function(){var t=function(t){x&&L.current&&!L.current.contains(t.target)&&(E(!1),setTimeout(function(){b&&b(),N||C(!1)},500))};return x&&O&&document.addEventListener("click",t),function(){document.removeEventListener("click",t)}},[x,O,N,b]),c(function(){N&&(g?E(!0):(E(!1),setTimeout(function(){b&&b()},500)))},[g,N,b]),c(function(){if(O){var t=setTimeout(function(){E(!1),setTimeout(function(){b&&b(),N||C(!1)},500)},f);return function(){return clearTimeout(t)}}},[f,O,N,b]),!O||!y)return null;var W="notification-".concat(m),X=v?"notification-custom":"",_=function(){var t={};if(void 0!==h)if(t.top="".concat(h,"px"),p.startsWith("top-"))switch(p){case"top-left":t.left="20px",t.right="auto";break;case"top-center":t.left="50%",t.transform="translateX(-50%)",t.right="auto";break;case"top-right":t.right="20px",t.left="auto"}else t.right="20px",t.left="auto",t.bottom="auto";return t}(),q=t({backgroundColor:v},_),z=void 0===h?"notification-".concat(p):"";return e("div",{ref:L,className:"notification ".concat(W," ").concat(z," ").concat(X," ").concat(y?"fade-in":"fade-out"),style:q,children:n("div",{className:"notification-content",children:[a(m),e("span",{children:s})]})})};export{r as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as t,useEffect as o,useCallback as r}from"react";import a from"classnames";import c from"../Icon/Icon.js";var s=function(c){var s=c.value,l=c.options,p=c.onChange,u=i(!1),d=u[0],v=u[1],f=t(null),h=t(null),m=i({}),g=m[0],z=m[1],y=r(function(){var e,n;if(f.current){var i=f.current.getBoundingClientRect(),t=window.innerHeight,o=(null===(e=h.current)||void 0===e?void 0:e.offsetWidth)||120,r=(null===(n=h.current)||void 0===n?void 0:n.offsetHeight)||200,a=i.left+i.width/2-o/2+window.scrollX,c=t-i.bottom,s=c>=r||c>=i.top;z(s?{top:i.bottom+window.scrollY+6,left:a,width:"auto",minWidth:Math.max(o,120)}:{top:i.top+window.scrollY-r-6,left:a,width:"auto",minWidth:Math.max(o,120)})}},[]);o(function(){var e=function(e){f.current&&!f.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),o(function(){if(d){y();var e=function(){return y()};return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}},[d,y]);return e("div",{className:"zjpcy-page-size-select",ref:f,children:[e("div",{className:a("zjpcy-page-size-select-trigger",{"zjpcy-page-size-select-trigger-open":d}),onClick:function(){v(!d),d||setTimeout(y,0)},children:[e("span",{className:"zjpcy-page-size-select-value",children:[s," 条/页"]}),n("svg",{className:"zjpcy-page-size-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:n("path",{d:"M6 8L1 3h10z",fill:"currentColor"})})]}),d&&n("div",{className:"zjpcy-page-size-select-dropdown zjpcy-page-size-select-dropdown-open",ref:h,style:g,children:l.map(function(n){var i="number"==typeof n?n:parseInt(n,10);return e("div",{className:a("zjpcy-page-size-select-option",{"zjpcy-page-size-select-option-selected":s===i}),onClick:function(){return p(i),void v(!1)},children:[n," 条/页"]},n)})})]})},l=function(r){var l=r.total,p=void 0===l?0:l,u=r.current,d=r.pageSize,v=void 0===d?10:d,f=r.onChange,h=r.pageSizeOptions,m=void 0===h?["10","20","50","100"]:h,g=r.showSizeChanger,z=void 0!==g&&g,y=r.showQuickJumper,w=void 0!==y&&y,j=r.showTotal,N=r.size,x=void 0===N?"default":N,C=r.align,k=r.className,L=void 0===k?"":k,b=r.style,E=i(1),I=E[0],M=E[1],S=i(v),W=S[0],B=S[1],H=t(!0),R=void 0!==u?u:I,T=void 0!==v?v:W,Y=Math.ceil(p/T),q=t(f);q.current=f,o(function(){void 0!==v&&B(v)},[v]),o(function(){void 0!==u&&M(u)},[u]),o(function(){if(H.current)H.current=!1;else if(R>Y&&Y>0){var e=Y;void 0===u&&M(e),q.current&&q.current(e,T)}},[R,Y,u,T]);var A=function(e){e===R||e<1||e>Y||(void 0===u&&M(e),f&&f(e,T))},J=(R-1)*T+1,K=Math.min(R*T,p);return e("div",{className:a("zjpcy-pagination",{"zjpcy-pagination-mini":"small"===x},"center"===C?"zjpcy-pagination-align-center":"flex-end"===C?"zjpcy-pagination-align-right":"",L),style:b,children:[j&&n("div",{className:"zjpcy-pagination-total-text",children:j(p,[J,K])}),e("ul",{className:"zjpcy-pagination-list",children:[n("li",{className:"zjpcy-pagination-prev ".concat(R<=1?"zjpcy-pagination-prev-disabled":""),onClick:function(){R>1&&A(R-1)},children:n(c,{type:"arrowLeft"})}),function(){if(Y<=7)return Array.from({length:Y},function(e,n){return n+1});var e=[];if(e.push(1),R<=4){for(var n=2;n<=5;n++)e.push(n);e.push("..."),e.push(Y)}else if(R>=Y-3){e.push("...");for(n=Y-4;n<=Y-1;n++)e.push(n);e.push(Y)}else{e.push("...");for(n=R-1;n<=R+1;n++)e.push(n);e.push("..."),e.push(Y)}return e}().map(function(e,i){return n("li",{className:"number"==typeof e?"zjpcy-pagination-item ".concat(e===R?"zjpcy-pagination-item-active":""):"zjpcy-pagination-ellipsis",onClick:function(){return"number"==typeof e&&A(e)},children:e},i)}),n("li",{className:"zjpcy-pagination-next ".concat(R>=Y?"zjpcy-pagination-next-disabled":""),onClick:function(){R<Y&&A(R+1)},children:n(c,{type:"arrowRight"})})]}),(z||w)&&e("div",{className:"zjpcy-pagination-options",children:[z&&n(s,{value:T,options:m,onChange:function(e){return function(e){var n=parseInt(e,10);void 0===v&&B(n),void 0===u&&M(1),f&&f(1,n)}(e.toString())}}),w&&e("div",{className:"zjpcy-pagination-options-quick-jumper",children:[n("div",{style:{minWidth:"30px"},children:"跳至"}),n("input",{type:"text",onKeyPress:function(e){if("Enter"===e.key){var n=e.target,i=parseInt(n.value,10);!isNaN(i)&&i>=1&&i<=Y&&(A(i),n.value="")}},placeholder:"页码"}),"页"]})]})]})};export{l as default};
1
+ "use client";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as t,useEffect as o,useCallback as r}from"react";import a from"classnames";import c from"../Icon/Icon.js";var s=function(c){var s=c.value,l=c.options,p=c.onChange,u=i(!1),d=u[0],v=u[1],f=t(null),h=t(null),m=i({}),g=m[0],z=m[1],y=r(function(){var e,n;if(f.current){var i=f.current.getBoundingClientRect(),t=window.innerHeight,o=(null===(e=h.current)||void 0===e?void 0:e.offsetWidth)||120,r=(null===(n=h.current)||void 0===n?void 0:n.offsetHeight)||200,a=i.left+i.width/2-o/2+window.scrollX,c=t-i.bottom,s=c>=r||c>=i.top;z(s?{top:i.bottom+window.scrollY+6,left:a,width:"auto",minWidth:Math.max(o,120)}:{top:i.top+window.scrollY-r-6,left:a,width:"auto",minWidth:Math.max(o,120)})}},[]);o(function(){var e=function(e){f.current&&!f.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),o(function(){if(d){y();var e=function(){return y()};return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}},[d,y]);return e("div",{className:"zjpcy-page-size-select",ref:f,children:[e("div",{className:a("zjpcy-page-size-select-trigger",{"zjpcy-page-size-select-trigger-open":d}),onClick:function(){v(!d),d||setTimeout(y,0)},children:[e("span",{className:"zjpcy-page-size-select-value",children:[s," 条/页"]}),n("svg",{className:"zjpcy-page-size-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:n("path",{d:"M6 8L1 3h10z",fill:"currentColor"})})]}),d&&n("div",{className:"zjpcy-page-size-select-dropdown zjpcy-page-size-select-dropdown-open",ref:h,style:g,children:l.map(function(n){var i="number"==typeof n?n:parseInt(n,10);return e("div",{className:a("zjpcy-page-size-select-option",{"zjpcy-page-size-select-option-selected":s===i}),onClick:function(){return p(i),void v(!1)},children:[n," 条/页"]},n)})})]})},l=function(r){var l=r.total,p=void 0===l?0:l,u=r.current,d=r.pageSize,v=void 0===d?10:d,f=r.onChange,h=r.pageSizeOptions,m=void 0===h?["10","20","50","100"]:h,g=r.showSizeChanger,z=void 0!==g&&g,y=r.showQuickJumper,w=void 0!==y&&y,j=r.showTotal,N=r.size,x=void 0===N?"default":N,C=r.align,k=r.className,L=void 0===k?"":k,b=r.style,E=i(1),I=E[0],M=E[1],S=i(v),W=S[0],B=S[1],H=t(!0),R=void 0!==u?u:I,T=void 0!==v?v:W,Y=Math.ceil(p/T),q=t(f);q.current=f,o(function(){void 0!==v&&B(v)},[v]),o(function(){void 0!==u&&M(u)},[u]),o(function(){if(H.current)H.current=!1;else if(R>Y&&Y>0){var e=Y;void 0===u&&M(e),q.current&&q.current(e,T)}},[R,Y,u,T]);var A=function(e){e===R||e<1||e>Y||(void 0===u&&M(e),f&&f(e,T))},J=(R-1)*T+1,K=Math.min(R*T,p);return e("div",{className:a("zjpcy-pagination",{"zjpcy-pagination-mini":"small"===x},"center"===C?"zjpcy-pagination-align-center":"flex-end"===C?"zjpcy-pagination-align-right":"",L),style:b,children:[j&&n("div",{className:"zjpcy-pagination-total-text",children:j(p,[J,K])}),e("ul",{className:"zjpcy-pagination-list",children:[n("li",{className:"zjpcy-pagination-prev ".concat(R<=1?"zjpcy-pagination-prev-disabled":""),onClick:function(){R>1&&A(R-1)},children:n(c,{type:"arrowLeft"})}),function(){if(Y<=7)return Array.from({length:Y},function(e,n){return n+1});var e=[];if(e.push(1),R<=4){for(var n=2;n<=5;n++)e.push(n);e.push("..."),e.push(Y)}else if(R>=Y-3){e.push("...");for(n=Y-4;n<=Y-1;n++)e.push(n);e.push(Y)}else{e.push("...");for(n=R-1;n<=R+1;n++)e.push(n);e.push("..."),e.push(Y)}return e}().map(function(e,i){return n("li",{className:"number"==typeof e?"zjpcy-pagination-item ".concat(e===R?"zjpcy-pagination-item-active":""):"zjpcy-pagination-ellipsis",onClick:function(){return"number"==typeof e&&A(e)},children:e},i)}),n("li",{className:"zjpcy-pagination-next ".concat(R>=Y?"zjpcy-pagination-next-disabled":""),onClick:function(){R<Y&&A(R+1)},children:n(c,{type:"arrowRight"})})]}),(z||w)&&e("div",{className:"zjpcy-pagination-options",children:[z&&n(s,{value:T,options:m,onChange:function(e){return function(e){var n=parseInt(e,10);void 0===v&&B(n),void 0===u&&M(1),f&&f(1,n)}(e.toString())}}),w&&e("div",{className:"zjpcy-pagination-options-quick-jumper",children:[n("div",{style:{minWidth:"30px"},children:"跳至"}),n("input",{type:"text",onKeyPress:function(e){if("Enter"===e.key){var n=e.target,i=parseInt(n.value,10);!isNaN(i)&&i>=1&&i<=Y&&(A(i),n.value="")}},placeholder:"页码"}),"页"]})]})]})};export{l as default};
@@ -1 +1 @@
1
- import{__assign as t,__awaiter as o,__generator as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as i,Fragment as n,jsx as r}from"react/jsx-runtime";import{useState as c,useRef as p,useEffect as a,cloneElement as l}from"react";import{createPortal as s}from"react-dom";import f from"classnames";import d from"../Icon/Icon.js";import m from"../Button/Button.js";var h=function(h){var u=h.title,g=void 0===u?"确认删除吗?":u,v=h.description,y=h.okText,b=void 0===y?"确定":y,w=h.cancelText,z=void 0===w?"取消":w,j=h.okButtonProps,B=void 0===j?{}:j,L=h.cancelButtonProps,k=void 0===L?{}:L,T=h.onConfirm,R=h.onCancel,C=h.disabled,N=void 0!==C&&C,x=h.icon,E=h.type,P=void 0===E?"warning":E,D=h.placement,I=void 0===D?"top":D,H=h.showCancel,W=void 0===H||H,_=h.getContainer,q=void 0===_?function(){return document.body}:_,A=h.className,F=h.style,G=h.children,J=c(!1),K=J[0],M=J[1],O=c(!1),Q=O[0],S=O[1],U=c({top:0,left:0}),V=U[0],X=U[1],Y=p(null),Z=p(null),$={top:"zjpcy-popconfirm-top",bottom:"zjpcy-popconfirm-bottom",left:"zjpcy-popconfirm-left",right:"zjpcy-popconfirm-right",topLeft:"zjpcy-popconfirm-topLeft",topRight:"zjpcy-popconfirm-topRight",bottomLeft:"zjpcy-popconfirm-bottomLeft",bottomRight:"zjpcy-popconfirm-bottomRight",leftTop:"zjpcy-popconfirm-leftTop",leftBottom:"zjpcy-popconfirm-leftBottom",rightTop:"zjpcy-popconfirm-rightTop",rightBottom:"zjpcy-popconfirm-rightBottom"},tt=function(){if(Y.current&&Z.current){var t=Y.current.getBoundingClientRect(),o=Z.current.getBoundingClientRect(),e=0,i=0;switch(I){case"top":case"topLeft":case"topRight":e=t.top-o.height-8,i=t.left+(t.width-o.width)/2,"topLeft"===I?i=t.left:"topRight"===I&&(i=t.right-o.width);break;case"bottom":case"bottomLeft":case"bottomRight":e=t.bottom+8,i=t.left+(t.width-o.width)/2,"bottomLeft"===I?i=t.left:"bottomRight"===I&&(i=t.right-o.width);break;case"left":case"leftTop":case"leftBottom":e=t.top+(t.height-o.height)/2,i=t.left-o.width-8,"leftTop"===I?e=t.top:"leftBottom"===I&&(e=t.bottom-o.height);break;case"right":case"rightTop":case"rightBottom":e=t.top+(t.height-o.height)/2,i=t.right+8,"rightTop"===I?e=t.top:"rightBottom"===I&&(e=t.bottom-o.height)}var n=window.innerWidth,r=window.innerHeight;i<10&&(i=10),i+o.width>n-10&&(i=n-o.width-10),e<10&&(e=10),e+o.height>r-10&&(e=r-o.height-10),X({top:e,left:i})}},ot=function(t){N||(t&&t.preventDefault&&t.preventDefault(),t&&t.stopPropagation&&t.stopPropagation(),M(!0))},et=function(){return o(void 0,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:if(!T)return[3,5];S(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,T()];case 2:return t.sent(),M(!1),[3,4];case 3:return S(!1),[7];case 4:return[3,6];case 5:M(!1),t.label=6;case 6:return[2]}})})},it=function(){R&&R(),M(!1)},nt=function(t){Z.current&&!Z.current.contains(t.target)&&Y.current&&!Y.current.contains(t.target)&&M(!1)};a(function(){if(K){setTimeout(function(){tt()},0),document.addEventListener("mousedown",nt);var t=function(){return tt()},o=function(){return tt()};return window.addEventListener("scroll",t,!0),window.addEventListener("resize",o),function(){document.removeEventListener("mousedown",nt),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",o)}}},[K,I]);var rt,ct;return i(n,{children:[(rt=G,ct=rt.props||{},r("span",{ref:Y,style:{display:"inline-block"},children:l(rt,t(t({},ct),{onClick:ot}))})),function(){if(!K)return null;var o,e=i("div",{ref:Z,className:f("zjpcy-popconfirm","zjpcy-popconfirm-visible",$[I],"zjpcy-popconfirm--".concat(P),A),style:t({position:"fixed",top:"".concat(V.top,"px"),left:"".concat(V.left,"px")},F),children:[r("div",{className:"zjpcy-popconfirm-arrow"}),i("div",{className:"zjpcy-popconfirm-inner",children:[i("div",{className:"zjpcy-popconfirm-header",children:[r("span",{style:{display:x?"inline-block":"none"},className:"zjpcy-popconfirm-icon",children:x||(o={info:{type:"info-circle",color:"#1890ff"},success:{type:"check-circle",color:"#52c41a"},warning:{type:"warning-circle",color:"#faad14"},error:{type:"close-circle",color:"#f5222d"},danger:{type:"close-circle",color:"#f5222d"}}[P],r(d,{type:o.type,size:18,color:o.color}))}),r("span",{className:"zjpcy-popconfirm-title",children:g})]}),v&&r("div",{className:"zjpcy-popconfirm-description",children:v}),i("div",{className:"zjpcy-popconfirm-actions",children:[W&&r(m,{variant:k.variant||"secondary",onClick:it,disabled:k.disabled||Q,size:"small",children:z}),r(m,{variant:B.variant||"primary",onClick:et,loading:B.loading||Q,disabled:B.disabled,size:"small",children:b})]})]})]});if(!1===q)return e;var n="function"==typeof q?q():q;return n?s(e,n):e}()]})};export{h as default};
1
+ "use client";import{__assign as t,__awaiter as o,__generator as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as i,Fragment as n,jsx as r}from"react/jsx-runtime";import{useState as c,useRef as p,useEffect as a,cloneElement as l}from"react";import{createPortal as s}from"react-dom";import f from"classnames";import d from"../Icon/Icon.js";import m from"../Button/Button.js";var h=function(h){var u=h.title,g=void 0===u?"确认删除吗?":u,v=h.description,y=h.okText,b=void 0===y?"确定":y,w=h.cancelText,z=void 0===w?"取消":w,j=h.okButtonProps,B=void 0===j?{}:j,L=h.cancelButtonProps,k=void 0===L?{}:L,T=h.onConfirm,R=h.onCancel,C=h.disabled,N=void 0!==C&&C,x=h.icon,E=h.type,P=void 0===E?"warning":E,D=h.placement,I=void 0===D?"top":D,H=h.showCancel,W=void 0===H||H,_=h.getContainer,q=void 0===_?function(){return document.body}:_,A=h.className,F=h.style,G=h.children,J=c(!1),K=J[0],M=J[1],O=c(!1),Q=O[0],S=O[1],U=c({top:0,left:0}),V=U[0],X=U[1],Y=p(null),Z=p(null),$={top:"zjpcy-popconfirm-top",bottom:"zjpcy-popconfirm-bottom",left:"zjpcy-popconfirm-left",right:"zjpcy-popconfirm-right",topLeft:"zjpcy-popconfirm-topLeft",topRight:"zjpcy-popconfirm-topRight",bottomLeft:"zjpcy-popconfirm-bottomLeft",bottomRight:"zjpcy-popconfirm-bottomRight",leftTop:"zjpcy-popconfirm-leftTop",leftBottom:"zjpcy-popconfirm-leftBottom",rightTop:"zjpcy-popconfirm-rightTop",rightBottom:"zjpcy-popconfirm-rightBottom"},tt=function(){if(Y.current&&Z.current){var t=Y.current.getBoundingClientRect(),o=Z.current.getBoundingClientRect(),e=0,i=0;switch(I){case"top":case"topLeft":case"topRight":e=t.top-o.height-8,i=t.left+(t.width-o.width)/2,"topLeft"===I?i=t.left:"topRight"===I&&(i=t.right-o.width);break;case"bottom":case"bottomLeft":case"bottomRight":e=t.bottom+8,i=t.left+(t.width-o.width)/2,"bottomLeft"===I?i=t.left:"bottomRight"===I&&(i=t.right-o.width);break;case"left":case"leftTop":case"leftBottom":e=t.top+(t.height-o.height)/2,i=t.left-o.width-8,"leftTop"===I?e=t.top:"leftBottom"===I&&(e=t.bottom-o.height);break;case"right":case"rightTop":case"rightBottom":e=t.top+(t.height-o.height)/2,i=t.right+8,"rightTop"===I?e=t.top:"rightBottom"===I&&(e=t.bottom-o.height)}var n=window.innerWidth,r=window.innerHeight;i<10&&(i=10),i+o.width>n-10&&(i=n-o.width-10),e<10&&(e=10),e+o.height>r-10&&(e=r-o.height-10),X({top:e,left:i})}},ot=function(t){N||(t&&t.preventDefault&&t.preventDefault(),t&&t.stopPropagation&&t.stopPropagation(),M(!0))},et=function(){return o(void 0,void 0,void 0,function(){return e(this,function(t){switch(t.label){case 0:if(!T)return[3,5];S(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,T()];case 2:return t.sent(),M(!1),[3,4];case 3:return S(!1),[7];case 4:return[3,6];case 5:M(!1),t.label=6;case 6:return[2]}})})},it=function(){R&&R(),M(!1)},nt=function(t){Z.current&&!Z.current.contains(t.target)&&Y.current&&!Y.current.contains(t.target)&&M(!1)};a(function(){if(K){setTimeout(function(){tt()},0),document.addEventListener("mousedown",nt);var t=function(){return tt()},o=function(){return tt()};return window.addEventListener("scroll",t,!0),window.addEventListener("resize",o),function(){document.removeEventListener("mousedown",nt),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",o)}}},[K,I]);var rt,ct;return i(n,{children:[(rt=G,ct=rt.props||{},r("span",{ref:Y,style:{display:"inline-block"},children:l(rt,t(t({},ct),{onClick:ot}))})),function(){if(!K)return null;var o,e=i("div",{ref:Z,className:f("zjpcy-popconfirm","zjpcy-popconfirm-visible",$[I],"zjpcy-popconfirm--".concat(P),A),style:t({position:"fixed",top:"".concat(V.top,"px"),left:"".concat(V.left,"px")},F),children:[r("div",{className:"zjpcy-popconfirm-arrow"}),i("div",{className:"zjpcy-popconfirm-inner",children:[i("div",{className:"zjpcy-popconfirm-header",children:[r("span",{style:{display:x?"inline-block":"none"},className:"zjpcy-popconfirm-icon",children:x||(o={info:{type:"info-circle",color:"#1890ff"},success:{type:"check-circle",color:"#52c41a"},warning:{type:"warning-circle",color:"#faad14"},error:{type:"close-circle",color:"#f5222d"},danger:{type:"close-circle",color:"#f5222d"}}[P],r(d,{type:o.type,size:18,color:o.color}))}),r("span",{className:"zjpcy-popconfirm-title",children:g})]}),v&&r("div",{className:"zjpcy-popconfirm-description",children:v}),i("div",{className:"zjpcy-popconfirm-actions",children:[W&&r(m,{variant:k.variant||"secondary",onClick:it,disabled:k.disabled||Q,size:"small",children:z}),r(m,{variant:B.variant||"primary",onClick:et,loading:B.loading||Q,disabled:B.disabled,size:"small",children:b})]})]})]});if(!1===q)return e;var n="function"==typeof q?q():q;return n?s(e,n):e}()]})};export{h as default};
@@ -1 +1 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{createContext as t,useContext as n,useRef as r,useState as o,useEffect as d,useCallback as l}from"react";import c from"classnames";var u=t(void 0),s=function(t){var l,s=t.value,p=t.checked,v=t.defaultChecked,m=void 0!==v&&v,f=t.onChange,h=t.disabled,y=void 0!==h&&h,g=t.size,b=t.children,z=t.className,j=t.style,N=t.label,w=t.labelGap,R=void 0===w?8:w,C=t.labelClassName,_=void 0===C?"":C,k=t.labelStyle,x=n(u),I=!!x,G=r(null),A=o(m),F=A[0],q=A[1],B=I?x.value===s:void 0!==p?p:F,E=g||(I?x.size:void 0),L="button"===(I?x.type:void 0);d(function(){if(I&&x.registerRadio)return x.registerRadio(s,G.current),function(){var e;null===(e=x.unregisterRadio)||void 0===e||e.call(x,s)}},[I,s,x]),d(function(){B&&I&&x.updateIndicator&&requestAnimationFrame(function(){var e;null===(e=x.updateIndicator)||void 0===e||e.call(x)})},[B,I]),d(function(){I||void 0===p||q(p)},[p,I]);var X=c("zjpcy-radio",((l={"zjpcy-radio--checked":B,"zjpcy-radio--unchecked":!B,"zjpcy-radio--disabled":y||I&&x.disabled,"zjpcy-radio--disabled-checked":B&&(y||I&&x.disabled)})["zjpcy-radio--".concat(E)]=E,l["zjpcy-radio--button"]=L,l),z);return i("label",{ref:G,className:X,style:j,children:a("div",{className:"zjpcy-radio-wrapper",style:{display:"flex",alignItems:"center"},children:[N&&i("div",{className:"zjpcy-radio-label ".concat(_),style:e({marginRight:"number"==typeof R?"".concat(R,"px"):R},k),children:N}),a("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i("input",{type:"radio",className:"zjpcy-radio__input",checked:B,onChange:function(e){var i,a=e.target.checked;y||I&&x.disabled||(I?null===(i=x.onChange)||void 0===i||i.call(x,s):(q(a),null==f||f(a,s)))},disabled:y||I&&x.disabled,value:s}),!L&&i("span",{className:"zjpcy-radio__inner"}),b&&i("span",{className:"zjpcy-radio__label",children:b})]})]})})};s.Group=function(e){var t,n=e.value,s=e.defaultValue,p=e.onChange,v=e.disabled,m=void 0!==v&&v,f=e.type,h=void 0===f?"radio":f,y=e.size,g=void 0===y?"middle":y,b=e.children,z=e.className,j=e.style,N=o(s),w=N[0],R=N[1],C=r(null),_=r(new Map),k=o({width:0,height:0,transform:"translateX(0px)"}),x=k[0],I=k[1],G=void 0!==n?n:w,A=l(function(e,i){i&&_.current.set(e,i)},[]),F=l(function(e){_.current.delete(e)},[]),q=l(function(){if("button"===h&&C.current){var e=_.current.get(G);if(e){var i=C.current.getBoundingClientRect(),a=e.getBoundingClientRect(),t=a.left-i.left;I({width:a.width,height:a.height,transform:"translateX(".concat(t,"px)")})}}},[G,h]);d(function(){if("button"===h){var e=requestAnimationFrame(function(){q()});return function(){return cancelAnimationFrame(e)}}},[h,q]),d(function(){if("button"===h){var e=function(){q()};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}},[h,q]),d(function(){void 0!==n&&R(n)},[n]);var B=c("zjpcy-radio-group",((t={"zjpcy-radio-group--button":"button"===h})["zjpcy-radio-group--".concat(g)]=g,t["zjpcy-radio-group--button-large"]="button"===h&&"large"===g,t["zjpcy-radio-group--button-middle"]="button"===h&&"middle"===g,t["zjpcy-radio-group--button-small"]="button"===h&&"small"===g,t),z);return i(u.Provider,{value:{value:G,onChange:function(e){R(e),null==p||p(e)},disabled:m,type:h,size:g,registerRadio:A,unregisterRadio:F,updateIndicator:q},children:a("div",{ref:C,className:B,style:j,children:["button"===h&&i("div",{className:"zjpcy-radio-group__indicator",style:{width:x.width,height:x.height,transform:x.transform}}),b]})})},s.displayName="Radio",s.Group.displayName="Radio.Group";var p=s;export{p as default};
1
+ "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{createContext as a,useContext as n,useRef as r,useState as o,useEffect as d,useCallback as l}from"react";import c from"classnames";var u=a(void 0),s=function(a){var l,s=a.value,p=a.checked,v=a.defaultChecked,m=void 0!==v&&v,f=a.onChange,h=a.disabled,y=void 0!==h&&h,g=a.size,b=a.children,z=a.className,j=a.style,N=a.label,w=a.labelGap,R=void 0===w?8:w,C=a.labelClassName,_=void 0===C?"":C,k=a.labelStyle,x=n(u),I=!!x,G=r(null),A=o(m),F=A[0],q=A[1],B=I?x.value===s:void 0!==p?p:F,E=g||(I?x.size:void 0),L="button"===(I?x.type:void 0);d(function(){if(I&&x.registerRadio)return x.registerRadio(s,G.current),function(){var e;null===(e=x.unregisterRadio)||void 0===e||e.call(x,s)}},[I,s,x]),d(function(){B&&I&&x.updateIndicator&&requestAnimationFrame(function(){var e;null===(e=x.updateIndicator)||void 0===e||e.call(x)})},[B,I]),d(function(){I||void 0===p||q(p)},[p,I]);var X=c("zjpcy-radio",((l={"zjpcy-radio--checked":B,"zjpcy-radio--unchecked":!B,"zjpcy-radio--disabled":y||I&&x.disabled,"zjpcy-radio--disabled-checked":B&&(y||I&&x.disabled)})["zjpcy-radio--".concat(E)]=E,l["zjpcy-radio--button"]=L,l),z);return i("label",{ref:G,className:X,style:j,children:t("div",{className:"zjpcy-radio-wrapper",style:{display:"flex",alignItems:"center"},children:[N&&i("div",{className:"zjpcy-radio-label ".concat(_),style:e({marginRight:"number"==typeof R?"".concat(R,"px"):R},k),children:N}),t("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i("input",{type:"radio",className:"zjpcy-radio__input",checked:B,onChange:function(e){var i,t=e.target.checked;y||I&&x.disabled||(I?null===(i=x.onChange)||void 0===i||i.call(x,s):(q(t),null==f||f(t,s)))},disabled:y||I&&x.disabled,value:s}),!L&&i("span",{className:"zjpcy-radio__inner"}),b&&i("span",{className:"zjpcy-radio__label",children:b})]})]})})};s.Group=function(e){var a,n=e.value,s=e.defaultValue,p=e.onChange,v=e.disabled,m=void 0!==v&&v,f=e.type,h=void 0===f?"radio":f,y=e.size,g=void 0===y?"middle":y,b=e.children,z=e.className,j=e.style,N=o(s),w=N[0],R=N[1],C=r(null),_=r(new Map),k=o({width:0,height:0,transform:"translateX(0px)"}),x=k[0],I=k[1],G=void 0!==n?n:w,A=l(function(e,i){i&&_.current.set(e,i)},[]),F=l(function(e){_.current.delete(e)},[]),q=l(function(){if("button"===h&&C.current){var e=_.current.get(G);if(e){var i=C.current.getBoundingClientRect(),t=e.getBoundingClientRect(),a=t.left-i.left;I({width:t.width,height:t.height,transform:"translateX(".concat(a,"px)")})}}},[G,h]);d(function(){if("button"===h){var e=requestAnimationFrame(function(){q()});return function(){return cancelAnimationFrame(e)}}},[h,q]),d(function(){if("button"===h){var e=function(){q()};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}},[h,q]),d(function(){void 0!==n&&R(n)},[n]);var B=c("zjpcy-radio-group",((a={"zjpcy-radio-group--button":"button"===h})["zjpcy-radio-group--".concat(g)]=g,a["zjpcy-radio-group--button-large"]="button"===h&&"large"===g,a["zjpcy-radio-group--button-middle"]="button"===h&&"middle"===g,a["zjpcy-radio-group--button-small"]="button"===h&&"small"===g,a),z);return i(u.Provider,{value:{value:G,onChange:function(e){R(e),null==p||p(e)},disabled:m,type:h,size:g,registerRadio:A,unregisterRadio:F,updateIndicator:q},children:t("div",{ref:C,className:B,style:j,children:["button"===h&&i("div",{className:"zjpcy-radio-group__indicator",style:{width:x.width,height:x.height,transform:x.transform}}),b]})})},s.displayName="Radio",s.Group.displayName="Radio.Group";var p=s;export{p as default};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as e,useRef as i,useEffect as a,useLayoutEffect as o,useCallback as l,useMemo as s}from"react";import c from"classnames";import u from"../Icon/Icon.js";var f=function(f){var d=f.value,p=void 0===d?0:d,m=f.count,h=void 0===m?5:m,g=f.allowHalf,v=void 0===g||g,y=f.disabled,x=void 0!==y&&y,N=f.color,C=void 0===N?"#1677ff":N,b=f.onChange,A=f.className,F=void 0===A?"":A,M=f.size,P=void 0===M?24:M,j=f.chats,z=e(0),S=z[0],k=z[1],E=i([]),H=i(0),I=Array.isArray(j)&&j.length>=h&&j.every(function(r){return null!=r&&""!==r}),w=e([]),L=w[0],O=w[1],T=e(!1),q=T[0],B=T[1];E.current.length!==h&&(E.current=Array(h).fill(null)),a(function(){if(I)if("string"==typeof p&&p.length>0){var r=Math.min(p.length,h);O(j.slice(0,r))}else O([]);else O([])},[p,I,j,h]),o(function(){0===S&&q&&B(!1)},[S,q]);var D=S||(I?L.length:parseFloat(Number(p).toFixed(1)||"0")),G=l(function(r){return function(n){E.current[r]=n}},[]),J=s(function(){return Array.from({length:h}).map(function(r,n){var t=n+1,e=!1,i=!1;I?e=n<(q&&S>0?S:L.length):D>=t?e=!0:v&&D>n&&D<t&&(i=!0);return{index:n,isHalf:i,isFull:e,iconType:i?"half":e?"full":"empty",iconColor:e||i?C:"#d9d9d9"}})},[h,D,v,C,I,L.length,q,S]),K=function(e){if(I){var i=j[e.index],a=e.isFull;return r("span",{className:"rate-chat-item",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",fontSize:"inherit",backgroundColor:"transparent",color:x?"inherit":a?C:"inherit",cursor:x?"default":"pointer"},onMouseEnter:function(r){if(!x){r.stopPropagation();var n=e.index+1;n!==H.current&&(H.current=n,k(n))}},onClick:function(r){if(!x){r.stopPropagation();var n=e.index+1;if(j&&Array.isArray(j)&&j.length>=0){var t=j.slice(0,n);O(t),null==b||b(t.join(""))}else null==b||b(n.toString());k(0),H.current=0,B(!1)}},children:i})}return n(t,{children:[r(u,{type:"starOutline",size:P,color:"#d9d9d9",className:"rate-star-bg"}),r("span",{className:"rate-star-left",onMouseEnter:function(r){if(!x&&v){r.stopPropagation();var n=e.index+.5;n!==H.current&&(H.current=n,k(n))}},onClick:function(r){!x&&v&&(r.stopPropagation(),null==b||b((e.index+.5).toString()),k(0),H.current=0,B(!1))}}),r("span",{className:"rate-star-right",onMouseEnter:function(r){if(!x){r.stopPropagation();var n=e.index+1;n!==H.current&&(H.current=n,k(n))}},onClick:function(r){if(!x){if(r.stopPropagation(),I){var n=j.slice(0,e.index+1);null==b||b(n.join(""))}else null==b||b((e.index+1).toString());k(0),H.current=0,B(!1)}}}),r("span",{className:c("rate-star-fill",{"rate-star-fill-half":e.isHalf,"rate-star-fill-full":e.isFull,"rate-star-fill-empty":!e.isHalf&&!e.isFull}),style:{color:e.iconColor},children:r(u,{type:"star",size:P,color:e.iconColor,className:"rate-star-icon"})})]})};return r("div",{className:c("rate",{"rate-disabled":x,"rate-chats-mode":I,"rate-chats-mode-disabled":I&&x,"rate-star-mode":!I},F),style:{"--rate-color":C},onMouseEnter:function(){x||B(!0)},onMouseLeave:function(){x||(B(!1),k(0),H.current=0)},children:J.map(function(n){return r("span",{ref:G(n.index),className:"rate-star",style:{fontSize:"".concat(P,"px")},children:K(n)},n.index)})})},d=f;export{f as Rate,d as default};
1
+ "use client";import{jsx as r,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as e,useRef as i,useEffect as a,useLayoutEffect as o,useCallback as l,useMemo as s}from"react";import c from"classnames";import u from"../Icon/Icon.js";var f=function(f){var d=f.value,p=void 0===d?0:d,m=f.count,h=void 0===m?5:m,g=f.allowHalf,v=void 0===g||g,y=f.disabled,x=void 0!==y&&y,N=f.color,C=void 0===N?"#1677ff":N,b=f.onChange,A=f.className,F=void 0===A?"":A,M=f.size,P=void 0===M?24:M,j=f.chats,z=e(0),S=z[0],k=z[1],E=i([]),H=i(0),I=Array.isArray(j)&&j.length>=h&&j.every(function(r){return null!=r&&""!==r}),w=e([]),L=w[0],O=w[1],T=e(!1),q=T[0],B=T[1];E.current.length!==h&&(E.current=Array(h).fill(null)),a(function(){if(I)if("string"==typeof p&&p.length>0){var r=Math.min(p.length,h);O(j.slice(0,r))}else O([]);else O([])},[p,I,j,h]),o(function(){0===S&&q&&B(!1)},[S,q]);var D=S||(I?L.length:parseFloat(Number(p).toFixed(1)||"0")),G=l(function(r){return function(n){E.current[r]=n}},[]),J=s(function(){return Array.from({length:h}).map(function(r,n){var t=n+1,e=!1,i=!1;I?e=n<(q&&S>0?S:L.length):D>=t?e=!0:v&&D>n&&D<t&&(i=!0);return{index:n,isHalf:i,isFull:e,iconType:i?"half":e?"full":"empty",iconColor:e||i?C:"#d9d9d9"}})},[h,D,v,C,I,L.length,q,S]),K=function(e){if(I){var i=j[e.index],a=e.isFull;return r("span",{className:"rate-chat-item",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",fontSize:"inherit",backgroundColor:"transparent",color:x?"inherit":a?C:"inherit",cursor:x?"default":"pointer"},onMouseEnter:function(r){if(!x){r.stopPropagation();var n=e.index+1;n!==H.current&&(H.current=n,k(n))}},onClick:function(r){if(!x){r.stopPropagation();var n=e.index+1;if(j&&Array.isArray(j)&&j.length>=0){var t=j.slice(0,n);O(t),null==b||b(t.join(""))}else null==b||b(n.toString());k(0),H.current=0,B(!1)}},children:i})}return n(t,{children:[r(u,{type:"starOutline",size:P,color:"#d9d9d9",className:"rate-star-bg"}),r("span",{className:"rate-star-left",onMouseEnter:function(r){if(!x&&v){r.stopPropagation();var n=e.index+.5;n!==H.current&&(H.current=n,k(n))}},onClick:function(r){!x&&v&&(r.stopPropagation(),null==b||b((e.index+.5).toString()),k(0),H.current=0,B(!1))}}),r("span",{className:"rate-star-right",onMouseEnter:function(r){if(!x){r.stopPropagation();var n=e.index+1;n!==H.current&&(H.current=n,k(n))}},onClick:function(r){if(!x){if(r.stopPropagation(),I){var n=j.slice(0,e.index+1);null==b||b(n.join(""))}else null==b||b((e.index+1).toString());k(0),H.current=0,B(!1)}}}),r("span",{className:c("rate-star-fill",{"rate-star-fill-half":e.isHalf,"rate-star-fill-full":e.isFull,"rate-star-fill-empty":!e.isHalf&&!e.isFull}),style:{color:e.iconColor},children:r(u,{type:"star",size:P,color:e.iconColor,className:"rate-star-icon"})})]})};return r("div",{className:c("rate",{"rate-disabled":x,"rate-chats-mode":I,"rate-chats-mode-disabled":I&&x,"rate-star-mode":!I},F),style:{"--rate-color":C},onMouseEnter:function(){x||B(!0)},onMouseLeave:function(){x||(B(!1),k(0),H.current=0)},children:J.map(function(n){return r("span",{ref:G(n.index),className:"rate-star",style:{fontSize:"".concat(P,"px")},children:K(n)},n.index)})})},d=f;export{f as Rate,d as default};
@@ -1 +1 @@
1
- import{__spreadArray as e,__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as l,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as a,useMemo as c,useCallback as u}from"react";import{injectGlobalStyles as s,Wrapper as d,LabelWrapper as v,Label as f,Selector as p,SelectorContent as h,SuffixArea as m,ClearButton as g,LoadingIcon as b,Arrow as y,SearchInput as w,TagsContainer as C,Placeholder as x,SingleValue as $,Dropdown as A,OptionList as N,Empty as k,Tag as L,TagClose as M,CheckIcon as D,Option as E}from"./styles.js";var z=function(z){var B=z.value,P=z.defaultValue,S=z.options,j=void 0===S?[]:S,H=z.disabled,R=void 0!==H&&H,T=z.loading,V=void 0!==T&&T,G=z.mode,I=void 0===G?"single":G,K=z.placeholder,O=void 0===K?"请选择":K,U=z.searchable,Z=void 0!==U&&U,_=z.clearable,q=void 0!==_&&_,F=z.size,J=void 0===F?"default":F,Q=z.width,W=z.styles,X=z.onChange,Y=z.onOpenChange,ee=z.onSearch,ne=z.optionRender,le=z.tagRender,te=z.label,re=z.labelGap,oe=void 0===re?8:re,ie=z.labelClassName,ae=void 0===ie?"":ie,ce=z.labelStyle,ue=z.className,se=void 0===ue?"":ue,de=z.style,ve=z.showArrow,fe=void 0===ve||ve,pe=z.maxHeight,he=void 0===pe?256:pe,me=z.emptyContent,ge=void 0===me?"暂无数据":me,be=z.getPopupContainer,ye=void 0!==B,we=o(void 0!==P?P:"multiple"===I?[]:""),Ce=we[0],xe=we[1],$e=o(!1),Ae=$e[0],Ne=$e[1],ke=o(""),Le=ke[0],Me=ke[1],De=o(-1),Ee=De[0],ze=De[1],Be=o(!1),Pe=Be[0],Se=Be[1],je=i(null),He=i(null),Re=i(null);a(function(){s()},[]);var Te=ye?B:Ce,Ve="multiple"===I,Ge=c(function(){return Le?j.filter(function(e){return String(e.label).toLowerCase().includes(Le.toLowerCase())}):j},[j,Le]),Ie=c(function(){if(Ve){var e=Array.isArray(Te)?Te:[];return j.filter(function(n){return e.includes(n.value)})}return j.find(function(e){return e.value===Te})||null},[Te,j,Ve]),Ke=u(function(e,n){ye||xe(e),null==X||X(e,n)},[ye,X]),Oe=u(function(e){e.disabled||(Ke(e.value,e),Me(""),Ne(!1))},[Ke]),Ue=u(function(n){if(!n.disabled){var l,t,r=Array.isArray(Te)?Te:[];r.includes(n.value)?(l=r.filter(function(e){return e!==n.value}),t=Ie.filter(function(e){return e.value!==n.value})):(l=e(e([],r,!0),[n.value],!1),t=e(e([],Ie,!0),[n],!1)),Ke(l,t),Me(""),setTimeout(function(){var e;return null===(e=Re.current)||void 0===e?void 0:e.focus()},0)}},[Te,Ke,Ie]),Ze=u(function(e){Ve?Ue(e):Oe(e)},[Ve,Ue,Oe]),_e=u(function(e,n){if(e.stopPropagation(),!R){var l=(Array.isArray(Te)?Te:[]).filter(function(e){return e!==n}),t=Ie.filter(function(e){return e.value!==n});Ke(l,t)}},[Te,R,Ke,Ie]),qe=u(function(e){(e.stopPropagation(),R)||(Ke(Ve?[]:"",Ve?[]:void 0),Me(""))},[R,Ve,Ke]),Fe=u(function(e){var n=e.target.value;Me(n),null==ee||ee(n)},[ee]);a(function(){var e=function(e){je.current&&!je.current.contains(e.target)&&(Ne(!1),Me(""))};return Ae&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[Ae]),a(function(){null==Y||Y(Ae),Ae&&Z&&setTimeout(function(){var e;return null===(e=Re.current)||void 0===e?void 0:e.focus()},0)},[Ae,Z,Y]);var Je,Qe=u(function(e){if(Ae)switch(e.key){case"Escape":e.preventDefault(),Ne(!1);break;case"ArrowDown":e.preventDefault(),ze(function(e){return e<Ge.length-1?e+1:0});break;case"ArrowUp":e.preventDefault(),ze(function(e){return e>0?e-1:Ge.length-1});break;case"Enter":e.preventDefault(),Ee>=0&&Ee<Ge.length&&Ze(Ge[Ee])}else"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ne(!0))},[Ae,Ee,Ge,Ze]),We=function(e){return le?le({value:e.value,label:e.label,onClose:function(n){return _e(n,e.value)},disabled:R}):t(L,{className:"select-tag",$disabled:R,$styles:null==W?void 0:W.tag,children:[l("span",{children:e.label}),!R&&l(M,{className:"select-tag-close",onClick:function(n){return _e(n,e.value)},children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})})]},e.value)},Xe=function(e,n){var o=Ve?Te.includes(e.value):Te===e.value,i=n===Ee,a=ne?ne(e):t(r,{children:[o&&Ve&&l(D,{children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})})}),l("span",{children:e.label})]});return l(E,{className:"select-option ".concat(o?"select-option-selected":""," ").concat(i?"select-option-active":""),$selected:o,$active:i,$disabled:!!e.disabled,$styles:null==W?void 0:W.option,onClick:function(){return Ze(e)},onMouseEnter:function(){return ze(n)},children:a},e.value)},Ye=Ve?Array.isArray(Te)&&Te.length>0:""!==Te&&null!=Te,en=q&&!R&&Ye&&!V&&Pe,nn=fe&&!V&&!en;return l(d,{ref:je,className:"select-wrapper ".concat(se),$styles:null==W?void 0:W.wrapper,style:n({width:Q},de),children:t(v,{children:[te&&l(f,{className:"select-label ".concat(ae),style:n({marginRight:"number"==typeof oe?"".concat(oe,"px"):oe},ce),children:te}),t("div",{style:{flex:1,position:"relative"},children:[t(p,{className:"select-selector ".concat(J?"select-selector-".concat(J):""," ").concat(Ae?"select-selector-open":""," ").concat(R?"select-selector-disabled":""),$disabled:R,$loading:V,$size:J,$open:Ae,$styles:null==W?void 0:W.selector,onClick:function(){return!R&&!V&&Ne(!Ae)},onKeyDown:Qe,onMouseEnter:function(){return Se(!0)},onMouseLeave:function(){return Se(!1)},tabIndex:R?-1:0,role:"combobox","aria-expanded":Ae,"aria-haspopup":"listbox",children:[l(h,{children:function(){if(Z&&Ae){var e=Ve?"搜索...":String((null==Ie?void 0:Ie.label)||O);return l(w,{ref:Re,type:"text",value:Le,onChange:Fe,placeholder:e,onClick:function(e){return e.stopPropagation()}})}if(Ve){var n=Ie;return n.length>0?l(C,{children:n.map(We)}):l(x,{children:O})}return Ie?l($,{children:Ie.label}):l(x,{children:O})}()}),t(m,{children:[en&&l(g,{className:"select-clear",onClick:qe,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})}),V&&l(b,{className:"select-loading",children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"})})}),nn&&l(y,{className:"select-arrow ".concat(Ae?"select-arrow-open":""),$open:Ae,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M7 10l5 5 5-5z"})})})]})]}),(Je=l(A,{ref:He,className:"select-dropdown",$open:Ae,$styles:null==W?void 0:W.dropdown,children:l(N,{$maxHeight:he,children:Ge.length>0?Ge.map(Xe):l(k,{className:"select-empty",children:ge})})}),be?be()?Je:null:Je)]})]})})};export{z as default};
1
+ "use client";import{__spreadArray as e,__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as l,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as a,useMemo as c,useCallback as u}from"react";import{injectGlobalStyles as s,Wrapper as d,LabelWrapper as v,Label as f,Selector as p,SelectorContent as h,SuffixArea as m,ClearButton as g,LoadingIcon as b,Arrow as y,SearchInput as w,TagsContainer as C,Placeholder as x,SingleValue as $,Dropdown as A,OptionList as N,Empty as k,Tag as L,TagClose as M,CheckIcon as D,Option as E}from"./styles.js";var z=function(z){var B=z.value,P=z.defaultValue,S=z.options,j=void 0===S?[]:S,H=z.disabled,R=void 0!==H&&H,T=z.loading,V=void 0!==T&&T,G=z.mode,I=void 0===G?"single":G,K=z.placeholder,O=void 0===K?"请选择":K,U=z.searchable,Z=void 0!==U&&U,_=z.clearable,q=void 0!==_&&_,F=z.size,J=void 0===F?"default":F,Q=z.width,W=z.styles,X=z.onChange,Y=z.onOpenChange,ee=z.onSearch,ne=z.optionRender,le=z.tagRender,te=z.label,re=z.labelGap,oe=void 0===re?8:re,ie=z.labelClassName,ae=void 0===ie?"":ie,ce=z.labelStyle,ue=z.className,se=void 0===ue?"":ue,de=z.style,ve=z.showArrow,fe=void 0===ve||ve,pe=z.maxHeight,he=void 0===pe?256:pe,me=z.emptyContent,ge=void 0===me?"暂无数据":me,be=z.getPopupContainer,ye=void 0!==B,we=o(void 0!==P?P:"multiple"===I?[]:""),Ce=we[0],xe=we[1],$e=o(!1),Ae=$e[0],Ne=$e[1],ke=o(""),Le=ke[0],Me=ke[1],De=o(-1),Ee=De[0],ze=De[1],Be=o(!1),Pe=Be[0],Se=Be[1],je=i(null),He=i(null),Re=i(null);a(function(){s()},[]);var Te=ye?B:Ce,Ve="multiple"===I,Ge=c(function(){return Le?j.filter(function(e){return String(e.label).toLowerCase().includes(Le.toLowerCase())}):j},[j,Le]),Ie=c(function(){if(Ve){var e=Array.isArray(Te)?Te:[];return j.filter(function(n){return e.includes(n.value)})}return j.find(function(e){return e.value===Te})||null},[Te,j,Ve]),Ke=u(function(e,n){ye||xe(e),null==X||X(e,n)},[ye,X]),Oe=u(function(e){e.disabled||(Ke(e.value,e),Me(""),Ne(!1))},[Ke]),Ue=u(function(n){if(!n.disabled){var l,t,r=Array.isArray(Te)?Te:[];r.includes(n.value)?(l=r.filter(function(e){return e!==n.value}),t=Ie.filter(function(e){return e.value!==n.value})):(l=e(e([],r,!0),[n.value],!1),t=e(e([],Ie,!0),[n],!1)),Ke(l,t),Me(""),setTimeout(function(){var e;return null===(e=Re.current)||void 0===e?void 0:e.focus()},0)}},[Te,Ke,Ie]),Ze=u(function(e){Ve?Ue(e):Oe(e)},[Ve,Ue,Oe]),_e=u(function(e,n){if(e.stopPropagation(),!R){var l=(Array.isArray(Te)?Te:[]).filter(function(e){return e!==n}),t=Ie.filter(function(e){return e.value!==n});Ke(l,t)}},[Te,R,Ke,Ie]),qe=u(function(e){(e.stopPropagation(),R)||(Ke(Ve?[]:"",Ve?[]:void 0),Me(""))},[R,Ve,Ke]),Fe=u(function(e){var n=e.target.value;Me(n),null==ee||ee(n)},[ee]);a(function(){var e=function(e){je.current&&!je.current.contains(e.target)&&(Ne(!1),Me(""))};return Ae&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[Ae]),a(function(){null==Y||Y(Ae),Ae&&Z&&setTimeout(function(){var e;return null===(e=Re.current)||void 0===e?void 0:e.focus()},0)},[Ae,Z,Y]);var Je,Qe=u(function(e){if(Ae)switch(e.key){case"Escape":e.preventDefault(),Ne(!1);break;case"ArrowDown":e.preventDefault(),ze(function(e){return e<Ge.length-1?e+1:0});break;case"ArrowUp":e.preventDefault(),ze(function(e){return e>0?e-1:Ge.length-1});break;case"Enter":e.preventDefault(),Ee>=0&&Ee<Ge.length&&Ze(Ge[Ee])}else"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ne(!0))},[Ae,Ee,Ge,Ze]),We=function(e){return le?le({value:e.value,label:e.label,onClose:function(n){return _e(n,e.value)},disabled:R}):t(L,{className:"select-tag",$disabled:R,$styles:null==W?void 0:W.tag,children:[l("span",{children:e.label}),!R&&l(M,{className:"select-tag-close",onClick:function(n){return _e(n,e.value)},children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})})]},e.value)},Xe=function(e,n){var o=Ve?Te.includes(e.value):Te===e.value,i=n===Ee,a=ne?ne(e):t(r,{children:[o&&Ve&&l(D,{children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})})}),l("span",{children:e.label})]});return l(E,{className:"select-option ".concat(o?"select-option-selected":""," ").concat(i?"select-option-active":""),$selected:o,$active:i,$disabled:!!e.disabled,$styles:null==W?void 0:W.option,onClick:function(){return Ze(e)},onMouseEnter:function(){return ze(n)},children:a},e.value)},Ye=Ve?Array.isArray(Te)&&Te.length>0:""!==Te&&null!=Te,en=q&&!R&&Ye&&!V&&Pe,nn=fe&&!V&&!en;return l(d,{ref:je,className:"select-wrapper ".concat(se),$styles:null==W?void 0:W.wrapper,style:n({width:Q},de),children:t(v,{children:[te&&l(f,{className:"select-label ".concat(ae),style:n({marginRight:"number"==typeof oe?"".concat(oe,"px"):oe},ce),children:te}),t("div",{style:{flex:1,position:"relative"},children:[t(p,{className:"select-selector ".concat(J?"select-selector-".concat(J):""," ").concat(Ae?"select-selector-open":""," ").concat(R?"select-selector-disabled":""),$disabled:R,$loading:V,$size:J,$open:Ae,$styles:null==W?void 0:W.selector,onClick:function(){return!R&&!V&&Ne(!Ae)},onKeyDown:Qe,onMouseEnter:function(){return Se(!0)},onMouseLeave:function(){return Se(!1)},tabIndex:R?-1:0,role:"combobox","aria-expanded":Ae,"aria-haspopup":"listbox",children:[l(h,{children:function(){if(Z&&Ae){var e=Ve?"搜索...":String((null==Ie?void 0:Ie.label)||O);return l(w,{ref:Re,type:"text",value:Le,onChange:Fe,placeholder:e,onClick:function(e){return e.stopPropagation()}})}if(Ve){var n=Ie;return n.length>0?l(C,{children:n.map(We)}):l(x,{children:O})}return Ie?l($,{children:Ie.label}):l(x,{children:O})}()}),t(m,{children:[en&&l(g,{className:"select-clear",onClick:qe,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})}),V&&l(b,{className:"select-loading",children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"})})}),nn&&l(y,{className:"select-arrow ".concat(Ae?"select-arrow-open":""),$open:Ae,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M7 10l5 5 5-5z"})})})]})]}),(Je=l(A,{ref:He,className:"select-dropdown",$open:Ae,$styles:null==W?void 0:W.dropdown,children:l(N,{$maxHeight:he,children:Ge.length>0?Ge.map(Xe):l(k,{className:"select-empty",children:ge})})}),be?be()?Je:null:Je)]})]})})};export{z as default};
@@ -1 +1 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as r,jsx as n}from"react/jsx-runtime";import{useState as a,useRef as t,useEffect as o,useCallback as l,useMemo as i}from"react";var c=function(c){var d,u=c.min,s=void 0===u?0:u,m=c.max,v=void 0===m?100:m,h=c.step,f=void 0===h?1:h,k=c.value,C=c.defaultValue,p=void 0===C?0:C,b=c.disabled,g=void 0!==b&&b,M=c.marks,w=void 0===M?{}:M,y=c.showValue,x=void 0!==y&&y,L=c.trackColor,N=void 0===L?"#1890ff":L,A=c.handleColor,E=void 0===A?"#1890ff":A,j=c.gradient,D=c.onChange,z=c.onAfterChange,F=c.className,X=void 0===F?"":F,P=c.style,R=a(p),U=R[0],V=R[1],q=a(!1),B=q[0],H=q[1],I=t(null),K=t(null),O=t(void 0!==k?k:p),S=void 0!==k,T=S?k:U;o(function(){O.current=T},[T]);var _=l(function(e){var r=(e-s)/(v-s);return Math.max(0,Math.min(1,r))},[s,v]),G=l(function(e){var r=Math.max(0,Math.min(1,e)),n=s+r*(v-s);if(f>0){var a=Math.round(n/f)*f;return Math.min(v,Math.max(s,a))}return Math.min(v,Math.max(s,n))},[s,v,f]),J=function(e){return"touches"in e?e.touches[0].clientX:e.clientX},Q=l(function(e){I.current&&!g&&(K.current&&cancelAnimationFrame(K.current),K.current=requestAnimationFrame(function(){var r=I.current.getBoundingClientRect(),n=(e-r.left)/r.width,a=G(n);a!==O.current&&(O.current=a,S||V(a),null==D||D(a))}))},[g,S,G,D]),W=function(e){if(!g){e.preventDefault(),H(!0);var r=J(e);Q(r)}};o(function(){if(B){var e=function(e){e.preventDefault();var r=J(e);Q(r)},r=function(){H(!1),K.current&&(cancelAnimationFrame(K.current),K.current=null),null==z||z(O.current)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",r),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",r),K.current&&(cancelAnimationFrame(K.current),K.current=null)}}},[B,Q,z]);var Y=_(T),Z=i(function(){return Object.entries(w).map(function(e){var r=e[0],n=e[1],a=Number(r),t="string"==typeof n?{trackColor:void 0,handleColor:void 0,mark:n}:n;return{value:a,label:t.mark,trackColor:t.trackColor,handleColor:t.handleColor,position:_(a)}}).sort(function(e,r){return e.value-r.value})},[w,_]),$=i(function(){for(var e=0;e<Z.length;e++){var r=Z[e];if(T<=r.value)return{trackColor:r.trackColor,handleColor:r.handleColor,mark:r.label}}var n=Z[Z.length-1];return n?{trackColor:n.trackColor,handleColor:n.handleColor,mark:n.label}:{trackColor:void 0,handleColor:void 0,mark:""}},[Z,T]),ee=P&&P["--zjpcy-slider-track-filled-bg"],re=P&&P["--zjpcy-slider-handle-border"],ne=j&&!$.trackColor&&!ee&&"#1890ff"===N,ae=$.trackColor||ee||N,te=$.handleColor||re||E;return r("div",{className:"slider-container ".concat(g?"slider-container-disabled":""," ").concat(B?"slider-container-dragging":""," ").concat(X),style:e((d={},d["--zjpcy-slider-track-filled-bg"]=ae,d["--zjpcy-slider-handle-border"]="2px solid ".concat(te),d),P),children:[r("div",{ref:I,className:"slider-track",onClick:function(e){g||(e.target.classList.contains("slider-handle")||(Q(e.clientX),null==z||z(T)))},role:"presentation",children:[n("div",{className:"slider-track-filled",style:e({width:"".concat(100*Y,"%")},ne&&j?{background:"linear-gradient(to right, ".concat(j.startColor,", ").concat(j.endColor,")")}:{})}),n("div",{className:"slider-handle",style:{left:"".concat(100*Y,"%")},onMouseDown:W,onTouchStart:W,onKeyDown:function(e){if(!g){var r=T;switch(e.key){case"ArrowLeft":case"ArrowDown":r=Math.max(s,T-f);break;case"ArrowRight":case"ArrowUp":r=Math.min(v,T+f);break;case"Home":r=s;break;case"End":r=v;break;case"PageDown":r=Math.max(s,T-10*f);break;case"PageUp":r=Math.min(v,T+10*f);break;default:return}e.preventDefault(),void 0===k&&V(r),null==D||D(r),null==z||z(r)}},role:"slider","aria-valuemin":s,"aria-valuemax":v,"aria-valuenow":T,"aria-disabled":g,tabIndex:g?-1:0,children:n("div",{className:"slider-tooltip",children:T})})]}),Z.length>0&&n("div",{className:"slider-marks",children:Z.map(function(e){return n("div",{className:"slider-mark",style:{left:"".concat(100*e.position,"%"),color:e.trackColor||void 0},children:e.label},e.value)})}),x&&r("div",{className:"slider-value-display",children:["当前值:",T]})]})},d=c;export{c as Slider,d as default};
1
+ "use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as r,jsx as n}from"react/jsx-runtime";import{useState as a,useRef as t,useEffect as o,useCallback as l,useMemo as i}from"react";var c=function(c){var d,u=c.min,s=void 0===u?0:u,m=c.max,v=void 0===m?100:m,h=c.step,f=void 0===h?1:h,k=c.value,C=c.defaultValue,p=void 0===C?0:C,b=c.disabled,g=void 0!==b&&b,M=c.marks,w=void 0===M?{}:M,y=c.showValue,x=void 0!==y&&y,L=c.trackColor,N=void 0===L?"#1890ff":L,A=c.handleColor,E=void 0===A?"#1890ff":A,j=c.gradient,D=c.onChange,z=c.onAfterChange,F=c.className,X=void 0===F?"":F,P=c.style,R=a(p),U=R[0],V=R[1],q=a(!1),B=q[0],H=q[1],I=t(null),K=t(null),O=t(void 0!==k?k:p),S=void 0!==k,T=S?k:U;o(function(){O.current=T},[T]);var _=l(function(e){var r=(e-s)/(v-s);return Math.max(0,Math.min(1,r))},[s,v]),G=l(function(e){var r=Math.max(0,Math.min(1,e)),n=s+r*(v-s);if(f>0){var a=Math.round(n/f)*f;return Math.min(v,Math.max(s,a))}return Math.min(v,Math.max(s,n))},[s,v,f]),J=function(e){return"touches"in e?e.touches[0].clientX:e.clientX},Q=l(function(e){I.current&&!g&&(K.current&&cancelAnimationFrame(K.current),K.current=requestAnimationFrame(function(){var r=I.current.getBoundingClientRect(),n=(e-r.left)/r.width,a=G(n);a!==O.current&&(O.current=a,S||V(a),null==D||D(a))}))},[g,S,G,D]),W=function(e){if(!g){e.preventDefault(),H(!0);var r=J(e);Q(r)}};o(function(){if(B){var e=function(e){e.preventDefault();var r=J(e);Q(r)},r=function(){H(!1),K.current&&(cancelAnimationFrame(K.current),K.current=null),null==z||z(O.current)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",r),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",r),K.current&&(cancelAnimationFrame(K.current),K.current=null)}}},[B,Q,z]);var Y=_(T),Z=i(function(){return Object.entries(w).map(function(e){var r=e[0],n=e[1],a=Number(r),t="string"==typeof n?{trackColor:void 0,handleColor:void 0,mark:n}:n;return{value:a,label:t.mark,trackColor:t.trackColor,handleColor:t.handleColor,position:_(a)}}).sort(function(e,r){return e.value-r.value})},[w,_]),$=i(function(){for(var e=0;e<Z.length;e++){var r=Z[e];if(T<=r.value)return{trackColor:r.trackColor,handleColor:r.handleColor,mark:r.label}}var n=Z[Z.length-1];return n?{trackColor:n.trackColor,handleColor:n.handleColor,mark:n.label}:{trackColor:void 0,handleColor:void 0,mark:""}},[Z,T]),ee=P&&P["--zjpcy-slider-track-filled-bg"],re=P&&P["--zjpcy-slider-handle-border"],ne=j&&!$.trackColor&&!ee&&"#1890ff"===N,ae=$.trackColor||ee||N,te=$.handleColor||re||E;return r("div",{className:"slider-container ".concat(g?"slider-container-disabled":""," ").concat(B?"slider-container-dragging":""," ").concat(X),style:e((d={},d["--zjpcy-slider-track-filled-bg"]=ae,d["--zjpcy-slider-handle-border"]="2px solid ".concat(te),d),P),children:[r("div",{ref:I,className:"slider-track",onClick:function(e){g||(e.target.classList.contains("slider-handle")||(Q(e.clientX),null==z||z(T)))},role:"presentation",children:[n("div",{className:"slider-track-filled",style:e({width:"".concat(100*Y,"%")},ne&&j?{background:"linear-gradient(to right, ".concat(j.startColor,", ").concat(j.endColor,")")}:{})}),n("div",{className:"slider-handle",style:{left:"".concat(100*Y,"%")},onMouseDown:W,onTouchStart:W,onKeyDown:function(e){if(!g){var r=T;switch(e.key){case"ArrowLeft":case"ArrowDown":r=Math.max(s,T-f);break;case"ArrowRight":case"ArrowUp":r=Math.min(v,T+f);break;case"Home":r=s;break;case"End":r=v;break;case"PageDown":r=Math.max(s,T-10*f);break;case"PageUp":r=Math.min(v,T+10*f);break;default:return}e.preventDefault(),void 0===k&&V(r),null==D||D(r),null==z||z(r)}},role:"slider","aria-valuemin":s,"aria-valuemax":v,"aria-valuenow":T,"aria-disabled":g,tabIndex:g?-1:0,children:n("div",{className:"slider-tooltip",children:T})})]}),Z.length>0&&n("div",{className:"slider-marks",children:Z.map(function(e){return n("div",{className:"slider-mark",style:{left:"".concat(100*e.position,"%"),color:e.trackColor||void 0},children:e.label},e.value)})}),x&&r("div",{className:"slider-value-display",children:["当前值:",T]})]})},d=c;export{c as Slider,d as default};
@@ -1 +1 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as r}from"react/jsx-runtime";import t from"react";var n=function(n){var a=n.children,i=n.gap,l=void 0===i?12:i,c=n.align,s=void 0===c?"center":c,o=n.wrap,u=void 0===o?"nowrap":o,d=n.className,f=n.style,p=void 0===f?{}:f,m=n.inline,v=void 0!==m&&m,h=t.Children.toArray(a).filter(function(e){return null!=e});return 0===h.length?null:r("div",{className:"space ".concat(v?"space-inline":""," ").concat(d||""),style:e({display:v?"inline-flex":"flex",gap:"number"==typeof l?"".concat(l,"px"):l,alignItems:function(){switch(s){case"start":return"flex-start";case"end":return"flex-end";case"center":default:return"center";case"baseline":return"baseline";case"stretch":return"stretch"}}(),flexWrap:u},p),children:h.map(function(e,t){return r("div",{className:"space-item",children:e},t)})})};export{n as default};
1
+ import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as n}from"react/jsx-runtime";import r from"react";var t=function(t){var a=t.children,i=t.gap,s=void 0===i?12:i,l=t.align,c=void 0===l?"center":l,o=t.wrap,u=void 0===o?"nowrap":o,d=t.className,p=t.style,f=void 0===p?{}:p,m=t.inline,v=void 0!==m&&m,h=t.as,x=void 0===h?"div":h,b=r.Children.toArray(a).filter(function(e){return null!=e});return 0===b.length?null:n(x,{className:"space ".concat(v?"space-inline":""," ").concat(d||""),style:e({display:v?"inline-flex":"flex",gap:"number"==typeof s?"".concat(s,"px"):s,alignItems:function(){switch(c){case"start":return"flex-start";case"end":return"flex-end";case"center":default:return"center";case"baseline":return"baseline";case"stretch":return"stretch"}}(),flexWrap:u},f),children:b.map(function(e,r){return n("span",{className:"space-item",children:e},r)})})};export{t as default};
@@ -1 +1 @@
1
- import{jsx as i,jsxs as c}from"react/jsx-runtime";import{useState as e,useEffect as n,useMemo as s}from"react";var t=function(e){var n=e.size,s=e.sizeType;return c("svg",{viewBox:"0 0 24 24",className:"zjpcy-spin-icon zjpcy-spin-icon-".concat(s),style:{width:n,height:n},children:[i("circle",{className:"zjpcy-spin-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),i("circle",{className:"zjpcy-spin-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})},r={small:16,default:24,large:32},a=function(a){var l=a.spinning,o=void 0===l||l,p=a.indicator,d=a.tip,u=a.size,y=void 0===u?"default":u,m=a.delay,f=void 0===m?0:m,v=a.className,z=void 0===v?"":v,h=a.style,j=a.children,N=a.fullscreen,x=void 0!==N&&N,g=e(o),k=g[0],T=g[1],w=e(0===f),W=w[0],B=w[1];n(function(){if(o){if(T(!0),f>0){var i=setTimeout(function(){B(!0)},f);return function(){return clearTimeout(i)}}B(!0)}else T(!1),B(!1)},[o,f]);var b=r[y],q=s(function(){return p||i(t,{size:b,sizeType:y})},[p,b,y]),A=function(){return c("div",{className:"zjpcy-spin-content ".concat(d?"zjpcy-spin-content-tip":""),children:[q,d&&i("div",{className:"zjpcy-spin-tip zjpcy-spin-tip-".concat(y),children:d})]})};return x?k&&W?i("div",{className:"zjpcy-spin-fullscreen ".concat(z),style:h,children:A()}):null:j?c("div",{className:"zjpcy-spin-nested-wrapper ".concat(z),style:h,children:[j,k&&W&&i("div",{className:"zjpcy-spin-mask",children:A()})]}):k&&W?i("div",{className:"zjpcy-spin ".concat(z),style:h,children:A()}):null};export{a as default};
1
+ "use client";import{jsx as i,jsxs as c}from"react/jsx-runtime";import{useState as e,useEffect as n,useMemo as s}from"react";var t=function(e){var n=e.size,s=e.sizeType;return c("svg",{viewBox:"0 0 24 24",className:"zjpcy-spin-icon zjpcy-spin-icon-".concat(s),style:{width:n,height:n},children:[i("circle",{className:"zjpcy-spin-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),i("circle",{className:"zjpcy-spin-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})},r={small:16,default:24,large:32},l=function(l){var a=l.spinning,o=void 0===a||a,p=l.indicator,d=l.tip,u=l.size,y=void 0===u?"default":u,m=l.delay,f=void 0===m?0:m,v=l.className,z=void 0===v?"":v,h=l.style,j=l.children,N=l.fullscreen,x=void 0!==N&&N,g=e(o),k=g[0],T=g[1],w=e(0===f),W=w[0],B=w[1];n(function(){if(o){if(T(!0),f>0){var i=setTimeout(function(){B(!0)},f);return function(){return clearTimeout(i)}}B(!0)}else T(!1),B(!1)},[o,f]);var b=r[y],q=s(function(){return p||i(t,{size:b,sizeType:y})},[p,b,y]),A=function(){return c("div",{className:"zjpcy-spin-content ".concat(d?"zjpcy-spin-content-tip":""),children:[q,d&&i("div",{className:"zjpcy-spin-tip zjpcy-spin-tip-".concat(y),children:d})]})};return x?k&&W?i("div",{className:"zjpcy-spin-fullscreen ".concat(z),style:h,children:A()}):null:j?c("div",{className:"zjpcy-spin-nested-wrapper ".concat(z),style:h,children:[j,k&&W&&i("div",{className:"zjpcy-spin-mask",children:A()})]}):k&&W?i("div",{className:"zjpcy-spin ".concat(z),style:h,children:A()}):null};export{l as default};
@@ -1 +1 @@
1
- import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r,{useRef as i,useState as o,useMemo as u,useCallback as a,useEffect as c}from"react";import{parseSizeConfig as s,parseNumberConfig as l,parseSizeToPixels as d,getContainerStyle as m,getPanelStyle as v,getSplitterBarStyle as f,getSplitterLineStyle as p}from"./styles.js";var h=function(h){var z=h.layout,g=void 0===z?"horizontal":z,y=h.panels,S=h.defaultSize,j=void 0===S?"50%":S,x=h.minSize,b=void 0===x?50:x,E=h.maxSize,_=void 0===E?1/0:E,L=h.splitterSize,w=h.lineColor,D=h.lineHoverColor,M=h.disabled,N=void 0!==M&&M,C=h.onResize,I=h.onResizeEnd,P=h.className,X=void 0===P?"":P,Y=h.style,B=h.left,O=h.right,R=h.top,A=h.bottom,q=h.children,F=i(null),H=o([]),T=H[0],V=H[1],k=o(!1),G=k[0],J=k[1],K=o(-1),Q=K[0],U=K[1],W=i({isDragging:!1,startPosition:0,startSizes:[],containerSize:0,splitterIndex:-1}),Z=u(function(){if(y&&y.length>0)return y.map(function(e){return e.content});if("vertical"===g){if(R&&A)return[R,A]}else if(B&&O)return[B,O];return q&&Array.isArray(q)?q:[]},[y,g,B,O,R,A,q]),$=Z.length,ee=a(function(e){return y&&y[e]?y[e]:{}},[y]),te=a(function(){if(!F.current)return 0;var e=F.current.getBoundingClientRect();return"horizontal"===g?e.width:e.height},[g]),ne=a(function(){if(void 0!==L)return L;var e=getComputedStyle(document.documentElement).getPropertyValue("--zjpcy-splitter-bar-size").trim();return parseInt(e,10)||10},[L]);c(function(){var e=te();if(e>0&&$>0){var t=ne()*($-1),n=Math.max(0,e-t),r=s(j,$,"".concat(100/$,"%")),i=l(b,$,50),o=l(_,$,1/0),u=y?y.map(function(e){var t;return null!==(t=e.defaultSize)&&void 0!==t?t:r[y.indexOf(e)]}):r,a=y?y.map(function(e){var t;return null!==(t=e.minSize)&&void 0!==t?t:i[y.indexOf(e)]}):i,c=y?y.map(function(e){var t;return null!==(t=e.maxSize)&&void 0!==t?t:o[y.indexOf(e)]}):o,m=u.map(function(e){return d(e,n)}),v=m.reduce(function(e,t){return e+t},0);if(v!==n&&n>0){var f=n/v;m=m.map(function(e){return e*f})}m=m.map(function(e,t){return Math.max(a[t],Math.min(c[t],e))}),V(m)}},[$]),c(function(){var e=function(){var e=te();if(e>0&&T.length>0){var t=ne()*($-1),n=Math.max(0,e-t),r=T.reduce(function(e,t){return e+t},0);if(r>0){var i=n/r;V(function(e){return e.map(function(e){return e*i})})}}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[T,$,te,ne]);var re=a(function(t){return function(n){if(!N){var r=ee(t),i=ee(t+1);if(!r.disabled&&!i.disabled){n.preventDefault();var o="touches"in n?n.touches[0].clientX:n.clientX,u="touches"in n?n.touches[0].clientY:n.clientY,a="horizontal"===g?o:u,c=te();W.current={isDragging:!0,startPosition:a,startSizes:e([],T,!0),containerSize:c,splitterIndex:t},J(!0),U(t)}}}},[N,g,T,te,ee]),ie=a(function(t){if(W.current.isDragging&&!N){var n="touches"in t?t.touches[0].clientX:t.clientX,r="touches"in t?t.touches[0].clientY:t.clientY,i=("horizontal"===g?n:r)-W.current.startPosition,o=W.current.splitterIndex,u=W.current.startSizes,a=l(b,$,50),c=l(_,$,1/0),s=y?y.map(function(e,t){var n;return null!==(n=e.minSize)&&void 0!==n?n:a[t]}):a,d=y?y.map(function(e,t){var n;return null!==(n=e.maxSize)&&void 0!==n?n:c[t]}):c,m=s[o],v=d[o],f=s[o+1],p=d[o+1],h=u[o],z=u[o+1],S=h+i,j=z-i;S<m?(S=m,j=h+z-m):S>v&&(S=v,j=h+z-v),j<f?(j=f,S=h+z-f):j>p&&(j=p,S=h+z-p);var x=e([],T,!0);x[o]=S,x[o+1]=j,V(x),null==C||C(x,o)}},[N,g,T,$,b,_,y,C]),oe=a(function(){W.current.isDragging&&(W.current.isDragging=!1,J(!1),U(-1),null==I||I(T))},[T,I]);if(c(function(){if(G)return document.addEventListener("mousemove",ie),document.addEventListener("mouseup",oe),document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",oe),function(){document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",oe),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",oe)}},[G,ie,oe]),$<2)return console.warn("Splitter requires at least 2 panels"),null;var ue=["zjpcy-splitter","zjpcy-splitter-".concat(g),G?"zjpcy-splitter-dragging":"",X].filter(Boolean).join(" ");return t("div",{ref:F,className:ue,style:m(g,Y),children:Z.map(function(e,i){var o=T[i]||0,u=i===$-1;return n(r.Fragment,{children:[t("div",{className:"zjpcy-splitter__panel",style:v(o,g,i,$),children:e}),!u&&t("div",{className:["zjpcy-splitter__bar",Q===i?"zjpcy-splitter__bar-dragging":"",N||ee(i).disabled||ee(i+1).disabled?"zjpcy-splitter__bar-disabled":""].filter(Boolean).join(" "),style:f(g,L,N,i),onMouseDown:re(i),onTouchStart:re(i),children:t("div",{className:"zjpcy-splitter__line",style:p(g,w,D,G,Q===i)})})]},i)})})},z=h;export{h as Splitter,z as default};
1
+ "use client";import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r,{useRef as i,useState as o,useMemo as u,useCallback as a,useEffect as c}from"react";import{parseSizeConfig as s,parseNumberConfig as l,parseSizeToPixels as d,getContainerStyle as m,getPanelStyle as v,getSplitterBarStyle as f,getSplitterLineStyle as p}from"./styles.js";var h=function(h){var z=h.layout,g=void 0===z?"horizontal":z,y=h.panels,S=h.defaultSize,j=void 0===S?"50%":S,x=h.minSize,b=void 0===x?50:x,E=h.maxSize,_=void 0===E?1/0:E,L=h.splitterSize,w=h.lineColor,D=h.lineHoverColor,M=h.disabled,N=void 0!==M&&M,C=h.onResize,I=h.onResizeEnd,P=h.className,X=void 0===P?"":P,Y=h.style,B=h.left,O=h.right,R=h.top,A=h.bottom,q=h.children,F=i(null),H=o([]),T=H[0],V=H[1],k=o(!1),G=k[0],J=k[1],K=o(-1),Q=K[0],U=K[1],W=i({isDragging:!1,startPosition:0,startSizes:[],containerSize:0,splitterIndex:-1}),Z=u(function(){if(y&&y.length>0)return y.map(function(e){return e.content});if("vertical"===g){if(R&&A)return[R,A]}else if(B&&O)return[B,O];return q&&Array.isArray(q)?q:[]},[y,g,B,O,R,A,q]),$=Z.length,ee=a(function(e){return y&&y[e]?y[e]:{}},[y]),te=a(function(){if(!F.current)return 0;var e=F.current.getBoundingClientRect();return"horizontal"===g?e.width:e.height},[g]),ne=a(function(){if(void 0!==L)return L;var e=getComputedStyle(document.documentElement).getPropertyValue("--zjpcy-splitter-bar-size").trim();return parseInt(e,10)||10},[L]);c(function(){var e=te();if(e>0&&$>0){var t=ne()*($-1),n=Math.max(0,e-t),r=s(j,$,"".concat(100/$,"%")),i=l(b,$,50),o=l(_,$,1/0),u=y?y.map(function(e){var t;return null!==(t=e.defaultSize)&&void 0!==t?t:r[y.indexOf(e)]}):r,a=y?y.map(function(e){var t;return null!==(t=e.minSize)&&void 0!==t?t:i[y.indexOf(e)]}):i,c=y?y.map(function(e){var t;return null!==(t=e.maxSize)&&void 0!==t?t:o[y.indexOf(e)]}):o,m=u.map(function(e){return d(e,n)}),v=m.reduce(function(e,t){return e+t},0);if(v!==n&&n>0){var f=n/v;m=m.map(function(e){return e*f})}m=m.map(function(e,t){return Math.max(a[t],Math.min(c[t],e))}),V(m)}},[$]),c(function(){var e=function(){var e=te();if(e>0&&T.length>0){var t=ne()*($-1),n=Math.max(0,e-t),r=T.reduce(function(e,t){return e+t},0);if(r>0){var i=n/r;V(function(e){return e.map(function(e){return e*i})})}}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[T,$,te,ne]);var re=a(function(t){return function(n){if(!N){var r=ee(t),i=ee(t+1);if(!r.disabled&&!i.disabled){n.preventDefault();var o="touches"in n?n.touches[0].clientX:n.clientX,u="touches"in n?n.touches[0].clientY:n.clientY,a="horizontal"===g?o:u,c=te();W.current={isDragging:!0,startPosition:a,startSizes:e([],T,!0),containerSize:c,splitterIndex:t},J(!0),U(t)}}}},[N,g,T,te,ee]),ie=a(function(t){if(W.current.isDragging&&!N){var n="touches"in t?t.touches[0].clientX:t.clientX,r="touches"in t?t.touches[0].clientY:t.clientY,i=("horizontal"===g?n:r)-W.current.startPosition,o=W.current.splitterIndex,u=W.current.startSizes,a=l(b,$,50),c=l(_,$,1/0),s=y?y.map(function(e,t){var n;return null!==(n=e.minSize)&&void 0!==n?n:a[t]}):a,d=y?y.map(function(e,t){var n;return null!==(n=e.maxSize)&&void 0!==n?n:c[t]}):c,m=s[o],v=d[o],f=s[o+1],p=d[o+1],h=u[o],z=u[o+1],S=h+i,j=z-i;S<m?(S=m,j=h+z-m):S>v&&(S=v,j=h+z-v),j<f?(j=f,S=h+z-f):j>p&&(j=p,S=h+z-p);var x=e([],T,!0);x[o]=S,x[o+1]=j,V(x),null==C||C(x,o)}},[N,g,T,$,b,_,y,C]),oe=a(function(){W.current.isDragging&&(W.current.isDragging=!1,J(!1),U(-1),null==I||I(T))},[T,I]);if(c(function(){if(G)return document.addEventListener("mousemove",ie),document.addEventListener("mouseup",oe),document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",oe),function(){document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",oe),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",oe)}},[G,ie,oe]),$<2)return console.warn("Splitter requires at least 2 panels"),null;var ue=["zjpcy-splitter","zjpcy-splitter-".concat(g),G?"zjpcy-splitter-dragging":"",X].filter(Boolean).join(" ");return t("div",{ref:F,className:ue,style:m(g,Y),children:Z.map(function(e,i){var o=T[i]||0,u=i===$-1;return n(r.Fragment,{children:[t("div",{className:"zjpcy-splitter__panel",style:v(o,g,i,$),children:e}),!u&&t("div",{className:["zjpcy-splitter__bar",Q===i?"zjpcy-splitter__bar-dragging":"",N||ee(i).disabled||ee(i+1).disabled?"zjpcy-splitter__bar-disabled":""].filter(Boolean).join(" "),style:f(g,L,N,i),onMouseDown:re(i),onTouchStart:re(i),children:t("div",{className:"zjpcy-splitter__line",style:p(g,w,D,G,Q===i)})})]},i)})})},z=h;export{h as Splitter,z as default};