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,23 +1,31 @@
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 */
6
4
  import { forwardRef, memo, useMemo, useContext } from 'react';
7
5
  import { jsx, css } from '@emotion/core';
8
- import { string, number, node, bool, object, func, any } from 'prop-types';
9
- import * as Icons from '../../icons';
6
+ import PropTypes from 'prop-types';
7
+ import Icon from '../../icons';
10
8
  import { color as colors } from '../../styles/colors';
11
- import { capitalize } from '../../utils';
12
9
  import Ripple from '../button/ripple-effect';
13
10
  import Typography from '../typography';
14
11
  import TabContext from './context';
12
+ import { alignCenter, backgroundTransparent, borderBox, cursorPointer, flexRow, justifyCenter, outlineNone, overflowHidden, pointerEventsNone, positionAbsolute, positionRelative } from '../../styles/general';
13
+ const {
14
+ system: {
15
+ active,
16
+ disabled: systemDisabled,
17
+ rest,
18
+ white
19
+ }
20
+ } = colors;
15
21
  const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
16
22
  index,
17
23
  children,
18
24
  color,
19
25
  disabled,
20
26
  iconStyle,
27
+ style,
28
+ className,
21
29
  startIcon,
22
30
  endIcon,
23
31
  label,
@@ -30,26 +38,25 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
30
38
  setTabIndexState
31
39
  } = useContext(TabContext);
32
40
  const TabButton = css`
41
+ ${flexRow}
42
+ ${overflowHidden}
43
+ ${alignCenter}
44
+ ${justifyCenter}
45
+ ${borderBox}
46
+ ${cursorPointer}
47
+ ${positionRelative}
48
+ ${outlineNone}
33
49
  flex: 0 0 auto;
34
- overflow: hidden;
35
- align-items: center;
36
50
  appearance: none;
37
- background-color: #fff;
51
+ background-color: ${white};
38
52
  border: 0;
39
53
  box-shadow: none;
40
- box-sizing: border-box;
41
- color: ${color || colors.system.rest};
42
- display: flex;
43
- cursor: pointer;
44
- justify-content: center;
45
- line-height: 1.4285;
54
+ color: ${color || rest};
46
55
  max-width: 320px;
47
56
  min-width: 80px;
48
57
  word-break: break-word;
49
- outline: none;
50
58
  padding: 10px 16px;
51
59
  pointer-events: auto;
52
- position: relative;
53
60
  text-decoration: none;
54
61
  text-rendering: auto;
55
62
  transition: all 0.2s ease-in-out, background-color 0.2s ease-in-out;
@@ -57,44 +64,44 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
57
64
  scroll-snap-align: auto;
58
65
  white-space: nowrap;
59
66
  :disabled {
60
- background-color: transparent;
61
- color: ${colors.system.disabled};
67
+ ${pointerEventsNone}
68
+ ${backgroundTransparent}
69
+ color: ${systemDisabled};
62
70
  cursor: default;
63
- pointer-events: none;
64
71
  }
65
72
  :hover,:focus:not(.selected):not(:disabled) {
66
- background-color: #fff;
67
- color: ${colors.system.rest};
73
+ background-color: ${white};
74
+ color: ${rest};
68
75
  .Indicator {
69
- background-color: ${colors.system.rest};
76
+ background-color: ${rest};
70
77
  transform: scaleX(1);
71
78
  }
72
79
  }
73
80
  &.selected {
74
- background-color: #fff;
75
- color: ${colors.fill['tabbar-active']};
81
+ background-color: ${white};
82
+ color: ${active};
76
83
  .Indicator {
77
- background-color: ${colors.fill['tabbar-active']};
84
+ background-color: ${active};
78
85
  transform: scaleX(1);
79
86
  }
80
87
  }
81
88
  `;
82
89
  const Indicator = css`
90
+ ${positionAbsolute}
83
91
  height: 4px;
84
92
  width: 100%;
85
93
  bottom: 0;
86
- position: absolute;
87
94
  transform: scaleX(0);
88
95
  transition: transform 0.2s ease-in-out;
89
96
  border-radius: 1px;
90
97
  `;
91
98
  const ButtonIcon = css`
92
- display: flex;
93
- position: relative;
94
- box-sizing: border-box;
95
- justify-content: center;
96
- align-items: center;
97
- max-height: 12px;
99
+ ${flexRow}
100
+ ${alignCenter}
101
+ ${justifyCenter}
102
+ ${positionRelative}
103
+ ${borderBox}
104
+ max-height: 24px;
98
105
  max-width: 24px;
99
106
  margin-right: 4px;
100
107
  &.end-icon {
@@ -102,26 +109,20 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
102
109
  margin-left: 4px;
103
110
  }
104
111
  `;
112
+
113
+ const _onClick = () => {
114
+ if (disabled) return;
115
+ onClick ? onClick() : setTabIndexState(index);
116
+ };
117
+
105
118
  const StartIcon = useMemo(() => {
106
119
  let node = startIcon;
107
120
 
108
121
  if (typeof node === 'string') {
109
- const IconComp = Icons[capitalize(node)];
110
-
111
- if (IconComp) {
112
- node = jsx(IconComp, {
113
- color: 'currentColor',
114
- viewBox: true,
115
- width: 16,
116
- height: 16,
117
- iconStyle: label ? { ...iconStyle
118
- } : {
119
- marginLeft: 0,
120
- marginRight: 0,
121
- ...iconStyle
122
- }
123
- });
124
- }
122
+ node = jsx(Icon, {
123
+ color: 'currentColor',
124
+ name: startIcon
125
+ });
125
126
  }
126
127
 
127
128
  return jsx("span", {
@@ -132,22 +133,10 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
132
133
  let node = endIcon;
133
134
 
134
135
  if (typeof node === 'string') {
135
- const IconComp = Icons[capitalize(node)];
136
-
137
- if (IconComp) {
138
- node = jsx(IconComp, {
139
- color: 'currentColor',
140
- viewBox: true,
141
- width: 16,
142
- height: 16,
143
- iconStyle: label ? { ...iconStyle
144
- } : {
145
- marginLeft: 0,
146
- marginRight: 0,
147
- ...iconStyle
148
- }
149
- });
150
- }
136
+ node = jsx(Icon, {
137
+ color: 'currentColor',
138
+ name: endIcon
139
+ });
151
140
  }
152
141
 
153
142
  return jsx("span", {
@@ -155,14 +144,16 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
155
144
  className: 'end-icon'
156
145
  }, " ", node, " ");
157
146
  }, [endIcon]);
158
- return jsx("button", _extends({
147
+ return jsx("button", {
159
148
  css: TabButton,
160
- className: index === tabIndexState && !disabled ? 'selected' : '',
149
+ className: ['DGN-UI-Tab-Item', index === tabIndexState && !disabled ? 'selected' : ''].join(' ').trim().replace(/\s+/g, ' '),
150
+ style: style,
161
151
  disabled: disabled,
162
- onClick: onClick ? onClick : () => setTabIndexState(index),
152
+ onClick: _onClick,
163
153
  ref: ref,
164
- index: index
165
- }, props), startIcon && StartIcon, jsx(Typography, {
154
+ index: index,
155
+ ...props
156
+ }, startIcon && StartIcon, jsx(Typography, {
166
157
  type: level,
167
158
  color: 'inherit'
168
159
  }, label), children, endIcon && EndIcon, jsx(Ripple, null), jsx("span", {
@@ -172,35 +163,43 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
172
163
  }));
173
164
  TabItem.defaultProps = {
174
165
  disabled: false,
175
- label: ""
166
+ label: "",
167
+ className: '',
168
+ style: {}
176
169
  };
177
170
  TabItem.propTypes = {
178
171
  /** color for Tabs */
179
- color: string,
172
+ color: PropTypes.string,
180
173
 
181
174
  /** prevent all event if true */
182
- disabled: bool,
175
+ disabled: PropTypes.bool,
183
176
 
184
177
  /** object passed to add effects and to change location icons */
185
- iconStyle: object,
178
+ iconStyle: PropTypes.object,
186
179
 
187
180
  /** index received in position of TabHeaderButton */
188
- index: number,
181
+ index: PropTypes.number,
189
182
 
190
183
  /** data string, if any */
191
- label: string,
184
+ label: PropTypes.string,
192
185
 
193
186
  /** element to display in Tabs (like text) */
194
- children: node,
187
+ children: PropTypes.node,
195
188
 
196
189
  /** icon to the left of the button */
197
- startIcon: node,
190
+ startIcon: PropTypes.node,
198
191
 
199
192
  /** icon to the right of the button */
200
- endIcon: node,
201
- onClick: func,
193
+ endIcon: PropTypes.node,
194
+ onClick: PropTypes.func,
195
+
196
+ /** class for component */
197
+ className: PropTypes.string,
198
+
199
+ /** style inline of component */
200
+ style: PropTypes.object,
202
201
 
203
202
  /** any props else */
204
- props: any
203
+ props: PropTypes.any
205
204
  };
206
205
  export default TabItem;
@@ -5,8 +5,8 @@ import PropTypes from 'prop-types';
5
5
  import { forwardRef, memo, useEffect, useRef, useState } from 'react';
6
6
  import Portal from './portal';
7
7
  import { randomString } from '../../utils';
8
- import theme from '../../theme/settings';
9
8
  import { jsx, css } from '@emotion/core';
9
+ import { typography } from "../../styles/typography";
10
10
  const defaultColor = 'rgba(255, 255, 255, 0.9)';
11
11
  const defaultBg = 'rgba(21, 26, 48, 0.9)';
12
12
  const defaultViewPadding = 4;
@@ -124,8 +124,7 @@ const Tooltip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((props, ref) => {
124
124
  box-sizing : border-box;
125
125
  color : ${color};
126
126
  display : inline-block;
127
- font-family : ${theme.typography.fontFamily};
128
- font-size : ${size === 'small' ? 12 : 14}px;
127
+ ${size === 'small' ? typography.paragraph3 : typography.paragraph2};
129
128
  opacity : 0;
130
129
  padding : ${padding};
131
130
  position : absolute;
@@ -527,7 +526,8 @@ const Tooltip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((props, ref) => {
527
526
  clearTimeout(hoverTimeout);
528
527
  };
529
528
  }, []);
530
- return jsx(TagCreatedName, containerProps, children, tooltip);
529
+ return jsx(TagCreatedName, { ...containerProps
530
+ }, children, tooltip);
531
531
  }));
532
532
  Tooltip.defaultProps = {
533
533
  alignMode: 'middle',
@@ -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 */
@@ -428,17 +426,18 @@ const Transfer = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
428
426
  ref: rightPaperRef,
429
427
  "data-side": 'right'
430
428
  }, chosenList.map((item, index) => renderItemDefault(item, index))), [chosenList]);
431
- const TransferView = useMemo(() => jsx("div", _extends({
432
- css: TransferRoot
433
- }, props), jsx(Paper, _extends({
434
- width: width
435
- }, paperProps, {
429
+ const TransferView = useMemo(() => jsx("div", {
430
+ css: TransferRoot,
431
+ ...props
432
+ }, jsx(Paper, {
433
+ width: width,
434
+ ...paperProps,
436
435
  scrollAble: !selectAll
437
- }), jsx(Fragment, null, selectAll && LeftSelectAll, LeftTransferList)), Dashboard, jsx(Paper, _extends({
438
- height: height
439
- }, paperProps, {
436
+ }, jsx(Fragment, null, selectAll && LeftSelectAll, LeftTransferList)), Dashboard, jsx(Paper, {
437
+ height: height,
438
+ ...paperProps,
440
439
  scrollAble: !selectAll
441
- }), jsx(Fragment, null, selectAll && RightSelectAll, RightTransferList))), [choicesList, chosenList, disabledAllLeft, disabledLeft, disabledRight, disabledAllRight, determinateLeft, determinateRight, selectAllLeft, selectAllRight]);
440
+ }, jsx(Fragment, null, selectAll && RightSelectAll, RightTransferList))), [choicesList, chosenList, disabledAllLeft, disabledLeft, disabledRight, disabledAllRight, determinateLeft, determinateRight, selectAllLeft, selectAllRight]);
442
441
  return TransferView;
443
442
  }));
444
443
  Transfer.defaultProps = {
@@ -13,6 +13,7 @@ export const TreeViewRoot = css`
13
13
  background-color: ${theme.colors.focus};
14
14
  }
15
15
  .Accordion-Icon-Root {
16
+ display: flex;
16
17
  margin-right: 4px;
17
18
  }
18
19
  }
@@ -22,6 +23,7 @@ export const TreeViewRoot = css`
22
23
  border-radius: 0;
23
24
  }
24
25
  .Accordion-Icon-Root {
26
+ display: flex;
25
27
  transition: opacity 0.2s ease-out;
26
28
  opacity: 1;
27
29
  &.DGN-Invisible {
@@ -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 { render } from 'react-dom';
8
6
  import PropTypes from 'prop-types';
9
7
  import { jsx } from '@emotion/core';
10
8
  import { TreeViewRoot } from './css';
11
- import { Accordion, AccordionSummary, AccordionDetails, Typography, Checkbox, Divider, InputBase } from '..';
12
- import Icon from '../../icons';
9
+ import { Accordion, AccordionSummary, AccordionDetails, Typography, Checkbox, Divider, InputBase, ButtonIcon } from '..';
13
10
  import { mapParent, randomString, removeUnicode } from '../../utils';
14
11
  import { getGlobal } from '../../global';
15
12
  const separatorPattern = /\{\w+\}/g;
@@ -98,6 +95,8 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
98
95
  }
99
96
  });
100
97
  } else {
98
+ var _node$lastChild, _node$lastChild$first;
99
+
101
100
  const checkedLeastOfOne = Array.from(node.querySelectorAll('input')).some(el => el.checked);
102
101
 
103
102
  if (checkedLeastOfOne) {
@@ -110,7 +109,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
110
109
  input.checked = false;
111
110
  }
112
111
 
113
- const childNodes = Array.from(node.lastChild.firstChild.childNodes);
112
+ const childNodes = Array.from((node === null || node === void 0 ? void 0 : (_node$lastChild = node.lastChild) === null || _node$lastChild === void 0 ? void 0 : (_node$lastChild$first = _node$lastChild.firstChild) === null || _node$lastChild$first === void 0 ? void 0 : _node$lastChild$first.childNodes) || '');
114
113
  checkedParentFollowValue(childNodes);
115
114
  }
116
115
  }
@@ -823,26 +822,28 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
823
822
  overflow: 'hidden',
824
823
  textOverflow: 'ellipsis'
825
824
  },
826
- endIcon: jsx(Icon, {
825
+ endIcon: jsx(ButtonIcon, {
826
+ viewType: 'ghost',
827
827
  ref: clearIconRef,
828
828
  name: 'Cancel',
829
829
  onClick: clearAllValue
830
830
  })
831
- }), allowSearch && jsx(InputBase, _extends({
831
+ }), allowSearch && jsx(InputBase, {
832
832
  startIcon: 'Search',
833
833
  onChange: onChangeHandler,
834
- viewType: 'outlined'
835
- }, searchProps)), multiple && selectAll && jsx(Fragment, null, jsx("div", {
834
+ viewType: 'outlined',
835
+ ...searchProps
836
+ }), multiple && selectAll && jsx(Fragment, null, jsx("div", {
836
837
  className: 'TreeView-All'
837
838
  }, jsx(Checkbox, {
838
839
  label: selectAllLabel,
839
840
  onChange: onSelectAll,
840
841
  inputRef: selectAllRef
841
- })), jsx(Divider, null)), jsx("div", _extends({
842
- ref: ref
843
- }, props, {
842
+ })), jsx(Divider, null)), jsx("div", {
843
+ ref: ref,
844
+ ...props,
844
845
  className: ['TreeView-Content', disabled ? 'disabled' : '', className].join(' ').trim()
845
- }), disabledMap ? dataSource : mapParent(dataSource, id, parentID, true).map((data, index) => renderTreeView(data, index.toString(), 0, sync))));
846
+ }, disabledMap ? dataSource : mapParent(dataSource, id, parentID, true).map((data, index) => renderTreeView(data, index.toString(), 0, sync))));
846
847
  }, [dataSource, value, multiple, selectBox, disabledBoldResult, autoExpandToResult, showChildrenOfResult, searchMode, onChange, searchProps]);
847
848
  return TreeViewComp;
848
849
  }));
@@ -4,27 +4,9 @@ import PropTypes from 'prop-types';
4
4
  import { css } from '@emotion/core';
5
5
  import { renderHTML } from '../../utils';
6
6
  import { useTheme } from '../../theme';
7
+ import { typography } from '../../styles/typography';
7
8
  const {
8
- colors,
9
- typography: {
10
- fontFamily,
11
- fontFamilyBold,
12
- fontFamilyMedium,
13
- fontSize,
14
- title1,
15
- title2,
16
- title3,
17
- title4,
18
- h1,
19
- h2,
20
- h3,
21
- h4,
22
- h5,
23
- h6,
24
- p1,
25
- p2,
26
- p3
27
- }
9
+ colors
28
10
  } = useTheme();
29
11
  const Typography = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
30
12
  type,
@@ -42,105 +24,17 @@ const Typography = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
42
24
  ref = useRef(null);
43
25
  }
44
26
 
27
+ const typographyMap = new Map([['title1', typography.title1], ['title2', typography.title2], ['title3', typography.title3], ['title4', typography.title4], ['h1', typography.heading1], ['h2', typography.heading2], ['h3', typography.heading3], ['h4', typography.heading4], ['h5', typography.heading5], ['h6', typography.heading6], ['p1', typography.paragraph1], ['p2', typography.paragraph2], ['p3', typography.paragraph3]]);
45
28
  const TextRoot = css`
46
29
  display: inline-block;
47
30
  position: relative;
48
31
  color: ${colors[color] || color};
49
- font-family: ${fontFamily};
50
- font-size: ${fontSize};
32
+ ${typography.paragraph1};
51
33
  max-width: max-content;
52
34
  word-break: break-word;
53
35
  white-space: normal;
54
- &.DGN-Typography-title1 {
55
- font-family : ${fontFamilyBold};
56
- font-style : ${title1.fontStyle};
57
- font-weight : ${title1.fontWeight};
58
- font-size : ${title1.fontSize};
59
- line-height : ${title1.lineHeight};
60
- }
61
- &.DGN-Typography-title2 {
62
- font-family : ${fontFamilyBold};
63
- font-style : ${title2.fontStyle};
64
- font-weight : ${title2.fontWeight};
65
- font-size : ${title2.fontSize};
66
- line-height : ${title2.lineHeight};
67
- }
68
- &.DGN-Typography-title3 {
69
- font-family : ${fontFamilyBold};
70
- font-style : ${title3.fontStyle};
71
- font-weight : ${title3.fontWeight};
72
- font-size : ${title3.fontSize};
73
- line-height : ${title3.lineHeight};
74
- }
75
- &.DGN-Typography-title4 {
76
- font-family : ${fontFamilyBold};
77
- font-style : ${title4.fontStyle};
78
- font-weight : ${title4.fontWeight};
79
- font-size : ${title4.fontSize};
80
- line-height : ${title4.lineHeight};
81
- }
82
- &.DGN-Typography-h1 {
83
- font-family : ${fontFamilyBold};
84
- font-style : ${h1.fontStyle};
85
- font-weight : ${h1.fontWeight};
86
- font-size : ${h1.fontSize};
87
- line-height : ${h1.lineHeight};
88
- }
89
- &.DGN-Typography-h2 {
90
- font-family : ${fontFamilyBold};
91
- font-style : ${h2.fontStyle};
92
- font-weight : ${h2.fontWeight};
93
- font-size : ${h2.fontSize};
94
- line-height : ${h2.lineHeight};
95
- }
96
- &.DGN-Typography-h3 {
97
- font-family : ${fontFamilyBold};
98
- font-style : ${h3.fontStyle};
99
- font-weight : ${h3.fontWeight};
100
- font-size : ${h3.fontSize};
101
- line-height : ${h3.lineHeight};
102
- }
103
- &.DGN-Typography-h4 {
104
- font-family : ${fontFamilyBold};
105
- font-style : ${h4.fontStyle};
106
- font-weight : ${h4.fontWeight};
107
- font-size : ${h4.fontSize};
108
- line-height : ${h4.lineHeight};
109
- }
110
- &.DGN-Typography-h5 {
111
- font-family : ${fontFamilyMedium};
112
- font-style : ${h5.fontStyle};
113
- font-weight : ${h5.fontWeight};
114
- font-size : ${h5.fontSize};
115
- line-height : ${h5.lineHeight};
116
- }
117
- &.DGN-Typography-h6 {
118
- font-family : ${fontFamilyMedium};
119
- font-style : ${h6.fontStyle};
120
- font-weight : ${h6.fontWeight};
121
- font-size : ${h6.fontSize};
122
- line-height : ${h6.lineHeight};
123
- }
124
- &.DGN-Typography-p1 {
125
- font-family : ${fontFamily};
126
- font-style : ${p1.fontStyle};
127
- font-weight : ${p1.fontWeight};
128
- font-size : ${p1.fontSize};
129
- line-height : ${p1.lineHeight};
130
- }
131
- &.DGN-Typography-p2 {
132
- font-family : ${fontFamily};
133
- font-style : ${p2.fontStyle};
134
- font-weight : ${p2.fontWeight};
135
- font-size : ${p2.fontSize};
136
- line-height : ${p2.lineHeight};
137
- }
138
- &.DGN-Typography-p3 {
139
- font-family : ${fontFamily};
140
- font-style : ${p3.fontStyle};
141
- font-weight : ${p3.fontWeight};
142
- font-size : ${p3.fontSize};
143
- line-height : ${p3.lineHeight};
36
+ &.DGN-Typography-${type} {
37
+ ${typographyMap.get(type)};
144
38
  }
145
39
  &.DGN-Typography-center {
146
40
  text-align: center;
package/css/styles.css CHANGED
@@ -1 +1 @@
1
- b{font-weight:bold !important}/*# sourceMappingURL=styles.css.map */
1
+ html *{color:#000 !important;font-family:"SF Pro Display",Arial,sans-serif;font-size:16px}b{font-weight:bold !important}/*# sourceMappingURL=styles.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../src/scss/styles.scss"],"names":[],"mappings":"AAAA,EACI","file":"styles.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../../src/scss/styles.scss"],"names":[],"mappings":"AAAA,OAEE,sBACA,8CACA,eAGF,EACI","file":"styles.css"}
package/global/index.js CHANGED
@@ -16,6 +16,7 @@ const globalObject = {
16
16
  yes: 'Có',
17
17
  warning: 'Cảnh Báo',
18
18
  // attachment
19
+ dropFileHere: 'Kéo và thả tập tin vào đây',
19
20
  deleteNotifyText: 'Bạn có chắc muốn xóa (những) đính kèm này?',
20
21
  attachText: 'Đính kèm',
21
22
  errorDefault: {
@@ -79,6 +80,7 @@ const globalObject = {
79
80
  yes: 'Yes',
80
81
  warning: 'Warning',
81
82
  // attachment
83
+ dropFileHere: 'Drop files here',
82
84
  deleteNotifyText: 'Are you sure you want to delete this attachment(s)?',
83
85
  attachText: 'Attachment',
84
86
  errorDefault: {