@daoyi/nmtl-ui 2.0.1-beta.7 → 2.0.1-beta.71
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/lib/components/Autocomplete-e62927dc.js +334 -0
- package/lib/components/Autocomplete.js +13 -1
- package/lib/components/Avatar.js +53 -1
- package/lib/components/BackTop.js +109 -1
- package/lib/components/BarChart.js +762 -1
- package/lib/components/Breadcrumbs.js +122 -1
- package/lib/components/Button-4fddcd2f.js +92 -0
- package/lib/components/Button.js +6 -1
- package/lib/components/Carousel.js +4654 -1
- package/lib/components/Checkbox.js +37 -1
- package/lib/components/CollapseContent.js +179 -1
- package/lib/components/ContactModal-33f4e605.js +12020 -0
- package/lib/components/ContactModal.js +22 -3
- package/lib/components/Drawer-fb5bc1ec.js +157 -0
- package/lib/components/Drawer.js +11 -1
- package/lib/components/Dropdown.js +134 -1
- package/lib/components/Empty-e50b760e.js +45 -0
- package/lib/components/Empty.js +5 -1
- package/lib/components/ExportButton.js +112 -1
- package/lib/components/ExtraTools-a49a1d2f.js +3537 -0
- package/lib/components/ExtraTools.js +10 -22
- package/lib/components/Filter.js +782 -12
- package/lib/components/Footer.js +271 -1
- package/lib/components/ForwardLink-6a82c19d.js +106 -0
- package/lib/components/ForwardLink.js +8 -0
- package/lib/components/Header.js +187 -1
- package/lib/components/Image.js +61 -1
- package/lib/components/Input.js +82 -1
- package/lib/components/InputMethod.js +33949 -12
- package/lib/components/KeywordSearch-3af0c402.js +140 -0
- package/lib/components/KeywordSearch.js +15 -1
- package/lib/components/KeywordTicker.js +190 -1
- package/lib/components/Keywords.js +317 -1
- package/lib/components/Loading.js +28 -1
- package/lib/components/MUITheme.js +2624 -1
- package/lib/components/Modal-2c39d5b8.js +108 -0
- package/lib/components/Modal.js +9 -1
- package/lib/components/MoreButton-6b323fe4.js +110 -0
- package/lib/components/MoreButton.js +6 -1
- package/lib/components/Pagination.js +3706 -0
- package/lib/components/Radio.js +78 -1
- package/lib/components/SNA.js +1691 -22
- package/lib/components/Select-0f131640.js +115 -0
- package/lib/components/Select.js +8 -1
- package/lib/components/Spin-1741f625.js +75 -0
- package/lib/components/Spin.js +6 -1
- package/lib/components/Table.js +51 -1
- package/lib/components/Tooltip-65a21a86.js +70 -0
- package/lib/components/Tooltip.js +7 -1
- package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
- package/lib/components/_rollupPluginBabelHelpers-a52356f6.js +142 -0
- package/lib/components/createSvgIcon-d9801fb7.js +576 -0
- package/lib/components/dataExport-d55d6fa3.js +92 -0
- package/lib/components/debounce-127da66c.js +355 -0
- package/lib/components/defaultTheme-5839b9b3.js +1505 -0
- package/lib/components/globalConfig.js +175 -0
- package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
- package/lib/components/index-0be0afec.js +481 -0
- package/lib/components/index-ef96775f.js +61 -0
- package/lib/components/isObjectLike-e111475d.js +190 -0
- package/lib/components/style-inject.es-1f59c1d0.js +28 -1
- package/lib/components/transform-3a04288b.js +5475 -0
- package/lib/components/withTheme-4417822c.js +6 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/utils/_rollupPluginBabelHelpers-8dd26e1a.js +121 -0
- package/lib/utils/arrayMerge.js +4953 -1
- package/lib/utils/chunkArray.js +15 -1
- package/lib/utils/convert2HtmlEntities.js +42 -1
- package/lib/utils/domToImage.js +802 -1
- package/lib/utils/downloadGephi.js +106 -1
- package/lib/utils/exportXlsx.js +219 -1
- package/lib/utils/historyAppendSearch.js +502 -1
- package/lib/utils/isDevelopMode.js +5 -1
- package/lib/utils/parseYMD.js +36 -1
- package/lib/utils/removeDuplicateItem.js +11 -1
- package/lib/utils/sendEmail.js +39 -1
- package/lib/utils/snaDefine-6a2bcd94.js +5 -0
- package/lib/utils/snaDefine.js +1 -1
- package/lib/utils/snaPreProcess.js +84 -1
- package/package.json +17 -21
- package/lib/components/Empty-54b79907.js +0 -1
- package/lib/components/KeywordSearch-5a393f12.js +0 -1
- package/lib/components/Select-f2441b83.js +0 -1
- package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
- package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
- package/lib/components/createSvgIcon-62b64929.js +0 -1
- package/lib/components/createSvgIcon-e24792d4.js +0 -1
- package/lib/components/createTheme-7fffa109.js +0 -1
- package/lib/components/dataExport-9fccd4f0.js +0 -1
- package/lib/components/debounce-c993109b.js +0 -1
- package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
- package/lib/components/index-11391ca3.js +0 -7
- package/lib/components/index-b2745105.js +0 -7
- package/lib/components/isObjectLike-2f1983fe.js +0 -1
- package/lib/components/style-inject.es-c875d022.js +0 -1
- package/lib/components/transform-0eb2d36e.js +0 -1
- package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
- package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
|
@@ -1 +1,122 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { NavLink } from 'react-router-dom';
|
|
5
|
+
import { Typography, Breadcrumbs as Breadcrumbs$1 } from '@material-ui/core';
|
|
6
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
|
+
|
|
8
|
+
var css_248z$1 = ".breadcrumbItem {\n display: flex;\n opacity: 0.8;\n transition: opacity 0.1s ease-in-out; }\n .breadcrumbItem:hover {\n opacity: 1; }\n .breadcrumbItem--last {\n opacity: 1;\n font-weight: 500 !important; }\n .breadcrumbItem__icon {\n display: flex;\n align-items: center;\n margin-right: 4px; }\n .breadcrumbItem__icon svg {\n font-size: 18px; }\n";
|
|
9
|
+
styleInject(css_248z$1);
|
|
10
|
+
|
|
11
|
+
const BreadcrumbItem = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
className,
|
|
14
|
+
icon,
|
|
15
|
+
text,
|
|
16
|
+
lastItem,
|
|
17
|
+
onClick
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
20
|
+
color: "textPrimary",
|
|
21
|
+
className: className,
|
|
22
|
+
onClick: onClick
|
|
23
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
24
|
+
className: classNames('breadcrumbItem', {
|
|
25
|
+
'breadcrumbItem--last': lastItem
|
|
26
|
+
})
|
|
27
|
+
}, icon && /*#__PURE__*/React__default.createElement("span", {
|
|
28
|
+
className: "breadcrumbItem__icon"
|
|
29
|
+
}, icon), /*#__PURE__*/React__default.createElement("span", {
|
|
30
|
+
className: "breadcrumbItem__text"
|
|
31
|
+
}, text)));
|
|
32
|
+
};
|
|
33
|
+
BreadcrumbItem.defaultProps = {
|
|
34
|
+
className: undefined,
|
|
35
|
+
icon: undefined,
|
|
36
|
+
text: undefined,
|
|
37
|
+
lastItem: undefined,
|
|
38
|
+
onClick: () => {}
|
|
39
|
+
};
|
|
40
|
+
BreadcrumbItem.propTypes = {
|
|
41
|
+
className: PropTypes.string,
|
|
42
|
+
icon: PropTypes.node,
|
|
43
|
+
text: PropTypes.string,
|
|
44
|
+
lastItem: PropTypes.bool,
|
|
45
|
+
onClick: PropTypes.func
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var css_248z = ".breadcrumbs__link {\n cursor: pointer;\n text-decoration: none !important; }\n";
|
|
49
|
+
styleInject(css_248z);
|
|
50
|
+
|
|
51
|
+
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
52
|
+
var className = _ref.className,
|
|
53
|
+
links = _ref.links,
|
|
54
|
+
separator = _ref.separator;
|
|
55
|
+
return /*#__PURE__*/React__default.createElement(Breadcrumbs$1, {
|
|
56
|
+
className: classNames('breadcrumbs', className),
|
|
57
|
+
"aria-label": "breadcrumb",
|
|
58
|
+
separator: separator && separator.length > 0 ? separator : undefined
|
|
59
|
+
}, Array.isArray(links) && links.length > 0 && links.map(function (_ref2, i) {
|
|
60
|
+
var icon = _ref2.icon,
|
|
61
|
+
text = _ref2.text,
|
|
62
|
+
href = _ref2.href,
|
|
63
|
+
onClick = _ref2.onClick;
|
|
64
|
+
var lastLink = i === links.length - 1;
|
|
65
|
+
|
|
66
|
+
/* 尾巴 */
|
|
67
|
+
if (lastLink) return /*#__PURE__*/React__default.createElement(BreadcrumbItem, {
|
|
68
|
+
key: i.toString(),
|
|
69
|
+
lastItem: true,
|
|
70
|
+
icon: icon,
|
|
71
|
+
text: text,
|
|
72
|
+
onClick: onClick
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
/* 頭 */
|
|
76
|
+
if (i === 0) {
|
|
77
|
+
return /*#__PURE__*/React__default.createElement(NavLink, {
|
|
78
|
+
className: "breadcrumbs__link",
|
|
79
|
+
key: i.toString(),
|
|
80
|
+
to: href || '/',
|
|
81
|
+
onClick: onClick
|
|
82
|
+
}, /*#__PURE__*/React__default.createElement(BreadcrumbItem, {
|
|
83
|
+
icon: icon,
|
|
84
|
+
text: text
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* 中間 */
|
|
89
|
+
return href ? /*#__PURE__*/React__default.createElement(NavLink, {
|
|
90
|
+
className: "breadcrumbs__link",
|
|
91
|
+
key: i.toString(),
|
|
92
|
+
to: href,
|
|
93
|
+
onClick: onClick
|
|
94
|
+
}, /*#__PURE__*/React__default.createElement(BreadcrumbItem, {
|
|
95
|
+
icon: icon,
|
|
96
|
+
text: text
|
|
97
|
+
})) : /*#__PURE__*/React__default.createElement(BreadcrumbItem, {
|
|
98
|
+
key: i.toString(),
|
|
99
|
+
lastItem: true,
|
|
100
|
+
icon: icon,
|
|
101
|
+
text: text,
|
|
102
|
+
onClick: onClick
|
|
103
|
+
});
|
|
104
|
+
}));
|
|
105
|
+
};
|
|
106
|
+
Breadcrumbs.defaultProps = {
|
|
107
|
+
className: undefined,
|
|
108
|
+
links: undefined,
|
|
109
|
+
separator: undefined
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/* Write props detail information and 'npm run updateStory' will help you generate stories's argTypes */
|
|
113
|
+
Breadcrumbs.propTypes = {
|
|
114
|
+
/** Css Name */
|
|
115
|
+
className: PropTypes.string,
|
|
116
|
+
/** 麵包穴的連結們 */
|
|
117
|
+
links: PropTypes.arrayOf(PropTypes.any),
|
|
118
|
+
/** 分割者的符號 */
|
|
119
|
+
separator: PropTypes.string
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export { Breadcrumbs as default };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
4
|
+
import { Button as Button$1, CircularProgress } from '@material-ui/core';
|
|
5
|
+
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
|
+
|
|
7
|
+
var css_248z = ".button {\n border: 1px solid #ffffff99;\n border-radius: 45px;\n padding: 8px 16px;\n background: #007bff;\n color: white;\n cursor: pointer; }\n .button:hover {\n opacity: 0.9; }\n";
|
|
8
|
+
styleInject(css_248z);
|
|
9
|
+
|
|
10
|
+
var Button = function Button(props) {
|
|
11
|
+
var style = props.style,
|
|
12
|
+
className = props.className,
|
|
13
|
+
tabIndex = props.tabIndex,
|
|
14
|
+
alt = props.alt,
|
|
15
|
+
text = props.text,
|
|
16
|
+
size = props.size,
|
|
17
|
+
variant = props.variant;
|
|
18
|
+
var type = props.type,
|
|
19
|
+
color = props.color,
|
|
20
|
+
loading = props.loading,
|
|
21
|
+
disabled = props.disabled,
|
|
22
|
+
icon = props.icon,
|
|
23
|
+
endIcon = props.endIcon,
|
|
24
|
+
children = props.children,
|
|
25
|
+
onClick = props.onClick;
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(Button$1, {
|
|
27
|
+
style: style,
|
|
28
|
+
className: classNames('button', className),
|
|
29
|
+
tabIndex: tabIndex,
|
|
30
|
+
alt: alt,
|
|
31
|
+
size: size,
|
|
32
|
+
variant: variant,
|
|
33
|
+
color: type || color,
|
|
34
|
+
disabled: loading || disabled,
|
|
35
|
+
onClick: onClick,
|
|
36
|
+
startIcon: icon,
|
|
37
|
+
endIcon: loading ? /*#__PURE__*/React__default.createElement(CircularProgress, {
|
|
38
|
+
size: 16
|
|
39
|
+
}) : endIcon
|
|
40
|
+
}, text, children);
|
|
41
|
+
};
|
|
42
|
+
Button.defaultProps = {
|
|
43
|
+
style: undefined,
|
|
44
|
+
className: undefined,
|
|
45
|
+
tabIndex: undefined,
|
|
46
|
+
alt: undefined,
|
|
47
|
+
text: undefined,
|
|
48
|
+
loading: false,
|
|
49
|
+
disabled: false,
|
|
50
|
+
variant: undefined,
|
|
51
|
+
size: 'small',
|
|
52
|
+
color: 'primary',
|
|
53
|
+
type: undefined,
|
|
54
|
+
children: undefined,
|
|
55
|
+
icon: undefined,
|
|
56
|
+
endIcon: undefined,
|
|
57
|
+
onClick: function onClick() {}
|
|
58
|
+
};
|
|
59
|
+
Button.propTypes = {
|
|
60
|
+
/** 樣式 */
|
|
61
|
+
style: PropTypes.objectOf(PropTypes.any),
|
|
62
|
+
/** Css Name */
|
|
63
|
+
className: PropTypes.string,
|
|
64
|
+
/** Tab 鍵位置 */
|
|
65
|
+
tabIndex: PropTypes.number,
|
|
66
|
+
/** 註解 */
|
|
67
|
+
alt: PropTypes.string,
|
|
68
|
+
/** 輸入的文字 */
|
|
69
|
+
text: PropTypes.string,
|
|
70
|
+
/** 是否載入中 */
|
|
71
|
+
loading: PropTypes.bool,
|
|
72
|
+
/** 是否禁用 */
|
|
73
|
+
disabled: PropTypes.bool,
|
|
74
|
+
/** 按鈕種類 */
|
|
75
|
+
variant: PropTypes.oneOf(['contained', 'outlined', 'text']),
|
|
76
|
+
/** 按鈕的大小 */
|
|
77
|
+
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
78
|
+
/** 按鈕顏色 */
|
|
79
|
+
color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),
|
|
80
|
+
/** 按鈕樣式(同按鈕顏色) */
|
|
81
|
+
type: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),
|
|
82
|
+
/** 按鈕內容 */
|
|
83
|
+
children: PropTypes.node,
|
|
84
|
+
/** 按鈕圖案(前面) */
|
|
85
|
+
icon: PropTypes.node,
|
|
86
|
+
/** 按鈕圖案(後面) */
|
|
87
|
+
endIcon: PropTypes.node,
|
|
88
|
+
/** 點擊後的返回 */
|
|
89
|
+
onClick: PropTypes.func
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { Button as B };
|
package/lib/components/Button.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export { B as default } from './Button-4fddcd2f.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import './index-ef96775f.js';
|
|
5
|
+
import '@material-ui/core';
|
|
6
|
+
import './style-inject.es-1f59c1d0.js';
|