@para-ui/core 2.0.13 → 2.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/AutoBox/index.css +2 -0
  2. package/AutoBox/index.js +3 -3
  3. package/AutoTips/index.css +4 -0
  4. package/AutoTips/index.js +3 -3
  5. package/Breadcrumbs/index.css +2 -0
  6. package/Breadcrumbs/index.js +3 -3
  7. package/Button/index.css +4 -0
  8. package/Button/index.js +3 -3
  9. package/ButtonGroup/index.css +6 -0
  10. package/ButtonGroup/index.js +3 -3
  11. package/Cascader/index.css +2 -0
  12. package/Cascader/index.js +3 -3
  13. package/Checkbox/index.css +2 -0
  14. package/Checkbox/index.js +3 -3
  15. package/CheckboxGroup/index.css +4 -0
  16. package/CheckboxGroup/index.js +3 -3
  17. package/ColorPicker/index.css +2 -0
  18. package/ColorPicker/index.js +1 -1
  19. package/ComboSelect/index.css +28 -0
  20. package/ComboSelect/index.js +3 -3
  21. package/ComboSelect/interface.d.ts +2 -2
  22. package/Container/index.css +2 -0
  23. package/Container/index.js +3 -3
  24. package/DatePicker/index.css +6 -0
  25. package/DatePicker/index.js +3 -3
  26. package/Desktop/index.css +2 -0
  27. package/Desktop/index.js +3 -3
  28. package/Drawer/index.css +2 -0
  29. package/Drawer/index.js +3 -3
  30. package/Form/index.css +26 -0
  31. package/Form/index.d.ts +9 -1
  32. package/Form/index.js +3 -3
  33. package/FormItem/index.css +26 -0
  34. package/FormItem/index.d.ts +9 -1
  35. package/FormItem/index.js +3 -3
  36. package/FunctionModal/index.css +12 -0
  37. package/FunctionModal/index.js +3 -3
  38. package/Help/index.css +4 -0
  39. package/Help/index.js +3 -3
  40. package/IconList/index.css +2 -0
  41. package/IconList/index.js +3 -3
  42. package/InputLang/index.css +12 -0
  43. package/InputLang/index.js +3 -3
  44. package/InputNumber/index.css +10 -0
  45. package/InputNumber/index.js +3 -3
  46. package/Loading/index.css +2 -0
  47. package/Loading/index.js +3 -3
  48. package/Menu/index.css +2 -0
  49. package/Menu/index.js +3 -3
  50. package/Message/index.css +2 -0
  51. package/Message/index.js +3 -3
  52. package/Modal/Confirm/index.d.ts +4 -1
  53. package/Modal/index.css +10 -0
  54. package/Modal/index.js +3 -3
  55. package/MultiBox/index.css +10 -0
  56. package/MultiBox/index.js +3 -3
  57. package/PageHeader/index.css +6 -0
  58. package/PageHeader/index.js +3 -3
  59. package/Pagination/index.css +12 -0
  60. package/Pagination/index.js +3 -3
  61. package/ParauiProvider/index.css +2 -0
  62. package/ParauiProvider/index.js +3 -3
  63. package/PopConfirm/index.css +6 -0
  64. package/PopConfirm/index.js +3 -3
  65. package/Popover/index.js +3 -3
  66. package/Popper/index.js +3 -3
  67. package/Radio/index.css +2 -0
  68. package/Radio/index.js +3 -3
  69. package/RadioGroup/index.css +4 -0
  70. package/RadioGroup/index.js +3 -3
  71. package/Search/index.css +12 -0
  72. package/Search/index.js +3 -3
  73. package/Select/index.css +6 -0
  74. package/Select/index.js +3 -3
  75. package/SingleBox/index.css +10 -0
  76. package/SingleBox/index.js +3 -3
  77. package/Slider/index.css +2 -0
  78. package/Slider/index.js +3 -3
  79. package/Split/index.css +2 -0
  80. package/Split/index.js +3 -3
  81. package/Stepper/index.css +2 -0
  82. package/Stepper/index.js +3 -3
  83. package/Switch/index.css +2 -0
  84. package/Switch/index.d.ts +8 -0
  85. package/Switch/index.js +3 -3
  86. package/Table/index.css +20 -0
  87. package/Table/index.js +3 -3
  88. package/Tabs/index.css +4 -0
  89. package/Tabs/index.js +3 -3
  90. package/TextField/index.css +8 -0
  91. package/TextField/index.js +3 -3
  92. package/TimePicker/index.css +6 -0
  93. package/TimePicker/index.js +3 -3
  94. package/Timeline/index.css +2 -0
  95. package/Timeline/index.js +3 -3
  96. package/ToggleButton/index.css +6 -0
  97. package/ToggleButton/index.js +3 -3
  98. package/Tooltip/index.css +2 -0
  99. package/Tooltip/index.js +3 -3
  100. package/Transfer/index.css +16 -0
  101. package/Transfer/index.js +3 -3
  102. package/Tree/index.css +8 -0
  103. package/Tree/index.js +3 -3
  104. package/Upload/index.css +12 -0
  105. package/Upload/index.js +3 -3
  106. package/index.js +3 -3
  107. package/package.json +4 -3
  108. package/style.css +22 -22
package/Select/index.js CHANGED
@@ -1,10 +1,10 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Close","@para-ui/icons/Down","@para-ui/icons/Search","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Close"],e["@para-ui/icons/Down"],e["@para-ui/icons/Search"],e["para-lib"],e.react)}(self,(function(e,t,r,o,n,i,s){return function(){"use strict";var l,c={4927:function(e,t,r){function o(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=o(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function n(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=o(e))&&(n&&(n+=" "),n+=t);return n}r.d(t,{Z:function(){return n}})},4126:function(e){
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Close","@para-ui/icons/Down","@para-ui/icons/Search","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/Down"),require("@para-ui/icons/Search"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Close"],e["@para-ui/icons/Down"],e["@para-ui/icons/Search"],e["para-lib"],e.react)}(self,(function(e,t,o,r,n,i,s){return function(){"use strict";var l={6010:function(e,t,o){function r(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(o=r(e[t]))&&(n&&(n+=" "),n+=o);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function n(){for(var e,t,o=0,n="";o<arguments.length;)(e=arguments[o++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}o.d(t,{Z:function(){return n}})},7418:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(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 t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[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,i){for(var s,l,c=n(e),a=1;a<arguments.length;a++){for(var u in s=Object(arguments[a]))r.call(s,u)&&(c[u]=s[u]);if(t){l=t(s);for(var d=0;d<l.length;d++)o.call(s,l[d])&&(c[l[d]]=s[l[d]])}}return c}},9524:function(e,t,r){
7
+ var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(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 t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var s,l,c=n(e),a=1;a<arguments.length;a++){for(var u in s=Object(arguments[a]))o.call(s,u)&&(c[u]=s[u]);if(t){l=t(s);for(var d=0;d<l.length;d++)r.call(s,l[d])&&(c[l[d]]=s[l[d]])}}return c}},5251:function(e,t,o){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var t=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(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),t.Fragment=i("react.fragment")}var s=o.__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 a(e,t,r){var o,i={},a=null,u=null;for(o in void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:a,ref:u,props:i,_owner:s.current}}t.jsx=a,t.jsxs=a},7712:function(e,t,r){e.exports=r(9524)},3094:function(e,t,r){var o=r(7712),n=r(9297),i=r(6885),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t=e.children,r=e.placement,l=void 0===r?"bottom-start":r,c=e.tips,a=void 0===c?"":c,u=e.className,d=void 0===u?"":u,p=(0,n.useRef)(),f=(0,n.useState)(""),v=f[0],m=f[1];(0,n.useEffect)((function(){m(a)}),[a]);var h;return(0,o.jsx)("div",s({ref:p,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){p.current&&p.current.scrollWidth>p.current.offsetWidth?m(a||p.current.innerText):m("")}},{children:(0,o.jsx)(i.default,s({title:v,placement:l},{children:(0,o.jsx)("div",s({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},370:function(e,t,r){r.r(t),r.d(t,{Select:function(){return g}});var o=r(7712),n=r(9297),i=r(1731),s=r(6028),l=r.n(s),c=r(4115),a=r.n(c),u=r(6110),d=r.n(u),p=r(19),f=r.n(p),v=r(3094),m=r(3475),h=function(){return h=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},h.apply(this,arguments)},y=function(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},g=function(e){var t=e.className,r=e.size,s=void 0===r?"large":r,c=e.labelMode,u=void 0===c?"outside":c,p=e.placeholder,g=void 0===p?"":p,j=e.searchPlaceholder,x=void 0===j?"请输入搜索名":j,b=e.label,w=void 0===b?"":b,O=e.disabled,S=void 0!==O&&O,N=e.multiple,k=void 0!==N&&N,C=e.required,E=void 0!==C&&C,q=e.labelSign,T=e.error,P=void 0!==T&&T,L=e.helperText,M=void 0===L?"":L,_=e.list,D=e.showName,F=void 0===D?"label":D,I=e.showValue,U=void 0===I?"value":I,z=e.childrenName,R=void 0===z?"children":z,H=e.value,A=e.onChange,V=e.overLine,W=void 0!==V&&V,B=e.search,K=void 0!==B&&B,Z=e.searchModel,$=void 0===Z?"inside":Z,Y=e.selectPopoverClassName,G=e.morePopoverClassName,J=e.onEnter,Q=(0,n.useRef)(null),X=(0,n.useState)("select-"+(0,m.UUID)())[0],ee=(0,n.useState)("select-popover-"+(0,m.UUID)())[0],te=(0,n.useState)(!1),re=te[0],oe=te[1],ne=(0,n.useState)(!1),ie=ne[0],se=ne[1],le=(0,n.useState)([]),ce=le[0],ae=le[1],ue=(0,n.useState)([]),de=ue[0],pe=ue[1],fe=(0,n.useState)({}),ve=fe[0],me=fe[1],he=(0,n.useState)(null),ye=he[0],ge=he[1],je=(0,n.useState)({})[0],xe=(0,n.useState)(!1),be=xe[0],we=xe[1],Oe=(0,n.useState)(""),Se=Oe[0],Ne=Oe[1],ke=(0,n.useState)(!1),Ce=ke[0],Ee=ke[1],qe=(0,n.useRef)(null);(0,n.useEffect)((function(){void 0!==e.defaultValue&&(e.multiple?ae((0,m.DeepClone)(e.defaultValue||[])):ae(""===e.defaultValue?[]:[e.defaultValue]))}),[]),(0,n.useEffect)((function(){void 0!==H&&ae(k?(0,m.DeepClone)(H||[]):""===H?[]:[H])}),[H,k]),(0,n.useEffect)((function(){if(K&&"outside"===$)return Ee(!!k);Ee(W)}),[W,K,$,k]),(0,n.useEffect)((function(){for(var e={},t=0,r=_.length;t<r;t++){var o=_[t];if(o[R]&&o[R].length>0)for(var n=o[R],i=0,s=n.length;i<s;i++){var l=n[i];e[l[U]]=l}else e[o[U]]=o}me(e)}),[_]),(0,n.useEffect)((function(){k&&(Ce||ge(ce.length))}),[Ce,k,ce]),(0,n.useEffect)((function(){return Ce?ge(ce.length):(setTimeout((function(){De(ce.length)})),window.addEventListener("resize",Fe)),function(){window.removeEventListener("resize",Fe)}}),[ce,Ce]),(0,n.useEffect)((function(){ce&&ce.length>0?se(!0):(se(!1),K&&"outside"===$&&se(""!==Se))}),[K,Se,$,ce]),(0,n.useEffect)((function(){clearTimeout(je.searchTimer),K&&""!==Se.trim()?je.searchTimer=setTimeout((function(){for(var e=[],t=(0,m.DeepClone)(_),r=0,o=t.length;r<o;r++){var n=t[r];if(n[R]&&n[R].length>0){for(var i=n[R],s=[],l=0,c=i.length;l<c;l++){var a=i[l];_e(a)&&s.push(a)}s.length>0&&(n[R]=s,e.push(n))}else{_e(n)&&e.push(n)}}pe(e)}),100):pe((0,m.DeepClone)(_))}),[K,Se,_]),(0,n.useEffect)((function(){return re?setTimeout((function(){Pe(),window.addEventListener("click",Me),window.addEventListener("keydown",Ze)})):(Ne(""),window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)),function(){window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)}}),[re]),(0,n.useEffect)((function(){Se&&oe(!0)}),[Se]),(0,n.useEffect)((function(){k&&"outside"===$&&!0!==S&&We(Se)}),[Se,k,S,$]);var Te,Pe=function(){var e=qe&&qe.current;e&&e.focus()},Le=function(e,t){for(var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!r.call(e,t);)e=e.parentElement;return e},Me=function(e){Le(e.target,"."+ee)||oe(!1)},_e=function(e){var t=!0,r=e[F];return r&&"string"==typeof r&&-1===r.indexOf(Se)&&(t=!1),t},De=function(e){if(null!==e&&0!==e){void 0===e&&(e=ce.length);var t=document.querySelector("."+X+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var r=Number(e)-1;ge(r),De(r)}else ce.length<=e&&Re()}},Fe=function(){clearTimeout(je.timer),je.timer=setTimeout((function(){ge(ce.length),De()}),100)},Ie=function(){!0!==S&&oe(!0)},Ue=function(){oe(!1)},ze=function(e){we(!0),oe(!1),e.stopPropagation()},Re=function(){we(!1)},He=function(t,r){return function(o){var n=t[U];if("object"!=typeof S||-1===S.indexOf(n))if(k){var i=ce.indexOf(n);-1!==i?ce.splice(i,1):ce.push(n),void 0===e.value&&ae(y([],ce,!0)),A&&A(y([],ce,!0),o),r&&J&&J(y([],ce,!0)),Pe()}else void 0===e.value&&ae([n]),A&&A(n,o),r&&J&&J(n),Ue(),Ne("")}},Ae=function(e,t){return function(r){var o;e||((o={})[U]=t,e=o),He(e)(r),r.stopPropagation()}},Ve=function(e){Ne(e.target.value)},We=function(e){var t=qe&&qe.current;if(!t)return null;var r=window.getComputedStyle(t),o=r.fontFamily,n=function(e,t,r){var o=document.createElement("span");o.id="referenceSpan";var n={};n.width=o.offsetWidth,n.height=o.offsetHeight,o.style.visibility="hidden",o.style.fontSize=e,o.style.fontFamily=t,o.style.display="inline-block";var i=document.getElementById("referenceSpan");return i&&document.body.removeChild(i),document.body.appendChild(o),void 0!==o.textContent?o.textContent=r:o.innerText=r,n.width=parseFloat(window.getComputedStyle(o).width)-n.width,n.height=parseFloat(window.getComputedStyle(o).height)-n.height,document.body.removeChild(o),n}(r.fontSize,o,e),i=n.width;i<10&&(i=10),t.style.width=i+"px"},Be=function(e){var t=e.selectDom,r=e.keyCode,o=e.currentKeydownDom,n=null,i="nextSibling",s=".select-popover-list > div",l=".select-popover-list-item";if(38===r&&(i="previousSibling",s=".select-popover-list > div:last-child",l=".select-popover-list-item:last-child"),o)if(n=o[i])-1!==n.className.indexOf("select-popover-list-group-label")&&((n=(n=o.parentNode)[i])||(n=t.querySelector(s)));else{var c=o.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(n=(n=o.parentNode)[i])||(n=t.querySelector(s))}else n=t.querySelector(s);if(n)if(-1!==n.className.indexOf("select-popover-list-group")){var a=n.querySelector(l);a&&(a.classList.add("select-popover-list-item-keydown"),Ke(a,t))}else n.classList.add("select-popover-list-item-keydown"),Ke(n,t)},Ke=function(e,t){clearTimeout(je.scrollTimer);var r=t.clientHeight,o=e.offsetTop+e.clientHeight-r;je.scroll=!0,t.scrollTop=o>0?o:0,je.scrollTimer=setTimeout((function(){je.scroll=!1}),100)},Ze=function(e){var t=document.querySelector("."+ee+" .select-popover-list");if(t){var r=t.querySelector(".select-popover-list-item-select"),o=t.querySelector(".select-popover-list-item-hover"),n=t.querySelector(".select-popover-list-item-keydown"),i=r;if(o&&(i=o),13===e.keyCode){var s=n||o;if(s){var l=s.dataset.val;He(ve[l],!0)({target:n})}else J&&J(H)}n&&(i=n,n.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i}),38===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i})}},$e=function(e){if(!je.scroll){var t=Le(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var r=document.querySelector("."+ee).querySelector(".select-popover-list-item-keydown");r&&r.classList.remove("select-popover-list-item-keydown")}}},Ye=function(e){var t=Le(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Ge=(0,n.useMemo)((function(){var e=Boolean(w||E||q);return(0,o.jsx)(o.Fragment,{children:"outside"===u&&e&&(0,o.jsxs)("label",h({className:"select-label"},{children:[w,E&&(0,o.jsx)("span",h({className:"select-required"},{children:"*"}),void 0),q&&(0,o.jsx)("span",{children:q},void 0)]}),void 0)},void 0)}),[u,w,q,E]),Je=(0,n.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:!ie&&(0,o.jsx)("span",h({className:"select-label-placeholder"},{children:"outside"===u?g:(0,o.jsxs)(o.Fragment,{children:[w||g,E&&(0,o.jsx)("span",h({className:"select-required"},{children:"*"}),void 0),q&&(0,o.jsx)("span",{children:q},void 0)]},void 0)}),void 0)},void 0)}),[ie,u,g,w,q,E]),Qe=(0,n.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:!k&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",h({className:"radio-select-content"},{children:function(){if(""!==Se&&"outside"===$)return null;var e=ve[ce[0]]&&ve[ce[0]][F]||ce[0];return Ce?e:(0,o.jsx)(v.default,{children:e},void 0)}()}),void 0),K&&"outside"===$&&!0!==S&&(0,o.jsx)("input",{className:"radio-search-outside",value:Se,onChange:Ve,ref:qe},void 0)]},void 0)},void 0)}),[k,ie,Ce,ve,ce,F,K,$,Se,S]),Xe=(0,n.useMemo)((function(){var e=function(e){return ve[ce[e]]&&ve[ce[e]][F]||ce[e]};return(0,o.jsx)(o.Fragment,{children:k&&(0,o.jsxs)("div",h({className:"check-select-content"},{children:[ce&&ce.map((function(t,r){if(null!==ye&&ye<=r)return null;var n=!0;return(!0===S||"object"==typeof S&&-1!==S.indexOf(ce[r]))&&(n=!1),(0,o.jsxs)("div",h({className:n?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,o.jsx)("span",{children:e(r)},void 0),n&&(0,o.jsx)(f(),{onClick:Ae(ve[ce[r]],ce[r])},void 0)]}),r)})),function(){if(null!==ye&&ce.length>ye)return(0,o.jsx)("div",h({className:"check-select-content-item check-select-content-item-more",onClick:ze},{children:(0,o.jsxs)("span",{children:["+",ce.length-ye]},void 0)}),void 0)}(),K&&"outside"===$&&!0!==S&&(0,o.jsx)("input",{className:"check-search-outside",value:Se,onChange:Ve,ref:qe},void 0)]}),void 0)},void 0)}),[k,ie,ce,ye,ve,S,A,Se,K,$]),et=(0,n.useMemo)((function(){return(0,o.jsxs)("div",h({className:"select-content",onClick:Ie,ref:Q},{children:[Je,(0,o.jsx)("span",h({className:"select-svg"},{children:(0,o.jsx)(l(),{},void 0)}),void 0),Qe,Xe]}),void 0)}),[Q,ie,u,g,w,q,E,Ce,ve,ce,F,k,ye,S,A,Se,$]),tt=(0,n.useMemo)((function(){return(0,o.jsx)("div",h({className:"select-popover-list"},{children:de&&de.length>0?(0,o.jsx)(o.Fragment,{children:de.map((function(e,t){if(e[R]&&e[R].length>0){var r=e[R];return(0,o.jsxs)("div",h({className:"select-popover-list-group"},{children:[(0,o.jsx)("span",h({className:"select-popover-list-group-label"},{children:e[F]||e[U]}),void 0),r.map((function(e,t){var r=e[U],n="select-popover-list-item";return-1!==ce.indexOf(r)&&(n+=" select-popover-list-item-select"),"object"==typeof S&&-1!==S.indexOf(r)&&(n+=" select-popover-list-item-disabled"),(0,o.jsxs)("div",h({onClick:He(e),className:n,onMouseEnter:$e,onMouseLeave:Ye,"data-val":r},{children:[(0,o.jsx)("span",h({className:"select-popover-list-item-label"},{children:(0,o.jsx)(v.default,{children:e[F]||e[U]},void 0)}),void 0),k&&(0,o.jsx)("span",h({className:"select-popover-list-item-svg"},{children:(0,o.jsx)(d(),{},void 0)}),void 0)]}),t)}))]}),t)}var n=e[U],i="select-popover-list-item";return-1!==ce.indexOf(n)&&(i+=" select-popover-list-item-select"),"object"==typeof S&&-1!==S.indexOf(n)&&(i+=" select-popover-list-item-disabled"),(0,o.jsxs)("div",h({onClick:He(e),className:i,onMouseEnter:$e,onMouseLeave:Ye,"data-val":n},{children:[(0,o.jsx)("span",h({className:"select-popover-list-item-label"},{children:(0,o.jsx)(v.default,{children:e[F]||e[U]},void 0)}),void 0),k&&(0,o.jsx)("span",h({className:"select-popover-list-item-svg"},{children:(0,o.jsx)(d(),{},void 0)}),void 0)]}),t)}))},void 0):(0,o.jsx)("div",h({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[de,F,U,ce,A,k]),rt=(0,n.useMemo)((function(){return(0,o.jsxs)("div",h({style:{width:(Q&&Q.current?Q.current.offsetWidth:0)+"px"},className:"select-popover-content "+ee},{children:[K&&"inside"===$&&(0,o.jsxs)("div",h({className:"select-popover-search"},{children:[(0,o.jsx)("input",{placeholder:x,value:Se,onChange:Ve,ref:qe},void 0),(0,o.jsx)(a(),{},void 0)]}),void 0),tt]}),void 0)}),[re,Q,de,R,U,F,ce,Se,K,ee,$,k,x]),ot=(0,n.useMemo)((function(){var e,t=function(e){return ve[ce[e]]&&ve[ce[e]][F]||ce[e]};return(0,o.jsx)(i.Popover,h({open:be,anchorEl:Q&&Q.current,onClose:Re,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(e="paraui-select-more-popover",s&&(e+=" paraui-select-more-popover-"+s),G&&(e+=" "+G),e)},{children:(0,o.jsxs)("div",h({className:"select-more"},{children:[(0,o.jsxs)("div",h({className:"select-more-title"},{children:[(0,o.jsx)("span",{children:"已选中"},void 0),(0,o.jsxs)("span",{children:["(",ce.length-Number(ye),")"]},void 0)]}),void 0),(0,o.jsx)("div",h({className:"select-more-content"},{children:ce&&ce.map((function(e,r){if(null!==ye&&ye>r)return null;var n=!0;return(!0===S||"object"==typeof S&&-1!==S.indexOf(ce[r]))&&(n=!1),(0,o.jsxs)("div",h({className:"select-more-content-item"},{children:[(0,o.jsx)("span",{children:(0,o.jsx)(v.default,{children:t(r)},void 0)},void 0),n&&(0,o.jsx)(f(),{onClick:Ae(ve[ce[r]],ce[r])},void 0)]}),r)}))}),void 0)]}),void 0)}),void 0)}),[be,ce,ye,ve,S,F,G,s]);return(0,o.jsxs)("div",h({className:(Te="paraui-select select",k&&!Ce&&(Te+=" "+X),t&&(Te+=" "+t),s&&(Te+=" select-"+s),P&&(Te+=" select-error"),!0===S&&(Te+=" select-disabled"),re&&(Te+=" select-open"),k&&(Te+=" select-multiple"),Ce&&(Te+=" select-over-line"),Te)},{children:[Ge,(0,o.jsx)(i.Tooltip,h({open:re,title:rt,onClose:Ue,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e="paraui-select-popover";return s&&(e+=" paraui-select-popover-"+s),e+=k?" paraui-select-popover-multiple":" paraui-select-popover-radio",Y&&(e+=" "+Y),e}()},placement:"bottom-start"},{children:et}),void 0),M&&(0,o.jsx)("p",h({className:"select-error-text"},{children:M}),void 0),ot]}),void 0)};t.default=g},6885:function(e,t,r){var o=r(7712),n=r(1731),i=r(4927),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t,r=e.placement,l=void 0===r?"bottom":r,c=s(s({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,o.jsx)(n.Tooltip,s({},e,{classes:c}),void 0)}},1731:function(t){t.exports=e},6110:function(e){e.exports=t},19:function(e){e.exports=r},6028:function(e){e.exports=o},4115:function(e){e.exports=n},3475:function(e){e.exports=i},9297:function(e){e.exports=s}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return c[e](r,r.exports,u),r.exports}u.m=c,l=[],u.O=function(e,t,r,o){if(!t){var n=1/0;for(c=0;c<l.length;c++){t=l[c][0],r=l[c][1],o=l[c][2];for(var i=!0,s=0;s<t.length;s++)(!1&o||n>=o)&&Object.keys(u.O).every((function(e){return u.O[e](t[s])}))?t.splice(s--,1):(i=!1,o<n&&(n=o));i&&(l.splice(c--,1),e=r())}return e}o=o||0;for(var c=l.length;c>0&&l[c-1][2]>o;c--)l[c]=l[c-1];l[c]=[t,r,o]},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={8306:0,1465:0,2823:0,9296:0};u.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,n,i=r[0],s=r[1],l=r[2],c=0;for(o in s)u.o(s,o)&&(u.m[o]=s[o]);if(l)var a=l(u);for(t&&t(r);c<i.length;c++)n=i[c],u.o(e,n)&&e[n]&&e[n][0](),e[i[c]]=0;return u.O(a)},r=self.webpackChunkParaUI=self.webpackChunkParaUI||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var d=u.O(void 0,[9296],(function(){return u(370)}));return d=u.O(d)}()}));
16
+ o(7418);var r=o(9297),n=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),t.Fragment=i("react.fragment")}var s=r.__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 a(e,t,o){var r,i={},a=null,u=null;for(r in void 0!==o&&(a=""+o),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:n,type:e,key:a,ref:u,props:i,_owner:s.current}}t.jsx=a,t.jsxs=a},5893:function(e,t,o){e.exports=o(5251)},7839:function(e,t,o){var r=o(5893),n=o(9297),i=o(7371),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,c=e.tips,a=void 0===c?"":c,u=e.className,d=void 0===u?"":u,p=(0,n.useRef)(),v=(0,n.useState)(""),f=v[0],m=v[1];(0,n.useEffect)((function(){m(a)}),[a]);var h;return(0,r.jsx)("div",s({ref:p,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){p.current&&p.current.scrollWidth>p.current.offsetWidth?m(a||p.current.innerText):m("")}},{children:(0,r.jsx)(i.default,s({title:f,placement:l},{children:(0,r.jsx)("div",s({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},7371:function(e,t,o){var r=o(5893),n=o(1731),i=o(6010),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};t.default=function(e){var t,o=e.placement,l=void 0===o?"bottom":o,c=s(s({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,r.jsx)(n.Tooltip,s({},e,{classes:c}),void 0)}},1731:function(t){t.exports=e},6110:function(e){e.exports=t},19:function(e){e.exports=o},6028:function(e){e.exports=r},4115:function(e){e.exports=n},3475:function(e){e.exports=i},9297:function(e){e.exports=s}},c={};function a(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return l[e](o,o.exports,a),o.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return function(){a.r(u),a.d(u,{Select:function(){return y}});var e=a(5893),t=a(9297),o=a(1731),r=a(6028),n=a.n(r),i=a(4115),s=a.n(i),l=a(6110),c=a.n(l),d=a(19),p=a.n(d),v=a(7839),f=a(3475),m=function(){return m=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},m.apply(this,arguments)},h=function(e,t,o){if(o||2===arguments.length)for(var r,n=0,i=t.length;n<i;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))},y=function(r){var i=r.className,l=r.size,a=void 0===l?"large":l,u=r.labelMode,d=void 0===u?"outside":u,y=r.placeholder,x=void 0===y?"":y,g=r.searchPlaceholder,j=void 0===g?"请输入搜索名":g,b=r.label,w=void 0===b?"":b,S=r.disabled,N=void 0!==S&&S,O=r.multiple,k=void 0!==O&&O,C=r.required,E=void 0!==C&&C,q=r.labelSign,T=r.error,L=void 0!==T&&T,P=r.helperText,M=void 0===P?"":P,_=r.list,D=r.showName,F=void 0===D?"label":D,I=r.showValue,z=void 0===I?"value":I,R=r.childrenName,U=void 0===R?"children":R,H=r.value,A=r.onChange,V=r.overLine,W=void 0!==V&&V,B=r.search,K=void 0!==B&&B,Z=r.searchModel,$=void 0===Z?"inside":Z,Y=r.selectPopoverClassName,G=r.morePopoverClassName,J=r.onEnter,Q=(0,t.useRef)(null),X=(0,t.useState)("select-"+(0,f.UUID)())[0],ee=(0,t.useState)("select-popover-"+(0,f.UUID)())[0],te=(0,t.useState)(!1),oe=te[0],re=te[1],ne=(0,t.useState)(!1),ie=ne[0],se=ne[1],le=(0,t.useState)([]),ce=le[0],ae=le[1],ue=(0,t.useState)([]),de=ue[0],pe=ue[1],ve=(0,t.useState)({}),fe=ve[0],me=ve[1],he=(0,t.useState)(null),ye=he[0],xe=he[1],ge=(0,t.useState)({})[0],je=(0,t.useState)(!1),be=je[0],we=je[1],Se=(0,t.useState)(""),Ne=Se[0],Oe=Se[1],ke=(0,t.useState)(!1),Ce=ke[0],Ee=ke[1],qe=(0,t.useRef)(null);(0,t.useEffect)((function(){void 0!==r.defaultValue&&(r.multiple?ae((0,f.DeepClone)(r.defaultValue||[])):ae(""===r.defaultValue?[]:[r.defaultValue]))}),[]),(0,t.useEffect)((function(){void 0!==H&&ae(k?(0,f.DeepClone)(H||[]):""===H?[]:[H])}),[H,k]),(0,t.useEffect)((function(){if(K&&"outside"===$)return Ee(!!k);Ee(W)}),[W,K,$,k]),(0,t.useEffect)((function(){for(var e={},t=0,o=_.length;t<o;t++){var r=_[t];if(r[U]&&r[U].length>0)for(var n=r[U],i=0,s=n.length;i<s;i++){var l=n[i];e[l[z]]=l}else e[r[z]]=r}me(e)}),[_]),(0,t.useEffect)((function(){k&&(Ce||xe(ce.length))}),[Ce,k,ce]),(0,t.useEffect)((function(){return Ce?xe(ce.length):(setTimeout((function(){De(ce.length)})),window.addEventListener("resize",Fe)),function(){window.removeEventListener("resize",Fe)}}),[ce,Ce]),(0,t.useEffect)((function(){ce&&ce.length>0?se(!0):(se(!1),K&&"outside"===$&&se(""!==Ne))}),[K,Ne,$,ce]),(0,t.useEffect)((function(){clearTimeout(ge.searchTimer),K&&""!==Ne.trim()?ge.searchTimer=setTimeout((function(){for(var e=[],t=(0,f.DeepClone)(_),o=0,r=t.length;o<r;o++){var n=t[o];if(n[U]&&n[U].length>0){for(var i=n[U],s=[],l=0,c=i.length;l<c;l++){var a=i[l];_e(a)&&s.push(a)}s.length>0&&(n[U]=s,e.push(n))}else{_e(n)&&e.push(n)}}pe(e)}),100):pe((0,f.DeepClone)(_))}),[K,Ne,_]),(0,t.useEffect)((function(){return oe?setTimeout((function(){Le(),window.addEventListener("click",Me),window.addEventListener("keydown",Ze)})):(Oe(""),window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)),function(){window.removeEventListener("click",Me),window.removeEventListener("keydown",Ze)}}),[oe]),(0,t.useEffect)((function(){Ne&&re(!0)}),[Ne]),(0,t.useEffect)((function(){k&&"outside"===$&&!0!==N&&We(Ne)}),[Ne,k,N,$]);var Te,Le=function(){var e=qe&&qe.current;e&&e.focus()},Pe=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Me=function(e){Pe(e.target,"."+ee)||re(!1)},_e=function(e){var t=!0,o=e[F];return o&&"string"==typeof o&&-1===o.indexOf(Ne)&&(t=!1),t},De=function(e){if(null!==e&&0!==e){void 0===e&&(e=ce.length);var t=document.querySelector("."+X+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;xe(o),De(o)}else ce.length<=e&&Ue()}},Fe=function(){clearTimeout(ge.timer),ge.timer=setTimeout((function(){xe(ce.length),De()}),100)},Ie=function(){!0!==N&&re(!0)},ze=function(){re(!1)},Re=function(e){we(!0),re(!1),e.stopPropagation()},Ue=function(){we(!1)},He=function(e,t){return function(o){var n=e[z];if("object"!=typeof N||-1===N.indexOf(n))if(k){var i=ce.indexOf(n);-1!==i?ce.splice(i,1):ce.push(n),void 0===r.value&&ae(h([],ce,!0)),A&&A(h([],ce,!0),o),t&&J&&J(h([],ce,!0)),Le()}else void 0===r.value&&ae([n]),A&&A(n,o),t&&J&&J(n),ze(),Oe("")}},Ae=function(e,t){return function(o){var r;e||((r={})[z]=t,e=r),He(e)(o),o.stopPropagation()}},Ve=function(e){Oe(e.target.value)},We=function(e){var t=qe&&qe.current;if(!t)return null;var o=window.getComputedStyle(t),r=o.fontFamily,n=function(e,t,o){var r=document.createElement("span");r.id="referenceSpan";var n={};n.width=r.offsetWidth,n.height=r.offsetHeight,r.style.visibility="hidden",r.style.fontSize=e,r.style.fontFamily=t,r.style.display="inline-block";var i=document.getElementById("referenceSpan");return i&&document.body.removeChild(i),document.body.appendChild(r),void 0!==r.textContent?r.textContent=o:r.innerText=o,n.width=parseFloat(window.getComputedStyle(r).width)-n.width,n.height=parseFloat(window.getComputedStyle(r).height)-n.height,document.body.removeChild(r),n}(o.fontSize,r,e),i=n.width;i<10&&(i=10),t.style.width=i+"px"},Be=function(e){var t=e.selectDom,o=e.keyCode,r=e.currentKeydownDom,n=null,i="nextSibling",s=".select-popover-list > div",l=".select-popover-list-item";if(38===o&&(i="previousSibling",s=".select-popover-list > div:last-child",l=".select-popover-list-item:last-child"),r)if(n=r[i])-1!==n.className.indexOf("select-popover-list-group-label")&&((n=(n=r.parentNode)[i])||(n=t.querySelector(s)));else{var c=r.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(n=(n=r.parentNode)[i])||(n=t.querySelector(s))}else n=t.querySelector(s);if(n)if(-1!==n.className.indexOf("select-popover-list-group")){var a=n.querySelector(l);a&&(a.classList.add("select-popover-list-item-keydown"),Ke(a,t))}else n.classList.add("select-popover-list-item-keydown"),Ke(n,t)},Ke=function(e,t){clearTimeout(ge.scrollTimer);var o=t.clientHeight,r=e.offsetTop+e.clientHeight-o;ge.scroll=!0,t.scrollTop=r>0?r:0,ge.scrollTimer=setTimeout((function(){ge.scroll=!1}),100)},Ze=function(e){var t=document.querySelector("."+ee+" .select-popover-list");if(t){var o=t.querySelector(".select-popover-list-item-select"),r=t.querySelector(".select-popover-list-item-hover"),n=t.querySelector(".select-popover-list-item-keydown"),i=o;if(r&&(i=r),13===e.keyCode){var s=n||r;if(s){var l=s.dataset.val;He(fe[l],!0)({target:n})}else J&&J(H)}n&&(i=n,n.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i}),38===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i})}},$e=function(e){if(!ge.scroll){var t=Pe(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+ee).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Ye=function(e){var t=Pe(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Ge=(0,t.useMemo)((function(){var t=Boolean(w||E||q);return(0,e.jsx)(e.Fragment,{children:"outside"===d&&t&&(0,e.jsxs)("label",m({className:"select-label"},{children:[w,E&&(0,e.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),q&&(0,e.jsx)("span",{children:q},void 0)]}),void 0)},void 0)}),[d,w,q,E]),Je=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!ie&&(0,e.jsx)("span",m({className:"select-label-placeholder"},{children:"outside"===d?x:(0,e.jsxs)(e.Fragment,{children:[w||x,E&&(0,e.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),q&&(0,e.jsx)("span",{children:q},void 0)]},void 0)}),void 0)},void 0)}),[ie,d,x,w,q,E]),Qe=(0,t.useMemo)((function(){return(0,e.jsx)(e.Fragment,{children:!k&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",m({className:"radio-select-content"},{children:function(){if(""!==Ne&&"outside"===$)return null;var t=fe[ce[0]]&&fe[ce[0]][F]||ce[0];return Ce?t:(0,e.jsx)(v.default,{children:t},void 0)}()}),void 0),K&&"outside"===$&&!0!==N&&(0,e.jsx)("input",{className:"radio-search-outside",value:Ne,onChange:Ve,ref:qe},void 0)]},void 0)},void 0)}),[k,ie,Ce,fe,ce,F,K,$,Ne,N]),Xe=(0,t.useMemo)((function(){var t=function(e){return fe[ce[e]]&&fe[ce[e]][F]||ce[e]};return(0,e.jsx)(e.Fragment,{children:k&&(0,e.jsxs)("div",m({className:"check-select-content"},{children:[ce&&ce.map((function(o,r){if(null!==ye&&ye<=r)return null;var n=!0;return(!0===N||"object"==typeof N&&-1!==N.indexOf(ce[r]))&&(n=!1),(0,e.jsxs)("div",m({className:n?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,e.jsx)("span",{children:t(r)},void 0),n&&(0,e.jsx)(p(),{onClick:Ae(fe[ce[r]],ce[r])},void 0)]}),r)})),function(){if(null!==ye&&ce.length>ye)return(0,e.jsx)("div",m({className:"check-select-content-item check-select-content-item-more",onClick:Re},{children:(0,e.jsxs)("span",{children:["+",ce.length-ye]},void 0)}),void 0)}(),K&&"outside"===$&&!0!==N&&(0,e.jsx)("input",{className:"check-search-outside",value:Ne,onChange:Ve,ref:qe},void 0)]}),void 0)},void 0)}),[k,ie,ce,ye,fe,N,A,Ne,K,$]),et=(0,t.useMemo)((function(){return(0,e.jsxs)("div",m({className:"select-content",onClick:Ie,ref:Q},{children:[Je,(0,e.jsx)("span",m({className:"select-svg"},{children:(0,e.jsx)(n(),{},void 0)}),void 0),Qe,Xe]}),void 0)}),[Q,ie,d,x,w,q,E,Ce,fe,ce,F,k,ye,N,A,Ne,$]),tt=(0,t.useMemo)((function(){return(0,e.jsx)("div",m({className:"select-popover-list"},{children:de&&de.length>0?(0,e.jsx)(e.Fragment,{children:de.map((function(t,o){if(t[U]&&t[U].length>0){var r=t[U];return(0,e.jsxs)("div",m({className:"select-popover-list-group"},{children:[(0,e.jsx)("span",m({className:"select-popover-list-group-label"},{children:t[F]||t[z]}),void 0),r.map((function(t,o){var r=t[z],n="select-popover-list-item";return-1!==ce.indexOf(r)&&(n+=" select-popover-list-item-select"),"object"==typeof N&&-1!==N.indexOf(r)&&(n+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",m({onClick:He(t),className:n,onMouseEnter:$e,onMouseLeave:Ye,"data-val":r},{children:[(0,e.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,e.jsx)(v.default,{children:t[F]||t[z]},void 0)}),void 0),k&&(0,e.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))]}),o)}var n=t[z],i="select-popover-list-item";return-1!==ce.indexOf(n)&&(i+=" select-popover-list-item-select"),"object"==typeof N&&-1!==N.indexOf(n)&&(i+=" select-popover-list-item-disabled"),(0,e.jsxs)("div",m({onClick:He(t),className:i,onMouseEnter:$e,onMouseLeave:Ye,"data-val":n},{children:[(0,e.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,e.jsx)(v.default,{children:t[F]||t[z]},void 0)}),void 0),k&&(0,e.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),o)}))},void 0):(0,e.jsx)("div",m({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[de,F,z,ce,A,k]),ot=(0,t.useMemo)((function(){return(0,e.jsxs)("div",m({style:{width:(Q&&Q.current?Q.current.offsetWidth:0)+"px"},className:"select-popover-content "+ee},{children:[K&&"inside"===$&&(0,e.jsxs)("div",m({className:"select-popover-search"},{children:[(0,e.jsx)("input",{placeholder:j,value:Ne,onChange:Ve,ref:qe},void 0),(0,e.jsx)(s(),{},void 0)]}),void 0),tt]}),void 0)}),[oe,Q,de,U,z,F,ce,Ne,K,ee,$,k,j]),rt=(0,t.useMemo)((function(){var t,r=function(e){return fe[ce[e]]&&fe[ce[e]][F]||ce[e]};return(0,e.jsx)(o.Popover,m({open:be,anchorEl:Q&&Q.current,onClose:Ue,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(t="paraui-select-more-popover",a&&(t+=" paraui-select-more-popover-"+a),G&&(t+=" "+G),t)},{children:(0,e.jsxs)("div",m({className:"select-more"},{children:[(0,e.jsxs)("div",m({className:"select-more-title"},{children:[(0,e.jsx)("span",{children:"已选中"},void 0),(0,e.jsxs)("span",{children:["(",ce.length-Number(ye),")"]},void 0)]}),void 0),(0,e.jsx)("div",m({className:"select-more-content"},{children:ce&&ce.map((function(t,o){if(null!==ye&&ye>o)return null;var n=!0;return(!0===N||"object"==typeof N&&-1!==N.indexOf(ce[o]))&&(n=!1),(0,e.jsxs)("div",m({className:"select-more-content-item"},{children:[(0,e.jsx)("span",{children:(0,e.jsx)(v.default,{children:r(o)},void 0)},void 0),n&&(0,e.jsx)(p(),{onClick:Ae(fe[ce[o]],ce[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[be,ce,ye,fe,N,F,G,a]);return(0,e.jsxs)("div",m({className:(Te="paraui-select select",k&&!Ce&&(Te+=" "+X),i&&(Te+=" "+i),a&&(Te+=" select-"+a),L&&(Te+=" select-error"),!0===N&&(Te+=" select-disabled"),oe&&(Te+=" select-open"),k&&(Te+=" select-multiple"),Ce&&(Te+=" select-over-line"),Te)},{children:[Ge,(0,e.jsx)(o.Tooltip,m({open:oe,title:ot,onClose:ze,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e="paraui-select-popover";return a&&(e+=" paraui-select-popover-"+a),e+=k?" paraui-select-popover-multiple":" paraui-select-popover-radio",Y&&(e+=" "+Y),e}()},placement:"bottom-start"},{children:et}),void 0),M&&(0,e.jsx)("p",m({className:"select-error-text"},{children:M}),void 0),rt]}),void 0)};u.default=y}(),u}()}));
@@ -0,0 +1,10 @@
1
+ .paraui-tooltip>div{font-size:14px;color:#fff;background-color:rgba(46,55,67,0.701961)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}
2
+
3
+ .paraui-auto-tips{max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-auto-tips>.auto-tips-content{display:inline;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
4
+
5
+ @keyframes rotateLoading{0%{transformOrigin:50% 50%}100%{transform:rotate(360deg)}}.paraui-loading{position:absolute;left:0;top:0;width:100%;height:100%}.paraui-loading .paraui-loading-mask{position:absolute;width:100%;height:100%;background-color:white;z-index:1}.paraui-loading .paraui-loading-box{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:2}.paraui-loading .paraui-loading-box>svg{transition:all .3s ease-in-out;animation:rotateLoading 1s infinite linear;font-size:20px}
6
+
7
+ .paraui-text-field{font-family:Source Han Sans CN,Source Han Sans CN-Regular;font-size:14px;font-weight:400;display:inline-block;width:100%;padding-bottom:20px}.paraui-text-field>.text-field-label{color:rgba(46,55,67,0.701961);margin-bottom:8px;display:inline-block}.paraui-text-field>.text-field-label>.text-field-required{margin-left:2px;color:#eb6054}.paraui-text-field>.text-field-content{border:1px solid;border-radius:8px;border-color:rgba(171,176,185,0.4);display:flex;width:100%;position:relative}.paraui-text-field>.text-field-content:hover{border-color:#3666d6}.paraui-text-field>.text-field-content>.text-field-content-before{color:#2e3743;padding:0 12px;border-right:1px solid rgba(171,176,185,0.4);background-color:rgba(171,176,185,0.121569);border-bottom-left-radius:8px;border-top-left-radius:8px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-before svg{font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within{position:relative;width:100%;display:flex}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon{display:flex;height:100%;align-items:center;margin-right:12px;cursor:pointer;color:rgba(46,55,67,0.701961);position:relative;z-index:1}.paraui-text-field>.text-field-content>.text-field-content-within>.right-icon svg{color:rgba(46,55,67,0.701961);font-size:20px}.paraui-text-field>.text-field-content>.text-field-content-within>.length-limit{display:flex;height:100%;align-items:center;margin-right:12px;color:rgba(46,55,67,0.701961)}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input{width:100%;line-height:0}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-outer-spin-button,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input::-webkit-inner-spin-button{-webkit-appearance:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input input[type="number"]{-moz-appearance:textfield}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{width:100%;height:100%}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{width:100% !important;padding:12px}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{font-size:14px;color:#2e3743;border:0;border-radius:8px;background:transparent}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-clear,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-clear{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input::-ms-reveal,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea::-ms-reveal{display:none}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>input:disabled,.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea:disabled{background-color:transparent}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{width:100%;position:absolute;left:0;top:0;height:100%;padding:0 12px;color:rgba(46,55,67,0.4);cursor:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.paraui-text-field>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder>.text-field-required{margin-left:2px;color:#eb6054}.paraui-text-field>.text-field-content>.text-field-content-after{color:#2e3743;padding:0 12px;border-left:1px solid rgba(171,176,185,0.4);background-color:rgba(171,176,185,0.121569);border-bottom-right-radius:8px;border-top-right-radius:8px;white-space:nowrap;display:flex;align-items:center}.paraui-text-field>.text-field-content>.text-field-content-after svg{font-size:20px}.paraui-text-field>.text-field-error-text{margin:8px 0 0 0;padding-left:12px;line-height:1}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.length-limit{height:14px;position:absolute;right:0;bottom:8px}.paraui-text-field.text-field-multiline>.text-field-content .text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{padding-top:12px;line-height:1;height:calc(100% - 14px)}.paraui-text-field.text-field-disabled>.text-field-content{background-color:rgba(171,176,185,0.121569)}.paraui-text-field.text-field-disabled>.text-field-content:hover{border-color:rgba(171,176,185,0.4)}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-before{background-color:transparent}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>input,.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-within>.text-field-content-within-input>textarea{cursor:not-allowed}.paraui-text-field.text-field-disabled>.text-field-content>.text-field-content-after{background-color:transparent}.paraui-text-field.text-field-error>.text-field-error-text{color:#eb6054}.paraui-text-field.text-field-error>.text-field-content{border-color:#eb6054}.paraui-text-field.text-field-error>.text-field-content:hover{border-color:#eb6054}.paraui-text-field.text-field-limit>.text-field-content{border-color:#eb6054 !important}.paraui-text-field.text-field-limit>.text-field-content:hover{border-color:#eb6054 !important}.paraui-text-field.text-field-focus>.text-field-content{border-color:#3666d6}.paraui-text-field.text-field-small>.text-field-content{height:28px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-before{line-height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:26px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:6px 12px}.paraui-text-field.text-field-small>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:26px}.paraui-text-field.text-field-small>.text-field-content .text-field-content-after{line-height:26px}.paraui-text-field.text-field-medium>.text-field-content{height:32px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-before{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:30px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:8px 12px}.paraui-text-field.text-field-medium>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:30px}.paraui-text-field.text-field-medium>.text-field-content .text-field-content-after{line-height:30px}.paraui-text-field.text-field-large>.text-field-content{height:36px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-before{line-height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input{height:34px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>input{padding:10px 12px}.paraui-text-field.text-field-large>.text-field-content>.text-field-content-within>.text-field-content-within-input>.text-field-label-placeholder{line-height:34px}.paraui-text-field.text-field-large>.text-field-content .text-field-content-after{line-height:34px}.paraui-text-field-select>div{max-width:none;padding:0;background-color:white;box-shadow:0px 2px 8px 0px rgba(171,176,185,0.4);border-radius:8px;font-family:Source Han Sans CN,Source Han Sans CN-Regular;font-size:14px;font-weight:400}.paraui-text-field-select>div>span{color:white}.paraui-text-field-select>div .text-field-select-content{max-height:300px;overflow:auto}.paraui-text-field-select>div .text-field-select-content>.text-field-select-content-item{display:flex;cursor:pointer;color:#2e3743;padding:0 12px}.paraui-text-field-select>div .text-field-select-content>.text-field-select-content-item:hover{background-color:rgba(171,176,185,0.121569);color:#3666d6}.paraui-text-field-select>div .text-field-select-content>.text-field-select-content-item.text-field-select-content-item-keydown{background-color:rgba(171,176,185,0.121569);color:#3666d6}.paraui-text-field-select>div .text-field-select-content.text-field-select-content-loading{height:100px;position:relative;overflow:hidden}.paraui-text-field-select.paraui-text-field-select-small>div .text-field-select-content>.text-field-select-content-item{line-height:28px}.paraui-text-field-select.paraui-text-field-select-medium>div .text-field-select-content>.text-field-select-content-item{line-height:32px}.paraui-text-field-select.paraui-text-field-select-large>div .text-field-select-content>.text-field-select-content-item{line-height:36px}
8
+
9
+ .paraui-single-box{display:inline-block;width:100%;font-family:Source Han Sans CN,Source Han Sans CN-Regular;font-size:14px;font-weight:400;padding-bottom:20px}.paraui-single-box>.single-box-label{color:rgba(46,55,67,0.701961);margin-bottom:8px;display:inline-block}.paraui-single-box>.single-box-label>.single-box-label-required{margin-left:2px;color:#eb6054}.paraui-single-box>.single-box-content{line-height:0}.paraui-single-box>.single-box-content>.single-box-content-item{padding-bottom:15px;display:flex}.paraui-single-box>.single-box-content>.single-box-content-item>.text-field{padding-bottom:0;width:calc(100% - 30px)}.paraui-single-box>.single-box-content>.single-box-content-item>.single-box-content-item-svg{display:flex;align-items:center;justify-content:center;width:30px;cursor:pointer}.paraui-single-box>.single-box-add{text-align:center;border:1px dashed;border-color:rgba(171,176,185,0.4);display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer}.paraui-single-box>.single-box-add>svg{font-size:24px}.paraui-single-box>.single-box-add:hover{border-color:#3666d6;color:#3666d6}.paraui-single-box>.single-box-error{margin:8px 0 0 0;padding-left:12px;line-height:1}.paraui-single-box.single-box-small>.single-box-add{height:28px}.paraui-single-box.single-box-medium>.single-box-add{height:32px}.paraui-single-box.single-box-large>.single-box-add{height:36px}.paraui-single-box.single-box-error>.single-box-error{color:#eb6054}.paraui-single-box.single-box-disabled>.single-box-content>.single-box-content-item>.single-box-content-item-svg{cursor:not-allowed}.paraui-single-box.single-box-disabled>.single-box-content>.single-box-content-item>.single-box-content-item-svg>svg{color:rgba(46,55,67,0.701961)}.paraui-single-box.single-box-disabled>.single-box-add{border-color:rgba(171,176,185,0.4);cursor:not-allowed;background-color:rgba(171,176,185,0.121569);color:rgba(46,55,67,0.701961)}.paraui-single-box.single-box-disabled>.single-box-add>svg{color:rgba(46,55,67,0.701961)}.paraui-single-box.single-box-disabled>.single-box-add:hover{border-color:rgba(171,176,185,0.4);color:rgba(46,55,67,0.701961)}
10
+
@@ -1,10 +1,10 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Delete","@para-ui/icons/LoadingF","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Delete"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["para-lib"],e.react)}(self,(function(e,t,n,r,o,i,a,l){return function(){"use strict";var s,c={4927:function(e,t,n){function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},4126:function(e){
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Delete","@para-ui/icons/LoadingF","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Delete"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["para-lib"],e.react)}(self,(function(e,t,n,o,r,i,a,l){return function(){"use strict";var s={6010:function(e,t,n){function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function r(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}n.d(t,{Z:function(){return r}})},7418:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=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 t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=o(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(s[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)r.call(a,l[d])&&(s[l[d]]=a[l[d]])}}return s}},9524:function(e,t,n){
7
+ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(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 t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[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,i){for(var a,l,s=r(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))n.call(a,u)&&(s[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)o.call(a,l[d])&&(s[l[d]]=a[l[d]])}}return s}},5251:function(e,t,n){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,n=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
- n(4126);var r=n(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__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 c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var r=n(7712),o=n(9297),i=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,s=e.tips,c=void 0===s?"":s,u=e.className,d=void 0===u?"":u,f=(0,o.useRef)(),v=(0,o.useState)(""),p=v[0],h=v[1];(0,o.useEffect)((function(){h(c)}),[c]);var x;return(0,r.jsx)("div",a({ref:f,className:(x="paraui-auto-tips",d&&(x+=" "+d),x),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?h(c||f.current.innerText):h("")}},{children:(0,r.jsx)(i.default,a({title:p,placement:l},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},9011:function(e,t,n){var r=n(7712),o=n(9297),i=n(1102),a=n.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,s=void 0===i?.7:i,c=(0,o.useRef)(null);(0,o.useEffect)((function(){c&&c.current&&c.current.parentNode&&((getComputedStyle(c.current.parentNode)||{}).position||(c.current.parentNode.style.position="relative"))}),[]);var u;return(0,r.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:c},{children:[(0,r.jsx)("div",l({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{},void 0)}),void 0),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:s}},void 0)]}),void 0)}},8901:function(e,t,n){n.r(t),n.d(t,{SingleBox:function(){return f}});var r=n(7712),o=n(9297),i=n(3672),a=n(5191),l=n.n(a),s=n(6243),c=n.n(s),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},d=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},f=function(e){var t=e.className,n=e.size,a=void 0===n?"large":n,s=e.placeholder,f=void 0===s?"":s,v=e.label,p=void 0===v?"":v,h=e.labelSign,x=e.disabled,m=void 0!==x&&x,g=e.required,y=void 0!==g&&g,b=e.error,j=void 0!==b&&b,O=e.helperText,w=void 0===O?"":O,S=e.value,N=e.onChange,C=(0,o.useState)([]),k=C[0],P=C[1];(0,o.useEffect)((function(){void 0!==e.defaultValue&&P(d([],e.defaultValue,!0))}),[]),(0,o.useEffect)((function(){void 0!==S&&P(d([],S,!0))}),[S]);var q,E=function(t){return function(){m||(k.splice(t,1),void 0===e.value&&P(d([],k,!0)),N&&N(k))}},L=function(t){return function(n){k[t]=n.target.value,void 0===e.value&&P(d([],k,!0)),N&&N(k)}};return(0,r.jsxs)("div",u({className:(q="paraui-single-box single-box",t&&(q+=" "+t),a&&(q+=" single-box-"+a),j&&(q+=" single-box-error"),m&&(q+=" single-box-disabled"),q)},{children:[p?(0,r.jsxs)("label",u({className:"single-box-label"},{children:[p,y&&(0,r.jsx)("span",u({className:"single-box-label-required"},{children:"*"}),void 0),h&&(0,r.jsx)("span",{children:h},void 0)]}),void 0):null,(0,r.jsx)("div",u({className:"single-box-content"},{children:k.map((function(e,t){return(0,r.jsxs)("div",u({className:"single-box-content-item"},{children:[(0,r.jsx)(i.default,{disabled:m,value:e,placeholder:f,size:a,onChange:L(t)},void 0),(0,r.jsx)("span",u({className:"single-box-content-item-svg"},{children:(0,r.jsx)(c(),{onClick:E(t)},void 0)}),void 0)]}),t)}))}),void 0),(0,r.jsx)("div",u({className:"single-box-add",onClick:function(){m||(k.push(""),void 0===e.value&&P(d([],k,!0)),N&&N(k))}},{children:(0,r.jsx)(l(),{},void 0)}),void 0),w&&(0,r.jsx)("p",u({className:"single-box-error"},{children:w}),void 0)]}),void 0)};t.default=f},3672:function(e,t,n){var r=n(7712),o=n(9297),i=n(1731),a=n(3094),l=n(9011),s=n(8528),c=n.n(s),u=n(6570),d=n.n(u),f=n(3475),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};t.default=function(e){var t=e.className,n=e.size,s=void 0===n?"large":n,u=e.labelMode,h=void 0===u?"outside":u,x=e.placeholder,m=void 0===x?"":x,g=e.label,y=void 0===g?"":g,b=e.disabled,j=void 0!==b&&b,O=e.multiline,w=void 0!==O&&O,S=e.required,N=void 0!==S&&S,C=e.labelSign,k=e.rows,P=void 0===k?2:k,q=e.error,E=void 0!==q&&q,L=e.helperText,_=void 0===L?"":L,F=e.addonBefore,I=void 0===F?"":F,D=e.addonAfter,T=void 0===D?"":D,A=(e.defaultValue,e.value),M=e.autoFocus,U=void 0!==M&&M,B=e.type,R=void 0===B?"text":B,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,re=e.onEnter,oe=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,le=p(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),se=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,o.useState)(!0),ue=ce[0],de=ce[1],fe=(0,o.useState)(""),ve=fe[0],pe=fe[1],he=(0,o.useState)(!1),xe=he[0],me=he[1],ge=(0,o.useState)("text"),ye=ge[0],be=ge[1],je=(0,o.useState)(!1),Oe=je[0],we=je[1],Se=(0,o.useState)(!1),Ne=Se[0],Ce=Se[1],ke=(0,o.useState)([]),Pe=ke[0],qe=ke[1],Ee=((0,o.useState)({isCompositions:!0})[0],(0,o.useRef)(null)),Le=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),Ie(e.defaultValue))}),[]),(0,o.useEffect)((function(){R!==ye&&be(R)}),[R]),(0,o.useEffect)((function(){void 0!==A&&(pe(A),Ie(A))}),[A]),(0,o.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,o.useEffect)((function(){J&&we(xe)}),[xe,J]),(0,o.useEffect)((function(){return Oe?window.addEventListener("keydown",Me):window.removeEventListener("keydown",Me),function(){window.removeEventListener("keydown",Me)}}),[Oe]),(0,o.useEffect)((function(){if(!xe&&ve){var t=Fe(ve);if(t!==ve){var n={};n.target=Ee.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[ve,xe]);var _e,Fe=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Ie=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},De=function(){j||(de(!1),(Ee&&Ee.current).focus())},Te=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,o="nextSibling",i=".text-field-select-content-item";38===n&&(o="previousSibling",i=".text-field-select-content-item:last-child"),r?(r=r[o])||(r=t.querySelector(i)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),Ae(r,t))},Ae=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},Me=function(e){var t=document.querySelector("."+se),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var o=r.dataset.val;Je(JSON.parse(o))(e),(Ee&&Ee.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n})},Ue=function(e){me(!1),""===e.target.value&&de(!0),Q&&Q(e)},Be=function(e){Ce(!0),J&&J(e,(function(e){qe(e||[]),Ce(!1)}))},Re=function(e){me(!0),X&&X(e),Be(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(pe(n),Ie(n)),ee&&ee(t),Be(t.target.value)},Ve=function(e){13===e.keyCode&&re&&re(e),te&&te(e)},ze=function(e){ne&&ne(e)},We=function(e){"password"===R&&("text"===ye&&be("password"),"password"===ye&&be("text")),K&&K(e)},He=function(){we(!1)},Je=function(e){return function(t){ae&&ae(e)}},Ze=(0,o.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:void 0!==H&&(0,r.jsx)("span",v({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),$e=(0,o.useMemo)((function(){var e=V||("password"===R?"password"===ye?(0,r.jsx)(d(),{},void 0):(0,r.jsx)(c(),{},void 0):null);return(0,r.jsx)(r.Fragment,{children:W&&e&&(0,r.jsx)("span",v({className:"right-icon",onClick:We},{children:e}),void 0)},void 0)}),[W,V,R,ye]),Ye=(0,o.useMemo)((function(){return(0,r.jsxs)("div",v({className:"text-field-content-within",ref:Le},{children:[(0,r.jsxs)("div",v({className:"text-field-content-within-input"},{children:[w?(0,r.jsx)("textarea",v({ref:Ee,rows:P,onBlur:Ue,onFocus:Re,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0):(0,r.jsx)("input",v({ref:Ee,type:ye,onBlur:Ue,onFocus:Re,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0),ue&&!xe&&(0,r.jsx)("span",v({className:"text-field-label-placeholder",onClick:De},{children:"outside"===h?m:(0,r.jsxs)(r.Fragment,{children:[y||m,N&&(0,r.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,r.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[ue,xe,U,ye,ve,Ze,$e,h,m,y,j,w,P,le,ee,J]),Ge=(0,o.useMemo)((function(){var e;return(0,r.jsxs)("div",v({className:(e="text-field-select-content",Ne&&(e+=" text-field-select-content-loading"),se&&(e+=" "+se),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,r.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Je(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,r.jsx)(a.default,{children:e[G]},void 0)}),t)})),Ne&&(0,r.jsx)(l.default,{},void 0)]}),void 0)}),[Le,Oe,Pe,$,G,ae,Ne,se]),Qe=(0,o.useMemo)((function(){return(0,r.jsx)(i.Tooltip,v({open:Oe,title:Ge,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",s&&(e+=" paraui-text-field-select-"+s),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[ue,xe,U,ye,ve,Ze,$e,h,m,y,j,w,P,le,ee,J,ae,Le,Oe,Z,s]),Xe=(0,o.useMemo)((function(){var e=Boolean(N||C||y);return(0,r.jsx)(r.Fragment,{children:"outside"===h&&e&&(0,r.jsxs)("label",v({className:"text-field-label"},{children:[y,N&&(0,r.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,r.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[h,y,C,N]);return(0,r.jsxs)("div",v({className:(_e="paraui-text-field",_e+=" text-field",s&&!w&&(_e+=" text-field-"+s),t&&(_e+=" "+t),E&&(_e+=" text-field-error"),xe&&(_e+=" text-field-focus"),j&&(_e+=" text-field-disabled"),w&&(_e+=" text-field-multiline"),e.limitLength&&ve&&ve.toString().length>e.limitLength&&(_e+=" text-field-limit"),_e)},{children:[Xe,(0,r.jsxs)("div",v({className:"text-field-content"},{children:[I&&(0,r.jsx)("div",v({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:I}),void 0),J?Qe:Ye,T&&(0,r.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:T}),void 0)]}),void 0),_&&(0,r.jsx)("p",v({className:"text-field-error-text"},{children:_}),void 0)]}),void 0)}},6885:function(e,t,n){var r=n(7712),o=n(1731),i=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,s=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,r.jsx)(o.Tooltip,a({},e,{classes:s}),void 0)}},1731:function(t){t.exports=e},6243:function(e){e.exports=t},1102:function(e){e.exports=n},5191:function(e){e.exports=r},6570:function(e){e.exports=o},8528:function(e){e.exports=i},3475:function(e){e.exports=a},9297:function(e){e.exports=l}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.m=c,s=[],d.O=function(e,t,n,r){if(!t){var o=1/0;for(l=0;l<s.length;l++){t=s[l][0],n=s[l][1],r=s[l][2];for(var i=!0,a=0;a<t.length;a++)(!1&r||o>=r)&&Object.keys(d.O).every((function(e){return d.O[e](t[a])}))?t.splice(a--,1):(i=!1,r<o&&(o=r));i&&(s.splice(l--,1),e=n())}return e}r=r||0;for(var l=s.length;l>0&&s[l-1][2]>r;l--)s[l]=s[l-1];s[l]=[t,n,r]},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 n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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})},function(){var e={2576:0,1465:0,5717:0,2996:0,2823:0,9296:0};d.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,i=n[0],a=n[1],l=n[2],s=0;for(r in a)d.o(a,r)&&(d.m[r]=a[r]);if(l)var c=l(d);for(t&&t(n);s<i.length;s++)o=i[s],d.o(e,o)&&e[o]&&e[o][0](),e[i[s]]=0;return d.O(c)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var f=d.O(void 0,[9296],(function(){return d(8901)}));return f=d.O(f)}()}));
16
+ n(7418);var o=n(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;r=i("react.element"),t.Fragment=i("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 c(e,t,n){var o,i={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,o)&&!s.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:c,ref:u,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,n){e.exports=n(5251)},7839:function(e,t,n){var o=n(5893),r=n(9297),i=n(7371),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,s=e.tips,c=void 0===s?"":s,u=e.className,d=void 0===u?"":u,f=(0,r.useRef)(),v=(0,r.useState)(""),p=v[0],x=v[1];(0,r.useEffect)((function(){x(c)}),[c]);var h;return(0,o.jsx)("div",a({ref:f,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?x(c||f.current.innerText):x("")}},{children:(0,o.jsx)(i.default,a({title:p,placement:l},{children:(0,o.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},7502:function(e,t,n){var o=n(5893),r=n(9297),i=n(1102),a=n.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,s=void 0===i?.7:i,c=(0,r.useRef)(null);(0,r.useEffect)((function(){c&&c.current&&c.current.parentNode&&((getComputedStyle(c.current.parentNode)||{}).position||(c.current.parentNode.style.position="relative"))}),[]);var u;return(0,o.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:c},{children:[(0,o.jsx)("div",l({className:"paraui-loading-box"},{children:(0,o.jsx)(a(),{},void 0)}),void 0),(0,o.jsx)("div",{className:"paraui-loading-mask",style:{opacity:s}},void 0)]}),void 0)}},7320:function(e,t,n){var o=n(5893),r=n(9297),i=n(1731),a=n(7839),l=n(7502),s=n(8528),c=n.n(s),u=n(6570),d=n.n(u),f=n(3475),v=function(){return v=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};t.default=function(e){var t=e.className,n=e.size,s=void 0===n?"large":n,u=e.labelMode,x=void 0===u?"outside":u,h=e.placeholder,m=void 0===h?"":h,g=e.label,y=void 0===g?"":g,b=e.disabled,j=void 0!==b&&b,w=e.multiline,O=void 0!==w&&w,S=e.required,N=void 0!==S&&S,C=e.labelSign,P=e.rows,k=void 0===P?2:P,q=e.error,E=void 0!==q&&q,L=e.helperText,_=void 0===L?"":L,F=e.addonBefore,D=void 0===F?"":F,I=e.addonAfter,T=void 0===I?"":I,A=(e.defaultValue,e.value),M=e.autoFocus,B=void 0!==M&&M,R=e.type,U=void 0===R?"text":R,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,oe=e.onEnter,re=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,le=p(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),se=(0,r.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,r.useState)(!0),ue=ce[0],de=ce[1],fe=(0,r.useState)(""),ve=fe[0],pe=fe[1],xe=(0,r.useState)(!1),he=xe[0],me=xe[1],ge=(0,r.useState)("text"),ye=ge[0],be=ge[1],je=(0,r.useState)(!1),we=je[0],Oe=je[1],Se=(0,r.useState)(!1),Ne=Se[0],Ce=Se[1],Pe=(0,r.useState)([]),ke=Pe[0],qe=Pe[1],Ee=((0,r.useState)({isCompositions:!0})[0],(0,r.useRef)(null)),Le=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),De(e.defaultValue))}),[]),(0,r.useEffect)((function(){U!==ye&&be(U)}),[U]),(0,r.useEffect)((function(){void 0!==A&&(pe(A),De(A))}),[A]),(0,r.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,r.useEffect)((function(){J&&Oe(he)}),[he,J]),(0,r.useEffect)((function(){return we?window.addEventListener("keydown",Me):window.removeEventListener("keydown",Me),function(){window.removeEventListener("keydown",Me)}}),[we]),(0,r.useEffect)((function(){if(!he&&ve){var t=Fe(ve);if(t!==ve){var n={};n.target=Ee.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[ve,he]);var _e,Fe=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},De=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Ie=function(){j||(de(!1),(Ee&&Ee.current).focus())},Te=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentDom,r="nextSibling",i=".text-field-select-content-item";38===n&&(r="previousSibling",i=".text-field-select-content-item:last-child"),o?(o=o[r])||(o=t.querySelector(i)):o=t.querySelector(".text-field-select-content-item"),o&&(o.classList.add("text-field-select-content-item-keydown"),Ae(o,t))},Ae=function(e,t){var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;t.scrollTop=o>0?o:0},Me=function(e){var t=document.querySelector("."+se),n=null,o=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&o){var r=o.dataset.val;Je(JSON.parse(r))(e),(Ee&&Ee.current).blur()}o&&(n=o,o.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n})},Be=function(e){me(!1),""===e.target.value&&de(!0),Q&&Q(e)},Re=function(e){Ce(!0),J&&J(e,(function(e){qe(e||[]),Ce(!1)}))},Ue=function(e){me(!0),X&&X(e),Re(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(pe(n),De(n)),ee&&ee(t),Re(t.target.value)},Ve=function(e){13===e.keyCode&&oe&&oe(e),te&&te(e)},ze=function(e){ne&&ne(e)},We=function(e){"password"===U&&("text"===ye&&be("password"),"password"===ye&&be("text")),K&&K(e)},He=function(){Oe(!1)},Je=function(e){return function(t){ae&&ae(e)}},Ze=(0,r.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:void 0!==H&&(0,o.jsx)("span",v({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),$e=(0,r.useMemo)((function(){var e=V||("password"===U?"password"===ye?(0,o.jsx)(d(),{},void 0):(0,o.jsx)(c(),{},void 0):null);return(0,o.jsx)(o.Fragment,{children:W&&e&&(0,o.jsx)("span",v({className:"right-icon",onClick:We},{children:e}),void 0)},void 0)}),[W,V,U,ye]),Ye=(0,r.useMemo)((function(){return(0,o.jsxs)("div",v({className:"text-field-content-within",ref:Le},{children:[(0,o.jsxs)("div",v({className:"text-field-content-within-input"},{children:[O?(0,o.jsx)("textarea",v({ref:Ee,rows:k,onBlur:Be,onFocus:Ue,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0):(0,o.jsx)("input",v({ref:Ee,type:ye,onBlur:Be,onFocus:Ue,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0),ue&&!he&&(0,o.jsx)("span",v({className:"text-field-label-placeholder",onClick:Ie},{children:"outside"===x?m:(0,o.jsxs)(o.Fragment,{children:[y||m,N&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,o.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[ue,he,B,ye,ve,Ze,$e,x,m,y,j,O,k,le,ee,J]),Ge=(0,r.useMemo)((function(){var e;return(0,o.jsxs)("div",v({className:(e="text-field-select-content",Ne&&(e+=" text-field-select-content-loading"),se&&(e+=" "+se),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[ke&&ke.map((function(e,t){return(0,o.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Je(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,o.jsx)(a.default,{children:e[G]},void 0)}),t)})),Ne&&(0,o.jsx)(l.default,{},void 0)]}),void 0)}),[Le,we,ke,$,G,ae,Ne,se]),Qe=(0,r.useMemo)((function(){return(0,o.jsx)(i.Tooltip,v({open:we,title:Ge,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",s&&(e+=" paraui-text-field-select-"+s),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[ue,he,B,ye,ve,Ze,$e,x,m,y,j,O,k,le,ee,J,ae,Le,we,Z,s]),Xe=(0,r.useMemo)((function(){var e=Boolean(N||C||y);return(0,o.jsx)(o.Fragment,{children:"outside"===x&&e&&(0,o.jsxs)("label",v({className:"text-field-label"},{children:[y,N&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),C&&(0,o.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[x,y,C,N]);return(0,o.jsxs)("div",v({className:(_e="paraui-text-field",_e+=" text-field",s&&!O&&(_e+=" text-field-"+s),t&&(_e+=" "+t),E&&(_e+=" text-field-error"),he&&(_e+=" text-field-focus"),j&&(_e+=" text-field-disabled"),O&&(_e+=" text-field-multiline"),e.limitLength&&ve&&ve.toString().length>e.limitLength&&(_e+=" text-field-limit"),_e)},{children:[Xe,(0,o.jsxs)("div",v({className:"text-field-content"},{children:[D&&(0,o.jsx)("div",v({className:"text-field-content-before",onClick:function(e){re&&re(e)}},{children:D}),void 0),J?Qe:Ye,T&&(0,o.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:T}),void 0)]}),void 0),_&&(0,o.jsx)("p",v({className:"text-field-error-text"},{children:_}),void 0)]}),void 0)}},7371:function(e,t,n){var o=n(5893),r=n(1731),i=n(6010),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,s=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,o.jsx)(r.Tooltip,a({},e,{classes:s}),void 0)}},1731:function(t){t.exports=e},6243:function(e){e.exports=t},1102:function(e){e.exports=n},5191:function(e){e.exports=o},6570:function(e){e.exports=r},8528:function(e){e.exports=i},3475:function(e){e.exports=a},9297:function(e){e.exports=l}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return s[e](n,n.exports,u),n.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},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,{SingleBox:function(){return c}});var e=u(5893),t=u(9297),n=u(7320),o=u(5191),r=u.n(o),i=u(6243),a=u.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)},s=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},c=function(o){var i=o.className,c=o.size,u=void 0===c?"large":c,d=o.placeholder,f=void 0===d?"":d,v=o.label,p=void 0===v?"":v,x=o.labelSign,h=o.disabled,m=void 0!==h&&h,g=o.required,y=void 0!==g&&g,b=o.error,j=void 0!==b&&b,w=o.helperText,O=void 0===w?"":w,S=o.value,N=o.onChange,C=(0,t.useState)([]),P=C[0],k=C[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&k(s([],o.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==S&&k(s([],S,!0))}),[S]);var q,E=function(e){return function(){m||(P.splice(e,1),void 0===o.value&&k(s([],P,!0)),N&&N(P))}},L=function(e){return function(t){P[e]=t.target.value,void 0===o.value&&k(s([],P,!0)),N&&N(P)}};return(0,e.jsxs)("div",l({className:(q="paraui-single-box single-box",i&&(q+=" "+i),u&&(q+=" single-box-"+u),j&&(q+=" single-box-error"),m&&(q+=" single-box-disabled"),q)},{children:[p?(0,e.jsxs)("label",l({className:"single-box-label"},{children:[p,y&&(0,e.jsx)("span",l({className:"single-box-label-required"},{children:"*"}),void 0),x&&(0,e.jsx)("span",{children:x},void 0)]}),void 0):null,(0,e.jsx)("div",l({className:"single-box-content"},{children:P.map((function(t,o){return(0,e.jsxs)("div",l({className:"single-box-content-item"},{children:[(0,e.jsx)(n.default,{disabled:m,value:t,placeholder:f,size:u,onChange:L(o)},void 0),(0,e.jsx)("span",l({className:"single-box-content-item-svg"},{children:(0,e.jsx)(a(),{onClick:E(o)},void 0)}),void 0)]}),o)}))}),void 0),(0,e.jsx)("div",l({className:"single-box-add",onClick:function(){m||(P.push(""),void 0===o.value&&k(s([],P,!0)),N&&N(P))}},{children:(0,e.jsx)(r(),{},void 0)}),void 0),O&&(0,e.jsx)("p",l({className:"single-box-error"},{children:O}),void 0)]}),void 0)};d.default=c}(),d}()}));
@@ -0,0 +1,2 @@
1
+ .paraui-slider{position:relative;height:8px;padding:0;width:100%;border-radius:4px;touch-action:none;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.paraui-slider *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.paraui-slider-rail{position:absolute;width:100%;background-color:rgba(171,176,185,0.2);height:8px;border-radius:4px}.paraui-slider-track{position:absolute;left:0;height:8px;border-radius:4px;background-color:#3666d6}.paraui-slider-handle{position:absolute;width:16px;height:16px;cursor:pointer;margin-top:-4px;border-radius:50%;border:solid 2px #3666d6;background-color:#fff;touch-action:pan-x}.paraui-slider-handle-dragging{border-color:#3666d6;box-shadow:0 0 5px rgba(54,102,214,0.2);outline:2px solid rgba(54,102,214,0.2)}.paraui-slider-handle:focus{outline:none}.paraui-slider-handle-click-focused:focus{border-color:#3666d6;box-shadow:unset}.paraui-slider-handle:hover{border-color:#3666d6}.paraui-slider-handle:active{border-color:#3666d6;box-shadow:0 0 5px rgba(54,102,214,0.2);outline:2px solid rgba(54,102,214,0.2);cursor:grabbing}.paraui-slider-mark{position:absolute;top:18px;left:0;width:100%;font-size:12px}.paraui-slider-mark-text{position:absolute;display:inline-block;vertical-align:middle;text-align:center;cursor:pointer;color:#999}.paraui-slider-mark-text-active{color:#666}.paraui-slider-step{position:absolute;width:100%;height:8px;background:transparent}.paraui-slider-dot{position:absolute;bottom:-2px;margin-left:-4px;width:12px;height:12px;border:solid 2px rgba(171,176,185,0.4);background-color:#fff;cursor:pointer;border-radius:50%;vertical-align:middle}.paraui-slider-dot-active{border-color:#3666d6}.paraui-slider-dot-reverse{margin-right:-4px}.paraui-slider-disabled{background-color:#e9e9e9}.paraui-slider-disabled .paraui-slider-track{background-color:#ccc}.paraui-slider-disabled .paraui-slider-handle,.paraui-slider-disabled .paraui-slider-dot{border-color:#ccc;box-shadow:none;background-color:#fff;cursor:not-allowed}.paraui-slider-disabled .paraui-slider-mark-text,.paraui-slider-disabled .paraui-slider-dot{cursor:not-allowed !important}.paraui-slider-vertical{width:14px;height:100%;padding:0 5px}.paraui-slider-vertical .paraui-slider-rail{height:100%;width:4px}.paraui-slider-vertical .paraui-slider-track{left:5px;bottom:0;width:4px}.paraui-slider-vertical .paraui-slider-handle{margin-left:-5px;touch-action:pan-y}.paraui-slider-vertical .paraui-slider-mark{top:0;left:18px;height:100%}.paraui-slider-vertical .paraui-slider-step{height:100%;width:4px}.paraui-slider-vertical .paraui-slider-dot{left:2px;margin-bottom:-4px}.paraui-slider-vertical .paraui-slider-dot:first-child{margin-bottom:-4px}.paraui-slider-vertical .paraui-slider-dot:last-child{margin-bottom:-4px}.paraui-slider-tooltip-zoom-down-enter,.paraui-slider-tooltip-zoom-down-appear{animation-duration:0.3s;animation-fill-mode:both;display:block !important;animation-play-state:paused}.paraui-slider-tooltip-zoom-down-leave{animation-duration:0.3s;animation-fill-mode:both;display:block !important;animation-play-state:paused}.paraui-slider-tooltip-zoom-down-enter.paraui-slider-tooltip-zoom-down-enter-active,.paraui-slider-tooltip-zoom-down-appear.paraui-slider-tooltip-zoom-down-appear-active{animation-name:rcSliderTooltipZoomDownIn;animation-play-state:running}.paraui-slider-tooltip-zoom-down-leave.paraui-slider-tooltip-zoom-down-leave-active{animation-name:rcSliderTooltipZoomDownOut;animation-play-state:running}.paraui-slider-tooltip-zoom-down-enter,.paraui-slider-tooltip-zoom-down-appear{transform:scale(0, 0);animation-timing-function:cubic-bezier(0.23, 1, 0.32, 1)}.paraui-slider-tooltip-zoom-down-leave{animation-timing-function:cubic-bezier(0.755, 0.05, 0.855, 0.06)}@keyframes rcSliderTooltipZoomDownIn{0%{opacity:0;transform-origin:50% 100%;transform:scale(0, 0)}100%{transform-origin:50% 100%;transform:scale(1, 1)}}@keyframes rcSliderTooltipZoomDownOut{0%{transform-origin:50% 100%;transform:scale(1, 1)}100%{opacity:0;transform-origin:50% 100%;transform:scale(0, 0)}}.paraui-slider-tooltip{position:absolute;display:block;left:-9999px;top:-9999px;max-width:250px;z-index:1500;visibility:visible;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.paraui-slider-tooltip *{box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.paraui-slider-tooltip-hidden{display:none}.paraui-slider-tooltip-placement-top{padding:4px 0 8px 0}.paraui-slider-tooltip-inner{min-width:24px;font-size:14px;line-height:1;color:rgba(46,55,67,0.701961);text-align:center;text-decoration:none;background-color:transparent;border-radius:6px;white-space:nowrap;box-shadow:none}.paraui-slider-tooltip-arrow{display:none;position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.paraui-slider-tooltip-placement-top .paraui-slider-tooltip-arrow{bottom:4px;left:50%;margin-left:-4px;border-width:4px 4px 0;border-top-color:#6c6c6c}
2
+
package/Slider/index.js CHANGED
@@ -1,10 +1,10 @@
1
- !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("rc-slider"),require("react")):"function"==typeof define&&define.amd?define(["rc-slider","react"],r):"object"==typeof exports?exports.ParaUI=r(require("rc-slider"),require("react")):e.ParaUI=r(e["rc-slider"],e.react)}(self,(function(e,r){return function(){"use strict";var t,n={4126:function(e){
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("rc-slider"),require("react")):"function"==typeof define&&define.amd?define(["rc-slider","react"],r):"object"==typeof exports?exports.ParaUI=r(require("rc-slider"),require("react")):e.ParaUI=r(e["rc-slider"],e.react)}(self,(function(e,r){return function(){"use strict";var t={7418:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=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 r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var u,a,f=o(e),c=1;c<arguments.length;c++){for(var l in u=Object(arguments[c]))t.call(u,l)&&(f[l]=u[l]);if(r){a=r(u);for(var p=0;p<a.length;p++)n.call(u,a[p])&&(f[a[p]]=u[a[p]])}}return f}},9524:function(e,r,t){
7
+ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=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 r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,f=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))t.call(a,l)&&(f[l]=a[l]);if(r){u=r(a);for(var p=0;p<u.length;p++)n.call(a,u[p])&&(f[u[p]]=a[u[p]])}}return f}},5251:function(e,r,t){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=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
- t(4126);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,f={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,i={},c=null,l=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(l=r.ref),r)a.call(r,n)&&!f.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:u.current}}r.jsx=c},7712:function(e,r,t){e.exports=t(9524)},3789:function(e,r,t){t.r(r),t.d(r,{Slider:function(){return l}});var n=t(7712),o=t(9297),i=t.n(o),u=t(4500),a=t.n(u),f=function(){return f=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},f.apply(this,arguments)},c=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},l=function(e){var r,t=e.range,o=e.step,l=c(e,["range","step"]),p="paraui-slider",s="paraui-slider-tooltip";"object"==typeof t&&(r=t.draggableTrack);var d=i().useState({}),b=d[0],v=d[1],y=function(e,r){v((function(t){var n;return f(f({},t),((n={})[e]=r,n))}))},O=function(e,r){return e||(r?"right":"top")},g=function(e){return"number"==typeof e?e.toString():""},j=function(r){var t=r.tooltipPrefixCls,o=r.info,i=o.value,a=o.index,l=o.dragging,p=c(o,["value","index","dragging"]),s=e.tipFormatter,d=void 0===s?g:s,v=e.tooltipVisible,j=e.tooltipPlacement,h=e.getTooltipPopupContainer,m=void 0===h?function(e){return e}:h,x=e.vertical,P=!!d&&(b[a]||l),_=v||void 0===v&&P;return(0,n.jsx)(u.SliderTooltip,f({prefixCls:t,overlay:d?d(i):"",visible:_,placement:O(j,x),getTooltipContainer:m,destroyTooltipOnHide:!0},{children:(0,n.jsx)(u.Handle,f({},p,{value:i,onMouseEnter:function(){return y(a,!0)},onMouseLeave:function(){return y(a,!1)}}),void 0)}),a)};return t?(0,n.jsx)(u.Range,f({},l,{step:o,pushable:l.pushable,draggableTrack:r,handle:function(e){return j({tooltipPrefixCls:s,info:e})},prefixCls:p}),void 0):(0,n.jsx)(a(),f({},l,{step:o,handle:function(e){return j({tooltipPrefixCls:s,info:e})},prefixCls:p}),void 0)};r.default=l},4500:function(r){r.exports=e},9297:function(e){e.exports=r}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return n[e](t,t.exports,i),t.exports}i.m=n,t=[],i.O=function(e,r,n,o){if(!r){var u=1/0;for(c=0;c<t.length;c++){r=t[c][0],n=t[c][1],o=t[c][2];for(var a=!0,f=0;f<r.length;f++)(!1&o||u>=o)&&Object.keys(i.O).every((function(e){return i.O[e](r[f])}))?r.splice(f--,1):(a=!1,o<u&&(u=o));a&&(t.splice(c--,1),e=n())}return e}o=o||0;for(var c=t.length;c>0&&t[c-1][2]>o;c--)t[c]=t[c-1];t[c]=[r,n,o]},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,{a:r}),r},i.d=function(e,r){for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={8859:0,9296:0};i.O.j=function(r){return 0===e[r]};var r=function(r,t){var n,o,u=t[0],a=t[1],f=t[2],c=0;for(n in a)i.o(a,n)&&(i.m[n]=a[n]);if(f)var l=f(i);for(r&&r(t);c<u.length;c++)o=u[c],i.o(e,o)&&e[o]&&e[o][0](),e[u[c]]=0;return i.O(l)},t=self.webpackChunkParaUI=self.webpackChunkParaUI||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))}();var u=i.O(void 0,[9296],(function(){return i(3789)}));return u=i.O(u)}()}));
16
+ t(7418);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,f={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,i={},c=null,l=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(l=r.ref),r)u.call(r,n)&&!f.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}r.jsx=c},5893:function(e,r,t){e.exports=t(5251)},4500:function(r){r.exports=e},9297:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){o.r(i),o.d(i,{Slider:function(){return c}});var e=o(5893),r=o(9297),t=o.n(r),n=o(4500),a=o.n(n),u=function(){return u=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},u.apply(this,arguments)},f=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},c=function(r){var o,i=r.range,c=r.step,l=f(r,["range","step"]),p="paraui-slider",s="paraui-slider-tooltip";"object"==typeof i&&(o=i.draggableTrack);var d=t().useState({}),y=d[0],b=d[1],v=function(e,r){b((function(t){var n;return u(u({},t),((n={})[e]=r,n))}))},O=function(e,r){return e||(r?"right":"top")},g=function(e){return"number"==typeof e?e.toString():""},j=function(t){var o=t.tooltipPrefixCls,i=t.info,a=i.value,c=i.index,l=i.dragging,p=f(i,["value","index","dragging"]),s=r.tipFormatter,d=void 0===s?g:s,b=r.tooltipVisible,j=r.tooltipPlacement,m=r.getTooltipPopupContainer,x=void 0===m?function(e){return e}:m,h=r.vertical,P=!!d&&(y[c]||l),_=b||void 0===b&&P;return(0,e.jsx)(n.SliderTooltip,u({prefixCls:o,overlay:d?d(a):"",visible:_,placement:O(j,h),getTooltipContainer:x,destroyTooltipOnHide:!0},{children:(0,e.jsx)(n.Handle,u({},p,{value:a,onMouseEnter:function(){return v(c,!0)},onMouseLeave:function(){return v(c,!1)}}),void 0)}),c)};return i?(0,e.jsx)(n.Range,u({},l,{step:c,pushable:l.pushable,draggableTrack:o,handle:function(e){return j({tooltipPrefixCls:s,info:e})},prefixCls:p}),void 0):(0,e.jsx)(a(),u({},l,{step:c,handle:function(e){return j({tooltipPrefixCls:s,info:e})},prefixCls:p}),void 0)};i.default=c}(),i}()}));
@@ -0,0 +1,2 @@
1
+ .para-split{display:flex;min-height:200px;-webkit-user-select:none;user-select:none}.para-split-left{background-color:#ffffff;position:relative;min-width:201px}.para-split-left .para-split-separator{display:flex;justify-content:center;align-items:center;position:absolute;top:0;right:0;width:6px;height:100%;background-color:white;box-shadow:0 0 2px rgba(0,0,0,0.35);cursor:col-resize}.para-split-left .para-split-separator i{display:inline-block;height:14px;width:1px;background-color:#e9e9e9;margin:0 1px}.para-split-left-content{padding:20px 34px 20px 20px}.para-split .para-split-right{background-color:#ffffff;flex:1}.para-split .para-split-right-content{padding:20px}
2
+
package/Split/index.js CHANGED
@@ -1,10 +1,10 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ParaUI=t(require("react")):e.ParaUI=t(e.react)}(self,(function(e){return function(){"use strict";var t,r={4126:function(e){
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ParaUI=t(require("react")):e.ParaUI=t(e.react)}(self,(function(e){return function(){"use strict";var t={7418:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=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 t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var u,c,a=o(e),f=1;f<arguments.length;f++){for(var l in u=Object(arguments[f]))r.call(u,l)&&(a[l]=u[l]);if(t){c=t(u);for(var s=0;s<c.length;s++)n.call(u,c[s])&&(a[c[s]]=u[c[s]])}}return a}},9524:function(e,t,r){
7
+ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=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 t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var c,u,a=o(e),l=1;l<arguments.length;l++){for(var f in c=Object(arguments[l]))r.call(c,f)&&(a[f]=c[f]);if(t){u=t(c);for(var s=0;s<u.length;s++)n.call(c,u[s])&&(a[u[s]]=c[u[s]])}}return a}},5251:function(e,t,r){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=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 n=r(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,a={key:!0,ref:!0,__self:!0,__source:!0};function f(e,t,r){var n,i={},f=null,l=null;for(n in void 0!==r&&(f=""+r),void 0!==t.key&&(f=""+t.key),void 0!==t.ref&&(l=t.ref),t)c.call(t,n)&&!a.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:f,ref:l,props:i,_owner:u.current}}t.jsx=f,t.jsxs=f},7712:function(e,t,r){e.exports=r(9524)},5661:function(e,t,r){r.r(t);var n=r(7712),o=r(9297),i=r.n(o),u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};t.default=function(e){var t,r,o,c=e.minWidth,a=void 0===c?200:c,f=e.children,l=i().useRef(null),s=i().useRef(null),d=i().useRef(null),p=i().useState({left:null,right:null}),v=p[0],m=p[1],h=function(e){t=e.clientX,o=O(d.current),r=O(s.current),document.documentElement.addEventListener("mousemove",y),document.documentElement.addEventListener("mouseup",b)},y=function(e){var n=r+e.clientX-t;o-n<=a||n<=a||(s.current.style.width=n+"px")},b=function(e){document.documentElement.removeEventListener("mousemove",y),document.documentElement.removeEventListener("mouseup",b)},O=function(e){return parseInt(e.getBoundingClientRect().width,10)};return i().useEffect((function(){var e;l.current&&(null===(e=l.current)||void 0===e||e.addEventListener("mousedown",h))}),[l]),i().useEffect((function(){if(f&&"object"==typeof f&&m({left:f,right:null}),f&&Array.isArray(f)){var e=f.slice(0,Math.floor(f.length/2)),t=f.slice(Math.floor(f.length/2),f.length);m({left:e,right:t})}}),[f]),(0,n.jsxs)("div",u({className:"para-split",ref:d},{children:[(0,n.jsxs)("div",u({className:"para-split-left"},{children:[(0,n.jsx)("div",u({className:"para-split-left-content",ref:s},{children:v.left}),void 0),(0,n.jsxs)("div",u({className:"para-split-separator",ref:l},{children:[(0,n.jsx)("i",{},void 0),(0,n.jsx)("i",{},void 0)]}),void 0)]}),void 0),(0,n.jsx)("div",u({className:"para-split-right"},{children:(0,n.jsx)("div",u({className:"para-split-right-content"},{children:v.right}),void 0)}),void 0)]}),void 0)}},9297:function(t){t.exports=e}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,t=[],o.O=function(e,r,n,i){if(!r){var u=1/0;for(f=0;f<t.length;f++){r=t[f][0],n=t[f][1],i=t[f][2];for(var c=!0,a=0;a<r.length;a++)(!1&i||u>=i)&&Object.keys(o.O).every((function(e){return o.O[e](r[a])}))?r.splice(a--,1):(c=!1,i<u&&(u=i));c&&(t.splice(f--,1),e=n())}return e}i=i||0;for(var f=t.length;f>0&&t[f-1][2]>i;f--)t[f]=t[f-1];t[f]=[r,n,i]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={1373:0,9296:0};o.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,i,u=r[0],c=r[1],a=r[2],f=0;for(n in c)o.o(c,n)&&(o.m[n]=c[n]);if(a)var l=a(o);for(t&&t(r);f<u.length;f++)i=u[f],o.o(e,i)&&e[i]&&e[i][0](),e[u[f]]=0;return o.O(l)},r=self.webpackChunkParaUI=self.webpackChunkParaUI||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var i=o.O(void 0,[9296],(function(){return o(5661)}));return i=o.O(i)}()}));
16
+ r(7418);var n=r(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,i={},l=null,f=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(f=t.ref),t)u.call(t,n)&&!a.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:f,props:i,_owner:c.current}}t.jsx=l,t.jsxs=l},5893:function(e,t,r){e.exports=r(5251)},9297:function(t){t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.r(o);var e=n(5893),t=n(9297),r=n.n(t),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};o.default=function(t){var n,o,c,u=t.minWidth,a=void 0===u?200:u,l=t.children,f=r().useRef(null),s=r().useRef(null),d=r().useRef(null),p=r().useState({left:null,right:null}),v=p[0],m=p[1],y=function(e){n=e.clientX,c=b(d.current),o=b(s.current),document.documentElement.addEventListener("mousemove",h),document.documentElement.addEventListener("mouseup",j)},h=function(e){var t=o+e.clientX-n;c-t<=a||t<=a||(s.current.style.width=t+"px")},j=function(e){document.documentElement.removeEventListener("mousemove",h),document.documentElement.removeEventListener("mouseup",j)},b=function(e){return parseInt(e.getBoundingClientRect().width,10)};return r().useEffect((function(){var e;f.current&&(null===(e=f.current)||void 0===e||e.addEventListener("mousedown",y))}),[f]),r().useEffect((function(){if(l&&"object"==typeof l&&m({left:l,right:null}),l&&Array.isArray(l)){var e=l.slice(0,Math.floor(l.length/2)),t=l.slice(Math.floor(l.length/2),l.length);m({left:e,right:t})}}),[l]),(0,e.jsxs)("div",i({className:"para-split",ref:d},{children:[(0,e.jsxs)("div",i({className:"para-split-left"},{children:[(0,e.jsx)("div",i({className:"para-split-left-content",ref:s},{children:v.left}),void 0),(0,e.jsxs)("div",i({className:"para-split-separator",ref:f},{children:[(0,e.jsx)("i",{},void 0),(0,e.jsx)("i",{},void 0)]}),void 0)]}),void 0),(0,e.jsx)("div",i({className:"para-split-right"},{children:(0,e.jsx)("div",i({className:"para-split-right-content"},{children:v.right}),void 0)}),void 0)]}),void 0)}}(),o}()}));
@@ -0,0 +1,2 @@
1
+ .paraui-stepper-step+div .paraui-stepper-connector>span{border:0;height:1px;background:linear-gradient(90deg, #3d66f8, #7793f9 74%, #d8dffa)}.paraui-stepper .paraui-stepper-step-label{margin-top:8px;color:rgba(46,55,67,0.701961);font-size:14px}.paraui-stepper .paraui-stepper-step-label--active{color:#3666d6}.paraui-stepper .paraui-stepper-step-label--completed{color:#2e3743}.paraui-stepper-step-icon{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;background-color:rgba(171,176,185,0.121569);border-radius:50%}.paraui-stepper-step-icon>svg{color:rgba(46,55,67,0.701961)}.paraui-stepper-step-icon--active{background-color:#3666d6}.paraui-stepper-step-icon--active>svg{color:#fff}.paraui-stepper-step-icon--completed{background-color:rgba(54,102,214,0.8)}.paraui-stepper-step-icon--completed>svg{color:#fff}.paraui-stepper-step-icon--one>svg{margin-left:-2px}.paraui-stepper .paraui-stepper-connector{top:15px;left:calc(-50% + 25px);right:calc(50% + 25px)}.paraui-stepper .paraui-stepper-connector>span{border-top:1px dashed rgba(171,176,185,0.4)}.paraui-stepper .paraui-stepper-connector--active>span,.paraui-stepper .paraui-stepper-connector--completed>span{border-top:1px solid rgba(171,176,185,0.4)}
2
+
package/Stepper/index.js CHANGED
@@ -1,10 +1,10 @@
1
- !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Eight"),require("@para-ui/icons/Five"),require("@para-ui/icons/Four"),require("@para-ui/icons/Nine"),require("@para-ui/icons/One"),require("@para-ui/icons/Seven"),require("@para-ui/icons/Six"),require("@para-ui/icons/Three"),require("@para-ui/icons/Two"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Eight","@para-ui/icons/Five","@para-ui/icons/Four","@para-ui/icons/Nine","@para-ui/icons/One","@para-ui/icons/Seven","@para-ui/icons/Six","@para-ui/icons/Three","@para-ui/icons/Two","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Eight"),require("@para-ui/icons/Five"),require("@para-ui/icons/Four"),require("@para-ui/icons/Nine"),require("@para-ui/icons/One"),require("@para-ui/icons/Seven"),require("@para-ui/icons/Six"),require("@para-ui/icons/Three"),require("@para-ui/icons/Two"),require("react")):e.ParaUI=r(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Eight"],e["@para-ui/icons/Five"],e["@para-ui/icons/Four"],e["@para-ui/icons/Nine"],e["@para-ui/icons/One"],e["@para-ui/icons/Seven"],e["@para-ui/icons/Six"],e["@para-ui/icons/Three"],e["@para-ui/icons/Two"],e.react)}(self,(function(e,r,n,i,o,t,a,u,c,p,s,f){return function(){"use strict";var l,v={4927:function(e,r,n){function i(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=i(e[r]))&&(o&&(o+=" "),o+=n);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function o(){for(var e,r,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(r=i(e))&&(o&&(o+=" "),o+=r);return o}n.d(r,{Z:function(){return o}})},4126:function(e){
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Eight"),require("@para-ui/icons/Five"),require("@para-ui/icons/Four"),require("@para-ui/icons/Nine"),require("@para-ui/icons/One"),require("@para-ui/icons/Seven"),require("@para-ui/icons/Six"),require("@para-ui/icons/Three"),require("@para-ui/icons/Two"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Eight","@para-ui/icons/Five","@para-ui/icons/Four","@para-ui/icons/Nine","@para-ui/icons/One","@para-ui/icons/Seven","@para-ui/icons/Six","@para-ui/icons/Three","@para-ui/icons/Two","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Eight"),require("@para-ui/icons/Five"),require("@para-ui/icons/Four"),require("@para-ui/icons/Nine"),require("@para-ui/icons/One"),require("@para-ui/icons/Seven"),require("@para-ui/icons/Six"),require("@para-ui/icons/Three"),require("@para-ui/icons/Two"),require("react")):e.ParaUI=r(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Eight"],e["@para-ui/icons/Five"],e["@para-ui/icons/Four"],e["@para-ui/icons/Nine"],e["@para-ui/icons/One"],e["@para-ui/icons/Seven"],e["@para-ui/icons/Six"],e["@para-ui/icons/Three"],e["@para-ui/icons/Two"],e.react)}(self,(function(e,r,n,i,o,t,a,c,u,p,s,f){return function(){"use strict";var l={6010:function(e,r,n){function i(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=i(e[r]))&&(o&&(o+=" "),o+=n);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function o(){for(var e,r,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(r=i(e))&&(o&&(o+=" "),o+=r);return o}n.d(r,{Z:function(){return o}})},7418:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=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 r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,u,c=o(e),p=1;p<arguments.length;p++){for(var s in a=Object(arguments[p]))n.call(a,s)&&(c[s]=a[s]);if(r){u=r(a);for(var f=0;f<u.length;f++)i.call(a,u[f])&&(c[u[f]]=a[u[f]])}}return c}},9524:function(e,r,n){
7
+ var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=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 r={},n=0;n<10;n++)r["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,c,u=o(e),p=1;p<arguments.length;p++){for(var s in a=Object(arguments[p]))n.call(a,s)&&(u[s]=a[s]);if(r){c=r(a);for(var f=0;f<c.length;f++)i.call(a,c[f])&&(u[c[f]]=a[c[f]])}}return u}},5251:function(e,r,n){
8
8
  /** @license React v17.0.2
9
9
  * react-jsx-runtime.production.min.js
10
10
  *
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=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
- n(4126);var i=n(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;o=t("react.element"),t("react.fragment")}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function p(e,r,n){var i,t={},p=null,s=null;for(i in void 0!==n&&(p=""+n),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(s=r.ref),r)u.call(r,i)&&!c.hasOwnProperty(i)&&(t[i]=r[i]);if(e&&e.defaultProps)for(i in r=e.defaultProps)void 0===t[i]&&(t[i]=r[i]);return{$$typeof:o,type:e,key:p,ref:s,props:t,_owner:a.current}}r.jsx=p},7712:function(e,r,n){e.exports=n(9524)},6569:function(e,r,n){n.r(r),n.d(r,{Stepper:function(){return T},default:function(){return I}});var i=n(7712),o=n(9297),t=n.n(o),a=n(1731),u=n(4927),c=n(5283),p=n.n(c),s=n(7139),f=n.n(s),l=n(7214),v=n.n(l),d=n(8764),b=n.n(d),y=n(2873),m=n.n(y),O=n(763),j=n.n(O),h=n(1341),x=n.n(h),g=n(1861),S=n.n(g),q=n(1709),w=n.n(q),_=n(6110),P=n.n(_),k={1:(0,i.jsx)(p(),{},void 0),2:(0,i.jsx)(f(),{},void 0),3:(0,i.jsx)(v(),{},void 0),4:(0,i.jsx)(b(),{},void 0),5:(0,i.jsx)(m(),{},void 0),6:(0,i.jsx)(j(),{},void 0),7:(0,i.jsx)(x(),{},void 0),8:(0,i.jsx)(S(),{},void 0),9:(0,i.jsx)(w(),{},void 0),done:(0,i.jsx)(P(),{},void 0)},E=function(){return E=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},E.apply(this,arguments)},C=function(e,r){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)r.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};function N(e){var r=e.active,n=e.completed,o=e.mode,t=e.icon,a=e.iconComp,c=e.index;return(0,i.jsx)("div",E({className:(0,u.Z)("paraui-stepper-step-icon",{"paraui-stepper-step-icon--active":r,"paraui-stepper-step-icon--completed":n,"paraui-stepper-step-icon--one":"number"===o&&0===c&&r})},{children:n?k.done:"number"===o?k[String(t)]:"icon"===o?a||k.done:void 0}),void 0)}var T=function(e){var r=e.activeStep,n=void 0===r?0:r,o=e.mode,c=void 0===o?"number":o,p=e.steps,s=void 0===p?[]:p,f=e.alternativeLabel,l=void 0===f||f,v=e.orientation,d=void 0===v?"horizontal":v,b=e.className,y=C(e,["activeStep","mode","steps","alternativeLabel","orientation","className"]),m=function(e,r){return t().forwardRef((function(n,o){return(0,i.jsx)(N,E({mode:c,iconComp:e.icon,index:r},n,{ref:o}),void 0)}))};return(0,i.jsx)(a.Stepper,E({className:(0,u.Z)("paraui-stepper",b),activeStep:n,alternativeLabel:l,orientation:d},y,{connector:(0,i.jsx)(a.StepConnector,{classes:{root:"paraui-stepper-connector",active:"paraui-stepper-connector--active",completed:"paraui-stepper-connector--completed"}},void 0)},{children:(null==s?void 0:s.length)?s.map((function(e,r){var o="",t={};return"number"===c?(o=e,t.label=o):"object"==typeof e&&(o=e.label||"",t=E({},e)),(0,i.jsx)(a.Step,E({className:(0,u.Z)(n===r&&"paraui-stepper-step")},{children:(0,i.jsx)(a.StepLabel,E({StepIconComponent:m(t,r),classes:{label:"paraui-stepper-step-label",active:"paraui-stepper-step-label--active",completed:"paraui-stepper-step-label--completed"}},{children:o}),void 0)}),r)})):null}),void 0)},I=T},1731:function(r){r.exports=e},6110:function(e){e.exports=r},1861:function(e){e.exports=n},2873:function(e){e.exports=i},8764:function(e){e.exports=o},1709:function(e){e.exports=t},5283:function(e){e.exports=a},1341:function(e){e.exports=u},763:function(e){e.exports=c},7214:function(e){e.exports=p},7139:function(e){e.exports=s},9297:function(e){e.exports=f}},d={};function b(e){var r=d[e];if(void 0!==r)return r.exports;var n=d[e]={exports:{}};return v[e](n,n.exports,b),n.exports}b.m=v,l=[],b.O=function(e,r,n,i){if(!r){var o=1/0;for(u=0;u<l.length;u++){r=l[u][0],n=l[u][1],i=l[u][2];for(var t=!0,a=0;a<r.length;a++)(!1&i||o>=i)&&Object.keys(b.O).every((function(e){return b.O[e](r[a])}))?r.splice(a--,1):(t=!1,i<o&&(o=i));t&&(l.splice(u--,1),e=n())}return e}i=i||0;for(var u=l.length;u>0&&l[u-1][2]>i;u--)l[u]=l[u-1];l[u]=[r,n,i]},b.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(r,{a:r}),r},b.d=function(e,r){for(var n in r)b.o(r,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},b.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={130:0,9296:0};b.O.j=function(r){return 0===e[r]};var r=function(r,n){var i,o,t=n[0],a=n[1],u=n[2],c=0;for(i in a)b.o(a,i)&&(b.m[i]=a[i]);if(u)var p=u(b);for(r&&r(n);c<t.length;c++)o=t[c],b.o(e,o)&&e[o]&&e[o][0](),e[t[c]]=0;return b.O(p)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))}();var y=b.O(void 0,[9296],(function(){return b(6569)}));return y=b.O(y)}()}));
16
+ n(7418);var i=n(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;o=t("react.element"),t("react.fragment")}var a=i.__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 p(e,r,n){var i,t={},p=null,s=null;for(i in void 0!==n&&(p=""+n),void 0!==r.key&&(p=""+r.key),void 0!==r.ref&&(s=r.ref),r)c.call(r,i)&&!u.hasOwnProperty(i)&&(t[i]=r[i]);if(e&&e.defaultProps)for(i in r=e.defaultProps)void 0===t[i]&&(t[i]=r[i]);return{$$typeof:o,type:e,key:p,ref:s,props:t,_owner:a.current}}r.jsx=p},5893:function(e,r,n){e.exports=n(5251)},1731:function(r){r.exports=e},6110:function(e){e.exports=r},1861:function(e){e.exports=n},2873:function(e){e.exports=i},8764:function(e){e.exports=o},1709:function(e){e.exports=t},5283:function(e){e.exports=a},1341:function(e){e.exports=c},763:function(e){e.exports=u},7214:function(e){e.exports=p},7139:function(e){e.exports=s},9297:function(e){e.exports=f}},d={};function v(e){var r=d[e];if(void 0!==r)return r.exports;var n=d[e]={exports:{}};return l[e](n,n.exports,v),n.exports}v.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(r,{a:r}),r},v.d=function(e,r){for(var n in r)v.o(r,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},v.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},v.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var b={};return function(){v.r(b),v.d(b,{Stepper:function(){return C},default:function(){return k}});var e=v(5893),r=v(9297),n=v.n(r),i=v(1731),o=v(6010),t=v(5283),a=v.n(t),c=v(7139),u=v.n(c),p=v(7214),s=v.n(p),f=v(8764),l=v.n(f),d=v(2873),y=v.n(d),m=v(763),j=v.n(m),x=v(1341),O=v.n(x),h=v(1861),S=v.n(h),g=v(1709),q=v.n(g),w=v(6110),_=v.n(w),P={1:(0,e.jsx)(a(),{},void 0),2:(0,e.jsx)(u(),{},void 0),3:(0,e.jsx)(s(),{},void 0),4:(0,e.jsx)(l(),{},void 0),5:(0,e.jsx)(y(),{},void 0),6:(0,e.jsx)(j(),{},void 0),7:(0,e.jsx)(O(),{},void 0),8:(0,e.jsx)(S(),{},void 0),9:(0,e.jsx)(q(),{},void 0),done:(0,e.jsx)(_(),{},void 0)},E=function(){return E=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},E.apply(this,arguments)},N=function(e,r){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)r.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};function T(r){var n=r.active,i=r.completed,t=r.mode,a=r.icon,c=r.iconComp,u=r.index;return(0,e.jsx)("div",E({className:(0,o.Z)("paraui-stepper-step-icon",{"paraui-stepper-step-icon--active":n,"paraui-stepper-step-icon--completed":i,"paraui-stepper-step-icon--one":"number"===t&&0===u&&n})},{children:i?P.done:"number"===t?P[String(a)]:"icon"===t?c||P.done:void 0}),void 0)}var C=function(r){var t=r.activeStep,a=void 0===t?0:t,c=r.mode,u=void 0===c?"number":c,p=r.steps,s=void 0===p?[]:p,f=r.alternativeLabel,l=void 0===f||f,d=r.orientation,v=void 0===d?"horizontal":d,b=r.className,y=N(r,["activeStep","mode","steps","alternativeLabel","orientation","className"]),m=function(r,i){return n().forwardRef((function(n,o){return(0,e.jsx)(T,E({mode:u,iconComp:r.icon,index:i},n,{ref:o}),void 0)}))};return(0,e.jsx)(i.Stepper,E({className:(0,o.Z)("paraui-stepper",b),activeStep:a,alternativeLabel:l,orientation:v},y,{connector:(0,e.jsx)(i.StepConnector,{classes:{root:"paraui-stepper-connector",active:"paraui-stepper-connector--active",completed:"paraui-stepper-connector--completed"}},void 0)},{children:(null==s?void 0:s.length)?s.map((function(r,n){var t="",c={};return"number"===u?(t=r,c.label=t):"object"==typeof r&&(t=r.label||"",c=E({},r)),(0,e.jsx)(i.Step,E({className:(0,o.Z)(a===n&&"paraui-stepper-step")},{children:(0,e.jsx)(i.StepLabel,E({StepIconComponent:m(c,n),classes:{label:"paraui-stepper-step-label",active:"paraui-stepper-step-label--active",completed:"paraui-stepper-step-label--completed"}},{children:t}),void 0)}),n)})):null}),void 0)},k=C}(),b}()}));
@@ -0,0 +1,2 @@
1
+ .paraui-switch{position:relative;display:inline-block;min-width:32px;height:14px;line-height:14px;vertical-align:middle;background-color:rgba(171,176,185,0.4);border:0;border-radius:100px;cursor:pointer;transition:all .2s;user-select:none}.paraui-switch:focus{outline:0;box-shadow:none}.paraui-switch-checked:focus{box-shadow:none}.paraui-switch:focus:hover{box-shadow:none}.paraui-switch-checked{background-color:rgba(54,102,214,0.2)}.paraui-switch-loading,.paraui-switch-disabled{cursor:not-allowed;opacity:.4}.paraui-switch-loading *,.paraui-switch-disabled *{box-shadow:none;cursor:not-allowed}.paraui-switch-inner{display:block;margin:0 7px 0 25px;color:#fff;font-size:14px;transition:margin .2s}.paraui-switch-checked .paraui-switch-inner{margin:0 25px 0 7px}.paraui-switch-handle{position:absolute;top:-2px;left:-2px;width:18px;height:18px;transition:all .2s ease-in-out}.paraui-switch-handle::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#8996AA;border-radius:9px;box-shadow:none;transition:all .2s ease-in-out;content:""}.paraui-switch-checked .paraui-switch-handle{left:calc(100% - 18px + 2px)}.paraui-switch-checked .paraui-switch-handle::before{background-color:#3666d6}.paraui-switch:not(.paraui-switch-disabled):active .paraui-switch-handle::before{right:-30%;left:0}.paraui-switch:not(.paraui-switch-disabled):active.paraui-switch-checked .paraui-switch-handle::before{right:0;left:-30%}.paraui-switch-loading-icon{position:relative;top:2px;color:#3666d6;vertical-align:top;animation:loadingCircle 1s infinite linear}.paraui-switch-checked .paraui-switch-loading-icon{color:#fff}.paraui-switch-small{min-width:28px;height:14px;line-height:14px}.paraui-switch-small .paraui-switch-inner{margin:0 5px 0 18px;font-size:14px}.paraui-switch-small .paraui-switch-handle{width:12px;height:12px}.paraui-switch-small .paraui-switch-loading-icon{top:1.5px;font-size:9px}.paraui-switch-small.paraui-switch-checked .paraui-switch-inner{margin:0 18px 0 5px}.paraui-switch-small.paraui-switch-checked .paraui-switch-handle{left:calc(100% - 12px - 2px)}@keyframes loadingCircle{100%{transform:rotate(360deg)}}.paraui-switch-label{display:inline-flex}.paraui-switch-label .paraui-switch-text{color:rgba(46,55,67,0.701961);font-size:14px}.paraui-switch-label-top{flex-direction:column-reverse;align-items:flex-start}.paraui-switch-label-top .paraui-switch-text{margin-bottom:8px}.paraui-switch-label-bottom{flex-direction:column;align-items:flex-start}.paraui-switch-label-bottom .paraui-switch-text{margin-top:8px}.paraui-switch-label-start{flex-direction:row-reverse;align-items:center}.paraui-switch-label-start .paraui-switch-text{margin-right:8px}.paraui-switch-label-end{flex-direction:row;align-items:center}.paraui-switch-label-end .paraui-switch-text{margin-left:8px}
2
+
package/Switch/index.d.ts CHANGED
@@ -56,6 +56,14 @@ export interface SwitchProps {
56
56
  * 紧凑型开关
57
57
  */
58
58
  compact?: boolean;
59
+ /**
60
+ * 文本
61
+ */
62
+ label?: React.ReactNode;
63
+ /**
64
+ * 文本位置
65
+ */
66
+ labelPlacement?: 'top' | 'bottom' | 'start' | 'end';
59
67
  }
60
68
  export declare const Switch: FunctionComponent<SwitchProps>;
61
69
  export default Switch;
package/Switch/index.js CHANGED
@@ -1,10 +1,10 @@
1
- !function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@para-ui/icons/LoadingF"),require("rc-switch"),require("react")):"function"==typeof define&&define.amd?define(["@para-ui/icons/LoadingF","rc-switch","react"],e):"object"==typeof exports?exports.ParaUI=e(require("@para-ui/icons/LoadingF"),require("rc-switch"),require("react")):r.ParaUI=e(r["@para-ui/icons/LoadingF"],r["rc-switch"],r.react)}(self,(function(r,e,t){return function(){"use strict";var n,o={4927:function(r,e,t){function n(r){var e,t,o="";if("string"==typeof r||"number"==typeof r)o+=r;else if("object"==typeof r)if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(t=n(r[e]))&&(o&&(o+=" "),o+=t);else for(e in r)r[e]&&(o&&(o+=" "),o+=e);return o}function o(){for(var r,e,t=0,o="";t<arguments.length;)(r=arguments[t++])&&(e=n(r))&&(o&&(o+=" "),o+=e);return o}t.d(e,{Z:function(){return o}})},4126:function(r){
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@para-ui/icons/LoadingF"),require("rc-switch"),require("react")):"function"==typeof define&&define.amd?define(["@para-ui/icons/LoadingF","rc-switch","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@para-ui/icons/LoadingF"),require("rc-switch"),require("react")):e.ParaUI=r(e["@para-ui/icons/LoadingF"],e["rc-switch"],e.react)}(self,(function(e,r,t){return function(){"use strict";var n={6010:function(e,r,t){function n(e){var r,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(t=n(e[r]))&&(o&&(o+=" "),o+=t);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function o(){for(var e,r,t=0,o="";t<arguments.length;)(e=arguments[t++])&&(r=n(e))&&(o&&(o+=" "),o+=r);return o}t.d(r,{Z:function(){return o}})},7418:function(e){
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
6
  */
7
- var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(r){if(null==r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}r.exports=function(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(r){return e[r]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(r){n[r]=r})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(r){return!1}}()?Object.assign:function(r,i){for(var a,c,u=o(r),f=1;f<arguments.length;f++){for(var s in a=Object(arguments[f]))t.call(a,s)&&(u[s]=a[s]);if(e){c=e(a);for(var l=0;l<c.length;l++)n.call(a,c[l])&&(u[c[l]]=a[c[l]])}}return u}},9524:function(r,e,t){
7
+ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=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 r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,c,s=o(e),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))t.call(a,u)&&(s[u]=a[u]);if(r){c=r(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(s[c[f]]=a[c[f]])}}return s}},5251:function(e,r,t){
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,t=Object.prototype.hasOwnProperty,n=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
- t(4126);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__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 f(r,e,t){var n,i={},f=null,s=null;for(n in void 0!==t&&(f=""+t),void 0!==e.key&&(f=""+e.key),void 0!==e.ref&&(s=e.ref),e)c.call(e,n)&&!u.hasOwnProperty(n)&&(i[n]=e[n]);if(r&&r.defaultProps)for(n in e=r.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:r,key:f,ref:s,props:i,_owner:a.current}}e.jsx=f},7712:function(r,e,t){r.exports=t(9524)},5962:function(r,e,t){t.r(e),t.d(e,{Switch:function(){return l}});var n=t(7712),o=t(4555),i=t.n(o),a=t(4927),c=t(1102),u=t.n(c),f=function(){return f=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},f.apply(this,arguments)},s=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]])}return t},l=function(r){r.compact,r.size;var e=r.loading,t=r.disabled,o=r.className,c=s(r,["compact","size","loading","disabled","className"]),l=(0,a.Z)("paraui-switch",{"paraui-switch-loading":e},o),p=(0,n.jsx)("div",f({className:"paraui-switch-handle"},{children:e&&(0,n.jsx)(u(),{className:"paraui-switch-loading-icon"},void 0)}),void 0);return(0,n.jsx)(i(),f({},c,{prefixCls:"paraui-switch",className:l,disabled:t||e,loadingIcon:p}),void 0)};e.default=l},1102:function(e){e.exports=r},4555:function(r){r.exports=e},9297:function(r){r.exports=t}},i={};function a(r){var e=i[r];if(void 0!==e)return e.exports;var t=i[r]={exports:{}};return o[r](t,t.exports,a),t.exports}a.m=o,n=[],a.O=function(r,e,t,o){if(!e){var i=1/0;for(f=0;f<n.length;f++){e=n[f][0],t=n[f][1],o=n[f][2];for(var c=!0,u=0;u<e.length;u++)(!1&o||i>=o)&&Object.keys(a.O).every((function(r){return a.O[r](e[u])}))?e.splice(u--,1):(c=!1,o<i&&(i=o));c&&(n.splice(f--,1),r=t())}return r}o=o||0;for(var f=n.length;f>0&&n[f-1][2]>o;f--)n[f]=n[f-1];n[f]=[e,t,o]},a.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(e,{a:e}),e},a.d=function(r,e){for(var t in e)a.o(e,t)&&!a.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},a.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},a.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},function(){var r={6195:0,9296:0};a.O.j=function(e){return 0===r[e]};var e=function(e,t){var n,o,i=t[0],c=t[1],u=t[2],f=0;for(n in c)a.o(c,n)&&(a.m[n]=c[n]);if(u)var s=u(a);for(e&&e(t);f<i.length;f++)o=i[f],a.o(r,o)&&r[o]&&r[o][0](),r[i[f]]=0;return a.O(s)},t=self.webpackChunkParaUI=self.webpackChunkParaUI||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}();var c=a.O(void 0,[9296],(function(){return a(5962)}));return c=a.O(c)}()}));
16
+ t(7418);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var n,i={},l=null,u=null;for(n in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!s.hasOwnProperty(n)&&(i[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===i[n]&&(i[n]=r[n]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:a.current}}r.jsx=l,r.jsxs=l},5893:function(e,r,t){e.exports=t(5251)},1102:function(r){r.exports=e},4555:function(e){e.exports=r},9297:function(e){e.exports=t}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return n[e](t,t.exports,i),t.exports}i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,{a:r}),r},i.d=function(e,r){for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{Switch:function(){return u}});var e=i(5893),r=i(4555),t=i.n(r),n=i(6010),o=i(1102),c=i.n(o),s=function(){return s=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},s.apply(this,arguments)},l=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},u=function(r){r.compact,r.size;var o=r.loading,i=r.disabled,a=r.className,u=r.label,f=r.labelPlacement,p=void 0===f?"top":f,d=l(r,["compact","size","loading","disabled","className","label","labelPlacement"]),b=(0,n.Z)("paraui-switch",{"paraui-switch-loading":o},a),y=(0,n.Z)("paraui-switch-label","paraui-switch-label-".concat(p)),v=(0,e.jsx)("div",s({className:"paraui-switch-handle"},{children:o&&(0,e.jsx)(c(),{className:"paraui-switch-loading-icon"},void 0)}),void 0);return u?(0,e.jsxs)("label",s({htmlFor:"",className:y},{children:[(0,e.jsx)(t(),s({},d,{prefixCls:"paraui-switch",className:b,disabled:i||o,loadingIcon:v}),void 0),(0,e.jsx)("span",s({className:"paraui-switch-text"},{children:u}),void 0)]}),void 0):(0,e.jsx)(t(),s({},d,{prefixCls:"paraui-switch",className:b,disabled:i||o,loadingIcon:v}),void 0)};a.default=u}(),a}()}));