diginet-core-ui 1.3.24 → 1.3.29

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 (153) hide show
  1. package/assets/fonts/SF-Pro-Display-Bold.otf +0 -0
  2. package/assets/fonts/SF-Pro-Display-Medium.otf +0 -0
  3. package/assets/fonts/SF-Pro-Display-Regular.otf +0 -0
  4. package/assets/images/icons/wifi.svg +3 -0
  5. package/assets/images/menu/dhr/MHRM09N0004.svg +14 -0
  6. package/assets/images/menu/dhr/MHRP09N0028.svg +6 -0
  7. package/assets/images/menu/dhr/MHRP09N0029.svg +14 -0
  8. package/assets/images/menu/dhr/MHRP09N0030.svg +4 -0
  9. package/assets/images/menu/dhr/MHRP09N0031.svg +5 -0
  10. package/assets/images/menu/dhr/MHRP29N0012.svg +7 -0
  11. package/assets/images/menu/dhr/MHRP29N0021.svg +8 -0
  12. package/assets/images/menu/dhr/MHRP29N0022.svg +9 -0
  13. package/assets/images/menu/dhr/MHRP29N0023.svg +22 -0
  14. package/assets/images/menu/dhr/MHRP39N0015.svg +5 -0
  15. package/assets/images/menu/dhr/TASK.svg +9 -0
  16. package/assets/images/menu/erp/D05.svg +8 -0
  17. package/assets/images/menu/erp/D06.svg +4 -0
  18. package/assets/images/menu/erp/D90R.svg +9 -0
  19. package/assets/images/menu/erp/DBC.svg +9 -0
  20. package/assets/images/menu/erp/{W05F0006.svg → W05F0006N0000.svg} +0 -0
  21. package/assets/images/menu/erp/{W05F0008.svg → W05F0008N0000.svg} +0 -0
  22. package/assets/images/menu/erp/{W05F4000.svg → W05F4000N0000.svg} +0 -0
  23. package/assets/images/menu/erp/{W06F0005.svg → W06F0005N0000.svg} +0 -0
  24. package/assets/images/menu/erp/{W06F0006.svg → W06F0006N0000.svg} +0 -0
  25. package/assets/images/menu/erp/{W06F0008.svg → W06F0008N0000.svg} +0 -0
  26. package/assets/images/menu/erp/W94F1000N0000.svg +9 -0
  27. package/assets/images/menu/erp/W94F1000N0001.svg +9 -0
  28. package/components/accordion/css.js +42 -33
  29. package/components/accordion/details.js +29 -17
  30. package/components/accordion/group.js +23 -23
  31. package/components/accordion/index.js +36 -27
  32. package/components/accordion/summary.js +10 -11
  33. package/components/alert/index.js +97 -91
  34. package/components/alert/notify.js +10 -8
  35. package/components/avatar/index.js +19 -17
  36. package/components/badge/index.js +122 -139
  37. package/components/button/icon.js +242 -334
  38. package/components/button/index.js +272 -427
  39. package/components/button/more.js +4 -5
  40. package/components/button/ripple-effect.js +4 -6
  41. package/components/card/body-card.js +4 -6
  42. package/components/card/card.js +4 -8
  43. package/components/card/index.js +4 -5
  44. package/components/chart/Pie/Sector.js +4 -5
  45. package/components/chart/Pie/Sectors.js +5 -5
  46. package/components/chart/Pie/index.js +8 -9
  47. package/components/chart/Pie-v2/Sector.js +4 -5
  48. package/components/chart/Pie-v2/Sectors.js +7 -8
  49. package/components/chart/Pie-v2/index.js +11 -16
  50. package/components/chart/bar/Bar.js +2 -3
  51. package/components/chart/bar/Labels.js +9 -11
  52. package/components/chart/bar/index.js +17 -9
  53. package/components/chart/bar-v2/Bar.js +2 -3
  54. package/components/chart/bar-v2/Labels.js +9 -11
  55. package/components/chart/bar-v2/index.js +17 -9
  56. package/components/chart/line/Labels.js +8 -10
  57. package/components/chart/line/Point.js +2 -3
  58. package/components/chart/line/index.js +17 -9
  59. package/components/chart/line-v2/Labels.js +8 -10
  60. package/components/chart/line-v2/Point.js +2 -3
  61. package/components/chart/line-v2/index.js +17 -9
  62. package/components/chip/attach.js +12 -16
  63. package/components/chip/index.js +8 -11
  64. package/components/collapse/index.js +4 -5
  65. package/components/divider/index.js +27 -14
  66. package/components/form-control/attachment/index.js +143 -87
  67. package/components/form-control/calendar/function.js +24 -23
  68. package/components/form-control/calendar/index.js +2 -4
  69. package/components/form-control/calendar/range.js +3 -4
  70. package/components/form-control/checkbox/index.js +85 -71
  71. package/components/form-control/control/index.js +4 -6
  72. package/components/form-control/date-picker/index-old.js +0 -2
  73. package/components/form-control/date-picker/index.js +39 -43
  74. package/components/form-control/date-range-picker/index.js +26 -28
  75. package/components/form-control/dropdown/index.js +173 -202
  76. package/components/form-control/dropdown-box/index.js +72 -49
  77. package/components/form-control/form-group/index.js +4 -5
  78. package/components/form-control/helper-text/index.js +4 -5
  79. package/components/form-control/input-base/index.js +28 -38
  80. package/components/form-control/label/index.js +23 -13
  81. package/components/form-control/money-input/index.js +6 -6
  82. package/components/form-control/number-input/index.js +12 -14
  83. package/components/form-control/phone-input/index.js +4 -5
  84. package/components/form-control/radio/index.js +7 -15
  85. package/components/form-control/text-input/index.js +14 -24
  86. package/components/form-control/time-picker/index.js +15 -26
  87. package/components/form-control/time-picker/swiper.js +2 -4
  88. package/components/form-control/toggle/index.js +22 -18
  89. package/components/form-view/helper-text.js +4 -5
  90. package/components/form-view/index.js +4 -5
  91. package/components/form-view/input.js +5 -7
  92. package/components/form-view/label.js +2 -6
  93. package/components/list/list-item-action.js +7 -8
  94. package/components/list/list-item-icon.js +4 -5
  95. package/components/list/list-item-text.js +4 -5
  96. package/components/list/list-item.js +4 -5
  97. package/components/list/list.js +4 -5
  98. package/components/list/sub-header.js +4 -5
  99. package/components/modal/body.js +4 -6
  100. package/components/modal/footer.js +4 -6
  101. package/components/modal/header.js +8 -14
  102. package/components/modal/index.js +4 -5
  103. package/components/modal/modal.js +6 -13
  104. package/components/others/extra/index.js +4 -8
  105. package/components/others/option-wrapper/index.js +57 -0
  106. package/components/others/scrollbar/index.js +4 -5
  107. package/components/paging/page-info.js +282 -231
  108. package/components/paging/page-selector.js +4 -7
  109. package/components/popover/index.js +6 -7
  110. package/components/popup/danger_popup.js +8 -18
  111. package/components/popup/index.js +26 -34
  112. package/components/popup/proposals_popup.js +9 -16
  113. package/components/popup/v2/danger-popup.js +4 -6
  114. package/components/popup/v2/index.js +116 -98
  115. package/components/popup/v2/info-popup.js +4 -6
  116. package/components/popup/v2/success-popup.js +4 -6
  117. package/components/popup/v2/warning-popup.js +4 -6
  118. package/components/popup/v2/yes-no-popup.js +4 -6
  119. package/components/progress/circular.js +17 -26
  120. package/components/progress/linear.js +11 -13
  121. package/components/rating/index.js +114 -233
  122. package/components/slider/slider-container.js +15 -10
  123. package/components/slider/slider-item.js +10 -12
  124. package/components/status/index.js +63 -57
  125. package/components/tab/tab-container.js +26 -24
  126. package/components/tab/tab-header.js +36 -27
  127. package/components/tab/tab-panel.js +32 -15
  128. package/components/tab/tab.js +79 -80
  129. package/components/tooltip/index.js +4 -4
  130. package/components/transfer/index.js +10 -11
  131. package/components/tree-view/css.js +2 -0
  132. package/components/tree-view/index.js +14 -13
  133. package/components/typography/index.js +6 -112
  134. package/css/styles.css +1 -1
  135. package/css/styles.css.map +1 -1
  136. package/global/index.js +2 -0
  137. package/icons/basic.js +1648 -959
  138. package/icons/effect.js +45 -103
  139. package/package.json +1 -1
  140. package/readme.md +66 -0
  141. package/styles/color-helper.js +7 -146
  142. package/styles/colors.js +6 -2
  143. package/styles/font.js +9 -0
  144. package/styles/general.js +100 -7
  145. package/styles/typography.js +25 -26
  146. package/theme/settings.js +9 -2
  147. package/theme/theme-provider.js +15 -7
  148. package/theme/with-styles.js +2 -4
  149. package/theme/with-theme.js +2 -4
  150. package/utils/isMobile.js +21 -0
  151. package/utils/renderHTML.js +4 -5
  152. package/utils/renderIcon.js +15 -11
  153. package/utils/updatePosition.js +2 -2
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /** @jsxRuntime classic */
4
2
 
5
3
  /** @jsx jsx */
@@ -43,13 +41,13 @@ const ModalBody = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
43
41
  useEffect(() => {
44
42
  !!refs && refs(ref);
45
43
  }, []);
46
- const Body = useMemo(() => jsx("div", _extends({
44
+ const Body = useMemo(() => jsx("div", {
47
45
  css: ModalBodyBox,
48
- className: 'DGN-UI-Modal-Body ' + className
49
- }, props, {
46
+ className: 'DGN-UI-Modal-Body ' + className,
47
+ ...props,
50
48
  style: style,
51
49
  ref: ref
52
- }), children), [children, style]);
50
+ }, children), [children, style]);
53
51
  return Body;
54
52
  }));
55
53
  ModalBody.defaultProps = {
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /** @jsxRuntime classic */
4
2
 
5
3
  /** @jsx jsx */
@@ -35,13 +33,13 @@ const ModalFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
35
33
  useEffect(() => {
36
34
  !!refs && refs(ref);
37
35
  }, []);
38
- const Footer = useMemo(() => jsx("div", _extends({
36
+ const Footer = useMemo(() => jsx("div", {
39
37
  css: ModalFooterBox,
40
- className: 'DGN-UI-Modal-Footer ' + className
41
- }, props, {
38
+ className: 'DGN-UI-Modal-Footer ' + className,
39
+ ...props,
42
40
  style: style,
43
41
  ref: ref
44
- }), children), [children, style]);
42
+ }, children), [children, style]);
45
43
  return Footer;
46
44
  }));
47
45
  ModalFooter.defaultProps = {
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /** @jsxRuntime classic */
4
2
 
5
3
  /** @jsx jsx */
@@ -8,8 +6,7 @@ import PropTypes from 'prop-types';
8
6
  import { jsx, css } from '@emotion/core';
9
7
  import ModalContext from './context';
10
8
  import { brand22 } from '../../styles/colors';
11
- import { Typography } from '../';
12
- import Icon from '../../icons';
9
+ import { ButtonIcon, Typography } from '../';
13
10
  const ModalHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
14
11
  title,
15
12
  className,
@@ -57,14 +54,14 @@ const ModalHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
57
54
  useEffect(() => {
58
55
  !!refs && refs(ref);
59
56
  }, []);
60
- const Header = useMemo(() => jsx("div", _extends({
57
+ const Header = useMemo(() => jsx("div", {
61
58
  css: ModalHeaderBox,
62
- className: 'DGN-UI-Modal-Header ' + className
63
- }, props, {
59
+ className: 'DGN-UI-Modal-Header ' + className,
60
+ ...props,
64
61
  style: style,
65
62
  onMouseDown: modal.onMoveModal,
66
63
  ref: ref
67
- }), jsx("div", {
64
+ }, jsx("div", {
68
65
  css: HeaderTitle
69
66
  }, jsx(Typography, {
70
67
  type: 'h3',
@@ -75,13 +72,10 @@ const ModalHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
75
72
  }
76
73
  }, children ? children : title)), jsx("div", {
77
74
  css: ClearIconBox
78
- }, jsx(Icon, {
75
+ }, jsx(ButtonIcon, {
76
+ viewType: 'ghost',
79
77
  name: 'close',
80
- viewBox: true,
81
- onClick: modal.close,
82
- style: {
83
- padding: 0
84
- }
78
+ onClick: modal.close
85
79
  }))), [children, title, style]);
86
80
  return Header;
87
81
  }));
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  import React, { memo, useEffect, useRef, forwardRef } from 'react';
4
2
  import PropTypes from 'prop-types';
5
3
  import Modal from './modal';
@@ -24,10 +22,11 @@ const ModalSample = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
24
22
  useEffect(() => {
25
23
  if (refs) refs(ref);
26
24
  }, []);
27
- return /*#__PURE__*/React.createElement(Modal, _extends({
25
+ return /*#__PURE__*/React.createElement(Modal, {
28
26
  ref: ref,
29
- style: style
30
- }, props), /*#__PURE__*/React.createElement(Header, {
27
+ style: style,
28
+ ...props
29
+ }, /*#__PURE__*/React.createElement(Header, {
31
30
  style: headerStyle
32
31
  }, title), /*#__PURE__*/React.createElement(Body, {
33
32
  style: bodyStyle
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /** @jsxRuntime classic */
4
2
 
5
3
  /** @jsx jsx */
@@ -8,12 +6,7 @@ import { createPortal } from 'react-dom';
8
6
  import PropTypes from 'prop-types';
9
7
  import { jsx, css, keyframes } from '@emotion/core';
10
8
  import ModalContext from './context';
11
- import { useTheme } from '../../theme';
12
- const {
13
- typography: {
14
- fontFamily
15
- }
16
- } = useTheme();
9
+ import { typography } from '../../styles/typography';
17
10
  const Modal = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
18
11
  open,
19
12
  type,
@@ -83,7 +76,7 @@ const Modal = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
83
76
  flex-direction: column;
84
77
  position: relative;
85
78
  background-color: white;
86
- font-family: ${fontFamily};
79
+ ${typography.paragraph1};
87
80
  height: max-content;
88
81
  max-height: calc(100% - ${isNaN(top) ? top : +top + 'px'});
89
82
  min-width: 150px;
@@ -258,13 +251,13 @@ const Modal = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
258
251
  }, jsx("div", {
259
252
  css: ModalContainer,
260
253
  ref: ref
261
- }, jsx("div", _extends({
254
+ }, jsx("div", {
262
255
  css: ModalBox,
263
- ref: modalBoxRef
264
- }, props, {
256
+ ref: modalBoxRef,
257
+ ...props,
265
258
  onMouseDown: moveable && dragAnyWhere ? dragMouseDown : null,
266
259
  style: style
267
- }), jsx(ModalContext.Provider, {
260
+ }, jsx(ModalContext.Provider, {
268
261
  value: {
269
262
  show: onShowModal,
270
263
  close: onCloseModal,
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /** @jsxRuntime classic */
4
2
 
5
3
  /** @jsx jsx */
@@ -7,6 +5,7 @@ import { memo, useState, useEffect, useMemo, useRef } from 'react';
7
5
  import PropTypes from 'prop-types';
8
6
  import { jsx, css } from '@emotion/core';
9
7
  import { brand, dark11, dark6, blue13 } from '../../../styles/colors';
8
+ import { typography } from '../../../styles/typography';
10
9
  const icons = {
11
10
  expand: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
12
11
  <path fillRule="evenodd" clip-rule="evenodd" d="M11.9999 12.0001C11.7729 12.0001 11.5449 11.9231 11.3599 11.7681L5.35989 6.76807C4.93589 6.41407 4.87889 5.78407 5.23189 5.36007C5.58589 4.93507 6.21489 4.87907 6.63989 5.23207L12.0109 9.70707L17.3729 5.39307C17.8029 5.04707 18.4339 5.11507 18.7789 5.54507C19.1259 5.97507 19.0569 6.60407 18.6269 6.95107L12.6269 11.7791C12.4439 11.9261 12.2219 12.0001 11.9999 12.0001ZM12.011 16.7076L17.373 12.3926C17.803 12.0476 18.434 12.1156 18.779 12.5446C19.125 12.9756 19.057 13.6046 18.627 13.9516L12.627 18.7796C12.444 18.9266 12.222 18.9996 12 18.9996C11.772 18.9996 11.545 18.9226 11.36 18.7676L5.35999 13.7676C4.93499 13.4146 4.87799 12.7846 5.23199 12.3596C5.58499 11.9356 6.21499 11.8776 6.63999 12.2316L12.011 16.7076Z" fill="currentColor"/>
@@ -35,10 +34,7 @@ const Extra = ({
35
34
  `;
36
35
  const extraText = css`
37
36
  margin-left: 9px;
38
- font-family: sans-serif;
39
- font-style: normal;
40
- font-weight: bold;
41
- font-size: 14px;
37
+ ${typography.heading4};
42
38
  color: ${dark6};
43
39
  `;
44
40
  const extra = css`
@@ -104,12 +100,12 @@ const Extra = ({
104
100
  }, displayText), []);
105
101
  /* End component */
106
102
 
107
- return jsx("div", _extends({}, props, {
103
+ return jsx("div", { ...props,
108
104
  ref: extraRef,
109
105
  css: extra,
110
106
  onClick: handleClick,
111
107
  style: style
112
- }), iconComp, textComp);
108
+ }, iconComp, textComp);
113
109
  };
114
110
 
115
111
  Extra.defaultProps = {
@@ -0,0 +1,57 @@
1
+ /** @jsxRuntime classic */
2
+
3
+ /** @jsx jsx */
4
+ import { useRef, useEffect, useState, forwardRef, useImperativeHandle } from 'react';
5
+ import { jsx } from '@emotion/core';
6
+
7
+ const OptionWrapper = WrappedComponent => {
8
+ return /*#__PURE__*/forwardRef((props, ref) => {
9
+ if (!ref) {
10
+ ref = useRef(null);
11
+ }
12
+
13
+ const [options, setOptions] = useState(props);
14
+ const componentRef = useRef(null);
15
+
16
+ const option = (option, optionValue) => {
17
+ if (typeof option === 'undefined') {
18
+ return options;
19
+ } else if (typeof option === 'string') {
20
+ if (typeof optionValue === 'undefined') return options[option];else setOptions({ ...options,
21
+ ...{
22
+ [option]: optionValue
23
+ }
24
+ });
25
+ } else if (typeof option === 'object') {
26
+ setOptions({ ...options,
27
+ ...option
28
+ });
29
+ }
30
+ };
31
+
32
+ useImperativeHandle(ref, () => {
33
+ var _componentRef$current;
34
+
35
+ const currentRef = componentRef.current || {};
36
+ const _instance = { ...componentRef.current.instance,
37
+ ...{
38
+ option
39
+ }
40
+ }; // methods
41
+
42
+ _instance.__proto__ = { ...((_componentRef$current = componentRef.current.instance) === null || _componentRef$current === void 0 ? void 0 : _componentRef$current.__proto__)
43
+ }; // hidden methods
44
+
45
+ currentRef.instance = _instance;
46
+ return currentRef;
47
+ });
48
+ useEffect(() => setOptions({ ...options,
49
+ ...props
50
+ }), [props]);
51
+ return jsx(WrappedComponent, { ...options,
52
+ ref: componentRef
53
+ });
54
+ });
55
+ };
56
+
57
+ export default OptionWrapper;
@@ -1,5 +1,3 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
3
1
  /** @jsxRuntime classic */
4
2
 
5
3
  /** @jsx jsx */
@@ -66,12 +64,13 @@ const scrollbar = ({
66
64
  }` : ''}
67
65
  ${getPosition[position]}
68
66
  `;
69
- return jsx("div", _extends({
67
+ return jsx("div", {
70
68
  css: Scrollbar,
71
69
  custom: custom,
72
70
  position: position,
73
- style: style
74
- }, props), children);
71
+ style: style,
72
+ ...props
73
+ }, children);
75
74
  };
76
75
 
77
76
  scrollbar.defaultProps = {