@para-ui/core 2.0.18 → 2.0.22
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.js +1 -1
- package/AutoTips/index.js +1 -1
- package/Breadcrumbs/index.js +1 -1
- package/Button/index.d.ts +0 -2
- package/Button/index.js +2 -2
- package/ButtonGroup/index.js +2 -2
- package/Cascader/index.js +1 -1
- package/Checkbox/index.js +1 -1
- package/CheckboxGroup/index.js +1 -1
- package/ColorPicker/index.js +1 -1
- package/ComboSelect/index.js +2 -2
- package/ComboSelect/interface.d.ts +4 -0
- package/Container/index.js +1 -1
- package/DatePicker/index.js +2 -2
- package/Desktop/index.js +1 -1
- package/Drawer/index.js +1 -1
- package/Form/index.d.ts +4 -0
- package/Form/index.js +3 -3
- package/FormItem/index.d.ts +9 -1
- package/FormItem/index.js +3 -3
- package/FormItem/itemType.d.ts +1 -1
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/index.js +3 -3
- package/GlobalContext/index.d.ts +6 -0
- package/GlobalContext/index.js +1 -0
- package/Help/index.js +1 -1
- package/IconList/index.js +2 -2
- package/InputLang/index.js +1 -1
- package/InputNumber/index.js +1 -1
- package/Loading/index.js +1 -1
- package/Menu/index.js +1 -1
- package/Message/index.d.ts +13 -0
- package/Message/index.js +3 -3
- package/Modal/index.js +3 -3
- package/MultiBox/index.js +1 -1
- package/Notification/index.d.ts +52 -0
- package/Notification/index.js +15 -0
- package/PageHeader/index.js +2 -2
- package/Pagination/index.js +2 -2
- package/ParauiProvider/index.d.ts +1 -0
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.js +2 -2
- package/Radio/index.js +1 -1
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +2 -2
- package/Select/index.d.ts +12 -4
- package/Select/index.js +3 -3
- package/SingleBox/index.js +1 -1
- package/Slider/index.js +1 -1
- package/Split/index.js +1 -1
- package/Stepper/index.js +1 -1
- package/Switch/index.js +1 -1
- package/Table/index.js +2 -2
- package/Tabs/index.js +1 -1
- package/Tag/TagGroup.d.ts +57 -0
- package/Tag/index.d.ts +34 -0
- package/Tag/index.js +14 -0
- package/TextField/index.js +1 -1
- package/TimePicker/index.js +2 -2
- package/Timeline/index.js +1 -1
- package/ToggleButton/index.js +3 -3
- package/Tooltip/index.js +1 -1
- package/Transfer/index.js +2 -2
- package/Tree/index.js +1 -1
- package/Upload/index.js +3 -3
- package/cdn/Accordion/index.js +25 -0
- package/cdn/AutoBox/index.js +16 -0
- package/cdn/AutoTips/index.js +40 -0
- package/cdn/Breadcrumbs/index.js +16 -0
- package/cdn/Button/index.js +40 -0
- package/cdn/ButtonGroup/index.js +40 -0
- package/cdn/Cascader/index.js +14 -0
- package/cdn/Checkbox/index.js +1 -0
- package/cdn/CheckboxGroup/index.js +1 -0
- package/cdn/ColorPicker/index.js +1 -0
- package/cdn/ComboSelect/index.js +61 -0
- package/cdn/Container/index.js +1 -0
- package/cdn/DatePicker/index.js +53 -0
- package/cdn/Desktop/index.js +24 -0
- package/cdn/Drawer/index.js +6 -0
- package/cdn/Form/index.js +45 -0
- package/cdn/FormItem/index.js +45 -0
- package/cdn/FunctionModal/index.js +40 -0
- package/cdn/GlobalContext/index.js +1 -0
- package/cdn/Help/index.js +40 -0
- package/cdn/IconList/index.js +16 -0
- package/cdn/InputLang/index.js +40 -0
- package/cdn/InputNumber/index.js +40 -0
- package/cdn/Loading/index.js +1 -0
- package/cdn/Menu/index.js +16 -0
- package/cdn/Message/index.js +1 -0
- package/cdn/Modal/index.js +40 -0
- package/cdn/MultiBox/index.js +40 -0
- package/cdn/Notification/index.js +14 -0
- package/cdn/PageHeader/index.js +40 -0
- package/cdn/Pagination/index.js +45 -0
- package/cdn/ParauiProvider/index.js +9 -0
- package/cdn/PopConfirm/index.js +40 -0
- package/cdn/Popover/index.js +17 -0
- package/cdn/Popper/index.js +26 -0
- package/cdn/Radio/index.js +1 -0
- package/cdn/RadioGroup/index.js +1 -0
- package/cdn/Search/index.js +40 -0
- package/cdn/Select/index.js +40 -0
- package/cdn/SingleBox/index.js +40 -0
- package/cdn/Slider/index.js +14 -0
- package/cdn/Split/index.js +1 -0
- package/cdn/Stepper/index.js +24 -0
- package/cdn/Styles/fonts/SourceHanSansCN-Light.css +8 -0
- package/cdn/Styles/fonts/SourceHanSansCN-Light.otf +0 -0
- package/cdn/Styles/fonts/SourceHanSansCN-Medium.css +8 -0
- package/cdn/Styles/fonts/SourceHanSansCN-Medium.otf +0 -0
- package/cdn/Styles/fonts/SourceHanSansCN-Regular.css +8 -0
- package/cdn/Styles/fonts/SourceHanSansCN-Regular.otf +0 -0
- package/cdn/Styles/index.scss +63 -0
- package/cdn/Styles/index.ts +1 -0
- package/cdn/Styles/normalize.scss +348 -0
- package/cdn/Styles/theme.scss +57 -0
- package/cdn/Switch/index.js +6 -0
- package/cdn/Table/index.js +45 -0
- package/cdn/Tabs/index.js +48 -0
- package/cdn/Tag/index.js +1 -0
- package/cdn/TextField/index.js +40 -0
- package/cdn/TimePicker/index.js +53 -0
- package/cdn/Timeline/index.js +16 -0
- package/cdn/ToggleButton/index.js +40 -0
- package/cdn/Tooltip/index.js +40 -0
- package/cdn/Transfer/index.js +40 -0
- package/cdn/Tree/index.js +53 -0
- package/cdn/Upload/index.js +45 -0
- package/index.d.ts +3 -0
- package/index.js +3 -3
- package/package.json +6 -3
- package/style.css +11 -7
package/SingleBox/index.js
CHANGED
|
@@ -11,4 +11,4 @@ object-assign
|
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/i(7418);var n=i(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var l=n.__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 c(e,t,i){var n,r={},c=null,s=null;for(n in void 0!==i&&(c=""+i),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!d.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:s,props:r,_owner:l.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,i){"use strict";e.exports=i(5251)},9034:function(e,t,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};n(o,r);e.exports=o.locals||{}},3267:function(e,t,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};n(o,r);e.exports=o.locals||{}},7812:function(e,t,i){var n=i(3379),o=i(2645);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};n(o,r);e.exports=o.locals||{}},8632:function(e,t,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};n(o,r);e.exports=o.locals||{}},2560:function(e,t,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};n(o,r);e.exports=o.locals||{}},3379:function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),l=[];function a(e){for(var t=-1,i=0;i<l.length;i++)if(l[i].identifier===e){t=i;break}return t}function d(e,t){for(var i={},n=[],o=0;o<e.length;o++){var r=e[o],d=t.base?r[0]+t.base:r[0],c=i[d]||0,s="".concat(d," ").concat(c);i[d]=c+1;var u=a(s),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(l[u].references++,l[u].updater(f)):l.push({identifier:s,updater:g(f,t),references:1}),n.push(s)}return n}function c(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var l=r(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var s,u=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function f(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var r=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(r,l[t]):e.appendChild(r)}}function p(e,t,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var x=null,h=0;function g(e,t){var i,n,o;if(t.singleton){var r=h++;i=x||(x=c(t)),n=f.bind(null,i,r,!1),o=f.bind(null,i,r,!0)}else i=c(t),n=p.bind(null,i,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var i=d(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=a(i[n]);l[o].references--}for(var r=d(e,t),c=0;c<i.length;c++){var s=a(i[c]);0===l[s].references&&(l[s].updater(),l.splice(s,1))}i=r}}}},7839:function(e,t,i){"use strict";var n=i(5893),o=i(9297),r=i(7371),l=(i(9034),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.children,i=e.placement,a=void 0===i?"bottom-start":i,d=e.tips,c=void 0===d?"":d,s=e.className,u=void 0===s?"":s,f=(0,o.useRef)(),p=(0,o.useState)(""),x=p[0],h=p[1];(0,o.useEffect)((function(){h(c)}),[c]);var g;return(0,n.jsx)("div",l({ref:f,className:(g="paraui-auto-tips",u&&(g+=" "+u),g),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?h(c||f.current.innerText):h("")}},{children:(0,n.jsx)(r.default,l({title:x,placement:a},{children:(0,n.jsx)("div",l({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},7502:function(e,t,i){"use strict";var n=i(5893),o=i(9297),r=i(1102),l=i.n(r),a=(i(3267),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,r=e.opacity,d=void 0===r?.7:r,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 s;return(0,n.jsxs)("div",a({className:(s="paraui-loading",t&&(s+=" "+t),s),style:i,ref:c},{children:[(0,n.jsx)("div",a({className:"paraui-loading-box"},{children:(0,n.jsx)(l(),{},void 0)}),void 0),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:d}},void 0)]}),void 0)}},7320:function(e,t,i){"use strict";var n=i(5893),o=i(9297),r=i(1731),l=i(7839),a=i(7502),d=i(8528),c=i.n(d),s=i(6570),u=i.n(s),f=i(3475),p=(i(8632),function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)}),x=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t=e.className,i=e.size,d=void 0===i?"large":i,s=e.labelMode,h=void 0===s?"outside":s,g=e.placeholder,b=void 0===g?"":g,v=e.label,m=void 0===v?"":v,w=e.disabled,y=void 0!==w&&w,j=e.multiline,S=void 0!==j&&j,O=e.required,k=void 0!==O&&O,C=e.labelSign,N=e.rows,P=void 0===N?2:N,q=e.error,E=void 0!==q&&q,_=e.helperText,L=void 0===_?"":_,M=e.addonBefore,T=void 0===M?"":M,F=e.addonAfter,I=void 0===F?"":F,R=(e.defaultValue,e.value),z=e.autoFocus,A=void 0!==z&&z,D=e.type,U=void 0===D?"text":D,B=e.onClickIcon,H=e.rightIcon,K=e.showRightIcon,V=void 0===K||K,J=e.limitLength,W=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,ie=e.onKeyUp,ne=e.onEnter,oe=e.onClickAddonBefore,re=e.onClickAddonAfter,le=e.onSelect,ae=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"]),de=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,o.useState)(!0),se=ce[0],ue=ce[1],fe=(0,o.useState)(""),pe=fe[0],xe=fe[1],he=(0,o.useState)(!1),ge=he[0],be=he[1],ve=(0,o.useState)("text"),me=ve[0],we=ve[1],ye=(0,o.useState)(!1),je=ye[0],Se=ye[1],Oe=(0,o.useState)(!1),ke=Oe[0],Ce=Oe[1],Ne=(0,o.useState)([]),Pe=Ne[0],qe=Ne[1],Ee=((0,o.useState)({isCompositions:!0})[0],(0,o.useRef)(null)),_e=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(xe(e.defaultValue),Te(e.defaultValue))}),[]),(0,o.useEffect)((function(){U!==me&&we(U)}),[U]),(0,o.useEffect)((function(){void 0!==R&&(xe(R),Te(R))}),[R]),(0,o.useEffect)((function(){ue(""===pe||void 0===pe)}),[pe]),(0,o.useEffect)((function(){W&&Se(ge)}),[ge,W]),(0,o.useEffect)((function(){return je?window.addEventListener("keydown",ze):window.removeEventListener("keydown",ze),function(){window.removeEventListener("keydown",ze)}}),[je]),(0,o.useEffect)((function(){if(!ge&&pe){var t=Me(pe);if(t!==pe){var i={};i.target=Ee.current,i.target.value=t,e.onChange&&e.onChange(i)}}}),[pe,ge]);var Le,Me=function(t){var i=t;return e.limitLength&&t.toString().length>e.limitLength&&(i=i.toString().substr(0,e.limitLength)),i},Te=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Fe=function(){y||(ue(!1),(Ee&&Ee.current).focus())},Ie=function(e){var t=e.selectDom,i=e.keyCode,n=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===i&&(o="previousSibling",r=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(r)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Re(n,t))},Re=function(e,t){var i=t.clientHeight,n=e.offsetTop+e.clientHeight-i;t.scrollTop=n>0?n:0},ze=function(e){var t=document.querySelector("."+de),i=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;We(JSON.parse(o))(e),(Ee&&Ee.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ie({selectDom:t,keyCode:e.keyCode,currentDom:i}),38===e.keyCode&&Ie({selectDom:t,keyCode:e.keyCode,currentDom:i})},Ae=function(e){be(!1),""===e.target.value&&ue(!0),Q&&Q(e)},De=function(e){Ce(!0),W&&W(e,(function(e){qe(e||[]),Ce(!1)}))},Ue=function(e){be(!0),X&&X(e),De(e.target.value)},Be=function(t){var i=t.target.value;i&&ue(!1),void 0===e.value&&(xe(i),Te(i)),ee&&ee(t),De(t.target.value)},He=function(e){13===e.keyCode&&ne&&ne(e),te&&te(e)},Ke=function(e){ie&&ie(e)},Ve=function(e){"password"===U&&("text"===me&&we("password"),"password"===me&&we("text")),B&&B(e)},Je=function(){Se(!1)},We=function(e){return function(t){le&&le(e)}},Ze=(0,o.useMemo)((function(){return(0,n.jsx)(n.Fragment,{children:void 0!==J&&(0,n.jsx)("span",p({className:"length-limit"},{children:(pe?pe.toString().length:0)+"/"+J}),void 0)},void 0)}),[J,pe]),$e=(0,o.useMemo)((function(){var e=H||("password"===U?"password"===me?(0,n.jsx)(u(),{},void 0):(0,n.jsx)(c(),{},void 0):null);return(0,n.jsx)(n.Fragment,{children:V&&e&&(0,n.jsx)("span",p({className:"right-icon",onClick:Ve},{children:e}),void 0)},void 0)}),[V,H,U,me]),Ye=(0,o.useMemo)((function(){return(0,n.jsxs)("div",p({className:"text-field-content-within",ref:_e},{children:[(0,n.jsxs)("div",p({className:"text-field-content-within-input"},{children:[S?(0,n.jsx)("textarea",p({ref:Ee,rows:P,onBlur:Ae,onFocus:Ue,onChange:Be,onKeyDown:He,onKeyUp:Ke,disabled:y},ae),void 0):(0,n.jsx)("input",p({ref:Ee,type:me,onBlur:Ae,onFocus:Ue,onChange:Be,onKeyDown:He,onKeyUp:Ke,disabled:y},ae),void 0),se&&!ge&&(0,n.jsx)("span",p({className:"text-field-label-placeholder",onClick:Fe},{children:"outside"===h?b:(0,n.jsxs)(n.Fragment,{children:[m||b,k&&(0,n.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,n.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[se,ge,A,me,pe,Ze,$e,h,b,m,y,S,P,ae,ee,W]),Ge=(0,o.useMemo)((function(){var e;return(0,n.jsxs)("div",p({className:(e="text-field-select-content",ke&&(e+=" text-field-select-content-loading"),de&&(e+=" "+de),e),style:{width:(_e&&_e.current?_e.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,n.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:We(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,n.jsx)(l.default,{children:e[G]},void 0)}),t)})),ke&&(0,n.jsx)(a.default,{},void 0)]}),void 0)}),[_e,je,Pe,$,G,le,ke,de]),Qe=(0,o.useMemo)((function(){return(0,n.jsx)(r.Tooltip,p({open:je,title:Ge,onClose:Je,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",d&&(e+=" paraui-text-field-select-"+d),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[se,ge,A,me,pe,Ze,$e,h,b,m,y,S,P,ae,ee,W,le,_e,je,Z,d]),Xe=(0,o.useMemo)((function(){var e=Boolean(k||C||m);return(0,n.jsx)(n.Fragment,{children:"outside"===h&&e&&(0,n.jsxs)("label",p({className:"text-field-label"},{children:[m,k&&(0,n.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,n.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[h,m,C,k]);return(0,n.jsxs)("div",p({className:(Le="paraui-text-field",Le+=" text-field",d&&!S&&(Le+=" text-field-"+d),t&&(Le+=" "+t),E&&(Le+=" text-field-error"),ge&&(Le+=" text-field-focus"),y&&(Le+=" text-field-disabled"),S&&(Le+=" text-field-multiline"),e.limitLength&&pe&&pe.toString().length>e.limitLength&&(Le+=" text-field-limit"),Le)},{children:[Xe,(0,n.jsxs)("div",p({className:"text-field-content"},{children:[T&&(0,n.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:T}),void 0),W?Qe:Ye,I&&(0,n.jsx)("div",p({className:"text-field-content-after",onClick:function(e){re&&re(e)}},{children:I}),void 0)]}),void 0),L&&(0,n.jsx)("p",p({className:"text-field-error-text"},{children:L}),void 0)]}),void 0)}},7371:function(e,t,i){"use strict";var n=i(5893),o=i(1731),r=i(6010),l=(i(2560),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t,i=e.placement,a=void 0===i?"bottom":i,d=l(l({},e.classes),{popper:(0,r.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==a?void 0:a.includes("left"))||(null==a?void 0:a.includes("right")),"paraui-tooltip-top-bottom":(null==a?void 0:a.includes("top"))||(null==a?void 0:a.includes("bottom"))})});return(0,n.jsx)(o.Tooltip,l({},e,{classes:d}),void 0)}},1731:function(e){"use strict";e.exports=t},6243:function(e){"use strict";e.exports=a},1102:function(e){"use strict";e.exports=i},5191:function(e){"use strict";e.exports=l},6570:function(e){"use strict";e.exports=o},8528:function(e){"use strict";e.exports=n},3475:function(e){"use strict";e.exports=r},9297:function(t){"use strict";t.exports=e}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={id:e,exports:{}};return d[e](i,i.exports,s),i.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.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(){"use strict";s.r(u),s.d(u,{SingleBox:function(){return c}});var e=s(5893),t=s(9297),i=s(7320),n=s(5191),o=s.n(n),r=s(6243),l=s.n(r),a=(s(7812),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)}),d=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=function(n){var r=n.className,c=n.size,s=void 0===c?"large":c,u=n.placeholder,f=void 0===u?"":u,p=n.label,x=void 0===p?"":p,h=n.labelSign,g=n.disabled,b=void 0!==g&&g,v=n.required,m=void 0!==v&&v,w=n.error,y=void 0!==w&&w,j=n.helperText,S=void 0===j?"":j,O=n.value,k=n.onChange,C=(0,t.useState)([]),N=C[0],P=C[1];(0,t.useEffect)((function(){void 0!==n.defaultValue&&P(d([],n.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==O&&P(d([],O,!0))}),[O]);var q,E=function(e){return function(){b||(N.splice(e,1),void 0===n.value&&P(d([],N,!0)),k&&k(N))}},_=function(e){return function(t){N[e]=t.target.value,void 0===n.value&&P(d([],N,!0)),k&&k(N)}};return(0,e.jsxs)("div",a({className:(q="paraui-single-box single-box",r&&(q+=" "+r),s&&(q+=" single-box-"+s),y&&(q+=" single-box-error"),b&&(q+=" single-box-disabled"),q)},{children:[x?(0,e.jsxs)("label",a({className:"single-box-label"},{children:[x,m&&(0,e.jsx)("span",a({className:"single-box-label-required"},{children:"*"}),void 0),h&&(0,e.jsx)("span",{children:h},void 0)]}),void 0):null,(0,e.jsx)("div",a({className:"single-box-content"},{children:N.map((function(t,n){return(0,e.jsxs)("div",a({className:"single-box-content-item"},{children:[(0,e.jsx)(i.default,{disabled:b,value:t,placeholder:f,size:s,onChange:_(n)},void 0),(0,e.jsx)("span",a({className:"single-box-content-item-svg"},{children:(0,e.jsx)(l(),{onClick:E(n)},void 0)}),void 0)]}),n)}))}),void 0),(0,e.jsx)("div",a({className:"single-box-add",onClick:function(){b||(N.push(""),void 0===n.value&&P(d([],N,!0)),k&&k(N))}},{children:(0,e.jsx)(o(),{},void 0)}),void 0),S&&(0,e.jsx)("p",a({className:"single-box-error"},{children:S}),void 0)]}),void 0)};u.default=c}(),u}()}));
|
|
14
|
+
*/i(7418);var n=i(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;o=r("react.element"),t.Fragment=r("react.fragment")}var l=n.__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 c(e,t,i){var n,r={},c=null,s=null;for(n in void 0!==i&&(c=""+i),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,n)&&!d.hasOwnProperty(n)&&(r[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===r[n]&&(r[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:s,props:r,_owner:l.current}}t.jsx=c,t.jsxs=c},5893:function(e,t,i){"use strict";e.exports=i(5251)},9271:function(e,t,i){var n=i(3379),o=i(2565);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3492:function(e,t,i){var n=i(3379),o=i(5714);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},6894:function(e,t,i){var n=i(3379),o=i(2645);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},6202:function(e,t,i){var n=i(3379),o=i(3637);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},2310:function(e,t,i){var n=i(3379),o=i(9929);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:("body","body"),singleton:!1};n(o,r);e.exports=o.locals||{}},3379:function(e,t,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),l=[];function a(e){for(var t=-1,i=0;i<l.length;i++)if(l[i].identifier===e){t=i;break}return t}function d(e,t){for(var i={},n=[],o=0;o<e.length;o++){var r=e[o],d=t.base?r[0]+t.base:r[0],c=i[d]||0,s="".concat(d," ").concat(c);i[d]=c+1;var u=a(s),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==u?(l[u].references++,l[u].updater(f)):l.push({identifier:s,updater:h(f,t),references:1}),n.push(s)}return n}function c(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var l=r(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var s,u=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function f(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var r=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(r,l[t]):e.appendChild(r)}}function p(e,t,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var x=null,g=0;function h(e,t){var i,n,o;if(t.singleton){var r=g++;i=x||(x=c(t)),n=f.bind(null,i,r,!1),o=f.bind(null,i,r,!0)}else i=c(t),n=p.bind(null,i,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var i=d(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=a(i[n]);l[o].references--}for(var r=d(e,t),c=0;c<i.length;c++){var s=a(i[c]);0===l[s].references&&(l[s].updater(),l.splice(s,1))}i=r}}}},7839:function(e,t,i){"use strict";var n=i(5893),o=i(9297),r=i(7371),l=(i(9271),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.children,i=e.placement,a=void 0===i?"bottom-start":i,d=e.tips,c=void 0===d?"":d,s=e.className,u=void 0===s?"":s,f=(0,o.useRef)(),p=(0,o.useState)(""),x=p[0],g=p[1];(0,o.useEffect)((function(){g(c)}),[c]);var h;return(0,n.jsx)("div",l({ref:f,className:(h="paraui-auto-tips",u&&(h+=" "+u),h),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?g(c||f.current.innerText):g("")}},{children:(0,n.jsx)(r.default,l({title:x,placement:a},{children:(0,n.jsx)("div",l({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},7502:function(e,t,i){"use strict";var n=i(5893),o=i(9297),r=i(1102),l=i.n(r),a=(i(3492),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.className,i=e.style,r=e.opacity,d=void 0===r?.7:r,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 s;return(0,n.jsxs)("div",a({className:(s="paraui-loading",t&&(s+=" "+t),s),style:i,ref:c},{children:[(0,n.jsx)("div",a({className:"paraui-loading-box"},{children:(0,n.jsx)(l(),{},void 0)}),void 0),(0,n.jsx)("div",{className:"paraui-loading-mask",style:{opacity:d}},void 0)]}),void 0)}},7320:function(e,t,i){"use strict";var n=i(5893),o=i(9297),r=i(1731),l=i(7839),a=i(7502),d=i(8528),c=i.n(d),s=i(6570),u=i.n(s),f=i(3475),p=(i(6202),function(){return p=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)}),x=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};t.default=function(e){var t=e.className,i=e.size,d=void 0===i?"large":i,s=e.labelMode,g=void 0===s?"outside":s,h=e.placeholder,b=void 0===h?"":h,v=e.label,m=void 0===v?"":v,w=e.disabled,y=void 0!==w&&w,j=e.multiline,S=void 0!==j&&j,O=e.required,k=void 0!==O&&O,C=e.labelSign,N=e.rows,P=void 0===N?2:N,q=e.error,E=void 0!==q&&q,_=e.helperText,L=void 0===_?"":_,M=e.addonBefore,T=void 0===M?"":M,F=e.addonAfter,I=void 0===F?"":F,R=(e.defaultValue,e.value),z=e.autoFocus,A=void 0!==z&&z,D=e.type,U=void 0===D?"text":D,B=e.onClickIcon,H=e.rightIcon,K=e.showRightIcon,V=void 0===K||K,J=e.limitLength,W=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,ie=e.onKeyUp,ne=e.onEnter,oe=e.onClickAddonBefore,re=e.onClickAddonAfter,le=e.onSelect,ae=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"]),de=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,o.useState)(!0),se=ce[0],ue=ce[1],fe=(0,o.useState)(""),pe=fe[0],xe=fe[1],ge=(0,o.useState)(!1),he=ge[0],be=ge[1],ve=(0,o.useState)("text"),me=ve[0],we=ve[1],ye=(0,o.useState)(!1),je=ye[0],Se=ye[1],Oe=(0,o.useState)(!1),ke=Oe[0],Ce=Oe[1],Ne=(0,o.useState)([]),Pe=Ne[0],qe=Ne[1],Ee=((0,o.useState)({isCompositions:!0})[0],(0,o.useRef)(null)),_e=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(xe(e.defaultValue),Te(e.defaultValue))}),[]),(0,o.useEffect)((function(){U!==me&&we(U)}),[U]),(0,o.useEffect)((function(){void 0!==R&&(xe(R),Te(R))}),[R]),(0,o.useEffect)((function(){ue(""===pe||void 0===pe)}),[pe]),(0,o.useEffect)((function(){W&&Se(he)}),[he,W]),(0,o.useEffect)((function(){return je?window.addEventListener("keydown",ze):window.removeEventListener("keydown",ze),function(){window.removeEventListener("keydown",ze)}}),[je]),(0,o.useEffect)((function(){if(!he&&pe){var t=Me(pe);if(t!==pe){var i={};i.target=Ee.current,i.target.value=t,e.onChange&&e.onChange(i)}}}),[pe,he]);var Le,Me=function(t){var i=t;return e.limitLength&&t.toString().length>e.limitLength&&(i=i.toString().substr(0,e.limitLength)),i},Te=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Fe=function(){y||(ue(!1),(Ee&&Ee.current).focus())},Ie=function(e){var t=e.selectDom,i=e.keyCode,n=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===i&&(o="previousSibling",r=".text-field-select-content-item:last-child"),n?(n=n[o])||(n=t.querySelector(r)):n=t.querySelector(".text-field-select-content-item"),n&&(n.classList.add("text-field-select-content-item-keydown"),Re(n,t))},Re=function(e,t){var i=t.clientHeight,n=e.offsetTop+e.clientHeight-i;t.scrollTop=n>0?n:0},ze=function(e){var t=document.querySelector("."+de),i=null,n=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&n){var o=n.dataset.val;We(JSON.parse(o))(e),(Ee&&Ee.current).blur()}n&&(i=n,n.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ie({selectDom:t,keyCode:e.keyCode,currentDom:i}),38===e.keyCode&&Ie({selectDom:t,keyCode:e.keyCode,currentDom:i})},Ae=function(e){be(!1),""===e.target.value&&ue(!0),Q&&Q(e)},De=function(e){Ce(!0),W&&W(e,(function(e){qe(e||[]),Ce(!1)}))},Ue=function(e){be(!0),X&&X(e),De(e.target.value)},Be=function(t){var i=t.target.value;i&&ue(!1),void 0===e.value&&(xe(i),Te(i)),ee&&ee(t),De(t.target.value)},He=function(e){13===e.keyCode&&ne&&ne(e),te&&te(e)},Ke=function(e){ie&&ie(e)},Ve=function(e){"password"===U&&("text"===me&&we("password"),"password"===me&&we("text")),B&&B(e)},Je=function(){Se(!1)},We=function(e){return function(t){le&&le(e)}},Ze=(0,o.useMemo)((function(){return(0,n.jsx)(n.Fragment,{children:void 0!==J&&(0,n.jsx)("span",p({className:"length-limit"},{children:(pe?pe.toString().length:0)+"/"+J}),void 0)},void 0)}),[J,pe]),$e=(0,o.useMemo)((function(){var e=H||("password"===U?"password"===me?(0,n.jsx)(u(),{},void 0):(0,n.jsx)(c(),{},void 0):null);return(0,n.jsx)(n.Fragment,{children:V&&e&&(0,n.jsx)("span",p({className:"right-icon",onClick:Ve},{children:e}),void 0)},void 0)}),[V,H,U,me]),Ye=(0,o.useMemo)((function(){return(0,n.jsxs)("div",p({className:"text-field-content-within",ref:_e},{children:[(0,n.jsxs)("div",p({className:"text-field-content-within-input"},{children:[S?(0,n.jsx)("textarea",p({ref:Ee,rows:P,onBlur:Ae,onFocus:Ue,onChange:Be,onKeyDown:He,onKeyUp:Ke,disabled:y},ae),void 0):(0,n.jsx)("input",p({ref:Ee,type:me,onBlur:Ae,onFocus:Ue,onChange:Be,onKeyDown:He,onKeyUp:Ke,disabled:y},ae),void 0),se&&!he&&(0,n.jsx)("span",p({className:"text-field-label-placeholder",onClick:Fe},{children:"outside"===g?b:(0,n.jsxs)(n.Fragment,{children:[m||b,k&&(0,n.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,n.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[se,he,A,me,pe,Ze,$e,g,b,m,y,S,P,ae,ee,W]),Ge=(0,o.useMemo)((function(){var e;return(0,n.jsxs)("div",p({className:(e="text-field-select-content",ke&&(e+=" text-field-select-content-loading"),de&&(e+=" "+de),e),style:{width:(_e&&_e.current?_e.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,n.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:We(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,n.jsx)(l.default,{children:e[G]},void 0)}),t)})),ke&&(0,n.jsx)(a.default,{},void 0)]}),void 0)}),[_e,je,Pe,$,G,le,ke,de]),Qe=(0,o.useMemo)((function(){return(0,n.jsx)(r.Tooltip,p({open:je,title:Ge,onClose:Je,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",d&&(e+=" paraui-text-field-select-"+d),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[se,he,A,me,pe,Ze,$e,g,b,m,y,S,P,ae,ee,W,le,_e,je,Z,d]),Xe=(0,o.useMemo)((function(){var e=Boolean(k||C||m);return(0,n.jsx)(n.Fragment,{children:"outside"===g&&e&&(0,n.jsxs)("label",p({className:"text-field-label"},{children:[m,k&&(0,n.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,n.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[g,m,C,k]);return(0,n.jsxs)("div",p({className:(Le="paraui-text-field",Le+=" text-field",d&&!S&&(Le+=" text-field-"+d),t&&(Le+=" "+t),E&&(Le+=" text-field-error"),he&&(Le+=" text-field-focus"),y&&(Le+=" text-field-disabled"),S&&(Le+=" text-field-multiline"),e.limitLength&&pe&&pe.toString().length>e.limitLength&&(Le+=" text-field-limit"),Le)},{children:[Xe,(0,n.jsxs)("div",p({className:"text-field-content"},{children:[T&&(0,n.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:T}),void 0),W?Qe:Ye,I&&(0,n.jsx)("div",p({className:"text-field-content-after",onClick:function(e){re&&re(e)}},{children:I}),void 0)]}),void 0),L&&(0,n.jsx)("p",p({className:"text-field-error-text"},{children:L}),void 0)]}),void 0)}},7371:function(e,t,i){"use strict";var n=i(5893),o=i(1731),r=i(6010),l=(i(2310),function(){return l=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});t.default=function(e){var t,i=e.placement,a=void 0===i?"bottom":i,d=l(l({},e.classes),{popper:(0,r.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==a?void 0:a.includes("left"))||(null==a?void 0:a.includes("right")),"paraui-tooltip-top-bottom":(null==a?void 0:a.includes("top"))||(null==a?void 0:a.includes("bottom"))})});return(0,n.jsx)(o.Tooltip,l({},e,{classes:d}),void 0)}},1731:function(e){"use strict";e.exports=t},6243:function(e){"use strict";e.exports=a},1102:function(e){"use strict";e.exports=i},5191:function(e){"use strict";e.exports=l},6570:function(e){"use strict";e.exports=o},8528:function(e){"use strict";e.exports=n},3475:function(e){"use strict";e.exports=r},9297:function(t){"use strict";t.exports=e}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={id:e,exports:{}};return d[e](i,i.exports,s),i.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.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(){"use strict";s.r(u),s.d(u,{SingleBox:function(){return c}});var e=s(5893),t=s(9297),i=s(7320),n=s(5191),o=s.n(n),r=s(6243),l=s.n(r),a=(s(6894),function(){return a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)}),d=function(e,t,i){if(i||2===arguments.length)for(var n,o=0,r=t.length;o<r;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=function(n){var r=n.className,c=n.size,s=void 0===c?"large":c,u=n.placeholder,f=void 0===u?"":u,p=n.label,x=void 0===p?"":p,g=n.labelSign,h=n.disabled,b=void 0!==h&&h,v=n.required,m=void 0!==v&&v,w=n.error,y=void 0!==w&&w,j=n.helperText,S=void 0===j?"":j,O=n.value,k=n.onChange,C=(0,t.useState)([]),N=C[0],P=C[1];(0,t.useEffect)((function(){void 0!==n.defaultValue&&P(d([],n.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==O&&P(d([],O,!0))}),[O]);var q,E=function(e){return function(){b||(N.splice(e,1),void 0===n.value&&P(d([],N,!0)),k&&k(N))}},_=function(e){return function(t){N[e]=t.target.value,void 0===n.value&&P(d([],N,!0)),k&&k(N)}};return(0,e.jsxs)("div",a({className:(q="paraui-single-box single-box",r&&(q+=" "+r),s&&(q+=" single-box-"+s),y&&(q+=" single-box-error"),b&&(q+=" single-box-disabled"),q)},{children:[x?(0,e.jsxs)("label",a({className:"single-box-label"},{children:[x,m&&(0,e.jsx)("span",a({className:"single-box-label-required"},{children:"*"}),void 0),g&&(0,e.jsx)("span",{children:g},void 0)]}),void 0):null,(0,e.jsx)("div",a({className:"single-box-content"},{children:N.map((function(t,n){return(0,e.jsxs)("div",a({className:"single-box-content-item"},{children:[(0,e.jsx)(i.default,{disabled:b,value:t,placeholder:f,size:s,onChange:_(n)},void 0),(0,e.jsx)("span",a({className:"single-box-content-item-svg"},{children:(0,e.jsx)(l(),{onClick:E(n)},void 0)}),void 0)]}),n)}))}),void 0),(0,e.jsx)("div",a({className:"single-box-add",onClick:function(){b||(N.push(""),void 0===n.value&&P(d([],N,!0)),k&&k(N))}},{children:(0,e.jsx)(o(),{},void 0)}),void 0),S&&(0,e.jsx)("p",a({className:"single-box-error"},{children:S}),void 0)]}),void 0)};u.default=c}(),u}()}));
|
package/Slider/index.js
CHANGED
|
@@ -12,4 +12,4 @@ object-assign
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
t(7418);var o=t(9297),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;i=n("react.element"),n("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function p(r,e,t){var o,n={},p=null,d=null;for(o in void 0!==t&&(p=""+t),void 0!==e.key&&(p=""+e.key),void 0!==e.ref&&(d=e.ref),e)l.call(e,o)&&!s.hasOwnProperty(o)&&(n[o]=e[o]);if(r&&r.defaultProps)for(o in e=r.defaultProps)void 0===n[o]&&(n[o]=e[o]);return{$$typeof:i,type:r,key:p,ref:d,props:n,_owner:a.current}}e.jsx=p},5893:function(r,e,t){"use strict";r.exports=t(5251)},
|
|
15
|
+
t(7418);var o=t(9297),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;i=n("react.element"),n("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function p(r,e,t){var o,n={},p=null,d=null;for(o in void 0!==t&&(p=""+t),void 0!==e.key&&(p=""+e.key),void 0!==e.ref&&(d=e.ref),e)l.call(e,o)&&!s.hasOwnProperty(o)&&(n[o]=e[o]);if(r&&r.defaultProps)for(o in e=r.defaultProps)void 0===n[o]&&(n[o]=e[o]);return{$$typeof:i,type:r,key:p,ref:d,props:n,_owner:a.current}}e.jsx=p},5893:function(r,e,t){"use strict";r.exports=t(5251)},8677:function(r,e,t){var o=t(3379),i=t(8872);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var n={insert:("body","body"),singleton:!1};o(i,n);r.exports=i.locals||{}},3379:function(r,e,t){"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},n=function(){var r={};return function(e){if(void 0===r[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(r){t=null}r[e]=t}return r[e]}}(),a=[];function l(r){for(var e=-1,t=0;t<a.length;t++)if(a[t].identifier===r){e=t;break}return e}function s(r,e){for(var t={},o=[],i=0;i<r.length;i++){var n=r[i],s=e.base?n[0]+e.base:n[0],p=t[s]||0,d="".concat(s," ").concat(p);t[s]=p+1;var c=l(d),u={css:n[1],media:n[2],sourceMap:n[3]};-1!==c?(a[c].references++,a[c].updater(u)):a.push({identifier:d,updater:h(u,e),references:1}),o.push(d)}return o}function p(r){var e=document.createElement("style"),o=r.attributes||{};if(void 0===o.nonce){var i=t.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(r){e.setAttribute(r,o[r])})),"function"==typeof r.insert)r.insert(e);else{var a=n(r.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var d,c=(d=[],function(r,e){return d[r]=e,d.filter(Boolean).join("\n")});function u(r,e,t,o){var i=t?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(r.styleSheet)r.styleSheet.cssText=c(e,i);else{var n=document.createTextNode(i),a=r.childNodes;a[e]&&r.removeChild(a[e]),a.length?r.insertBefore(n,a[e]):r.appendChild(n)}}function f(r,e,t){var o=t.css,i=t.media,n=t.sourceMap;if(i?r.setAttribute("media",i):r.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),r.styleSheet)r.styleSheet.cssText=o;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(o))}}var b=null,g=0;function h(r,e){var t,o,i;if(e.singleton){var n=g++;t=b||(b=p(e)),o=u.bind(null,t,n,!1),i=u.bind(null,t,n,!0)}else t=p(e),o=f.bind(null,t,e),i=function(){!function(r){if(null===r.parentNode)return!1;r.parentNode.removeChild(r)}(t)};return o(r),function(e){if(e){if(e.css===r.css&&e.media===r.media&&e.sourceMap===r.sourceMap)return;o(r=e)}else i()}}r.exports=function(r,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var t=s(r=r||[],e);return function(r){if(r=r||[],"[object Array]"===Object.prototype.toString.call(r)){for(var o=0;o<t.length;o++){var i=l(t[o]);a[i].references--}for(var n=s(r,e),p=0;p<t.length;p++){var d=l(t[p]);0===a[d].references&&(a[d].updater(),a.splice(d,1))}t=n}}}},4500:function(r){"use strict";r.exports=e},9297:function(e){"use strict";e.exports=r}},o={};function i(r){var e=o[r];if(void 0!==e)return e.exports;var n=o[r]={id:r,exports:{}};return t[r](n,n.exports,i),n.exports}i.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return i.d(e,{a:e}),e},i.d=function(r,e){for(var t in e)i.o(e,t)&&!i.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},i.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},i.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var n={};return function(){"use strict";i.r(n),i.d(n,{Slider:function(){return p}});var r=i(5893),e=i(9297),t=i.n(e),o=i(4500),a=i.n(o),l=(i(8677),function(){return l=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},l.apply(this,arguments)}),s=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(r);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(r,o[i])&&(t[o[i]]=r[o[i]])}return t},p=function(e){var i,n=e.range,p=e.step,d=s(e,["range","step"]),c="paraui-slider",u="paraui-slider-tooltip";"object"==typeof n&&(i=n.draggableTrack);var f=t().useState({}),b=f[0],g=f[1],h=function(r,e){g((function(t){var o;return l(l({},t),((o={})[r]=e,o))}))},m=function(r,e){return r||(e?"right":"top")},v=function(r){return"number"==typeof r?r.toString():""},x=function(t){var i=t.tooltipPrefixCls,n=t.info,a=n.value,p=n.index,d=n.dragging,c=s(n,["value","index","dragging"]),u=e.tipFormatter,f=void 0===u?v:u,g=e.tooltipVisible,x=e.tooltipPlacement,y=e.getTooltipPopupContainer,w=void 0===y?function(r){return r}:y,O=e.vertical,j=!!f&&(b[p]||d),k=g||void 0===g&&j;return(0,r.jsx)(o.SliderTooltip,l({prefixCls:i,overlay:f?f(a):"",visible:k,placement:m(x,O),getTooltipContainer:w,destroyTooltipOnHide:!0},{children:(0,r.jsx)(o.Handle,l({},c,{value:a,onMouseEnter:function(){return h(p,!0)},onMouseLeave:function(){return h(p,!1)}}),void 0)}),p)};return n?(0,r.jsx)(o.Range,l({},d,{step:p,pushable:d.pushable,draggableTrack:i,handle:function(r){return x({tooltipPrefixCls:u,info:r})},prefixCls:c}),void 0):(0,r.jsx)(a(),l({},d,{step:p,handle:function(r){return x({tooltipPrefixCls:u,info:r})},prefixCls:c}),void 0)};n.default=p}(),n}()}));
|
package/Split/index.js
CHANGED
|
@@ -12,4 +12,4 @@ object-assign
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
n(7418);var r=n(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=r.__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 u(e,t,n){var r,i={},u=null,l=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)c.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:u,ref:l,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,n){"use strict";e.exports=n(5251)},
|
|
15
|
+
n(7418);var r=n(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=r.__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 u(e,t,n){var r,i={},u=null,l=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)c.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:u,ref:l,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,n){"use strict";e.exports=n(5251)},6333:function(e,t,n){var r=n(3379),o=n(4941);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var i={insert:("body","body"),singleton:!1};r(o,i);e.exports=o.locals||{}},3379:function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function c(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],s=t.base?i[0]+t.base:i[0],u=n[s]||0,l="".concat(s," ").concat(u);n[s]=u+1;var f=c(l),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==f?(a[f].references++,a[f].updater(p)):a.push({identifier:l,updater:m(p,t),references:1}),r.push(l)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var l,f=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function p(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function d(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var v=null,h=0;function m(e,t){var n,r,o;if(t.singleton){var i=h++;n=v||(v=u(t)),r=p.bind(null,n,i,!1),o=p.bind(null,n,i,!0)}else n=u(t),r=d.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=c(n[r]);a[o].references--}for(var i=s(e,t),u=0;u<n.length;u++){var l=c(n[u]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}n=i}}}},9297:function(t){"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.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(){"use strict";r.r(o);var e=r(5893),t=r(9297),n=r.n(t),i=(r(6333),function(){return i=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},i.apply(this,arguments)});o.default=function(t){var r,o,a,c=t.minWidth,s=void 0===c?200:c,u=t.children,l=n().useRef(null),f=n().useRef(null),p=n().useRef(null),d=n().useState({left:null,right:null}),v=d[0],h=d[1],m=function(e){r=e.clientX,a=g(p.current),o=g(f.current),document.documentElement.addEventListener("mousemove",b),document.documentElement.addEventListener("mouseup",y)},b=function(e){var t=o+e.clientX-r;a-t<=s||t<=s||(f.current.style.width=t+"px")},y=function(e){document.documentElement.removeEventListener("mousemove",b),document.documentElement.removeEventListener("mouseup",y)},g=function(e){return parseInt(e.getBoundingClientRect().width,10)};return n().useEffect((function(){var e;l.current&&(null===(e=l.current)||void 0===e||e.addEventListener("mousedown",m))}),[l]),n().useEffect((function(){if(u&&"object"==typeof u&&h({left:u,right:null}),u&&Array.isArray(u)){var e=u.slice(0,Math.floor(u.length/2)),t=u.slice(Math.floor(u.length/2),u.length);h({left:e,right:t})}}),[u]),(0,e.jsxs)("div",i({className:"para-split",ref:p},{children:[(0,e.jsxs)("div",i({className:"para-split-left"},{children:[(0,e.jsx)("div",i({className:"para-split-left-content",ref:f},{children:v.left}),void 0),(0,e.jsxs)("div",i({className:"para-split-separator",ref:l},{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}()}));
|
package/Stepper/index.js
CHANGED
|
@@ -12,4 +12,4 @@ object-assign
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
t(7418);var n=t(9297),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),o("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var n,o={},s=null,u=null;for(n in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!p.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:i,type:e,key:s,ref:u,props:o,_owner:a.current}}r.jsx=s},5893:function(e,r,t){"use strict";e.exports=t(5251)},
|
|
15
|
+
t(7418);var n=t(9297),i=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),o("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var n,o={},s=null,u=null;for(n in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!p.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:i,type:e,key:s,ref:u,props:o,_owner:a.current}}r.jsx=s},5893:function(e,r,t){"use strict";e.exports=t(5251)},4661:function(e,r,t){var n=t(3379),i=t(8310);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};n(i,o);e.exports=i.locals||{}},3379:function(e,r,t){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function c(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function p(e,r){for(var t={},n=[],i=0;i<e.length;i++){var o=e[i],p=r.base?o[0]+r.base:o[0],s=t[p]||0,u="".concat(p," ").concat(s);t[p]=s+1;var l=c(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==l?(a[l].references++,a[l].updater(f)):a.push({identifier:u,updater:m(f,r),references:1}),n.push(u)}return n}function s(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=t.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var u,l=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var i=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=l(r,i);else{var o=document.createTextNode(i),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(o,a[r]):e.appendChild(o)}}function d(e,r,t){var n=t.css,i=t.media,o=t.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,b=0;function m(e,r){var t,n,i;if(r.singleton){var o=b++;t=v||(v=s(r)),n=f.bind(null,t,o,!1),i=f.bind(null,t,o,!0)}else t=s(r),n=d.bind(null,t,r),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else i()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=i());var t=p(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var i=c(t[n]);a[i].references--}for(var o=p(e,r),s=0;s<t.length;s++){var u=c(t[s]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}t=o}}}},1731:function(e){"use strict";e.exports=r},6110:function(e){"use strict";e.exports=l},1861:function(e){"use strict";e.exports=s},2873:function(e){"use strict";e.exports=a},8764:function(e){"use strict";e.exports=o},1709:function(e){"use strict";e.exports=u},5283:function(e){"use strict";e.exports=t},1341:function(e){"use strict";e.exports=p},763:function(e){"use strict";e.exports=c},7214:function(e){"use strict";e.exports=i},7139:function(e){"use strict";e.exports=n},9297:function(r){"use strict";r.exports=e}},d={};function v(e){var r=d[e];if(void 0!==r)return r.exports;var t=d[e]={id:e,exports:{}};return f[e](t,t.exports,v),t.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 t in r)v.o(r,t)&&!v.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},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(){"use strict";v.r(b),v.d(b,{Stepper:function(){return P},default:function(){return k}});var e=v(5893),r=v(9297),t=v.n(r),n=v(1731),i=v(6010),o=v(5283),a=v.n(o),c=v(7139),p=v.n(c),s=v(7214),u=v.n(s),l=v(8764),f=v.n(l),d=v(2873),m=v.n(d),h=v(763),y=v.n(h),g=v(1341),x=v.n(g),j=v(1861),O=v.n(j),S=v(1709),w=v.n(S),q=v(6110),C=v.n(q),_={1:(0,e.jsx)(a(),{},void 0),2:(0,e.jsx)(p(),{},void 0),3:(0,e.jsx)(u(),{},void 0),4:(0,e.jsx)(f(),{},void 0),5:(0,e.jsx)(m(),{},void 0),6:(0,e.jsx)(y(),{},void 0),7:(0,e.jsx)(x(),{},void 0),8:(0,e.jsx)(O(),{},void 0),9:(0,e.jsx)(w(),{},void 0),done:(0,e.jsx)(C(),{},void 0)},N=(v(4661),function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},N.apply(this,arguments)}),T=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 i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]])}return t};function E(r){var t=r.active,n=r.completed,o=r.mode,a=r.icon,c=r.iconComp,p=r.index;return(0,e.jsx)("div",N({className:(0,i.Z)("paraui-stepper-step-icon",{"paraui-stepper-step-icon--active":t,"paraui-stepper-step-icon--completed":n,"paraui-stepper-step-icon--one":"number"===o&&0===p&&t})},{children:n?_.done:"number"===o?_[String(a)]:"icon"===o?c||_.done:void 0}),void 0)}var P=function(r){var o=r.activeStep,a=void 0===o?0:o,c=r.mode,p=void 0===c?"number":c,s=r.steps,u=void 0===s?[]:s,l=r.alternativeLabel,f=void 0===l||l,d=r.orientation,v=void 0===d?"horizontal":d,b=r.className,m=T(r,["activeStep","mode","steps","alternativeLabel","orientation","className"]),h=function(r,n){return t().forwardRef((function(t,i){return(0,e.jsx)(E,N({mode:p,iconComp:r.icon,index:n},t,{ref:i}),void 0)}))};return(0,e.jsx)(n.Stepper,N({className:(0,i.Z)("paraui-stepper",b),activeStep:a,alternativeLabel:f,orientation:v},m,{connector:(0,e.jsx)(n.StepConnector,{classes:{root:"paraui-stepper-connector",active:"paraui-stepper-connector--active",completed:"paraui-stepper-connector--completed"}},void 0)},{children:(null==u?void 0:u.length)?u.map((function(r,t){var o="",c={};return"number"===p?(o=r,c.label=o):"object"==typeof r&&(o=r.label||"",c=N({},r)),(0,e.jsx)(n.Step,N({className:(0,i.Z)(a===t&&"paraui-stepper-step")},{children:(0,e.jsx)(n.StepLabel,N({StepIconComponent:h(c,t),classes:{label:"paraui-stepper-step-label",active:"paraui-stepper-step-label--active",completed:"paraui-stepper-step-label--completed"}},{children:o}),void 0)}),t)})):null}),void 0)},k=P}(),b}()}));
|
package/Switch/index.js
CHANGED
|
@@ -12,4 +12,4 @@ object-assign
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
r(7418);var i=r(9297),n=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;n=a("react.element"),a("react.fragment")}var o=i.__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,t,r){var i,a={},l=null,u=null;for(i in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)c.call(t,i)&&!s.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===a[i]&&(a[i]=t[i]);return{$$typeof:n,type:e,key:l,ref:u,props:a,_owner:o.current}}t.jsx=l,t.jsxs=l},5893:function(e,t,r){"use strict";e.exports=r(5251)},
|
|
15
|
+
r(7418);var i=r(9297),n=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;n=a("react.element"),a("react.fragment")}var o=i.__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,t,r){var i,a={},l=null,u=null;for(i in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)c.call(t,i)&&!s.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===a[i]&&(a[i]=t[i]);return{$$typeof:n,type:e,key:l,ref:u,props:a,_owner:o.current}}t.jsx=l,t.jsxs=l},5893:function(e,t,r){"use strict";e.exports=r(5251)},7809:function(e,t,r){var i=r(3379),n=r(7661);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.id,n,""]]);var a={insert:("body","body"),singleton:!1};i(n,a);e.exports=n.locals||{}},3379:function(e,t,r){"use strict";var i,n=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},a=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),o=[];function c(e){for(var t=-1,r=0;r<o.length;r++)if(o[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},i=[],n=0;n<e.length;n++){var a=e[n],s=t.base?a[0]+t.base:a[0],l=r[s]||0,u="".concat(s," ").concat(l);r[s]=l+1;var p=c(u),f={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(o[p].references++,o[p].updater(f)):o.push({identifier:u,updater:w(f,t),references:1}),i.push(u)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var n=r.nc;n&&(i.nonce=n)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,p=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function f(e,t,r,i){var n=r?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=p(t,n);else{var a=document.createTextNode(n),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,r){var i=r.css,n=r.media,a=r.sourceMap;if(n?e.setAttribute("media",n):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var h=null,b=0;function w(e,t){var r,i,n;if(t.singleton){var a=b++;r=h||(h=l(t)),i=f.bind(null,r,a,!1),n=f.bind(null,r,a,!0)}else r=l(t),i=d.bind(null,r,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var r=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<r.length;i++){var n=c(r[i]);o[n].references--}for(var a=s(e,t),l=0;l<r.length;l++){var u=c(r[l]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}r=a}}}},1102:function(e){"use strict";e.exports=r},4555:function(e){"use strict";e.exports=t},9297:function(t){"use strict";t.exports=e}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,exports:{}};return i[e](r,r.exports,a),r.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 r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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 o={};return function(){"use strict";a.r(o),a.d(o,{Switch:function(){return u}});var e=a(5893),t=a(4555),r=a.n(t),i=a(6010),n=a(1102),c=a.n(n),s=(a(7809),function(){return s=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)}),l=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r},u=function(t){t.compact,t.size;var n=t.loading,a=t.disabled,o=t.className,u=t.label,p=t.labelPlacement,f=void 0===p?"top":p,d=l(t,["compact","size","loading","disabled","className","label","labelPlacement"]),h=(0,i.Z)("paraui-switch",{"paraui-switch-loading":n},o),b=(0,i.Z)("paraui-switch-label","paraui-switch-label-".concat(f)),w=(0,e.jsx)("div",s({className:"paraui-switch-handle"},{children:n&&(0,e.jsx)(c(),{className:"paraui-switch-loading-icon"},void 0)}),void 0);return u?(0,e.jsxs)("label",s({htmlFor:"",className:b},{children:[(0,e.jsx)(r(),s({},d,{prefixCls:"paraui-switch",className:h,disabled:a||n,loadingIcon:w}),void 0),(0,e.jsx)("span",s({className:"paraui-switch-text"},{children:u}),void 0)]}),void 0):(0,e.jsx)(r(),s({},d,{prefixCls:"paraui-switch",className:h,disabled:a||n,loadingIcon:w}),void 0)};o.default=u}(),o}()}));
|