@daoyi/nmtl-ui 2.0.1-beta.8 → 2.0.1-beta.80

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 (100) hide show
  1. package/lib/components/Autocomplete-cf913b25.js +423 -0
  2. package/lib/components/Autocomplete.js +19 -1
  3. package/lib/components/Avatar.js +53 -1
  4. package/lib/components/BackTop.js +109 -1
  5. package/lib/components/BarChart.js +762 -1
  6. package/lib/components/Breadcrumbs.js +122 -1
  7. package/lib/components/Button-611f1770.js +92 -0
  8. package/lib/components/Button.js +6 -1
  9. package/lib/components/Carousel.js +4654 -1
  10. package/lib/components/Checkbox.js +37 -1
  11. package/lib/components/CollapseContent.js +179 -1
  12. package/lib/components/ContactModal-0a4c67b8.js +12020 -0
  13. package/lib/components/ContactModal.js +22 -3
  14. package/lib/components/Drawer-55c0f66f.js +156 -0
  15. package/lib/components/Drawer.js +11 -1
  16. package/lib/components/Dropdown.js +134 -1
  17. package/lib/components/Empty-67b4d7d7.js +45 -0
  18. package/lib/components/Empty.js +5 -1
  19. package/lib/components/ExportButton.js +112 -1
  20. package/lib/components/ExtraTools-e4f085bc.js +3537 -0
  21. package/lib/components/ExtraTools.js +10 -22
  22. package/lib/components/Filter.js +782 -12
  23. package/lib/components/Footer.js +271 -1
  24. package/lib/components/ForwardLink-edab5061.js +106 -0
  25. package/lib/components/ForwardLink.js +8 -0
  26. package/lib/components/Header.js +194 -1
  27. package/lib/components/Image.js +61 -1
  28. package/lib/components/Input.js +82 -1
  29. package/lib/components/InputMethod.js +33949 -12
  30. package/lib/components/KeywordSearch-0b5681d9.js +144 -0
  31. package/lib/components/KeywordSearch.js +21 -1
  32. package/lib/components/KeywordTicker.js +190 -1
  33. package/lib/components/Keywords.js +317 -1
  34. package/lib/components/Loading.js +28 -1
  35. package/lib/components/MUITheme.js +2624 -1
  36. package/lib/components/Modal-c33b7a7f.js +108 -0
  37. package/lib/components/Modal.js +9 -1
  38. package/lib/components/MoreButton-b2306abb.js +110 -0
  39. package/lib/components/MoreButton.js +6 -1
  40. package/lib/components/Pagination.js +3637 -0
  41. package/lib/components/Radio.js +78 -1
  42. package/lib/components/SNA.js +1691 -22
  43. package/lib/components/Select-9a745e5c.js +115 -0
  44. package/lib/components/Select.js +8 -1
  45. package/lib/components/Spin-96bc2c76.js +75 -0
  46. package/lib/components/Spin.js +6 -1
  47. package/lib/components/Table.js +51 -1
  48. package/lib/components/Tooltip-123cc349.js +70 -0
  49. package/lib/components/Tooltip.js +7 -1
  50. package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
  51. package/lib/components/_rollupPluginBabelHelpers-a52356f6.js +142 -0
  52. package/lib/components/createSvgIcon-ad1104bb.js +576 -0
  53. package/lib/components/dataExport-04b77185.js +93 -0
  54. package/lib/components/debounce-127da66c.js +355 -0
  55. package/lib/components/defaultTheme-ed7746fe.js +1661 -0
  56. package/lib/components/globalConfig.js +175 -0
  57. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  58. package/lib/components/index-848f4409.js +61 -0
  59. package/lib/components/index-983dcd15.js +481 -0
  60. package/lib/components/isObjectLike-e111475d.js +190 -0
  61. package/lib/components/style-inject.es-1f59c1d0.js +28 -1
  62. package/lib/components/toConsumableArray-dbe8af76.js +19 -0
  63. package/lib/components/transform-3a04288b.js +5475 -0
  64. package/lib/components/withTheme-2d778133.js +6 -0
  65. package/lib/index.d.ts +2 -0
  66. package/lib/index.js +2 -0
  67. package/lib/utils/_rollupPluginBabelHelpers-8dd26e1a.js +121 -0
  68. package/lib/utils/arrayMerge.js +4953 -1
  69. package/lib/utils/chunkArray.js +15 -1
  70. package/lib/utils/convert2HtmlEntities.js +42 -1
  71. package/lib/utils/domToImage.js +802 -1
  72. package/lib/utils/downloadGephi.js +106 -1
  73. package/lib/utils/exportXlsx.js +219 -1
  74. package/lib/utils/historyAppendSearch.js +502 -1
  75. package/lib/utils/isDevelopMode.js +5 -1
  76. package/lib/utils/parseYMD.js +36 -1
  77. package/lib/utils/removeDuplicateItem.js +11 -1
  78. package/lib/utils/sendEmail.js +39 -1
  79. package/lib/utils/snaDefine-6a2bcd94.js +5 -0
  80. package/lib/utils/snaDefine.js +1 -1
  81. package/lib/utils/snaPreProcess.js +84 -1
  82. package/package.json +17 -21
  83. package/lib/components/Empty-54b79907.js +0 -1
  84. package/lib/components/KeywordSearch-5a393f12.js +0 -1
  85. package/lib/components/Select-f2441b83.js +0 -1
  86. package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
  87. package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
  88. package/lib/components/createSvgIcon-62b64929.js +0 -1
  89. package/lib/components/createSvgIcon-e24792d4.js +0 -1
  90. package/lib/components/createTheme-7fffa109.js +0 -1
  91. package/lib/components/dataExport-9fccd4f0.js +0 -1
  92. package/lib/components/debounce-c993109b.js +0 -1
  93. package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
  94. package/lib/components/index-11391ca3.js +0 -7
  95. package/lib/components/index-b2745105.js +0 -7
  96. package/lib/components/isObjectLike-2f1983fe.js +0 -1
  97. package/lib/components/style-inject.es-c875d022.js +0 -1
  98. package/lib/components/transform-0eb2d36e.js +0 -1
  99. package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
  100. package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
@@ -1 +1,122 @@
1
- import e from"react";import{c as t}from"./index-b2745105.js";import r from"prop-types";import{NavLink as a}from"react-router-dom";import{Typography as n,Breadcrumbs as o}from"@material-ui/core";import{s as c}from"./style-inject.es-1f59c1d0.js";c(".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");const i=r=>{let{className:a,icon:o,text:c,lastItem:i,onClick:s}=r;return e.createElement(n,{color:"textPrimary",className:a,onClick:s},e.createElement("div",{className:t("breadcrumbItem",{"breadcrumbItem--last":i})},o&&e.createElement("span",{className:"breadcrumbItem__icon"},o),e.createElement("span",{className:"breadcrumbItem__text"},c)))};i.defaultProps={className:void 0,icon:void 0,text:void 0,lastItem:void 0,onClick:()=>{}},i.propTypes={className:r.string,icon:r.node,text:r.string,lastItem:r.bool,onClick:r.func};c(".breadcrumbs__link {\n cursor: pointer;\n text-decoration: none !important; }\n");var s=function(r){var n=r.className,c=r.links,s=r.separator;return e.createElement(o,{className:t("breadcrumbs",n),"aria-label":"breadcrumb",separator:s&&s.length>0?s:void 0},Array.isArray(c)&&c.length>0&&c.map((function(t,r){var n=t.icon,o=t.text,s=t.href,m=t.onClick;return r===c.length-1?e.createElement(i,{key:r.toString(),lastItem:!0,icon:n,text:o,onClick:m}):0===r?e.createElement(a,{className:"breadcrumbs__link",key:r.toString(),to:s||"/",onClick:m},e.createElement(i,{icon:n,text:o})):s?e.createElement(a,{className:"breadcrumbs__link",key:r.toString(),to:s,onClick:m},e.createElement(i,{icon:n,text:o})):e.createElement(i,{key:r.toString(),lastItem:!0,icon:n,text:o,onClick:m})})))};s.defaultProps={className:void 0,links:void 0,separator:void 0},s.propTypes={className:r.string,links:r.arrayOf(r.any),separator:r.string};export{s as default};
1
+ import React__default from 'react';
2
+ import { c as classNames } from './index-848f4409.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-848f4409.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 };
@@ -1 +1,6 @@
1
- import e from"react";import o from"prop-types";import{c as n}from"./index-b2745105.js";import{Button as t,CircularProgress as i}from"@material-ui/core";import{s as a}from"./style-inject.es-1f59c1d0.js";a(".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");var r=function(o){var a=o.style,r=o.className,d=o.tabIndex,l=o.alt,s=o.text,c=o.size,f=o.variant,p=o.type,m=o.color,b=o.loading,u=o.disabled,v=o.icon,y=o.endIcon,x=o.children,g=o.onClick;return e.createElement(t,{style:a,className:n("button",r),tabIndex:d,alt:l,size:c,variant:f,color:p||m,disabled:b||u,onClick:g,startIcon:v,endIcon:b?e.createElement(i,{size:16}):y},s,x)};r.defaultProps={style:void 0,className:void 0,tabIndex:void 0,alt:void 0,text:void 0,loading:!1,disabled:!1,variant:void 0,size:"small",color:"primary",type:void 0,children:void 0,icon:void 0,endIcon:void 0,onClick:function(){}},r.propTypes={style:o.objectOf(o.any),className:o.string,tabIndex:o.number,alt:o.string,text:o.string,loading:o.bool,disabled:o.bool,variant:o.oneOf(["contained","outlined","text"]),size:o.oneOf(["small","medium","large"]),color:o.oneOf(["default","inherit","primary","secondary"]),type:o.oneOf(["default","inherit","primary","secondary"]),children:o.node,icon:o.node,endIcon:o.node,onClick:o.func};export{r as default};
1
+ export { B as default } from './Button-611f1770.js';
2
+ import 'react';
3
+ import 'prop-types';
4
+ import './index-848f4409.js';
5
+ import '@material-ui/core';
6
+ import './style-inject.es-1f59c1d0.js';