@para-ui/core 1.1.28 → 1.1.29

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.
@@ -1,10 +1,10 @@
1
- !function(e,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(require("react"),require("@material-ui/lab"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/DoubleLeft"),require("@para-ui/icons/DoubleRight"),require("@para-ui/icons/Left"),require("@para-ui/icons/Right"),require("@para-ui/icons/Down")):"function"==typeof define&&define.amd?define(["react","@material-ui/lab","@material-ui/core","@material-ui/core/styles","@para-ui/icons/DoubleLeft","@para-ui/icons/DoubleRight","@para-ui/icons/Left","@para-ui/icons/Right","@para-ui/icons/Down"],i):"object"==typeof exports?exports.ParaUI=i(require("react"),require("@material-ui/lab"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/DoubleLeft"),require("@para-ui/icons/DoubleRight"),require("@para-ui/icons/Left"),require("@para-ui/icons/Right"),require("@para-ui/icons/Down")):e.ParaUI=i(e.react,e["@material-ui/lab"],e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/DoubleLeft"],e["@para-ui/icons/DoubleRight"],e["@para-ui/icons/Left"],e["@para-ui/icons/Right"],e["@para-ui/icons/Down"])}(self,(function(e,i,r,o,t,n,a,l,s){return function(){"use strict";var p={4126:function(e){
1
+ !function(e,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(require("react"),require("@material-ui/lab"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/DoubleLeft"),require("@para-ui/icons/DoubleRight"),require("@para-ui/icons/Left"),require("@para-ui/icons/Right"),require("@para-ui/icons/Down")):"function"==typeof define&&define.amd?define(["react","@material-ui/lab","@material-ui/core","@material-ui/core/styles","@para-ui/icons/DoubleLeft","@para-ui/icons/DoubleRight","@para-ui/icons/Left","@para-ui/icons/Right","@para-ui/icons/Down"],i):"object"==typeof exports?exports.ParaUI=i(require("react"),require("@material-ui/lab"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/DoubleLeft"),require("@para-ui/icons/DoubleRight"),require("@para-ui/icons/Left"),require("@para-ui/icons/Right"),require("@para-ui/icons/Down")):e.ParaUI=i(e.react,e["@material-ui/lab"],e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/DoubleLeft"],e["@para-ui/icons/DoubleRight"],e["@para-ui/icons/Left"],e["@para-ui/icons/Right"],e["@para-ui/icons/Down"])}(self,(function(e,i,r,t,o,n,a,l,s){return function(){"use strict";var p={4126:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function t(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var i={},r=0;r<10;r++)i["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(i).map((function(e){return i[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var a,l,s=t(e),p=1;p<arguments.length;p++){for(var c in a=Object(arguments[p]))r.call(a,c)&&(s[c]=a[c]);if(i){l=i(a);for(var u=0;u<l.length;u++)o.call(a,l[u])&&(s[l[u]]=a[l[u]])}}return s}},9524:function(e,i,r){
7
+ var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var i={},r=0;r<10;r++)i["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(i).map((function(e){return i[e]})).join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var a,l,s=o(e),p=1;p<arguments.length;p++){for(var c in a=Object(arguments[p]))r.call(a,c)&&(s[c]=a[c]);if(i){l=i(a);for(var u=0;u<l.length;u++)t.call(a,l[u])&&(s[l[u]]=a[l[u]])}}return s}},9524:function(e,i,r){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.pr
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- r(4126);var o=r(9297),t=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;t=n("react.element"),n("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function p(e,i,r){var o,n={},p=null,c=null;for(o in void 0!==r&&(p=""+r),void 0!==i.key&&(p=""+i.key),void 0!==i.ref&&(c=i.ref),i)l.call(i,o)&&!s.hasOwnProperty(o)&&(n[o]=i[o]);if(e&&e.defaultProps)for(o in i=e.defaultProps)void 0===n[o]&&(n[o]=i[o]);return{$$typeof:t,type:e,key:p,ref:c,props:n,_owner:a.current}}i.jsx=p,i.jsxs=p},7712:function(e,i,r){e.exports=r(9524)},853:function(e,i){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};i.Z=function(){return r}},1731:function(e){e.exports=r},8604:function(e){e.exports=o},4508:function(e){e.exports=i},7428:function(e){e.exports=t},934:function(e){e.exports=n},6028:function(e){e.exports=s},1127:function(e){e.exports=a},6288:function(e){e.exports=l},9297:function(i){i.exports=e}},c={};function u(e){var i=c[e];if(void 0!==i)return i.exports;var r=c[e]={exports:{}};return p[e](r,r.exports,u),r.exports}u.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(i,{a:i}),i},u.d=function(e,i){for(var r in i)u.o(i,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},u.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){u.r(d),u.d(d,{Pagination:function(){return j}});var e=u(7712),i=u(9297),r=u(4508),o=u(1731),t=u(8604),n=u(7428),a=u.n(n),l=u(934),s=u.n(l),p=u(1127),c=u.n(p),g=u(6288),f=u.n(g),m=u(6028),x=u.n(m),h=u(853),v=function(){return v=Object.assign||function(e){for(var i,r=1,o=arguments.length;r<o;r++)for(var t in i=arguments[r])Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e},v.apply(this,arguments)},b=(0,h.Z)(),y=(0,t.makeStyles)((function(){return(0,t.createStyles)({pagination:{color:b.textColor.secondary,fontSize:b.fontSize,fontFamily:b.fontFamily.zh,"& > div":{display:"inline-block",verticalAlign:"middle"},"& > .total-num":{marginRight:"20px"},"& > .page-line-memo":{cursor:"pointer",marginRight:"20px","& > span":{marginRight:"10px"},"& > .select-page":{display:"inline-block",boxShadow:b.boxShadow,paddingLeft:"10px",borderRadius:b.borderRadius,height:"24px",lineHeight:"24px","& > span":{color:b.textColor.primary,marginRight:"10px"},"& > svg":{fontSize:"12px",marginRight:"5px",color:b.textColor.thirdary,position:"relative",top:"1px",transition:"all .3s"}},"&.page-line-memo-expand":{"& > .select-page":{"& > svg":{transform:"rotate(180deg)",color:b.thmemColor.primary}}}},"& > .current-page":{marginRight:"20px","& > .current-page-num":{color:b.textColor.primary,marginRight:"4px",marginLeft:"4px"},"& > .current-page-sign":{marginRight:"3px"}},"& > .pagination-content":{boxShadow:b.boxShadow,borderRadius:b.borderRadius,height:"24px",lineHeight:"24px","& > .left-page,& > .right-page":{display:"inline-block",padding:"0 10px","& > button":{borderRadius:b.borderRadius,padding:"2px",verticalAlign:"top",marginTop:"4px","&:hover":{backgroundColor:b.bgBorderColor.bg2,"& svg":{color:b.thmemColor.primary}},"& svg":{fontSize:"12px",color:b.textColor.secondary}}},"& > .left-page":{"& > button":{marginRight:"10px"}},"& > nav":{display:"inline-block","& > ul":{"& > li":{marginRight:"10px","& > button":{height:"16px",minWidth:"16px",fontSize:"12px",borderRadius:b.borderRadius,padding:"2px",margin:"0",verticalAlign:"top",marginTop:"4px","&.Mui-selected":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary},"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"&:first-child":{display:"none"},"&:last-child":{display:"none"},"& > div":{display:"inline-block",verticalAlign:"top",marginTop:"3px"}}}},"& > .right-page":{paddingLeft:"0px","& > button":{marginLeft:"10px"}}},"& > .skip-page-memo":{marginLeft:"20px","& > .skip-page-text":{display:"inline-block",marginLeft:"10px",boxShadow:b.boxShadow,borderRadius:b.borderRadius,height:"24px",lineHeight:"24px",paddingRight:"6px",paddingLeft:"10px","& > .skip-input":{height:"100%","& > div":{height:"100%","& > div":{height:"100%"}},"& input":{padding:"0",width:"22px",fontSize:b.fontSize,color:b.textColor.primary,height:"24px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{appearance:"none"}},"& fieldset":{border:"0"}}}}},"page-line-memo-popover":{"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginTop:"5px",minWidth:"60px",textAlign:"center",fontSize:"12px","& > div":{height:"30px",lineHeight:"30px",cursor:"pointer"},"& > .page-line-item":{color:b.textColor.secondary,"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"& > .select-page-line-item":{color:b.thmemColor.primary}}}})})),j=function(t){var n=t.className,l=t.type,p=void 0===l?"simple":l,u=t.total,d=void 0===u?0:u,g=t.rowsPerPage,m=void 0===g?[10,20,30]:g,h=t.currentRowsPerPage,b=void 0===h?10:h,j=t.page,F=void 0===j?1:j,S=t.skipFunc,C=t.changePage,k=t.changeRowsPerPage,w=y(t),R=(0,i.useState)(null),O=R[0],D=R[1],E=(0,i.useState)(b),N=E[0],P=E[1],z=(0,i.useState)(F),L=z[0],_=z[1],q=(0,i.useState)(),B=q[0],M=q[1],T=(0,i.useState)(),I=T[0],A=T[1];(0,i.useEffect)((function(){b!==N&&P(b)}),[b]),(0,i.useEffect)((function(){F!==L&&_(F)}),[F]),(0,i.useEffect)((function(){var e=Number(B);L>e&&e!==L&&_(e)}),[L,B]),(0,i.useEffect)((function(){var e=Math.ceil(d/N);M(e||1)}),[N,d]);var W,H=function(e){D(e.currentTarget)},U=function(){D(null)},Y=function(e){return function(i,r){var o=L;switch(e){case"first":o=1;break;case"prev":o--;break;case"last":o=B;break;case"next":o++;break;case"pagination":o=r}void 0!==o&&_(o),C&&C(o)}},K=function(e){var i=e.which||e.keyCode;-1!==[101,69,45,46,43,190,229].indexOf(i)&&e.preventDefault()},Z=function(e){if(13===e.keyCode){var i=parseInt(I&&I.toString()||"0");0===i&&A(i=1),i>Number(B)&&(i=Number(B),A(i)),S&&S(i,I),_(i),C&&C(i)}},$=function(e){A(e.target.value)},G=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"total-num"},{children:["共",d,"条"]}),void 0)}),[d]),J=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:Boolean(O)?"page-line-memo page-line-memo-expand":"page-line-memo"},{children:[(0,e.jsx)("span",{children:"每页行数"},void 0),(0,e.jsxs)("div",v({className:"select-page",onClick:H},{children:[(0,e.jsx)("span",{children:N},void 0),(0,e.jsx)(x(),{},void 0)]}),void 0),(0,e.jsx)(o.Popover,v({open:Boolean(O),anchorEl:O,onClose:U,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:w["page-line-memo-popover"]},{children:m.map((function(i,r){return(0,e.jsx)("div",v({onClick:(o=i,function(){U(),o!==N&&(P(o),k&&k(o))}),className:N===i?"select-page-line-item page-line-item":"page-line-item"},{children:i}),r);var o}))}),void 0)]}),void 0)}),[O,m,N]),Q=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"current-page"},{children:["当前第",(0,e.jsx)("span",v({className:"current-page-num"},{children:L}),void 0),(0,e.jsx)("span",v({className:"current-page-sign"},{children:"/"}),void 0),(0,e.jsx)("span",v({className:"current-page-last"},{children:B}),void 0),"页"]}),void 0)}),[L,B]),V=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"pagination-content"},{children:[(0,e.jsxs)("div",v({className:"left-page"},{children:[(0,e.jsx)(o.IconButton,v({size:"small",onClick:Y("first"),disabled:1===L},{children:(0,e.jsx)(a(),{},void 0)}),void 0),(0,e.jsx)(o.IconButton,v({size:"small",onClick:Y("prev"),disabled:1===L},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),void 0),(0,e.jsx)(r.Pagination,{count:B,page:L,onChange:Y("pagination")},void 0),(0,e.jsxs)("div",v({className:"right-page"},{children:[(0,e.jsx)(o.IconButton,v({size:"small",onClick:Y("next"),disabled:L===B},{children:(0,e.jsx)(f(),{},void 0)}),void 0),(0,e.jsx)(o.IconButton,v({size:"small",onClick:Y("last"),disabled:L===B},{children:(0,e.jsx)(s(),{},void 0)}),void 0)]}),void 0)]}),void 0)}),[d,L,B]),X=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"skip-page-memo"},{children:[(0,e.jsx)("span",{children:"跳转到"},void 0),(0,e.jsxs)("div",v({className:"skip-page-text"},{children:[(0,e.jsx)(o.TextField,{className:"skip-input",variant:"outlined",type:"number",value:I||"",onChange:$,onKeyDown:K,onKeyUp:Z},void 0),(0,e.jsx)("span",{children:"页"},void 0)]}),void 0)]}),void 0)}),[I]);return(0,e.jsxs)("div",v({className:(W=w.pagination,n&&(W+=" "+n),W)},{children:["complex"===p&&G,Q,J,V,"complex"===p&&X]}),void 0)};d.default=j}(),d}()}));
16
+ r(4126);var t=r(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;o=n("react.element"),n("react.fragment")}var a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function p(e,i,r){var t,n={},p=null,c=null;for(t in void 0!==r&&(p=""+r),void 0!==i.key&&(p=""+i.key),void 0!==i.ref&&(c=i.ref),i)l.call(i,t)&&!s.hasOwnProperty(t)&&(n[t]=i[t]);if(e&&e.defaultProps)for(t in i=e.defaultProps)void 0===n[t]&&(n[t]=i[t]);return{$$typeof:o,type:e,key:p,ref:c,props:n,_owner:a.current}}i.jsx=p,i.jsxs=p},7712:function(e,i,r){e.exports=r(9524)},853:function(e,i){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};i.Z=function(){return r}},1731:function(e){e.exports=r},8604:function(e){e.exports=t},4508:function(e){e.exports=i},7428:function(e){e.exports=o},934:function(e){e.exports=n},6028:function(e){e.exports=s},1127:function(e){e.exports=a},6288:function(e){e.exports=l},9297:function(i){i.exports=e}},c={};function u(e){var i=c[e];if(void 0!==i)return i.exports;var r=c[e]={exports:{}};return p[e](r,r.exports,u),r.exports}u.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(i,{a:i}),i},u.d=function(e,i){for(var r in i)u.o(i,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},u.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){u.r(d),u.d(d,{Pagination:function(){return j}});var e=u(7712),i=u(9297),r=u(4508),t=u(1731),o=u(8604),n=u(7428),a=u.n(n),l=u(934),s=u.n(l),p=u(1127),c=u.n(p),g=u(6288),f=u.n(g),m=u(6028),x=u.n(m),h=u(853),v=function(){return v=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++)for(var o in i=arguments[r])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},v.apply(this,arguments)},b=(0,h.Z)(),y=(0,o.makeStyles)((function(){return(0,o.createStyles)({pagination:{color:b.textColor.secondary,fontSize:b.fontSize,fontFamily:b.fontFamily.zh,"& > div":{display:"inline-block",verticalAlign:"middle"},"& > .total-num":{marginRight:"20px"},"& > .page-line-memo":{cursor:"pointer",marginRight:"20px","& > span":{marginRight:"10px"},"& > .select-page":{display:"inline-block",boxShadow:b.boxShadow,paddingLeft:"10px",borderRadius:b.borderRadius,height:"24px",lineHeight:"24px","& > span":{color:b.textColor.primary,marginRight:"10px"},"& > svg":{fontSize:"12px",marginRight:"5px",color:b.textColor.thirdary,position:"relative",top:"1px",transition:"all .3s"}},"&.page-line-memo-expand":{"& > .select-page":{"& > svg":{transform:"rotate(180deg)",color:b.thmemColor.primary}}}},"& > .current-page":{marginRight:"20px","& > .current-page-num":{color:b.textColor.primary,marginRight:"4px",marginLeft:"4px"},"& > .current-page-sign":{marginRight:"3px"}},"& > .pagination-content":{boxShadow:b.boxShadow,borderRadius:b.borderRadius,height:"24px",lineHeight:"24px","& > .left-page,& > .right-page":{display:"inline-block",padding:"0 10px","& > button":{borderRadius:b.borderRadius,padding:"2px",verticalAlign:"top",marginTop:"4px","&:hover":{backgroundColor:b.bgBorderColor.bg2,"& svg":{color:b.thmemColor.primary}},"& svg":{fontSize:"12px",color:b.textColor.secondary}}},"& > .left-page":{"& > button":{marginRight:"10px"}},"& > nav":{display:"inline-block","& > ul":{"& > li":{marginRight:"10px","& > button":{height:"16px",minWidth:"16px",fontSize:"12px",borderRadius:b.borderRadius,padding:"2px",margin:"0",verticalAlign:"top",marginTop:"4px","&.Mui-selected":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary},"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"&:first-child":{display:"none"},"&:last-child":{display:"none"},"& > div":{display:"inline-block",verticalAlign:"top",marginTop:"3px"}}}},"& > .right-page":{paddingLeft:"0px","& > button":{marginLeft:"10px"}}},"& > .skip-page-memo":{marginLeft:"20px","& > .skip-page-text":{display:"inline-block",marginLeft:"10px",boxShadow:b.boxShadow,borderRadius:b.borderRadius,height:"24px",lineHeight:"24px",paddingRight:"6px",paddingLeft:"10px","& > .skip-input":{height:"100%","& > div":{height:"100%","& > div":{height:"100%"}},"& input":{padding:"0",width:"22px",fontSize:b.fontSize,color:b.textColor.primary,height:"24px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{appearance:"none"}},"& fieldset":{border:"0"}}}}},"page-line-memo-popover":{"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginTop:"5px",minWidth:"60px",textAlign:"center",fontSize:"12px","& > div":{height:"30px",lineHeight:"30px",cursor:"pointer"},"& > .page-line-item":{color:b.textColor.secondary,"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"& > .select-page-line-item":{color:b.thmemColor.primary}}}})})),j=function(o){var n=o.className,l=o.type,p=void 0===l?"simple":l,u=o.total,d=void 0===u?0:u,g=o.rowsPerPage,m=void 0===g?[10,20,30]:g,h=o.currentRowsPerPage,b=void 0===h?10:h,j=o.page,F=void 0===j?1:j,S=o.skipFunc,C=o.changePage,k=o.changeRowsPerPage,R=y(o),w=(0,i.useState)(null),O=w[0],D=w[1],E=(0,i.useState)(b),N=E[0],P=E[1],z=(0,i.useState)(F),L=z[0],_=z[1],q=(0,i.useState)(),B=q[0],M=q[1],T=(0,i.useState)(),I=T[0],A=T[1];(0,i.useEffect)((function(){b!==N&&P(b)}),[b]),(0,i.useEffect)((function(){F!==L&&_(F)}),[F]),(0,i.useEffect)((function(){var e=Number(B);L>e&&e!==L&&_(e)}),[L,B]),(0,i.useEffect)((function(){var e=Math.ceil(d/N);M(e||1)}),[N,d]);var W,H=function(e){D(e.currentTarget)},U=function(){D(null)},Y=function(e){return function(i,r){var t=L;switch(e){case"first":t=1;break;case"prev":t--;break;case"last":t=B;break;case"next":t++;break;case"pagination":t=r}void 0!==t&&_(t),C&&C(t)}},K=function(e){-1!==["E","e",".","-"].indexOf(e.key)&&e.preventDefault()},Z=function(e){if(13===e.keyCode){var i=parseInt(I&&I.toString()||"0");i<=0&&A(i=1),i>Number(B)&&(i=Number(B),A(i)),S&&S(i,I),_(i),C&&C(i)}},$=function(e){A(e.target.value)},G=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"total-num"},{children:["共",d,"条"]}),void 0)}),[d]),J=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:Boolean(O)?"page-line-memo page-line-memo-expand":"page-line-memo"},{children:[(0,e.jsx)("span",{children:"每页行数"},void 0),(0,e.jsxs)("div",v({className:"select-page",onClick:H},{children:[(0,e.jsx)("span",{children:N},void 0),(0,e.jsx)(x(),{},void 0)]}),void 0),(0,e.jsx)(t.Popover,v({open:Boolean(O),anchorEl:O,onClose:U,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:R["page-line-memo-popover"]},{children:m.map((function(i,r){return(0,e.jsx)("div",v({onClick:(t=i,function(){U(),t!==N&&(P(t),k&&k(t))}),className:N===i?"select-page-line-item page-line-item":"page-line-item"},{children:i}),r);var t}))}),void 0)]}),void 0)}),[O,m,N]),Q=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"current-page"},{children:["当前第",(0,e.jsx)("span",v({className:"current-page-num"},{children:L}),void 0),(0,e.jsx)("span",v({className:"current-page-sign"},{children:"/"}),void 0),(0,e.jsx)("span",v({className:"current-page-last"},{children:B}),void 0),"页"]}),void 0)}),[L,B]),V=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"pagination-content"},{children:[(0,e.jsxs)("div",v({className:"left-page"},{children:[(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("first"),disabled:1===L},{children:(0,e.jsx)(a(),{},void 0)}),void 0),(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("prev"),disabled:1===L},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),void 0),(0,e.jsx)(r.Pagination,{count:B,page:L,onChange:Y("pagination")},void 0),(0,e.jsxs)("div",v({className:"right-page"},{children:[(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("next"),disabled:L===B},{children:(0,e.jsx)(f(),{},void 0)}),void 0),(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("last"),disabled:L===B},{children:(0,e.jsx)(s(),{},void 0)}),void 0)]}),void 0)]}),void 0)}),[d,L,B]),X=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"skip-page-memo"},{children:[(0,e.jsx)("span",{children:"跳转到"},void 0),(0,e.jsxs)("div",v({className:"skip-page-text"},{children:[(0,e.jsx)(t.TextField,{className:"skip-input",variant:"outlined",type:"number",value:I||"",onChange:$,onKeyDown:K,onKeyUp:Z},void 0),(0,e.jsx)("span",{children:"页"},void 0)]}),void 0)]}),void 0)}),[I,B]);return(0,e.jsxs)("div",v({className:(W=R.pagination,n&&(W+=" "+n),W)},{children:["complex"===p&&G,Q,J,V,"complex"===p&&X]}),void 0)};d.default=j}(),d}()}));
package/Radio/index.d.ts CHANGED
@@ -3,11 +3,11 @@
3
3
  * @date 2021/8/4 10:20
4
4
  * @description 单选框
5
5
  */
6
- import { FunctionComponent } from 'react';
6
+ import { FunctionComponent, ReactNode } from 'react';
7
7
  import { RadioProps } from '@material-ui/core';
8
8
  export interface RadioOptions extends Omit<RadioProps, 'size'> {
9
9
  /** 标题 */
10
- label?: string;
10
+ label?: ReactNode;
11
11
  /** 尺寸 */
12
12
  size?: 'small' | 'medium' | 'large';
13
13
  /** 标题的位置 */
@@ -13,4 +13,4 @@ var e=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,t=Object.pr
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- o(4126);var t=o(9297),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;i=n("react.element"),n("react.fragment")}var a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(r,e,o){var t,n={},s=null,d=null;for(t in void 0!==o&&(s=""+o),void 0!==e.key&&(s=""+e.key),void 0!==e.ref&&(d=e.ref),e)l.call(e,t)&&!c.hasOwnProperty(t)&&(n[t]=e[t]);if(r&&r.defaultProps)for(t in e=r.defaultProps)void 0===n[t]&&(n[t]=e[t]);return{$$typeof:i,type:r,key:s,ref:d,props:n,_owner:a.current}}e.jsx=s,e.jsxs=s},7712:function(r,e,o){r.exports=o(9524)},853:function(r,e){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};e.Z=function(){return o}},4286:function(r,e,o){o.d(e,{default:function(){return h}});var t=o(7712),i=o(9297),n=o(1731),a=o(8604),l=o(853),c=function(){return c=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},c.apply(this,arguments)},s={icon:{icon:(0,t.jsx)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:(0,t.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",fill:"currentColor"},void 0)}),void 0),iconDisabled:(0,t.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,t.jsx)("path",{d:"M512.213333 128.128a384 384 0 1 0 384 384 384 384 0 0 0-384-384z",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)},checkedIcon:{icon:(0,t.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,t.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",fill:"currentColor"},void 0)]}),void 0),iconDisabled:(0,t.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,t.jsx)("path",{d:"M512 128.170667a384 384 0 1 0 384 384 384.384 384.384 0 0 0-384-384z m0 617.728a233.728 233.728 0 1 1 233.728-233.728A233.770667 233.770667 0 0 1 512 745.728z",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",className:"line-round",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)}},d=function(){return d=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},d.apply(this,arguments)},p=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},u=(0,l.Z)(),f=(0,a.makeStyles)((function(){return(0,a.createStyles)({radio:{margin:"0","&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"& > span:first-child":{padding:"8px","& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.primary},"&.radio-checked":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.radio-disabled":{"&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1,"& > .line-round":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.thirdary}},cursor:"not-allowed","& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1+" !important","& > .line-round":{color:u.textColor.thirdary+" !important"}}}},"& > span:last-child":{color:u.textColor.secondary+" !important"}},"&.radio-small":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"12px"}}},"& > span:last-child":{fontSize:"12px",lineHeight:"12px"}},"&.radio-medium":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"14px"}}},"& > span:last-child":{fontSize:"14px",lineHeight:"14px"}},"&.radio-large":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"16px"}}},"& > span:last-child":{fontSize:"16px",lineHeight:"16px"}}}})})),h=function(r){var e=r.color,o=void 0===e?"primary":e,a=r.size,l=void 0===a?"small":a,c=r.label,u=void 0===c?"":c,h=r.labelPlacement,g=void 0===h?"end":h,m=(r.checkedIcon,r.icon,r.disabled),v=void 0!==m&&m,b=r.checked,x=void 0!==b&&b,y=r.onChange,F=r.className,j=void 0===F?"":F,O=p(r,["color","size","label","labelPlacement","checkedIcon","icon","disabled","checked","onChange","className"]),C=f(r),S=(0,i.useState)(!1),w=S[0],z=S[1];(0,i.useEffect)((function(){x!==w&&z(x)}),[x]);var E,k=function(r){return v?s[r].iconDisabled:s[r].icon},P=function(e,o){void 0===r.checked&&z(e.target.checked),y&&y(e,o)};return(0,t.jsx)(n.FormControlLabel,{className:(E=C.radio+" paraui-radio",j&&(E+=" "+j),l&&(E+=" radio-"+l),v&&(E+=" radio-disabled"),w&&(E+=" radio-checked"),E),control:(0,t.jsx)(n.Radio,d({size:"small",color:o,disabled:v,icon:k("icon"),checkedIcon:k("checkedIcon"),onChange:P,checked:w},O),void 0),label:u,labelPlacement:g},void 0)}},1731:function(r){r.exports=e},8604:function(r){r.exports=o},9297:function(e){e.exports=r}},i={};function n(r){var e=i[r];if(void 0!==e)return e.exports;var o=i[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,{a:e}),e},n.d=function(r,e){for(var o in e)n.o(e,o)&&!n.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},n.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var a={};return function(){n.r(a),n.d(a,{RadioGroup:function(){return p}});var r=n(9297),e=n(7712),o=n(1731),t=n(4286),i=n(8604),l=n(853),c=function(){return c=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},c.apply(this,arguments)},s=(0,l.Z)(),d=(0,i.makeStyles)((function(){return(0,i.createStyles)({"radio-group":{"& > label":{fontSize:"12px",color:s.textColor.secondary,"& > .required-char":{marginLeft:"3px",color:s.thmemColor.primary}},"& > div":{margin:"5px 0"},"& > p":{fontSize:"12px",lineHeight:"12px",margin:"0",color:s.stateColor.error},"&.radio-group-disabled":{},"&.radio-group-small":{},"&.radio-group-medium":{},"&.radio-group-large":{}}})})),p=function(i){var n,a=i.className,l=void 0===a?"":a,s=i.label,p=void 0===s?"":s,u=i.size,f=void 0===u?"small":u,h=i.row,g=void 0===h||h,m=i.disabled,v=void 0!==m&&m,b=i.required,x=void 0!==b&&b,y=i.error,F=void 0!==y&&y,j=i.helperText,O=void 0===j?"":j,C=i.id,S=void 0===C?"name":C,w=i.value,z=i.list,E=i.onChange,k=d(i),P=function(r){return function(){var e=r[S];E&&E(e)}};return(0,e.jsxs)(o.FormControl,c({className:(n=k["radio-group"]+" paraui-radio-group",l&&(n+=" "+l),f&&(n+=" radio-group-"+f),F&&(n+=" radio-group-error"),v&&(n+=" radio-group-disabled"),n)},{children:[(0,e.jsxs)(o.FormLabel,{children:[p,x&&(0,e.jsx)("span",c({className:"required-char"},{children:"(必填)"}),void 0)]},void 0),(0,e.jsx)(o.FormGroup,c({row:g},{children:z.map((function(e,o){return(0,r.createElement)(t.default,c({},e,{checked:w===e[S],size:f,disabled:Boolean(v||e.disabled),key:o,onChange:P(e)}))}))}),void 0),O&&(0,e.jsx)(o.FormHelperText,{children:O},void 0)]}),void 0)};a.default=p}(),a}()}));
16
+ o(4126);var t=o(9297),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;i=n("react.element"),n("react.fragment")}var a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(r,e,o){var t,n={},s=null,d=null;for(t in void 0!==o&&(s=""+o),void 0!==e.key&&(s=""+e.key),void 0!==e.ref&&(d=e.ref),e)l.call(e,t)&&!c.hasOwnProperty(t)&&(n[t]=e[t]);if(r&&r.defaultProps)for(t in e=r.defaultProps)void 0===n[t]&&(n[t]=e[t]);return{$$typeof:i,type:r,key:s,ref:d,props:n,_owner:a.current}}e.jsx=s,e.jsxs=s},7712:function(r,e,o){r.exports=o(9524)},853:function(r,e){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};e.Z=function(){return o}},4286:function(r,e,o){o.d(e,{default:function(){return h}});var t=o(7712),i=o(9297),n=o(1731),a=o(8604),l=o(853),c=function(){return c=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},c.apply(this,arguments)},s={icon:{icon:(0,t.jsx)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:(0,t.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",fill:"currentColor"},void 0)}),void 0),iconDisabled:(0,t.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,t.jsx)("path",{d:"M512.213333 128.128a384 384 0 1 0 384 384 384 384 0 0 0-384-384z",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)},checkedIcon:{icon:(0,t.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,t.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",fill:"currentColor"},void 0)]}),void 0),iconDisabled:(0,t.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,t.jsx)("path",{d:"M512 128.170667a384 384 0 1 0 384 384 384.384 384.384 0 0 0-384-384z m0 617.728a233.728 233.728 0 1 1 233.728-233.728A233.770667 233.770667 0 0 1 512 745.728z",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",className:"line-round",fill:"currentColor"},void 0),(0,t.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)}},d=function(){return d=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},d.apply(this,arguments)},p=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},u=(0,l.Z)(),f=(0,a.makeStyles)((function(){return(0,a.createStyles)({radio:{margin:"0","&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"& > span:first-child":{padding:"8px","& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.primary},"&.radio-checked":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.radio-disabled":{"&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1,"& > .line-round":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.thirdary}},cursor:"not-allowed","& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1+" !important","& > .line-round":{color:u.textColor.thirdary+" !important"}}}},"& > span:last-child":{color:u.textColor.secondary+" !important"}},"&.radio-small":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"12px"}}},"& > span:last-child":{fontSize:"12px",lineHeight:"12px"}},"&.radio-medium":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"14px"}}},"& > span:last-child":{fontSize:"14px",lineHeight:"14px"}},"&.radio-large":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"16px"}}},"& > span:last-child":{fontSize:"16px",lineHeight:"16px"}}}})})),h=function(r){var e=r.color,o=void 0===e?"primary":e,a=r.size,l=void 0===a?"small":a,c=r.label,u=void 0===c?"":c,h=r.labelPlacement,g=void 0===h?"end":h,m=(r.checkedIcon,r.icon,r.disabled),v=void 0!==m&&m,b=r.checked,y=void 0!==b&&b,x=r.onChange,F=r.className,j=void 0===F?"":F,O=p(r,["color","size","label","labelPlacement","checkedIcon","icon","disabled","checked","onChange","className"]),C=f(r),S=(0,i.useState)(!1),w=S[0],z=S[1];(0,i.useEffect)((function(){y!==w&&z(y)}),[y]);var E,k=function(r){return v?s[r].iconDisabled:s[r].icon},P=function(e,o){void 0===r.checked&&z(e.target.checked),x&&x(e,o)};return(0,t.jsx)(n.FormControlLabel,{className:(E=C.radio+" paraui-radio",j&&(E+=" "+j),l&&(E+=" radio-"+l),v&&(E+=" radio-disabled"),w&&(E+=" radio-checked"),E),control:(0,t.jsx)(n.Radio,d({size:"small",color:o,disabled:v,icon:k("icon"),checkedIcon:k("checkedIcon"),onChange:P,checked:w},O),void 0),label:u,labelPlacement:g},void 0)}},1731:function(r){r.exports=e},8604:function(r){r.exports=o},9297:function(e){e.exports=r}},i={};function n(r){var e=i[r];if(void 0!==e)return e.exports;var o=i[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,{a:e}),e},n.d=function(r,e){for(var o in e)n.o(e,o)&&!n.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},n.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var a={};return function(){n.r(a),n.d(a,{RadioGroup:function(){return p}});var r=n(9297),e=n(7712),o=n(1731),t=n(4286),i=n(8604),l=n(853),c=function(){return c=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},c.apply(this,arguments)},s=(0,l.Z)(),d=(0,i.makeStyles)((function(){return(0,i.createStyles)({"radio-group":{"& > label":{fontSize:"12px",color:s.textColor.secondary,"& > .required-char":{marginLeft:"3px",color:s.thmemColor.primary}},"& > div":{margin:"5px 0"},"& > p":{fontSize:"12px",lineHeight:"12px",margin:"0",color:s.stateColor.error},"&.radio-group-disabled":{},"&.radio-group-small":{},"&.radio-group-medium":{},"&.radio-group-large":{}}})})),p=function(i){var n,a=i.className,l=void 0===a?"":a,s=i.label,p=void 0===s?"":s,u=i.size,f=void 0===u?"small":u,h=i.row,g=void 0===h||h,m=i.disabled,v=void 0!==m&&m,b=i.required,y=void 0!==b&&b,x=i.error,F=void 0!==x&&x,j=i.helperText,O=void 0===j?"":j,C=i.id,S=void 0===C?"name":C,w=i.value,z=i.list,E=i.onChange,k=d(i),P=function(r){return function(){var e=r[S];E&&E(e)}};return(0,e.jsxs)(o.FormControl,c({className:(n=k["radio-group"]+" paraui-radio-group",l&&(n+=" "+l),f&&(n+=" radio-group-"+f),F&&(n+=" radio-group-error"),v&&(n+=" radio-group-disabled"),n)},{children:[(0,e.jsxs)(o.FormLabel,{children:[p,y&&(0,e.jsx)("span",c({className:"required-char"},{children:"(必填)"}),void 0)]},void 0),(0,e.jsx)(o.FormGroup,c({row:g},{children:z.map((function(e,o){var i={};return e&&Object.keys(e).forEach((function(r){i[r]=String(e[r])})),(0,r.createElement)(t.default,c({},i,{checked:w===e[S],size:f,disabled:Boolean(v||e.disabled),key:o,onChange:P(e)}))}))}),void 0),O&&(0,e.jsx)(o.FormHelperText,{children:O},void 0)]}),void 0)};a.default=p}(),a}()}));
package/Select/index.d.ts CHANGED
@@ -15,8 +15,8 @@ export interface SelectProps {
15
15
  label?: ReactNode;
16
16
  /** 提示语 */
17
17
  placeholder?: string;
18
- /** 是否禁用 */
19
- disabled?: boolean;
18
+ /** 是否禁用 true禁用,false不禁用 []禁用部分 */
19
+ disabled?: boolean | any[];
20
20
  /** 是否多选 */
21
21
  multiple?: boolean;
22
22
  /** 是否必填 */
package/Select/index.js CHANGED
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.pr
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- o(4126);var r=o(9297),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;i=n("react.element"),t.Fragment=n("react.fragment")}var l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,o){var r,n={},a=null,d=null;for(r in void 0!==o&&(a=""+o),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,r)&&!c.hasOwnProperty(r)&&(n[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===n[r]&&(n[r]=t[r]);return{$$typeof:i,type:e,key:a,ref:d,props:n,_owner:l.current}}t.jsx=a,t.jsxs=a},7712:function(e,t,o){e.exports=o(9524)},115:function(e,t,o){var r=o(7712),i=o(9297),n=o(1731),l=o(8604),s=o(853),c=function(){return c=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)},a=((0,s.Z)(),(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})})));t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,s=e.tips,d=void 0===s?"":s,p=e.className,u=void 0===p?"":p,h=(0,i.useRef)(),v=a(),f=(0,i.useState)(""),m=f[0],x=f[1];(0,i.useEffect)((function(){x(d)}),[d]);var g;return(0,r.jsx)("div",c({ref:function(e){e&&(h.current=e)},className:(g=v["auto-tips"],g+=" paraui-auto-tips",u&&(g+=" "+u),g),onMouseOver:function(){h.current.scrollWidth>h.current.offsetWidth?x(m||h.current.innerText):x("")}},{children:(0,r.jsx)(n.Tooltip,c({title:m,placement:l},{children:(0,r.jsx)("div",c({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},853:function(e,t){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return o}},1731:function(e){e.exports=t},8604:function(e){e.exports=l},6110:function(e){e.exports=i},19:function(e){e.exports=n},6028:function(e){e.exports=o},4115:function(e){e.exports=r},3475:function(e){e.exports=s},9297:function(t){t.exports=e}},a={};function d(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return c[e](o,o.exports,d),o.exports}d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var o in t)d.o(t,o)&&!d.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return function(){d.r(p),d.d(p,{Select:function(){return w}});var e=d(7712),t=d(9297),o=d(1731),r=d(6028),i=d.n(r),n=d(4115),l=d.n(n),s=d(6110),c=d.n(s),a=d(19),u=d.n(a),h=d(115),v=d(8604),f=d(853),m=d(3475),x=function(){return x=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},x.apply(this,arguments)},g=function(e,t,o){if(o||2===arguments.length)for(var r,i=0,n=t.length;i<n;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=(0,f.Z)(),b=(0,v.makeStyles)((function(){return(0,v.createStyles)({select:{"& *":{boxSizing:"border-box"},fontFamily:y.fontFamily.zh,display:"inline-block",fontSize:y.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& > .select-label":{color:y.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .select-content":{lineHeight:"0",border:"1px solid",borderColor:y.textColor.thirdary,borderRadius:y.borderRadius,paddingRight:"30px",position:"relative",cursor:"pointer","&:hover":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{color:y.thmemColor.primary}}},"& > .select-label-placeholder":{width:"100%",height:"100%",padding:"0 10px",boxSizing:"border-box",color:y.textColor.thirdary,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",position:"absolute",left:"0",top:"0"},"& > .select-svg":{position:"absolute",right:"8px",top:"0","& > svg":{fontSize:"16px",transition:"all .3s",color:y.textColor.secondary}},"& > .radio-select-content":{paddingLeft:"10px",color:y.textColor.primary,fontSize:"12px",lineHeight:"16px"},"& > .radio-search-outside":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",padding:"0 30px 0 10px",fontSize:"12px",cursor:"pointer","& > div":{height:"100%",cursor:"pointer","& > input":{height:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}},"& > .check-select-content":{paddingLeft:"10px",height:"100%",overflow:"hidden","& > .check-select-content-item":{display:"inline-block",backgroundColor:y.bgBorderColor.bg2,borderRadius:y.borderRadius,padding:"0 10px",color:y.textColor.primary,fontSize:"12px",marginRight:"10px",verticalAlign:"top",maxWidth:"100%",whiteSpace:"nowrap","&.check-select-content-item-more":{color:y.thmemColor.primary,cursor:"pointer","& > span":{maxWidth:"none"}},"& > span":{display:"inline-block",hieght:"100%",verticalAlign:"top",maxWidth:"calc(100% - 20px)",overflow:"hidden",textOverflow:"ellipsis"},"& > svg":{cursor:"pointer",marginLeft:"8px",color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"2px","&:hover":{color:y.thmemColor.primary}}},"& > .check-search-outside":{width:"10px",maxWidth:"100% !important",display:"none","& > div":{width:"100%","& > input":{width:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}}}},"& > .select-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.select-disabled":{"& > .select-content":{backgroundColor:y.bgBorderColor.bg2,cursor:"not-allowed","&:hover":{borderColor:y.textColor.thirdary,"& > .select-svg":{"& > svg":{color:y.textColor.secondary}}},"& > .check-select-content":{"& > .check-select-content-item":{backgroundColor:y.bgBorderColor.bg3,"& > span":{maxWidth:"none"}}}}},"&.select-error":{"& > .select-content":{borderColor:y.stateColor.error+"!important"},"& > .select-error-text":{color:y.stateColor.error+"!important"}},"&.select-multiple":{},"&.select-open":{"& > .select-content":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{transform:"rotate(180deg)",color:y.thmemColor.primary}},"& > .check-select-content":{"& > .check-search-outside":{display:"inline-block"}}}},"&.select-small":{"& > .select-content":{height:"28px","& > .select-label-placeholder":{lineHeight:"26px"},"& > .select-svg":{top:"5px"},"& > .radio-select-content":{paddingTop:"5px",paddingBottom:"5px"},"& > .radio-search-outside":{"& > div":{paddingTop:"5px",paddingBottom:"5px"}},"& > .check-select-content":{paddingBottom:"3px","& > .check-select-content-item":{marginTop:"3px",height:"20px",lineHeight:"20px"},"& > .check-search-outside":{marginTop:"3px","& input":{height:"20px"}}}}},"&.select-medium":{"& > .select-content":{height:"34px","& > .select-label-placeholder":{lineHeight:"32px"},"& > .select-svg":{top:"8px"},"& > .radio-select-content":{paddingTop:"8px",paddingBottom:"8px"},"& > .radio-search-outside":{"& > div":{paddingTop:"8px",paddingBottom:"8px"}},"& > .check-select-content":{paddingBottom:"4px","& > .check-select-content-item":{marginTop:"4px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"4px","& input":{height:"24px"}}}}},"&.select-large":{"& > .select-content":{height:"40px","& > .select-label-placeholder":{lineHeight:"38px"},"& > .select-svg":{top:"11px"},"& > .radio-select-content":{paddingTop:"11px",paddingBottom:"11px"},"& > .radio-search-outside":{"& > div":{paddingTop:"11px",paddingBottom:"11px"}},"& > .check-select-content":{paddingBottom:"7px","& > .check-select-content-item":{marginTop:"7px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"7px","& input":{height:"24px"}}}}},"&.select-over-line":{"&.select-small":{"& > .select-content":{height:"inherit",minHeight:"28px","& > .radio-select-content":{}}},"&.select-medium":{"& > .select-content":{height:"inherit",minHeight:"34px","& > .radio-select-content":{}}},"&.select-large":{"& > .select-content":{height:"inherit",minHeight:"40px","& > .radio-select-content":{}}}}},"select-popover":{"& *":{boxSizing:"border-box"},"& > div":{maxWidth:"none",padding:"0",backgroundColor:y.textColor.white,boxShadow:y.boxShadow,borderRadius:y.borderRadius,"& > span":{color:y.textColor.white},"& .select-popover-content":{maxHeight:"300px",overflow:"auto","& > .select-popover-search":{height:"30px",borderBottom:"1px solid "+y.bgBorderColor.bg3,padding:"0 10px",display:"flex","& > div":{width:"100%","& input":{padding:"0",height:"28px",fontSize:"12px",color:y.textColor.primary,"&::placeholder":{fontSize:"12px",color:y.textColor.thirdary,opacity:1}},"& fieldset":{display:"none"}},"& > svg":{color:y.thmemColor.primary,fontSize:"16px",marginTop:"7px",cursor:"pointer"}},"& > .select-popover-list":{"& .select-popover-list-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px","& > .select-popover-list-item-label":{width:"calc(100% - 25px)",color:y.textColor.secondary,fontSize:"12px"},"& > .select-popover-list-item-svg":{lineHeight:"0",display:"none","& > svg":{fontSize:"16px",color:y.thmemColor.primary}},"&.select-popover-list-item-select":{"& > .select-popover-list-item-label":{color:y.thmemColor.primary},"& > .select-popover-list-item-svg":{display:"inline-block"}},"&.select-popover-list-item-hover":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}},"&.select-popover-list-item-keydown":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}}},"& > .select-popover-list-group":{"& .select-popover-list-group-label":{display:"inline-block",width:"100%",padding:"7px 10px",color:y.textColor.thirdary,fontSize:"12px"},"& .select-popover-list-item":{padding:"7px 10px 7px 20px"}},"& > .select-nodata":{textAlign:"center",fontSize:"12px",color:y.textColor.primary,padding:"10px"}}}}},"select-more-popover":{"& *":{boxSizing:"border-box"},"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginLeft:"10px"},"& .select-more":{width:"200px",maxHeight:"300px",overflow:"auto","& > .select-more-title":{height:"30px",padding:"0 10px",color:y.textColor.secondary,borderBottom:"1px solid "+y.bgBorderColor.bg2,lineHeight:"30px",fontSize:"12px",display:"flex",justifyContent:"space-between"},"& > .select-more-content":{"& > .select-more-content-item":{padding:"7px 7px 7px 10px",display:"flex",justifyContent:"space-around","& > span":{width:"calc(100% - 25px)",display:"inline-block",fontSize:"12px"},"& > svg":{color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"1px",cursor:"pointer","&:hover":{color:y.thmemColor.primary}}}}}}})})),w=function(r){var n=r.className,s=r.size,a=void 0===s?"small":s,d=r.labelMode,p=void 0===d?"outside":d,v=r.placeholder,f=void 0===v?"":v,y=r.label,w=void 0===y?"":y,C=r.disabled,S=void 0!==C&&C,j=r.multiple,k=void 0!==j&&j,F=r.required,N=void 0!==F&&F,O=r.showLabelSign,E=void 0===O||O,T=r.labelSign,z=r.error,D=void 0!==z&&z,q=r.helperText,L=void 0===q?"":q,B=r.list,H=r.showName,M=void 0===H?"label":H,P=r.showValue,_=void 0===P?"value":P,W=r.childrenName,R=void 0===W?"children":W,A=r.value,I=r.onChange,U=r.overLine,K=void 0!==U&&U,Y=r.search,Z=void 0!==Y&&Y,$=r.searchModel,V=void 0===$?"inside":$,G=r.selectPopoverClassName,J=r.morePopoverClassName,Q=r.onEnter,X=b(r),ee=(0,t.useRef)(null),te=(0,t.useState)("select-"+(0,m.UUID)())[0],oe=(0,t.useState)("select-popover-"+(0,m.UUID)())[0],re=(0,t.useState)(!1),ie=re[0],ne=re[1],le=(0,t.useState)(!1),se=le[0],ce=le[1],ae=(0,t.useState)([]),de=ae[0],pe=ae[1],ue=(0,t.useState)([]),he=ue[0],ve=ue[1],fe=(0,t.useState)({}),me=fe[0],xe=fe[1],ge=(0,t.useState)(null),ye=ge[0],be=ge[1],we=(0,t.useState)({})[0],Ce=(0,t.useState)(!1),Se=Ce[0],je=Ce[1],ke=(0,t.useState)(""),Fe=ke[0],Ne=ke[1],Oe=(0,t.useState)(!1),Ee=Oe[0],Te=Oe[1],ze=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==A&&pe(k?(0,m.DeepClone)(A||[]):""===A?[]:[A])}),[A,k]),(0,t.useEffect)((function(){if(Z&&"outside"===V)return Te(!!k);Te(K)}),[K,Z,V,k]),(0,t.useEffect)((function(){for(var e={},t=0,o=B.length;t<o;t++){var r=B[t];if(r[R]&&r[R].length>0)for(var i=r[R],n=0,l=i.length;n<l;n++){var s=i[n];e[s[_]]=s}else e[r[_]]=r}xe(e)}),[B]),(0,t.useEffect)((function(){k&&(Ee||be(de.length))}),[Ee,k,de]),(0,t.useEffect)((function(){return Ee?be(de.length):(setTimeout((function(){Me(de.length)})),window.addEventListener("resize",Pe)),function(){window.removeEventListener("resize",Pe)}}),[de,Ee]),(0,t.useEffect)((function(){de&&de.length>0?ce(!0):(ce(!1),Z&&"outside"===V&&ce(""!==Fe))}),[Z,Fe,V,de]),(0,t.useEffect)((function(){clearTimeout(we.searchTimer),Z&&""!==Fe.trim()?we.searchTimer=setTimeout((function(){for(var e=[],t=(0,m.DeepClone)(B),o=0,r=t.length;o<r;o++){var i=t[o];if(i[R]&&i[R].length>0){for(var n=i[R],l=[],s=0,c=n.length;s<c;s++){var a=n[s];He(a)&&l.push(a)}l.length>0&&(i[R]=l,e.push(i))}else{He(i)&&e.push(i)}}ve(e)}),100):ve((0,m.DeepClone)(B))}),[Z,Fe,B]),(0,t.useEffect)((function(){return ie?setTimeout((function(){qe(),window.addEventListener("click",Be),window.addEventListener("keydown",Ve)})):(Ne(""),window.removeEventListener("click",Be),window.removeEventListener("keydown",Ve)),function(){window.removeEventListener("click",Be),window.removeEventListener("keydown",Ve)}}),[ie]),(0,t.useEffect)((function(){Fe&&ne(!0)}),[Fe]),(0,t.useEffect)((function(){k&&"outside"===V&&!S&&Ye(Fe)}),[Fe,k,S,V]);var De,qe=function(){var e=ze&&ze.current,t=e&&e.querySelector("input");t&&t.focus()},Le=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Be=function(e){Le(e.target,"."+oe)||ne(!1)},He=function(e){var t=!1;return-1!==e[M].indexOf(Fe)&&(t=!0),t},Me=function(e){if(null!==e&&0!==e){void 0===e&&(e=de.length);var t=document.querySelector("."+te+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;be(o),Me(o)}else de.length<=e&&Ae()}},Pe=function(){clearTimeout(we.timer),we.timer=setTimeout((function(){be(de.length),Me()}),100)},_e=function(){S||ne(!0)},We=function(){ne(!1)},Re=function(e){je(!0),ne(!1),e.stopPropagation()},Ae=function(){je(!1)},Ie=function(e,t){return function(o){var r=e[_];if(k){var i=de.indexOf(r);-1!==i?de.splice(i,1):de.push(r),I&&I(g([],de,!0),o),t&&Q&&Q(g([],de,!0)),qe()}else I&&I(r,o),t&&Q&&Q(r),We(),Ne("")}},Ue=function(e,t){return function(o){var r;e||((r={})[_]=t,e=r),Ie(e)(o),o.stopPropagation()}},Ke=function(e){Ne(e.target.value)},Ye=function(e){var t=ze&&ze.current,o=t&&t.querySelector("input");if(!o)return null;var r=window.getComputedStyle(o),i=r.fontFamily,n=function(e,t,o){var r=document.createElement("span");r.id="referenceSpan";var i={};i.width=r.offsetWidth,i.height=r.offsetHeight,r.style.visibility="hidden",r.style.fontSize=e,r.style.fontFamily=t,r.style.display="inline-block";var n=document.getElementById("referenceSpan");return n&&document.body.removeChild(n),document.body.appendChild(r),void 0!==r.textContent?r.textContent=o:r.innerText=o,i.width=parseFloat(window.getComputedStyle(r).width)-i.width,i.height=parseFloat(window.getComputedStyle(r).height)-i.height,document.body.removeChild(r),i}(r.fontSize,i,e),l=n.width;l<10&&(l=10),t.style.width=l+"px"},Ze=function(e){var t=e.selectDom,o=e.keyCode,r=e.currentKeydownDom,i=null,n="nextSibling",l=".select-popover-list > div",s=".select-popover-list-item";if(38===o&&(n="previousSibling",l=".select-popover-list > div:last-child",s=".select-popover-list-item:last-child"),r)if(i=r[n])-1!==i.className.indexOf("select-popover-list-group-label")&&((i=(i=r.parentNode)[n])||(i=t.querySelector(l)));else{var c=r.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(i=(i=r.parentNode)[n])||(i=t.querySelector(l))}else i=t.querySelector(l);if(i)if(-1!==i.className.indexOf("select-popover-list-group")){var a=i.querySelector(s);a&&(a.classList.add("select-popover-list-item-keydown"),$e(a,t))}else i.classList.add("select-popover-list-item-keydown"),$e(i,t)},$e=function(e,t){clearTimeout(we.scrollTimer);var o=t.clientHeight,r=e.offsetTop+e.clientHeight-o;we.scroll=!0,t.scrollTop=r>0?r:0,we.scrollTimer=setTimeout((function(){we.scroll=!1}),100)},Ve=function(e){var t=document.querySelector("."+oe);if(t){var o=t.querySelector(".select-popover-list-item-select"),r=t.querySelector(".select-popover-list-item-hover"),i=t.querySelector(".select-popover-list-item-keydown"),n=o;if(r&&(n=r),13===e.keyCode){var l=i||r;if(l){var s=l.dataset.val;Ie(me[s],!0)({target:i})}else Q&&Q(A)}i&&(n=i,i.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Ze({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n}),38===e.keyCode&&Ze({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n})}},Ge=function(e){if(!we.scroll){var t=Le(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+oe).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Je=function(e){var t=Le(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Qe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:"outside"===p&&(0,e.jsxs)("label",x({className:"select-label"},{children:[w,E&&(0,e.jsx)("span",x({className:"identification-label"},{children:T||(0,e.jsx)(e.Fragment,{children:N?"(必填)":""},void 0)}),void 0)]}),void 0)},void 0)}),[p,w,E,T,N]),Xe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!se&&(0,e.jsx)("span",x({className:"select-label-placeholder"},{children:"outside"===p?f:(0,e.jsxs)(e.Fragment,{children:[w||f,E&&(0,e.jsx)("span",x({className:"identification-label"},{children:T||(0,e.jsx)(e.Fragment,{children:N?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)},void 0)}),[se,p,f,w,E,T,N]),et=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!k&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",x({className:"radio-select-content"},{children:function(){if(""!==Fe)return null;var t=me[de[0]]&&me[de[0]][M]||de[0];return Ee?t:(0,e.jsx)(h.default,{children:t},void 0)}()}),void 0),Z&&"outside"===V&&!S&&(0,e.jsx)(o.TextField,{variant:"outlined",className:"radio-search-outside",value:Fe,onChange:Ke,ref:ze},void 0)]},void 0)},void 0)}),[k,se,Ee,me,de,M,Z,V,Fe,S]),tt=(0,t.useMemo)((function(){var t=function(e){return me[de[e]]&&me[de[e]][M]||de[e]};return(0,e.jsx)(e.Fragment,{children:k&&(0,e.jsxs)("div",x({className:"check-select-content"},{children:[de&&de.map((function(o,r){return null!==ye&&ye<=r?null:(0,e.jsxs)("div",x({className:"check-select-content-item"},{children:[(0,e.jsx)("span",{children:t(r)},void 0),!S&&(0,e.jsx)(u(),{onClick:Ue(me[de[r]],de[r])},void 0)]}),r)})),function(){if(null!==ye&&de.length>ye)return(0,e.jsx)("div",x({className:"check-select-content-item check-select-content-item-more",onClick:Re},{children:(0,e.jsxs)("span",{children:["+",de.length-ye]},void 0)}),void 0)}(),Z&&"outside"===V&&!S&&(0,e.jsx)(o.TextField,{variant:"outlined",className:"check-search-outside",value:Fe,onChange:Ke,ref:ze},void 0)]}),void 0)},void 0)}),[k,se,de,ye,me,S,I,Fe,Z,V]),ot=(0,t.useMemo)((function(){return(0,e.jsxs)("div",x({className:"select-content",onClick:_e,ref:ee},{children:[Xe,(0,e.jsx)("span",x({className:"select-svg"},{children:(0,e.jsx)(i(),{},void 0)}),void 0),et,tt]}),void 0)}),[ee,se,p,f,w,E,T,N,Ee,me,de,M,k,ye,S,I,Fe,V]),rt=(0,t.useMemo)((function(){return(0,e.jsx)("div",x({className:"select-popover-list"},{children:he&&he.length>0?(0,e.jsx)(e.Fragment,{children:he.map((function(t,o){if(t[R]&&t[R].length>0){var r=t[R];return(0,e.jsxs)("div",x({className:"select-popover-list-group"},{children:[(0,e.jsx)("span",x({className:"select-popover-list-group-label"},{children:t[M]}),void 0),r.map((function(t,o){var r=t[_],i="select-popover-list-item";return-1!==de.indexOf(r)&&(i+=" select-popover-list-item-select"),(0,e.jsxs)("div",x({onClick:Ie(t),className:i,onMouseEnter:Ge,onMouseLeave:Je,"data-val":r},{children:[(0,e.jsx)("span",x({className:"select-popover-list-item-label"},{children:(0,e.jsx)(h.default,{children:t[M]},void 0)}),void 0),(0,e.jsx)("span",x({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))]}),o)}var i=t[_],n="select-popover-list-item";return-1!==de.indexOf(i)&&(n+=" select-popover-list-item-select"),(0,e.jsxs)("div",x({onClick:Ie(t),className:n,onMouseEnter:Ge,onMouseLeave:Je,"data-val":i},{children:[(0,e.jsx)("span",x({className:"select-popover-list-item-label"},{children:(0,e.jsx)(h.default,{children:t[M]},void 0)}),void 0),(0,e.jsx)("span",x({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))},void 0):(0,e.jsx)("div",x({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[he,M,_,de,I]),it=(0,t.useMemo)((function(){var t="select-popover-content "+oe;return(0,e.jsxs)("div",x({style:{width:(ee&&ee.current?ee.current.offsetWidth:0)+"px"},className:t},{children:[Z&&"inside"===V&&(0,e.jsxs)("div",x({className:"select-popover-search"},{children:[(0,e.jsx)(o.TextField,{variant:"outlined",placeholder:"请输入搜索名",value:Fe,onChange:Ke,ref:ze},void 0),(0,e.jsx)(l(),{},void 0)]}),void 0),rt]}),void 0)}),[ie,ee,he,R,_,M,de,Fe,Z,oe,V]),nt=(0,t.useMemo)((function(){var t,r=function(e){return me[de[e]]&&me[de[e]][M]||de[e]};return(0,e.jsx)(o.Popover,x({open:Se,anchorEl:ee&&ee.current,onClose:Ae,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(t=X["select-more-popover"],J&&(t+=" "+J),t)},{children:(0,e.jsxs)("div",x({className:"select-more"},{children:[(0,e.jsxs)("div",x({className:"select-more-title"},{children:[(0,e.jsx)("span",{children:"已选中"},void 0),(0,e.jsx)("span",{children:de.length-Number(ye)},void 0)]}),void 0),(0,e.jsx)("div",x({className:"select-more-content"},{children:de&&de.map((function(t,o){return null!==ye&&ye>o?null:(0,e.jsxs)("div",x({className:"select-more-content-item"},{children:[(0,e.jsx)("span",{children:(0,e.jsx)(h.default,{children:r(o)},void 0)},void 0),!S&&(0,e.jsx)(u(),{onClick:Ue(me[de[o]],de[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[Se,de,ye,me,S,M,J]);return(0,e.jsxs)("div",x({className:(De=X.select,De+=" select",k&&!Ee&&(De+=" "+te),n&&(De+=" "+n),a&&(De+=" select-"+a),D&&(De+=" select-error"),S&&(De+=" select-disabled"),ie&&(De+=" select-open"),k&&(De+=" select-multiple"),Ee&&(De+=" select-over-line"),De)},{children:[Qe,(0,e.jsx)(o.Tooltip,x({open:ie,title:it,onClose:We,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e=X["select-popover"];return G&&(e+=" "+G),e}()},placement:"bottom-start"},{children:ot}),void 0),L&&(0,e.jsx)("p",x({className:"select-error-text"},{children:L}),void 0),nt]}),void 0)};p.default=w}(),p}()}));
16
+ o(4126);var r=o(9297),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;i=n("react.element"),t.Fragment=n("react.fragment")}var l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,o){var r,n={},a=null,d=null;for(r in void 0!==o&&(a=""+o),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,r)&&!c.hasOwnProperty(r)&&(n[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===n[r]&&(n[r]=t[r]);return{$$typeof:i,type:e,key:a,ref:d,props:n,_owner:l.current}}t.jsx=a,t.jsxs=a},7712:function(e,t,o){e.exports=o(9524)},115:function(e,t,o){var r=o(7712),i=o(9297),n=o(1731),l=o(8604),s=o(853),c=function(){return c=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)},a=((0,s.Z)(),(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})})));t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,s=e.tips,d=void 0===s?"":s,p=e.className,u=void 0===p?"":p,h=(0,i.useRef)(),v=a(),f=(0,i.useState)(""),m=f[0],x=f[1];(0,i.useEffect)((function(){x(d)}),[d]);var g;return(0,r.jsx)("div",c({ref:function(e){e&&(h.current=e)},className:(g=v["auto-tips"],g+=" paraui-auto-tips",u&&(g+=" "+u),g),onMouseOver:function(){h.current.scrollWidth>h.current.offsetWidth?x(m||h.current.innerText):x("")}},{children:(0,r.jsx)(n.Tooltip,c({title:m,placement:l},{children:(0,r.jsx)("div",c({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},853:function(e,t){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return o}},1731:function(e){e.exports=t},8604:function(e){e.exports=l},6110:function(e){e.exports=i},19:function(e){e.exports=n},6028:function(e){e.exports=o},4115:function(e){e.exports=r},3475:function(e){e.exports=s},9297:function(t){t.exports=e}},a={};function d(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return c[e](o,o.exports,d),o.exports}d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var o in t)d.o(t,o)&&!d.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return function(){d.r(p),d.d(p,{Select:function(){return C}});var e=d(7712),t=d(9297),o=d(1731),r=d(6028),i=d.n(r),n=d(4115),l=d.n(n),s=d(6110),c=d.n(s),a=d(19),u=d.n(a),h=d(115),v=d(8604),f=d(853),m=d(3475),x=function(){return x=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},x.apply(this,arguments)},g=function(e,t,o){if(o||2===arguments.length)for(var r,i=0,n=t.length;i<n;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=(0,f.Z)(),b=(0,v.makeStyles)((function(){return(0,v.createStyles)({select:{"& *":{boxSizing:"border-box"},fontFamily:y.fontFamily.zh,display:"inline-block",fontSize:y.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& > .select-label":{color:y.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .select-content":{lineHeight:"0",border:"1px solid",borderColor:y.textColor.thirdary,borderRadius:y.borderRadius,paddingRight:"30px",position:"relative",cursor:"pointer","&:hover":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{color:y.thmemColor.primary}}},"& > .select-label-placeholder":{width:"100%",height:"100%",padding:"0 10px",boxSizing:"border-box",color:y.textColor.thirdary,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",position:"absolute",left:"0",top:"0"},"& > .select-svg":{position:"absolute",right:"8px",top:"0","& > svg":{fontSize:"16px",transition:"all .3s",color:y.textColor.secondary}},"& > .radio-select-content":{paddingLeft:"10px",color:y.textColor.primary,fontSize:"12px",lineHeight:"16px"},"& > .radio-search-outside":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",padding:"0 30px 0 10px",fontSize:"12px",cursor:"pointer","& > div":{height:"100%",cursor:"pointer","& > input":{height:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}},"& > .check-select-content":{paddingLeft:"10px",height:"100%",overflow:"hidden","& > .check-select-content-item":{display:"inline-block",backgroundColor:y.bgBorderColor.bg2,borderRadius:y.borderRadius,padding:"0 10px",color:y.textColor.primary,fontSize:"12px",marginRight:"10px",verticalAlign:"top",maxWidth:"100%",whiteSpace:"nowrap","&.check-select-content-item-more":{color:y.thmemColor.primary,cursor:"pointer","& > span":{maxWidth:"none"}},"& > span":{display:"inline-block",hieght:"100%",verticalAlign:"top",maxWidth:"calc(100% - 20px)",overflow:"hidden",textOverflow:"ellipsis"},"& > svg":{cursor:"pointer",marginLeft:"8px",color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"2px","&:hover":{color:y.thmemColor.primary}},"&.check-select-content-item-noclose":{"& > span":{maxWidth:"none"}}},"& > .check-search-outside":{width:"10px",maxWidth:"100% !important",display:"none","& > div":{width:"100%","& > input":{width:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}}}},"& > .select-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.select-disabled":{"& > .select-content":{backgroundColor:y.bgBorderColor.bg2,cursor:"not-allowed","&:hover":{borderColor:y.textColor.thirdary,"& > .select-svg":{"& > svg":{color:y.textColor.secondary}}},"& > .check-select-content":{"& > .check-select-content-item":{backgroundColor:y.bgBorderColor.bg3,"& > span":{maxWidth:"none"}}}}},"&.select-error":{"& > .select-content":{borderColor:y.stateColor.error+"!important"},"& > .select-error-text":{color:y.stateColor.error+"!important"}},"&.select-multiple":{},"&.select-open":{"& > .select-content":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{transform:"rotate(180deg)",color:y.thmemColor.primary}},"& > .check-select-content":{"& > .check-search-outside":{display:"inline-block"}}}},"&.select-small":{"& > .select-content":{height:"28px","& > .select-label-placeholder":{lineHeight:"26px"},"& > .select-svg":{top:"5px"},"& > .radio-select-content":{paddingTop:"5px",paddingBottom:"5px"},"& > .radio-search-outside":{"& > div":{paddingTop:"5px",paddingBottom:"5px"}},"& > .check-select-content":{paddingBottom:"3px","& > .check-select-content-item":{marginTop:"3px",height:"20px",lineHeight:"20px"},"& > .check-search-outside":{marginTop:"3px","& input":{height:"20px"}}}}},"&.select-medium":{"& > .select-content":{height:"34px","& > .select-label-placeholder":{lineHeight:"32px"},"& > .select-svg":{top:"8px"},"& > .radio-select-content":{paddingTop:"8px",paddingBottom:"8px"},"& > .radio-search-outside":{"& > div":{paddingTop:"8px",paddingBottom:"8px"}},"& > .check-select-content":{paddingBottom:"4px","& > .check-select-content-item":{marginTop:"4px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"4px","& input":{height:"24px"}}}}},"&.select-large":{"& > .select-content":{height:"40px","& > .select-label-placeholder":{lineHeight:"38px"},"& > .select-svg":{top:"11px"},"& > .radio-select-content":{paddingTop:"11px",paddingBottom:"11px"},"& > .radio-search-outside":{"& > div":{paddingTop:"11px",paddingBottom:"11px"}},"& > .check-select-content":{paddingBottom:"7px","& > .check-select-content-item":{marginTop:"7px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"7px","& input":{height:"24px"}}}}},"&.select-over-line":{"&.select-small":{"& > .select-content":{height:"inherit",minHeight:"28px","& > .radio-select-content":{}}},"&.select-medium":{"& > .select-content":{height:"inherit",minHeight:"34px","& > .radio-select-content":{}}},"&.select-large":{"& > .select-content":{height:"inherit",minHeight:"40px","& > .radio-select-content":{}}}}},"select-popover":{"& *":{boxSizing:"border-box"},"& > div":{maxWidth:"none",padding:"0",backgroundColor:y.textColor.white,boxShadow:y.boxShadow,borderRadius:y.borderRadius,"& > span":{color:y.textColor.white},"& .select-popover-content":{maxHeight:"300px",overflow:"auto","& > .select-popover-search":{height:"30px",borderBottom:"1px solid "+y.bgBorderColor.bg3,padding:"0 10px",display:"flex","& > div":{width:"100%","& input":{padding:"0",height:"28px",fontSize:"12px",color:y.textColor.primary,"&::placeholder":{fontSize:"12px",color:y.textColor.thirdary,opacity:1}},"& fieldset":{display:"none"}},"& > svg":{color:y.thmemColor.primary,fontSize:"16px",marginTop:"7px",cursor:"pointer"}},"& > .select-popover-list":{"& .select-popover-list-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px","& > .select-popover-list-item-label":{width:"calc(100% - 25px)",color:y.textColor.secondary,fontSize:"12px"},"& > .select-popover-list-item-svg":{lineHeight:"0",display:"none","& > svg":{fontSize:"16px",color:y.thmemColor.primary}},"&.select-popover-list-item-select":{"& > .select-popover-list-item-label":{color:y.thmemColor.primary},"& > .select-popover-list-item-svg":{display:"inline-block"}},"&.select-popover-list-item-disabled":{backgroundColor:y.bgBorderColor.bg3+" !important",cursor:"not-allowed","&:hover":{backgroundColor:y.bgBorderColor.bg3+" !important"},"& > .select-popover-list-item-label":{color:y.textColor.secondary+" !important"},"& > .select-popover-list-item-svg":{"& > svg":{color:y.textColor.secondary+" !important"}}},"&.select-popover-list-item-hover":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}},"&.select-popover-list-item-keydown":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}}},"& > .select-popover-list-group":{"& .select-popover-list-group-label":{display:"inline-block",width:"100%",padding:"7px 10px",color:y.textColor.thirdary,fontSize:"12px"},"& .select-popover-list-item":{padding:"7px 10px 7px 20px"}},"& > .select-nodata":{textAlign:"center",fontSize:"12px",color:y.textColor.primary,padding:"10px"}}}}},"select-more-popover":{"& *":{boxSizing:"border-box"},"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginLeft:"10px"},"& .select-more":{width:"200px",maxHeight:"300px",overflow:"auto","& > .select-more-title":{height:"30px",padding:"0 10px",color:y.textColor.secondary,borderBottom:"1px solid "+y.bgBorderColor.bg2,lineHeight:"30px",fontSize:"12px",display:"flex",justifyContent:"space-between"},"& > .select-more-content":{"& > .select-more-content-item":{padding:"7px 7px 7px 10px",display:"flex",justifyContent:"space-between","& > span":{width:"calc(100% - 25px)",display:"inline-block",fontSize:"12px"},"& > svg":{color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"1px",cursor:"pointer","&:hover":{color:y.thmemColor.primary}}}}}}})})),C=function(r){var n=r.className,s=r.size,a=void 0===s?"small":s,d=r.labelMode,p=void 0===d?"outside":d,v=r.placeholder,f=void 0===v?"":v,y=r.label,C=void 0===y?"":y,w=r.disabled,S=void 0!==w&&w,j=r.multiple,k=void 0!==j&&j,F=r.required,O=void 0!==F&&F,N=r.showLabelSign,E=void 0===N||N,T=r.labelSign,z=r.error,D=void 0!==z&&z,q=r.helperText,B=void 0===q?"":q,L=r.list,H=r.showName,M=void 0===H?"label":H,P=r.showValue,_=void 0===P?"value":P,W=r.childrenName,R=void 0===W?"children":W,A=r.value,I=r.onChange,U=r.overLine,K=void 0!==U&&U,Y=r.search,Z=void 0!==Y&&Y,$=r.searchModel,V=void 0===$?"inside":$,G=r.selectPopoverClassName,J=r.morePopoverClassName,Q=r.onEnter,X=b(r),ee=(0,t.useRef)(null),te=(0,t.useState)("select-"+(0,m.UUID)())[0],oe=(0,t.useState)("select-popover-"+(0,m.UUID)())[0],re=(0,t.useState)(!1),ie=re[0],ne=re[1],le=(0,t.useState)(!1),se=le[0],ce=le[1],ae=(0,t.useState)([]),de=ae[0],pe=ae[1],ue=(0,t.useState)([]),he=ue[0],ve=ue[1],fe=(0,t.useState)({}),me=fe[0],xe=fe[1],ge=(0,t.useState)(null),ye=ge[0],be=ge[1],Ce=(0,t.useState)({})[0],we=(0,t.useState)(!1),Se=we[0],je=we[1],ke=(0,t.useState)(""),Fe=ke[0],Oe=ke[1],Ne=(0,t.useState)(!1),Ee=Ne[0],Te=Ne[1],ze=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==A&&pe(k?(0,m.DeepClone)(A||[]):""===A?[]:[A])}),[A,k]),(0,t.useEffect)((function(){if(Z&&"outside"===V)return Te(!!k);Te(K)}),[K,Z,V,k]),(0,t.useEffect)((function(){for(var e={},t=0,o=L.length;t<o;t++){var r=L[t];if(r[R]&&r[R].length>0)for(var i=r[R],n=0,l=i.length;n<l;n++){var s=i[n];e[s[_]]=s}else e[r[_]]=r}xe(e)}),[L]),(0,t.useEffect)((function(){k&&(Ee||be(de.length))}),[Ee,k,de]),(0,t.useEffect)((function(){return Ee?be(de.length):(setTimeout((function(){Me(de.length)})),window.addEventListener("resize",Pe)),function(){window.removeEventListener("resize",Pe)}}),[de,Ee]),(0,t.useEffect)((function(){de&&de.length>0?ce(!0):(ce(!1),Z&&"outside"===V&&ce(""!==Fe))}),[Z,Fe,V,de]),(0,t.useEffect)((function(){clearTimeout(Ce.searchTimer),Z&&""!==Fe.trim()?Ce.searchTimer=setTimeout((function(){for(var e=[],t=(0,m.DeepClone)(L),o=0,r=t.length;o<r;o++){var i=t[o];if(i[R]&&i[R].length>0){for(var n=i[R],l=[],s=0,c=n.length;s<c;s++){var a=n[s];He(a)&&l.push(a)}l.length>0&&(i[R]=l,e.push(i))}else{He(i)&&e.push(i)}}ve(e)}),100):ve((0,m.DeepClone)(L))}),[Z,Fe,L]),(0,t.useEffect)((function(){return ie?setTimeout((function(){qe(),window.addEventListener("click",Le),window.addEventListener("keydown",Ve)})):(Oe(""),window.removeEventListener("click",Le),window.removeEventListener("keydown",Ve)),function(){window.removeEventListener("click",Le),window.removeEventListener("keydown",Ve)}}),[ie]),(0,t.useEffect)((function(){Fe&&ne(!0)}),[Fe]),(0,t.useEffect)((function(){k&&"outside"===V&&!1===S&&Ye(Fe)}),[Fe,k,S,V]);var De,qe=function(){var e=ze&&ze.current,t=e&&e.querySelector("input");t&&t.focus()},Be=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Le=function(e){Be(e.target,"."+oe)||ne(!1)},He=function(e){var t=!1;return-1!==e[M].indexOf(Fe)&&(t=!0),t},Me=function(e){if(null!==e&&0!==e){void 0===e&&(e=de.length);var t=document.querySelector("."+te+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;be(o),Me(o)}else de.length<=e&&Ae()}},Pe=function(){clearTimeout(Ce.timer),Ce.timer=setTimeout((function(){be(de.length),Me()}),100)},_e=function(){!0!==S&&ne(!0)},We=function(){ne(!1)},Re=function(e){je(!0),ne(!1),e.stopPropagation()},Ae=function(){je(!1)},Ie=function(e,t){return function(o){var r=e[_];if("object"!=typeof S||-1===S.indexOf(r))if(k){var i=de.indexOf(r);-1!==i?de.splice(i,1):de.push(r),I&&I(g([],de,!0),o),t&&Q&&Q(g([],de,!0)),qe()}else I&&I(r,o),t&&Q&&Q(r),We(),Oe("")}},Ue=function(e,t){return function(o){var r;e||((r={})[_]=t,e=r),Ie(e)(o),o.stopPropagation()}},Ke=function(e){Oe(e.target.value)},Ye=function(e){var t=ze&&ze.current,o=t&&t.querySelector("input");if(!o)return null;var r=window.getComputedStyle(o),i=r.fontFamily,n=function(e,t,o){var r=document.createElement("span");r.id="referenceSpan";var i={};i.width=r.offsetWidth,i.height=r.offsetHeight,r.style.visibility="hidden",r.style.fontSize=e,r.style.fontFamily=t,r.style.display="inline-block";var n=document.getElementById("referenceSpan");return n&&document.body.removeChild(n),document.body.appendChild(r),void 0!==r.textContent?r.textContent=o:r.innerText=o,i.width=parseFloat(window.getComputedStyle(r).width)-i.width,i.height=parseFloat(window.getComputedStyle(r).height)-i.height,document.body.removeChild(r),i}(r.fontSize,i,e),l=n.width;l<10&&(l=10),t.style.width=l+"px"},Ze=function(e){var t=e.selectDom,o=e.keyCode,r=e.currentKeydownDom,i=null,n="nextSibling",l=".select-popover-list > div",s=".select-popover-list-item";if(38===o&&(n="previousSibling",l=".select-popover-list > div:last-child",s=".select-popover-list-item:last-child"),r)if(i=r[n])-1!==i.className.indexOf("select-popover-list-group-label")&&((i=(i=r.parentNode)[n])||(i=t.querySelector(l)));else{var c=r.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(i=(i=r.parentNode)[n])||(i=t.querySelector(l))}else i=t.querySelector(l);if(i)if(-1!==i.className.indexOf("select-popover-list-group")){var a=i.querySelector(s);a&&(a.classList.add("select-popover-list-item-keydown"),$e(a,t))}else i.classList.add("select-popover-list-item-keydown"),$e(i,t)},$e=function(e,t){clearTimeout(Ce.scrollTimer);var o=t.clientHeight,r=e.offsetTop+e.clientHeight-o;Ce.scroll=!0,t.scrollTop=r>0?r:0,Ce.scrollTimer=setTimeout((function(){Ce.scroll=!1}),100)},Ve=function(e){var t=document.querySelector("."+oe);if(t){var o=t.querySelector(".select-popover-list-item-select"),r=t.querySelector(".select-popover-list-item-hover"),i=t.querySelector(".select-popover-list-item-keydown"),n=o;if(r&&(n=r),13===e.keyCode){var l=i||r;if(l){var s=l.dataset.val;Ie(me[s],!0)({target:i})}else Q&&Q(A)}i&&(n=i,i.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Ze({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n}),38===e.keyCode&&Ze({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n})}},Ge=function(e){if(!Ce.scroll){var t=Be(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+oe).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Je=function(e){var t=Be(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Qe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:"outside"===p&&(0,e.jsxs)("label",x({className:"select-label"},{children:[C,E&&(0,e.jsx)("span",x({className:"identification-label"},{children:T||(0,e.jsx)(e.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]}),void 0)},void 0)}),[p,C,E,T,O]),Xe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!se&&(0,e.jsx)("span",x({className:"select-label-placeholder"},{children:"outside"===p?f:(0,e.jsxs)(e.Fragment,{children:[C||f,E&&(0,e.jsx)("span",x({className:"identification-label"},{children:T||(0,e.jsx)(e.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)},void 0)}),[se,p,f,C,E,T,O]),et=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!k&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",x({className:"radio-select-content"},{children:function(){if(""!==Fe)return null;var t=me[de[0]]&&me[de[0]][M]||de[0];return Ee?t:(0,e.jsx)(h.default,{children:t},void 0)}()}),void 0),Z&&"outside"===V&&!1===S&&(0,e.jsx)(o.TextField,{variant:"outlined",className:"radio-search-outside",value:Fe,onChange:Ke,ref:ze},void 0)]},void 0)},void 0)}),[k,se,Ee,me,de,M,Z,V,Fe,S]),tt=(0,t.useMemo)((function(){var t=function(e){return me[de[e]]&&me[de[e]][M]||de[e]};return(0,e.jsx)(e.Fragment,{children:k&&(0,e.jsxs)("div",x({className:"check-select-content"},{children:[de&&de.map((function(o,r){if(null!==ye&&ye<=r)return null;var i=!0;return(!0===S||"object"==typeof S&&-1!==S.indexOf(de[r]))&&(i=!1),(0,e.jsxs)("div",x({className:i?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,e.jsx)("span",{children:t(r)},void 0),i&&(0,e.jsx)(u(),{onClick:Ue(me[de[r]],de[r])},void 0)]}),r)})),function(){if(null!==ye&&de.length>ye)return(0,e.jsx)("div",x({className:"check-select-content-item check-select-content-item-more",onClick:Re},{children:(0,e.jsxs)("span",{children:["+",de.length-ye]},void 0)}),void 0)}(),Z&&"outside"===V&&!1===S&&(0,e.jsx)(o.TextField,{variant:"outlined",className:"check-search-outside",value:Fe,onChange:Ke,ref:ze},void 0)]}),void 0)},void 0)}),[k,se,de,ye,me,S,I,Fe,Z,V]),ot=(0,t.useMemo)((function(){return(0,e.jsxs)("div",x({className:"select-content",onClick:_e,ref:ee},{children:[Xe,(0,e.jsx)("span",x({className:"select-svg"},{children:(0,e.jsx)(i(),{},void 0)}),void 0),et,tt]}),void 0)}),[ee,se,p,f,C,E,T,O,Ee,me,de,M,k,ye,S,I,Fe,V]),rt=(0,t.useMemo)((function(){return(0,e.jsx)("div",x({className:"select-popover-list"},{children:he&&he.length>0?(0,e.jsx)(e.Fragment,{children:he.map((function(t,o){if(t[R]&&t[R].length>0){var r=t[R];return(0,e.jsxs)("div",x({className:"select-popover-list-group"},{children:[(0,e.jsx)("span",x({className:"select-popover-list-group-label"},{children:t[M]}),void 0),r.map((function(t,o){var r=t[_],i="select-popover-list-item";return-1!==de.indexOf(r)&&(i+=" select-popover-list-item-select"),"object"==typeof S&&-1!==S.indexOf(r)&&(i+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",x({onClick:Ie(t),className:i,onMouseEnter:Ge,onMouseLeave:Je,"data-val":r},{children:[(0,e.jsx)("span",x({className:"select-popover-list-item-label"},{children:(0,e.jsx)(h.default,{children:t[M]},void 0)}),void 0),(0,e.jsx)("span",x({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))]}),o)}var i=t[_],n="select-popover-list-item";return-1!==de.indexOf(i)&&(n+=" select-popover-list-item-select"),"object"==typeof S&&-1!==S.indexOf(i)&&(n+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",x({onClick:Ie(t),className:n,onMouseEnter:Ge,onMouseLeave:Je,"data-val":i},{children:[(0,e.jsx)("span",x({className:"select-popover-list-item-label"},{children:(0,e.jsx)(h.default,{children:t[M]},void 0)}),void 0),(0,e.jsx)("span",x({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))},void 0):(0,e.jsx)("div",x({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[he,M,_,de,I]),it=(0,t.useMemo)((function(){var t="select-popover-content "+oe;return(0,e.jsxs)("div",x({style:{width:(ee&&ee.current?ee.current.offsetWidth:0)+"px"},className:t},{children:[Z&&"inside"===V&&(0,e.jsxs)("div",x({className:"select-popover-search"},{children:[(0,e.jsx)(o.TextField,{variant:"outlined",placeholder:"请输入搜索名",value:Fe,onChange:Ke,ref:ze},void 0),(0,e.jsx)(l(),{},void 0)]}),void 0),rt]}),void 0)}),[ie,ee,he,R,_,M,de,Fe,Z,oe,V]),nt=(0,t.useMemo)((function(){var t,r=function(e){return me[de[e]]&&me[de[e]][M]||de[e]};return(0,e.jsx)(o.Popover,x({open:Se,anchorEl:ee&&ee.current,onClose:Ae,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(t=X["select-more-popover"],J&&(t+=" "+J),t)},{children:(0,e.jsxs)("div",x({className:"select-more"},{children:[(0,e.jsxs)("div",x({className:"select-more-title"},{children:[(0,e.jsx)("span",{children:"已选中"},void 0),(0,e.jsx)("span",{children:de.length-Number(ye)},void 0)]}),void 0),(0,e.jsx)("div",x({className:"select-more-content"},{children:de&&de.map((function(t,o){if(null!==ye&&ye>o)return null;var i=!0;return(!0===S||"object"==typeof S&&-1!==S.indexOf(de[o]))&&(i=!1),(0,e.jsxs)("div",x({className:"select-more-content-item"},{children:[(0,e.jsx)("span",{children:(0,e.jsx)(h.default,{children:r(o)},void 0)},void 0),i&&(0,e.jsx)(u(),{onClick:Ue(me[de[o]],de[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[Se,de,ye,me,S,M,J]);return(0,e.jsxs)("div",x({className:(De=X.select,De+=" select",k&&!Ee&&(De+=" "+te),n&&(De+=" "+n),a&&(De+=" select-"+a),D&&(De+=" select-error"),!0===S&&(De+=" select-disabled"),ie&&(De+=" select-open"),k&&(De+=" select-multiple"),Ee&&(De+=" select-over-line"),De)},{children:[Qe,(0,e.jsx)(o.Tooltip,x({open:ie,title:it,onClose:We,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e=X["select-popover"];return G&&(e+=" "+G),e}()},placement:"bottom-start"},{children:ot}),void 0),B&&(0,e.jsx)("p",x({className:"select-error-text"},{children:B}),void 0),nt]}),void 0)};p.default=C}(),p}()}));
package/Switch/index.d.ts CHANGED
@@ -3,17 +3,17 @@
3
3
  * @date 2021/8/5 下午7:23
4
4
  * @description switch 开关
5
5
  */
6
- import { FunctionComponent } from 'react';
6
+ import { FunctionComponent } from "react";
7
7
  import { SwitchProps as MuiSwitchProps } from "@material-ui/core";
8
- export declare type SwitchProps = Omit<MuiSwitchProps, 'size'> & {
8
+ export declare type SwitchProps = Omit<MuiSwitchProps, "size"> & {
9
9
  /**
10
10
  * 类型
11
11
  */
12
- type?: 'compact' | 'normal';
12
+ type?: "compact" | "normal";
13
13
  /**
14
14
  * 大小
15
15
  */
16
- size?: 'small' | 'medium' | 'large';
16
+ size?: "small" | "medium" | "large";
17
17
  };
18
18
  declare const Switch: FunctionComponent<SwitchProps>;
19
19
  export default Switch;
package/Switch/index.js CHANGED
@@ -1,10 +1,10 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles"],e):"object"==typeof exports?exports.ParaUI=e(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):t.ParaUI=e(t.react,t["@material-ui/core"],t["@material-ui/core/styles"])}(self,(function(t,e,r){return function(){"use strict";var o={4927:function(t,e,r){function o(t){var e,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=o(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function n(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=o(t))&&(n&&(n+=" "),n+=e);return n}r.d(e,{Z:function(){return n}})},4126:function(t){
1
+ !function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):t.ParaUI=r(t.react,t["@material-ui/core"],t["@material-ui/core/styles"])}(self,(function(t,r,e){return function(){"use strict";var o={4927:function(t,r,e){function o(t){var r,e,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(e=o(t[r]))&&(n&&(n+=" "),n+=e);else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function n(){for(var t,r,e=0,n="";e<arguments.length;)(t=arguments[e++])&&(r=o(t))&&(n&&(n+=" "),n+=r);return n}e.d(r,{Z:function(){return n}})},4126:function(t){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(t){o[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var a,c,u=n(t),l=1;l<arguments.length;l++){for(var f in a=Object(arguments[l]))r.call(a,f)&&(u[f]=a[f]);if(e){c=e(a);for(var s=0;s<c.length;s++)o.call(a,c[s])&&(u[c[s]]=a[c[s]])}}return u}},9524:function(t,e,r){
7
+ var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var r={},e=0;e<10;e++)r["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(t){return r[t]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(t){o[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var a,c,u=n(t),l=1;l<arguments.length;l++){for(var s in a=Object(arguments[l]))e.call(a,s)&&(u[s]=a[s]);if(r){c=r(a);for(var f=0;f<c.length;f++)o.call(a,c[f])&&(u[c[f]]=a[c[f]])}}return u}},9524:function(t,r,e){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.pr
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- r(4126);var o=r(9297),n=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),e.Fragment=i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,r){var o,i={},l=null,f=null;for(o in void 0!==r&&(l=""+r),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(f=e.ref),e)c.call(e,o)&&!u.hasOwnProperty(o)&&(i[o]=e[o]);if(t&&t.defaultProps)for(o in e=t.defaultProps)void 0===i[o]&&(i[o]=e[o]);return{$$typeof:n,type:t,key:l,ref:f,props:i,_owner:a.current}}e.jsx=l},7712:function(t,e,r){t.exports=r(9524)},853:function(t,e){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};e.Z=function(){return r}},1731:function(t){t.exports=e},8604:function(t){t.exports=r},9297:function(e){e.exports=t}},n={};function i(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={exports:{}};return o[t](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return function(){i.r(a);var t=i(7712),e=i(1731),r=i(8604),o=i(853),n=i(4927),c=function(){return c=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},c.apply(this,arguments)},u=function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]])}return r},l=(0,o.Z)(),f=(0,r.withStyles)((function(t){return(0,r.createStyles)({root:{width:"auto",height:"auto",padding:0,overflow:"visible"},switchBase:{padding:0,top:-2,color:l.bgBorderColor.bg4,"&$checked":{color:l.thmemColor.primary},"&$checked + $track":{backgroundColor:l.thmemColor.thirdary,opacity:1}},checked:{},thumb:{width:18,height:18},track:{width:32,height:14,borderRadius:7,backgroundColor:l.bgBorderColor.bg1,opacity:1},input:{left:"auto",width:"auto"}})}),{name:"SwitchCompact"})(e.Switch),s=(0,r.withStyles)((function(t){return(0,r.createStyles)({root:{width:"auto",height:"auto",padding:0},switchBase:{padding:2,color:l.textColor.white,"&$checked":{transform:"translateX(14px)",color:l.textColor.white,"& + $track":{backgroundColor:l.thmemColor.primary,opacity:1}}},thumb:{width:14,height:14},track:{width:32,height:18,borderRadius:9,backgroundColor:l.bgBorderColor.bg4,opacity:1},input:{left:"auto",width:"auto"},checked:{}})}),{name:"SwitchNormal"})(e.Switch),d=(0,r.makeStyles)((function(){return(0,r.createStyles)({smallThumb:function(t){return"compact"===t.type?{width:16,height:16,borderRadius:8}:{width:12,height:12,borderRadius:6}},smallTrack:function(t){return"compact"===t.type?{width:30,height:12,borderRadius:6}:{width:30,height:16,borderRadius:8}},largeThumb:function(t){return"compact"===t.type?{width:20,height:20,borderRadius:10}:{width:16,height:16,borderRadius:8}},largeTrack:function(t){return"compact"===t.type?{width:34,height:16,borderRadius:8}:{width:34,height:20,borderRadius:10}}})}));a.default=function(e){var r=e.type,o=void 0===r?"normal":r,i=e.size,a=void 0===i?"medium":i,l=e.className,p=u(e,["type","size","className"]),h=d({type:o});return(0,t.jsx)(t.Fragment,{children:function(){if("compact"===o){var e="medium"===a?{}:{thumb:h[a+"Thumb"],track:h[a+"Track"]};return(0,t.jsx)(f,c({},p,{classes:e,className:(0,n.Z)("paraui-switch",l)}),void 0)}var r="medium"===a?{}:{thumb:h[a+"Thumb"],track:h[a+"Track"]};return(0,t.jsx)(s,c({},p,{classes:r,className:(0,n.Z)("paraui-switch",l)}),void 0)}()},void 0)}}(),a}()}));
16
+ e(4126);var o=e(9297),n=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),r.Fragment=i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,r,e){var o,i={},l=null,s=null;for(o in void 0!==e&&(l=""+e),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(s=r.ref),r)c.call(r,o)&&!u.hasOwnProperty(o)&&(i[o]=r[o]);if(t&&t.defaultProps)for(o in r=t.defaultProps)void 0===i[o]&&(i[o]=r[o]);return{$$typeof:n,type:t,key:l,ref:s,props:i,_owner:a.current}}r.jsx=l},7712:function(t,r,e){t.exports=e(9524)},853:function(t,r){var e={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};r.Z=function(){return e}},1731:function(t){t.exports=r},8604:function(t){t.exports=e},9297:function(r){r.exports=t}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var e=n[t]={exports:{}};return o[t](e,e.exports,i),e.exports}i.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(r,{a:r}),r},i.d=function(t,r){for(var e in r)i.o(r,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},i.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return function(){i.r(a);var t=i(7712),r=i(1731),e=i(8604),o=i(853),n=i(4927),c=function(){return c=Object.assign||function(t){for(var r,e=1,o=arguments.length;e<o;e++)for(var n in r=arguments[e])Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t},c.apply(this,arguments)},u=function(t,r){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&r.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(e[o[n]]=t[o[n]])}return e},l=(0,o.Z)(),s=(0,e.withStyles)((function(t){return(0,e.createStyles)({root:{width:"auto",height:"20px",padding:0,alignItems:"center"},switchBase:{top:"50%",transform:"translateY(-50%)",padding:0,color:l.bgBorderColor.bg4,"&$checked":{transform:"translate(14px,-50%)",color:l.thmemColor.primary},"&$checked + $track":{backgroundColor:l.thmemColor.thirdary,opacity:1}},checked:{},thumb:{width:18,height:18},track:{width:32,height:14,borderRadius:7,backgroundColor:l.bgBorderColor.bg1,opacity:1}})}),{name:"SwitchCompact"})(r.Switch),f=(0,e.withStyles)((function(t){return(0,e.createStyles)({root:{width:"auto",height:"auto",padding:0},switchBase:{padding:2,color:l.textColor.white,"&$checked":{transform:"translateX(14px)",color:l.textColor.white,"& + $track":{backgroundColor:l.thmemColor.primary,opacity:1}}},thumb:{width:14,height:14},track:{width:32,height:18,borderRadius:9,backgroundColor:l.bgBorderColor.bg4,opacity:1},checked:{}})}),{name:"SwitchNormal"})(r.Switch),d=(0,e.makeStyles)((function(){return(0,e.createStyles)({smallThumb:function(t){return"compact"===t.type?{width:16,height:16,borderRadius:8}:{width:12,height:12,borderRadius:6}},smallTrack:function(t){return"compact"===t.type?{width:30,height:12,borderRadius:6}:{width:30,height:16,borderRadius:8}},largeThumb:function(t){return"compact"===t.type?{width:20,height:20,borderRadius:10}:{width:16,height:16,borderRadius:8}},largeTrack:function(t){return"compact"===t.type?{width:34,height:16,borderRadius:8}:{width:34,height:20,borderRadius:10}},compactLargeRoot:{height:22}})}));a.default=function(r){var e=r.type,o=void 0===e?"normal":e,i=r.size,a=void 0===i?"medium":i,l=r.className,p=u(r,["type","size","className"]),h=d({type:o});return(0,t.jsx)(t.Fragment,{children:function(){if("compact"===o){var r="medium"===a?{}:{thumb:h[a+"Thumb"],track:h[a+"Track"]};return(0,t.jsx)(s,c({},p,{classes:r,className:(0,n.Z)("paraui-switch",l,"large"===a&&h.compactLargeRoot)}),void 0)}var e="medium"===a?{}:{thumb:h[a+"Thumb"],track:h[a+"Track"]};return(0,t.jsx)(f,c({},p,{classes:e,className:(0,n.Z)("paraui-switch",l)}),void 0)}()},void 0)}}(),a}()}));