@zjpcy/simple-design 1.3.9 → 1.4.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 (54) hide show
  1. package/dist/cjs/index.css +13969 -1
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/es/Anchor/index.js +1 -1
  4. package/dist/es/Button/Button.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/DatePicker/styles.js +1 -1
  12. package/dist/es/Divider/index.js +1 -1
  13. package/dist/es/Drawer/index.js +1 -1
  14. package/dist/es/Dropdown/index.js +1 -1
  15. package/dist/es/Empty/index.js +1 -1
  16. package/dist/es/Grid/index.js +1 -1
  17. package/dist/es/Icon/Icon.js +1 -1
  18. package/dist/es/Input/InputBase.js +1 -1
  19. package/dist/es/Input/Textarea.js +1 -1
  20. package/dist/es/Layout/styles.js +1 -1
  21. package/dist/es/Masonry/index.js +1 -1
  22. package/dist/es/Menu/index.js +1 -1
  23. package/dist/es/Message/Message.js +1 -1
  24. package/dist/es/Modal/index.js +1 -1
  25. package/dist/es/Notice/Notice.js +1 -1
  26. package/dist/es/Pagination/index.js +1 -1
  27. package/dist/es/Popconfirm/index.js +1 -1
  28. package/dist/es/Progress/index.js +1 -1
  29. package/dist/es/Radio/index.js +1 -1
  30. package/dist/es/Rate/index.js +1 -1
  31. package/dist/es/Select/index.js +1 -1
  32. package/dist/es/Select/styles.js +1 -1
  33. package/dist/es/Slider/index.js +1 -1
  34. package/dist/es/Spin/index.js +1 -1
  35. package/dist/es/Splitter/index.js +1 -1
  36. package/dist/es/Splitter/styles.js +1 -1
  37. package/dist/es/Steps/index.js +1 -1
  38. package/dist/es/Switch/styles.js +1 -1
  39. package/dist/es/Table/SortableRow.js +1 -1
  40. package/dist/es/Table/index.js +1 -1
  41. package/dist/es/Tabs/index.js +1 -1
  42. package/dist/es/Tag/index.js +1 -1
  43. package/dist/es/TimePicker/RangePicker.js +1 -1
  44. package/dist/es/TimePicker/TimePickerPanel.js +1 -1
  45. package/dist/es/TimePicker/index.js +1 -1
  46. package/dist/es/Tooltip/Tooltip.js +1 -1
  47. package/dist/es/Tree/index.js +1 -1
  48. package/dist/es/TreeSelect/index.js +1 -1
  49. package/dist/es/TreeSelect/styles.js +1 -1
  50. package/dist/es/Typography/index.js +1 -1
  51. package/dist/es/Upload/index.js +1 -1
  52. package/dist/es/index.css +13969 -1
  53. package/dist/variables.css +177 -177
  54. package/package.json +3 -24
@@ -1 +1 @@
1
- import{__assign as o}from"../node_modules/tslib/tslib.es6.js";import{jsx as r}from"react/jsx-runtime";var t=function(t){var i=t.orientation,a=void 0===i?"horizontal":i,e=t.type,d=void 0===e?"solid":e,n=t.color,s=void 0===n?"#339af0":n,l=t.className,c=void 0===l?"":l,v=t.style;return r("div",{className:"divider divider-".concat(a," divider-").concat(d," ").concat(c),style:o({backgroundColor:"horizontal"===a?s:"transparent",borderColor:"vertical"===a?s:"transparent"},v)})};export{t as default};
1
+ import{__assign as i}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import r from"classnames";var d=function(d){var t,a=d.orientation,e=void 0===a?"horizontal":a,s=d.type,c=void 0===s?"solid":s,l=d.color,m=void 0===l?"#339af0":l,n=d.className,v=void 0===n?"":n,f=d.style,p="#339af0"!==m&&void 0!==m,u=r("divider","divider-".concat(e),((t={})["divider-".concat(c,"-").concat(e)]="dashed"===c,t["divider-primary"]=p,t["divider-primary-with-text"]=p,t),v);return o("div",{className:u,style:i({backgroundColor:m},f)})};export{d as default};
@@ -1 +1 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as r,Fragment as i}from"react/jsx-runtime";import{useState as n,useRef as a,useEffect as d,useCallback as o}from"react";import{createPortal as c}from"react-dom";import l from"classnames";import s from"../Icon/Icon.js";import h from"../Button/Button.js";var u=function(u){var m=u.open,p=u.title,w=u.width,f=void 0===w?460:w,v=u.height,g=void 0===v?300:v,y=u.placement,b=void 0===y?"right":y,x=u.maskClosable,N=void 0===x||x,C=u.mask,z=void 0===C||C,k=u.onClose,W=u.children,H=u.className,M=u.style,I=u.maskStyle,E=u.maskClassName,L=u.contentClassName,S=u.contentStyle,_=u.header,j=u.headerClassName,X=u.headerStyle,Y=u.footer,B=u.footerClassName,q=u.footerStyle,A=u.getContainer,D=void 0!==A&&A,F=u.destroyOnClose,P=void 0!==F&&F,T=u.closable,O=void 0===T||T,G=u.zIndex,J=void 0===G?1e3:G,K=u.loading,Q=void 0!==K&&K,R=u.loadingIcon,U=u.resizable,V=void 0!==U&&U,Z=u.resizeHandleSize,$=void 0===Z?8:Z,ee=u.minWidth,te=void 0===ee?460:ee,re=u.minHeight,ie=void 0===re?150:re,ne=u.onChange,ae=n(!1),de=ae[0],oe=ae[1],ce=n(!1),le=ce[0],se=ce[1],he=n(!1),ue=he[0],me=he[1],pe=window.innerWidth,we=window.innerHeight,fe=n("number"==typeof f?f:460),ve=fe[0],ge=fe[1],ye=n("number"==typeof g?g:300),be=ye[0],xe=ye[1],Ne=n(!1),Ce=Ne[0],ze=Ne[1],ke=a(null),We=a({x:0,y:0}),He=a({width:0,height:0}),Me=a({width:ve,height:be}),Ie=a({placement:b,minWidth:te,maxWidth:pe,minHeight:ie,maxHeight:we,onChange:ne});d(function(){Me.current={width:ve,height:be}},[ve,be]),d(function(){Ie.current={placement:b,minWidth:te,maxWidth:pe,minHeight:ie,maxHeight:we,onChange:ne}},[b,te,pe,ie,we,ne]),d(function(){"number"==typeof f&&ge(f)},[f]),d(function(){"number"==typeof g&&xe(g)},[g]),d(function(){if(!m){se(!1),me(!0);var e=setTimeout(function(){oe(!1),me(!1)},300);return function(){return clearTimeout(e)}}return me(!1),oe(!0),document.body.style.overflow="hidden",requestAnimationFrame(function(){requestAnimationFrame(function(){se(!0)})}),function(){document.body.style.overflow=""}},[m,300]);var Ee=function(){N&&k()},Le=function(){k()},Se=function(e){return"number"==typeof e?"".concat(e,"px"):e},_e=function(){var t=e(e({},M),{zIndex:J}),r=V?{width:ve,height:be}:{width:f,height:g};switch(b){case"left":case"right":t.width=Se(r.width),t.height="100%";break;case"top":case"bottom":t.height=Se(r.height),t.width="100%"}return Ce&&(t.transition="none"),t},je=V&&de,Xe=function(){switch(b){case"left":return"idp-drawer-resize-handle--right";case"right":return"idp-drawer-resize-handle--left";case"top":return"idp-drawer-resize-handle--bottom";case"bottom":return"idp-drawer-resize-handle--top";default:return""}},Ye=function(){switch(b){case"left":case"right":return"col-resize";case"top":case"bottom":return"row-resize";default:return"default"}},Be=o(function(e){e.preventDefault(),e.stopPropagation();var t=Me.current.width,r=Me.current.height;if(ke.current){var i=Ie.current;"left"===i.placement||"right"===i.placement?ke.current.style.width="".concat(t,"px"):ke.current.style.height="".concat(r,"px")}ze(!0),We.current={x:e.clientX,y:e.clientY},He.current={width:t,height:r}},[]),qe=o(function(e){var t,r=Ie.current,i=e.clientX-We.current.x,n=e.clientY-We.current.y,a=He.current.width,d=He.current.height;if("left"===r.placement){var o=He.current.width+i;(a=Math.max(r.minWidth,Math.min(r.maxWidth,o)))!==o&&(We.current.x=e.clientX,He.current.width=a)}else if("right"===r.placement){o=He.current.width-i;(a=Math.max(r.minWidth,Math.min(r.maxWidth,o)))!==o&&(We.current.x=e.clientX,He.current.width=a)}else if("top"===r.placement){var c=He.current.height+n;(d=Math.max(r.minHeight,Math.min(r.maxHeight,c)))!==c&&(We.current.y=e.clientY,He.current.height=d)}else if("bottom"===r.placement){c=He.current.height-n;(d=Math.max(r.minHeight,Math.min(r.maxHeight,c)))!==c&&(We.current.y=e.clientY,He.current.height=d)}Me.current={width:a,height:d},ge(a),xe(d),null===(t=r.onChange)||void 0===t||t.call(r,{width:a,height:d})},[]),Ae=o(function(){ze(!1)},[]);d(function(){return Ce?(document.addEventListener("mousemove",qe),document.addEventListener("mouseup",Ae)):(document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ae)),function(){document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ae)}},[Ce,qe,Ae]);var De=function(){return Q?t("div",R?{className:"idp-drawer-loading",children:t("div",{className:"idp-drawer-loading-content",children:R})}:{className:"idp-drawer-loading",children:t("div",{className:"idp-drawer-loading-content",children:t("div",{className:"idp-drawer-loading-spinner",children:r("svg",{viewBox:"0 0 24 24",className:"idp-drawer-loading-icon",children:[t("circle",{className:"idp-drawer-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),t("circle",{className:"idp-drawer-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null},Fe=function(){return!1===_?null:_?t("div",{className:l("idp-drawer-header",j),style:X,children:_}):p||O?r("div",{className:l("idp-drawer-header",j),style:X,children:[t("div",{className:"idp-drawer-header__title",children:p}),O&&t("button",{className:"idp-drawer-header__close",onClick:Le,type:"button","aria-label":"Close",children:t(s,{type:"close",size:20})})]}):null},Pe=function(){var e;return je?t("div",{className:l("idp-drawer-resize-handle",Xe()),style:(e={cursor:Ye()},e["left"===b||"right"===b?"width":"height"]=$,e),onMouseDown:Be}):null},Te=function(){if(!de&&!ue)return null;var n=t("div",{className:l("idp-drawer-overlay",{"idp-drawer-overlay--visible":le&&!ue,"idp-drawer-overlay--closing":ue,"idp-drawer-overlay--resizing":Ce},E),style:e({zIndex:J},I),onClick:Ee,children:r("div",{ref:ke,className:l("idp-drawer","idp-drawer--".concat(b),{"idp-drawer--visible":le&&!ue,"idp-drawer--closing":ue,"idp-drawer--no-mask":!z,"idp-drawer--resizing":Ce},H),style:_e(),onClick:function(e){return e.stopPropagation()},children:[De(),Fe(),t("div",{className:l("idp-drawer-content",L),style:S,children:P&&ue?null:W}),!1!==Y&&t("div",{className:l("idp-drawer-footer",B),style:q,children:Y||r(i,{children:[t(h,{onClick:Le,type:"button",children:"取消"}),t(h,{variant:"primary",onClick:Le,type:"button",children:"确认"})]})}),Pe()]})});return z?n:t("div",{className:l("idp-drawer-wrapper",{"idp-drawer-wrapper--visible":le&&!ue,"idp-drawer-wrapper--closing":ue}),style:{zIndex:J},children:r("div",{ref:ke,className:l("idp-drawer","idp-drawer--".concat(b),{"idp-drawer--visible":le&&!ue,"idp-drawer--closing":ue,"idp-drawer--no-mask":!z,"idp-drawer--resizing":Ce},H),style:_e(),children:[De(),Fe(),t("div",{className:l("idp-drawer-content",L),style:S,children:P&&ue?null:W}),!1!==Y&&t("div",{className:l("idp-drawer-footer",B),style:q,children:Y||r(i,{children:[t("button",{onClick:Le,type:"button",children:"取消"}),t("button",{onClick:Le,type:"button",children:"确认"})]})}),Pe()]})})}();if(!Te)return null;if(!1===D)return Te;var Oe="function"==typeof D?D():D;return Oe?c(Te,Oe):Te};export{u as default};
1
+ import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as i,useRef as c,useEffect as a,useCallback as o}from"react";import{createPortal as l}from"react-dom";import d from"classnames";import s from"../Icon/Icon.js";import h from"../Button/Button.js";var u=function(u){var m=u.open,p=u.title,y=u.width,w=void 0===y?460:y,f=u.height,v=void 0===f?300:f,g=u.placement,z=void 0===g?"right":g,j=u.maskClosable,b=void 0===j||j,x=u.mask,N=void 0===x||x,C=u.onClose,k=u.children,W=u.className,H=u.style,M=u.maskStyle,I=u.maskClassName,E=u.contentClassName,L=u.contentStyle,S=u.header,_=u.headerClassName,X=u.headerStyle,Y=u.footer,B=u.footerClassName,q=u.footerStyle,A=u.getContainer,D=void 0!==A&&A,F=u.destroyOnClose,P=void 0!==F&&F,T=u.closable,O=void 0===T||T,G=u.zIndex,J=void 0===G?1e3:G,K=u.loading,Q=void 0!==K&&K,R=u.loadingIcon,U=u.resizable,V=void 0!==U&&U,Z=u.resizeHandleSize,$=void 0===Z?8:Z,ee=u.minWidth,te=void 0===ee?460:ee,re=u.minHeight,ne=void 0===re?150:re,ie=u.onChange,ce=i(!1),ae=ce[0],oe=ce[1],le=i(!1),de=le[0],se=le[1],he=i(!1),ue=he[0],me=he[1],pe=window.innerWidth,ye=window.innerHeight,we=i("number"==typeof w?w:460),fe=we[0],ve=we[1],ge=i("number"==typeof v?v:300),ze=ge[0],je=ge[1],be=i(!1),xe=be[0],Ne=be[1],Ce=c(null),ke=c({x:0,y:0}),We=c({width:0,height:0}),He=c({width:fe,height:ze}),Me=c({placement:z,minWidth:te,maxWidth:pe,minHeight:ne,maxHeight:ye,onChange:ie});a(function(){He.current={width:fe,height:ze}},[fe,ze]),a(function(){Me.current={placement:z,minWidth:te,maxWidth:pe,minHeight:ne,maxHeight:ye,onChange:ie}},[z,te,pe,ne,ye,ie]),a(function(){"number"==typeof w&&ve(w)},[w]),a(function(){"number"==typeof v&&je(v)},[v]),a(function(){if(!m){se(!1),me(!0);var e=setTimeout(function(){oe(!1),me(!1)},300);return function(){return clearTimeout(e)}}return me(!1),oe(!0),document.body.style.overflow="hidden",requestAnimationFrame(function(){requestAnimationFrame(function(){se(!0)})}),function(){document.body.style.overflow=""}},[m,300]);var Ie=function(){b&&C()},Ee=function(){C()},Le=function(e){return"number"==typeof e?"".concat(e,"px"):e},Se=function(){var t=e(e({},H),{zIndex:J}),r=V?{width:fe,height:ze}:{width:w,height:v};switch(z){case"left":case"right":t.width=Le(r.width),t.height="100%";break;case"top":case"bottom":t.height=Le(r.height),t.width="100%"}return xe&&(t.transition="none"),t},_e=V&&ae,Xe=function(){switch(z){case"left":return"zjpcy-drawer-resize-handle--right";case"right":return"zjpcy-drawer-resize-handle--left";case"top":return"zjpcy-drawer-resize-handle--bottom";case"bottom":return"zjpcy-drawer-resize-handle--top";default:return""}},Ye=function(){switch(z){case"left":case"right":return"col-resize";case"top":case"bottom":return"row-resize";default:return"default"}},Be=o(function(e){e.preventDefault(),e.stopPropagation();var t=He.current.width,r=He.current.height;if(Ce.current){var n=Me.current;"left"===n.placement||"right"===n.placement?Ce.current.style.width="".concat(t,"px"):Ce.current.style.height="".concat(r,"px")}Ne(!0),ke.current={x:e.clientX,y:e.clientY},We.current={width:t,height:r}},[]),qe=o(function(e){var t,r=Me.current,n=e.clientX-ke.current.x,i=e.clientY-ke.current.y,c=We.current.width,a=We.current.height;if("left"===r.placement){var o=We.current.width+n;(c=Math.max(r.minWidth,Math.min(r.maxWidth,o)))!==o&&(ke.current.x=e.clientX,We.current.width=c)}else if("right"===r.placement){o=We.current.width-n;(c=Math.max(r.minWidth,Math.min(r.maxWidth,o)))!==o&&(ke.current.x=e.clientX,We.current.width=c)}else if("top"===r.placement){var l=We.current.height+i;(a=Math.max(r.minHeight,Math.min(r.maxHeight,l)))!==l&&(ke.current.y=e.clientY,We.current.height=a)}else if("bottom"===r.placement){l=We.current.height-i;(a=Math.max(r.minHeight,Math.min(r.maxHeight,l)))!==l&&(ke.current.y=e.clientY,We.current.height=a)}He.current={width:c,height:a},ve(c),je(a),null===(t=r.onChange)||void 0===t||t.call(r,{width:c,height:a})},[]),Ae=o(function(){Ne(!1)},[]);a(function(){return xe?(document.addEventListener("mousemove",qe),document.addEventListener("mouseup",Ae)):(document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ae)),function(){document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ae)}},[xe,qe,Ae]);var De=function(){return Q?t("div",R?{className:"zjpcy-drawer-loading",children:t("div",{className:"zjpcy-drawer-loading-content",children:R})}:{className:"zjpcy-drawer-loading",children:t("div",{className:"zjpcy-drawer-loading-content",children:t("div",{className:"zjpcy-drawer-loading-spinner",children:r("svg",{viewBox:"0 0 24 24",className:"zjpcy-drawer-loading-icon",children:[t("circle",{className:"zjpcy-drawer-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),t("circle",{className:"zjpcy-drawer-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null},Fe=function(){return!1===S?null:S?t("div",{className:d("zjpcy-drawer-header",_),style:X,children:S}):p||O?r("div",{className:d("zjpcy-drawer-header",_),style:X,children:[t("div",{className:"zjpcy-drawer-header__title",children:p}),O&&t("button",{className:"zjpcy-drawer-header__close",onClick:Ee,type:"button","aria-label":"Close",children:t(s,{type:"close",size:20})})]}):null},Pe=function(){var e;return _e?t("div",{className:d("zjpcy-drawer-resize-handle",Xe()),style:(e={cursor:Ye()},e["left"===z||"right"===z?"width":"height"]=$,e),onMouseDown:Be}):null},Te=function(){if(!ae&&!ue)return null;var i=t("div",{className:d("zjpcy-drawer-overlay",{"zjpcy-drawer-overlay--visible":de&&!ue,"zjpcy-drawer-overlay--closing":ue,"zjpcy-drawer-overlay--resizing":xe},I),style:e({zIndex:J},M),onClick:Ie,children:r("div",{ref:Ce,className:d("zjpcy-drawer","zjpcy-drawer--".concat(z),{"zjpcy-drawer--visible":de&&!ue,"zjpcy-drawer--closing":ue,"zjpcy-drawer--no-mask":!N,"zjpcy-drawer--resizing":xe},W),style:Se(),onClick:function(e){return e.stopPropagation()},children:[De(),Fe(),t("div",{className:d("zjpcy-drawer-content",E),style:L,children:P&&ue?null:k}),!1!==Y&&t("div",{className:d("zjpcy-drawer-footer",B),style:q,children:Y||r(n,{children:[t(h,{onClick:Ee,type:"button",children:"取消"}),t(h,{variant:"primary",onClick:Ee,type:"button",children:"确认"})]})}),Pe()]})});return N?i:t("div",{className:d("zjpcy-drawer-wrapper",{"zjpcy-drawer-wrapper--visible":de&&!ue,"zjpcy-drawer-wrapper--closing":ue,"zjpcy-drawer-wrapper--no-mask":!N}),style:{zIndex:J},children:r("div",{ref:Ce,className:d("zjpcy-drawer","zjpcy-drawer--".concat(z),{"zjpcy-drawer--visible":de&&!ue,"zjpcy-drawer--closing":ue,"zjpcy-drawer--no-mask":!N,"zjpcy-drawer--resizing":xe},W),style:Se(),children:[De(),Fe(),t("div",{className:d("zjpcy-drawer-content",E),style:L,children:P&&ue?null:k}),!1!==Y&&t("div",{className:d("zjpcy-drawer-footer",B),style:q,children:Y||r(n,{children:[t("button",{onClick:Ee,type:"button",children:"取消"}),t("button",{onClick:Ee,type:"button",children:"确认"})]})}),Pe()]})})}();if(!Te)return null;if(!1===D)return Te;var Oe="function"==typeof D?D():D;return Oe?l(Te,Oe):Te};export{u as default};
@@ -1 +1 @@
1
- import{jsx as n,jsxs as e}from"react/jsx-runtime";import{useState as o,useRef as r,useEffect as t}from"react";import i from"react-dom";import d from"classnames";import l from"../Icon/Icon.js";import c from"../Button/Button.js";var a=function(a){var u=a.items,s=a.type,m=void 0===s?"text":s,p=a.children,w=a.trigger,f=void 0===w?"click":w,v=a.placement,h=void 0===v?"bottom":v,b=a.disabled,g=void 0!==b&&b,y=a.open,N=a.ellipsis,k=void 0===N||N,C=a.className,x=a.style,T=a.contentStyles,j=a.getContainer,E=a.onVisibleChange,L=a.onChange,B=void 0!==y,D=o(!1),I=D[0],M=D[1],z=o(!1),P=z[0],S=z[1],V=B?y:I,q=r(null),A=r(null),F=r(null);t(function(){return function(){F.current&&clearTimeout(F.current)}},[]),t(function(){var n=function(n){q.current&&!q.current.contains(n.target)&&G()};return V&&document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[V,E,B]);var G=function(){S(!0),F.current&&clearTimeout(F.current),F.current=setTimeout(function(){S(!1),B||M(!1),null==E||E(!1)},200)},H=function(){F.current&&(clearTimeout(F.current),F.current=null),S(!1),B||M(!0),null==E||E(!0)},J=function(){g||"click"===f&&(V||P?G():H())},K=function(){g||"hover"!==f||H()},O=function(){g||"hover"!==f||G()};return n("div",{ref:q,className:d("dropdown",C,{"dropdown--disabled":g}),style:x,children:e("div",{className:"dropdown-content-wrapper",children:["button"===m?n(c,{variant:"secondary",size:"medium",disabled:g,onClick:J,icon:"caret-down",children:p||"Dropdown"}):e("div",{ref:A,className:d("dropdown-trigger",{"dropdown-trigger--text":"text"===m,"dropdown-trigger--disabled":g}),onClick:J,onMouseEnter:K,onMouseLeave:O,children:[p||"Dropdown",n(l,{type:"caret-down",className:"dropdown-arrow"})]}),function(){if(!u||0===u.length||!V&&!P)return null;var o=n("div",{className:d("dropdown-menu dropdown-menu--".concat(h," dropdown-menu--p-").concat(h),{"dropdown-menu--visible":V&&!P,"dropdown-menu--closing":P}),children:n("ul",{className:"dropdown-list",style:T,children:u.map(function(o){return e("li",{className:d("dropdown-item",{"dropdown-item--disabled":o.disabled}),onClick:function(){return function(n){var e;n.disabled||(null===(e=n.onClick)||void 0===e||e.call(n),null==L||L(n),G())}(o)},children:[o.icon&&n("span",{className:"dropdown-item-icon",children:"string"==typeof o.icon?n(l,{type:o.icon}):o.icon}),n("span",{className:d("dropdown-item-label",{"dropdown-item-label--with-width":(null==T?void 0:T.width)&&!k,"dropdown-item-label--ellipsis":(null==T?void 0:T.width)&&k}),children:o.label})]},o.key)})})});if(j){var r=j();if(r)return i.createPortal(o,r)}return o}()]})})},u=a;export{a as Dropdown,u as default};
1
+ import{jsx as n,jsxs as e}from"react/jsx-runtime";import{useState as o,useRef as r,useEffect as t}from"react";import i from"react-dom";import d from"classnames";import l from"../Icon/Icon.js";import c from"../Button/Button.js";var a=function(a){var u=a.items,s=a.type,m=void 0===s?"text":s,p=a.children,w=a.trigger,f=void 0===w?"click":w,v=a.placement,h=void 0===v?"bottom":v,b=a.disabled,g=void 0!==b&&b,N=a.open,y=a.ellipsis,k=void 0===y||y,C=a.className,x=a.style,T=a.contentStyles,j=a.getContainer,E=a.onVisibleChange,L=a.onChange,B=void 0!==N,D=o(!1),I=D[0],M=D[1],z=o(!1),P=z[0],S=z[1],V=B?N:I,q=r(null),A=r(null),F=r(null);t(function(){return function(){F.current&&clearTimeout(F.current)}},[]),t(function(){var n=function(n){q.current&&!q.current.contains(n.target)&&G()};return V&&document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[V,E,B]);var G=function(){S(!0),F.current&&clearTimeout(F.current),F.current=setTimeout(function(){S(!1),B||M(!1),null==E||E(!1)},200)},H=function(){F.current&&(clearTimeout(F.current),F.current=null),S(!1),B||M(!0),null==E||E(!0)},J=function(){g||"click"===f&&(V||P?G():H())},K=function(){g||"hover"!==f||H()},O=function(){g||"hover"!==f||G()};return n("div",{ref:q,className:d("dropdown",C,{"dropdown--disabled":g}),style:x,children:e("div",{className:"dropdown-content-wrapper",children:["button"===m?n(c,{variant:"secondary",size:"medium",disabled:g,onClick:J,icon:"caret-down",children:p||"Dropdown"}):e("div",{ref:A,className:d("dropdown-trigger",{"dropdown-trigger--text":"text"===m,"dropdown-trigger--disabled":g}),onClick:J,onMouseEnter:K,onMouseLeave:O,children:[p||"Dropdown",n(l,{type:"caret-down",className:"dropdown-arrow"})]}),function(){if(!u||0===u.length||!V&&!P)return null;var o=n("div",{className:d("dropdown-menu-wrapper",{"dropdown-menu-visible":V&&!P,"dropdown-menu-closing":P}),children:n("div",{className:d("dropdown-menu dropdown-menu--".concat(h," dropdown-menu--p-").concat(h)),children:n("ul",{className:"dropdown-list",style:T,children:u.map(function(o){return e("li",{className:d("dropdown-item",{"dropdown-item--disabled":o.disabled}),onClick:function(){return function(n){var e;n.disabled||(null===(e=n.onClick)||void 0===e||e.call(n),null==L||L(n),G())}(o)},children:[o.icon&&n("span",{className:"dropdown-item-icon",children:"string"==typeof o.icon?n(l,{type:o.icon}):o.icon}),n("span",{className:d("dropdown-item-label",{"dropdown-item-label--with-width":(null==T?void 0:T.width)&&!k,"dropdown-item-label--ellipsis":(null==T?void 0:T.width)&&k}),children:o.label})]},o.key)})})})});if(j){var r=j();if(r)return i.createPortal(o,r)}return o}()]})})},u=a;export{a as Dropdown,u as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import c from"../Icon/Icon.js";var a=function(a){var d=a.icon,t=a.image,s=a.description,m=void 0===s?"暂无数据":s,r=a.children,l=a.size,p=void 0===l?"middle":l,n=a.style,o=a.className;return e("div",{className:"idp-empty idp-empty--".concat(p," ").concat(o||""),style:n,children:[e("div",{className:"idp-empty__icon-wrapper",children:[d&&i("div",{className:"idp-empty__icon",children:d}),t&&i("img",{src:t,alt:"empty",className:"idp-empty__image"}),!d&&!t&&i(c,{type:"file-text",size:"large"===p?64:"small"===p?32:48,color:"#d9d9d9"})]}),i("div",{className:"idp-empty__description",children:m}),r&&i("div",{className:"idp-empty__actions",children:r})]})};export{a as default};
1
+ import{jsxs as e,jsx as c}from"react/jsx-runtime";import i from"../Icon/Icon.js";var a=function(a){var t=a.icon,s=a.image,m=a.description,r=void 0===m?"暂无数据":m,l=a.children,p=a.size,d=void 0===p?"middle":p,n=a.style,o=a.className;return e("div",{className:"zjpcy-empty zjpcy-empty--".concat(d," ").concat(o||""),style:n,children:[e("div",{className:"zjpcy-empty__icon-wrapper",children:[t&&c("div",{className:"zjpcy-empty__icon",children:t}),s&&c("img",{src:s,alt:"empty",className:"zjpcy-empty__image"}),!t&&!s&&c(i,{type:"file-text",size:"large"===d?64:"small"===d?32:48,color:"#d9d9d9"})]}),c("div",{className:"zjpcy-empty__description",children:r}),l&&c("div",{className:"zjpcy-empty__actions",children:l})]})};export{a 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 d,GridWrapper as o}from"./styles.js";var p=e({}),n=e({}),t=a.forwardRef(function(a,e){var d=a.children,o=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,w=void 0!==m?m:v;return r(s,{ref:e,className:l("idp-grid-col",o),style:p,span:t,offset:c,push:f,pull:g,order:u,gap:w,children:d})});t.displayName="Grid.Col";var c=a.forwardRef(function(a,e){var s=a.children,o=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,w=i(p),y=null==w?void 0:w.gap,N=void 0!==f?f:y;return r(n.Provider,{value:{gap:N},children:r(d,{ref:e,className:l("idp-grid-row",o),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,d=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(o,{ref:e,className:l("idp-grid",s),style:d,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
+ 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 +1 @@
1
- import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import{useMemo as e}from"react";import{presetIcons as t,searchIcon as n,loadingIcon as i,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}from"./path.js";var p={search:n,loading:i,user:a,close:l,check:c,plus:u,minus:s,arrowLeft:f,arrowRight:d,arrowUp:m,arrowDown:v},h=function(r){return p[r]?p[r]:t[r]},g={small:12,medium:16,large:24},w=function(t){var n=t.type,i=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,p=t.rotate,w=t.align,y=void 0===w?"center":w,x=t.className,b=void 0===x?"":x,j=t.style,k=t.onClick,B=e(function(){return"number"==typeof u?u:g[u]||16},[u]),C=e(function(){if(i)return i;if(n){var r=h(n);return(null==r?void 0:r.path)||""}return""},[n,i]),N=e(function(){if("0 0 24 24"!==l)return l;if(n){var r=h(n);return(null==r?void 0:r.viewBox)||"0 0 24 24"}return"0 0 24 24"},[n,l]);if(!C)return null;var L=r({width:B,height:B,fill:f,transform:p?"rotate(".concat(p,"deg)"):void 0},j);return o("div",{className:"icon-container align-".concat(y," ").concat(b),children:o("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:o("path",{d:C})})})};export{w as default};
1
+ import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import{useMemo as e}from"react";import{presetIcons as n,searchIcon as t,loadingIcon as i,userIcon as a,closeIcon as c,checkIcon as l,plusIcon as u,minusIcon as s,arrowLeftIcon as f,arrowRightIcon as d,arrowUpIcon as m,arrowDownIcon as v}from"./path.js";var p={search:t,loading:i,user:a,close:c,check:l,plus:u,minus:s,arrowLeft:f,arrowRight:d,arrowUp:m,arrowDown:v},h=function(r){return p[r]?p[r]:n[r]},g={small:12,medium:16,large:24},w=function(n){var t=n.type,i=n.path,a=n.viewBox,c=void 0===a?"0 0 24 24":a,l=n.size,u=void 0===l?"medium":l,s=n.color,f=void 0===s?"#339af0":s,d=n.hoverColor,m=n.spin,v=void 0!==m&&m,p=n.rotate,w=n.align,y=void 0===w?"center":w,x=n.className,b=void 0===x?"":x,j=n.style,k=n.onClick,B=e(function(){return"number"==typeof u?u:g[u]||16},[u]),C=e(function(){if(i)return i;if(t){var r=h(t);return(null==r?void 0:r.path)||""}return""},[t,i]),N=e(function(){if("0 0 24 24"!==c)return c;if(t){var r=h(t);return(null==r?void 0:r.viewBox)||"0 0 24 24"}return"0 0 24 24"},[t,c]);if(!C)return null;var L=r({width:B,height:B,fill:f,transform:p?"rotate(".concat(p,"deg)"):void 0},j);return o("div",{className:"icon-container icon-align-".concat(y," ").concat(b),children:o("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:o("path",{d:C})})})};export{w as default};
@@ -1 +1 @@
1
- import{__rest as e,__assign as l}from"../node_modules/tslib/tslib.es6.js";import{jsxs as a,jsx as n}from"react/jsx-runtime";import t from"react";import i from"../Icon/Icon.js";var o=function(o){var r=o.type,s=void 0===r?"text":r,u=o.placeholder,c=void 0===u?"":u,d=o.width,p=o.className,m=void 0===p?"":p,f=o.style,v=o.value,y=o.defaultValue,h=o.onChange,b=o.onBlur,x=o.onFocus,N=o.disabled,g=void 0!==N&&N,w=o.readOnly,C=void 0!==w&&w,S=o.onKeyDown,j=o.prefix,B=o.suffix,D=o.clear,F=void 0!==D&&D,I=o.extra,K=o.label,O=o.labelGap,z=void 0===O?8:O,G=o.labelClassName,V=void 0===G?"":G,k=o.labelStyle,R=o.autoComplete,_=e(o,["type","placeholder","width","className","style","value","defaultValue","onChange","onBlur","onFocus","disabled","readOnly","onKeyDown","prefix","suffix","clear","extra","label","labelGap","labelClassName","labelStyle","error","autoComplete"]),q=t.useState(y||""),A=q[0],E=q[1],H=t.useState(!1),J=H[0],L=H[1],M=function(e){return e?"string"==typeof e?n(i,{type:e,size:"medium",color:"#909399"}):e:null},P=void 0!==v?v:A,Q=F&&!g&&!C&&J&&null!=P&&P.toString().length>0;return a("div",{className:"input-base-container",children:[a("div",{className:"input-label-wrapper",style:{display:"flex",alignItems:"center"},children:[K&&n("div",{className:"input-label ".concat(V),style:l({marginRight:"number"==typeof z?"".concat(z,"px"):z},k),children:K}),a("div",{className:"input-wrapper ".concat(m," ").concat(g?"input-disabled":""," ").concat(C?"input-readonly":""),style:l({width:d},f),children:[j&&n("div",{className:"input-prefix",children:M(j)}),n("input",l({type:s,placeholder:c,className:"input-inner",value:null!=v?String(v):P,onChange:function(e){void 0===v&&E(e.target.value),null==h||h(e)},onBlur:function(e){L(!1),null==b||b(e)},onFocus:function(e){L(!0),null==x||x(e)},disabled:g,readOnly:C,onKeyDown:S,autoComplete:null!=R?R:"password"===s?"current-password":void 0},_)),a("div",{className:"input-suffix-group",children:[n("div",{className:"input-suffix-clear ".concat(Q?"visible":""),onClick:function(){g||C||(void 0!==v||E(""),h&&h({target:{value:""}}))},children:n(i,{type:"close",size:"medium",color:"#1890ff"})}),B&&n("div",{className:"input-suffix-content",children:M(B)})]})]})]}),I&&n("div",{className:"input-extra",children:I})]})};export{o as default};
1
+ import{__rest as e,__assign as l}from"../node_modules/tslib/tslib.es6.js";import{jsxs as a,jsx as n}from"react/jsx-runtime";import t from"react";import i from"../Icon/Icon.js";var o=function(o){var r=o.type,s=void 0===r?"text":r,u=o.placeholder,c=void 0===u?"":u,d=o.width,p=o.className,m=void 0===p?"":p,f=o.style,v=o.value,y=o.defaultValue,h=o.onChange,b=o.onBlur,x=o.onFocus,N=o.disabled,g=void 0!==N&&N,w=o.readOnly,C=void 0!==w&&w,S=o.onKeyDown,j=o.prefix,B=o.suffix,D=o.clear,F=void 0!==D&&D,I=o.extra,K=o.label,O=o.labelGap,z=void 0===O?8:O,G=o.labelClassName,V=void 0===G?"":G,k=o.labelStyle,R=o.autoComplete,_=e(o,["type","placeholder","width","className","style","value","defaultValue","onChange","onBlur","onFocus","disabled","readOnly","onKeyDown","prefix","suffix","clear","extra","label","labelGap","labelClassName","labelStyle","error","autoComplete"]),q=t.useState(y||""),A=q[0],E=q[1],H=t.useState(!1),J=H[0],L=H[1],M=function(e){return e?"string"==typeof e?n(i,{type:e,size:"medium",color:"#909399"}):e:null},P=void 0!==v?v:A,Q=F&&!g&&!C&&J&&null!=P&&P.toString().length>0;return a("div",{className:"input-base-container",children:[a("div",{className:"input-label-wrapper",style:{display:"flex",alignItems:"center"},children:[K&&n("div",{className:"input-label ".concat(V),style:l({marginRight:"number"==typeof z?"".concat(z,"px"):z},k),children:K}),a("div",{className:"input-wrapper ".concat(m," ").concat(g?"input-wrapper-disabled":""," ").concat(C?"input-wrapper-readonly":""),style:l({width:d},f),children:[j&&n("div",{className:"input-prefix",children:M(j)}),n("input",l({type:s,placeholder:c,className:"input-inner",value:null!=v?String(v):P,onChange:function(e){void 0===v&&E(e.target.value),null==h||h(e)},onBlur:function(e){L(!1),null==b||b(e)},onFocus:function(e){L(!0),null==x||x(e)},disabled:g,readOnly:C,onKeyDown:S,autoComplete:null!=R?R:"password"===s?"current-password":void 0},_)),a("div",{className:"input-suffix-group",children:[n("div",{className:"input-suffix-clear ".concat(Q?"visible":""),onClick:function(){g||C||(void 0!==v||E(""),h&&h({target:{value:""}}))},children:n(i,{type:"close",size:"medium",color:"#1890ff"})}),B&&n("div",{className:"input-suffix-content",children:M(B)})]})]})]}),I&&n("div",{className:"input-extra",children:I})]})};export{o as default};
@@ -1 +1 @@
1
- import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";import i from"react";import r from"../Icon/Icon.js";var a=function(a){var o=a.placeholder,l=void 0===o?"":o,s=a.width,c=a.height,u=a.className,d=void 0===u?"":u,m=a.style,p=a.value,f=a.defaultValue,h=a.onChange,v=a.onBlur,x=a.onFocus,g=a.onKeyDown,y=a.disabled,b=void 0!==y&&y,w=a.readOnly,z=void 0!==w&&w,N=a.rows,S=void 0===N?4:N,I=a.cols,C=a.maxLength,E=a.showCount,L=void 0!==E&&E,R=a.clear,j=void 0!==R&&R,D=a.extra,M=a.label,B=a.labelGap,H=void 0===B?8:B,W=a.labelClassName,X=void 0===W?"":W,Y=a.labelStyle,F=a.resizable,K=void 0!==F&&F,O=a.resizeHandleSize,V=void 0===O?10:O,$=a.minWidth,k=void 0===$?200:$,G=a.maxWidth,P=void 0===G?2e3:G,T=a.minHeight,_=void 0===T?80:T,q=a.maxHeight,A=void 0===q?800:q,J=a.onResize,Q=i.useState(f||""),U=Q[0],Z=Q[1],ee=i.useState(!1),te=ee[0],ne=ee[1],ie=i.useState(!1),re=ie[0],ae=ie[1],oe=i.useRef(null),le=i.useRef(null),se=i.useRef(null),ce=function(e){if(void 0===e)return 0;if("number"==typeof e)return e;var t=String(e).match(/^(\d+)px$/);return t?parseInt(t[1],10):0},ue=function(e){if(void 0===e)return 0;if("number"==typeof e)return e;var t=String(e).match(/^(\d+)px$/);return t?parseInt(t[1],10):0},de=i.useState(ce(s)||0),me=de[0],pe=de[1],fe=i.useState(ue(c)||24*S||80),he=fe[0],ve=fe[1];i.useEffect(function(){if(le.current){var e=ce(s)||le.current.offsetWidth||0,t=ue(c)||24*S||80;pe(e),ve(t)}},[]);var xe=void 0!==p,ge=xe?p:U,ye=(null==ge?void 0:ge.length)||0;i.useEffect(function(){var e=function(e){if(re&&se.current){var t=e.clientX-se.current.mouseX,n=e.clientY-se.current.mouseY,i=se.current.width+t,r=se.current.height+n;i=Math.max(k,Math.min(P,i)),r=Math.max(_,Math.min(A,r)),pe(i),ve(r),null==J||J({width:i,height:r})}},t=function(){se.current=null,ae(!1)};return re&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[re,k,P,_,A,J]);var be={display:"inline-flex",flexDirection:"column",width:s?"number"==typeof s?"".concat(s,"px"):s:"100%"},we={position:"relative",display:"flex",alignItems:"flex-start",flex:1,width:K?"number"==typeof me?"".concat(me,"px"):me:void 0},ze=e({width:"100%",height:c?"number"==typeof c?"".concat(c,"px"):c:void 0,resize:"none"},m),Ne=j&&ge&&!b&&!z,Se=K?e(e({},ze),{width:"100%",height:K?"number"==typeof he?"".concat(he,"px"):he:void 0}):ze;return t("div",{className:"textarea-wrapper ".concat(d),style:be,ref:le,children:[(M||L||Ne)&&t("div",{className:"textarea-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[M?n("label",{className:"input-label ".concat(X),style:e({marginRight:"number"==typeof H?"".concat(H,"px"):H},Y),children:M}):null,t("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Ne&&n("span",{className:"textarea-clear",onClick:function(){if(!b&&!z){xe||Z(""),null==h||h({target:{value:""}})}},style:{cursor:"pointer"},children:n(r,{type:"close-circle",size:"small",color:"#909399"})}),L&&C&&t("span",{className:"textarea-count",style:{fontSize:"12px",color:"#909399"},children:[ye,"/",C]})]})]}),t("div",{className:"input-wrapper textarea-input-wrapper ".concat(te?"focused":""," ").concat(b?"disabled":""," ").concat(re?"resizing":""),style:we,children:[n("textarea",{ref:oe,className:"input-base textarea-base",placeholder:l,value:ge,defaultValue:xe?void 0:f,onChange:function(e){var t=e.target.value;xe||Z(t),null==h||h(e)},onBlur:function(e){ne(!1),null==v||v(e)},onFocus:function(e){ne(!0),null==x||x(e)},onKeyDown:g,disabled:b,readOnly:z,rows:S,cols:I,maxLength:C,style:Se}),K&&n("div",{className:"textarea-resize-handle",onMouseDown:function(e){K&&!b&&!z&&le.current&&(e.preventDefault(),e.stopPropagation(),se.current={mouseX:e.clientX,mouseY:e.clientY,width:le.current.offsetWidth,height:le.current.offsetHeight},ae(!0))},style:{position:"absolute",bottom:"0",right:"0",width:"".concat(V,"px"),height:"".concat(V,"px"),cursor:"nwse-resize",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n("div",{style:{width:"8px",height:"8px",borderRight:"2px solid #909399",borderBottom:"2px solid #909399"}})})]}),D&&n("div",{className:"input-extra",style:{marginTop:"4px"},children:D})]})};export{a as default};
1
+ import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";import i from"react";import r from"../Icon/Icon.js";var a=function(a){var o=a.placeholder,l=void 0===o?"":o,s=a.width,c=a.height,u=a.className,d=void 0===u?"":u,p=a.style,m=a.value,f=a.defaultValue,h=a.onChange,v=a.onBlur,x=a.onFocus,g=a.onKeyDown,y=a.disabled,b=void 0!==y&&y,w=a.readOnly,z=void 0!==w&&w,N=a.rows,S=void 0===N?4:N,I=a.cols,C=a.maxLength,E=a.showCount,L=void 0!==E&&E,R=a.clear,j=void 0!==R&&R,D=a.extra,M=a.label,B=a.labelGap,H=void 0===B?8:B,W=a.labelClassName,X=void 0===W?"":W,Y=a.labelStyle,F=a.resizable,K=void 0!==F&&F,O=a.resizeHandleSize,V=void 0===O?10:O,$=a.minWidth,k=void 0===$?200:$,G=a.maxWidth,P=void 0===G?2e3:G,T=a.minHeight,_=void 0===T?80:T,q=a.maxHeight,A=void 0===q?800:q,J=a.onResize,Q=i.useState(f||""),U=Q[0],Z=Q[1],ee=i.useState(!1),te=ee[0],ne=ee[1],ie=i.useState(!1),re=ie[0],ae=ie[1],oe=i.useRef(null),le=i.useRef(null),se=i.useRef(null),ce=function(e){if(void 0===e)return 0;if("number"==typeof e)return e;var t=String(e).match(/^(\d+)px$/);return t?parseInt(t[1],10):0},ue=function(e){if(void 0===e)return 0;if("number"==typeof e)return e;var t=String(e).match(/^(\d+)px$/);return t?parseInt(t[1],10):0},de=i.useState(ce(s)||0),pe=de[0],me=de[1],fe=i.useState(ue(c)||24*S||80),he=fe[0],ve=fe[1];i.useEffect(function(){if(le.current){var e=ce(s)||le.current.offsetWidth||0,t=ue(c)||24*S||80;me(e),ve(t)}},[]);var xe=void 0!==m,ge=xe?m:U,ye=(null==ge?void 0:ge.length)||0;i.useEffect(function(){var e=function(e){if(re&&se.current){var t=e.clientX-se.current.mouseX,n=e.clientY-se.current.mouseY,i=se.current.width+t,r=se.current.height+n;i=Math.max(k,Math.min(P,i)),r=Math.max(_,Math.min(A,r)),me(i),ve(r),null==J||J({width:i,height:r})}},t=function(){se.current=null,ae(!1)};return re&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[re,k,P,_,A,J]);var be={display:"inline-flex",flexDirection:"column",width:s?"number"==typeof s?"".concat(s,"px"):s:"100%"},we={position:"relative",display:"flex",alignItems:"flex-start",flex:1,width:K?"number"==typeof pe?"".concat(pe,"px"):pe:void 0},ze=e({width:"100%",height:c?"number"==typeof c?"".concat(c,"px"):c:void 0,resize:"none"},p),Ne=j&&ge&&!b&&!z,Se=K?e(e({},ze),{width:"100%",height:K?"number"==typeof he?"".concat(he,"px"):he:void 0}):ze;return t("div",{className:"textarea-wrapper ".concat(d),style:be,ref:le,children:[(M||L||Ne)&&t("div",{className:"textarea-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[M?n("label",{className:"input-label ".concat(X),style:e({marginRight:"number"==typeof H?"".concat(H,"px"):H},Y),children:M}):null,t("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Ne&&n("span",{className:"textarea-clear",onClick:function(){if(!b&&!z){xe||Z(""),null==h||h({target:{value:""}})}},style:{cursor:"pointer"},children:n(r,{type:"close-circle",size:"small",color:"#909399"})}),L&&C&&t("span",{className:"textarea-count",style:{fontSize:"12px",color:"#909399"},children:[ye,"/",C]})]})]}),t("div",{className:"input-wrapper textarea-input-wrapper ".concat(te?"textarea-input-wrapper-focused":""," ").concat(b?"textarea-input-wrapper-disabled":""," ").concat(re?"textarea-input-wrapper-resizing":""),style:we,children:[n("textarea",{ref:oe,className:"input-base textarea-base",placeholder:l,value:ge,defaultValue:xe?void 0:f,onChange:function(e){var t=e.target.value;xe||Z(t),null==h||h(e)},onBlur:function(e){ne(!1),null==v||v(e)},onFocus:function(e){ne(!0),null==x||x(e)},onKeyDown:g,disabled:b,readOnly:z,rows:S,cols:I,maxLength:C,style:Se}),K&&n("div",{className:"textarea-resize-handle",onMouseDown:function(e){K&&!b&&!z&&le.current&&(e.preventDefault(),e.stopPropagation(),se.current={mouseX:e.clientX,mouseY:e.clientY,width:le.current.offsetWidth,height:le.current.offsetHeight},ae(!0))},style:{position:"absolute",bottom:"0",right:"0",width:"".concat(V,"px"),height:"".concat(V,"px"),cursor:"nwse-resize",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n("div",{style:{width:"8px",height:"8px",borderRight:"2px solid #909399",borderBottom:"2px solid #909399"}})})]}),D&&n("div",{className:"input-extra",style:{marginTop:"4px"},children:D})]})};export{a 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(c||(c=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("--idp-text-color","rgba(0, 0, 0, 0.85)")," 100%)"):"linear-gradient(180deg, ".concat(r("--layout-bg-light","#f5f5f5")," 0%, ").concat(r("--idp-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("--idp-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 .idp-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .idp-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 .idp-menu-submenu {\n .idp-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .idp-menu-submenu.horizontal-popup,\n .idp-menu-submenu.horizontal-popup .idp-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .idp-menu-submenu .idp-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 .idp-menu {\n background: transparent;\n }\n\n /* Menu 菜单项在 Sider 中的样式 - 覆盖默认样式 */\n .idp-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 .idp-menu-submenu {\n .idp-menu-item {\n margin: 0px;\n }\n }\n\n /* Dark 主题下的子菜单样式 */\n .idp-menu-submenu.horizontal-popup,\n .idp-menu-submenu.horizontal-popup .idp-menu-submenu {\n background: linear-gradient(135deg, #001529 0%, #002140 100%);\n border: 1px solid #303030;\n }\n\n /* Dark 主题下子菜单中的菜单项 */\n .idp-menu-submenu .idp-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("--idp-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("--idp-border-color-light","#f0f0f0"),")")},function(n){return"dark"===n.$theme?"2px 0 8px rgba(0, 0, 0, 0.3)":r("--idp-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("--idp-border-radius-sm","4px"),r("--idp-text-color","rgba(0, 0, 0, 0.85)"),r("--idp-primary-light-color","rgba(24, 144, 255, 0.06)"),r("--idp-primary-color","#1890ff"),r("--idp-primary-light-color","rgba(24, 144, 255, 0.12)"),r("--idp-primary-color","#1890ff"),r("--idp-primary-color","#1890ff"),r("--idp-primary-light-color","rgba(24, 144, 255, 0.18)"),r("--idp-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("--idp-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 "}),d=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("--idp-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("--idp-primary-color","#1890ff")," 100%)"):"linear-gradient(135deg, ".concat(r("--idp-primary-light-color","rgba(24, 100, 240, 0.1)")," 0%, ").concat(r("--idp-bg-color-light","#f5f5f5")," 100%)")},function(n){return"dark"===n.$theme?"#fff":r("--idp-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("--idp-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("--idp-border-color-light","#f0f0f0"),";\n ")},function(n){var o=n.$zeroWidthMode,r=n.$collapsed;return o&&r&&"\n display: none;\n "}),l=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("--idp-primary-color","#1890ff"),r("--idp-primary-hover-color","#40a9ff"),r("--idp-shadow-sm","0 2px 8px rgba(0, 0, 0, 0.15)"),r("--idp-transition-duration","0.2s"),r("--idp-transition-timing-function","ease-in-out"),r("--idp-primary-hover-color","#40a9ff"),r("--idp-shadow-md","0 4px 12px rgba(0, 0, 0, 0.25)"),r("--idp-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 c,u,s,g,f,b,p,h,x,m=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("--idp-border-color-extra-light","#d9d9d9"),r("--idp-border-radius-sm","4px"),r("--idp-transition-duration","0.2s"),r("--idp-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("--idp-primary-color","#1890ff")," 50%, transparent);\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: color-mix(in srgb, ").concat(r("--idp-primary-color","#1890ff")," 70%, transparent);\n }\n\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, ").concat(r("--idp-primary-color","#1890ff")," 50%, transparent) transparent;\n ")}),y=o.footer(x||(x=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("--idp-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("--idp-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{m as ContentWrapper,y as FooterWrapper,t as HeaderWrapper,e as LayoutWrapper,i as SiderContentWrapper,d as SiderTrigger,a as SiderWrapper,l 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 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 +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 i}from"react";var c=function(c){var u=c.items,a=c.columns,s=void 0===a?3:a,l=c.gutter,m=void 0===l?20:l,f=c.className,d=c.style,p=c.classNames,v=void 0===p?{}:p,y=c.styles,h=void 0===y?{}:y,x=c.onLayoutChange,w=e(null),g=r(3),N=g[0],b=g[1],j=r(20),A=j[0],E=j[1],L=function(n,t,e){if(null!==n&&"object"==typeof n&&!Array.isArray(n)){for(var r=n,o=0,i=Object.keys(r).map(Number).sort(function(n,t){return t-n});o<i.length;o++){var c=i[o];if(e>=c&&r.hasOwnProperty(c))return r[c]}return t}return n};o(function(){var n,t=function(){clearTimeout(n),n=window.setTimeout(function(){if(w.current){var n=w.current.offsetWidth,t=L(s,3,n),e=L(m,20,n);b(t),E(e),x&&x(t,u)}},100)};return t(),window.addEventListener("resize",t),function(){clearTimeout(n),window.removeEventListener("resize",t)}},[s,m,u,x]);var T=i(function(){var n=Array.from({length:N},function(){return[]});return u.filter(function(t){return!(void 0!==t.column&&t.column>=0&&t.column<N)||(n[t.column].push(t),!1)}).forEach(function(t,e){n[e%N].push(t)}),n},[u,N]),k=function(n,t){var e=v[n];return"function"==typeof e?e(t):e||""},z=function(n,t){var e=h[n];return"function"==typeof e?e(t):e||{}};return t("div",{ref:w,className:"idp-masonry ".concat(f||""," ").concat(k("container",0)),style:n(n({display:"flex",gap:"".concat(A,"px")},d),z("container",0)),children:T.map(function(e,r){return t("div",{className:"idp-masonry-column ".concat(k("column",r)),style:n({flex:1,display:"flex",flexDirection:"column",gap:"".concat(A,"px")},z("column",r)),children:e.map(function(e,r){return t("div",{className:"idp-masonry-item ".concat(k("item",r)),style:n({},z("item",r)),children:e.content},e.key)})},"column-".concat(r))})})};export{c as default};
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 +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 o,useRef as c,useState as a,useMemo as r,useEffect as d}from"react";import{useClickOutside as s}from"../Hooks/useClickOutside.js";var m=function(e){var n,i=e.trim();return i&&(null===(n=Array.from(i)[0])||void 0===n?void 0:n.toUpperCase())||""},u=l.memo(function(e){var l,c,r,s=e.item,p=e.level,h=e.mode,v=e.collapsed,f=e.theme,g=e.openKeySet,y=e.selectedKey,b=e.onItemClick,N=e.onToggleOpen,k=!!s.children&&s.children.length>0,C=g.has(s.key),K=y===s.key,w="horizontal"===h,z="inline"===h,x="vertical-flat"===h,O=0===p,S=o(function(e){e.stopPropagation(),s.disabled||(k&&!x&&N(s.key),x&&k||b(s,s.key))},[s,b,N,k,x]),T=w&&O?16:z?12+24*p:v?0:12+16*p,A=C&&(!v||w),I=function(e){var n=a(e),i=n[0],t=n[1],l=a(e),o=l[0],c=l[1];return d(function(){var n;return e?(c(!0),n=requestAnimationFrame(function(){t(!0)})):(t(!1),n=setTimeout(function(){c(!1)},150)),function(){"number"==typeof n?cancelAnimationFrame(n):clearTimeout(n)}},[e]),{isVisible:i,shouldRender:o}}(A&&w&&O),j=I.isVisible,F=I.shouldRender,H=k&&(!v||!O)&&!x,M=f||"light";return n("div",{className:"idp-menu-item-wrapper ".concat(O?"root":""),children:[i("div",{className:"\n idp-menu-item\n ".concat(K?"selected":"","\n ").concat(s.disabled?"disabled":"","\n ").concat(k?"has-children":"","\n ").concat(O?"root":"","\n ").concat(v&&O?"collapsed":"","\n ").concat(h,"\n ").concat(M,"\n "),style:{padding:"0px ".concat(T,"px")},title:v&&O?s.label:void 0,onClick:S,children:n("div",{className:"idp-menu-item-content",children:[v?i(t,{children:s.icon?i("span",{className:"idp-menu-item-icon collapsed",children:s.icon}):i("span",{className:"idp-menu-item-collapsed-label",children:m(s.label)})}):n(t,{children:[s.icon&&i("span",{className:"idp-menu-item-icon",children:s.icon}),n("div",{className:"idp-menu-item-text",children:[i("span",{className:"idp-menu-item-label",children:s.label}),s.description&&!k&&i("span",{className:"idp-menu-item-description",children:s.description})]})]}),H&&i("span",{className:"idp-menu-item-arrow ".concat(A?"open":""," ").concat(h),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&&(!w||!O||F)&&i("div",{className:"idp-menu-submenu-wrapper ".concat(h," ").concat(w&&O?"horizontal-popup-wrapper":""," ").concat(x?"vertical-flat":""),children:i("div",{className:"idp-menu-submenu ".concat((c=w&&O?"horizontal-popup":"",r=z&&A?"open inline":"",x?"open vertical-flat":w&&O?"".concat(w&&O?j?"open":"":A?"open":""," ").concat(c).trim():z?r:A?"open":"")," ").concat(h),children:i("div",{className:"idp-menu-submenu-content",children:null===(l=s.children)||void 0===l?void 0:l.map(function(e){return i(u,{item:e,level:p+1,mode:h,collapsed:v,theme:f,openKeySet:g,selectedKey:y,onItemClick:b,onToggleOpen:N},e.key)})})})})]})});u.displayName="MenuItemComponent";var p=function(n){var t=n.mode,l=void 0===t?"vertical":t,m=n.items,p=n.className,h=void 0===p?"":p,v=n.style,f=n.selectedKey,g=n.defaultOpenKeys,y=void 0===g?[]:g,b=n.openKeys,N=n.collapsed,k=void 0!==N&&N,C=n.open,K=n.theme,w=void 0===K?"light":K,z=n.onChange,x=n.onOpenChange,O=c(null),S=a(!0)[0],T=a(y),A=T[0],I=T[1],j=a(""),F=j[0],H=j[1],M=void 0!==b,R=void 0!==f,V=M?b:A,q=R?f:F,B=void 0!==C?C:S,P=r(function(){return new Set(V)},[V]);d(function(){void 0!==f&&H(f)},[f]),d(function(){if(q&&!M&&"horizontal"!==l&&"vertical-flat"!==l){var n=function(i,t,l){void 0===l&&(l=[]);for(var o=0,c=i;o<c.length;o++){var a=c[o];if(a.key===t)return l;if(a.children&&a.children.length>0){var r=n(a.children,t,e(e([],l,!0),[a.key],!1));if(r.length>0)return r}}return[]},i=n(m,q);i.length>0&&I(function(n){var t=new Set(e(e([],n,!0),i,!0));return Array.from(t)})}},[q,m,M,l]);var U=o(function(e,n){R||H(n),null==z||z(e,n),"horizontal"===l&&(!e.children||0===e.children.length)&&V.length>0&&(M||I([]),null==x||x([]))},[z,R,l,V.length,M,x]),_=o(function(n){if(M){var i=P.has(n)?V.filter(function(e){return e!==n}):e(e([],V,!0),[n],!1);null==x||x(i)}else I(function(i){var t=i.includes(n)?i.filter(function(e){return e!==n}):e(e([],i,!0),[n],!1);return null==x||x(t),t})},[P,V,M,x]),D="horizontal"!==l&&k;return s(O,o(function(){"horizontal"===l&&V.length>0&&(M||I([]),null==x||x([]))},[l,V.length,M,x])),B?i("div",{ref:O,className:"idp-menu idp-menu-".concat(w," idp-menu-").concat(l," ").concat(D?"collapsed":""," ").concat(h),style:v,role:"menu",children:m.map(function(e){return i(u,{item:e,level:0,mode:l,collapsed:D,theme:w,openKeySet:P,selectedKey:q,onItemClick:U,onToggleOpen:_},e.key)})}):null};export{p as default};
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 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useState as n,useEffect as c}from"react";import s from"../Icon/Icon.js";var t=function(t){var a=t.type,o=t.content,i=t.duration,u=void 0===i?3e3:i,l=t.className,d=void 0===l?"":l,m=t.style,p=t.onClose,f=n(!0),v=f[0],g=f[1];if(c(function(){if(u>0){var r=setTimeout(function(){g(!1),null==p||p()},u);return function(){return clearTimeout(r)}}},[u,p]),!v)return null;return r("div",{className:"idp-message idp-message--".concat(a," ").concat(d," ").concat(v?"idp-message--show":""),style:m,children:e("div",{className:"idp-message-content",children:[r(s,{type:function(){switch(a){case"success":return"success";case"warning":return"warning";case"error":return"error";default:return"infoCircleFill"}}(),size:20,color:function(){switch(a){case"success":return"var(--idp-success-color)";case"warning":return"var(--idp-warning-color)";case"error":return"var(--idp-error-color)";default:return"var(--idp-primary-color)"}}()}),r("span",{className:"idp-message-text",children:o})]})})};export{t as default};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useState as c,useEffect as n}from"react";import s from"../Icon/Icon.js";var t=function(t){var a=t.type,o=t.content,i=t.duration,u=void 0===i?3e3:i,l=t.className,m=void 0===l?"":l,p=t.style,f=t.onClose,y=c(!0),d=y[0],j=y[1];if(n(function(){if(u>0){var r=setTimeout(function(){j(!1),null==f||f()},u);return function(){return clearTimeout(r)}}},[u,f]),!d)return null;return r("div",{className:"zjpcy-message zjpcy-message--".concat(a," ").concat(m," ").concat(d?"zjpcy-message--show":""),style:p,children:e("div",{className:"zjpcy-message-content",children:[r(s,{type:function(){switch(a){case"success":return"success";case"warning":return"warning";case"error":return"error";default:return"infoCircleFill"}}(),size:20,color:function(){switch(a){case"success":return"var(--zjpcy-success-color)";case"warning":return"var(--zjpcy-warning-color)";case"error":return"var(--zjpcy-error-color)";default:return"var(--zjpcy-primary-color)"}}()}),r("span",{className:"zjpcy-message-text",children:o})]})})};export{t as default};
@@ -1 +1 @@
1
- import{__assign as i}from"../node_modules/tslib/tslib.es6.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";import{useState as e,useRef as t,useEffect as r}from"react";import{createPortal as d}from"react-dom";import a from"classnames";import l from"../Icon/Icon.js";import c from"../Flex/index.js";import m from"../Button/Button.js";var s=function(s){var p,u=s.visible,v=s.title,h=void 0===v?"标题":v,f=s.width,g=void 0===f?600:f,x=s.height,y=void 0===x?300:x,b=s.headerHeight,N=void 0===b?40:b,w=s.footerHeight,k=void 0===w?40:w,C=s.confirmLoading,_=void 0!==C&&C,j=s.direction,H=void 0===j?"normal":j,I=s.top,T=s.onCancel,W=s.onOk,z=s.children,B=s.footer,L=void 0===B?null:B,O=s.bordered,E=void 0!==O&&O,S=s.className,F=s.style,M=s.okText,P=void 0===M?"确认":M,X=s.cancelText,Y=void 0===X?"取消":X,$=s.getContainer,q=void 0===$?function(){return document.body}:$,A=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,ii=s.loadingIcon,oi=e(!1),ni=oi[0],ei=oi[1],ti=e(!1),ri=ti[0],di=ti[1],ai=e({x:0,y:0}),li=ai[0],ci=ai[1],mi=t(null),si=H,pi=function(i){if("number"==typeof i)return i;var o=i.match(/^(\d+)px$/);return o?parseInt(o[1],10):0};r(function(){var i=function(i){mi.current={x:i.clientX,y:i.clientY}};return document.addEventListener("mousedown",i,!0),function(){document.removeEventListener("mousedown",i,!0)}},[]),r(function(){if(!u){di(!0);var i=setTimeout(function(){ei(!1),di(!1)},550);return function(){return clearTimeout(i)}}var o=function(){var i=mi.current;if(!i||"undefined"==typeof window)return{x:0,y:0};var o=y?pi(y):0;if("center"===si&&void 0!==I){var n=window.innerWidth/2,e=I+(o>0?o/2:0);return{x:i.x-n,y:i.y-e}}if("center"===si)return n=window.innerWidth/2,e=window.innerHeight/2,{x:i.x-n,y:i.y-e};if(void 0!==I&&o>0)return n=window.innerWidth/2,e=I+o/2,{x:i.x-n,y:i.y-e};return n=window.innerWidth/2,e=window.innerHeight/2,{x:i.x-n,y:i.y-e}}();ci(o),di(!1),ei(!0)},[u,550,y,I,U]);var ui=function(){di(!0);var i=setTimeout(function(){ei(!1),di(!1),null==T||T()},550);return function(){return clearTimeout(i)}},vi=function(){null==W||W()},hi=i(((p={width:"number"==typeof g?"".concat(g,"px"):g,top:void 0!==I?"".concat(I,"px"):void 0})["--idp-modal-origin-x"]="".concat(li.x,"px"),p["--idp-modal-origin-y"]="".concat(li.y,"px"),p),F),fi={height:"number"==typeof N?"".concat(N,"px"):N},gi=y?pi(y):0,xi=pi(N),yi=pi(k),bi=gi>0?Math.max(0,gi-xi-yi):void 0,Ni=i({},Q);if(!Ni.maxHeight&&y){var wi=pi(y);Ni.maxHeight="".concat(wi,"px")}!Ni.maxHeight&&bi&&(Ni.maxHeight="".concat(bi,"px"));var ki={height:"number"==typeof k?"".concat(k,"px"):k},Ci=function(){if(!ni&&!ri)return null;var e=i({zIndex:J},A);return o("div",{className:a("idp-modal-overlay",{"idp-modal-overlay--visible":ni,"idp-modal-overlay--closing":ri,"idp-modal-overlay--custom-top":void 0!==I},S,D),onClick:ui,style:e,children:n("div",{className:a("idp-modal-container",{"idp-modal-container--center-top":ni&&!ri&&"center"===si&&void 0!==I,"idp-modal-container--center":ni&&!ri&&"center"===si&&void 0===I,"idp-modal-container--top-right":ni&&!ri&&"top-right"===si,"idp-modal-container--bottom-right":ni&&!ri&&"bottom-right"===si,"idp-modal-container--bottom-left":ni&&!ri&&"bottom-left"===si,"idp-modal-container--normal":ni&&!ri&&"normal"===si,"idp-modal-container--closing-center-top":ri&&"center"===si&&void 0!==I,"idp-modal-container--closing-center":ri&&"center"===si&&void 0===I,"idp-modal-container--closing-top-right":ri&&"top-right"===si,"idp-modal-container--closing-bottom-right":ri&&"bottom-right"===si,"idp-modal-container--closing-bottom-left":ri&&"bottom-left"===si,"idp-modal-container--closing-normal":ri&&"normal"===si,"idp-modal-container--bordered":E,"idp-modal-container--has-height":void 0!==y}),style:hi,onClick:function(i){return i.stopPropagation()},children:[Z?o("div",ii?{className:"idp-modal-loading",children:o("div",{className:"idp-modal-loading-content",children:ii})}:{className:"idp-modal-loading",children:o("div",{className:"idp-modal-loading-content",children:o("div",{className:"idp-modal-loading-spinner",children:n("svg",{viewBox:"0 0 24 24",className:"idp-modal-loading-icon",children:[o("circle",{className:"idp-modal-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),o("circle",{className:"idp-modal-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null,n("div",{className:"idp-modal-header",style:fi,children:[o("div",{className:"idp-modal-header__left",children:o("span",{className:"idp-modal-header__title",children:h})}),o("div",{className:"idp-modal-header__right",children:o("div",{className:"idp-modal-close-btn",onClick:ui,children:o(l,{type:"close",size:20,color:"currentColor"})})})]}),ni&&o("div",{className:a("idp-modal-content",K),style:Ni,children:U&&ri?null:z}),o(c,{className:"idp-modal-footer",align:"center",justify:"flex-end",style:Object.assign({},ki,{padding:"0px 10px"}),gap:12,children:null===L?n(c,{className:"idp-modal-footer__actions",justify:"flex-end",gap:12,children:[o(m,{variant:"secondary",onClick:ui,disabled:_,children:Y||"取消"}),o(m,{variant:"primary",onClick:vi,loading:_,children:P||"确认"})]}):L})]})})}();if(!Ci)return null;if(!1===q)return Ci;var _i="function"==typeof q?q():q;return _i?d(Ci,_i):Ci};export{s as default};
1
+ 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 i,useRef as t,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?300: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=i(!1),en=on[0],tn=on[1],rn=i(!1),cn=rn[0],an=rn[1],ln=i(!1),dn=ln[0],mn=ln[1],sn=i({x:0,y:0}),pn=sn[0],un=sn[1],yn=t(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,i=H+(o>0?o/2:0);return{x:n.x-e,y:n.y-i}}if("center"===vn)return e=window.innerWidth/2,i=window.innerHeight/2,{x:n.x-e,y:n.y-i};if(void 0!==H&&o>0)return e=window.innerWidth/2,i=H+o/2,{x:n.x-e,y:n.y-i};return e=window.innerWidth/2,i=window.innerHeight/2,{x:n.x-e,y:n.y-i}}();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 i=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:i,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 e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as i,jsx as n}from"react/jsx-runtime";import t from"../node_modules/react-fast-marquee/dist/index.js";import o from"react";var c=function(c){var s=c.text,a=void 0===s?"":s,l=c.speed,d=void 0===l?50:l,r=c.height,p=void 0===r?60:r,m=c.icon,h=void 0===m?null:m,u=c.styles,v=void 0===u?{}:u,f=c.closeStyle,y=void 0===f?{}:f,x=c.showCloseButton,N=void 0!==x&&x,g=c.floatingTop,b=void 0!==g&&g,j=c.pauseOnHover,k=void 0===j||j,w=c.type,A=void 0===w?"primary":w,C=c.className,H=void 0===C?"":C,O=o.useState(!0),S=O[0],_=O[1];if(!a||!S)return null;return i("div",{className:"idp-notice idp-notice--".concat(A," ").concat(b?"idp-notice-floating":""," ").concat(H),style:e({height:"".concat(p,"px")},v),children:[i(t,{pauseOnHover:k,speed:d,gradient:!1,children:[n("span",{style:{width:"1200px"}}),Array.isArray(a)?n("div",{className:"idp-notice-content",children:a.map(function(e,t){return i("span",{style:{marginRight:"15px",display:"inline-block"},children:[h?n("span",{className:"idp-notice-icon",children:h}):null,n("span",{className:"idp-notice-text",children:e})]},t)})}):n("div",{className:"idp-notice-content",children:i("span",{children:[h?n("span",{className:"idp-notice-icon",children:h}):null,n("span",{className:"idp-notice-text",children:a})]})})]}),N&&n("div",{className:"idp-notice-close",style:e({height:"".concat(p,"px")},y),onClick:function(){_(!1)},children:n("span",{className:"idp-notice-close-icon",children:"×"})})]})};export{c as default};
1
+ import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as c,jsx as n}from"react/jsx-runtime";import i from"../node_modules/react-fast-marquee/dist/index.js";import t from"react";var o=function(o){var s=o.text,a=void 0===s?"":s,l=o.speed,r=void 0===l?50:l,d=o.height,p=void 0===d?60:d,m=o.icon,y=void 0===m?null:m,h=o.styles,u=void 0===h?{}:h,v=o.closeStyle,j=void 0===v?{}:v,f=o.showCloseButton,z=void 0!==f&&f,x=o.floatingTop,N=void 0!==x&&x,g=o.pauseOnHover,b=void 0===g||g,k=o.type,w=void 0===k?"primary":k,A=o.className,C=void 0===A?"":A,H=t.useState(!0),O=H[0],S=H[1];if(!a||!O)return null;return c("div",{className:"zjpcy-notice zjpcy-notice--".concat(w," ").concat(N?"zjpcy-notice-floating":""," ").concat(C),style:e({height:"".concat(p,"px")},u),children:[c(i,{pauseOnHover:b,speed:r,gradient:!1,children:[n("span",{style:{width:"1200px"}}),Array.isArray(a)?n("div",{className:"zjpcy-notice-content",children:a.map(function(e,i){return c("span",{style:{marginRight:"15px",display:"inline-block"},children:[y?n("span",{className:"zjpcy-notice-icon",children:y}):null,n("span",{className:"zjpcy-notice-text",children:e})]},i)})}):n("div",{className:"zjpcy-notice-content",children:c("span",{children:[y?n("span",{className:"zjpcy-notice-icon",children:y}):null,n("span",{className:"zjpcy-notice-text",children:a})]})})]}),z&&n("div",{className:"zjpcy-notice-close",style:e({height:"".concat(p,"px")},j),onClick:function(){S(!1)},children:n("span",{className:"zjpcy-notice-close-icon",children:"×"})})]})};export{o as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as n,useRef as t,useEffect as o,useCallback as r}from"react";import a from"../Icon/Icon.js";var c=function(a){var c=a.value,s=a.options,l=a.onChange,d=n(!1),u=d[0],p=d[1],v=t(null),f=t(null),h=n({}),m=h[0],g=h[1],w=r(function(){var e,i;if(v.current){var n=v.current.getBoundingClientRect(),t=window.innerHeight,o=(null===(e=f.current)||void 0===e?void 0:e.offsetWidth)||120,r=(null===(i=f.current)||void 0===i?void 0:i.offsetHeight)||200,a=n.left+n.width/2-o/2+window.scrollX,c=t-n.bottom,s=c>=r||c>=n.top;g(s?{top:n.bottom+window.scrollY+6,left:a,width:"auto",minWidth:Math.max(o,120)}:{top:n.top+window.scrollY-r-6,left:a,width:"auto",minWidth:Math.max(o,120)})}},[]);o(function(){var e=function(e){v.current&&!v.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),o(function(){if(u){w();var e=function(){return w()};return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}},[u,w]);return e("div",{className:"idp-page-size-select",ref:v,children:[e("div",{className:"idp-page-size-select-trigger ".concat(u?"is-open":""),onClick:function(){p(!u),u||setTimeout(w,0)},children:[e("span",{className:"idp-page-size-select-value",children:[c," 条/页"]}),i("svg",{className:"idp-page-size-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:i("path",{d:"M6 8L1 3h10z",fill:"currentColor"})})]}),u&&i("div",{className:"idp-page-size-select-dropdown is-open",ref:f,style:m,children:s.map(function(i){var n="number"==typeof i?i:parseInt(i,10);return e("div",{className:"idp-page-size-select-option ".concat(c===n?"is-selected":""),onClick:function(){return l(n),void p(!1)},children:[i," 条/页"]},i)})})]})},s=function(r){var s=r.total,l=void 0===s?0:s,d=r.current,u=r.pageSize,p=void 0===u?10:u,v=r.onChange,f=r.pageSizeOptions,h=void 0===f?["10","20","50","100"]:f,m=r.showSizeChanger,g=void 0!==m&&m,w=r.showQuickJumper,N=void 0!==w&&w,y=r.showTotal,z=r.size,x=void 0===z?"default":z,C=r.align,k=r.className,L=void 0===k?"":k,b=r.style,E=n(1),I=E[0],M=E[1],S=n(p),W=S[0],j=S[1],B=t(!0),H=void 0!==d?d:I,R=void 0!==p?p:W,T=Math.ceil(l/R),Y=t(v);Y.current=v,o(function(){void 0!==p&&j(p)},[p]),o(function(){void 0!==d&&M(d)},[d]),o(function(){if(B.current)B.current=!1;else if(H>T&&T>0){var e=T;void 0===d&&M(e),Y.current&&Y.current(e,R)}},[H,T,d,R]);var q=function(e){e===H||e<1||e>T||(void 0===d&&M(e),v&&v(e,R))},A=(H-1)*R+1,J=Math.min(H*R,l),K="center"===C?"align-center":"flex-end"===C?"align-right":"";return e("div",{className:"idp-pagination ".concat("small"===x?"mini":""," ").concat(K," ").concat(L),style:b,children:[y&&i("div",{className:"idp-pagination-total-text",children:y(l,[A,J])}),e("ul",{className:"idp-pagination-list",children:[i("li",{className:"idp-pagination-prev ".concat(H<=1?"idp-pagination-prev-disabled":""),onClick:function(){H>1&&q(H-1)},children:i(a,{type:"arrowLeft"})}),function(){if(T<=7)return Array.from({length:T},function(e,i){return i+1});var e=[];if(e.push(1),H<=4){for(var i=2;i<=5;i++)e.push(i);e.push("..."),e.push(T)}else if(H>=T-3){e.push("...");for(i=T-4;i<=T-1;i++)e.push(i);e.push(T)}else{e.push("...");for(i=H-1;i<=H+1;i++)e.push(i);e.push("..."),e.push(T)}return e}().map(function(e,n){return i("li",{className:"number"==typeof e?"idp-pagination-item ".concat(e===H?"idp-pagination-item-active":""):"idp-pagination-ellipsis",onClick:function(){return"number"==typeof e&&q(e)},children:e},n)}),i("li",{className:"idp-pagination-next ".concat(H>=T?"idp-pagination-next-disabled":""),onClick:function(){H<T&&q(H+1)},children:i(a,{type:"arrowRight"})})]}),(g||N)&&e("div",{className:"idp-pagination-options",children:[g&&i(c,{value:R,options:h,onChange:function(e){return function(e){var i=parseInt(e,10);void 0===p&&j(i),void 0===d&&M(1),v&&v(1,i)}(e.toString())}}),N&&e("div",{className:"idp-pagination-options-quick-jumper",children:[i("div",{style:{minWidth:"30px"},children:"跳至"}),i("input",{type:"text",onKeyPress:function(e){if("Enter"===e.key){var i=e.target,n=parseInt(i.value,10);!isNaN(n)&&n>=1&&n<=T&&(q(n),i.value="")}},placeholder:"页码"}),"页"]})]})]})};export{s as default};
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 +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 d}from"react-dom";import s from"classnames";import f 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,b=h.okText,w=void 0===b?"确定":b,y=h.cancelText,B=void 0===y?"取消":y,L=h.okButtonProps,k=void 0===L?{}:L,T=h.cancelButtonProps,R=void 0===T?{}:T,C=h.onConfirm,N=h.onCancel,x=h.disabled,E=void 0!==x&&x,z=h.icon,j=h.type,P=void 0===j?"warning":j,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:"idp-popconfirm-top",bottom:"idp-popconfirm-bottom",left:"idp-popconfirm-left",right:"idp-popconfirm-right",topLeft:"idp-popconfirm-topLeft",topRight:"idp-popconfirm-topRight",bottomLeft:"idp-popconfirm-bottomLeft",bottomRight:"idp-popconfirm-bottomRight",leftTop:"idp-popconfirm-leftTop",leftBottom:"idp-popconfirm-leftBottom",rightTop:"idp-popconfirm-rightTop",rightBottom:"idp-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){E||(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(!C)return[3,5];S(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,C()];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(){N&&N(),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:s("idp-popconfirm","idp-popconfirm-visible",$[I],"idp-popconfirm--".concat(P),A),style:t({position:"fixed",top:"".concat(V.top,"px"),left:"".concat(V.left,"px")},F),children:[r("div",{className:"idp-popconfirm-arrow"}),i("div",{className:"idp-popconfirm-inner",children:[i("div",{className:"idp-popconfirm-header",children:[r("span",{style:{display:z?"inline-block":"none"},className:"idp-popconfirm-icon",children:z||(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(f,{type:o.type,size:18,color:o.color}))}),r("span",{className:"idp-popconfirm-title",children:g})]}),v&&r("div",{className:"idp-popconfirm-description",children:v}),i("div",{className:"idp-popconfirm-actions",children:[W&&r(m,{variant:R.variant||"secondary",onClick:it,disabled:R.disabled||Q,size:"small",children:B}),r(m,{variant:k.variant||"primary",onClick:et,loading:k.loading||Q,disabled:k.disabled,size:"small",children:w})]})]})]});if(!1===q)return e;var n="function"==typeof q?q():q;return n?d(e,n):e}()]})};export{h as default};
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 +1 @@
1
- import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsxs as e,jsx as s,Fragment as i}from"react/jsx-runtime";import n from"classnames";import o from"../Icon/Icon.js";var t=function(t){var c,a,d,p=t.percent,l=void 0===p?0:p,f=t.type,u=void 0===f?"line":f,g=t.status,m=t.showInfo,h=void 0===m||m,v=t.format,x=t.strokeColor,y=void 0===x?"#1890ff":x,b=t.trailColor,k=void 0===b?"gainsboro":b,N=t.strokeWidth,w=t.size,M=void 0===w?"default":w,C=t.transition,j=void 0===C||C,I=t.steps,z=t.segments,W=t.icon,D=t.prefix,A=t.suffix,B=t.children,G=t.className,L=t.style,P=g||(l>=100?"success":l<0?"exception":"normal"),_=function(){return v?v(l):"".concat(Math.floor(l),"%")},q=function(r){return"object"==typeof r&&"from"in r&&"to"in r},E=function(){return"success"===P?"#52c41a":"exception"===P?"#ff4d4f":q(y)?y.from:y},F=function(){return W||("success"===P?s(o,{type:"check-circle",style:{color:"#52c41a"}}):"exception"===P?s(o,{type:"close-circle",style:{color:"#ff4d4f"}}):null)};if("circle"===u||"dashboard"===u){var H=50-(N||6),J=2*Math.PI*H,K=J-l/100*J,O="success"===P?"#52c41a":"exception"===P?"#ff4d4f":y,Q=q(O)?(a=(c=O).from,d=c.to,"from-".concat(a.replace("#",""),"-to-").concat(d.replace("#",""))):null;return e("div",{className:n("idp-progress","idp-progress--circle",G),style:L,children:[e("svg",{width:120,height:120,viewBox:"0 0 120 120",style:{transform:"rotate(-90deg)"},children:[Q&&s("defs",{children:e("linearGradient",{id:Q,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s("stop",{offset:"0%",stopColor:O.from}),s("stop",{offset:"100%",stopColor:O.to})]})}),s("circle",{cx:60,cy:60,r:H,stroke:k,strokeWidth:N||6,fill:"none"}),s("circle",{cx:60,cy:60,r:H,stroke:Q?"url(#".concat(Q,")"):E(),strokeWidth:N||6,fill:"none",strokeDasharray:J,strokeDashoffset:K,strokeLinecap:"round",style:{transition:j?"stroke-dashoffset 0.3s cubic-bezier(0.34, 0.69, 0.1, 1)":"none"}})]}),h&&s("div",{className:"idp-progress-info",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",margin:0},children:B||e(i,{children:[F(),D,_(),A]})})]})}var R=function(r){var e=r.color;if(q(e)){var s=e.from,i=e.to,n=e.direction;return{background:"linear-gradient(".concat(void 0===n?"to right":n,", ").concat(s,", ").concat(i,")")}}return{backgroundColor:e}};return e("div",{className:n("idp-progress","idp-progress--".concat(M),"idp-progress--line",{"idp-progress--success":"success"===P},{"idp-progress--exception":"exception"===P},{"idp-progress--steps":I&&I>0},{"idp-progress--has-segments":z&&z.length>0},G),style:L,children:[s("div",{className:"idp-progress-wrapper",children:s("div",{className:"idp-progress-outer",children:I&&I>0?function(){if(!I||I<=0)return null;var r=l/100,e=Math.min(1,Math.max(0,r)),i=Array.from({length:I},function(r,i){var o=i/I,t=(i+1)/I;return s("div",{className:n("idp-progress-step",{"idp-progress-step--completed":e>=t,"idp-progress-step--current":e>o&&e<t,"idp-progress-step--pending":e<=o,"idp-progress-step--success":e>=1}),style:{transition:j?"all var(--idp-transition-duration) var(--idp-transition-timing-function)":"none"}},i)});return s("div",{className:"idp-progress-steps",children:i})}():z&&z.length>0?function(){if(!z||0===z.length)return null;var e=z.reduce(function(r,e){return r+e.percent},0),i=void 0===l||0===l?e:l,o=e>0?i/e:i/100,t=Math.min(1,Math.max(0,o)),c=0,a=z.map(function(i,o){var a=i.percent,d=c/e,p=(c+a)/e;c+=a;var l=t<=d;return s("div",{className:n("idp-progress-segment",{"idp-progress-segment--completed":t>=p,"idp-progress-segment--current":t>d&&t<p,"idp-progress-segment--pending":l}),style:r(r({width:"".concat(a,"%")},l?{}:R(i)),{transition:j?"all var(--idp-transition-duration) var(--idp-transition-timing-function)":"none"})},o)}),d=100-e;return d>0&&a.push(s("div",{className:"idp-progress-segment idp-progress-segment--remaining",style:{width:"".concat(d,"%"),backgroundColor:"gainsboro",transition:j?"all var(--idp-transition-duration) var(--idp-transition-timing-function)":"none"}},"remaining")),s("div",{className:"idp-progress-segments",children:a})}():s("div",{className:"idp-progress-inner",style:{background:k},children:s("div",{className:n("idp-progress-bg",{"idp-progress-bg--success":"success"===P,"idp-progress-bg--exception":"exception"===P,"idp-progress-bg--animated":function(){var r="success"===P?"#52c41a":"exception"===P?"#ff4d4f":y;return q(r)&&!0===r.animated}()}),style:r(r({width:"".concat(Math.min(100,Math.max(0,l)),"%"),backgroundColor:q(y)?void 0:E()},function(){var r="success"===P?"#52c41a":"exception"===P?"#ff4d4f":y;if(q(r)){var e=r.from,s=r.to,i=r.direction;return{background:"linear-gradient(".concat(void 0===i?"to right":i,", ").concat(e,", ").concat(s,")")}}return{}}()),{transition:j?"width 0.3s cubic-bezier(0.34, 0.69, 0.1, 1)":"none"})})})})}),h&&e("div",{className:"idp-progress-info",children:[F()&&s("span",{className:"idp-progress-icon",children:F()}),D&&s("span",{className:"idp-progress-prefix",children:D}),s("span",{children:_()}),A&&s("span",{className:"idp-progress-suffix",children:A})]})]})};export{t as default};
1
+ import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsxs as e,jsx as s,Fragment as n}from"react/jsx-runtime";import c from"classnames";import o from"../Icon/Icon.js";var t=function(t){var i,a,p,l=t.percent,d=void 0===l?0:l,f=t.type,u=void 0===f?"line":f,g=t.status,m=t.showInfo,y=void 0===m||m,h=t.format,v=t.strokeColor,j=void 0===v?"#1890ff":v,z=t.trailColor,x=void 0===z?"gainsboro":z,b=t.strokeWidth,k=t.size,N=void 0===k?"default":k,w=t.transition,M=void 0===w||w,C=t.steps,I=t.segments,W=t.icon,D=t.prefix,A=t.suffix,B=t.children,G=t.className,L=t.style,P=g||(d>=100?"success":d<0?"exception":"normal"),_=function(){return h?h(d):"".concat(Math.floor(d),"%")},q=function(r){return"object"==typeof r&&"from"in r&&"to"in r},E=function(){return"success"===P?"#52c41a":"exception"===P?"#ff4d4f":q(j)?j.from:j},F=function(){return W||("success"===P?s(o,{type:"check-circle",style:{color:"#52c41a"}}):"exception"===P?s(o,{type:"close-circle",style:{color:"#ff4d4f"}}):null)};if("circle"===u||"dashboard"===u){var H=50-(b||6),J=2*Math.PI*H,K=J-d/100*J,O="success"===P?"#52c41a":"exception"===P?"#ff4d4f":j,Q=q(O)?(a=(i=O).from,p=i.to,"from-".concat(a.replace("#",""),"-to-").concat(p.replace("#",""))):null;return e("div",{className:c("zjpcy-progress","zjpcy-progress-circle",G),style:L,children:[e("svg",{width:120,height:120,viewBox:"0 0 120 120",style:{transform:"rotate(-90deg)"},children:[Q&&s("defs",{children:e("linearGradient",{id:Q,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s("stop",{offset:"0%",stopColor:O.from}),s("stop",{offset:"100%",stopColor:O.to})]})}),s("circle",{cx:60,cy:60,r:H,stroke:x,strokeWidth:b||6,fill:"none"}),s("circle",{cx:60,cy:60,r:H,stroke:Q?"url(#".concat(Q,")"):E(),strokeWidth:b||6,fill:"none",strokeDasharray:J,strokeDashoffset:K,strokeLinecap:"round",style:{transition:M?"stroke-dashoffset 0.3s cubic-bezier(0.34, 0.69, 0.1, 1)":"none"}})]}),y&&s("div",{className:"zjpcy-progress-info",children:B||e(n,{children:[F(),D,_(),A]})})]})}var R=function(r){var e=r.color;if(q(e)){var s=e.from,n=e.to,c=e.direction;return{background:"linear-gradient(".concat(void 0===c?"to right":c,", ").concat(s,", ").concat(n,")")}}return{backgroundColor:e}};return e("div",{className:c("zjpcy-progress","zjpcy-progress-".concat(N),"zjpcy-progress-line",{"zjpcy-progress-success":"success"===P},{"zjpcy-progress-exception":"exception"===P},{"zjpcy-progress-steps":C&&C>0},{"zjpcy-progress-has-segments":I&&I.length>0},G),style:L,children:[s("div",{className:"zjpcy-progress-wrapper",children:s("div",{className:"zjpcy-progress-outer",children:C&&C>0?function(){if(!C||C<=0)return null;var r=d/100,e=Math.min(1,Math.max(0,r)),n=Array.from({length:C},function(r,n){var o=n/C,t=(n+1)/C;return s("div",{className:c("zjpcy-progress-step",{"zjpcy-progress-step--completed":e>=t,"zjpcy-progress-step--current":e>o&&e<t,"zjpcy-progress-step--pending":e<=o,"zjpcy-progress-step--success":e>=1}),style:{transition:M?"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)":"none"}},n)});return s("div",{className:"zjpcy-progress-steps",children:n})}():I&&I.length>0?function(){if(!I||0===I.length)return null;var e=I.reduce(function(r,e){return r+e.percent},0),n=void 0===d||0===d?e:d,o=e>0?n/e:n/100,t=Math.min(1,Math.max(0,o)),i=0,a=I.map(function(n,o){var a=n.percent,p=i/e,l=(i+a)/e;i+=a;var d=t<=p;return s("div",{className:c("zjpcy-progress-segment",{"zjpcy-progress-segment--completed":t>=l,"zjpcy-progress-segment--current":t>p&&t<l,"zjpcy-progress-segment--pending":d}),style:r(r({width:"".concat(a,"%")},d?{}:R(n)),{transition:M?"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)":"none"})},o)}),p=100-e;return p>0&&a.push(s("div",{className:"zjpcy-progress-segment zjpcy-progress-segment--remaining",style:{width:"".concat(p,"%"),backgroundColor:"gainsboro",transition:M?"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)":"none"}},"remaining")),s("div",{className:"zjpcy-progress-segments",children:a})}():s("div",{className:"zjpcy-progress-inner",style:{background:x},children:s("div",{className:c("zjpcy-progress-bg",{"zjpcy-progress-bg--success":"success"===P,"zjpcy-progress-bg--exception":"exception"===P,"zjpcy-progress-bg--animated":function(){var r="success"===P?"#52c41a":"exception"===P?"#ff4d4f":j;return q(r)&&!0===r.animated}()}),style:r(r({width:"".concat(Math.min(100,Math.max(0,d)),"%"),backgroundColor:q(j)?void 0:E()},function(){var r="success"===P?"#52c41a":"exception"===P?"#ff4d4f":j;if(q(r)){var e=r.from,s=r.to,n=r.direction;return{background:"linear-gradient(".concat(void 0===n?"to right":n,", ").concat(e,", ").concat(s,")")}}return{}}()),{transition:M?"width 0.3s cubic-bezier(0.34, 0.69, 0.1, 1)":"none"})})})})}),y&&e("div",{className:"zjpcy-progress-info",children:[F()&&s("span",{className:"zjpcy-progress-icon",children:F()}),D&&s("span",{className:"zjpcy-progress-prefix",children:D}),s("span",{children:_()}),A&&s("span",{className:"zjpcy-progress-suffix",children:A})]})]})};export{t 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 d,useEffect as o,useCallback as l}from"react";import c from"classnames";var s=t(void 0),u=function(t){var l,u=t.value,p=t.checked,v=t.defaultChecked,f=void 0!==v&&v,m=t.onChange,h=t.disabled,g=void 0!==h&&h,b=t.size,y=t.children,N=t.className,w=t.style,R=t.label,C=t.labelGap,_=void 0===C?8:C,x=t.labelClassName,z=void 0===x?"":x,k=t.labelStyle,I=n(s),G=!!I,A=r(null),F=d(f),j=F[0],q=F[1],B=G?I.value===u:void 0!==p?p:j,E=b||(G?I.size:void 0),L="button"===(G?I.type:void 0);o(function(){if(G&&I.registerRadio)return I.registerRadio(u,A.current),function(){var e;null===(e=I.unregisterRadio)||void 0===e||e.call(I,u)}},[G,u,I]),o(function(){B&&G&&I.updateIndicator&&requestAnimationFrame(function(){var e;null===(e=I.updateIndicator)||void 0===e||e.call(I)})},[B,G]),o(function(){G||void 0===p||q(p)},[p,G]);var X=c("idp-radio",((l={"idp-radio--checked":B,"idp-radio--disabled":g||G&&I.disabled})["idp-radio--".concat(E)]=E,l["idp-radio--button"]=L,l),N);return i("label",{ref:A,className:X,style:w,children:a("div",{className:"idp-radio-wrapper",style:{display:"flex",alignItems:"center"},children:[R&&i("div",{className:"idp-radio-label ".concat(z),style:e({marginRight:"number"==typeof _?"".concat(_,"px"):_},k),children:R}),a("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i("input",{type:"radio",className:"idp-radio__input",checked:B,onChange:function(e){var i,a=e.target.checked;g||G&&I.disabled||(G?null===(i=I.onChange)||void 0===i||i.call(I,u):(q(a),null==m||m(a,u)))},disabled:g||G&&I.disabled,value:u}),!L&&i("span",{className:"idp-radio__inner"}),y&&i("span",{className:"idp-radio__label",children:y})]})]})})};u.Group=function(e){var t,n=e.value,u=e.defaultValue,p=e.onChange,v=e.disabled,f=void 0!==v&&v,m=e.type,h=void 0===m?"radio":m,g=e.size,b=void 0===g?"middle":g,y=e.children,N=e.className,w=e.style,R=d(u),C=R[0],_=R[1],x=r(null),z=r(new Map),k=d({width:0,height:0,transform:"translateX(0px)"}),I=k[0],G=k[1],A=void 0!==n?n:C,F=l(function(e,i){i&&z.current.set(e,i)},[]),j=l(function(e){z.current.delete(e)},[]),q=l(function(){if("button"===h&&x.current){var e=z.current.get(A);if(e){var i=x.current.getBoundingClientRect(),a=e.getBoundingClientRect(),t=a.left-i.left;G({width:a.width,height:a.height,transform:"translateX(".concat(t,"px)")})}}},[A,h]);o(function(){if("button"===h){var e=requestAnimationFrame(function(){q()});return function(){return cancelAnimationFrame(e)}}},[h,q]),o(function(){if("button"===h){var e=function(){q()};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}},[h,q]),o(function(){void 0!==n&&_(n)},[n]);var B=c("idp-radio-group",((t={"idp-radio-group--button":"button"===h})["idp-radio-group--".concat(b)]=b,t),N);return i(s.Provider,{value:{value:A,onChange:function(e){_(e),null==p||p(e)},disabled:f,type:h,size:b,registerRadio:F,unregisterRadio:j,updateIndicator:q},children:a("div",{ref:x,className:B,style:w,children:["button"===h&&i("div",{className:"idp-radio-group__indicator",style:{width:I.width,height:I.height,transform:I.transform}}),y]})})},u.displayName="Radio",u.Group.displayName="Radio.Group";var p=u;export{p as default};
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};