@daoyi/nmtl-ui 2.0.1-beta.52 → 2.0.1-beta.53

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.
Files changed (81) hide show
  1. package/lib/components/Autocomplete-3dae80ca.js +335 -0
  2. package/lib/components/Autocomplete.js +13 -0
  3. package/lib/components/Avatar.js +49 -0
  4. package/lib/components/BackTop.js +109 -0
  5. package/lib/components/BarChart.js +762 -0
  6. package/lib/components/Breadcrumbs.js +122 -0
  7. package/lib/components/Button-433372aa.js +92 -0
  8. package/lib/components/Button.js +6 -0
  9. package/lib/components/Carousel.js +4654 -0
  10. package/lib/components/Checkbox.js +37 -0
  11. package/lib/components/CollapseContent.js +179 -0
  12. package/lib/components/ContactModal-66bcb5d3.js +10779 -0
  13. package/lib/components/ContactModal.js +22 -0
  14. package/lib/components/Drawer-df3535c2.js +157 -0
  15. package/lib/components/Drawer.js +11 -0
  16. package/lib/components/Dropdown.js +134 -0
  17. package/lib/components/Empty-7318f658.js +45 -0
  18. package/lib/components/Empty.js +5 -0
  19. package/lib/components/ExportButton.js +112 -0
  20. package/lib/components/ExtraTools-b0bb9399.js +3537 -0
  21. package/lib/components/ExtraTools.js +10 -0
  22. package/lib/components/Filter.js +776 -0
  23. package/lib/components/Footer.js +271 -0
  24. package/lib/components/ForwardLink-0571e627.js +105 -0
  25. package/lib/components/ForwardLink.js +9 -0
  26. package/lib/components/Header.js +187 -0
  27. package/lib/components/Image.js +61 -0
  28. package/lib/components/Input.js +77 -0
  29. package/lib/components/InputMethod.js +33963 -0
  30. package/lib/components/KeywordSearch-568a8a44.js +139 -0
  31. package/lib/components/KeywordSearch.js +15 -0
  32. package/lib/components/KeywordTicker.js +190 -0
  33. package/lib/components/Keywords.js +317 -0
  34. package/lib/components/Loading.js +28 -0
  35. package/lib/components/MUITheme.js +2627 -0
  36. package/lib/components/Modal-64c4ab0d.js +108 -0
  37. package/lib/components/Modal.js +9 -0
  38. package/lib/components/MoreButton-6654cc5b.js +110 -0
  39. package/lib/components/MoreButton.js +6 -0
  40. package/lib/components/Radio.js +78 -0
  41. package/lib/components/SNA.js +1691 -0
  42. package/lib/components/Select-113372b2.js +115 -0
  43. package/lib/components/Select.js +8 -0
  44. package/lib/components/Spin-8a5a600d.js +75 -0
  45. package/lib/components/Spin.js +6 -0
  46. package/lib/components/Table.js +51 -0
  47. package/lib/components/Tooltip-abe1205f.js +70 -0
  48. package/lib/components/Tooltip.js +7 -0
  49. package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
  50. package/lib/components/_rollupPluginBabelHelpers-3d9c8289.js +478 -0
  51. package/lib/components/createSvgIcon-a79ae4b1.js +576 -0
  52. package/lib/components/dataExport-d55d6fa3.js +92 -0
  53. package/lib/components/debounce-127da66c.js +355 -0
  54. package/lib/components/defaultTheme-19a14721.js +1485 -0
  55. package/lib/components/globalConfig.js +172 -0
  56. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  57. package/lib/components/index-66babe67.js +61 -0
  58. package/lib/components/index-fdcc884e.js +481 -0
  59. package/lib/components/isObjectLike-e111475d.js +190 -0
  60. package/lib/components/style-inject.es-1f59c1d0.js +28 -0
  61. package/lib/components/transform-3a04288b.js +5475 -0
  62. package/lib/index.d.ts +36 -0
  63. package/lib/index.js +36 -0
  64. package/lib/utils/_rollupPluginBabelHelpers-8dd26e1a.js +121 -0
  65. package/lib/utils/arrayMerge.js +100 -0
  66. package/lib/utils/chunkArray.js +15 -0
  67. package/lib/utils/convert2HtmlEntities.js +42 -0
  68. package/lib/utils/domToImage.js +802 -0
  69. package/lib/utils/downloadGephi.js +106 -0
  70. package/lib/utils/exportXlsx.js +219 -0
  71. package/lib/utils/historyAppendSearch.js +502 -0
  72. package/lib/utils/index.d.ts +13 -0
  73. package/lib/utils/index.js +13 -0
  74. package/lib/utils/isDevelopMode.js +5 -0
  75. package/lib/utils/parseYMD.js +36 -0
  76. package/lib/utils/removeDuplicateItem.js +11 -0
  77. package/lib/utils/sendEmail.js +39 -0
  78. package/lib/utils/snaDefine-6a2bcd94.js +5 -0
  79. package/lib/utils/snaDefine.js +1 -0
  80. package/lib/utils/snaPreProcess.js +84 -0
  81. package/package.json +1 -1
@@ -0,0 +1,122 @@
1
+ import React__default from 'react';
2
+ import { c as classNames } from './index-66babe67.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-66babe67.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 };
@@ -0,0 +1,6 @@
1
+ export { B as default } from './Button-433372aa.js';
2
+ import 'react';
3
+ import 'prop-types';
4
+ import './index-66babe67.js';
5
+ import '@material-ui/core';
6
+ import './style-inject.es-1f59c1d0.js';