@para-ui/core 1.1.15 → 1.1.19
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/Accordion/index.d.ts +9 -0
- package/AutoBox/index.d.ts +26 -0
- package/AutoBox/index.js +16 -1
- package/AutoTips/index.d.ts +16 -0
- package/AutoTips/index.js +16 -1
- package/Breadcrumbs/index.d.ts +30 -0
- package/Breadcrumbs/index.js +16 -1
- package/Breadcrumbs/theme.d.ts +42 -0
- package/Button/index.d.ts +33 -0
- package/Button/index.js +16 -1
- package/Button/theme.d.ts +216 -0
- package/ButtonGroup/SplitButton.d.ts +17 -0
- package/ButtonGroup/index.d.ts +36 -0
- package/ButtonGroup/index.js +16 -1
- package/Checkbox/iconMapping.d.ts +2 -0
- package/Checkbox/index.d.ts +19 -0
- package/Checkbox/index.js +16 -1
- package/CheckboxGroup/index.d.ts +38 -0
- package/CheckboxGroup/index.js +16 -1
- package/ColorPicker/index.d.ts +4 -0
- package/ComboSelect/WithTabsCombo/index.d.ts +10 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +134 -0
- package/ComboSelect/index.d.ts +10 -0
- package/ComboSelect/index.js +14 -1
- package/ComboSelect/interface.d.ts +96 -0
- package/ComboSelect/styles.d.ts +6 -0
- package/Container/index.d.ts +77 -0
- package/Container/index.js +15 -1
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +64 -0
- package/DatePicker/index.d.ts +17 -0
- package/DatePicker/index.js +14 -1
- package/DatePicker/locale/en_US.d.ts +3 -0
- package/DatePicker/locale/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +12 -0
- package/Desktop/index.d.ts +55 -0
- package/Desktop/index.js +14 -1
- package/Drawer/index.d.ts +5 -0
- package/Form/index.d.ts +134 -0
- package/Form/index.js +16 -1
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +37 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +10 -0
- package/FormItem/index.d.ts +104 -0
- package/FormItem/index.js +16 -1
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +8 -0
- package/FunctionModal/index.js +14 -1
- package/FunctionModal/modalContext.d.ts +14 -0
- package/Help/index.d.ts +17 -0
- package/Help/index.js +16 -1
- package/IconList/index.d.ts +10 -0
- package/IconList/index.js +15 -1
- package/InputLang/index.d.ts +41 -0
- package/InputLang/index.js +16 -1
- package/InputNumber/index.d.ts +50 -0
- package/InputNumber/index.js +16 -1
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/horizontalMenu.d.ts +9 -0
- package/Menu/horizontalMeunList.d.ts +9 -0
- package/Menu/horizontalMeunRight.d.ts +9 -0
- package/Menu/index.d.ts +9 -0
- package/Menu/index.js +16 -1
- package/Menu/interface.d.ts +242 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalFooter.d.ts +9 -0
- package/Menu/verticalMenu.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +36 -0
- package/Message/index.js +15 -1
- package/Modal/Confirm/index.d.ts +60 -0
- package/Modal/index.d.ts +51 -0
- package/Modal/index.js +16 -1
- package/MultiBox/index.d.ts +44 -0
- package/MultiBox/index.js +16 -1
- package/Pagination/index.d.ts +14 -0
- package/Pagination/index.js +16 -1
- package/ParauiProvider/index.d.ts +10 -0
- package/ParauiProvider/index.js +16 -1
- package/ParauiProvider/theme/paraTheme.d.ts +3 -0
- package/ParauiProvider/theme/styleConfig.d.ts +74 -0
- package/PopConfirm/index.d.ts +39 -0
- package/PopConfirm/index.js +16 -1
- package/Popover/index.d.ts +13 -0
- package/Popover/index.js +16 -1
- package/Radio/iconMapping.d.ts +2 -0
- package/Radio/index.d.ts +19 -0
- package/Radio/index.js +16 -1
- package/RadioGroup/index.d.ts +38 -0
- package/RadioGroup/index.js +16 -1
- package/Search/index.d.ts +45 -0
- package/Search/index.js +16 -1
- package/Select/index.d.ts +59 -0
- package/Select/index.js +16 -1
- package/SingleBox/index.d.ts +30 -0
- package/SingleBox/index.js +16 -1
- package/Slider/index.d.ts +3 -0
- package/Split/index.d.ts +7 -0
- package/Split/index.js +15 -1
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +38 -0
- package/Stepper/index.js +16 -1
- package/Stepper/theme.d.ts +56 -0
- package/Styles/index.d.ts +1 -0
- package/Switch/index.d.ts +19 -0
- package/Switch/index.js +16 -1
- package/Table/index.d.ts +9 -0
- package/Table/index.js +16 -1
- package/Table/interface.d.ts +159 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyInterface.d.ts +54 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadInterface.d.ts +32 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +20 -0
- package/Tabs/index.d.ts +38 -0
- package/Tabs/index.js +16 -1
- package/Tabs/theme.d.ts +53 -0
- package/TextField/index.d.ts +83 -0
- package/TextField/index.js +16 -1
- package/TimePicker/index.d.ts +21 -0
- package/TimePicker/index.js +14 -1
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +19 -0
- package/Timeline/index.js +16 -1
- package/ToolTip/index.d.ts +10 -0
- package/ToolTip/index.js +16 -1
- package/Tree/OperateBar/index.d.ts +4 -0
- package/Tree/Tree.d.ts +148 -0
- package/Tree/index.d.ts +4 -0
- package/Tree/index.js +14 -1
- package/Tree/utils/tools.d.ts +17 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/ImageUpload/index.d.ts +8 -0
- package/Upload/UploadList/index.d.ts +4 -0
- package/Upload/index.d.ts +11 -0
- package/Upload/index.js +16 -1
- package/Upload/interface.d.ts +122 -0
- package/index.d.ts +46 -0
- package/index.js +14 -1
- package/package.json +13 -5
- package/Styles/fonts/SourceHanSansCN-Normal.css +0 -8
- package/Styles/fonts/SourceHanSansCN-Normal.otf +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/12 14:13
|
|
4
|
+
* @description 扩展面板
|
|
5
|
+
*/
|
|
6
|
+
import { Accordion, AccordionDetails, AccordionSummary, AccordionProps as MuiAccordionProps } from '@material-ui/core';
|
|
7
|
+
export { AccordionDetails, AccordionSummary, };
|
|
8
|
+
export declare type AccordionProps = MuiAccordionProps;
|
|
9
|
+
export default Accordion;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/9 16:16
|
|
4
|
+
* @description 超出自适应盒子
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
export interface AutoBoxProps {
|
|
8
|
+
/** 样式class */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** list选项 */
|
|
11
|
+
list?: any[];
|
|
12
|
+
/** 下拉框样式 */
|
|
13
|
+
popoverClassName?: string;
|
|
14
|
+
/** 自定义更多内容 */
|
|
15
|
+
moreCustomize?: ReactNode;
|
|
16
|
+
/** 隐藏更多按钮 */
|
|
17
|
+
hideMore?: boolean;
|
|
18
|
+
/** 打开下拉框 */
|
|
19
|
+
openMore?: boolean;
|
|
20
|
+
/** 定位元素 */
|
|
21
|
+
anchorEl?: any;
|
|
22
|
+
/** 关闭弹窗 */
|
|
23
|
+
onCloseMore?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const AutoBox: FunctionComponent<AutoBoxProps>;
|
|
26
|
+
export default AutoBox;
|
package/AutoBox/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@material-ui/core/styles"),require("@material-ui/core"),require("@para-ui/icons/More"),require("para-lib")):"function"==typeof define&&define.amd?define(["react","@material-ui/core/styles","@material-ui/core","@para-ui/icons/More","para-lib"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@material-ui/core/styles"),require("@material-ui/core"),require("@para-ui/icons/More"),require("para-lib")):e.ParaUI=r(e.react,e["@material-ui/core/styles"],e["@material-ui/core"],e["@para-ui/icons/More"],e["para-lib"])}(self,(function(e,r,t,o,n){return function(){"use strict";var i={4126:function(e){
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var 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 o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,c=n(e),l=1;l<arguments.length;l++){for(var f in a=Object(arguments[l]))t.call(a,f)&&(c[f]=a[f]);if(r){u=r(a);for(var s=0;s<u.length;s++)o.call(a,u[s])&&(c[u[s]]=a[u[s]])}}return c}},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 o=t(9297),n=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i("react.element"),i("react.fragment")}var a=o.__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 l(e,r,t){var o,i={},l=null,f=null;for(o in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(f=r.ref),r)u.call(r,o)&&!c.hasOwnProperty(o)&&(i[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===i[o]&&(i[o]=r[o]);return{$$typeof:n,type:e,key:l,ref:f,props:i,_owner:a.current}}r.jsx=l,r.jsxs=l},7712:function(e,r,t){e.exports=t(9524)},1731:function(e){e.exports=t},8604:function(e){e.exports=r},6090:function(e){e.exports=o},3475:function(e){e.exports=n},9297:function(r){r.exports=e}},a={};function u(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return i[e](t,t.exports,u),t.exports}u.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(r,{a:r}),r},u.d=function(e,r){for(var t in r)u.o(r,t)&&!u.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},u.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){u.r(c),u.d(c,{AutoBox:function(){return s}});var e=u(7712),r=u(9297),t=u(8604),o=u(1731),n=u(6090),i=u.n(n),a=u(3475),l=function(){return l=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},l.apply(this,arguments)},f=(0,t.makeStyles)((function(e){return(0,t.createStyles)({"auto-box":{width:"100%",whiteSpace:"nowrap",overflow:"hidden","& > .auto-box-more":{display:"inline-block",height:"100%",cursor:"pointer"}},"auto-box-popover":{"& .auto-box-popover-content":{display:"flex",flexDirection:"column"}}})})),s=function(t){var n=t.className,u=t.list,c=void 0===u?[]:u,s=t.popoverClassName,p=t.moreCustomize,d=t.anchorEl,v=t.hideMore,b=void 0!==v&&v,m=t.onCloseMore,y=f(t),h=(0,r.useState)("auto-box-"+(0,a.UUID)())[0],x=(0,r.useState)(null),j=x[0],O=x[1],g=(0,r.useState)(!1),S=g[0],w=g[1],_=(0,r.useState)(null),E=_[0],P=_[1],q=(0,r.useState)({})[0];(0,r.useEffect)((function(){void 0!==t.openMore&&w(t.openMore)}),[t.openMore]),(0,r.useEffect)((function(){d&&P(d)}),[d]),(0,r.useEffect)((function(){return T(),window.addEventListener("resize",T),function(){window.removeEventListener("resize",T)}}),[c]);var M,N=function(){w(!1),m&&m()},k=function(e){w(!0),P(e.target)},C=function(e){if(null!==e&&0!==e){void 0===e&&(e=c.length);var r=document.querySelector("."+h);if(r)if(r.scrollWidth>r.clientWidth){var t=Number(e)-1;O(t),C(t)}else c.length<=e&&(w(!1),m&&m())}},T=function(){clearTimeout(q.timer),w(!1),q.timer=setTimeout((function(){O(c.length),C()}),100)},I=(0,r.useMemo)((function(){return S&&(0,e.jsx)(o.Popover,l({open:S,anchorEl:E,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},className:(t=y["auto-box-popover"],t+=" auto-box-popover",s&&(t+=" "+s),t)},{children:(0,e.jsx)("div",l({className:"auto-box-popover-content"},{children:c&&c.map((function(t,o){return null!==j&&j>o?null:(0,e.jsx)(r.Fragment,{children:t},o)}))}),void 0)}),void 0);var t}),[S,E,c,j,s]);return(0,e.jsxs)("div",l({className:(M=y["auto-box"],M+=" auto-box paraui-auto-box",h&&(M+=" "+h),n&&(M+=" "+n),M)},{children:[c.map((function(t,o){return null!==j&&j<=o?null:(0,e.jsx)(r.Fragment,{children:t},o)})),function(){if(null!==j&&c.length>j&&!b)return(0,e.jsx)("div",l({className:"auto-box-more",onClick:k},{children:p||(0,e.jsx)(i(),{},void 0)}),void 0)}(),I]}),void 0)};c.default=s}(),c}()}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/9 15:15
|
|
4
|
+
* @description 超出...
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
export interface AutoTipsProps {
|
|
8
|
+
/** 样式class */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** 超出显示的内容 */
|
|
11
|
+
tips?: string;
|
|
12
|
+
/** 定位方向 */
|
|
13
|
+
placement?: "top-start" | "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top" | undefined;
|
|
14
|
+
}
|
|
15
|
+
declare const AutoTips: FunctionComponent<AutoTipsProps>;
|
|
16
|
+
export default AutoTips;
|
package/AutoTips/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):e.ParaUI=t(e.react,e["@material-ui/core"],e["@material-ui/core/styles"])}(self,(function(e,t,r){return function(){"use strict";var n={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles")):e.ParaUI=t(e.react,e["@material-ui/core"],e["@material-ui/core/styles"])}(self,(function(e,t,r){return function(){"use strict";var n={4126:function(e){
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
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 a,c,u=o(e),f=1;f<arguments.length;f++){for(var l in a=Object(arguments[f]))r.call(a,l)&&(u[l]=a[l]);if(t){c=t(a);for(var s=0;s<c.length;s++)n.call(a,c[s])&&(u[c[s]]=a[c[s]])}}return u}},9524:function(e,t,r){
|
|
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
|
+
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 a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function f(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)&&!u.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:a.current}}t.jsx=f},7712:function(e,t,r){e.exports=r(9524)},853:function(e,t){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return r}},1731:function(e){e.exports=t},8604:function(e){e.exports=r},9297:function(t){t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){i.r(a);var e=i(7712),t=i(9297),r=i(1731),n=i(8604),o=i(853),c=function(){return c=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},c.apply(this,arguments)},u=((0,o.Z)(),(0,n.makeStyles)((function(e){return(0,n.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"}}})})));a.default=function(n){var o=n.children,i=n.placement,a=void 0===i?"bottom-start":i,f=n.tips,l=void 0===f?"":f,s=n.className,p=void 0===s?"":s,d=(0,t.useRef)(),y=u(),F=(0,t.useState)(""),g=F[0],b=F[1];(0,t.useEffect)((function(){b(l)}),[l]);var v;return(0,e.jsx)("div",c({ref:function(e){e&&(d.current=e)},className:(v=y["auto-tips"],v+=" paraui-auto-tips",p&&(v+=" "+p),v),onMouseOver:function(){d.current.scrollWidth>d.current.offsetWidth?b(g||d.current.innerText):b("")}},{children:(0,e.jsx)(r.Tooltip,c({title:g,placement:a},{children:(0,e.jsx)("div",c({className:"auto-tips-content"},{children:o}),void 0)}),void 0)}),void 0)}}(),a}()}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/3 10:59
|
|
4
|
+
* @description 面包屑
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
export interface listOptions {
|
|
8
|
+
/** 每一项显示名 */
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
[name: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface BreadcrumbsProps {
|
|
13
|
+
/** 初始化数据 */
|
|
14
|
+
list: listOptions[];
|
|
15
|
+
/** 中间符号 */
|
|
16
|
+
separator?: string;
|
|
17
|
+
/** 样式class */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** 弹出框样式class */
|
|
20
|
+
popoverClassName?: string;
|
|
21
|
+
/** 是否收缩 */
|
|
22
|
+
isShrink?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 点击菜单
|
|
25
|
+
* @param ops 当前点击菜单数据
|
|
26
|
+
*/
|
|
27
|
+
onClickItem?: (ops: listOptions) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const Breadcrumbs: FunctionComponent<BreadcrumbsProps>;
|
|
30
|
+
export default Breadcrumbs;
|
package/Breadcrumbs/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/More"),require("para-lib")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles","@para-ui/icons/More","para-lib"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/More"),require("para-lib")):e.ParaUI=r(e.react,e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/More"],e["para-lib"])}(self,(function(e,r,t,n,o){return function(){"use strict";var
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/More"),require("para-lib")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles","@para-ui/icons/More","para-lib"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/More"),require("para-lib")):e.ParaUI=r(e.react,e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/More"],e["para-lib"])}(self,(function(e,r,t,n,o){return function(){"use strict";var i={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,c,u=o(e),s=1;s<arguments.length;s++){for(var l in a=Object(arguments[s]))t.call(a,l)&&(u[l]=a[l]);if(r){c=r(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(u[c[f]]=a[c[f]])}}return u}},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(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),r.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var n,i={},s=null,l=null;for(n in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(l=r.ref),r)c.call(r,n)&&!u.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:s,ref:l,props:i,_owner:a.current}}r.jsx=s,r.jsxs=s},7712:function(e,r,t){e.exports=t(9524)},1731:function(e){e.exports=r},8604:function(e){e.exports=t},6090:function(e){e.exports=n},3475:function(e){e.exports=o},9297:function(r){r.exports=e}},a={};function c(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return i[e](t,t.exports,c),t.exports}c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,{a:r}),r},c.d=function(e,r){for(var t in r)c.o(r,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.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(){c.r(u),c.d(u,{Breadcrumbs:function(){return p}});var e=c(7712),r=c(9297),t=c(1731),n=c(8604),o=c(6090),i=c.n(o),a=c(3475),s=function(){return s=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},s.apply(this,arguments)},l=function(e,r,t){if(t||2===arguments.length)for(var n,o=0,i=r.length;o<i;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return e.concat(n||Array.prototype.slice.call(r))},f=(0,n.makeStyles)((function(e){return(0,n.createStyles)({popoverBreadcrumbs:{"& nav":{padding:"5px 8px"}}})})),p=function(n){var o=n.className,c=n.list,u=n.separator,p=void 0===u?"/":u,d=n.popoverClassName,m=n.isShrink,b=void 0===m||m,v=n.onClickItem,y=f(n),h=(0,r.useState)("breadcrumbs-"+(0,a.UUID)())[0],g=(0,r.useState)([]),j=g[0],O=g[1],x=(0,r.useState)(0),S=x[0],_=x[1],w=(0,r.useState)(!1),k=w[0],P=w[1],E=(0,r.useRef)();(0,r.useEffect)((function(){setTimeout((function(){var e=document.querySelector("."+h);e&&_(e.offsetWidth)})),O(l([],c,!0))}),[c]),(0,r.useEffect)((function(){return b?(setTimeout((function(){N()})),window.addEventListener("resize",N)):window.removeEventListener("resize",N),function(){window.removeEventListener("resize",N)}}),[j,S,b]);var q,N=function(){var e=document.querySelector("."+h);if(e&&S)if(e.parentNode&&e.parentNode.offsetWidth>S)c.length!==j.length&&(O(l([],c,!0)),P(!1));else{var r=[];r.push(c[0]),r.push({more:"more-breadcrumbs"}),r.push(c[c.length-1]),r.length!==j.length&&O(l([],r,!0))}},C=function(e){return function(){"more-breadcrumbs"===e.more?P(!0):v&&v(e)}},L=function(){P(!1)},I=(0,r.useMemo)((function(){return k&&(0,e.jsx)(t.Popover,s({open:k,anchorEl:E.current,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},className:(r=y.popoverBreadcrumbs,d&&(r+=" "+d),r)},{children:(0,e.jsx)(t.Breadcrumbs,s({separator:p},{children:c.map((function(r,n){return(0,e.jsx)(t.Link,s({onClick:C(r),className:n===c.length-1?"current-breadcrumbs":""},{children:r.label}),n)}))}),void 0)}),void 0);var r}),[k,E,p,c,d]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(t.Breadcrumbs,s({className:(q="paraui-breadcrumbs "+h,o&&(q+=" "+o),q),separator:p,ref:E},{children:j.map((function(r,n){return"more-breadcrumbs"===r.more?(0,e.jsx)(t.Link,s({onClick:C(r),className:"more-breadcrumbs"},{children:(0,e.jsx)(i(),{},void 0)}),n):(0,e.jsx)(t.Link,s({onClick:C(r),className:n===j.length-1?"current-breadcrumbs":""},{children:r.label}),n)}))}),void 0),I]},void 0)};u.default=p}(),u}()}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
root: {
|
|
3
|
+
display: string;
|
|
4
|
+
padding: string;
|
|
5
|
+
};
|
|
6
|
+
ol: {
|
|
7
|
+
flexWrap: string;
|
|
8
|
+
};
|
|
9
|
+
li: {
|
|
10
|
+
'& a': {
|
|
11
|
+
whiteSpace: string;
|
|
12
|
+
fontSize: string;
|
|
13
|
+
color: string;
|
|
14
|
+
'&:hover': {
|
|
15
|
+
textDecoration: string;
|
|
16
|
+
color: string;
|
|
17
|
+
};
|
|
18
|
+
'& svg': {
|
|
19
|
+
fontSize: string;
|
|
20
|
+
position: string;
|
|
21
|
+
top: string;
|
|
22
|
+
marginRight: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
'& .current-breadcrumbs': {
|
|
26
|
+
fontWeight: string;
|
|
27
|
+
color: string;
|
|
28
|
+
};
|
|
29
|
+
'& .more-breadcrumbs': {
|
|
30
|
+
'& svg': {
|
|
31
|
+
fontSize: string;
|
|
32
|
+
position: string;
|
|
33
|
+
top: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
separator: {
|
|
38
|
+
marginLeft: string;
|
|
39
|
+
marginRight: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2021/8/4 上午10:21
|
|
4
|
+
* @description 按钮
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
|
+
import { ButtonProps as MuiButtonProps, IconButtonProps as MuiIconButtonProps, TooltipProps } from "@material-ui/core";
|
|
8
|
+
export interface ButtonProps extends MuiButtonProps {
|
|
9
|
+
/** 圆角*/
|
|
10
|
+
radius?: boolean;
|
|
11
|
+
/** 设置按钮载入状态 */
|
|
12
|
+
loading?: boolean | {
|
|
13
|
+
delay: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface IconButtonProps extends MuiIconButtonProps {
|
|
17
|
+
/** 显示tooltip*/
|
|
18
|
+
showToolTip?: boolean;
|
|
19
|
+
/** tooltip title*/
|
|
20
|
+
toolTipTitle?: NonNullable<React.ReactNode>;
|
|
21
|
+
/** 设置按钮载入状态 */
|
|
22
|
+
loading?: boolean | {
|
|
23
|
+
delay: number;
|
|
24
|
+
};
|
|
25
|
+
TooltipProps?: Omit<TooltipProps, 'title' | 'children'>;
|
|
26
|
+
}
|
|
27
|
+
declare const InternalButton: FunctionComponent<ButtonProps>;
|
|
28
|
+
declare const IconButton: FunctionComponent<IconButtonProps>;
|
|
29
|
+
declare type mergedButtonType = typeof InternalButton & {
|
|
30
|
+
IconButton: typeof IconButton;
|
|
31
|
+
};
|
|
32
|
+
declare const Button: mergedButtonType;
|
|
33
|
+
export default Button;
|
package/Button/index.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/LoadingF")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles","@para-ui/icons/LoadingF"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/LoadingF")):e.ParaUI=t(e.react,e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/LoadingF"])}(self,(function(e,t,n,r){return function(){"use strict";var o={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}})},
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/LoadingF")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","@material-ui/core/styles","@para-ui/icons/LoadingF"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/LoadingF")):e.ParaUI=t(e.react,e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/LoadingF"])}(self,(function(e,t,n,r){return function(){"use strict";var o={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
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,c=o(e),s=1;s<arguments.length;s++){for(var u in a=Object(arguments[s]))n.call(a,u)&&(c[u]=a[u]);if(t){l=t(a);for(var d=0;d<l.length;d++)r.call(a,l[d])&&(c[l[d]]=a[l[d]])}}return c}},9524:function(e,t,n){
|
|
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
|
+
n(4126);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,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:a.current}}t.jsx=s},7712:function(e,t,n){e.exports=n(9524)},853:function(e,t){var n={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 n}},1731:function(e){e.exports=t},8604:function(e){e.exports=n},1102:function(e){e.exports=r},9297:function(t){t.exports=e}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e](n,n.exports,a),n.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 n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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 l={};return function(){a.r(l);var e=a(7712),t=a(9297),n=a(1731),r=a(8604),o=a(4927),i=a(1102),c=a.n(i),s=a(853),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){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},f=(0,s.Z)(),p=(0,r.makeStyles)((function(e){return(0,r.createStyles)({"@keyframes loadingCircle":{"100%":{transform:"rotate(1turn)"}},radius:{borderRadius:15},btnIcon:{"& .btn-icon":{display:"inline-flex",alignItems:"center"},"& .btn-icon svg":{color:"currentColor"}},outlinedBtn:{"& .btn-icon svg":{color:f.thmemColor.primary},"&:disabled":{"& .btn-icon svg":{color:"currentColor"}}},iconButtonToolTip:{display:"inline-block",cursor:"not-allowed","& .iconButton-disabled":{cursor:"not-allowed",pointerEvents:"none"}},loadingBtn:{position:"relative",pointerEvents:"none","&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,transition:"opacity .2s",pointerEvents:"none"},"& .loading-icon":{animation:"$loadingCircle 1s infinite linear"}}})})),b=(0,r.withStyles)((function(e){return{tooltip:{margin:"6px 0",backgroundColor:f.bgBorderColor.bg4}}}))(n.Tooltip),g=function(r){var i=p(),a=r.radius,l=r.className,s=r.disabled,f=void 0!==s&&s,b=r.children,g=r.startIcon,y=r.endIcon,v=r.loading,m=void 0!==v&&v,F=d(r,["radius","className","disabled","children","startIcon","endIcon","loading"]);"text"===F.variant&&(F.disableRipple=!0);var h=(0,t.useState)(!1),x=h[0],j=h[1];return(0,t.useEffect)((function(){j(!!m)}),[m]),(0,e.jsx)(n.Button,u({disabled:f,className:(0,o.Z)("paraui-button",l,i.btnIcon,a&&i.radius,"outlined"===F.variant&&i.outlinedBtn,x&&i.loadingBtn),startIcon:function(){if(!x)return(0,e.jsx)("span",u({className:"btn-icon"},{children:g}),void 0);if("object"==typeof m){var t=m.delay||0;setTimeout((function(){return j(!1)}),t)}return(0,e.jsx)("span",u({className:"btn-icon loading-icon"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)}(),endIcon:(0,e.jsx)("span",u({className:"btn-icon"},{children:y}),void 0)},F,{children:b}),void 0)};g.IconButton=function(r){var i=p(),a=r.showToolTip,l=void 0===a||a,s=r.toolTipTitle,f=void 0===s?"":s,g=r.children,y=r.className,v=r.disabled,m=void 0!==v&&v,F=r.loading,h=void 0!==F&&F,x=r.TooltipProps,j=d(r,["showToolTip","toolTipTitle","children","className","disabled","loading","TooltipProps"]),O=(0,t.useState)(!1),S=O[0],E=O[1],w=(0,e.jsx)(n.IconButton,u({},j,{disabled:m,disableRipple:!0,className:(0,o.Z)("paraui-icon-button",y,l&&m&&"iconButton-disabled",S&&i.loadingBtn)},{children:function(){if(!S)return g;if("object"==typeof h){var t=h.delay||0;setTimeout((function(){return E(!1)}),t)}return(0,e.jsx)("span",u({className:"loading-icon"},{children:(0,e.jsx)(c(),{},void 0)}),void 0)}()}),void 0);return(0,t.useEffect)((function(){E(!!h)}),[h]),l?(0,e.jsx)(b,u({title:f},x,{children:(0,e.jsx)("span",u({className:(0,o.Z)(m&&i.iconButtonToolTip)},{children:w}),void 0)}),void 0):w},l.default=g}(),l}()}));
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
root: {
|
|
3
|
+
minWidth: number;
|
|
4
|
+
height: number;
|
|
5
|
+
textTransform: string;
|
|
6
|
+
color: string;
|
|
7
|
+
lineHeight: string;
|
|
8
|
+
};
|
|
9
|
+
disabled: {};
|
|
10
|
+
label: {};
|
|
11
|
+
text: {
|
|
12
|
+
padding: string;
|
|
13
|
+
'&:hover': {
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
color: string;
|
|
16
|
+
};
|
|
17
|
+
'&$disabled': {
|
|
18
|
+
color: string;
|
|
19
|
+
pointerEvents: string;
|
|
20
|
+
cursor: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
textPrimary: {
|
|
24
|
+
'&:hover': {
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
color: string;
|
|
27
|
+
};
|
|
28
|
+
'&$disabled': {
|
|
29
|
+
color: string;
|
|
30
|
+
pointerEvents: string;
|
|
31
|
+
cursor: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
textSecondary: {
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
37
|
+
outlined: {
|
|
38
|
+
padding: string;
|
|
39
|
+
color: string;
|
|
40
|
+
boxShadow: string;
|
|
41
|
+
border: number;
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
'&$disabled': {
|
|
44
|
+
color: string;
|
|
45
|
+
padding: string;
|
|
46
|
+
border: number;
|
|
47
|
+
pointerEvents: string;
|
|
48
|
+
cursor: string;
|
|
49
|
+
};
|
|
50
|
+
'&:hover': {
|
|
51
|
+
color: string;
|
|
52
|
+
backgroundColor: string;
|
|
53
|
+
border: number;
|
|
54
|
+
'&$disabled': {
|
|
55
|
+
color: string;
|
|
56
|
+
padding: string;
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
border: number;
|
|
59
|
+
pointerEvents: string;
|
|
60
|
+
cursor: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
outlinedPrimary: {
|
|
65
|
+
padding: string;
|
|
66
|
+
color: string;
|
|
67
|
+
border: number;
|
|
68
|
+
'&$disabled': {
|
|
69
|
+
color: string;
|
|
70
|
+
padding: string;
|
|
71
|
+
border: number;
|
|
72
|
+
pointerEvents: string;
|
|
73
|
+
cursor: string;
|
|
74
|
+
};
|
|
75
|
+
'&:hover': {
|
|
76
|
+
color: string;
|
|
77
|
+
backgroundColor: string;
|
|
78
|
+
border: number;
|
|
79
|
+
'&$disabled': {
|
|
80
|
+
color: string;
|
|
81
|
+
padding: string;
|
|
82
|
+
backgroundColor: string;
|
|
83
|
+
border: number;
|
|
84
|
+
pointerEvents: string;
|
|
85
|
+
cursor: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
outlinedSecondary: {
|
|
90
|
+
padding: string;
|
|
91
|
+
color: string;
|
|
92
|
+
border: number;
|
|
93
|
+
'&$disabled': {
|
|
94
|
+
color: string;
|
|
95
|
+
padding: string;
|
|
96
|
+
border: number;
|
|
97
|
+
pointerEvents: string;
|
|
98
|
+
cursor: string;
|
|
99
|
+
};
|
|
100
|
+
'&:hover': {
|
|
101
|
+
color: string;
|
|
102
|
+
backgroundColor: string;
|
|
103
|
+
border: number;
|
|
104
|
+
'&$disabled': {
|
|
105
|
+
color: string;
|
|
106
|
+
padding: string;
|
|
107
|
+
backgroundColor: string;
|
|
108
|
+
border: number;
|
|
109
|
+
pointerEvents: string;
|
|
110
|
+
cursor: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
contained: {
|
|
115
|
+
padding: string;
|
|
116
|
+
backgroundColor: string;
|
|
117
|
+
color: string;
|
|
118
|
+
boxShadow: string;
|
|
119
|
+
'&$disabled': {
|
|
120
|
+
color: string;
|
|
121
|
+
backgroundColor: string;
|
|
122
|
+
pointerEvents: string;
|
|
123
|
+
cursor: string;
|
|
124
|
+
};
|
|
125
|
+
'&:hover': {
|
|
126
|
+
color: string;
|
|
127
|
+
backgroundColor: string;
|
|
128
|
+
boxShadow: string;
|
|
129
|
+
'&$disabled': {
|
|
130
|
+
color: string;
|
|
131
|
+
backgroundColor: string;
|
|
132
|
+
pointerEvents: string;
|
|
133
|
+
cursor: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
containedPrimary: {
|
|
138
|
+
'&$disabled': {
|
|
139
|
+
color: string;
|
|
140
|
+
backgroundColor: string;
|
|
141
|
+
pointerEvents: string;
|
|
142
|
+
cursor: string;
|
|
143
|
+
};
|
|
144
|
+
'&:hover': {
|
|
145
|
+
color: string;
|
|
146
|
+
backgroundColor: string;
|
|
147
|
+
boxShadow: string;
|
|
148
|
+
'&$disabled': {
|
|
149
|
+
color: string;
|
|
150
|
+
backgroundColor: string;
|
|
151
|
+
boxShadow: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
containedSecondary: {};
|
|
156
|
+
textSizeSmall: {};
|
|
157
|
+
textSizeLarge: {};
|
|
158
|
+
outlinedSizeSmall: {
|
|
159
|
+
height: number;
|
|
160
|
+
padding: string;
|
|
161
|
+
};
|
|
162
|
+
outlinedSizeLarge: {
|
|
163
|
+
height: number;
|
|
164
|
+
padding: string;
|
|
165
|
+
};
|
|
166
|
+
containedSizeSmall: {
|
|
167
|
+
height: number;
|
|
168
|
+
padding: string;
|
|
169
|
+
};
|
|
170
|
+
containedSizeLarge: {
|
|
171
|
+
height: number;
|
|
172
|
+
padding: string;
|
|
173
|
+
};
|
|
174
|
+
sizeSmall: {};
|
|
175
|
+
sizeLarge: {};
|
|
176
|
+
startIcon: {};
|
|
177
|
+
endIcon: {};
|
|
178
|
+
iconSizeSmall: {};
|
|
179
|
+
iconSizeMedium: {};
|
|
180
|
+
iconSizeLarge: {};
|
|
181
|
+
};
|
|
182
|
+
export default _default;
|
|
183
|
+
export declare const MuiIconButton: {
|
|
184
|
+
root: {
|
|
185
|
+
padding: number;
|
|
186
|
+
'&:hover': {
|
|
187
|
+
backgroundColor: string;
|
|
188
|
+
};
|
|
189
|
+
'&$disabled': {
|
|
190
|
+
color: string;
|
|
191
|
+
pointerEvents: string;
|
|
192
|
+
cursor: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
colorPrimary: {
|
|
196
|
+
'&:hover': {
|
|
197
|
+
backgroundColor: string;
|
|
198
|
+
};
|
|
199
|
+
'&$disabled': {
|
|
200
|
+
color: string;
|
|
201
|
+
pointerEvents: string;
|
|
202
|
+
cursor: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
colorSecondary: {
|
|
206
|
+
'&:hover': {
|
|
207
|
+
backgroundColor: string;
|
|
208
|
+
};
|
|
209
|
+
'&$disabled': {
|
|
210
|
+
color: string;
|
|
211
|
+
pointerEvents: string;
|
|
212
|
+
cursor: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
disabled: {};
|
|
216
|
+
};
|