diginet-core-ui 1.3.42 → 1.3.43

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 (35) hide show
  1. package/assets/images/menu/dhr/MHRM00N0002.svg +22 -0
  2. package/assets/images/menu/dhr/MHRM00N0003.svg +17 -0
  3. package/assets/images/menu/dhr/MHRM00N0004.svg +12 -0
  4. package/assets/images/menu/dhr/MHRM13N0002.svg +13 -0
  5. package/assets/images/menu/dhr/MHRM13N0003.svg +12 -0
  6. package/assets/images/menu/dhr/MHRM29N0004.svg +18 -0
  7. package/assets/images/menu/dhr/MHRM39N0017.svg +14 -0
  8. package/assets/images/menu/dhr/MHRM39N0018.svg +5 -0
  9. package/assets/images/menu/dhr/MHRM39N0019.svg +11 -0
  10. package/components/alert/notify.js +16 -16
  11. package/components/badge/index.js +5 -5
  12. package/components/button/index.js +13 -13
  13. package/components/form-control/attachment/index.js +20 -20
  14. package/components/form-control/calendar/function.js +113 -113
  15. package/components/form-control/calendar/index.js +16 -16
  16. package/components/form-control/checkbox/index.js +152 -154
  17. package/components/form-control/date-range-picker/index.js +6 -6
  18. package/components/form-control/dropdown-box/index.js +3 -9
  19. package/components/form-control/form-group/index.js +40 -36
  20. package/components/form-control/label/index.js +12 -6
  21. package/components/form-control/number-input/index2.js +21 -19
  22. package/components/form-control/text-input/index.js +21 -19
  23. package/components/form-control/toggle/index.js +46 -56
  24. package/components/paging/page-info.js +9 -9
  25. package/components/popover/index.js +21 -21
  26. package/components/popup/v2/index.js +7 -7
  27. package/components/progress/circular.js +12 -12
  28. package/components/tab/tab-container.js +19 -11
  29. package/components/tab/tab-header.js +34 -31
  30. package/components/tab/tab-panel.js +15 -12
  31. package/components/tab/tab.js +60 -58
  32. package/icons/effect.js +15 -15
  33. package/package.json +1 -1
  34. package/readme.md +49 -33
  35. package/utils/number.js +6 -6
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
7
7
  import { color as colors } from '../../styles/colors';
8
8
  import TabContext from './context';
9
9
  import ButtonIcon from '../button/icon';
10
- import { borderBox, displayNone, flexCol, flexRow, justifyCenter, overflowHidden, positionRelative, whiteSpaceNoWrap } from '../../styles/general';
10
+ import { borderBox, displayNone, flexCol, flexRow, justifyCenter, overflowHidden, parseWidthHeight, positionRelative, whiteSpaceNoWrap } from '../../styles/general';
11
11
  const {
12
12
  line: {
13
13
  tab
@@ -33,6 +33,13 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
33
33
  let showScrollLeftButton = !isVertical && scrollLeft > 0;
34
34
  let showScrollRightButton = !isVertical && (ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.offsetWidth) + scrollLeft < (ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.scrollWidth);
35
35
 
36
+ const _ContainerCSS = ContainerCSS(centered, isVertical);
37
+
38
+ const _TabHeaderCSS = TabHeaderCSS(isVertical);
39
+
40
+ const scrollLeftButtonCSS = scrollButtonCSS(true, showScrollLeftButton, showScrollRightButton);
41
+ const scrollRightButtonCSS = scrollButtonCSS(false, showScrollLeftButton, showScrollRightButton);
42
+
36
43
  const _onClickScrollButton = scrollPrevious => {
37
44
  let scrollValue = scrollPrevious ? ref.current.scrollLeft - (ref.current.offsetWidth + 30) : ref.current.scrollLeft + (ref.current.offsetWidth + 30);
38
45
  ref.current.scrollLeft = scrollValue;
@@ -49,13 +56,13 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
49
56
  return currentRef;
50
57
  });
51
58
  return jsx("div", {
52
- css: ContainerCSS(centered, isVertical),
59
+ css: _ContainerCSS,
53
60
  id: `DGN-control`,
54
61
  className: ['DGN-UI-Tab-Header-Container', className].join(' ').trim().replace(/\s+/g, ' '),
55
62
  style: style,
56
63
  ...props
57
- }, scrollButtons && jsx(ButtonIcon, {
58
- css: scrollButtonCSS(true, showScrollLeftButton, showScrollRightButton),
64
+ }, scrollButtons && !isVertical && jsx(ButtonIcon, {
65
+ css: scrollLeftButtonCSS,
59
66
  name: isVertical ? 'ArrowUp' : 'ArrowLeft',
60
67
  viewType: 'text',
61
68
  size: 'tiny',
@@ -63,7 +70,7 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
63
70
  disabled: !showScrollLeftButton,
64
71
  onClick: () => _onClickScrollButton(true)
65
72
  }), jsx("div", {
66
- css: TabHeaderCSS(isVertical),
73
+ css: _TabHeaderCSS,
67
74
  className: 'DGN-UI-Tab-Header',
68
75
  ref: ref,
69
76
  onScroll: e => {
@@ -73,8 +80,8 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
73
80
  }
74
81
  }, React.Children.map(children, child => child && /*#__PURE__*/React.cloneElement(child, {
75
82
  level
76
- }))), scrollButtons && jsx(ButtonIcon, {
77
- css: scrollButtonCSS(false, showScrollLeftButton, showScrollRightButton),
83
+ }))), scrollButtons && !isVertical && jsx(ButtonIcon, {
84
+ css: scrollRightButtonCSS,
78
85
  name: isVertical ? 'ArrowDown' : 'ArrowRight',
79
86
  viewType: 'text',
80
87
  size: 'tiny',
@@ -85,43 +92,39 @@ const TabHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
85
92
  }));
86
93
 
87
94
  const ContainerCSS = (centered, isVertical) => css`
88
- ${flexRow}
89
- ${overflowHidden}
90
- ${positionRelative}
91
- ${borderBox}
92
- ${centered && justifyCenter}
93
- height: auto;
94
- min-height: 2.5rem;
95
+ ${flexRow};
96
+ ${overflowHidden};
97
+ ${positionRelative};
98
+ ${borderBox};
99
+ ${centered && justifyCenter};
95
100
  flex-direction: ${isVertical ? 'column' : 'row'};
96
101
  max-width: ${isVertical ? 'max-content' : '100%'};
102
+ height: auto;
97
103
  width: 100%;
98
104
  padding: 0;
99
105
  ${isVertical ? `border-right: solid 1px ${tab}` : `border-bottom: solid 1px ${tab}`};
100
106
  `;
101
107
 
102
108
  const TabHeaderCSS = isVertical => isVertical ? css`
103
- ${flexCol}
104
- padding: 0 3px 0 0;
109
+ ${flexCol};
105
110
  ` : css`
106
- ${flexRow}
107
- ${positionRelative}
108
- ${whiteSpaceNoWrap}
109
- margin: 0;
110
- list-style: none;
111
+ ${flexRow};
112
+ ${positionRelative};
113
+ ${whiteSpaceNoWrap};
114
+ margin: 0;
111
115
  overflow-x: auto;
112
116
  scroll-behavior: smooth;
113
117
  scroll-snap-type: x mandatory;
114
118
  scroll-padding: 50%;
115
119
  transition: 0.3s ease-in-out 0.3s;
116
120
  &::-webkit-scrollbar {
117
- ${displayNone}
121
+ ${displayNone};
118
122
  }
119
123
  `;
120
124
 
121
125
  const scrollButtonCSS = (scrollPrevious, showScrollLeftButton, showScrollRightButton) => css`
126
+ ${parseWidthHeight(24, 24)};
122
127
  overflow: initial;
123
- width: 24px;
124
- height: 24px;
125
128
  align-self: center;
126
129
  margin: ${scrollPrevious ? '0 8px 0 0' : '0 0 0 8px'};
127
130
  opacity: ${scrollPrevious && showScrollLeftButton || !scrollPrevious && showScrollRightButton ? '1' : '0'};
@@ -139,26 +142,26 @@ TabHeader.defaultProps = {
139
142
  centered: false
140
143
  };
141
144
  TabHeader.propTypes = {
142
- /** element to display in Tabs (like text) */
145
+ /** Element to display in Tab header. */
143
146
  children: PropTypes.array,
144
147
 
145
- /** class for component */
148
+ /** Class for component. */
146
149
  className: PropTypes.string,
147
150
 
148
- /** style inline of component */
151
+ /** Style inline of component. */
149
152
  style: PropTypes.object,
150
153
 
151
- /** show scroll buttons if true */
154
+ /** If true, show scroll buttons. */
152
155
  scrollButtons: PropTypes.bool,
153
156
 
154
- /** If true, the tabs are centered */
157
+ /** If true, the tabs are centered. */
155
158
  centered: PropTypes.bool,
156
159
 
157
- /** any props else */
160
+ /** Any props else. */
158
161
  props: PropTypes.any,
159
162
 
160
163
  /**
161
- * ref methods
164
+ * Ref methods.
162
165
  */
163
166
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
164
167
  current: PropTypes.instanceOf(Element)
@@ -28,6 +28,9 @@ const TabPanel = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
28
28
  const ref = useRef(null);
29
29
  const isVertical = direction === 'vertical';
30
30
  const isActive = index === tabIndexState;
31
+
32
+ const _TabPanelCSS = TabPanelCSS(isVertical, isActive);
33
+
31
34
  useEffect(() => {
32
35
  if (isRendered) return;else if (index === tabIndexState) setIsRendered(true);
33
36
  }, [tabIndexState]);
@@ -41,7 +44,7 @@ const TabPanel = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
41
44
  return currentRef;
42
45
  });
43
46
  return jsx("div", {
44
- css: TabPanelCSS(isVertical, isActive),
47
+ css: _TabPanelCSS,
45
48
  "aria-labelledby": `tab-${index}`,
46
49
  id: `tab-panel-${index}`,
47
50
  className: ['DGN-UI-Tab-Panel', className].join(' ').trim().replace(/\s+/g, ' '),
@@ -53,10 +56,10 @@ const TabPanel = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
53
56
  }));
54
57
 
55
58
  const TabPanelCSS = (isVertical, isActive) => css`
56
- ${flexCol}
57
- ${borderBox}
58
- ${positionRelative}
59
- ${isActive ? flexCol : displayNone}
59
+ ${flexCol};
60
+ ${borderBox};
61
+ ${positionRelative};
62
+ ${isActive ? flexCol : displayNone};
60
63
  color: ${main};
61
64
  height: ${isVertical ? '300px' : '100%'};
62
65
  padding: 0px ${isVertical ? '12px' : '10'};
@@ -69,26 +72,26 @@ TabPanel.defaultProps = {
69
72
  lazyLoading: false
70
73
  };
71
74
  TabPanel.propTypes = {
72
- /** element to display in Tabs (like text) */
75
+ /** The content of the component. */
73
76
  children: PropTypes.node,
74
77
 
75
- /** index received in position of TabHeaderButton */
78
+ /** Index received in position of TabHeaderButton. */
76
79
  index: PropTypes.number,
77
80
 
78
- /** class for component */
81
+ /** Class for component. */
79
82
  className: PropTypes.string,
80
83
 
81
- /** style inline of component */
84
+ /** Style inline of component. */
82
85
  style: PropTypes.object,
83
86
 
84
- /** lazy loading mode */
87
+ /** Lazy loading mode. */
85
88
  lazyLoading: PropTypes.bool,
86
89
 
87
- /** any props else */
90
+ /** Any props else. */
88
91
  props: PropTypes.any,
89
92
 
90
93
  /**
91
- * ref methods
94
+ * Ref methods.
92
95
  */
93
96
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
94
97
  current: PropTypes.instanceOf(Element)
@@ -9,7 +9,7 @@ import { color as colors } from '../../styles/colors';
9
9
  import Ripple from '../button/ripple-effect';
10
10
  import Typography from '../typography';
11
11
  import TabContext from './context';
12
- import { alignCenter, backgroundTransparent, borderBox, breakWord, cursorPointer, flexRow, justifyCenter, outlineNone, overflowHidden, pointerEventsNone, positionAbsolute, positionRelative, whiteSpaceNoWrap } from '../../styles/general';
12
+ import { alignCenter, backgroundTransparent, borderBox, boxShadowNone, breakWord, cursorDefault, cursorPointer, flexRow, justifyCenter, justifyStart, outlineNone, overflowHidden, pointerEventsNone, positionAbsolute, positionRelative, textCenter, whiteSpaceNoWrap } from '../../styles/general';
13
13
  const {
14
14
  system: {
15
15
  active,
@@ -34,9 +34,15 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
34
34
  }, reference) => {
35
35
  const {
36
36
  tabIndexState,
37
- setTabIndexState
37
+ setTabIndexState,
38
+ direction
38
39
  } = useContext(TabContext);
39
40
  const ref = useRef(null);
41
+ const isVertical = direction === 'vertical';
42
+
43
+ const _TabButtonCSS = TabButtonCSS(color, isVertical);
44
+
45
+ const _IndicatorCSS = IndicatorCSS(isVertical);
40
46
 
41
47
  const _onClick = event => {
42
48
  if (disabled) return;
@@ -81,54 +87,49 @@ const TabItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
81
87
  className: 'end-icon'
82
88
  }, ' ', node, ' ');
83
89
  }, [endIcon]);
84
- return jsx("button", {
85
- css: TabButtonCSS(color),
86
- className: ['DGN-UI-Tab-Item', index === tabIndexState && !disabled ? 'selected' : '', className].join(' ').trim().replace(/\s+/g, ' '),
90
+ return jsx("div", {
91
+ css: _TabButtonCSS,
92
+ className: ['DGN-UI-Tab-Item', disabled ? 'disabled' : '', index === tabIndexState && !disabled ? 'selected' : '', className].join(' ').trim().replace(/\s+/g, ' '),
87
93
  style: style,
88
- disabled: disabled,
89
94
  onClick: _onClick,
90
95
  ref: ref,
91
- index: index,
92
96
  ...props
93
97
  }, startIcon && StartIcon, jsx(Typography, {
94
98
  type: level,
95
99
  color: 'inherit'
96
100
  }, label), children, endIcon && EndIcon, jsx(Ripple, null), jsx("span", {
97
- css: IndicatorCSS,
101
+ css: _IndicatorCSS,
98
102
  className: 'Indicator'
99
103
  }));
100
104
  }));
101
105
 
102
- const TabButtonCSS = color => css`
103
- ${flexRow}
104
- ${overflowHidden}
105
- ${alignCenter}
106
- ${justifyCenter}
107
- ${borderBox}
108
- ${cursorPointer}
109
- ${positionRelative}
110
- ${outlineNone}
111
- ${breakWord}
112
- ${whiteSpaceNoWrap}
106
+ const TabButtonCSS = (color, isVertical) => css`
107
+ ${flexRow};
108
+ ${overflowHidden};
109
+ ${alignCenter};
110
+ ${isVertical ? justifyStart : justifyCenter};
111
+ ${borderBox};
112
+ ${cursorPointer};
113
+ ${positionRelative};
114
+ ${outlineNone};
115
+ ${breakWord};
116
+ ${whiteSpaceNoWrap};
117
+ ${boxShadowNone};
118
+ ${!isVertical && textCenter};
113
119
  flex: 0 0 auto;
114
120
  background-color: ${white};
115
121
  border: 0;
116
- box-shadow: none;
117
- color: ${color || rest};
122
+ color: ${colors[color] || color || rest};
118
123
  max-width: 320px;
119
- min-width: 80px;
120
- padding: 10px 16px;
124
+ min-width: ${isVertical ? '264px' : '80px'};
125
+ padding: ${isVertical ? '14px 16px' : '10px 16px'};
121
126
  pointer-events: auto;
122
- text-decoration: none;
123
- text-rendering: auto;
124
127
  transition: all 0.2s ease-in-out, background-color 0.2s ease-in-out;
125
- vertical-align: middle;
126
- scroll-snap-align: auto;
127
- :disabled {
128
- ${pointerEventsNone}
129
- ${backgroundTransparent}
130
- color: ${systemDisabled};
131
- cursor: default;
128
+ &.disabled {
129
+ ${pointerEventsNone};
130
+ ${backgroundTransparent};
131
+ ${cursorDefault};
132
+ color: ${systemDisabled};
132
133
  }
133
134
  :hover,
134
135
  :focus:not(.selected):not(:disabled) {
@@ -136,7 +137,7 @@ const TabButtonCSS = color => css`
136
137
  color: ${rest};
137
138
  .Indicator {
138
139
  background-color: ${rest};
139
- transform: scaleX(1);
140
+ transform: scale(1);
140
141
  }
141
142
  }
142
143
  &.selected {
@@ -144,26 +145,28 @@ const TabButtonCSS = color => css`
144
145
  color: ${active};
145
146
  .Indicator {
146
147
  background-color: ${active};
147
- transform: scaleX(1);
148
+ transform: scale(1);
148
149
  }
149
150
  }
150
151
  `;
151
152
 
152
- const IndicatorCSS = css`
153
- ${positionAbsolute}
154
- height: 4px;
155
- width: 100%;
153
+ const IndicatorCSS = isVertical => css`
154
+ ${positionAbsolute};
155
+ height: ${isVertical ? '100%' : '4px'};
156
+ width: ${isVertical ? '4px' : '100%'};
156
157
  bottom: 0;
157
- transform: scaleX(0);
158
+ left: 0;
159
+ transform: ${isVertical ? 'scaleY(0)' : 'scaleX(0)'};
158
160
  transition: transform 0.2s ease-in-out;
159
161
  border-radius: 1px;
160
162
  `;
163
+
161
164
  const ButtonIconCSS = css`
162
- ${flexRow}
163
- ${alignCenter}
164
- ${justifyCenter}
165
- ${positionRelative}
166
- ${borderBox}
165
+ ${flexRow};
166
+ ${alignCenter};
167
+ ${justifyCenter};
168
+ ${positionRelative};
169
+ ${borderBox};
167
170
  max-height: 24px;
168
171
  max-width: 24px;
169
172
  margin-right: 4px;
@@ -179,42 +182,41 @@ TabItem.defaultProps = {
179
182
  style: {}
180
183
  };
181
184
  TabItem.propTypes = {
182
- /** color for Tabs */
185
+ /** Color for Tabs. */
183
186
  color: PropTypes.string,
184
187
 
185
- /** prevent all event if true */
188
+ /** If true, the component is disabled. */
186
189
  disabled: PropTypes.bool,
187
190
 
188
- /** object passed to add effects and to change location icons */
189
- iconStyle: PropTypes.object,
190
-
191
- /** index received in position of TabHeaderButton */
191
+ /** Index received in position of TabHeaderButton. */
192
192
  index: PropTypes.number,
193
193
 
194
- /** data string, if any */
194
+ /** Data string, if any. */
195
195
  label: PropTypes.string,
196
196
 
197
- /** element to display in Tabs (like text) */
197
+ /** Element to display in Tabs (like label). */
198
198
  children: PropTypes.node,
199
199
 
200
- /** icon to the left of the button */
200
+ /** Icon to the left of the button. */
201
201
  startIcon: PropTypes.node,
202
202
 
203
- /** icon to the right of the button */
203
+ /** Icon to the right of the button. */
204
204
  endIcon: PropTypes.node,
205
+
206
+ /** Callback fired when a "click" event is detected. */
205
207
  onClick: PropTypes.func,
206
208
 
207
- /** class for component */
209
+ /** Class for component. */
208
210
  className: PropTypes.string,
209
211
 
210
- /** style inline of component */
212
+ /** Style inline of component. */
211
213
  style: PropTypes.object,
212
214
 
213
- /** any props else */
215
+ /** Any props else. */
214
216
  props: PropTypes.any,
215
217
 
216
218
  /**
217
- * ref methods
219
+ * Ref methods.
218
220
  */
219
221
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
220
222
  current: PropTypes.instanceOf(Element)
package/icons/effect.js CHANGED
@@ -96,8 +96,8 @@ Icon.propTypes = {
96
96
  /** name of icon in icons store */
97
97
  name: PropTypes.string.isRequired,
98
98
 
99
- /** color of icon<br />
100
- * default: #7F828E
99
+ /** color of icon<br />
100
+ * default: #7F828E
101
101
  */
102
102
  color: PropTypes.string,
103
103
 
@@ -119,19 +119,19 @@ Icon.propTypes = {
119
119
  /** have view box if true */
120
120
  onClick: PropTypes.func,
121
121
 
122
- /**
123
- * ref methods
124
- *
125
- * * option(): Gets all UI component properties
126
- * * Returns value - object
127
- * * option(optionName): Gets the value of a single property
128
- * * @param {optionName} - string
129
- * * Returns value - any
130
- * * option(optionName, optionValue): Updates the value of a single property
131
- * * @param {optionName} - string
132
- * * @param {optionValue} - any
133
- * * option(options): Updates the values of several properties
134
- * * @param {options} - object
122
+ /**
123
+ * ref methods
124
+ *
125
+ * * option(): Gets all UI component properties
126
+ * * Returns value - object
127
+ * * option(optionName): Gets the value of a single property
128
+ * * @param {optionName} - string
129
+ * * Returns value - any
130
+ * * option(optionName, optionValue): Updates the value of a single property
131
+ * * @param {optionName} - string
132
+ * * @param {optionValue} - any
133
+ * * option(options): Updates the values of several properties
134
+ * * @param {options} - object
135
135
  */
136
136
  reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
137
137
  current: PropTypes.instanceOf(Element)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.42",
3
+ "version": "1.3.43",
4
4
  "description": "The DigiNet core ui",
5
5
  "homepage": "https://diginet.com.vn",
6
6
  "main": "index.js",
package/readme.md CHANGED
@@ -38,52 +38,68 @@ npm test
38
38
  ```
39
39
 
40
40
  ## Changelog
41
+ ## 1.3.43
42
+ - \[Added\]: MenuIcon – MHRM00N0002, MHRM39N0018, MHRM39N0019, MHRM00N0003, MHRM00N0004 , MHRM13N0002, MHRM13N0003, MHRM29N0004
43
+ - \[Changed\]: Checkbox - Add labelProps
44
+ - \[Changed\]: PagingInfo - Add case listPerPage not include itemsPerPage
45
+ - \[Changed\]: PagingInfo - Update design typeShort (Design update)
46
+ - \[Changed\]: Tab - Update vertical tab (Design update)
47
+ - \[Changed\]: Checkbox - Fix spacing & Update UI with New Design
48
+ - \[Changed\]: Toggle - Add props readOnly - update UI with new design
49
+ - \[Changed\]: Label - Reuse props of Typography component
50
+ - \[Changed\]: TextInput - Change logic showing error
51
+ - \[Fixed\]: TextInput - Optimize code, manage with hook useState
52
+ - \[Fixed\]: InputBase - Optimize code, manage with hook useState
53
+ - \[Fixed\]: DropdownBox - Change onChangeInput, delayOnInput according to new InputBase; Fix warning className
54
+ - \[Fixed\]: FormGroup - Fix bug css
55
+ - \[Fixed\]: NumberInput - Fix case VIE keyboard
56
+
41
57
  ## 1.3.42
42
- \[Added\]: Icon - MoneyHistory, Calculate, ShoppingCart
58
+ - \[Added\]: Icon - MoneyHistory, Calculate, ShoppingCart
43
59
 
44
60
  ## 1.3.41
45
- \[Fixed\]: DropdownBox - Fix zIndex
61
+ - \[Fixed\]: DropdownBox - Fix zIndex
46
62
 
47
63
  ## 1.3.40
48
- \[Fixed\]: Slider - Fix bug can't view https file
49
- \[Fixed\]: Typography - Fix word-wrap css
50
- \[Fixed\]: Slider - Fix bug not showing pdf file with blob url
64
+ - \[Fixed\]: Slider - Fix bug can't view https file
65
+ - \[Fixed\]: Typography - Fix word-wrap css
66
+ - \[Fixed\]: Slider - Fix bug not showing pdf file with blob url
51
67
 
52
68
  ## 1.3.39
53
- \[Added\]: MenuIcon - MHRM29N0003
69
+ - \[Added\]: MenuIcon - MHRM29N0003
54
70
 
55
71
  ## 1.3.38
56
- \[Added\]: System - Phát triển chuẩn zIndex
57
- \[Changed\]: NumberInput - Phát triển lại component NumberInput
58
- \[Fixed\]: Accordion - Fix bug Accordion auto expand when render; Add prop style, id; Fix css
59
- \[Fixed\]: Radio - Fix spacing & Update UI with New Design
60
- \[Fixed\]: Toggle - Fix Toggle when label is line-break, Update style Toggle with new Design
61
- \[Fixed\]: Divider - Fix width, height Divider
72
+ - \[Added\]: System - Phát triển chuẩn zIndex
73
+ - \[Changed\]: NumberInput - Phát triển lại component NumberInput
74
+ - \[Fixed\]: Accordion - Fix bug Accordion auto expand when render; Add prop style, id; Fix css
75
+ - \[Fixed\]: Radio - Fix spacing & Update UI with New Design
76
+ - \[Fixed\]: Toggle - Fix Toggle when label is line-break, Update style Toggle with new Design
77
+ - \[Fixed\]: Divider - Fix width, height Divider
62
78
 
63
79
  ## 1.3.37
64
- \[Added\]: Icon – EditNote, Payment
65
- \[Added\]: MenuIcon - MHRM29N0002
66
- \[Changed\]: Alert - Add white background behind opacity background color
67
- \[Changed\]: Tech - Add storybook for Colors
68
- \[Changed\]: Attachment - Add ref method openFileDialog
69
- \[Changed\]: Modal - Change position of Modal from center to top; Add prop alignment
70
- \[Changed\]: Icon - Remove duplicate icons
71
- \[Changed\]: Icon – Pdf, Word, Sheet
72
- \[Fixed\]: Slider - Fix bug not showing pdf file
73
- \[Fixed\]: Chip - Fix bug show wrong startIcon
74
- \[Fixed\]: ModalHeader - Fix css; Add prop showClose
75
- \[Fixed\]: Dropdown - Change error logic; Remove pointerEvent, userSelect when disabled; Add ref method setValue; Fix css disabled; Add prop onClosed
80
+ - \[Added\]: Icon – EditNote, Payment
81
+ - \[Added\]: MenuIcon - MHRM29N0002
82
+ - \[Changed\]: Alert - Add white background behind opacity background color
83
+ - \[Changed\]: Tech - Add storybook for Colors
84
+ - \[Changed\]: Attachment - Add ref method openFileDialog
85
+ - \[Changed\]: Modal - Change position of Modal from center to top; Add prop alignment
86
+ - \[Changed\]: Icon - Remove duplicate icons
87
+ - \[Changed\]: Icon – Pdf, Word, Sheet
88
+ - \[Fixed\]: Slider - Fix bug not showing pdf file
89
+ - \[Fixed\]: Chip - Fix bug show wrong startIcon
90
+ - \[Fixed\]: ModalHeader - Fix css; Add prop showClose
91
+ - \[Fixed\]: Dropdown - Change error logic; Remove pointerEvent, userSelect when disabled; Add ref method setValue; Fix css disabled; Add prop onClosed
76
92
 
77
93
  ## 1.3.36
78
- \[Added\]: MenuIcon - W05F0013N0000, MHRP39N0017, MHRM09N0005, MHRM13N0001
79
- \[Changed\]: Attachment - Add prop domain, isStripDomain
80
- \[Changed\]: Tooltip - Add className
81
- \[Changed\]: Avatar - Add Add lazyLoading
82
- \[Changed\]: Popover - Change transition; Add prop direction; Add description on storybook
83
- \[Changed\]: TECH - Hide unused components on storybook
84
- \[Changed\]: Typography - Add prop showTooltip to show tooltip when content is clamped
85
- \[Changed\]: DropdownBox - Add endIcon
86
- \[Fixed\]: Tooltip - Fix bug not show tooltip; Optimize code
94
+ - \[Added\]: MenuIcon - W05F0013N0000, MHRP39N0017, MHRM09N0005, MHRM13N0001
95
+ - \[Changed\]: Attachment - Add prop domain, isStripDomain
96
+ - \[Changed\]: Tooltip - Add className
97
+ - \[Changed\]: Avatar - Add Add lazyLoading
98
+ - \[Changed\]: Popover - Change transition; Add prop direction; Add description on storybook
99
+ - \[Changed\]: TECH - Hide unused components on storybook
100
+ - \[Changed\]: Typography - Add prop showTooltip to show tooltip when content is clamped
101
+ - \[Changed\]: DropdownBox - Add endIcon
102
+ - \[Fixed\]: Tooltip - Fix bug not show tooltip; Optimize code
87
103
 
88
104
  ## 1.3.35
89
105
  - \[Added\]: Icon - AssignmentTurnedIn, DGNProducts
package/utils/number.js CHANGED
@@ -1,7 +1,7 @@
1
- /**
2
- *
3
- * @param {String} value
4
- * @param {String} format
1
+ /**
2
+ *
3
+ * @param {String} value
4
+ * @param {String} format
5
5
  */
6
6
  export default function numberFormat(value, format) {
7
7
  let hashCount = 0;
@@ -44,8 +44,8 @@ export default function numberFormat(value, format) {
44
44
  //For case like +1 (911) 911 91 91 having pattern +1 (###) ### ## ##
45
45
 
46
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
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
49
  unless wrong prop value is provided */
50
50
 
51
51
  if (index === -1) {