@daoyi/nmtl-ui 2.0.1-beta.50 → 2.0.1-beta.52
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/package.json +1 -1
- package/lib/components/Autocomplete-3dae80ca.js +0 -335
- package/lib/components/Autocomplete.js +0 -13
- package/lib/components/Avatar.js +0 -49
- package/lib/components/BackTop.js +0 -109
- package/lib/components/BarChart.js +0 -762
- package/lib/components/Breadcrumbs.js +0 -122
- package/lib/components/Button-433372aa.js +0 -92
- package/lib/components/Button.js +0 -6
- package/lib/components/Carousel.js +0 -4654
- package/lib/components/Checkbox.js +0 -37
- package/lib/components/CollapseContent.js +0 -179
- package/lib/components/ContactModal-66bcb5d3.js +0 -10779
- package/lib/components/ContactModal.js +0 -22
- package/lib/components/Drawer-df3535c2.js +0 -157
- package/lib/components/Drawer.js +0 -11
- package/lib/components/Dropdown.js +0 -134
- package/lib/components/Empty-7318f658.js +0 -45
- package/lib/components/Empty.js +0 -5
- package/lib/components/ExportButton.js +0 -112
- package/lib/components/ExtraTools-1cb5786d.js +0 -3533
- package/lib/components/ExtraTools.js +0 -10
- package/lib/components/Filter.js +0 -776
- package/lib/components/Footer.js +0 -271
- package/lib/components/ForwardLink-0571e627.js +0 -105
- package/lib/components/ForwardLink.js +0 -9
- package/lib/components/Header.js +0 -187
- package/lib/components/Image.js +0 -61
- package/lib/components/Input.js +0 -77
- package/lib/components/InputMethod.js +0 -33963
- package/lib/components/KeywordSearch-568a8a44.js +0 -139
- package/lib/components/KeywordSearch.js +0 -15
- package/lib/components/KeywordTicker.js +0 -190
- package/lib/components/Keywords.js +0 -317
- package/lib/components/Loading.js +0 -28
- package/lib/components/MUITheme.js +0 -2627
- package/lib/components/Modal-64c4ab0d.js +0 -108
- package/lib/components/Modal.js +0 -9
- package/lib/components/MoreButton-6654cc5b.js +0 -110
- package/lib/components/MoreButton.js +0 -6
- package/lib/components/Radio.js +0 -78
- package/lib/components/SNA.js +0 -1692
- package/lib/components/Select-113372b2.js +0 -115
- package/lib/components/Select.js +0 -8
- package/lib/components/Spin-8a5a600d.js +0 -75
- package/lib/components/Spin.js +0 -6
- package/lib/components/Table.js +0 -51
- package/lib/components/Tooltip-abe1205f.js +0 -70
- package/lib/components/Tooltip.js +0 -7
- package/lib/components/_commonjsHelpers-70de2c37.js +0 -28
- package/lib/components/_rollupPluginBabelHelpers-3d9c8289.js +0 -478
- package/lib/components/createSvgIcon-a79ae4b1.js +0 -576
- package/lib/components/dataExport-d55d6fa3.js +0 -92
- package/lib/components/debounce-127da66c.js +0 -355
- package/lib/components/defaultTheme-19a14721.js +0 -1485
- package/lib/components/globalConfig.js +0 -172
- package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +0 -105
- package/lib/components/index-66babe67.js +0 -61
- package/lib/components/index-fdcc884e.js +0 -481
- package/lib/components/isObjectLike-e111475d.js +0 -190
- package/lib/components/style-inject.es-1f59c1d0.js +0 -28
- package/lib/components/transform-3a04288b.js +0 -5475
- package/lib/index.d.ts +0 -36
- package/lib/index.js +0 -36
- package/lib/utils/_rollupPluginBabelHelpers-8dd26e1a.js +0 -121
- package/lib/utils/arrayMerge.js +0 -100
- package/lib/utils/chunkArray.js +0 -15
- package/lib/utils/convert2HtmlEntities.js +0 -42
- package/lib/utils/domToImage.js +0 -802
- package/lib/utils/downloadGephi.js +0 -106
- package/lib/utils/exportXlsx.js +0 -219
- package/lib/utils/historyAppendSearch.js +0 -502
- package/lib/utils/index.d.ts +0 -13
- package/lib/utils/index.js +0 -13
- package/lib/utils/isDevelopMode.js +0 -5
- package/lib/utils/parseYMD.js +0 -36
- package/lib/utils/removeDuplicateItem.js +0 -11
- package/lib/utils/sendEmail.js +0 -39
- package/lib/utils/snaDefine-6a2bcd94.js +0 -5
- package/lib/utils/snaDefine.js +0 -1
- package/lib/utils/snaPreProcess.js +0 -84
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import { c as classNames } from './index-66babe67.js';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { Dialog, DialogTitle, IconButton, DialogContent, DialogActions, CircularProgress } from '@material-ui/core';
|
|
5
|
-
import { CloseSharp } from '@material-ui/icons';
|
|
6
|
-
import { B as Button } from './Button-433372aa.js';
|
|
7
|
-
import { S as Spin } from './Spin-8a5a600d.js';
|
|
8
|
-
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
9
|
-
|
|
10
|
-
var css_248z = ".modal__title h2 {\n display: flex;\n align-items: center; }\n\n.modal__title__text {\n flex: 1;\n font-size: 16px;\n padding: 8px 0;\n color: white; }\n\n.modal__title__close {\n cursor: pointer;\n color: white; }\n\n.modal--transparent .MuiPaper-root {\n background: transparent !important;\n box-shadow: none; }\n\n.modal--transparent .modal__title {\n background: transparent !important; }\n";
|
|
11
|
-
styleInject(css_248z);
|
|
12
|
-
|
|
13
|
-
var Modal = function Modal(props) {
|
|
14
|
-
var className = props.className,
|
|
15
|
-
title = props.title,
|
|
16
|
-
children = props.children,
|
|
17
|
-
footer = props.footer,
|
|
18
|
-
cancelText = props.cancelText,
|
|
19
|
-
okText = props.okText,
|
|
20
|
-
visible = props.visible,
|
|
21
|
-
onOk = props.onOk,
|
|
22
|
-
onCancel = props.onCancel;
|
|
23
|
-
var closable = props.closable,
|
|
24
|
-
loading = props.loading,
|
|
25
|
-
fullWidth = props.fullWidth,
|
|
26
|
-
transparent = props.transparent;
|
|
27
|
-
var endIcon = loading && /*#__PURE__*/React__default.createElement(CircularProgress, {
|
|
28
|
-
size: 14
|
|
29
|
-
});
|
|
30
|
-
return /*#__PURE__*/React__default.createElement(Dialog, {
|
|
31
|
-
className: classNames('modal', {
|
|
32
|
-
'modal--transparent': transparent
|
|
33
|
-
}, className),
|
|
34
|
-
fullWidth: fullWidth,
|
|
35
|
-
open: visible || false,
|
|
36
|
-
onClose: function onClose() {
|
|
37
|
-
return closable && onCancel();
|
|
38
|
-
}
|
|
39
|
-
}, /*#__PURE__*/React__default.createElement(DialogTitle, {
|
|
40
|
-
className: "modal__title"
|
|
41
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
42
|
-
className: "modal__title__text"
|
|
43
|
-
}, title), closable && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
44
|
-
onClick: onCancel
|
|
45
|
-
}, /*#__PURE__*/React__default.createElement(CloseSharp, {
|
|
46
|
-
className: "modal__title__close"
|
|
47
|
-
}))), /*#__PURE__*/React__default.createElement(DialogContent, null, /*#__PURE__*/React__default.createElement(Spin, {
|
|
48
|
-
spinning: loading
|
|
49
|
-
}, children)), footer !== null && /*#__PURE__*/React__default.createElement(DialogActions, null, footer === undefined && (cancelText || okText) ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, cancelText && /*#__PURE__*/React__default.createElement(Button, {
|
|
50
|
-
onClick: onCancel,
|
|
51
|
-
color: "default",
|
|
52
|
-
endIcon: endIcon,
|
|
53
|
-
disabled: loading
|
|
54
|
-
}, cancelText), okText && /*#__PURE__*/React__default.createElement(Button, {
|
|
55
|
-
onClick: onOk,
|
|
56
|
-
color: "primary",
|
|
57
|
-
endIcon: endIcon,
|
|
58
|
-
disabled: loading,
|
|
59
|
-
autoFocus: true
|
|
60
|
-
}, okText)) : footer));
|
|
61
|
-
};
|
|
62
|
-
Modal.defaultProps = {
|
|
63
|
-
className: undefined,
|
|
64
|
-
loading: undefined,
|
|
65
|
-
transparent: undefined,
|
|
66
|
-
closable: true,
|
|
67
|
-
title: undefined,
|
|
68
|
-
children: undefined,
|
|
69
|
-
fullWidth: undefined,
|
|
70
|
-
footer: undefined,
|
|
71
|
-
cancelText: 'Cancel',
|
|
72
|
-
okText: 'Ok',
|
|
73
|
-
visible: undefined,
|
|
74
|
-
onOk: function onOk() {},
|
|
75
|
-
onCancel: function onCancel() {}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/* Write props detail information and 'npm run updateStory' will help you generate stories's argTypes */
|
|
79
|
-
Modal.propTypes = {
|
|
80
|
-
/** Css Name */
|
|
81
|
-
className: PropTypes.string,
|
|
82
|
-
/** 是否正在載入中 */
|
|
83
|
-
loading: PropTypes.bool,
|
|
84
|
-
/** 是否正透明模式 */
|
|
85
|
-
transparent: PropTypes.bool,
|
|
86
|
-
/** 是否可以取消關閉(含close icon) */
|
|
87
|
-
closable: PropTypes.bool,
|
|
88
|
-
/** Modal Title */
|
|
89
|
-
title: PropTypes.node,
|
|
90
|
-
/** Modal 內容 */
|
|
91
|
-
children: PropTypes.node,
|
|
92
|
-
/** 版面是否滿版 */
|
|
93
|
-
fullWidth: PropTypes.bool,
|
|
94
|
-
/** Footer */
|
|
95
|
-
footer: PropTypes.node,
|
|
96
|
-
/** 取消文字 */
|
|
97
|
-
cancelText: PropTypes.string,
|
|
98
|
-
/** 確認文字 */
|
|
99
|
-
okText: PropTypes.string,
|
|
100
|
-
/** 是否出現 */
|
|
101
|
-
visible: PropTypes.bool,
|
|
102
|
-
/** 完成的callback */
|
|
103
|
-
onOk: PropTypes.func,
|
|
104
|
-
/** 關閉Modal */
|
|
105
|
-
onCancel: PropTypes.func
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { Modal as M };
|
package/lib/components/Modal.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { M as default } from './Modal-64c4ab0d.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import './index-66babe67.js';
|
|
4
|
-
import 'prop-types';
|
|
5
|
-
import '@material-ui/core';
|
|
6
|
-
import '@material-ui/icons';
|
|
7
|
-
import './Button-433372aa.js';
|
|
8
|
-
import './style-inject.es-1f59c1d0.js';
|
|
9
|
-
import './Spin-8a5a600d.js';
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { c as classNames } from './index-66babe67.js';
|
|
4
|
-
import { ExpandLess, ExpandMore } from '@material-ui/icons';
|
|
5
|
-
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
|
-
|
|
7
|
-
var css_248z = ".moreButton {\n width: -moz-fit-content;\n width: fit-content;\n display: flex;\n align-items: center;\n position: relative;\n margin: 1rem 0rem;\n border-radius: 8px;\n padding: 1rem 2.5rem;\n -webkit-user-select: none;\n user-select: none;\n cursor: pointer; }\n .moreButton__mask {\n transition: all 0.3s ease-in-out;\n position: absolute;\n left: 0;\n top: 0;\n border-radius: 8px;\n width: 100%;\n height: 100%;\n opacity: 0; }\n .moreButton:hover .moreButton__mask {\n opacity: 1; }\n .moreButton--shadow {\n transition: all 0.3s ease-in-out;\n border: 3px solid #ffffff;\n position: relative;\n left: 0px;\n top: 0px; }\n .moreButton--shadow:hover {\n box-shadow: initial !important;\n left: 3px;\n top: 3px; }\n .moreButton--small {\n border: 0;\n padding: 0;\n left: 0px !important;\n top: 0px !important;\n background: transparent !important;\n box-shadow: initial !important; }\n .moreButton--small .moreButton__mask {\n opacity: 0 !important; }\n .moreButton__icon {\n display: flex;\n z-index: 1; }\n .moreButton__icon--small {\n font-size: 1.5rem;\n border-radius: 45px;\n color: white !important; }\n .moreButton__text {\n z-index: 1;\n font-size: 1.5rem;\n line-height: 1.5rem;\n transition: color 0.3s ease-in-out; }\n .moreButton__text--small {\n margin-left: 0.75rem;\n font-size: 1.5rem;\n color: #0c2a4d; }\n .moreButton__text--small:hover {\n text-decoration: underline; }\n";
|
|
8
|
-
styleInject(css_248z);
|
|
9
|
-
|
|
10
|
-
var MoreButton = function MoreButton(props) {
|
|
11
|
-
var primaryColor = props.primaryColor,
|
|
12
|
-
secondaryColor = props.secondaryColor,
|
|
13
|
-
shadowColor = props.shadowColor;
|
|
14
|
-
var small = props.small,
|
|
15
|
-
enableShadow = props.enableShadow,
|
|
16
|
-
customExpandIcon = props.customExpandIcon;
|
|
17
|
-
var expand = props.expand,
|
|
18
|
-
setExpand = props.setExpand,
|
|
19
|
-
_onClick = props.onClick,
|
|
20
|
-
formatMessage = props.formatMessage;
|
|
21
|
-
var smallIcon = expand ? /*#__PURE__*/React__default.createElement(ExpandLess, {
|
|
22
|
-
className: "moreButton__icon--small",
|
|
23
|
-
style: {
|
|
24
|
-
background: shadowColor || primaryColor
|
|
25
|
-
}
|
|
26
|
-
}) : /*#__PURE__*/React__default.createElement(ExpandMore, {
|
|
27
|
-
className: "moreButton__icon--small",
|
|
28
|
-
style: {
|
|
29
|
-
background: shadowColor || primaryColor
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var smallMessage = expand ? 'common.show.less' : 'common.show.more';
|
|
33
|
-
var message = small ? smallMessage : 'common.watch.more';
|
|
34
|
-
var largeIcon = customExpandIcon && /*#__PURE__*/React__default.createElement("img", {
|
|
35
|
-
src: customExpandIcon,
|
|
36
|
-
alt: "more"
|
|
37
|
-
});
|
|
38
|
-
var icon = small ? smallIcon : largeIcon;
|
|
39
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
40
|
-
className: classNames('moreButton', {
|
|
41
|
-
'moreButton--shadow': enableShadow
|
|
42
|
-
}, {
|
|
43
|
-
'moreButton--small': small
|
|
44
|
-
}),
|
|
45
|
-
style: {
|
|
46
|
-
color: shadowColor || 'white',
|
|
47
|
-
background: primaryColor,
|
|
48
|
-
boxShadow: enableShadow ? "3px 3px 0 0 ".concat(shadowColor) : undefined
|
|
49
|
-
},
|
|
50
|
-
onClick: function onClick() {
|
|
51
|
-
setExpand(!expand);
|
|
52
|
-
_onClick();
|
|
53
|
-
}
|
|
54
|
-
}, !enableShadow && /*#__PURE__*/React__default.createElement("div", {
|
|
55
|
-
className: "moreButton__mask",
|
|
56
|
-
style: {
|
|
57
|
-
background: secondaryColor
|
|
58
|
-
}
|
|
59
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
60
|
-
className: "moreButton__icon"
|
|
61
|
-
}, icon), /*#__PURE__*/React__default.createElement("div", {
|
|
62
|
-
className: classNames('moreButton__text', {
|
|
63
|
-
'moreButton__text--small': small
|
|
64
|
-
}),
|
|
65
|
-
style: {
|
|
66
|
-
color: small ? shadowColor || primaryColor : undefined,
|
|
67
|
-
marginLeft: icon ? '0.5rem' : undefined
|
|
68
|
-
}
|
|
69
|
-
}, formatMessage ? formatMessage({
|
|
70
|
-
id: message
|
|
71
|
-
}) : message));
|
|
72
|
-
};
|
|
73
|
-
MoreButton.defaultProps = {
|
|
74
|
-
primaryColor: '#271702',
|
|
75
|
-
// default為文學網站的主色系
|
|
76
|
-
secondaryColor: '#aa8859',
|
|
77
|
-
// default為文學網站的次色系
|
|
78
|
-
shadowColor: undefined,
|
|
79
|
-
small: false,
|
|
80
|
-
enableShadow: false,
|
|
81
|
-
expand: false,
|
|
82
|
-
customExpandIcon: undefined,
|
|
83
|
-
formatMessage: undefined,
|
|
84
|
-
setExpand: function setExpand() {},
|
|
85
|
-
onClick: function onClick() {}
|
|
86
|
-
};
|
|
87
|
-
MoreButton.propTypes = {
|
|
88
|
-
/** 按鈕主色系顏色 */
|
|
89
|
-
primaryColor: PropTypes.string,
|
|
90
|
-
/** 按鈕次色系顏色 */
|
|
91
|
-
secondaryColor: PropTypes.string,
|
|
92
|
-
/** 按鈕影子顏色 */
|
|
93
|
-
shadowColor: PropTypes.string,
|
|
94
|
-
/** 展開是否為小圖示 */
|
|
95
|
-
small: PropTypes.bool,
|
|
96
|
-
/** 是否啟動陰影模式 */
|
|
97
|
-
enableShadow: PropTypes.bool,
|
|
98
|
-
/** 客製化自己的大圖標 */
|
|
99
|
-
customExpandIcon: PropTypes.node,
|
|
100
|
-
/** 是否展開(僅有在small=true作動) */
|
|
101
|
-
expand: PropTypes.bool,
|
|
102
|
-
/** 語系翻譯的formateMessag(useIntl) */
|
|
103
|
-
formatMessage: PropTypes.func,
|
|
104
|
-
/** 設定是否展開 */
|
|
105
|
-
setExpand: PropTypes.func,
|
|
106
|
-
/** 點擊的callback */
|
|
107
|
-
onClick: PropTypes.func
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export { MoreButton as M };
|
package/lib/components/Radio.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-3d9c8289.js';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { RadioGroup, FormControlLabel, Radio as Radio$1 } from '@material-ui/core';
|
|
5
|
-
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
|
-
|
|
7
|
-
var css_248z = "";
|
|
8
|
-
styleInject(css_248z);
|
|
9
|
-
|
|
10
|
-
var Radio = function Radio(props) {
|
|
11
|
-
var className = props.className,
|
|
12
|
-
name = props.name,
|
|
13
|
-
defaultValue = props.defaultValue,
|
|
14
|
-
value = props.value,
|
|
15
|
-
size = props.size,
|
|
16
|
-
style = props.style,
|
|
17
|
-
direction = props.direction; // Attributes
|
|
18
|
-
var options = props.options; // DataList
|
|
19
|
-
var _onChange = props.onChange; // Call Back functions
|
|
20
|
-
|
|
21
|
-
return /*#__PURE__*/React__default.createElement(RadioGroup, {
|
|
22
|
-
className: "radioGroup",
|
|
23
|
-
style: _objectSpread2({
|
|
24
|
-
flexDirection: direction
|
|
25
|
-
}, style),
|
|
26
|
-
name: name,
|
|
27
|
-
defaultValue: defaultValue || undefined,
|
|
28
|
-
value: value || undefined,
|
|
29
|
-
onChange: function onChange(event) {
|
|
30
|
-
if (_onChange) _onChange(event.target.value);
|
|
31
|
-
}
|
|
32
|
-
}, Array.isArray(options) && options.map(function (option) {
|
|
33
|
-
return /*#__PURE__*/React__default.createElement(FormControlLabel, {
|
|
34
|
-
value: option.value,
|
|
35
|
-
key: option.value,
|
|
36
|
-
control: /*#__PURE__*/React__default.createElement(Radio$1, {
|
|
37
|
-
disabled: option.disabled || false,
|
|
38
|
-
size: size,
|
|
39
|
-
className: className
|
|
40
|
-
}),
|
|
41
|
-
label: option.label
|
|
42
|
-
});
|
|
43
|
-
}));
|
|
44
|
-
};
|
|
45
|
-
Radio.defaultProps = {
|
|
46
|
-
className: undefined,
|
|
47
|
-
name: undefined,
|
|
48
|
-
defaultValue: undefined,
|
|
49
|
-
value: undefined,
|
|
50
|
-
size: 'small',
|
|
51
|
-
style: undefined,
|
|
52
|
-
direction: 'row',
|
|
53
|
-
options: undefined,
|
|
54
|
-
onChange: function onChange() {}
|
|
55
|
-
};
|
|
56
|
-
Radio.propTypes = {
|
|
57
|
-
/** Css Name */
|
|
58
|
-
className: PropTypes.string,
|
|
59
|
-
/** 搭配FormControl 使用的名稱 */
|
|
60
|
-
name: PropTypes.string,
|
|
61
|
-
/** 預設內容 */
|
|
62
|
-
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
63
|
-
/** 如果你就是好想要Value */
|
|
64
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
65
|
-
/** Radio的大小 */
|
|
66
|
-
// size: PropTypes.string,
|
|
67
|
-
size: PropTypes.oneOf(['small', 'medium']),
|
|
68
|
-
/** 樣式 */
|
|
69
|
-
style: PropTypes.objectOf(PropTypes.any),
|
|
70
|
-
/** Radio的方向 */
|
|
71
|
-
direction: PropTypes.oneOf(['row', 'column']),
|
|
72
|
-
/** Radio的清單 */
|
|
73
|
-
options: PropTypes.arrayOf(PropTypes.any),
|
|
74
|
-
/** 選擇時的callback */
|
|
75
|
-
onChange: PropTypes.func
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export { Radio as default };
|