@para-ui/core 1.1.31 → 2.0.3
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.
- package/AutoBox/index.d.ts +1 -0
- package/AutoBox/index.js +3 -3
- package/AutoTips/index.d.ts +1 -0
- package/AutoTips/index.js +3 -3
- package/Breadcrumbs/index.d.ts +1 -0
- package/Breadcrumbs/index.js +2 -2
- package/Button/SplitButton.d.ts +42 -0
- package/Button/index.d.ts +28 -7
- package/Button/index.js +3 -3
- package/ButtonGroup/index.d.ts +13 -18
- package/ButtonGroup/index.js +3 -3
- package/Cascader/index.d.ts +52 -0
- package/Cascader/index.js +16 -0
- package/Checkbox/index.d.ts +21 -5
- package/Checkbox/index.js +3 -3
- package/CheckboxGroup/index.d.ts +5 -2
- package/CheckboxGroup/index.js +3 -3
- package/ColorPicker/index.js +1 -1
- package/ComboSelect/WithTabsCombo/index.d.ts +3 -2
- package/ComboSelect/WithTabsCombo/interface.d.ts +6 -1
- package/ComboSelect/index.d.ts +8 -7
- package/ComboSelect/index.js +5 -3
- package/ComboSelect/interface.d.ts +21 -15
- package/ComboSelect/utils.d.ts +5 -0
- package/Container/index.js +4 -3
- package/DatePicker/index.js +3 -3
- package/Desktop/index.js +5 -3
- package/Drawer/index.d.ts +10 -4
- package/Drawer/index.js +16 -1
- package/Drawer/interface.d.ts +63 -0
- package/Form/index.js +3 -3
- package/FormItem/compoments/formFile/index.d.ts +1 -0
- package/FormItem/index.d.ts +46 -45
- package/FormItem/index.js +3 -3
- package/FunctionModal/index.js +5 -3
- package/Help/index.js +2 -2
- package/IconList/index.js +4 -3
- package/InputLang/index.d.ts +3 -0
- package/InputLang/index.js +3 -3
- package/InputNumber/index.d.ts +8 -32
- package/InputNumber/index.js +3 -3
- package/Menu/footerExpansion.d.ts +4 -4
- package/Menu/index.d.ts +5 -4
- package/Menu/index.js +3 -3
- package/Menu/interface.d.ts +12 -125
- package/Menu/logo.d.ts +4 -4
- package/Menu/verticalMenuList.d.ts +4 -4
- package/Message/index.d.ts +8 -0
- package/Message/index.js +4 -3
- package/Modal/Confirm/index.d.ts +3 -4
- package/Modal/index.d.ts +9 -11
- package/Modal/index.js +3 -3
- package/MultiBox/index.d.ts +3 -0
- package/MultiBox/index.js +3 -3
- package/{Menu/horizontalMeunList.d.ts → PageHeader/horizontalMeun.d.ts} +2 -2
- package/{Menu → PageHeader}/horizontalMeunRight.d.ts +4 -4
- package/PageHeader/index.d.ts +10 -0
- package/PageHeader/index.js +16 -0
- package/PageHeader/interface.d.ts +165 -0
- package/Pagination/index.d.ts +6 -0
- package/Pagination/index.js +3 -3
- package/ParauiProvider/index.d.ts +1 -0
- package/ParauiProvider/index.js +3 -3
- package/PopConfirm/index.d.ts +8 -5
- package/PopConfirm/index.js +3 -3
- package/Popover/index.js +3 -3
- package/Radio/index.d.ts +22 -8
- package/Radio/index.js +3 -3
- package/RadioGroup/index.d.ts +8 -4
- package/RadioGroup/index.js +3 -3
- package/Search/index.d.ts +3 -0
- package/Search/index.js +3 -3
- package/Select/index.d.ts +5 -4
- package/Select/index.js +3 -3
- package/SingleBox/index.d.ts +6 -1
- package/SingleBox/index.js +3 -3
- package/Slider/index.d.ts +13 -2
- package/Slider/index.js +16 -1
- package/Slider/interface.d.ts +100 -0
- package/Split/index.js +4 -3
- package/Stepper/index.d.ts +1 -0
- package/Stepper/index.js +3 -3
- package/Styles/index.scss +7 -6
- package/Styles/normalize.scss +348 -0
- package/Styles/theme.scss +53 -0
- package/Switch/index.d.ts +52 -10
- package/Switch/index.js +3 -3
- package/Table/index.d.ts +1 -0
- package/Table/index.js +3 -3
- package/Table/tableBodyInterface.d.ts +1 -1
- package/Tabs/index.d.ts +9 -9
- package/Tabs/index.js +3 -3
- package/TextField/index.d.ts +4 -5
- package/TextField/index.js +3 -3
- package/TimePicker/index.js +3 -3
- package/Timeline/index.d.ts +8 -7
- package/Timeline/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +44 -0
- package/ToggleButton/index.d.ts +44 -0
- package/ToggleButton/index.js +16 -0
- package/{ToolTip → Tooltip}/index.d.ts +4 -3
- package/Tooltip/index.js +16 -0
- package/Transfer/index.d.ts +17 -0
- package/Transfer/index.js +16 -0
- package/Tree/OperateBar/index.d.ts +11 -2
- package/Tree/index.d.ts +1 -0
- package/Tree/index.js +5 -3
- package/Tree/interface.d.ts +14 -10
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +2 -1
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +3 -5
- package/Upload/UploadList/index.d.ts +1 -0
- package/Upload/index.d.ts +11 -9
- package/Upload/index.js +3 -3
- package/Upload/interface.d.ts +22 -14
- package/index.d.ts +5 -1
- package/index.js +3 -3
- package/package.json +8 -2
- package/style.css +100 -0
- package/Breadcrumbs/theme.d.ts +0 -42
- package/Button/theme.d.ts +0 -216
- package/ButtonGroup/SplitButton.d.ts +0 -17
- package/Checkbox/iconMapping.d.ts +0 -2
- package/ComboSelect/styles.d.ts +0 -6
- package/Menu/horizontalMenu.d.ts +0 -9
- package/Menu/verticalFooter.d.ts +0 -9
- package/Menu/verticalMenu.d.ts +0 -9
- package/ParauiProvider/theme/paraTheme.d.ts +0 -3
- package/ParauiProvider/theme/styleConfig.d.ts +0 -74
- package/Radio/iconMapping.d.ts +0 -2
- package/Stepper/theme.d.ts +0 -56
- package/Tabs/theme.d.ts +0 -53
- package/ToolTip/index.js +0 -16
package/SingleBox/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("
|
|
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){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var t=Object.getOwnPropertySymbols,
|
|
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){
|
|
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,o=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
|
-
o(4126);var i=o(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;r=n("react.element"),t.Fragment=n("react.fragment")}var l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,d={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,o){var i,n={},s=null,c=null;for(i in void 0!==o&&(s=""+o),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,i)&&!d.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:r,type:e,key:s,ref:c,props:n,_owner:l.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,o){e.exports=o(9524)},3094:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},s=((0,a.Z)(),(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})})));t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,a=e.tips,c=void 0===a?"":a,u=e.className,p=void 0===u?"":u,f=(0,r.useRef)(),x=s(),g=(0,r.useState)(""),h=g[0],v=g[1];(0,r.useEffect)((function(){v(c)}),[c]);var b;return(0,i.jsx)("div",d({ref:function(e){e&&(f.current=e)},className:(b=x["auto-tips"],b+=" paraui-auto-tips",p&&(b+=" "+p),b),onMouseOver:function(){f.current.scrollWidth>f.current.offsetWidth?v(h||f.current.innerText):v("")}},{children:(0,i.jsx)(n.Tooltip,d({title:h,placement:l},{children:(0,i.jsx)("div",d({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},5415:function(e,t){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return o}},3672:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(3094),a=o(8528),d=o.n(a),s=o(6570),c=o.n(s),u=o(1102),p=o.n(u),f=o(8604),x=o(5415),g=o(3475),h=function(){return h=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},h.apply(this,arguments)},v=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},b=(0,x.Z)(),m=(0,f.makeStyles)((function(){return(0,f.createStyles)({"@keyframes rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"text-field":{fontFamily:b.fontFamily.zh,display:"inline-block",fontSize:b.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& fieldset":{border:0},"& .text-field-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"& .text-field-label":{color:b.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& .text-field-content":{border:"1px solid",borderColor:b.textColor.thirdary,borderRadius:b.borderRadius,position:"relative",display:"table",width:"100%",boxSizing:"border-box","&:hover":{borderColor:b.thmemColor.primary},"& > div":{display:"table-cell",height:"100%",verticalAlign:"top"},"& .text-field-content-before":{color:b.textColor.primary,padding:"0 10px",borderRight:"1px solid "+b.textColor.thirdary,backgroundColor:b.bgBorderColor.bg2,borderBottomLeftRadius:b.borderRadius,borderTopLeftRadius:b.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}},"& .text-field-content-within":{position:"relative",width:"100%","& > *":{display:"table-cell",verticalAlign:"top"},"& svg":{fontSize:"20px",color:b.textColor.secondary,cursor:"pointer"},"& .right-icon":{zIndex:"1",position:"relative",whiteSpace:"nowrap","& > svg":{marginRight:"10px"}},"& .length-limit":{zIndex:"1",position:"relative",paddingRight:"10px",color:b.textColor.secondary},"& .text-field-content-within-input":{width:"100vw","& > div":{width:"100%"},"& input":{height:"100%"},"& input,textarea":{fontSize:b.standardFont.standardFont1.fontSize,color:b.textColor.primary,"&:-ms-clear":{display:"none"},"&:-ms-reveal":{display:"none"}},"& .text-field-label-placeholder":{width:"100%",position:"absolute",left:"0",height:"100%",padding:"0 10px",boxSizing:"border-box",color:b.textColor.thirdary,cursor:"text",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},"& .text-field-content-after":{color:b.textColor.primary,padding:"0 10px",borderLeft:"1px solid",borderColor:b.textColor.thirdary,backgroundColor:b.bgBorderColor.bg2,borderBottomRightRadius:b.borderRadius,borderTopRightRadius:b.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}}},"& .identification-label":{marginLeft:"3px"},"&.text-field-multiline":{"& .text-field-content":{"& .text-field-content-within":{"& > *":{display:"inline-block"},"& .length-limit":{width:"100%",boxSizing:"border-box",textAlign:"right",paddingBottom:"5px"},"& .text-field-content-within-input":{width:"100%","& > div:first-child":{width:"100%","& > div:first-child":{padding:"10px"}},"& .text-field-label-placeholder":{paddingTop:"10px"}}}}},"&.text-field-disabled":{"& .text-field-content":{backgroundColor:b.bgBorderColor.bg3,"&:hover":{borderColor:b.textColor.thirdary},"& .text-field-content-within":{"& .text-field-content-within-input":{"& .text-field-label-placeholder":{cursor:"not-allowed"},"& input":{cursor:"not-allowed",color:b.textColor.thirdary}}}}},"&.text-field-error":{"& .text-field-error-text":{color:b.stateColor.error},"& .text-field-content":{borderColor:b.stateColor.error,"&:hover":{borderColor:b.stateColor.error},"& .text-field-content-before":{borderColor:b.stateColor.error},"& .text-field-content-after":{borderColor:b.stateColor.error}}},"&.text-field-focus":{"& .text-field-content":{borderColor:b.thmemColor.primary,"& .text-field-content-before":{borderColor:b.thmemColor.primary},"& .text-field-content-after":{borderColor:b.thmemColor.primary}}},"&.text-field-small":{"& .text-field-content":{height:"28px","& .text-field-content-before":{lineHeight:"26px","& svg":{top:"3px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"26px","& > div":{height:"100%"}}},"& input":{padding:"5px 10px"},"& .text-field-label-placeholder":{lineHeight:"26px"},"& .right-icon":{paddingTop:"3px"},"& .length-limit":{lineHeight:"26px"}},"& .text-field-content-after":{lineHeight:"26px","& svg":{top:"3px"}}}},"&.text-field-medium":{"& .text-field-content":{height:"34px","& .text-field-content-before":{lineHeight:"32px","& svg":{top:"6px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"32px","& > div":{height:"100%"}}},"& input":{padding:"8px 10px"},"& .text-field-label-placeholder":{lineHeight:"32px"},"& .right-icon":{paddingTop:"7px"},"& .length-limit":{lineHeight:"32px","& svg":{top:"6px"}}},"& .text-field-content-after":{lineHeight:"32px","& svg":{top:"6px"}}}},"&.text-field-large":{"& .text-field-content":{height:"40px","& .text-field-content-before":{lineHeight:"38px","& svg":{top:"9px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"38px","& > div":{height:"100%"}}},"& input":{padding:"11px 10px"},"& .text-field-label-placeholder":{lineHeight:"38px"},"& .right-icon":{paddingTop:"10px"},"& .length-limit":{lineHeight:"38px"}},"& .text-field-content-after":{lineHeight:"38px","& svg":{top:"9px"}}}}},"text-field-select":{"& > div":{maxWidth:"none",padding:"0",backgroundColor:b.textColor.white,boxShadow:b.boxShadow,borderRadius:b.borderRadius,"& > span":{color:b.textColor.white},"& .text-field-select-content":{maxHeight:"300px",overflow:"auto","& > .text-field-select-content-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px",color:b.textColor.secondary,"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary},"&.text-field-select-content-item-keydown":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"&.text-field-select-content-loading":{height:"100px",position:"relative",overflow:"hidden","& > .loading-box":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",backgroundColor:"white",display:"flex",justifyContent:"center",alignItems:"center","& > svg":{transition:"all .3s ease-in-out",animation:"$rotate 1s infinite linear",fontSzie:"20px"}}}}}}})}));t.default=function(e){var t=e.className,o=e.size,a=void 0===o?"small":o,s=e.labelMode,u=void 0===s?"outside":s,f=e.placeholder,x=void 0===f?"":f,b=e.label,y=void 0===b?"":b,w=e.disabled,C=void 0!==w&&w,S=e.multiline,j=void 0!==S&&S,F=e.required,O=void 0!==F&&F,k=e.showLabelSign,N=void 0===k||k,E=e.labelSign,P=e.rows,B=void 0===P?2:P,D=e.error,R=void 0!==D&&D,q=e.helperText,L=void 0===q?"":q,z=e.addonBefore,H=void 0===z?"":z,T=e.addonAfter,I=void 0===T?"":T,_=e.value,A=e.controlled,M=void 0!==A&&A,W=e.autoFocus,U=void 0!==W&&W,K=e.type,Z=void 0===K?"text":K,Y=e.onClickIcon,$=e.rightIcon,J=e.showRightIcon,G=void 0===J||J,Q=e.limitLength,V=e.fetchSuggestions,X=e.selectPopoverClass,ee=e.renderSelectItem,te=e.showSelectName,oe=void 0===te?"value":te,ie=e.onBlur,re=e.onFocus,ne=e.onChange,le=e.onKeydown,ae=e.onKeyUp,de=e.onEnter,se=e.onClickAddonBefore,ce=e.onClickAddonAfter,ue=e.onSelect,pe=v(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","showLabelSign","labelSign","rows","error","helperText","addonBefore","addonAfter","value","controlled","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),fe=m(e),xe=(0,r.useState)("text-field-select-content-"+(0,g.UUID)())[0],ge=(0,r.useState)(!0),he=ge[0],ve=ge[1],be=(0,r.useState)(),me=be[0],ye=be[1],we=(0,r.useState)(!1),Ce=we[0],Se=we[1],je=(0,r.useState)(0),Fe=je[0],Oe=je[1],ke=(0,r.useState)("text"),Ne=ke[0],Ee=ke[1],Pe=(0,r.useState)(!1),Be=Pe[0],De=Pe[1],Re=(0,r.useState)(!1),qe=Re[0],Le=Re[1],ze=(0,r.useState)([]),He=ze[0],Te=ze[1],Ie=((0,r.useState)({})[0],(0,r.useRef)(null)),_e=(0,r.useRef)(null),Ae=(0,r.useRef)(null);(0,r.useEffect)((function(){Ie&&Ie.current&&Oe(Ie.current.offsetWidth)}),[]),(0,r.useEffect)((function(){Z!==Ne&&Ee(Z)}),[Z]),(0,r.useEffect)((function(){ye(_)}),[_]),(0,r.useEffect)((function(){ve(""===me||void 0===me)}),[me]),(0,r.useEffect)((function(){V&&De(Ce)}),[Ce,V]),(0,r.useEffect)((function(){return Be?window.addEventListener("keydown",Ze):window.removeEventListener("keydown",Ze),function(){window.removeEventListener("keydown",Ze)}}),[Be]);var Me,We=function(){C||(ve(!1),(_e&&_e.current&&_e.current.querySelector(j?"textarea":"input")).focus())},Ue=function(e){var t=e.selectDom,o=e.keyCode,i=e.currentDom,r="nextSibling",n=".text-field-select-content-item";38===o&&(r="previousSibling",n=".text-field-select-content-item:last-child"),i?(i=i[r])||(i=t.querySelector(n)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),Ke(i,t))},Ke=function(e,t){var o=t.clientHeight,i=e.offsetTop+e.clientHeight-o;t.scrollTop=i>0?i:0},Ze=function(e){var t=document.querySelector("."+xe),o=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var r=i.dataset.val;tt(JSON.parse(r))(e),(_e&&_e.current&&_e.current.querySelector(j?"textarea":"input")).blur()}i&&(o=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ue({selectDom:t,keyCode:e.keyCode,currentDom:o}),38===e.keyCode&&Ue({selectDom:t,keyCode:e.keyCode,currentDom:o})},Ye=function(e){Se(!1),""===e.target.value&&ve(!0),ie&&ie(e)},$e=function(e){Le(!0),V&&V(e,(function(e){Te(e||[]),Le(!1)}))},Je=function(e){Se(!0),re&&re(e),$e(e.target.value)},Ge=function(e){var t=e.target.value;Q&&void 0!==t&&""!==t&&t.toString().length>Q||(M||ye(t),ne&&ne(e),$e(e.target.value))},Qe=function(e){13===e.keyCode&&de&&de(e),le&&le(e)},Ve=function(e){ae&&ae(e)},Xe=function(e){"password"===Z&&("text"===Ne&&Ee("password"),"password"===Ne&&Ee("text")),Y&&Y(e)},et=function(){De(!1)},tt=function(e){return function(t){ue&&ue(e)}},ot=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==Q&&(0,i.jsx)("span",h({className:"length-limit"},{children:(me?me.toString().length:0)+"/"+Q}),void 0)},void 0)}),[Q,me]),it=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:G&&(0,i.jsx)("span",h({className:"right-icon",onClick:Xe},{children:$||("password"===Z?"password"===Ne?(0,i.jsx)(c(),{},void 0):(0,i.jsx)(d(),{},void 0):null)}),void 0)},void 0)}),[G,$,Z,Ne]),rt=(0,r.useMemo)((function(){return(0,i.jsxs)("div",h({className:"text-field-content-within",ref:Ae},{children:[(0,i.jsxs)("div",h({className:"text-field-content-within-input"},{children:[(0,i.jsx)(n.TextField,h({size:"small",variant:"outlined",autoFocus:U,ref:_e,type:Ne,value:me||"",disabled:C,multiline:j,rows:B,onBlur:Ye,onFocus:Je,onChange:Ge,onKeyDown:Qe,onKeyUp:Ve},pe),void 0),he&&(0,i.jsx)("span",h({className:"text-field-label-placeholder",onClick:We},{children:"outside"===u?x:(0,i.jsxs)(i.Fragment,{children:[y||x,N&&(0,i.jsx)("span",h({className:"identification-label"},{children:E||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)]}),void 0),ot,it]}),void 0)}),[he,U,Ne,me,ot,it,u,x,y,C,j,B,pe,ne,V]),nt=(0,r.useMemo)((function(){var e;return(0,i.jsxs)("div",h({className:(e="text-field-select-content",qe&&(e+=" text-field-select-content-loading"),xe&&(e+=" "+xe),e),style:{width:(Ae&&Ae.current?Ae.current.offsetWidth:0)+"px"}},{children:[He&&He.map((function(e,t){return(0,i.jsx)("div",h({className:"text-field-select-content-item",onMouseDown:tt(e),"data-val":JSON.stringify(e)},{children:ee?ee(e):(0,i.jsx)(l.default,{children:e[oe]},void 0)}),t)})),qe&&(0,i.jsx)("div",h({className:"loading-box"},{children:(0,i.jsx)(p(),{},void 0)}),void 0)]}),void 0)}),[Ae,Be,He,ee,oe,ue,qe,xe]),lt=(0,r.useMemo)((function(){return(0,i.jsx)(n.Tooltip,h({open:Be,title:nt,onClose:et,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e=fe["text-field-select"],X&&(e+=" "+X),e)}},{children:rt}),void 0);var e}),[he,U,Ne,me,ot,it,u,x,y,C,j,B,pe,ne,V,ue,Ae,Be,X]),at=(0,r.useMemo)((function(){var e=Boolean(N&&(E||O));if("outside"===u&&(y||e))return(0,i.jsxs)("label",h({className:"text-field-label"},{children:[y,N&&(0,i.jsx)("span",h({className:"identification-label"},{children:E||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]}),void 0)}),[u,y,N,E,O]);return(0,i.jsxs)("div",h({className:(Me=fe["text-field"],Me+=" text-field",a&&!j&&(Me+=" text-field-"+a),t&&(Me+=" "+t),R&&(Me+=" text-field-error"),Ce&&(Me+=" text-field-focus"),C&&(Me+=" text-field-disabled"),j&&(Me+=" text-field-multiline"),Me)},{children:[at,(0,i.jsxs)("div",h({className:"text-field-content"},{children:[H&&(0,i.jsx)("div",h({className:"text-field-content-before",ref:Ie,onClick:function(e){se&&se(e)}},{children:H}),void 0),V?lt:rt,I&&(0,i.jsx)("div",h({className:"text-field-content-after",onClick:function(e){ce&&ce(e)}},{children:I}),void 0)]}),void 0),L&&(0,i.jsx)("p",h({className:"text-field-error-text",style:{marginLeft:Fe+"px"}},{children:L}),void 0)]}),void 0)}},1731:function(e){e.exports=o},8604:function(e){e.exports=t},6243:function(e){e.exports=d},1102:function(e){e.exports=n},5191:function(e){e.exports=a},6570:function(e){e.exports=r},8528:function(e){e.exports=i},3475:function(e){e.exports=l},9297:function(t){t.exports=e}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return s[e](o,o.exports,u),o.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 o in t)u.o(t,o)&&!u.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 p={};return function(){u.r(p),u.d(p,{SingleBox:function(){return g}});var e=u(7712),t=u(9297),o=u(8604),i=u(3672),r=u(5191),n=u.n(r),l=u(6243),a=u.n(l),d=u(5415),s=function(){return s=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},c=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},f=(0,d.Z)(),x=(0,o.makeStyles)((function(){return(0,o.createStyles)({"single-box":{"&.single-box":{display:"inline-block",width:"100%","& > .single-box-label":{color:f.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .single-box-content":{lineHeight:"0","& > .single-box-content-item":{paddingBottom:"15px",display:"flex","& > .text-field":{paddingBottom:"0",width:"calc(100% - 30px)"},"& > .single-box-content-item-svg":{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",cursor:"pointer"}}},"& > .single-box-add":{textAlign:"center",border:"1px dashed "+f.textColor.thirdary,color:f.textColor.secondary,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:f.borderRadius,"& > svg":{fontSize:"24px"},"&:hover":{border:"1px dashed "+f.thmemColor.primary,color:f.thmemColor.primary}},"& > .single-box-error":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.single-box-small":{"& > .single-box-add":{height:"26px"}},"&.single-box-medium":{"& > .single-box-add":{height:"34px"}},"&.single-box-large":{"& > .single-box-add":{height:"40px"}},"&.single-box-error":{"& > .single-box-error":{color:f.stateColor.error+"!important"}},"&.single-box-disabled":{"& > .single-box-content":{"& > .single-box-content-item":{"& > .single-box-content-item-svg":{cursor:"not-allowed","& > svg":{color:f.textColor.thirdary}}}},"& > .single-box-add":{border:"1px dashed "+f.textColor.thirdary,color:f.textColor.thirdary,cursor:"not-allowed",backgroundColor:f.bgBorderColor.bg3,"& > svg":{color:f.textColor.thirdary},"&:hover":{border:"1px dashed "+f.textColor.thirdary,color:f.textColor.thirdary}}}}}})})),g=function(o){var r=x(o),l=o.className,d=o.size,u=void 0===d?"small":d,p=o.placeholder,f=void 0===p?"":p,g=o.label,h=void 0===g?"":g,v=o.disabled,b=void 0!==v&&v,m=o.required,y=void 0!==m&&m,w=o.error,C=void 0!==w&&w,S=o.helperText,j=void 0===S?"":S,F=o.value,O=o.onChange,k=(0,t.useState)([]),N=k[0],E=k[1];(0,t.useEffect)((function(){F&&E(F)}),[F]);var P,B=function(e){return function(){N.splice(e,1),E(c([],N,!0)),O&&O(N)}},D=function(e){return function(t){N[e]=t.target.value,E(c([],N,!0)),O&&O(N)}};return(0,e.jsxs)("div",s({className:(P=r["single-box"],P+=" single-box",l&&(P+=" "+l),u&&(P+=" single-box-"+u),C&&(P+=" single-box-error"),b&&(P+=" single-box-disabled"),P)},{children:[h?(0,e.jsxs)("label",s({className:"single-box-label"},{children:[h,y&&(0,e.jsx)("span",{children:"(必填)"},void 0)]}),void 0):null,(0,e.jsx)("div",s({className:"single-box-content"},{children:N.map((function(t,o){return(0,e.jsxs)("div",s({className:"single-box-content-item"},{children:[(0,e.jsx)(i.default,{disabled:b,value:t,placeholder:f,size:u,onChange:D(o)},void 0),(0,e.jsx)("span",s({className:"single-box-content-item-svg"},{children:(0,e.jsx)(a(),{onClick:B(o)},void 0)}),void 0)]}),o)}))}),void 0),(0,e.jsx)("div",s({className:"single-box-add",onClick:function(){N.push(""),E(c([],N,!0)),O&&O(N)}},{children:(0,e.jsx)(n(),{},void 0)}),void 0),j&&(0,e.jsx)("p",s({className:"single-box-error"},{children:j}),void 0)]}),void 0)};p.default=g}(),p}()}));
|
|
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],x=v[1];(0,o.useEffect)((function(){x(c)}),[c]);var h;return(0,r.jsx)("div",a({ref:function(e){e&&(f.current=e)},className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(){f.current.scrollWidth>f.current.offsetWidth?x(p||f.current.innerText):x("")}},{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)}},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,x=e.labelSign,h=e.disabled,m=void 0!==h&&h,b=e.required,g=void 0!==b&&b,y=e.error,j=void 0!==y&&y,O=e.helperText,w=void 0===O?"":O,S=e.value,C=e.onChange,k=(0,o.useState)([]),N=k[0],P=k[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||(N.splice(t,1),void 0===e.value&&P(d([],N,!0)),C&&C(N))}},_=function(t){return function(n){N[t]=n.target.value,void 0===e.value&&P(d([],N,!0)),C&&C(N)}};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,g&&(0,r.jsx)("span",u({className:"single-box-label-required"},{children:"*"}),void 0),x&&(0,r.jsx)("span",{children:x},void 0)]}),void 0):null,(0,r.jsx)("div",u({className:"single-box-content"},{children:N.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:_(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||(N.push(""),void 0===e.value&&P(d([],N,!0)),C&&C(N))}},{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(8528),s=n.n(l),c=n(6570),u=n.n(c),d=n(1102),f=n.n(d),v=n(3475),p=function(){return p=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},p.apply(this,arguments)},x=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,l=void 0===n?"large":n,c=e.labelMode,d=void 0===c?"outside":c,h=e.placeholder,m=void 0===h?"":h,b=e.label,g=void 0===b?"":b,y=e.disabled,j=void 0!==y&&y,O=e.multiline,w=void 0!==O&&O,S=e.required,C=void 0!==S&&S,k=e.labelSign,N=e.rows,P=void 0===N?2:N,q=e.error,E=void 0!==q&&q,_=e.helperText,F=void 0===_?"":_,I=e.addonBefore,L=void 0===I?"":I,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=x(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,v.UUID)())[0],ce=(0,o.useState)(!0),ue=ce[0],de=ce[1],fe=(0,o.useState)(""),ve=fe[0],pe=fe[1],xe=(0,o.useState)(!1),he=xe[0],me=xe[1],be=(0,o.useState)("text"),ge=be[0],ye=be[1],je=(0,o.useState)(!1),Oe=je[0],we=je[1],Se=(0,o.useState)(!1),Ce=Se[0],ke=Se[1],Ne=(0,o.useState)([]),Pe=Ne[0],qe=Ne[1],Ee=(0,o.useRef)(null),_e=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),Ie(e.defaultValue))}),[]),(0,o.useEffect)((function(){R!==ge&&ye(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(he)}),[he,J]),(0,o.useEffect)((function(){return Oe?window.addEventListener("keydown",Ae):window.removeEventListener("keydown",Ae),function(){window.removeEventListener("keydown",Ae)}}),[Oe]);var Fe,Ie=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Le=function(){j||(de(!1),(Ee&&Ee.current).focus())},De=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"),Te(r,t))},Te=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},Ae=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;He(JSON.parse(o))(e),(Ee&&Ee.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&De({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&De({selectDom:t,keyCode:e.keyCode,currentDom:n})},Me=function(e){me(!1),""===e.target.value&&de(!0),Q&&Q(e)},Ue=function(e){ke(!0),J&&J(e,(function(e){qe(e||[]),ke(!1)}))},Be=function(e){me(!0),X&&X(e),Ue(e.target.value)},Re=function(t){var n=t.target.value;n&&de(!1),H&&void 0!==n&&""!==n&&n.toString().length>H||(void 0===e.value&&(pe(n),Ie(n)),ee&&ee(t),Ue(t.target.value))},Ke=function(e){13===e.keyCode&&re&&re(e),te&&te(e)},Ve=function(e){ne&&ne(e)},ze=function(e){"password"===R&&("text"===ge&&ye("password"),"password"===ge&&ye("text")),K&&K(e)},We=function(){we(!1)},He=function(e){return function(t){ae&&ae(e)}},Je=(0,o.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:void 0!==H&&(0,r.jsx)("span",p({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),Ze=(0,o.useMemo)((function(){var e=V||("password"===R?"password"===ge?(0,r.jsx)(u(),{},void 0):(0,r.jsx)(s(),{},void 0):null);return(0,r.jsx)(r.Fragment,{children:W&&e&&(0,r.jsx)("span",p({className:"right-icon",onClick:ze},{children:e}),void 0)},void 0)}),[W,V,R,ge]),$e=(0,o.useMemo)((function(){return(0,r.jsxs)("div",p({className:"text-field-content-within",ref:_e},{children:[(0,r.jsxs)("div",p({className:"text-field-content-within-input"},{children:[w?(0,r.jsx)("textarea",p({ref:Ee,rows:P,onBlur:Me,onFocus:Be,onChange:Re,onKeyDown:Ke,onKeyUp:Ve,disabled:j},le),void 0):(0,r.jsx)("input",p({ref:Ee,type:ge,onBlur:Me,onFocus:Be,onChange:Re,onKeyDown:Ke,onKeyUp:Ve,disabled:j},le),void 0),ue&&(0,r.jsx)("span",p({className:"text-field-label-placeholder",onClick:Le},{children:"outside"===d?m:(0,r.jsxs)(r.Fragment,{children:[g||m,C&&(0,r.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),k&&(0,r.jsx)("span",{children:k},void 0)]},void 0)}),void 0)]}),void 0),Je,Ze]}),void 0)}),[ue,U,ge,ve,Je,Ze,d,m,g,j,w,P,le,ee,J]),Ye=(0,o.useMemo)((function(){var e;return(0,r.jsxs)("div",p({className:(e="text-field-select-content",Ce&&(e+=" text-field-select-content-loading"),se&&(e+=" "+se),e),style:{width:(_e&&_e.current?_e.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,r.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:He(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,r.jsx)(a.default,{children:e[G]},void 0)}),t)})),Ce&&(0,r.jsx)("div",p({className:"loading-box"},{children:(0,r.jsx)(f(),{},void 0)}),void 0)]}),void 0)}),[_e,Oe,Pe,$,G,ae,Ce,se]),Ge=(0,o.useMemo)((function(){return(0,r.jsx)(i.Tooltip,p({open:Oe,title:Ye,onClose:We,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",l&&(e+=" paraui-text-field-select-"+l),Z&&(e+=" "+Z),e)}},{children:$e}),void 0);var e}),[ue,U,ge,ve,Je,Ze,d,m,g,j,w,P,le,ee,J,ae,_e,Oe,Z,l]),Qe=(0,o.useMemo)((function(){var e=Boolean(C||k||g);return(0,r.jsx)(r.Fragment,{children:"outside"===d&&e&&(0,r.jsxs)("label",p({className:"text-field-label"},{children:[g,C&&(0,r.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),k&&(0,r.jsx)("span",{children:k},void 0)]}),void 0)},void 0)}),[d,g,k,C]);return(0,r.jsxs)("div",p({className:(Fe="paraui-text-field",Fe+=" text-field",l&&!w&&(Fe+=" text-field-"+l),t&&(Fe+=" "+t),E&&(Fe+=" text-field-error"),he&&(Fe+=" text-field-focus"),j&&(Fe+=" text-field-disabled"),w&&(Fe+=" text-field-multiline"),Fe)},{children:[Qe,(0,r.jsxs)("div",p({className:"text-field-content"},{children:[L&&(0,r.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:L}),void 0),J?Ge:$e,T&&(0,r.jsx)("div",p({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:T}),void 0)]}),void 0),F&&(0,r.jsx)("p",p({className:"text-field-error-text"},{children:F}),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=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper)});return(0,r.jsx)(o.Tooltip,a({},e,{classes:n},{children:e.children}),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,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)}()}));
|
package/Slider/index.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/13 10:57
|
|
4
|
+
* @description 韩振
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { SliderSingleProps, SliderRangeProps } from './interface';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
export declare type Visibles = {
|
|
10
|
+
[index: number]: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const Slider: FunctionComponent<SliderSingleProps | SliderRangeProps>;
|
|
13
|
+
export type { SliderSingleProps, SliderRangeProps };
|
|
3
14
|
export default Slider;
|
package/Slider/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("
|
|
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){
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
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 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}},9524:function(e,r,t){
|
|
8
|
+
/** @license React v17.0.2
|
|
9
|
+
* react-jsx-runtime.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
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,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},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),a=t(4500),u=t.n(a),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,u=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=e.vertical,x=!!d&&(b[u]||l),P=v||void 0===v&&x;return(0,n.jsx)(a.SliderTooltip,f({prefixCls:t,overlay:d?d(i):"",visible:P,placement:O(j,m),getTooltipContainer:h},{children:(0,n.jsx)(a.Handle,f({},p,{value:i,onMouseEnter:function(){return y(u,!0)},onMouseLeave:function(){return y(u,!1)}}),void 0)}),u)};return t?(0,n.jsx)(a.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)(u(),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 a=1/0;for(c=0;c<t.length;c++){r=t[c][0],n=t[c][1],o=t[c][2];for(var u=!0,f=0;f<r.length;f++)(!1&o||a>=o)&&Object.keys(i.O).every((function(e){return i.O[e](r[f])}))?r.splice(f--,1):(u=!1,o<a&&(a=o));u&&(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,a=t[0],u=t[1],f=t[2],c=0;for(n in u)i.o(u,n)&&(i.m[n]=u[n]);if(f)var l=f(i);for(r&&r(t);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[a[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 a=i.O(void 0,[9296],(function(){return i(3789)}));return a=i.O(a)}()}));
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2021/11/5 下午4:05
|
|
4
|
+
* @description
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export declare type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
8
|
+
interface SliderRange {
|
|
9
|
+
draggableTrack?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SliderMarks {
|
|
12
|
+
[key: number]: React.ReactNode | {
|
|
13
|
+
style: React.CSSProperties;
|
|
14
|
+
label: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface HandleGeneratorInfo {
|
|
18
|
+
value?: number;
|
|
19
|
+
dragging?: boolean;
|
|
20
|
+
index: number;
|
|
21
|
+
}
|
|
22
|
+
export declare type HandleGeneratorFn = (config: {
|
|
23
|
+
tooltipPrefixCls?: string;
|
|
24
|
+
info: HandleGeneratorInfo;
|
|
25
|
+
}) => React.ReactElement;
|
|
26
|
+
export interface SliderBaseProps {
|
|
27
|
+
/** 反向坐标 */
|
|
28
|
+
reverse?: boolean;
|
|
29
|
+
/** 最小值 */
|
|
30
|
+
min?: number;
|
|
31
|
+
/** 最大值 */
|
|
32
|
+
max?: number;
|
|
33
|
+
/** 步长,取值必须大于 0,并且可被 (max - min) 整除,
|
|
34
|
+
* 当 marks 不为空对象时,
|
|
35
|
+
* 可以设置 step 为 null,
|
|
36
|
+
* 此时 Slider 的可选值仅有 marks 标出来的部分
|
|
37
|
+
*/
|
|
38
|
+
step?: null | number;
|
|
39
|
+
/** 刻度标记,key 的类型必须为 number
|
|
40
|
+
* 且取值在闭区间 [min, max] 内,每个标签可以单独设置样式
|
|
41
|
+
*/
|
|
42
|
+
marks?: SliderMarks;
|
|
43
|
+
/** 是否只能拖拽到刻度上 */
|
|
44
|
+
dots?: boolean;
|
|
45
|
+
/** marks 不为空对象时有效,值为 true 时表示值为包含关系,false 表示并列 */
|
|
46
|
+
included?: boolean;
|
|
47
|
+
/** 禁用状态 */
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/** 垂直方向 */
|
|
50
|
+
vertical?: boolean;
|
|
51
|
+
/** 提示格式化回调 */
|
|
52
|
+
tipFormatter?: null | ((value?: number) => React.ReactNode);
|
|
53
|
+
/** 类名 */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** tooltip 是否始终显示 */
|
|
56
|
+
tooltipVisible?: boolean;
|
|
57
|
+
/** tooltip 显示位置 */
|
|
58
|
+
tooltipPlacement?: TooltipPlacement;
|
|
59
|
+
/** tooltip 挂载节点 */
|
|
60
|
+
getTooltipPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
61
|
+
/** 是否获得焦点 */
|
|
62
|
+
autoFocus?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface SliderSingleProps extends SliderBaseProps {
|
|
65
|
+
/** 非范围slider */
|
|
66
|
+
range?: false;
|
|
67
|
+
/** 当前值 */
|
|
68
|
+
value?: number;
|
|
69
|
+
/** 默认值 */
|
|
70
|
+
defaultValue?: number;
|
|
71
|
+
/** 值变化时回调 */
|
|
72
|
+
onChange?: (value: number) => void;
|
|
73
|
+
/** 值变化后回调 */
|
|
74
|
+
onAfterChange?: (value: number) => void;
|
|
75
|
+
/** handle 样式 */
|
|
76
|
+
handleStyle?: React.CSSProperties;
|
|
77
|
+
/** 轨道样式 */
|
|
78
|
+
trackStyle?: React.CSSProperties;
|
|
79
|
+
}
|
|
80
|
+
export interface SliderRangeProps extends SliderBaseProps {
|
|
81
|
+
/** 范围slider */
|
|
82
|
+
range: true | SliderRange;
|
|
83
|
+
/** 当前值 */
|
|
84
|
+
value?: number[];
|
|
85
|
+
/** 默认值 */
|
|
86
|
+
defaultValue?: number[];
|
|
87
|
+
/** 值变化时回调 */
|
|
88
|
+
onChange?: (value: number[]) => void;
|
|
89
|
+
/** 值变化后回调 */
|
|
90
|
+
onAfterChange?: (value: number[]) => void;
|
|
91
|
+
/** handle 样式 */
|
|
92
|
+
handleStyle?: React.CSSProperties[];
|
|
93
|
+
/** 轨道样式 */
|
|
94
|
+
trackStyle?: React.CSSProperties[];
|
|
95
|
+
/** 允许跨越 */
|
|
96
|
+
allowCross?: boolean;
|
|
97
|
+
/** 允许推动 */
|
|
98
|
+
pushable?: boolean | number;
|
|
99
|
+
}
|
|
100
|
+
export {};
|
package/Split/index.js
CHANGED
|
@@ -1,9 +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(){
|
|
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){
|
|
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
8
|
/** @license React v17.0.2
|
|
8
9
|
* react-jsx-runtime.production.min.js
|
|
9
10
|
*
|
|
@@ -12,4 +13,4 @@ object-assign
|
|
|
12
13
|
* This source code is licensed under the MIT license found in the
|
|
13
14
|
* LICENSE file in the root directory of this source tree.
|
|
14
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)}()}));
|
package/Stepper/index.d.ts
CHANGED
package/Stepper/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("
|
|
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){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,
|
|
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){
|
|
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,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
|
-
|
|
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)}()}));
|
package/Styles/index.scss
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
@import "normalize";
|
|
2
|
+
@import "theme";
|
|
2
3
|
|
|
3
4
|
* {
|
|
4
|
-
font-family:
|
|
5
|
+
font-family: $font-family;
|
|
5
6
|
margin: 0;
|
|
6
7
|
padding: 0;
|
|
7
8
|
box-sizing: border-box;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
body {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
html, body {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
overflow: hidden;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
ol, ul {
|