@para-ui/core 1.1.31 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.d.ts +1 -0
- package/AutoBox/index.js +3 -3
- package/AutoTips/index.d.ts +1 -0
- package/AutoTips/index.js +3 -3
- package/Breadcrumbs/index.d.ts +1 -0
- package/Breadcrumbs/index.js +2 -2
- package/Button/SplitButton.d.ts +42 -0
- package/Button/index.d.ts +28 -7
- package/Button/index.js +3 -3
- package/ButtonGroup/index.d.ts +13 -18
- package/ButtonGroup/index.js +3 -3
- package/Cascader/index.d.ts +52 -0
- package/Cascader/index.js +16 -0
- package/Checkbox/index.d.ts +21 -5
- package/Checkbox/index.js +3 -3
- package/CheckboxGroup/index.d.ts +5 -2
- package/CheckboxGroup/index.js +3 -3
- package/ColorPicker/index.js +1 -1
- package/ComboSelect/WithTabsCombo/index.d.ts +3 -2
- package/ComboSelect/WithTabsCombo/interface.d.ts +6 -1
- package/ComboSelect/index.d.ts +8 -7
- package/ComboSelect/index.js +5 -3
- package/ComboSelect/interface.d.ts +21 -15
- package/ComboSelect/utils.d.ts +5 -0
- package/Container/index.js +4 -3
- package/DatePicker/index.js +3 -3
- package/Desktop/index.js +5 -3
- package/Drawer/index.d.ts +10 -4
- package/Drawer/index.js +16 -1
- package/Drawer/interface.d.ts +63 -0
- package/Form/index.js +3 -3
- package/FormItem/compoments/formFile/index.d.ts +1 -0
- package/FormItem/index.d.ts +46 -45
- package/FormItem/index.js +3 -3
- package/FunctionModal/index.js +5 -3
- package/Help/index.js +2 -2
- package/IconList/index.js +4 -3
- package/InputLang/index.d.ts +3 -0
- package/InputLang/index.js +3 -3
- package/InputNumber/index.d.ts +8 -32
- package/InputNumber/index.js +3 -3
- package/Menu/footerExpansion.d.ts +4 -4
- package/Menu/index.d.ts +5 -4
- package/Menu/index.js +3 -3
- package/Menu/interface.d.ts +12 -125
- package/Menu/logo.d.ts +4 -4
- package/Menu/verticalMenuList.d.ts +4 -4
- package/Message/index.d.ts +8 -0
- package/Message/index.js +4 -3
- package/Modal/Confirm/index.d.ts +3 -4
- package/Modal/index.d.ts +9 -11
- package/Modal/index.js +3 -3
- package/MultiBox/index.d.ts +3 -0
- package/MultiBox/index.js +3 -3
- package/{Menu/horizontalMeunList.d.ts → PageHeader/horizontalMeun.d.ts} +2 -2
- package/{Menu → PageHeader}/horizontalMeunRight.d.ts +4 -4
- package/PageHeader/index.d.ts +10 -0
- package/PageHeader/index.js +16 -0
- package/PageHeader/interface.d.ts +165 -0
- package/Pagination/index.d.ts +6 -0
- package/Pagination/index.js +3 -3
- package/ParauiProvider/index.d.ts +1 -0
- package/ParauiProvider/index.js +3 -3
- package/PopConfirm/index.d.ts +8 -5
- package/PopConfirm/index.js +3 -3
- package/Popover/index.js +3 -3
- package/Radio/index.d.ts +22 -8
- package/Radio/index.js +3 -3
- package/RadioGroup/index.d.ts +8 -4
- package/RadioGroup/index.js +3 -3
- package/Search/index.d.ts +3 -0
- package/Search/index.js +3 -3
- package/Select/index.d.ts +5 -4
- package/Select/index.js +3 -3
- package/SingleBox/index.d.ts +6 -1
- package/SingleBox/index.js +3 -3
- package/Slider/index.d.ts +13 -2
- package/Slider/index.js +16 -1
- package/Slider/interface.d.ts +100 -0
- package/Split/index.js +4 -3
- package/Stepper/index.d.ts +1 -0
- package/Stepper/index.js +3 -3
- package/Styles/index.scss +7 -6
- package/Styles/normalize.scss +348 -0
- package/Styles/theme.scss +53 -0
- package/Switch/index.d.ts +52 -10
- package/Switch/index.js +3 -3
- package/Table/index.d.ts +1 -0
- package/Table/index.js +3 -3
- package/Table/tableBodyInterface.d.ts +1 -1
- package/Tabs/index.d.ts +9 -9
- package/Tabs/index.js +3 -3
- package/TextField/index.d.ts +4 -5
- package/TextField/index.js +3 -3
- package/TimePicker/index.js +3 -3
- package/Timeline/index.d.ts +8 -7
- package/Timeline/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +44 -0
- package/ToggleButton/index.d.ts +44 -0
- package/ToggleButton/index.js +16 -0
- package/{ToolTip → Tooltip}/index.d.ts +4 -3
- package/Tooltip/index.js +16 -0
- package/Transfer/index.d.ts +17 -0
- package/Transfer/index.js +16 -0
- package/Tree/OperateBar/index.d.ts +11 -2
- package/Tree/index.d.ts +1 -0
- package/Tree/index.js +5 -3
- package/Tree/interface.d.ts +14 -10
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +2 -1
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +3 -5
- package/Upload/UploadList/index.d.ts +1 -0
- package/Upload/index.d.ts +11 -9
- package/Upload/index.js +3 -3
- package/Upload/interface.d.ts +22 -14
- package/index.d.ts +5 -1
- package/index.js +3 -3
- package/package.json +8 -2
- package/style.css +100 -0
- package/Breadcrumbs/theme.d.ts +0 -42
- package/Button/theme.d.ts +0 -216
- package/ButtonGroup/SplitButton.d.ts +0 -17
- package/Checkbox/iconMapping.d.ts +0 -2
- package/ComboSelect/styles.d.ts +0 -6
- package/Menu/horizontalMenu.d.ts +0 -9
- package/Menu/verticalFooter.d.ts +0 -9
- package/Menu/verticalMenu.d.ts +0 -9
- package/ParauiProvider/theme/paraTheme.d.ts +0 -3
- package/ParauiProvider/theme/styleConfig.d.ts +0 -74
- package/Radio/iconMapping.d.ts +0 -2
- package/Stepper/theme.d.ts +0 -56
- package/Tabs/theme.d.ts +0 -53
- package/ToolTip/index.js +0 -16
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/10 14:24
|
|
4
|
+
* @description 菜单参数
|
|
5
|
+
*/
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
/** 菜单类型 */
|
|
8
|
+
export declare type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
|
|
9
|
+
/** 菜单列表项参数 */
|
|
10
|
+
export interface MenuChildrenProps {
|
|
11
|
+
/** 样式class */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 菜单名 */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** 菜单类型 */
|
|
16
|
+
type?: MenuListTypeType;
|
|
17
|
+
/** 菜单路径 */
|
|
18
|
+
path?: string;
|
|
19
|
+
/** 菜单图标 */
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
/** 菜单组件 */
|
|
22
|
+
component?: any;
|
|
23
|
+
/** 子菜单 */
|
|
24
|
+
children?: MenuChildrenProps[];
|
|
25
|
+
/** 菜单最后一层所有上下级 一条线 */
|
|
26
|
+
idMenuLast?: any;
|
|
27
|
+
/** 当前选中菜单 */
|
|
28
|
+
selectMenu?: string;
|
|
29
|
+
/** 点击菜单 */
|
|
30
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
31
|
+
[name: string]: any;
|
|
32
|
+
}
|
|
33
|
+
/** 菜单列表参数 */
|
|
34
|
+
export interface MenuListProps {
|
|
35
|
+
/** 菜单列表参数 */
|
|
36
|
+
list?: MenuChildrenProps[];
|
|
37
|
+
/** 当前选中菜单 */
|
|
38
|
+
selectMenu?: string;
|
|
39
|
+
/** 点击菜单 */
|
|
40
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
41
|
+
/** 样式class */
|
|
42
|
+
className?: string;
|
|
43
|
+
/** 自定义更多内容 */
|
|
44
|
+
moreCustomize?: ReactNode;
|
|
45
|
+
[name: string]: any;
|
|
46
|
+
}
|
|
47
|
+
/** 语言 */
|
|
48
|
+
export interface LanguageItemProps {
|
|
49
|
+
/** 图标 */
|
|
50
|
+
icon?: ReactNode;
|
|
51
|
+
/** 文字 */
|
|
52
|
+
label?: ReactNode;
|
|
53
|
+
/** 值 */
|
|
54
|
+
value?: string;
|
|
55
|
+
[name: string]: any;
|
|
56
|
+
}
|
|
57
|
+
/** 语言 */
|
|
58
|
+
export interface LanguageProps {
|
|
59
|
+
/** 样式class */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** 当前选中的语言 */
|
|
62
|
+
selectLang?: string;
|
|
63
|
+
/** 语言列表 */
|
|
64
|
+
language?: LanguageItemProps[];
|
|
65
|
+
/** 点击下拉语言 */
|
|
66
|
+
onClick?: (val: any, item: LanguageItemProps) => void;
|
|
67
|
+
/** 自定义 */
|
|
68
|
+
render?: ReactNode;
|
|
69
|
+
}
|
|
70
|
+
export interface BackSelfcareProps {
|
|
71
|
+
/** 图标 */
|
|
72
|
+
icon?: ReactNode;
|
|
73
|
+
/** 标题 */
|
|
74
|
+
label?: ReactNode;
|
|
75
|
+
/** 自定义 */
|
|
76
|
+
render?: ReactNode;
|
|
77
|
+
/** 样式class */
|
|
78
|
+
className?: string;
|
|
79
|
+
/** 点击事件 */
|
|
80
|
+
onClick?: (e: any) => void;
|
|
81
|
+
}
|
|
82
|
+
/** 按钮listItem */
|
|
83
|
+
export interface BtnListItemProps {
|
|
84
|
+
/** 图标 */
|
|
85
|
+
icon?: ReactNode;
|
|
86
|
+
/** 标题 */
|
|
87
|
+
label?: ReactNode;
|
|
88
|
+
/** 值 */
|
|
89
|
+
value?: string;
|
|
90
|
+
/** 标记 */
|
|
91
|
+
sign?: boolean;
|
|
92
|
+
[name: string]: any;
|
|
93
|
+
}
|
|
94
|
+
/** 按钮列表 */
|
|
95
|
+
export interface BtnListProps {
|
|
96
|
+
/** 按钮list */
|
|
97
|
+
list?: BtnListItemProps[];
|
|
98
|
+
/** 自定义 */
|
|
99
|
+
render?: ReactNode;
|
|
100
|
+
/** 样式class */
|
|
101
|
+
className?: string;
|
|
102
|
+
/** 点击事件 */
|
|
103
|
+
onClick?: (item: BtnListItemProps, e: any) => void;
|
|
104
|
+
}
|
|
105
|
+
/** 用户下拉菜单 */
|
|
106
|
+
export interface UserListProps {
|
|
107
|
+
/** 图标 */
|
|
108
|
+
icon?: ReactNode;
|
|
109
|
+
/** 标题 */
|
|
110
|
+
label?: ReactNode;
|
|
111
|
+
/** 值 */
|
|
112
|
+
value?: string;
|
|
113
|
+
[name: string]: any;
|
|
114
|
+
}
|
|
115
|
+
/** 用户信息 */
|
|
116
|
+
export interface UserProps {
|
|
117
|
+
/** 样式class */
|
|
118
|
+
className?: string;
|
|
119
|
+
/** 图片地址 */
|
|
120
|
+
img?: string;
|
|
121
|
+
/** imgRender */
|
|
122
|
+
imgRender?: ReactNode;
|
|
123
|
+
/** 显示名 */
|
|
124
|
+
label?: ReactNode;
|
|
125
|
+
/** 自定义 */
|
|
126
|
+
render?: ReactNode;
|
|
127
|
+
/** 下拉菜单选中的值 */
|
|
128
|
+
selectValue?: any;
|
|
129
|
+
/** 下拉菜单 */
|
|
130
|
+
list?: UserListProps[];
|
|
131
|
+
/** 点击用户 */
|
|
132
|
+
onClick?: (e: any) => void;
|
|
133
|
+
/** 点击下拉菜单 */
|
|
134
|
+
onClickMenu?: (val: any, item: UserListProps) => void;
|
|
135
|
+
}
|
|
136
|
+
/** 尾部导航 */
|
|
137
|
+
export interface FooterProps {
|
|
138
|
+
/** 样式class */
|
|
139
|
+
className?: string;
|
|
140
|
+
/** 返回自助参数 */
|
|
141
|
+
backSelfcareProps?: BackSelfcareProps;
|
|
142
|
+
/** 语言采纳数 */
|
|
143
|
+
languageProps?: LanguageProps;
|
|
144
|
+
/** 按钮list */
|
|
145
|
+
btnListProps?: BtnListProps;
|
|
146
|
+
/** 用户参数 */
|
|
147
|
+
userProps?: UserProps;
|
|
148
|
+
/** 自定义 */
|
|
149
|
+
render?: ReactNode;
|
|
150
|
+
}
|
|
151
|
+
/** 菜单参数 */
|
|
152
|
+
export interface PageHeaderProps {
|
|
153
|
+
/** 样式class */
|
|
154
|
+
className?: string;
|
|
155
|
+
/** 当前选中菜单 */
|
|
156
|
+
selectMenu?: string;
|
|
157
|
+
/** 左侧自定义内容 */
|
|
158
|
+
leftRender?: ReactNode;
|
|
159
|
+
/** 菜单配置 */
|
|
160
|
+
menuListProps?: MenuListProps;
|
|
161
|
+
/** 尾部参数 */
|
|
162
|
+
footerProps?: FooterProps;
|
|
163
|
+
/** 点击菜单 */
|
|
164
|
+
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
165
|
+
}
|
package/Pagination/index.d.ts
CHANGED
package/Pagination/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/DoubleLeft"),require("@para-ui/icons/DoubleRight"),require("@para-ui/icons/Down"),require("@para-ui/icons/Left"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Right"),require("@para-ui/icons/Search"),require("para-lib"),require("rc-pagination"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Check","@para-ui/icons/Close","@para-ui/icons/DoubleLeft","@para-ui/icons/DoubleRight","@para-ui/icons/Down","@para-ui/icons/Left","@para-ui/icons/LoadingF","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/Right","@para-ui/icons/Search","para-lib","rc-pagination","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Check"),require("@para-ui/icons/Close"),require("@para-ui/icons/DoubleLeft"),require("@para-ui/icons/DoubleRight"),require("@para-ui/icons/Down"),require("@para-ui/icons/Left"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Right"),require("@para-ui/icons/Search"),require("para-lib"),require("rc-pagination"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Check"],e["@para-ui/icons/Close"],e["@para-ui/icons/DoubleLeft"],e["@para-ui/icons/DoubleRight"],e["@para-ui/icons/Down"],e["@para-ui/icons/Left"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/Right"],e["@para-ui/icons/Search"],e["para-lib"],e["rc-pagination"],e.react)}(self,(function(e,t,n,i,o,r,s,a,l,c,u,d,f,v,p){return function(){"use strict";var h,m={4927:function(e,t,n){function i(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=i(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=i(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},4126:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var 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 i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var s,a,l=o(e),c=1;c<arguments.length;c++){for(var u in s=Object(arguments[c]))n.call(s,u)&&(l[u]=s[u]);if(t){a=t(s);for(var d=0;d<a.length;d++)i.call(s,a[d])&&(l[a[d]]=s[a[d]])}}return l}},9524:function(e,t,n){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
r(4126);var t=r(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;o=n("react.element"),n("react.fragment")}var a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function p(e,i,r){var t,n={},p=null,c=null;for(t in void 0!==r&&(p=""+r),void 0!==i.key&&(p=""+i.key),void 0!==i.ref&&(c=i.ref),i)l.call(i,t)&&!s.hasOwnProperty(t)&&(n[t]=i[t]);if(e&&e.defaultProps)for(t in i=e.defaultProps)void 0===n[t]&&(n[t]=i[t]);return{$$typeof:o,type:e,key:p,ref:c,props:n,_owner:a.current}}i.jsx=p,i.jsxs=p},7712:function(e,i,r){e.exports=r(9524)},5415:function(e,i){var r={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};i.Z=function(){return r}},1731:function(e){e.exports=r},8604:function(e){e.exports=t},4508:function(e){e.exports=i},7428:function(e){e.exports=o},934:function(e){e.exports=n},6028:function(e){e.exports=s},1127:function(e){e.exports=a},6288:function(e){e.exports=l},9297:function(i){i.exports=e}},c={};function u(e){var i=c[e];if(void 0!==i)return i.exports;var r=c[e]={exports:{}};return p[e](r,r.exports,u),r.exports}u.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(i,{a:i}),i},u.d=function(e,i){for(var r in i)u.o(i,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},u.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return function(){u.r(d),u.d(d,{Pagination:function(){return j}});var e=u(7712),i=u(9297),r=u(4508),t=u(1731),o=u(8604),n=u(7428),a=u.n(n),l=u(934),s=u.n(l),p=u(1127),c=u.n(p),g=u(6288),f=u.n(g),m=u(6028),x=u.n(m),h=u(5415),v=function(){return v=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++)for(var o in i=arguments[r])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},v.apply(this,arguments)},b=(0,h.Z)(),y=(0,o.makeStyles)((function(){return(0,o.createStyles)({pagination:{color:b.textColor.secondary,fontSize:b.fontSize,fontFamily:b.fontFamily.zh,"& > div":{display:"inline-block",verticalAlign:"middle"},"& > .total-num":{marginRight:"20px"},"& > .page-line-memo":{cursor:"pointer",marginRight:"20px","& > span":{marginRight:"10px"},"& > .select-page":{display:"inline-block",boxShadow:b.boxShadow,paddingLeft:"10px",borderRadius:b.borderRadius,height:"24px",lineHeight:"24px","& > span":{color:b.textColor.primary,marginRight:"10px"},"& > svg":{fontSize:"12px",marginRight:"5px",color:b.textColor.thirdary,position:"relative",top:"1px",transition:"all .3s"}},"&.page-line-memo-expand":{"& > .select-page":{"& > svg":{transform:"rotate(180deg)",color:b.thmemColor.primary}}}},"& > .current-page":{marginRight:"20px","& > .current-page-num":{color:b.textColor.primary,marginRight:"4px",marginLeft:"4px"},"& > .current-page-sign":{marginRight:"3px"}},"& > .pagination-content":{boxShadow:b.boxShadow,borderRadius:b.borderRadius,height:"24px",lineHeight:"24px","& > .left-page,& > .right-page":{display:"inline-block",padding:"0 10px","& > button":{borderRadius:b.borderRadius,padding:"2px",verticalAlign:"top",marginTop:"4px","&:hover":{backgroundColor:b.bgBorderColor.bg2,"& svg":{color:b.thmemColor.primary}},"& svg":{fontSize:"12px",color:b.textColor.secondary}}},"& > .left-page":{"& > button":{marginRight:"10px"}},"& > nav":{display:"inline-block","& > ul":{"& > li":{marginRight:"10px","& > button":{height:"16px",minWidth:"16px",fontSize:"12px",borderRadius:b.borderRadius,padding:"2px",margin:"0",verticalAlign:"top",marginTop:"4px","&.Mui-selected":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary},"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"&:first-child":{display:"none"},"&:last-child":{display:"none"},"& > div":{display:"inline-block",verticalAlign:"top",marginTop:"3px"}}}},"& > .right-page":{paddingLeft:"0px","& > button":{marginLeft:"10px"}}},"& > .skip-page-memo":{marginLeft:"20px","& > .skip-page-text":{display:"inline-block",marginLeft:"10px",boxShadow:b.boxShadow,borderRadius:b.borderRadius,height:"24px",lineHeight:"24px",paddingRight:"6px",paddingLeft:"10px","& > .skip-input":{height:"100%","& > div":{height:"100%","& > div":{height:"100%"}},"& input":{padding:"0",width:"22px",fontSize:b.fontSize,color:b.textColor.primary,height:"24px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{appearance:"none"}},"& fieldset":{border:"0"}}}}},"page-line-memo-popover":{"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginTop:"5px",minWidth:"60px",textAlign:"center",fontSize:"12px","& > div":{height:"30px",lineHeight:"30px",cursor:"pointer"},"& > .page-line-item":{color:b.textColor.secondary,"&:hover":{backgroundColor:b.bgBorderColor.bg2,color:b.thmemColor.primary}},"& > .select-page-line-item":{color:b.thmemColor.primary}}}})})),j=function(o){var n=o.className,l=o.type,p=void 0===l?"simple":l,u=o.total,d=void 0===u?0:u,g=o.rowsPerPage,m=void 0===g?[10,20,30]:g,h=o.currentRowsPerPage,b=void 0===h?10:h,j=o.page,F=void 0===j?1:j,S=o.skipFunc,C=o.changePage,k=o.changeRowsPerPage,R=y(o),w=(0,i.useState)(null),O=w[0],D=w[1],E=(0,i.useState)(b),N=E[0],P=E[1],z=(0,i.useState)(F),L=z[0],_=z[1],q=(0,i.useState)(),B=q[0],M=q[1],T=(0,i.useState)(),I=T[0],A=T[1];(0,i.useEffect)((function(){b!==N&&P(b)}),[b]),(0,i.useEffect)((function(){F!==L&&_(F)}),[F]),(0,i.useEffect)((function(){var e=Number(B);L>e&&e!==L&&_(e)}),[L,B]),(0,i.useEffect)((function(){var e=Math.ceil(d/N);M(e||1)}),[N,d]);var W,H=function(e){D(e.currentTarget)},U=function(){D(null)},Y=function(e){return function(i,r){var t=L;switch(e){case"first":t=1;break;case"prev":t--;break;case"last":t=B;break;case"next":t++;break;case"pagination":t=r}void 0!==t&&_(t),C&&C(t)}},K=function(e){-1!==["E","e",".","-"].indexOf(e.key)&&e.preventDefault()},Z=function(e){if(13===e.keyCode){var i=parseInt(I&&I.toString()||"0");i<=0&&A(i=1),i>Number(B)&&(i=Number(B),A(i)),S&&S(i,I),_(i),C&&C(i)}},$=function(e){A(e.target.value)},G=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"total-num"},{children:["共",d,"条"]}),void 0)}),[d]),J=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:Boolean(O)?"page-line-memo page-line-memo-expand":"page-line-memo"},{children:[(0,e.jsx)("span",{children:"每页行数"},void 0),(0,e.jsxs)("div",v({className:"select-page",onClick:H},{children:[(0,e.jsx)("span",{children:N},void 0),(0,e.jsx)(x(),{},void 0)]}),void 0),(0,e.jsx)(t.Popover,v({open:Boolean(O),anchorEl:O,onClose:U,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},className:R["page-line-memo-popover"]},{children:m.map((function(i,r){return(0,e.jsx)("div",v({onClick:(t=i,function(){U(),t!==N&&(P(t),k&&k(t))}),className:N===i?"select-page-line-item page-line-item":"page-line-item"},{children:i}),r);var t}))}),void 0)]}),void 0)}),[O,m,N]),Q=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"current-page"},{children:["当前第",(0,e.jsx)("span",v({className:"current-page-num"},{children:L}),void 0),(0,e.jsx)("span",v({className:"current-page-sign"},{children:"/"}),void 0),(0,e.jsx)("span",v({className:"current-page-last"},{children:B}),void 0),"页"]}),void 0)}),[L,B]),V=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"pagination-content"},{children:[(0,e.jsxs)("div",v({className:"left-page"},{children:[(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("first"),disabled:1===L},{children:(0,e.jsx)(a(),{},void 0)}),void 0),(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("prev"),disabled:1===L},{children:(0,e.jsx)(c(),{},void 0)}),void 0)]}),void 0),(0,e.jsx)(r.Pagination,{count:B,page:L,onChange:Y("pagination")},void 0),(0,e.jsxs)("div",v({className:"right-page"},{children:[(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("next"),disabled:L===B},{children:(0,e.jsx)(f(),{},void 0)}),void 0),(0,e.jsx)(t.IconButton,v({size:"small",onClick:Y("last"),disabled:L===B},{children:(0,e.jsx)(s(),{},void 0)}),void 0)]}),void 0)]}),void 0)}),[d,L,B]),X=(0,i.useMemo)((function(){return(0,e.jsxs)("div",v({className:"skip-page-memo"},{children:[(0,e.jsx)("span",{children:"跳转到"},void 0),(0,e.jsxs)("div",v({className:"skip-page-text"},{children:[(0,e.jsx)(t.TextField,{className:"skip-input",variant:"outlined",type:"number",value:I||"",onChange:$,onKeyDown:K,onKeyUp:Z},void 0),(0,e.jsx)("span",{children:"页"},void 0)]}),void 0)]}),void 0)}),[I,B]);return(0,e.jsxs)("div",v({className:(W=R.pagination,n&&(W+=" "+n),W)},{children:["complex"===p&&G,Q,J,V,"complex"===p&&X]}),void 0)};d.default=j}(),d}()}));
|
|
16
|
+
n(4126);var i=n(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 s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var i,r={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,i)&&!l.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:o,type:e,key:c,ref:u,props:r,_owner:s.current}}t.jsx=c,t.jsxs=c},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var i=n(7712),o=n(9297),r=n(6885),s=function(){return s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,a=void 0===n?"bottom-start":n,l=e.tips,c=void 0===l?"":l,u=e.className,d=void 0===u?"":u,f=(0,o.useRef)(),v=(0,o.useState)(""),p=v[0],h=v[1];(0,o.useEffect)((function(){h(c)}),[c]);var m;return(0,i.jsx)("div",s({ref:function(e){e&&(f.current=e)},className:(m="paraui-auto-tips",d&&(m+=" "+d),m),onMouseOver:function(){f.current.scrollWidth>f.current.offsetWidth?h(p||f.current.innerText):h("")}},{children:(0,i.jsx)(r.default,s({title:p,placement:a},{children:(0,i.jsx)("div",s({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},4905:function(e,t,n){n.r(t),n.d(t,{Pagination:function(){return g}});var i=n(7712),o=n(9297),r=n(3780),s=n.n(r),a=n(7428),l=n.n(a),c=n(934),u=n.n(c),d=n(1127),f=n.n(d),v=n(6288),p=n.n(v),h=n(370),m=n(3672),x=function(){return x=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x.apply(this,arguments)},g=function(e){var t=e.className,n=e.type,r=void 0===n?"simple":n,a=e.total,c=void 0===a?0:a,d=e.rowsPerPage,v=void 0===d?[10,20,30]:d,g=e.currentRowsPerPage,j=void 0===g?10:g,y=e.page,b=void 0===y?1:y,w=e.skipFunc,N=e.changePage,S=e.changeRowsPerPage,k=(0,o.useState)(j),C=k[0],O=k[1],E=(0,o.useState)(b),q=E[0],P=E[1],L=(0,o.useState)(),D=L[0],M=L[1],T=(0,o.useState)(),F=T[0],I=T[1],R=(0,o.useState)([]),_=R[0],U=R[1];(0,o.useEffect)((function(){j!==C&&O(j)}),[j]),(0,o.useEffect)((function(){b!==q&&P(b)}),[b]),(0,o.useEffect)((function(){var e=Number(D);q>e&&e!==q&&P(e)}),[q,D]),(0,o.useEffect)((function(){var e=Math.ceil(c/C);M(e||1)}),[C,c]),(0,o.useEffect)((function(){for(var e=[],t=0,n=v.length;t<n;t++){var i=v[t],o={label:i.toString(),value:i};e.push(o)}U(e)}),[e.rowsPerPage]);var A,z=function(e){e!==C&&(O(e),S&&S(e))},K=function(e){return function(t){var n=q;switch(e){case"first":if(1===q)return;n=1;break;case"prev":if(1===q)return;n--;break;case"last":if(q===D)return;n=D;break;case"next":if(q===D)return;n++;break;case"pagination":n=t}void 0!==n&&P(n),N&&N(n)}},B=function(e){-1!==["E","e",".","-"].indexOf(e.key)&&e.preventDefault()},V=function(e){if(13===e.keyCode){var t=parseInt(F&&F.toString()||"0");t<=0&&I(t=1),t>Number(D)&&(t=Number(D),I(t)),w&&w(t,F),P(t),N&&N(t)}},H=function(e){I(e.target.value)},W=(0,o.useMemo)((function(){return(0,i.jsxs)("div",x({className:"total-num"},{children:["共",c,"条"]}),void 0)}),[c]),J=(0,o.useMemo)((function(){return(0,i.jsxs)("div",x({className:"page-line-memo"},{children:[(0,i.jsx)("span",{children:"每页行数"},void 0),(0,i.jsx)(h.default,{size:"medium",value:C,list:_,onChange:z},void 0)]}),void 0)}),[_,C]),Z=(0,o.useMemo)((function(){return(0,i.jsxs)("div",x({className:"current-page"},{children:["当前第",(0,i.jsx)("span",x({className:"current-page-num"},{children:q}),void 0),(0,i.jsx)("span",x({className:"current-page-sign"},{children:"/"}),void 0),(0,i.jsx)("span",x({className:"current-page-last"},{children:D}),void 0),"页"]}),void 0)}),[q,D]),$=(0,o.useMemo)((function(){return(0,i.jsxs)("div",x({className:"pagination-content"},{children:[(0,i.jsxs)("div",x({className:"left-page"},{children:[(0,i.jsx)("div",x({onClick:K("first"),className:1===q?"disabled-btn":""},{children:(0,i.jsx)(l(),{},void 0)}),void 0),(0,i.jsx)("div",x({onClick:K("prev"),className:1===q?"disabled-btn":""},{children:(0,i.jsx)(f(),{},void 0)}),void 0)]}),void 0),"complex"===r&&(0,i.jsx)(s(),{current:q,pageSize:C,total:c,jumpPrevIcon:"...",jumpNextIcon:"...",onChange:K("pagination"),showTitle:!1},void 0),(0,i.jsxs)("div",x({className:"right-page"},{children:[(0,i.jsx)("div",x({onClick:K("next"),className:q===D?"disabled-btn":""},{children:(0,i.jsx)(p(),{},void 0)}),void 0),(0,i.jsx)("div",x({onClick:K("last"),className:q===D?"disabled-btn":""},{children:(0,i.jsx)(u(),{},void 0)}),void 0)]}),void 0)]}),void 0)}),[c,q,D,C,r]),Y=(0,o.useMemo)((function(){return(0,i.jsxs)("div",x({className:"skip-page-memo"},{children:[(0,i.jsx)("span",{children:"跳转到"},void 0),(0,i.jsx)(m.default,{size:"medium",type:"number",value:F||"",onChange:H,rightIcon:"页",onKeyDown:B,onKeyUp:V},void 0)]}),void 0)}),[F,D]);return(0,i.jsxs)("div",x({className:(A="paraui-pagination",t&&(A+=" "+t),A)},{children:["complex"===r&&W,Z,J,$,"complex"===r&&Y]}),void 0)};t.default=g},370:function(e,t,n){var i=n(7712),o=n(9297),r=n(1731),s=n(6028),a=n.n(s),l=n(4115),c=n.n(l),u=n(6110),d=n.n(u),f=n(19),v=n.n(f),p=n(3094),h=n(3475),m=function(){return m=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},m.apply(this,arguments)},x=function(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))};t.default=function(e){var t=e.className,n=e.size,s=void 0===n?"large":n,l=e.labelMode,u=void 0===l?"outside":l,f=e.placeholder,g=void 0===f?"":f,j=e.label,y=void 0===j?"":j,b=e.disabled,w=void 0!==b&&b,N=e.multiple,S=void 0!==N&&N,k=e.required,C=void 0!==k&&k,O=e.labelSign,E=e.error,q=void 0!==E&&E,P=e.helperText,L=void 0===P?"":P,D=e.list,M=e.showName,T=void 0===M?"label":M,F=e.showValue,I=void 0===F?"value":F,R=e.childrenName,_=void 0===R?"children":R,U=e.value,A=e.onChange,z=e.overLine,K=void 0!==z&&z,B=e.search,V=void 0!==B&&B,H=e.searchModel,W=void 0===H?"inside":H,J=e.selectPopoverClassName,Z=e.morePopoverClassName,$=e.onEnter,Y=(0,o.useRef)(null),G=(0,o.useState)("select-"+(0,h.UUID)())[0],Q=(0,o.useState)("select-popover-"+(0,h.UUID)())[0],X=(0,o.useState)(!1),ee=X[0],te=X[1],ne=(0,o.useState)(!1),ie=ne[0],oe=ne[1],re=(0,o.useState)([]),se=re[0],ae=re[1],le=(0,o.useState)([]),ce=le[0],ue=le[1],de=(0,o.useState)({}),fe=de[0],ve=de[1],pe=(0,o.useState)(null),he=pe[0],me=pe[1],xe=(0,o.useState)({})[0],ge=(0,o.useState)(!1),je=ge[0],ye=ge[1],be=(0,o.useState)(""),we=be[0],Ne=be[1],Se=(0,o.useState)(!1),ke=Se[0],Ce=Se[1],Oe=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(e.multiple?ae((0,h.DeepClone)(e.defaultValue||[])):ae(""===e.defaultValue?[]:[e.defaultValue]))}),[]),(0,o.useEffect)((function(){void 0!==U&&ae(S?(0,h.DeepClone)(U||[]):""===U?[]:[U])}),[U,S]),(0,o.useEffect)((function(){if(V&&"outside"===W)return Ce(!!S);Ce(K)}),[K,V,W,S]),(0,o.useEffect)((function(){for(var e={},t=0,n=D.length;t<n;t++){var i=D[t];if(i[_]&&i[_].length>0)for(var o=i[_],r=0,s=o.length;r<s;r++){var a=o[r];e[a[I]]=a}else e[i[I]]=i}ve(e)}),[D]),(0,o.useEffect)((function(){S&&(ke||me(se.length))}),[ke,S,se]),(0,o.useEffect)((function(){return ke?me(se.length):(setTimeout((function(){Me(se.length)})),window.addEventListener("resize",Te)),function(){window.removeEventListener("resize",Te)}}),[se,ke]),(0,o.useEffect)((function(){se&&se.length>0?oe(!0):(oe(!1),V&&"outside"===W&&oe(""!==we))}),[V,we,W,se]),(0,o.useEffect)((function(){clearTimeout(xe.searchTimer),V&&""!==we.trim()?xe.searchTimer=setTimeout((function(){for(var e=[],t=(0,h.DeepClone)(D),n=0,i=t.length;n<i;n++){var o=t[n];if(o[_]&&o[_].length>0){for(var r=o[_],s=[],a=0,l=r.length;a<l;a++){var c=r[a];De(c)&&s.push(c)}s.length>0&&(o[_]=s,e.push(o))}else{De(o)&&e.push(o)}}ue(e)}),100):ue((0,h.DeepClone)(D))}),[V,we,D]),(0,o.useEffect)((function(){return ee?setTimeout((function(){qe(),window.addEventListener("click",Le),window.addEventListener("keydown",He)})):(Ne(""),window.removeEventListener("click",Le),window.removeEventListener("keydown",He)),function(){window.removeEventListener("click",Le),window.removeEventListener("keydown",He)}}),[ee]),(0,o.useEffect)((function(){we&&te(!0)}),[we]),(0,o.useEffect)((function(){S&&"outside"===W&&!0!==w&&Ke(we)}),[we,S,w,W]);var Ee,qe=function(){var e=Oe&&Oe.current;e&&e.focus()},Pe=function(e,t){for(var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!n.call(e,t);)e=e.parentElement;return e},Le=function(e){Pe(e.target,"."+Q)||te(!1)},De=function(e){var t=!1;return-1!==e[T].indexOf(we)&&(t=!0),t},Me=function(e){if(null!==e&&0!==e){void 0===e&&(e=se.length);var t=document.querySelector("."+G+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var n=Number(e)-1;me(n),Me(n)}else se.length<=e&&_e()}},Te=function(){clearTimeout(xe.timer),xe.timer=setTimeout((function(){me(se.length),Me()}),100)},Fe=function(){!0!==w&&te(!0)},Ie=function(){te(!1)},Re=function(e){ye(!0),te(!1),e.stopPropagation()},_e=function(){ye(!1)},Ue=function(t,n){return function(i){var o=t[I];if("object"!=typeof w||-1===w.indexOf(o))if(S){var r=se.indexOf(o);-1!==r?se.splice(r,1):se.push(o),void 0===e.value&&ae(x([],se,!0)),A&&A(x([],se,!0),i),n&&$&&$(x([],se,!0)),qe()}else void 0===e.value&&ae([o]),A&&A(o,i),n&&$&&$(o),Ie(),Ne("")}},Ae=function(e,t){return function(n){var i;e||((i={})[I]=t,e=i),Ue(e)(n),n.stopPropagation()}},ze=function(e){Ne(e.target.value)},Ke=function(e){var t=Oe&&Oe.current;if(!t)return null;var n=window.getComputedStyle(t),i=n.fontFamily,o=function(e,t,n){var i=document.createElement("span");i.id="referenceSpan";var o={};o.width=i.offsetWidth,o.height=i.offsetHeight,i.style.visibility="hidden",i.style.fontSize=e,i.style.fontFamily=t,i.style.display="inline-block";var r=document.getElementById("referenceSpan");return r&&document.body.removeChild(r),document.body.appendChild(i),void 0!==i.textContent?i.textContent=n:i.innerText=n,o.width=parseFloat(window.getComputedStyle(i).width)-o.width,o.height=parseFloat(window.getComputedStyle(i).height)-o.height,document.body.removeChild(i),o}(n.fontSize,i,e),r=o.width;r<10&&(r=10),t.style.width=r+"px"},Be=function(e){var t=e.selectDom,n=e.keyCode,i=e.currentKeydownDom,o=null,r="nextSibling",s=".select-popover-list > div",a=".select-popover-list-item";if(38===n&&(r="previousSibling",s=".select-popover-list > div:last-child",a=".select-popover-list-item:last-child"),i)if(o=i[r])-1!==o.className.indexOf("select-popover-list-group-label")&&((o=(o=i.parentNode)[r])||(o=t.querySelector(s)));else{var l=i.parentNode;l&&l.className&&-1!==l.className.indexOf("select-popover-list-group")&&(o=(o=i.parentNode)[r])||(o=t.querySelector(s))}else o=t.querySelector(s);if(o)if(-1!==o.className.indexOf("select-popover-list-group")){var c=o.querySelector(a);c&&(c.classList.add("select-popover-list-item-keydown"),Ve(c,t))}else o.classList.add("select-popover-list-item-keydown"),Ve(o,t)},Ve=function(e,t){clearTimeout(xe.scrollTimer);var n=t.clientHeight,i=e.offsetTop+e.clientHeight-n;xe.scroll=!0,t.scrollTop=i>0?i:0,xe.scrollTimer=setTimeout((function(){xe.scroll=!1}),100)},He=function(e){var t=document.querySelector("."+Q+" .select-popover-list");if(t){var n=t.querySelector(".select-popover-list-item-select"),i=t.querySelector(".select-popover-list-item-hover"),o=t.querySelector(".select-popover-list-item-keydown"),r=n;if(i&&(r=i),13===e.keyCode){var s=o||i;if(s){var a=s.dataset.val;Ue(fe[a],!0)({target:o})}else $&&$(U)}o&&(r=o,o.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:r}),38===e.keyCode&&Be({selectDom:t,keyCode:e.keyCode,currentKeydownDom:r})}},We=function(e){if(!xe.scroll){var t=Pe(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var n=document.querySelector("."+Q).querySelector(".select-popover-list-item-keydown");n&&n.classList.remove("select-popover-list-item-keydown")}}},Je=function(e){var t=Pe(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Ze=(0,o.useMemo)((function(){var e=Boolean(y||C||O);return(0,i.jsx)(i.Fragment,{children:"outside"===u&&e&&(0,i.jsxs)("label",m({className:"select-label"},{children:[y,C&&(0,i.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),O&&(0,i.jsx)("span",{children:O},void 0)]}),void 0)},void 0)}),[u,y,O,C]),$e=(0,o.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:!ie&&(0,i.jsx)("span",m({className:"select-label-placeholder"},{children:"outside"===u?g:(0,i.jsxs)(i.Fragment,{children:[y||g,C&&(0,i.jsx)("span",m({className:"select-required"},{children:"*"}),void 0),O&&(0,i.jsx)("span",{children:O},void 0)]},void 0)}),void 0)},void 0)}),[ie,u,g,y,O,C]),Ye=(0,o.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:!S&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",m({className:"radio-select-content"},{children:function(){if(""!==we)return null;var e=fe[se[0]]&&fe[se[0]][T]||se[0];return ke?e:(0,i.jsx)(p.default,{children:e},void 0)}()}),void 0),V&&"outside"===W&&!0!==w&&(0,i.jsx)("input",{className:"radio-search-outside",value:we,onChange:ze,ref:Oe},void 0)]},void 0)},void 0)}),[S,ie,ke,fe,se,T,V,W,we,w]),Ge=(0,o.useMemo)((function(){var e=function(e){return fe[se[e]]&&fe[se[e]][T]||se[e]};return(0,i.jsx)(i.Fragment,{children:S&&(0,i.jsxs)("div",m({className:"check-select-content"},{children:[se&&se.map((function(t,n){if(null!==he&&he<=n)return null;var o=!0;return(!0===w||"object"==typeof w&&-1!==w.indexOf(se[n]))&&(o=!1),(0,i.jsxs)("div",m({className:o?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,i.jsx)("span",{children:e(n)},void 0),o&&(0,i.jsx)(v(),{onClick:Ae(fe[se[n]],se[n])},void 0)]}),n)})),function(){if(null!==he&&se.length>he)return(0,i.jsx)("div",m({className:"check-select-content-item check-select-content-item-more",onClick:Re},{children:(0,i.jsxs)("span",{children:["+",se.length-he]},void 0)}),void 0)}(),V&&"outside"===W&&!0!==w&&(0,i.jsx)("input",{className:"check-search-outside",value:we,onChange:ze,ref:Oe},void 0)]}),void 0)},void 0)}),[S,ie,se,he,fe,w,A,we,V,W]),Qe=(0,o.useMemo)((function(){return(0,i.jsxs)("div",m({className:"select-content",onClick:Fe,ref:Y},{children:[$e,(0,i.jsx)("span",m({className:"select-svg"},{children:(0,i.jsx)(a(),{},void 0)}),void 0),Ye,Ge]}),void 0)}),[Y,ie,u,g,y,O,C,ke,fe,se,T,S,he,w,A,we,W]),Xe=(0,o.useMemo)((function(){return(0,i.jsx)("div",m({className:"select-popover-list"},{children:ce&&ce.length>0?(0,i.jsx)(i.Fragment,{children:ce.map((function(e,t){if(e[_]&&e[_].length>0){var n=e[_];return(0,i.jsxs)("div",m({className:"select-popover-list-group"},{children:[(0,i.jsx)("span",m({className:"select-popover-list-group-label"},{children:e[T]}),void 0),n.map((function(e,t){var n=e[I],o="select-popover-list-item";return-1!==se.indexOf(n)&&(o+=" select-popover-list-item-select"),"object"==typeof w&&-1!==w.indexOf(n)&&(o+=" select-popover-list-item-disabled"),(0,i.jsxs)("div",m({onClick:Ue(e),className:o,onMouseEnter:We,onMouseLeave:Je,"data-val":n},{children:[(0,i.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,i.jsx)(p.default,{children:e[T]},void 0)}),void 0),S&&(0,i.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,i.jsx)(d(),{},void 0)}),void 0)]}),t)}))]}),t)}var o=e[I],r="select-popover-list-item";return-1!==se.indexOf(o)&&(r+=" select-popover-list-item-select"),"object"==typeof w&&-1!==w.indexOf(o)&&(r+=" select-popover-list-item-disabled"),(0,i.jsxs)("div",m({onClick:Ue(e),className:r,onMouseEnter:We,onMouseLeave:Je,"data-val":o},{children:[(0,i.jsx)("span",m({className:"select-popover-list-item-label"},{children:(0,i.jsx)(p.default,{children:e[T]},void 0)}),void 0),S&&(0,i.jsx)("span",m({className:"select-popover-list-item-svg"},{children:(0,i.jsx)(d(),{},void 0)}),void 0)]}),t)}))},void 0):(0,i.jsx)("div",m({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[ce,T,I,se,A,S]),et=(0,o.useMemo)((function(){return(0,i.jsxs)("div",m({style:{width:(Y&&Y.current?Y.current.offsetWidth:0)+"px"},className:"select-popover-content "+Q},{children:[V&&"inside"===W&&(0,i.jsxs)("div",m({className:"select-popover-search"},{children:[(0,i.jsx)("input",{placeholder:"请输入搜索名",value:we,onChange:ze,ref:Oe},void 0),(0,i.jsx)(c(),{},void 0)]}),void 0),Xe]}),void 0)}),[ee,Y,ce,_,I,T,se,we,V,Q,W,S]),tt=(0,o.useMemo)((function(){var e,t=function(e){return fe[se[e]]&&fe[se[e]][T]||se[e]};return(0,i.jsx)(r.Popover,m({open:je,anchorEl:Y&&Y.current,onClose:_e,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(e="paraui-select-more-popover",s&&(e+=" paraui-select-more-popover-"+s),Z&&(e+=" "+Z),e)},{children:(0,i.jsxs)("div",m({className:"select-more"},{children:[(0,i.jsxs)("div",m({className:"select-more-title"},{children:[(0,i.jsx)("span",{children:"已选中"},void 0),(0,i.jsxs)("span",{children:["(",se.length-Number(he),")"]},void 0)]}),void 0),(0,i.jsx)("div",m({className:"select-more-content"},{children:se&&se.map((function(e,n){if(null!==he&&he>n)return null;var o=!0;return(!0===w||"object"==typeof w&&-1!==w.indexOf(se[n]))&&(o=!1),(0,i.jsxs)("div",m({className:"select-more-content-item"},{children:[(0,i.jsx)("span",{children:(0,i.jsx)(p.default,{children:t(n)},void 0)},void 0),o&&(0,i.jsx)(v(),{onClick:Ae(fe[se[n]],se[n])},void 0)]}),n)}))}),void 0)]}),void 0)}),void 0)}),[je,se,he,fe,w,T,Z,s]);return(0,i.jsxs)("div",m({className:(Ee="paraui-select select",S&&!ke&&(Ee+=" "+G),t&&(Ee+=" "+t),s&&(Ee+=" select-"+s),q&&(Ee+=" select-error"),!0===w&&(Ee+=" select-disabled"),ee&&(Ee+=" select-open"),S&&(Ee+=" select-multiple"),ke&&(Ee+=" select-over-line"),Ee)},{children:[Ze,(0,i.jsx)(r.Tooltip,m({open:ee,title:et,onClose:Ie,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e="paraui-select-popover";return s&&(e+=" paraui-select-popover-"+s),e+=S?" paraui-select-popover-multiple":" paraui-select-popover-radio",J&&(e+=" "+J),e}()},placement:"bottom-start"},{children:Qe}),void 0),L&&(0,i.jsx)("p",m({className:"select-error-text"},{children:L}),void 0),tt]}),void 0)}},3672:function(e,t,n){var i=n(7712),o=n(9297),r=n(1731),s=n(3094),a=n(8528),l=n.n(a),c=n(6570),u=n.n(c),d=n(1102),f=n.n(d),v=n(3475),p=function(){return p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};t.default=function(e){var t=e.className,n=e.size,a=void 0===n?"large":n,c=e.labelMode,d=void 0===c?"outside":c,m=e.placeholder,x=void 0===m?"":m,g=e.label,j=void 0===g?"":g,y=e.disabled,b=void 0!==y&&y,w=e.multiline,N=void 0!==w&&w,S=e.required,k=void 0!==S&&S,C=e.labelSign,O=e.rows,E=void 0===O?2:O,q=e.error,P=void 0!==q&&q,L=e.helperText,D=void 0===L?"":L,M=e.addonBefore,T=void 0===M?"":M,F=e.addonAfter,I=void 0===F?"":F,R=(e.defaultValue,e.value),_=e.autoFocus,U=void 0!==_&&_,A=e.type,z=void 0===A?"text":A,K=e.onClickIcon,B=e.rightIcon,V=e.showRightIcon,H=void 0===V||V,W=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,ie=e.onEnter,oe=e.onClickAddonBefore,re=e.onClickAddonAfter,se=e.onSelect,ae=h(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"]),le=(0,o.useState)("text-field-select-content-"+(0,v.UUID)())[0],ce=(0,o.useState)(!0),ue=ce[0],de=ce[1],fe=(0,o.useState)(""),ve=fe[0],pe=fe[1],he=(0,o.useState)(!1),me=he[0],xe=he[1],ge=(0,o.useState)("text"),je=ge[0],ye=ge[1],be=(0,o.useState)(!1),we=be[0],Ne=be[1],Se=(0,o.useState)(!1),ke=Se[0],Ce=Se[1],Oe=(0,o.useState)([]),Ee=Oe[0],qe=Oe[1],Pe=(0,o.useRef)(null),Le=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),Me(e.defaultValue))}),[]),(0,o.useEffect)((function(){z!==je&&ye(z)}),[z]),(0,o.useEffect)((function(){void 0!==R&&(pe(R),Me(R))}),[R]),(0,o.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,o.useEffect)((function(){J&&Ne(me)}),[me,J]),(0,o.useEffect)((function(){return we?window.addEventListener("keydown",Re):window.removeEventListener("keydown",Re),function(){window.removeEventListener("keydown",Re)}}),[we]);var De,Me=function(e){Pe&&Pe.current&&(Pe.current.value=e,Pe.current.setAttribute("value",e))},Te=function(){b||(de(!1),(Pe&&Pe.current).focus())},Fe=function(e){var t=e.selectDom,n=e.keyCode,i=e.currentDom,o="nextSibling",r=".text-field-select-content-item";38===n&&(o="previousSibling",r=".text-field-select-content-item:last-child"),i?(i=i[o])||(i=t.querySelector(r)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),Ie(i,t))},Ie=function(e,t){var n=t.clientHeight,i=e.offsetTop+e.clientHeight-n;t.scrollTop=i>0?i:0},Re=function(e){var t=document.querySelector("."+le),n=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var o=i.dataset.val;We(JSON.parse(o))(e),(Pe&&Pe.current).blur()}i&&(n=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Fe({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Fe({selectDom:t,keyCode:e.keyCode,currentDom:n})},_e=function(e){xe(!1),""===e.target.value&&de(!0),Q&&Q(e)},Ue=function(e){Ce(!0),J&&J(e,(function(e){qe(e||[]),Ce(!1)}))},Ae=function(e){xe(!0),X&&X(e),Ue(e.target.value)},ze=function(t){var n=t.target.value;n&&de(!1),W&&void 0!==n&&""!==n&&n.toString().length>W||(void 0===e.value&&(pe(n),Me(n)),ee&&ee(t),Ue(t.target.value))},Ke=function(e){13===e.keyCode&&ie&&ie(e),te&&te(e)},Be=function(e){ne&&ne(e)},Ve=function(e){"password"===z&&("text"===je&&ye("password"),"password"===je&&ye("text")),K&&K(e)},He=function(){Ne(!1)},We=function(e){return function(t){se&&se(e)}},Je=(0,o.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==W&&(0,i.jsx)("span",p({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+W}),void 0)},void 0)}),[W,ve]),Ze=(0,o.useMemo)((function(){var e=B||("password"===z?"password"===je?(0,i.jsx)(u(),{},void 0):(0,i.jsx)(l(),{},void 0):null);return(0,i.jsx)(i.Fragment,{children:H&&e&&(0,i.jsx)("span",p({className:"right-icon",onClick:Ve},{children:e}),void 0)},void 0)}),[H,B,z,je]),$e=(0,o.useMemo)((function(){return(0,i.jsxs)("div",p({className:"text-field-content-within",ref:Le},{children:[(0,i.jsxs)("div",p({className:"text-field-content-within-input"},{children:[N?(0,i.jsx)("textarea",p({ref:Pe,rows:E,onBlur:_e,onFocus:Ae,onChange:ze,onKeyDown:Ke,onKeyUp:Be,disabled:b},ae),void 0):(0,i.jsx)("input",p({ref:Pe,type:je,onBlur:_e,onFocus:Ae,onChange:ze,onKeyDown:Ke,onKeyUp:Be,disabled:b},ae),void 0),ue&&(0,i.jsx)("span",p({className:"text-field-label-placeholder",onClick:Te},{children:"outside"===d?x:(0,i.jsxs)(i.Fragment,{children:[j||x,k&&(0,i.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,i.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Je,Ze]}),void 0)}),[ue,U,je,ve,Je,Ze,d,x,j,b,N,E,ae,ee,J]),Ye=(0,o.useMemo)((function(){var e;return(0,i.jsxs)("div",p({className:(e="text-field-select-content",ke&&(e+=" text-field-select-content-loading"),le&&(e+=" "+le),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[Ee&&Ee.map((function(e,t){return(0,i.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:We(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,i.jsx)(s.default,{children:e[G]},void 0)}),t)})),ke&&(0,i.jsx)("div",p({className:"loading-box"},{children:(0,i.jsx)(f(),{},void 0)}),void 0)]}),void 0)}),[Le,we,Ee,$,G,se,ke,le]),Ge=(0,o.useMemo)((function(){return(0,i.jsx)(r.Tooltip,p({open:we,title:Ye,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",a&&(e+=" paraui-text-field-select-"+a),Z&&(e+=" "+Z),e)}},{children:$e}),void 0);var e}),[ue,U,je,ve,Je,Ze,d,x,j,b,N,E,ae,ee,J,se,Le,we,Z,a]),Qe=(0,o.useMemo)((function(){var e=Boolean(k||C||j);return(0,i.jsx)(i.Fragment,{children:"outside"===d&&e&&(0,i.jsxs)("label",p({className:"text-field-label"},{children:[j,k&&(0,i.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,i.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[d,j,C,k]);return(0,i.jsxs)("div",p({className:(De="paraui-text-field",De+=" text-field",a&&!N&&(De+=" text-field-"+a),t&&(De+=" "+t),P&&(De+=" text-field-error"),me&&(De+=" text-field-focus"),b&&(De+=" text-field-disabled"),N&&(De+=" text-field-multiline"),De)},{children:[Qe,(0,i.jsxs)("div",p({className:"text-field-content"},{children:[T&&(0,i.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:T}),void 0),J?Ge:$e,I&&(0,i.jsx)("div",p({className:"text-field-content-after",onClick:function(e){re&&re(e)}},{children:I}),void 0)]}),void 0),D&&(0,i.jsx)("p",p({className:"text-field-error-text"},{children:D}),void 0)]}),void 0)}},6885:function(e,t,n){var i=n(7712),o=n(1731),r=n(4927),s=function(){return s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};t.default=function(e){var t,n=s(s({},e.classes),{popper:(0,r.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper)});return(0,i.jsx)(o.Tooltip,s({},e,{classes:n},{children:e.children}),void 0)}},1731:function(t){t.exports=e},6110:function(e){e.exports=t},19:function(e){e.exports=n},7428:function(e){e.exports=i},934:function(e){e.exports=o},6028:function(e){e.exports=r},1127:function(e){e.exports=s},1102:function(e){e.exports=a},6570:function(e){e.exports=l},8528:function(e){e.exports=c},6288:function(e){e.exports=u},4115:function(e){e.exports=d},3475:function(e){e.exports=f},3780:function(e){e.exports=v},9297:function(e){e.exports=p}},x={};function g(e){var t=x[e];if(void 0!==t)return t.exports;var n=x[e]={exports:{}};return m[e](n,n.exports,g),n.exports}g.m=m,h=[],g.O=function(e,t,n,i){if(!t){var o=1/0;for(a=0;a<h.length;a++){t=h[a][0],n=h[a][1],i=h[a][2];for(var r=!0,s=0;s<t.length;s++)(!1&i||o>=i)&&Object.keys(g.O).every((function(e){return g.O[e](t[s])}))?t.splice(s--,1):(r=!1,i<o&&(o=i));r&&(h.splice(a--,1),e=n())}return e}i=i||0;for(var a=h.length;a>0&&h[a-1][2]>i;a--)h[a]=h[a-1];h[a]=[t,n,i]},g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},g.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={8910:0,1465:0,8306:0,2996:0,2823:0,9296:0};g.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,o,r=n[0],s=n[1],a=n[2],l=0;for(i in s)g.o(s,i)&&(g.m[i]=s[i]);if(a)var c=a(g);for(t&&t(n);l<r.length;l++)o=r[l],g.o(e,o)&&e[o]&&e[o][0](),e[r[l]]=0;return g.O(c)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var j=g.O(void 0,[9296],(function(){return g(4905)}));return j=g.O(j)}()}));
|
package/ParauiProvider/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core/styles"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core/styles","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core/styles"),require("react")):e.ParaUI=r(e["@material-ui/core/styles"],e.react)}(self,(function(e,r){return function(){"use strict";var t,n={4126:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,
|
|
7
|
+
var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,c=o(e),f=1;f<arguments.length;f++){for(var l in a=Object(arguments[f]))t.call(a,l)&&(c[l]=a[l]);if(r){u=r(a);for(var s=0;s<u.length;s++)n.call(a,u[s])&&(c[u[s]]=a[u[s]])}}return c}},9524:function(e,r,t){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
t(4126);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function f(e,r,t){var n,i={},f=null,l=null;for(n in void 0!==t&&(f=""+t),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(l=r.ref),r)u.call(r,n)&&!c.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:f,ref:l,props:i,_owner:a.current}}r.jsx=f},7712:function(e,r,t){e.exports=t(9524)},7297:function(e,r,t){t.r(r),t.d(r,{ParauiProvider:function(){return a}});var n=t(7712),o=t(8604),i=function(){return i=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},i.apply(this,arguments)},a=function(e){var r,t=(0,o.createGenerateClassName)({seed:e.seed||"",productionPrefix:e.productionPrefix||"paraui"});return r=e.theme?(0,o.createMuiTheme)(i({},e.theme)):(0,o.createMuiTheme)({}),(0,n.jsx)(o.StylesProvider,i({generateClassName:t,injectFirst:!0},{children:(0,n.jsx)(o.ThemeProvider,i({theme:r},{children:e.children}),void 0)}),void 0)};r.default=a},8604:function(r){r.exports=e},9297:function(e){e.exports=r}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return n[e](t,t.exports,i),t.exports}i.m=n,t=[],i.O=function(e,r,n,o){if(!r){var a=1/0;for(f=0;f<t.length;f++){r=t[f][0],n=t[f][1],o=t[f][2];for(var u=!0,c=0;c<r.length;c++)(!1&o||a>=o)&&Object.keys(i.O).every((function(e){return i.O[e](r[c])}))?r.splice(c--,1):(u=!1,o<a&&(a=o));u&&(t.splice(f--,1),e=n())}return e}o=o||0;for(var f=t.length;f>0&&t[f-1][2]>o;f--)t[f]=t[f-1];t[f]=[r,n,o]},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,{a:r}),r},i.d=function(e,r){for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={4304:0,9296:0};i.O.j=function(r){return 0===e[r]};var r=function(r,t){var n,o,a=t[0],u=t[1],c=t[2],f=0;for(n in u)i.o(u,n)&&(i.m[n]=u[n]);if(c)var l=c(i);for(r&&r(t);f<a.length;f++)o=a[f],i.o(e,o)&&e[o]&&e[o][0](),e[a[f]]=0;return i.O(l)},t=self.webpackChunkParaUI=self.webpackChunkParaUI||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))}();var a=i.O(void 0,[9296],(function(){return i(7297)}));return a=i.O(a)}()}));
|
package/PopConfirm/index.d.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* @description popConfirm
|
|
5
5
|
*/
|
|
6
6
|
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { TooltipProps
|
|
7
|
+
import { TooltipProps } from "@material-ui/core";
|
|
8
8
|
import { ButtonProps } from "../Button";
|
|
9
|
+
import './index.scss';
|
|
9
10
|
declare type ConfirmType = "success" | "info" | "error" | "warning";
|
|
10
11
|
export interface PopConfirmProps {
|
|
11
12
|
/**触发方式*/
|
|
@@ -14,6 +15,8 @@ export interface PopConfirmProps {
|
|
|
14
15
|
type?: ConfirmType;
|
|
15
16
|
/**标题*/
|
|
16
17
|
title?: ReactNode;
|
|
18
|
+
/**内容*/
|
|
19
|
+
content?: ReactNode;
|
|
17
20
|
/**自定义图标*/
|
|
18
21
|
icon?: ReactNode;
|
|
19
22
|
/**ok 文本*/
|
|
@@ -29,11 +32,11 @@ export interface PopConfirmProps {
|
|
|
29
32
|
/** 取消按钮属性*/
|
|
30
33
|
cancelButtonProps?: ButtonProps;
|
|
31
34
|
/** 位置*/
|
|
32
|
-
placement?:
|
|
33
|
-
/**cls*/
|
|
35
|
+
placement?: TooltipProps['placement'];
|
|
36
|
+
/** cls*/
|
|
34
37
|
className?: string;
|
|
35
|
-
|
|
38
|
+
/** 子节点*/
|
|
36
39
|
children?: ReactNode;
|
|
37
40
|
}
|
|
38
|
-
declare const PopConfirm: FunctionComponent<PopConfirmProps>;
|
|
41
|
+
export declare const PopConfirm: FunctionComponent<PopConfirmProps>;
|
|
39
42
|
export default PopConfirm;
|
package/PopConfirm/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(
|
|
1
|
+
!function(n,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/WarningCircleF"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/CheckCircleF","@para-ui/icons/CloseCircleF","@para-ui/icons/Down","@para-ui/icons/Forbid","@para-ui/icons/LoadingF","@para-ui/icons/WarningCircle","@para-ui/icons/WarningCircleF","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/WarningCircleF"),require("react")):n.ParaUI=r(n["@material-ui/core"],n["@para-ui/icons/CheckCircleF"],n["@para-ui/icons/CloseCircleF"],n["@para-ui/icons/Down"],n["@para-ui/icons/Forbid"],n["@para-ui/icons/LoadingF"],n["@para-ui/icons/WarningCircle"],n["@para-ui/icons/WarningCircleF"],n.react)}(self,(function(n,r,i,e,o,t,a,c,s){return function(){"use strict";var l,u={4927:function(n,r,i){function e(n){var r,i,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n))for(r=0;r<n.length;r++)n[r]&&(i=e(n[r]))&&(o&&(o+=" "),o+=i);else for(r in n)n[r]&&(o&&(o+=" "),o+=r);return o}function o(){for(var n,r,i=0,o="";i<arguments.length;)(n=arguments[i++])&&(r=e(n))&&(o&&(o+=" "),o+=r);return o}i.d(r,{Z:function(){return o}})},4126:function(n){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
7
|
+
var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function o(n){if(null==n)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}n.exports=function(){try{if(!Object.assign)return!1;var n=new String("abc");if(n[5]="de","5"===Object.getOwnPropertyNames(n)[0])return!1;for(var r={},i=0;i<10;i++)r["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(n){return r[n]})).join(""))return!1;var e={};return"abcdefghijklmnopqrst".split("").forEach((function(n){e[n]=n})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},e)).join("")}catch(n){return!1}}()?Object.assign:function(n,t){for(var a,c,s=o(n),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))i.call(a,u)&&(s[u]=a[u]);if(r){c=r(a);for(var p=0;p<c.length;p++)e.call(a,c[p])&&(s[c[p]]=a[c[p]])}}return s}},9524:function(n,r,i){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
o(4126);var r=o(9297),t=60103;if(n.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;t=i("react.element"),n.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,o){var r,i={},s=null,u=null;for(r in void 0!==o&&(s=""+o),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(u=n.ref),n)c.call(n,r)&&!l.hasOwnProperty(r)&&(i[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===i[r]&&(i[r]=n[r]);return{$$typeof:t,type:e,key:s,ref:u,props:i,_owner:a.current}}n.jsx=s,n.jsxs=s},7712:function(e,n,o){e.exports=o(9524)},36:function(e,n,o){var r=o(7712),t=o(9297),i=o(1731),a=o(8604),c=o(4927),l=o(1102),s=o.n(l),u=o(5415),p=function(){return p=Object.assign||function(e){for(var n,o=1,r=arguments.length;o<r;o++)for(var t in n=arguments[o])Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e},p.apply(this,arguments)},d=function(e,n){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)n.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(o[r[t]]=e[r[t]])}return o},f=(0,u.Z)(),g=(0,a.makeStyles)((function(e){return(0,a.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,a.withStyles)((function(e){return{tooltip:{margin:"6px 0",backgroundColor:f.bgBorderColor.bg4}}}))(i.Tooltip),v=function(e){var n=g(),o=e.radius,a=e.className,l=e.disabled,u=void 0!==l&&l,f=e.children,b=e.startIcon,v=e.endIcon,m=e.loading,x=void 0!==m&&m,y=d(e,["radius","className","disabled","children","startIcon","endIcon","loading"]);"text"===y.variant&&(y.disableRipple=!0);var h=(0,t.useState)(!1),F=h[0],C=h[1];return(0,t.useEffect)((function(){C(!!x)}),[x]),(0,r.jsx)(i.Button,p({disabled:u,className:(0,c.Z)("paraui-button",a,n.btnIcon,o&&n.radius,"outlined"===y.variant&&n.outlinedBtn,F&&n.loadingBtn),startIcon:function(){if(!F)return(0,r.jsx)("span",p({className:"btn-icon"},{children:b}),void 0);if("object"==typeof x){var e=x.delay||0;setTimeout((function(){return C(!1)}),e)}return(0,r.jsx)("span",p({className:"btn-icon loading-icon"},{children:(0,r.jsx)(s(),{},void 0)}),void 0)}(),endIcon:(0,r.jsx)("span",p({className:"btn-icon"},{children:v}),void 0)},y,{children:f}),void 0)};v.IconButton=function(e){var n=g(),o=e.showToolTip,a=void 0===o||o,l=e.toolTipTitle,u=void 0===l?"":l,f=e.children,v=e.className,m=e.disabled,x=void 0!==m&&m,y=e.loading,h=void 0!==y&&y,F=e.TooltipProps,C=d(e,["showToolTip","toolTipTitle","children","className","disabled","loading","TooltipProps"]),j=(0,t.useState)(!1),O=j[0],w=j[1],S=(0,r.jsx)(i.IconButton,p({},C,{disabled:x,disableRipple:!0,className:(0,c.Z)("paraui-icon-button",v,a&&x&&"iconButton-disabled",O&&n.loadingBtn)},{children:function(){if(!O)return f;if("object"==typeof h){var e=h.delay||0;setTimeout((function(){return w(!1)}),e)}return(0,r.jsx)("span",p({className:"loading-icon"},{children:(0,r.jsx)(s(),{},void 0)}),void 0)}()}),void 0);return(0,t.useEffect)((function(){w(!!h)}),[h]),a?(0,r.jsx)(b,p({title:u},F,{children:(0,r.jsx)("span",p({className:(0,c.Z)(x&&n.iconButtonToolTip)},{children:S}),void 0)}),void 0):S},n.default=v},5415:function(e,n){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};n.Z=function(){return o}},1731:function(e){e.exports=n},8604:function(e){e.exports=o},3285:function(e){e.exports=r},20:function(e){e.exports=i},1102:function(e){e.exports=a},6897:function(e){e.exports=t},9297:function(n){n.exports=e}},l={};function s(e){var n=l[e];if(void 0!==n)return n.exports;var o=l[e]={exports:{}};return c[e](o,o.exports,s),o.exports}s.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(n,{a:n}),n},s.d=function(e,n){for(var o in n)s.o(n,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},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(){s.r(u);var e=s(7712),n=s(9297),o=s(1731),r=s(8604),t=s(5415),i=s(4927),a=s(3285),c=s.n(a),l=s(6897),p=s.n(l),d=s(20),f=s.n(d),g=s(36),b=function(){return b=Object.assign||function(e){for(var n,o=1,r=arguments.length;o<r;o++)for(var t in n=arguments[o])Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e},b.apply(this,arguments)},v=(0,t.Z)(),m={success:(0,e.jsx)(c(),{},void 0),warning:(0,e.jsx)(p(),{},void 0),error:(0,e.jsx)(f(),{},void 0),info:(0,e.jsx)(p(),{},void 0)},x={success:v.stateColor.success,warning:v.stateColor.warning,error:v.stateColor.error,info:v.stateColor.info},y=(0,r.withStyles)((function(e){return{tooltip:{padding:0,backgroundColor:v.textColor.white,boxShadow:v.boxShadow,"& .popConfirm":{width:300,padding:"12px 20px 10px 20px",color:v.textColor.primary,"& .popConfirm-content":{display:"inline-flex","& .popConfirm-title":{marginLeft:10,lineHeight:"20px",whiteSpace:"pre-line"},"& .popConfirm-icon":{marginTop:2,fontSize:16,color:function(e){return x[e.type]},"& svg":{color:"currentColor"}}},"& .popConfirm-btns":{marginTop:10,textAlign:"right","& button":{minWidth:50,padding:0,marginLeft:10}}}},arrow:{fontSize:14,color:v.textColor.white,"&:before":{boxShadow:"0px 0px 3px -2px #000000"}},popper:{}}}))(o.Tooltip),h=(0,r.makeStyles)((function(e){return(0,r.createStyles)({toolTipWrap:{display:"inline-flex"}})}));u.default=function(r){var t=r.trigger,a=void 0===t?"click":t,c=r.type,l=void 0===c?"warning":c,s=r.title,u=r.icon,p=r.okText,d=r.cancelText,f=r.onOk,v=r.onCancel,x=r.okButtonProps,F=r.cancelButtonProps,C=r.placement,j=void 0===C?"bottom":C,O=r.className,w=r.children,S=h(),T={interactive:!0,arrow:!0},k="click"===a;k?(T.disableFocusListener=!0,T.disableHoverListener=!0,T.disableTouchListener=!0):T.disableFocusListener=!0;var E,B=(0,n.useState)(!1),N=B[0],P=B[1],_=function(){P(!1)},D=function(){P(!0)},I=function(){_()},L=(0,e.jsxs)("div",b({className:(0,i.Z)("popConfirm"),onClick:function(e){return e.stopPropagation()}},{children:[(0,e.jsxs)("div",b({className:"popConfirm-content"},{children:[(0,e.jsx)("span",b({className:"popConfirm-icon"},{children:u||m[l]}),void 0),(0,e.jsx)("div",b({className:"popConfirm-title"},{children:s}),void 0)]}),void 0),(0,e.jsxs)("div",b({className:"popConfirm-btns"},{children:[(0,e.jsx)(g.default,b({onClick:function(){null==v||v(),_()}},F,{variant:"text"},{children:d||"取消"}),void 0),(0,e.jsx)(g.default,b({color:"primary",onClick:function(){null==f||f(),_()}},x,{variant:"text"},{children:p||"确定"}),void 0)]}),void 0)]}),void 0);return(0,e.jsx)(e.Fragment,{children:(E=(0,e.jsx)(y,b({open:N,type:l,placement:j},T,{title:L,onClose:_,onOpen:D,classes:{popper:(0,i.Z)("paraui-pop-confirm",O)}},{children:k?(0,e.jsx)("span",b({onClick:D,className:S.toolTipWrap},{children:w}),void 0):(0,e.jsx)("span",b({className:S.toolTipWrap},{children:w}),void 0)}),void 0),k?(0,e.jsx)(o.ClickAwayListener,b({onClickAway:I},{children:E}),void 0):E)},void 0)}}(),u}()}));
|
|
16
|
+
i(4126);var e=i(9297),o=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;o=t("react.element"),r.Fragment=t("react.fragment")}var a=e.__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(n,r,i){var e,t={},l=null,u=null;for(e in void 0!==i&&(l=""+i),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,e)&&!s.hasOwnProperty(e)&&(t[e]=r[e]);if(n&&n.defaultProps)for(e in r=n.defaultProps)void 0===t[e]&&(t[e]=r[e]);return{$$typeof:o,type:n,key:l,ref:u,props:t,_owner:a.current}}r.jsx=l,r.jsxs=l},7712:function(n,r,i){n.exports=i(9524)},2990:function(n,r,i){i.d(r,{default:function(){return j}});var e=i(7712),o=i(9297),t=i(1731),a=i(4927),c=i(1102),s=i.n(c),l=i(2749),u=i.n(l),p=i(6885),d=i(6028),f=i.n(d),v=function(){return v=Object.assign||function(n){for(var r,i=1,e=arguments.length;i<e;i++)for(var o in r=arguments[i])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},v.apply(this,arguments)};var b=function(){return b=Object.assign||function(n){for(var r,i=1,e=arguments.length;i<e;i++)for(var o in r=arguments[i])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},b.apply(this,arguments)},m=function(n,r){var i={};for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&r.indexOf(e)<0&&(i[e]=n[e]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(n);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(n,e[o])&&(i[e[o]]=n[e[o]])}return i},h=function(n){var r=n.variant,i=void 0===r?"contained":r,c=n.size,l=void 0===c?"large":c,d=n.className,f=n.disabled,v=void 0!==f&&f,h=n.children,j=n.startIcon,g=n.endIcon,y=n.loading,x=void 0!==y&&y,O=n.toolTipTitle,C=void 0===O?"":O,w=n.danger,N=void 0!==w&&w,P=m(n,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),k=(0,o.useState)(!1),F=k[0],T=k[1],S=function(n){if(!F)return"start"===n&&j?(0,e.jsx)("span",b({className:(0,a.Z)("btn-icon","start-icon")},{children:j}),void 0):"end"===n&&g?(0,e.jsx)("span",b({className:(0,a.Z)("btn-icon","end-icon")},{children:g}),void 0):null;if("object"==typeof x){var r=x.delay||0;setTimeout((function(){return T(!1)}),r)}return"start"===n?(0,e.jsx)("span",b({className:"btn-icon loading-icon"},{children:(0,e.jsx)(s(),{},void 0)}),void 0):null},_=(0,e.jsx)(t.Button,b({},P,{color:"default",variant:"contained",disabled:v,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",d,"paraui-button-".concat(i),"paraui-button-".concat(l),F&&"paraui-button-loading",N&&!v&&"paraui-button-dangerous"),startIcon:S("start"),endIcon:S("end")},{children:h}),void 0);return(0,o.useEffect)((function(){T(!!x)}),[x]),v&&C?(0,e.jsx)(p.default,b({title:function(){if(v&&C){return(0,e.jsxs)("span",{children:[(0,e.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),C]},void 0)}return C}()},{children:(0,e.jsx)("span",b({className:"paraui-button--disabled"},{children:_}),void 0)}),void 0):_};h.IconButton=function(n){var r=n.variant,i=void 0===r?"contained":r,c=n.size,l=void 0===c?"large":c,d=n.toolTipTitle,f=void 0===d?"":d,v=n.children,h=n.className,j=n.disabled,g=void 0!==j&&j,y=n.loading,x=void 0!==y&&y,O=n.TooltipProps,C=n.danger,w=void 0!==C&&C,N=m(n,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),P=(0,o.useState)(!1),k=P[0],F=P[1],T=(0,e.jsx)(t.IconButton,b({},N,{disabled:g,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",h,"paraui-icon-button-".concat(i),"paraui-icon-button-".concat(l),k&&"paraui-icon-button-loading",w&&!g&&"paraui-icon-button-dangerous")},{children:function(){if(!k)return v;if("object"==typeof x){var n=x.delay||0;setTimeout((function(){return F(!1)}),n)}return(0,e.jsx)("span",b({className:"loading-icon"},{children:(0,e.jsx)(s(),{},void 0)}),void 0)}()}),void 0);return(0,o.useEffect)((function(){F(!!x)}),[x]),f?(0,e.jsx)(p.default,b({},O,{title:function(){if(g&&f){return(0,e.jsxs)("span",{children:[(0,e.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),f]},void 0)}return f}()},{children:g?(0,e.jsx)("span",b({className:"paraui-button--disabled"},{children:T}),void 0):T}),void 0):T},h.SplitButton=function(n){var r=n.buttonText,i=n.options,c=void 0===i?[]:i,s=n.className,l=n.disabled,u=void 0!==l&&l,p=n.onClick,d=n.optionRender,b=(0,o.useState)(!1),m=b[0],h=b[1],g=(0,o.useRef)(null),y=(0,o.useRef)(),x=(0,o.useState)(0),O=x[0],C=x[1],w=function(n,r,i){var e;C(r),h(!1),null===(e=y.current)||void 0===e||e.classList.remove("paraui-button-split--active"),null==p||p(n,i)},N=function(n){var r,i;(null===(r=g.current)||void 0===r?void 0:r.contains(n.target))||(h(!1),null===(i=y.current)||void 0===i||i.classList.remove("paraui-button-split--active"))},P=function(){return(0,e.jsx)("div",v({className:"paraui-button-split-list"},{children:(0,e.jsx)("ul",{children:c.map((function(n,r){return Array.isArray(n)?function(n,r){return(0,e.jsx)("li",v({className:"split-li-group"},{children:n.map((function(n,i){var o="".concat(r,"-").concat(i);return(0,e.jsx)("div",v({className:(0,a.Z)("split-li",o===O&&"split-li--active"),onClick:function(r){return w(n,o,r)}},{children:(null==d?void 0:d(n))||n.label}),o)}))}),r)}(n,r):(0,e.jsx)("li",v({className:(0,a.Z)("split-li",r===O&&"split-li--active"),onClick:function(i){return w(n,r,i)}},{children:(null==d?void 0:d(n))||n.label}),r)}))},void 0)}),void 0)};return(0,e.jsxs)("div",v({className:(0,a.Z)("paraui-button-split",s),ref:g,onMouseLeave:function(n){var r;n.stopPropagation(),null===(r=n.currentTarget.firstElementChild)||void 0===r||r.classList.remove("paraui-button-split--active"),h(!1)}},{children:[(0,e.jsx)(j,v({variant:"outlined",onMouseEnter:function(n){n.stopPropagation();var r=n.currentTarget;y.current=r,r.classList.add("paraui-button-split--active"),h(!0)},startIcon:(0,e.jsx)(f(),{},void 0),disabled:u},{children:null!=r?r:"更多操作"}),void 0),(0,e.jsx)(t.Popper,v({open:m,anchorEl:g.current,transition:!0,placement:"bottom-end"},{children:function(n){var r=n.TransitionProps;n.placement;return(0,e.jsx)(t.Grow,v({},r,{children:(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(t.ClickAwayListener,v({onClickAway:N},{children:P()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var j=h},5598:function(n,r,i){i.r(r),i.d(r,{PopConfirm:function(){return j}});var e=i(7712),o=i(9297),t=i(1731),a=i(3285),c=i.n(a),s=i(6897),l=i.n(s),u=i(20),p=i.n(u),d=i(9248),f=i.n(d),v=i(2990),b=i(4927),m=function(){return m=Object.assign||function(n){for(var r,i=1,e=arguments.length;i<e;i++)for(var o in r=arguments[i])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},m.apply(this,arguments)},h={success:(0,e.jsx)(c(),{},void 0),warning:(0,e.jsx)(f(),{},void 0),error:(0,e.jsx)(p(),{},void 0),info:(0,e.jsx)(l(),{},void 0)},j=function(n){var r=n.trigger,i=void 0===r?"click":r,a=n.type,c=void 0===a?"warning":a,s=n.title,l=n.content,u=n.icon,p=n.okText,d=n.cancelText,f=n.onOk,j=n.onCancel,g=n.okButtonProps,y=n.cancelButtonProps,x=n.placement,O=void 0===x?"bottom":x,C=n.className,w=n.children,N={interactive:!0,arrow:!1},P="click"===i;P?(N.disableFocusListener=!0,N.disableHoverListener=!0,N.disableTouchListener=!0):N.disableFocusListener=!0;var k,F=(0,o.useState)(!1),T=F[0],S=F[1],_=function(){S(!1)},q=function(){S(!0)},I=function(){_()},L=(0,e.jsxs)("div",m({className:(0,b.Z)("popconfirm-wrapper"),onClick:function(n){return n.stopPropagation()}},{children:[(0,e.jsxs)("div",m({className:"popconfirm-message"},{children:[(0,e.jsx)("span",m({className:"popconfirm-message-icon"},{children:u||h[c]}),void 0),(0,e.jsxs)("div",m({className:"popconfirm-message-body"},{children:[s&&(0,e.jsx)("div",m({className:"popconfirm-message-title"},{children:s}),void 0),(0,e.jsx)("div",m({className:"popconfirm-message-content"},{children:l}),void 0)]}),void 0)]}),void 0),(0,e.jsxs)("div",m({className:"popconfirm-btns"},{children:[(0,e.jsx)(v.default,m({onClick:function(){null==j||j(),_()}},y,{variant:"outlined",size:"small"},{children:d||"取消"}),void 0),(0,e.jsx)(v.default,m({onClick:function(){null==f||f(),_()}},g,{variant:"contained",size:"small"},{children:p||"确定"}),void 0)]}),void 0)]}),void 0);return(0,e.jsx)(e.Fragment,{children:(k=(0,e.jsx)(t.Tooltip,m({open:T,placement:O},N,{title:L,onClose:_,onOpen:q,classes:{popper:(0,b.Z)("paraui-popconfirm",C),tooltip:"paraui-popconfirm-tooltip",arrow:"paraui-popconfirm-arrow"}},{children:P?(0,e.jsx)("span",m({onClick:q,className:"paraui-popconfirm-anchor"},{children:w}),void 0):(0,e.jsx)("span",m({className:"paraui-popconfirm-anchor"},{children:w}),void 0)}),void 0),P?(0,e.jsx)(t.ClickAwayListener,m({onClickAway:I},{children:k}),void 0):k)},void 0)};r.default=j},6885:function(n,r,i){var e=i(7712),o=i(1731),t=i(4927),a=function(){return a=Object.assign||function(n){for(var r,i=1,e=arguments.length;i<e;i++)for(var o in r=arguments[i])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},a.apply(this,arguments)};r.default=function(n){var r,i=a(a({},n.classes),{popper:(0,t.Z)("paraui-tooltip",null===(r=n.classes)||void 0===r?void 0:r.popper)});return(0,e.jsx)(o.Tooltip,a({},n,{classes:i},{children:n.children}),void 0)}},1731:function(r){r.exports=n},3285:function(n){n.exports=r},20:function(n){n.exports=i},6028:function(n){n.exports=e},2749:function(n){n.exports=o},1102:function(n){n.exports=t},6897:function(n){n.exports=a},9248:function(n){n.exports=c},9297:function(n){n.exports=s}},p={};function d(n){var r=p[n];if(void 0!==r)return r.exports;var i=p[n]={exports:{}};return u[n](i,i.exports,d),i.exports}d.m=u,l=[],d.O=function(n,r,i,e){if(!r){var o=1/0;for(c=0;c<l.length;c++){r=l[c][0],i=l[c][1],e=l[c][2];for(var t=!0,a=0;a<r.length;a++)(!1&e||o>=e)&&Object.keys(d.O).every((function(n){return d.O[n](r[a])}))?r.splice(a--,1):(t=!1,e<o&&(o=e));t&&(l.splice(c--,1),n=i())}return n}e=e||0;for(var c=l.length;c>0&&l[c-1][2]>e;c--)l[c]=l[c-1];l[c]=[r,i,e]},d.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return d.d(r,{a:r}),r},d.d=function(n,r){for(var i in r)d.o(r,i)&&!d.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:r[i]})},d.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},d.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},function(){var n={7095:0,6615:0,2823:0,9296:0};d.O.j=function(r){return 0===n[r]};var r=function(r,i){var e,o,t=i[0],a=i[1],c=i[2],s=0;for(e in a)d.o(a,e)&&(d.m[e]=a[e]);if(c)var l=c(d);for(r&&r(i);s<t.length;s++)o=t[s],d.o(n,o)&&n[o]&&n[o][0](),n[t[s]]=0;return d.O(l)},i=self.webpackChunkParaUI=self.webpackChunkParaUI||[];i.forEach(r.bind(null,0)),i.push=r.bind(null,i.push.bind(i))}();var f=d.O(void 0,[9296],(function(){return d(5598)}));return f=d.O(f)}()}));
|
package/Popover/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@material-ui/core"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","react"],r):"object"==typeof exports?exports.ParaUI=r(require("@material-ui/core"),require("react")):e.ParaUI=r(e["@material-ui/core"],e.react)}(self,(function(e,r){return function(){"use strict";var t={4126:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var r=Object.getOwnPropertySymbols,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,
|
|
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,a){for(var i,c,u=o(e),f=1;f<arguments.length;f++){for(var l in i=Object(arguments[f]))t.call(i,l)&&(u[l]=i[l]);if(r){c=r(i);for(var p=0;p<c.length;p++)n.call(i,c[p])&&(u[c[p]]=i[c[p]])}}return u}},9524:function(e,r,t){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
t(4126);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var
|
|
16
|
+
t(4126);var n=t(9297),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),a("react.fragment")}var i=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,r,t){var n,a={},f=null,l=null;for(n in void 0!==t&&(f=""+t),void 0!==r.key&&(f=""+r.key),void 0!==r.ref&&(l=r.ref),r)c.call(r,n)&&!u.hasOwnProperty(n)&&(a[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===a[n]&&(a[n]=r[n]);return{$$typeof:o,type:e,key:f,ref:l,props:a,_owner:i.current}}r.jsx=f},7712:function(e,r,t){e.exports=t(9524)},1731:function(r){r.exports=e},9297:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,{a:r}),r},o.d=function(e,r){for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){o.r(a),o.d(a,{Popover:function(){return i}});var e=o(7712),r=o(1731),t=function(){return t=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},t.apply(this,arguments)},n=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},i=function(o){var a,i=o.className,c=o.children,u=n(o,["className","children"]);return(0,e.jsx)(r.Popover,t({className:(a="paraui-popover",i&&(a+=" "+i),a)},u,{children:c}),void 0)};a.default=i}(),a}()}));
|
package/Radio/index.d.ts
CHANGED
|
@@ -4,16 +4,30 @@
|
|
|
4
4
|
* @description 单选框
|
|
5
5
|
*/
|
|
6
6
|
import { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import
|
|
8
|
-
export interface
|
|
7
|
+
import './index.scss';
|
|
8
|
+
export interface RadioProps {
|
|
9
|
+
/** 样式class */
|
|
10
|
+
className?: string;
|
|
9
11
|
/** 标题 */
|
|
10
12
|
label?: ReactNode;
|
|
11
|
-
/**
|
|
13
|
+
/** 大小 */
|
|
12
14
|
size?: 'small' | 'medium' | 'large';
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** 默认值 有值不受控组件 初始化第一次 */
|
|
16
|
+
defaultChecked?: boolean;
|
|
17
|
+
/** 默认值 有值受控组件*/
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
/** 禁用 */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** inputProps */
|
|
22
|
+
inputProps?: {
|
|
23
|
+
type?: string;
|
|
24
|
+
value?: any;
|
|
25
|
+
checked?: any;
|
|
26
|
+
[name: string]: any;
|
|
27
|
+
};
|
|
28
|
+
/** 改变时间 */
|
|
29
|
+
onChange?: (e: any, checked: boolean) => void;
|
|
30
|
+
[name: string]: any;
|
|
17
31
|
}
|
|
18
|
-
export declare const Radio: FunctionComponent<
|
|
32
|
+
export declare const Radio: FunctionComponent<RadioProps>;
|
|
19
33
|
export default Radio;
|