@daoyi/nmtl-ui 2.0.1-beta.59 → 2.0.1-beta.60

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 (59) hide show
  1. package/lib/components/{Autocomplete-ed66ea1e.js → Autocomplete-d826e57f.js} +64 -69
  2. package/lib/components/Autocomplete.js +4 -4
  3. package/lib/components/Avatar.js +5 -3
  4. package/lib/components/BackTop.js +4 -4
  5. package/lib/components/BarChart.js +1 -1
  6. package/lib/components/Breadcrumbs.js +1 -1
  7. package/lib/components/{Button-3d002693.js → Button-433372aa.js} +1 -1
  8. package/lib/components/Button.js +2 -2
  9. package/lib/components/Carousel.js +2 -2
  10. package/lib/components/Checkbox.js +1 -1
  11. package/lib/components/CollapseContent.js +3 -3
  12. package/lib/components/{ContactModal-5af70002.js → ContactModal-aabf02d5.js} +5 -5
  13. package/lib/components/ContactModal.js +10 -10
  14. package/lib/components/{Drawer-47f9967c.js → Drawer-bfcfd292.js} +2 -2
  15. package/lib/components/Drawer.js +5 -5
  16. package/lib/components/Dropdown.js +2 -2
  17. package/lib/components/{Empty-b674a51e.js → Empty-7318f658.js} +1 -1
  18. package/lib/components/Empty.js +2 -2
  19. package/lib/components/ExportButton.js +3 -3
  20. package/lib/components/{ExtraTools-97665703.js → ExtraTools-aa5bc12d.js} +4 -4
  21. package/lib/components/ExtraTools.js +5 -5
  22. package/lib/components/Filter.js +3 -3
  23. package/lib/components/Footer.js +10 -10
  24. package/lib/components/{ForwardLink-02ae24fb.js → ForwardLink-2912e106.js} +2 -2
  25. package/lib/components/ForwardLink.js +3 -3
  26. package/lib/components/Header.js +7 -7
  27. package/lib/components/Image.js +2 -2
  28. package/lib/components/Input.js +1 -1
  29. package/lib/components/InputMethod.js +2 -2
  30. package/lib/components/{KeywordSearch-52526414.js → KeywordSearch-4b7ace9c.js} +3 -3
  31. package/lib/components/KeywordSearch.js +5 -5
  32. package/lib/components/KeywordTicker.js +4 -4
  33. package/lib/components/Keywords.js +7 -7
  34. package/lib/components/Loading.js +1 -1
  35. package/lib/components/MUITheme.js +3 -6
  36. package/lib/components/{Modal-1e6d1b61.js → Modal-64c4ab0d.js} +3 -3
  37. package/lib/components/Modal.js +4 -4
  38. package/lib/components/{MoreButton-a001648b.js → MoreButton-6654cc5b.js} +1 -1
  39. package/lib/components/MoreButton.js +2 -2
  40. package/lib/components/NmtlPagination.js +3702 -0
  41. package/lib/components/Radio.js +1 -1
  42. package/lib/components/SNA.js +5 -5
  43. package/lib/components/{Select-a607a0d4.js → Select-f3014e5a.js} +3 -3
  44. package/lib/components/Select.js +4 -4
  45. package/lib/components/{Spin-a5ff6ede.js → Spin-8a5a600d.js} +1 -1
  46. package/lib/components/Spin.js +2 -2
  47. package/lib/components/Table.js +1 -1
  48. package/lib/components/{Tooltip-f1cd39ef.js → Tooltip-fdee6235.js} +2 -2
  49. package/lib/components/Tooltip.js +3 -3
  50. package/lib/components/{_rollupPluginBabelHelpers-7eb4ffba.js → _rollupPluginBabelHelpers-a52356f6.js} +1 -1
  51. package/lib/components/{createSvgIcon-b7f70edc.js → createSvgIcon-db8e8306.js} +2 -2
  52. package/lib/components/{dataExport-04b77185.js → dataExport-d55d6fa3.js} +30 -31
  53. package/lib/components/{defaultTheme-19a14721.js → defaultTheme-5839b9b3.js} +21 -1
  54. package/lib/components/withTheme-4417822c.js +6 -0
  55. package/lib/index.d.ts +1 -0
  56. package/lib/index.js +1 -0
  57. package/package.json +1 -1
  58. /package/lib/components/{index-8aa477f6.js → index-66babe67.js} +0 -0
  59. /package/lib/components/{index-b1cfc87c.js → index-fdcc884e.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { RadioGroup, FormControlLabel, Radio as Radio$1 } from '@material-ui/core';
@@ -1,14 +1,14 @@
1
1
  import React__default, { useMemo, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { c as classNames } from './index-8aa477f6.js';
3
+ import { c as classNames } from './index-66babe67.js';
4
4
  import { e as event, d as d3Select, a as dispatch, c as customEvent, D as DragEvent, q as quadtree, m as map, t as timer, T as Transform, i as identity, b as interrupt, o as ordinal, f as category10 } from './transform-3a04288b.js';
5
- import { E as ExtraTools } from './ExtraTools-97665703.js';
5
+ import { E as ExtraTools } from './ExtraTools-aa5bc12d.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
7
+ import './_rollupPluginBabelHelpers-a52356f6.js';
8
8
  import './_commonjsHelpers-70de2c37.js';
9
9
  import '@material-ui/core';
10
- import './Tooltip-f1cd39ef.js';
11
- import './dataExport-04b77185.js';
10
+ import './Tooltip-fdee6235.js';
11
+ import './dataExport-d55d6fa3.js';
12
12
 
13
13
  function sourceEvent() {
14
14
  var current = event, source;
@@ -1,9 +1,9 @@
1
- import { b as _objectSpread2, _ as _typeof } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { b as _objectSpread2, d as _typeof } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { c as classNames } from './index-8aa477f6.js';
4
+ import { c as classNames } from './index-66babe67.js';
5
5
  import { FormControl, Select as Select$1, CircularProgress, MenuItem } from '@material-ui/core';
6
- import { E as Empty } from './Empty-b674a51e.js';
6
+ import { E as Empty } from './Empty-7318f658.js';
7
7
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
8
8
 
9
9
  var css_248z = ".select__placeholder {\n color: #999; }\n\n.select--small {\n width: 100%; }\n .select--small .MuiSelect-root {\n padding: 0.5rem 1.5rem 0.25rem;\n color: white; }\n .select--small .MuiSelect-root .select__placeholder {\n color: white; }\n .select--small .MuiSelect-root:hover, .select--small .MuiSelect-root:focus {\n background: transparent; }\n .select--small .MuiSvgIcon-root {\n color: white; }\n .select--small .MuiOutlinedInput-root {\n border-radius: 45px; }\n";
@@ -1,8 +1,8 @@
1
- export { S as default } from './Select-a607a0d4.js';
2
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ export { S as default } from './Select-f3014e5a.js';
2
+ import './_rollupPluginBabelHelpers-a52356f6.js';
3
3
  import 'react';
4
4
  import 'prop-types';
5
- import './index-8aa477f6.js';
5
+ import './index-66babe67.js';
6
6
  import '@material-ui/core';
7
- import './Empty-b674a51e.js';
7
+ import './Empty-7318f658.js';
8
8
  import './style-inject.es-1f59c1d0.js';
@@ -1,6 +1,6 @@
1
1
  import React__default, { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { c as classNames } from './index-8aa477f6.js';
3
+ import { c as classNames } from './index-66babe67.js';
4
4
  import { Fade, CircularProgress } from '@material-ui/core';
5
5
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
6
6
 
@@ -1,6 +1,6 @@
1
- export { S as default } from './Spin-a5ff6ede.js';
1
+ export { S as default } from './Spin-8a5a600d.js';
2
2
  import 'react';
3
3
  import 'prop-types';
4
- import './index-8aa477f6.js';
4
+ import './index-66babe67.js';
5
5
  import '@material-ui/core';
6
6
  import './style-inject.es-1f59c1d0.js';
@@ -1,4 +1,4 @@
1
- import { d as _objectWithoutProperties } from './_rollupPluginBabelHelpers-7eb4ffba.js';
1
+ import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
2
2
  import React__default from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { TableContainer, Paper, Table as Table$1, TableHead, TableRow, TableCell, TableBody } from '@material-ui/core';
@@ -1,8 +1,8 @@
1
1
  import React__default from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Tooltip as Tooltip$1 } from '@material-ui/core';
4
- import { a as _extends } from './_rollupPluginBabelHelpers-7eb4ffba.js';
5
- import { c as classNames } from './index-8aa477f6.js';
4
+ import { _ as _extends } from './_rollupPluginBabelHelpers-a52356f6.js';
5
+ import { c as classNames } from './index-66babe67.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
7
 
8
8
  const TooltipContent = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement("div", _extends({}, props, {
@@ -1,7 +1,7 @@
1
- export { T as default, p as placements } from './Tooltip-f1cd39ef.js';
1
+ export { T as default, p as placements } from './Tooltip-fdee6235.js';
2
2
  import 'react';
3
3
  import 'prop-types';
4
4
  import '@material-ui/core';
5
- import './_rollupPluginBabelHelpers-7eb4ffba.js';
6
- import './index-8aa477f6.js';
5
+ import './_rollupPluginBabelHelpers-a52356f6.js';
6
+ import './index-66babe67.js';
7
7
  import './style-inject.es-1f59c1d0.js';
@@ -139,4 +139,4 @@ function _nonIterableRest() {
139
139
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
140
140
  }
141
141
 
142
- export { _typeof as _, _extends as a, _objectSpread2 as b, _slicedToArray as c, _objectWithoutProperties as d, _defineProperty as e, _taggedTemplateLiteral as f };
142
+ export { _extends as _, _slicedToArray as a, _objectSpread2 as b, _objectWithoutProperties as c, _typeof as d, _defineProperty as e, _taggedTemplateLiteral as f };
@@ -1,5 +1,5 @@
1
1
  import { g as getAugmentedNamespace } from './_commonjsHelpers-70de2c37.js';
2
- import { f as formatMuiErrorMessage, _ as _extends, d as defaultTheme, a as _objectWithoutProperties } from './defaultTheme-19a14721.js';
2
+ import { f as formatMuiErrorMessage, _ as _extends, d as defaultTheme, a as _objectWithoutProperties } from './defaultTheme-5839b9b3.js';
3
3
  import 'prop-types';
4
4
  import 'react-is';
5
5
  import * as React from 'react';
@@ -573,4 +573,4 @@ function requireCreateSvgIcon () {
573
573
  return createSvgIcon$1;
574
574
  }
575
575
 
576
- export { interopRequireWildcard as a, interopRequireDefault as i, requireCreateSvgIcon as r };
576
+ export { interopRequireWildcard as a, useEventCallback as b, clsx as c, useIsFocusVisible as d, useForkRef as e, createSvgIcon as f, capitalize as g, debounce as h, interopRequireDefault as i, requireCreateSvgIcon as r, useControlled as u, withStyles as w };
@@ -34,57 +34,56 @@ var fileDownload = function(data, filename, mime, bom) {
34
34
  }
35
35
  };
36
36
 
37
- var jsonExcel = function jsonExcel(json) {
38
- var output = '';
37
+ const jsonExcel = json => {
38
+ let output = '';
39
39
  if (Array.isArray(json) && json.length > 0) {
40
- var keys = Object.keys(json[0]);
41
- output += "".concat(keys.toString(), "\n");
42
- json.forEach(function (item) {
43
- keys.forEach(function (key) {
44
- output += "".concat(item[key], ",");
40
+ const keys = Object.keys(json[0]);
41
+ output += `${keys.toString()}\n`;
42
+ json.forEach(item => {
43
+ keys.forEach(key => {
44
+ output += `${item[key]},`;
45
45
  });
46
46
  output += '\n';
47
47
  });
48
48
  } else {
49
- var _keys = Object.keys(json);
50
- output += "".concat(_keys.toString(), "\n");
51
- _keys.forEach(function (key) {
52
- output += "".concat(json[key], ",");
49
+ const keys = Object.keys(json);
50
+ output += `${keys.toString()}\n`;
51
+ keys.forEach(key => {
52
+ output += `${json[key]},`;
53
53
  });
54
54
  output += '\n';
55
55
  }
56
56
  return output;
57
57
  };
58
- var jsonTxt = function jsonTxt(json) {
59
- var output = '';
58
+ const jsonTxt = json => {
59
+ let output = '';
60
60
  if (Array.isArray(json) && json.length > 0) {
61
- var keys = Object.keys(json[0]);
62
- json.forEach(function (item, index) {
63
- output += "(".concat(index + 1, ")\n");
64
- keys.forEach(function (key) {
65
- output += "".concat(key, ": ").concat(item[key], "\n");
61
+ const keys = Object.keys(json[0]);
62
+ json.forEach((item, index) => {
63
+ output += `(${index + 1})\n`;
64
+ keys.forEach(key => {
65
+ output += `${key}: ${item[key]}\n`;
66
66
  });
67
67
  output += '\n';
68
68
  });
69
69
  } else {
70
- var _keys2 = Object.keys(json);
71
- _keys2.forEach(function (key) {
72
- output += "".concat(key, ": ").concat(json[key], "\n");
70
+ const keys = Object.keys(json);
71
+ keys.forEach(key => {
72
+ output += `${key}: ${json[key]}\n`;
73
73
  });
74
74
  }
75
75
  return output;
76
76
  };
77
- var snaToExcel = function snaToExcel(data) {
78
- var _ref = data || {},
79
- links = _ref.links,
80
- nodes = _ref.nodes;
77
+ const snaToExcel = data => {
78
+ const {
79
+ links,
80
+ nodes
81
+ } = data || {};
81
82
  if (links && links.length > 0) {
82
- var result = links.map(function (link) {
83
- return {
84
- From: nodes[link.source].name,
85
- To: nodes[link.target].name
86
- };
87
- });
83
+ const result = links.map(link => ({
84
+ From: nodes[link.source].name,
85
+ To: nodes[link.target].name
86
+ }));
88
87
  return result;
89
88
  }
90
89
  return [];
@@ -521,6 +521,26 @@ function getLuminance(color) {
521
521
 
522
522
  return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
523
523
  }
524
+ /**
525
+ * Set the absolute transparency of a color.
526
+ * Any existing alpha value is overwritten.
527
+ *
528
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
529
+ * @param {number} value - value to set the alpha channel to in the range 0-1
530
+ * @returns {string} A CSS color string. Hex input values are returned as rgb
531
+ */
532
+
533
+ function alpha(color, value) {
534
+ color = decomposeColor(color);
535
+ value = clamp(value);
536
+
537
+ if (color.type === 'rgb' || color.type === 'hsl') {
538
+ color.type += 'a';
539
+ }
540
+
541
+ color.values[3] = value;
542
+ return recomposeColor(color);
543
+ }
524
544
  /**
525
545
  * Darkens a color.
526
546
  *
@@ -1482,4 +1502,4 @@ function createTheme() {
1482
1502
 
1483
1503
  var defaultTheme = createTheme();
1484
1504
 
1485
- export { _extends as _, _objectWithoutProperties as a, createTheme as c, defaultTheme as d, formatMuiErrorMessage as f };
1505
+ export { _extends as _, _objectWithoutProperties as a, _objectWithoutPropertiesLoose as b, alpha as c, defaultTheme as d, createTheme as e, formatMuiErrorMessage as f };
@@ -0,0 +1,6 @@
1
+ import { withThemeCreator } from '@material-ui/styles';
2
+ import { d as defaultTheme } from './defaultTheme-5839b9b3.js';
3
+
4
+ withThemeCreator({
5
+ defaultTheme: defaultTheme
6
+ });
package/lib/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export { default as ExportButton } from './components/ExportButton';
22
22
  export { default as SNA } from './components/SNA';
23
23
  export { default as BarChart } from './components/BarChart';
24
24
  export { default as ForwardLink } from './components/ForwardLink';
25
+ export { default as NmtlPagination } from './components/NmtlPagination';
25
26
 
26
27
  export { default as ContactModal } from './components/ContactModal';
27
28
  export { default as KeywordSearch } from './components/KeywordSearch';
package/lib/index.js CHANGED
@@ -22,6 +22,7 @@ export { default as ExportButton } from './components/ExportButton';
22
22
  export { default as SNA } from './components/SNA';
23
23
  export { default as BarChart } from './components/BarChart';
24
24
  export { default as ForwardLink } from './components/ForwardLink';
25
+ export { default as NmtlPagination } from './components/NmtlPagination';
25
26
 
26
27
  export { default as ContactModal } from './components/ContactModal';
27
28
  export { default as KeywordSearch } from './components/KeywordSearch';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daoyi/nmtl-ui",
3
- "version": "2.0.1-beta.59",
3
+ "version": "2.0.1-beta.60",
4
4
  "description": "This project is to be used as a starter kit for building React component using Storybook and Rollup",
5
5
  "author": "daoyi",
6
6
  "main": "lib/index.js",