@daoyi/nmtl-ui 2.0.1-beta.13 → 2.0.1-beta.130

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 (104) hide show
  1. package/lib/components/Autocomplete-3b418e5f.js +494 -0
  2. package/lib/components/Autocomplete.js +20 -1
  3. package/lib/components/Avatar.js +59 -1
  4. package/lib/components/BackTop.js +124 -1
  5. package/lib/components/BarChart.js +764 -1
  6. package/lib/components/Breadcrumbs.js +122 -1
  7. package/lib/components/Button-7bd5aa09.js +114 -0
  8. package/lib/components/Button.js +7 -1
  9. package/lib/components/Carousel.js +4654 -1
  10. package/lib/components/Checkbox.js +37 -1
  11. package/lib/components/CollapseContent.js +180 -1
  12. package/lib/components/ContactModal-7e5b14e8.js +12188 -0
  13. package/lib/components/ContactModal.js +24 -3
  14. package/lib/components/Drawer-629e59c7.js +176 -0
  15. package/lib/components/Drawer.js +17 -1
  16. package/lib/components/Dropdown.js +134 -1
  17. package/lib/components/Empty-c6a44967.js +46 -0
  18. package/lib/components/Empty.js +5 -1
  19. package/lib/components/ExportButton.js +128 -1
  20. package/lib/components/ExtraTools-2691c13e.js +3676 -0
  21. package/lib/components/ExtraTools.js +11 -22
  22. package/lib/components/Filter.js +821 -12
  23. package/lib/components/Footer.js +317 -1
  24. package/lib/components/ForwardLink-5fbd2705.js +184 -0
  25. package/lib/components/ForwardLink.js +10 -0
  26. package/lib/components/Header.js +233 -1
  27. package/lib/components/Image.js +61 -1
  28. package/lib/components/Input.js +89 -1
  29. package/lib/components/InputMethod.js +33949 -12
  30. package/lib/components/KeywordSearch-fec33a2c.js +156 -0
  31. package/lib/components/KeywordSearch.js +22 -1
  32. package/lib/components/KeywordTicker.js +224 -1
  33. package/lib/components/Keywords.js +383 -1
  34. package/lib/components/Loading.js +32 -1
  35. package/lib/components/MUITheme.js +2657 -1
  36. package/lib/components/Modal-e04532fa.js +127 -0
  37. package/lib/components/Modal.js +11 -1
  38. package/lib/components/MoreButton-19055e07.js +148 -0
  39. package/lib/components/MoreButton.js +8 -1
  40. package/lib/components/Pagination.js +3702 -0
  41. package/lib/components/Radio.js +83 -1
  42. package/lib/components/SNA.js +1755 -22
  43. package/lib/components/Select-cb3e1ba1.js +189 -0
  44. package/lib/components/Select.js +14 -1
  45. package/lib/components/Spin-8f87eadc.js +79 -0
  46. package/lib/components/Spin.js +7 -1
  47. package/lib/components/Table.js +51 -1
  48. package/lib/components/Tooltip-6ebfa9c1.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-e3803ee1.js +576 -0
  53. package/lib/components/dataExport-a9e3fae1.js +91 -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 +423 -0
  57. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  58. package/lib/components/index-b47819f3.js +481 -0
  59. package/lib/components/index-b76a85f4.js +61 -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-849a452c.js +5475 -0
  64. package/lib/components/useTheme-d16d02d9.js +11 -0
  65. package/lib/components/withTheme-2d778133.js +6 -0
  66. package/lib/configs/config.selector.js +151 -0
  67. package/lib/configs/index.d.ts +1 -0
  68. package/lib/configs/index.js +1 -0
  69. package/lib/index.d.ts +5 -1
  70. package/lib/index.js +5 -1
  71. package/lib/utils/_rollupPluginBabelHelpers-9802e640.js +121 -0
  72. package/lib/utils/arrayMerge.js +4953 -1
  73. package/lib/utils/chunkArray.js +15 -1
  74. package/lib/utils/convert2HtmlEntities.js +42 -1
  75. package/lib/utils/domToImage.js +802 -1
  76. package/lib/utils/downloadGephi.js +106 -1
  77. package/lib/utils/exportXlsx.js +221 -1
  78. package/lib/utils/historyAppendSearch.js +502 -1
  79. package/lib/utils/isDevelopMode.js +5 -1
  80. package/lib/utils/parseYMD.js +36 -1
  81. package/lib/utils/removeDuplicateItem.js +11 -1
  82. package/lib/utils/sendEmail.js +39 -1
  83. package/lib/utils/snaDefine-6a2bcd94.js +5 -0
  84. package/lib/utils/snaDefine.js +1 -1
  85. package/lib/utils/snaPreProcess.js +84 -1
  86. package/package.json +134 -128
  87. package/lib/components/Empty-54b79907.js +0 -1
  88. package/lib/components/KeywordSearch-5a393f12.js +0 -1
  89. package/lib/components/Select-f2441b83.js +0 -1
  90. package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
  91. package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
  92. package/lib/components/createSvgIcon-62b64929.js +0 -1
  93. package/lib/components/createSvgIcon-e24792d4.js +0 -1
  94. package/lib/components/createTheme-7fffa109.js +0 -1
  95. package/lib/components/dataExport-9fccd4f0.js +0 -1
  96. package/lib/components/debounce-c993109b.js +0 -1
  97. package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
  98. package/lib/components/index-11391ca3.js +0 -7
  99. package/lib/components/index-b2745105.js +0 -7
  100. package/lib/components/isObjectLike-2f1983fe.js +0 -1
  101. package/lib/components/style-inject.es-c875d022.js +0 -1
  102. package/lib/components/transform-95ae0119.js +0 -1
  103. package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
  104. 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-b76a85f4.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}\n.breadcrumbItem:hover {\n opacity: 1;\n}\n.breadcrumbItem--last {\n opacity: 1;\n font-weight: 500 !important;\n}\n.breadcrumbItem__icon {\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.breadcrumbItem__icon svg {\n font-size: 1.125rem;\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,114 @@
1
+ import { c as _objectWithoutProperties, _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
2
+ import React__default from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { c as classNames } from './index-b76a85f4.js';
5
+ import { Button as Button$1, CircularProgress } from '@material-ui/core';
6
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
+
8
+ 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}\n.button:hover {\n opacity: 0.9;\n}";
9
+ styleInject(css_248z);
10
+
11
+ var _excluded = ["style", "className", "tabIndex", "alt", "text", "size", "variant", "type", "color", "loading", "disabled", "icon", "endIcon", "children", "onClick"];
12
+ var Button = function Button(props) {
13
+ var style = props.style,
14
+ className = props.className,
15
+ tabIndex = props.tabIndex,
16
+ alt = props.alt,
17
+ text = props.text,
18
+ size = props.size,
19
+ variant = props.variant;
20
+ var type = props.type,
21
+ color = props.color,
22
+ loading = props.loading,
23
+ disabled = props.disabled,
24
+ icon = props.icon,
25
+ endIcon = props.endIcon,
26
+ children = props.children,
27
+ onClick = props.onClick;
28
+ /* 本元件原本逐一挑選 props,呼叫端傳入的 aria-*/title/role 會被靜默丟掉——
29
+ nmtl-web 有三處為了補可及名稱而傳 aria-label,其中 areaMap 那處自 80db4537
30
+ 起就一直沒有生效(WCAG 4.1.2,Freego HM1410200C)。
31
+ 把宣告過的 props 取出後,其餘一律往下傳。 */
32
+ props.style;
33
+ props.className;
34
+ props.tabIndex;
35
+ props.alt;
36
+ props.text;
37
+ props.size;
38
+ props.variant;
39
+ props.type;
40
+ props.color;
41
+ props.loading;
42
+ props.disabled;
43
+ props.icon;
44
+ props.endIcon;
45
+ props.children;
46
+ props.onClick;
47
+ var rest = _objectWithoutProperties(props, _excluded);
48
+ return /*#__PURE__*/React__default.createElement(Button$1, _extends({}, rest, {
49
+ style: style,
50
+ className: classNames('button', className),
51
+ tabIndex: tabIndex,
52
+ alt: alt,
53
+ size: size,
54
+ variant: variant,
55
+ color: type || color,
56
+ disabled: loading || disabled,
57
+ onClick: onClick,
58
+ startIcon: icon,
59
+ endIcon: loading ? /*#__PURE__*/React__default.createElement(CircularProgress, {
60
+ size: 16
61
+ }) : endIcon
62
+ }), text, children);
63
+ };
64
+ Button.defaultProps = {
65
+ style: undefined,
66
+ className: undefined,
67
+ tabIndex: undefined,
68
+ alt: undefined,
69
+ text: undefined,
70
+ loading: false,
71
+ disabled: false,
72
+ variant: undefined,
73
+ size: 'small',
74
+ color: 'primary',
75
+ type: undefined,
76
+ children: undefined,
77
+ icon: undefined,
78
+ endIcon: undefined,
79
+ onClick: function onClick() {}
80
+ };
81
+ Button.propTypes = {
82
+ /** 樣式 */
83
+ style: PropTypes.objectOf(PropTypes.any),
84
+ /** Css Name */
85
+ className: PropTypes.string,
86
+ /** Tab 鍵位置 */
87
+ tabIndex: PropTypes.number,
88
+ /** 註解 */
89
+ alt: PropTypes.string,
90
+ /** 輸入的文字 */
91
+ text: PropTypes.string,
92
+ /** 是否載入中 */
93
+ loading: PropTypes.bool,
94
+ /** 是否禁用 */
95
+ disabled: PropTypes.bool,
96
+ /** 按鈕種類 */
97
+ variant: PropTypes.oneOf(['contained', 'outlined', 'text']),
98
+ /** 按鈕的大小 */
99
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
100
+ /** 按鈕顏色 */
101
+ color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),
102
+ /** 按鈕樣式(同按鈕顏色) */
103
+ type: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),
104
+ /** 按鈕內容 */
105
+ children: PropTypes.node,
106
+ /** 按鈕圖案(前面) */
107
+ icon: PropTypes.node,
108
+ /** 按鈕圖案(後面) */
109
+ endIcon: PropTypes.node,
110
+ /** 點擊後的返回 */
111
+ onClick: PropTypes.func
112
+ };
113
+
114
+ export { Button as B };
@@ -1 +1,7 @@
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-7bd5aa09.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
+ import 'react';
4
+ import 'prop-types';
5
+ import './index-b76a85f4.js';
6
+ import '@material-ui/core';
7
+ import './style-inject.es-1f59c1d0.js';