diginet-core-ui 1.3.65 → 1.3.66

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 (97) hide show
  1. package/components/button/index.js +13 -14
  2. package/components/button/more.js +16 -16
  3. package/components/button/ripple-effect.js +2 -0
  4. package/components/card/card.js +30 -28
  5. package/components/card/index.js +1 -0
  6. package/components/chart/Pie/Circle.js +2 -1
  7. package/components/chart/Pie-v2/Circle.js +4 -5
  8. package/components/chart/Pie-v2/Sector.js +21 -27
  9. package/components/chart/Pie-v2/Sectors.js +16 -15
  10. package/components/chart/Pie-v2/index.js +141 -16
  11. package/components/chart/bar/Bar.js +20 -18
  12. package/components/chart/bar/Labels.js +20 -18
  13. package/components/chart/bar/index.js +3 -2
  14. package/components/chart/bar-v2/Bar.js +23 -21
  15. package/components/chart/bar-v2/Labels.js +21 -19
  16. package/components/chart/bar-v2/index.js +3 -2
  17. package/components/chart/line/Labels.js +21 -18
  18. package/components/chart/line/Path.js +7 -6
  19. package/components/chart/line/Point.js +2 -0
  20. package/components/chart/line/Title.js +1 -2
  21. package/components/chart/line/index.js +22 -1
  22. package/components/chart/line-v2/Labels.js +21 -18
  23. package/components/chart/line-v2/Path.js +15 -14
  24. package/components/chart/line-v2/Point.js +4 -2
  25. package/components/chart/line-v2/Title.js +1 -2
  26. package/components/chart/line-v2/index.js +8 -7
  27. package/components/check-text/index.js +22 -21
  28. package/components/chip/attach.js +8 -8
  29. package/components/form-control/calendar/index.js +17 -17
  30. package/components/form-control/calendar/range.js +33 -33
  31. package/components/form-control/dropdown/index.js +2 -1
  32. package/components/form-control/form/index.js +1 -0
  33. package/components/form-control/input-base/index.js +39 -30
  34. package/components/form-control/label/index.js +67 -43
  35. package/components/form-control/number-input/index.js +16 -29
  36. package/components/form-control/phone-input/index.js +20 -34
  37. package/components/form-control/text-input/index.js +9 -6
  38. package/components/form-control/time-picker/index.js +2 -1
  39. package/components/form-control/time-picker/swiper.js +80 -76
  40. package/components/form-view/helper-text.js +1 -0
  41. package/components/grid/Col.js +1 -1
  42. package/components/index.js +4 -1
  43. package/components/modal/index.js +1 -0
  44. package/components/others/extra/index.js +2 -0
  45. package/components/others/scrollbar/index.js +25 -26
  46. package/components/popover/body.js +74 -0
  47. package/components/popover/footer.js +76 -0
  48. package/components/popover/header.js +79 -0
  49. package/components/popover/index.js +119 -86
  50. package/components/popup/danger_popup.js +3 -1
  51. package/components/popup/index.js +2 -2
  52. package/components/popup/proposals_popup.js +1 -0
  53. package/components/progress/circular.js +14 -12
  54. package/components/status/index.js +92 -89
  55. package/components/tooltip/index.js +8 -3
  56. package/components/transfer/index.js +86 -94
  57. package/icons/effect.js +32 -34
  58. package/icons/general/clock/clock.js +1 -0
  59. package/icons/general/color-handler/background.js +1 -0
  60. package/icons/general/color-handler/text.js +1 -0
  61. package/icons/general/emoji/emoji.js +1 -0
  62. package/icons/general/font-properties/bold.js +1 -0
  63. package/icons/general/font-properties/font-family.js +1 -0
  64. package/icons/general/font-properties/font-size.js +1 -0
  65. package/icons/general/font-properties/italic.js +1 -0
  66. package/icons/general/font-properties/underline.js +1 -0
  67. package/icons/general/hyperlink/hyperlink.js +1 -0
  68. package/icons/general/indent/decrease.js +1 -0
  69. package/icons/general/indent/increase.js +1 -0
  70. package/icons/general/list/bullets.js +1 -0
  71. package/icons/general/list/numbering.js +1 -0
  72. package/icons/general/picture/picture.js +1 -0
  73. package/icons/general/steps/redo.js +1 -0
  74. package/icons/general/steps/undo.js +1 -0
  75. package/icons/general/text-align/center.js +1 -0
  76. package/icons/general/text-align/justify.js +1 -0
  77. package/icons/general/text-align/left.js +1 -0
  78. package/icons/general/text-align/right.js +1 -0
  79. package/icons/menu/dhr.js +2 -1
  80. package/icons/menu/erp.js +1 -0
  81. package/package.json +1 -1
  82. package/readme.md +15 -0
  83. package/styles/animation.js +2 -1
  84. package/styles/color-helper.js +108 -106
  85. package/styles/font.js +5 -4
  86. package/theme/index.js +1 -3
  87. package/theme/make-styles.js +25 -105
  88. package/theme/theme-provider.js +0 -9
  89. package/utils/console.js +0 -1
  90. package/utils/error/error.js +2 -3
  91. package/utils/index.js +0 -1
  92. package/utils/promisify.js +2 -1
  93. package/utils/renderIcon.js +13 -11
  94. package/styles/media-queries.js +0 -10
  95. package/theme/with-styles.js +0 -15
  96. package/theme/with-theme.js +0 -9
  97. package/utils/number.js +0 -63
package/utils/index.js CHANGED
@@ -7,7 +7,6 @@ export * from './date';
7
7
  export { default as date } from './date';
8
8
  export { default as getFileType } from './getFileType';
9
9
  export { default as mapParent } from './map-parent';
10
- export { default as numberFormat } from './number';
11
10
  export { default as parseTextToHTML } from './parseHTML';
12
11
  export { default as promisify } from './promisify';
13
12
  export { default as randomString } from './randomString';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-undef */
1
2
  const slice = Array.prototype.slice;
2
3
  let Promise;
3
4
 
@@ -19,7 +20,7 @@ function promisify(func) {
19
20
  return func.apply(ctx, args);
20
21
  } else {
21
22
  return new Promise(function (resolve, reject) {
22
- args.push(function (err, result) {
23
+ args.push(function (err) {
23
24
  if (err) {
24
25
  reject(err);
25
26
  } else {
@@ -5,25 +5,27 @@ import { jsx } from '@emotion/core';
5
5
  import { ButtonIcon } from '../components';
6
6
  import * as Icons from '../icons';
7
7
  import { parseTextToHTML, capitalize } from './';
8
- /**
9
- * render icon form source (dynamic type)
10
- * @param {String|jsx} source data of icon, maybe svg text | image link | name of icon in icons store or a jsx element
11
- * @param {String} type text to parse text to HTML, img link to use img tag, name to use icon form icons store
12
- * @param {Object} options properties of Icon component if us type is name {width, height, color, viewBox, ...}
8
+ /**
9
+ * render icon form source (dynamic type)
10
+ * @param {String|jsx} source data of icon, maybe svg text | image link | name of icon in icons store or a jsx element
11
+ * @param {String} type text to parse text to HTML, img link to use img tag, name to use icon form icons store
12
+ * @param {Object} options properties of Icon component if us type is name {width, height, color, viewBox, ...}
13
13
  */
14
14
 
15
15
  const renderIcon = (source, type, options = {}) => {
16
16
  if (typeof source === 'string') {
17
17
  switch (type) {
18
18
  case 'name':
19
- let IconComp = Icons[capitalize(source)];
19
+ {
20
+ let IconComp = Icons[capitalize(source)];
20
21
 
21
- if (IconComp) {
22
- return jsx(IconComp, { ...options
23
- });
24
- }
22
+ if (IconComp) {
23
+ return jsx(IconComp, { ...options
24
+ });
25
+ }
25
26
 
26
- return null;
27
+ return null;
28
+ }
27
29
 
28
30
  case 'effect':
29
31
  return jsx(ButtonIcon, {
@@ -1,10 +0,0 @@
1
- const breakpoints = {
2
- "xs": 0,
3
- "sm": 576,
4
- "md": 768,
5
- "lg": 992,
6
- "xl": 1200,
7
- "xxl": 1400
8
- };
9
-
10
- const mq = n => `@media (min-width: ${breakpoints[n]}px)`;
@@ -1,15 +0,0 @@
1
- /** @jsxRuntime classic */
2
-
3
- /** @jsx jsx */
4
- import { jsx } from '@emotion/core';
5
- import makeStyles from './make-styles';
6
-
7
- const WithStyles = styles => Component => props => {
8
- const useStyle = makeStyles(styles);
9
- const classes = useStyle();
10
- return jsx(Component, { ...props,
11
- classes: classes
12
- });
13
- };
14
-
15
- export default WithStyles;
@@ -1,9 +0,0 @@
1
- import settings from './settings';
2
-
3
- const withTheme = Component => props => {
4
- return /*#__PURE__*/React.createElement(Component, { ...props,
5
- theme: settings
6
- });
7
- };
8
-
9
- export default withTheme;
package/utils/number.js DELETED
@@ -1,63 +0,0 @@
1
- /**
2
- *
3
- * @param {String} value
4
- * @param {String} format
5
- */
6
- export default function numberFormat(value, format) {
7
- let hashCount = 0;
8
- let a = '';
9
-
10
- for (let i = 0, ln = format.length; i < ln; i++) {
11
- if (format[i] === '.') {
12
- format1 = format.split('.');
13
- console.log(format1);
14
-
15
- if (format1 = format.split('.').length === 3) {
16
- console.log('a');
17
- } else {
18
- hashCount = format1[1].length;
19
-
20
- switch (hashCount) {
21
- case 3:
22
- a = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
23
- break;
24
-
25
- case 2:
26
- a = value.toString().replace(/\B(?=(\d{2})+(?!\d))/g, ',');
27
- break;
28
-
29
- default:
30
- return 'Invalid format';
31
- }
32
-
33
- return a;
34
- }
35
- }
36
-
37
- if (format[i] === ' ') {
38
- const formatArray = format.split('#').filter(str => str !== '');
39
- let start = 0;
40
- let numStr = '';
41
-
42
- for (let i = 0, ln = format.length; i <= ln; i++) {
43
- const part = formatArray[i] || ''; //if i is the last fragment take the index of end of the value
44
- //For case like +1 (911) 911 91 91 having pattern +1 (###) ### ## ##
45
-
46
- const index = i === ln ? value.length : value.indexOf(part, start);
47
- /* in any case if we don't find the pattern part in the value assume the val as numeric string
48
- This will be also in case if user has started typing, in any other case it will not be -1
49
- unless wrong prop value is provided */
50
-
51
- if (index === -1) {
52
- numStr = value;
53
- break;
54
- } else {
55
- numStr += val.substring(start, index);
56
- start = index + part.length;
57
- }
58
- }
59
-
60
- return (numStr.toString() || []).replace(/\B(?=(\d{4})+(?!\d))/g, ' ');
61
- }
62
- }
63
- }