diginet-core-ui 1.3.80 → 1.3.81

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.
@@ -1,61 +1,60 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
- import { memo, useEffect, useRef, useState, forwardRef, useImperativeHandle, Fragment, useCallback } from 'react';
4
- import { createPortal } from 'react-dom';
5
- import PropTypes from 'prop-types';
6
- import { jsx, css } from '@emotion/core';
7
- import useDelayUnmount from "../../../utils/useDelayUnmount";
8
- import Icon from "../../../icons";
9
- import { Button, ButtonIcon, Typography } from "../../";
3
+ import { css, jsx } from '@emotion/core';
4
+ import { Button, ButtonIcon, Icon, Typography } from "../..";
10
5
  import { getGlobal } from "../../../global";
11
- import { hexToRGBA } from "../../../styles/color-helper";
12
- import { capitalize } from "../../../utils";
6
+ import PropTypes from 'prop-types';
7
+ import { forwardRef, Fragment, memo, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
8
+ import { createPortal } from 'react-dom';
13
9
  import { animations } from "../../../styles/animation";
14
- import { alignCenter, border, borderBox, borderRadius4px, breakWord, cursorPointer, displayBlock, ellipsis, flexCol, flexRow, justifyCenter, justifyEnd, overflowAuto, overflowHidden, parseWidth, parseWidthHeight, positionFixed, positionRelative } from "../../../styles/general";
15
- import theme from "../../../theme/settings";
10
+ import { hexToRGBA } from "../../../styles/color-helper";
11
+ import { alignCenter, border, borderBox, borderRadius4px, borderRadius50, breakWord, cursorPointer, displayBlock, ellipsis, flexCol, flexRow, justifyCenter, justifyEnd, overflowAuto, overflowHidden, parseHeight, parseMaxWidthHeight, parseMinHeight, parseMinWidth, parseWidth, parseWidthHeight, positionFixed, positionRelative } from "../../../styles/general";
12
+ import { useTheme } from "../../../theme";
13
+ import { classNames, refType as ref, useDelayUnmount } from "../../../utils";
16
14
  const {
17
15
  colors: {
18
16
  system: {
19
- white
17
+ white: systemWhite
20
18
  },
21
19
  semantic: {
22
- success,
23
- warning,
24
- danger,
25
- info
20
+ success: semanticSuccess,
21
+ warning: semanticWarning,
22
+ danger: semanticDanger,
23
+ info: semanticInfo
26
24
  },
27
25
  fill: {
28
- 'scrollbar-tabbar': scrollbar,
29
- hover
26
+ 'scrollbar-tabbar': fillScrollbarTabbar,
27
+ hover: fillHover
30
28
  }
31
29
  },
32
30
  spacing,
33
31
  zIndex: zIndexCORE
34
- } = theme;
35
- const colorMap = new Map([['yesno', info], ['success', success], ['warning', warning], ['danger', danger], ['info', info]]);
32
+ } = useTheme();
33
+ const colorMap = new Map([['yesno', semanticInfo], ['success', semanticSuccess], ['warning', semanticWarning], ['danger', semanticDanger], ['info', semanticInfo]]);
36
34
  const titleMap = new Map([['yesno', 'notify'], ['success', 'confirm'], ['warning', 'warning'], ['danger', 'error'], ['info', 'notify']]);
37
35
  const iconMap = new Map([['yesno', 'Info'], ['success', 'ApprovalFilled'], ['warning', 'Warning'], ['danger', 'Failed'], ['info', 'Info']]);
38
36
  const fadeInDown = animations.fadeInDown;
39
37
  const fadeOutUp = animations.fadeOutUp;
40
38
  const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
41
- open,
42
- type,
43
- icon,
44
- title,
45
- subtitle,
46
- description,
47
- pressESCToClose,
39
+ action = {},
40
+ cancelProps,
48
41
  className,
49
- style,
42
+ confirmProps,
43
+ description,
44
+ icon,
45
+ noText,
46
+ onCancel,
50
47
  onClose,
51
48
  onConfirm,
52
- onCancel,
53
- confirmProps,
54
- cancelProps,
55
- width,
49
+ open,
50
+ pressESCToClose,
51
+ style,
52
+ subtitle,
53
+ title,
56
54
  top,
55
+ type,
56
+ width,
57
57
  yesText,
58
- noText,
59
58
  ...props
60
59
  }, reference) => {
61
60
  const ref = useRef(null);
@@ -73,7 +72,6 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
73
72
  };
74
73
  const onShowPopup = (options, cb) => {
75
74
  if (options && typeof options === 'object' && Object.keys(options).length) {
76
- var _newProps$title;
77
75
  const newProps = {
78
76
  type: options.type !== undefined ? options.type : type,
79
77
  title: options.title !== undefined ? options.title : title,
@@ -86,19 +84,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
86
84
  onCancel: cb ? () => cb(false) : options.onCancel !== undefined ? options.onCancel : onCancel,
87
85
  onConfirm: cb ? () => cb(true) : options.onConfirm !== undefined ? options.onConfirm : onConfirm
88
86
  };
89
- const popup = jsx(Fragment, null, jsx("div", {
90
- className: 'DGN-UI-Popup-Header ' + 'DGN-' + capitalize(newProps.type)
91
- }, jsx(Typography, {
92
- className: 'DGN-UI-Popup-Header-Title',
93
- type: 'h3',
94
- color: 'inherit'
95
- }, (_newProps$title = newProps.title) !== null && _newProps$title !== void 0 ? _newProps$title : getGlobal(titleMap.get(newProps.type))), jsx(ButtonIcon, {
96
- circular: true,
97
- viewType: 'text',
98
- color: type === 'yesno' ? 'info' : type,
99
- name: 'Close',
100
- onClick: () => onClosePopup('isClose')
101
- })), jsx("div", {
87
+ const popup = jsx(Fragment, null, PopupHeaderView(newProps.title, newProps.type), jsx("div", {
102
88
  className: 'DGN-UI-Popup-Body'
103
89
  }, newProps.icon !== false && jsx("div", {
104
90
  className: 'DGN-UI-Popup-Body-Icon'
@@ -111,21 +97,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
111
97
  className: 'DGN-UI-Popup-Body-Description'
112
98
  }, jsx(Typography, {
113
99
  type: 'p2'
114
- }, newProps.description))), (newProps.onConfirm || newProps.onCancel || newProps.type === 'yesno') && jsx("div", {
115
- className: 'DGN-UI-Popup-Action'
116
- }, (newProps.onConfirm || newProps.type === 'yesno') && jsx(Button, {
117
- viewType: 'filled',
118
- label: newProps.yesText || getGlobal('ok').toUpperCase(),
119
- color: newProps.type,
120
- onClick: newProps.onConfirm,
121
- ...newProps.confirmProps
122
- }), (newProps.onCancel || newProps.type === 'yesno') && jsx(Button, {
123
- viewType: 'outlined',
124
- label: newProps.noText || getGlobal('cancel').toUpperCase(),
125
- color: newProps.type,
126
- onClick: newProps.onCancel,
127
- ...newProps.cancelProps
128
- })));
100
+ }, newProps.description))), PopupActionView(newProps.onConfirm, newProps.confirmProps, newProps.onCancel, newProps.cancelProps, newProps.type, newProps.yesText, newProps.noText));
129
101
  setCustom(popup);
130
102
  } else {
131
103
  setCustom(false);
@@ -175,7 +147,8 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
175
147
  const currentRef = ref.current || {};
176
148
  const _instance = {
177
149
  show: onShowPopup,
178
- close: onClosePopup
150
+ close: onClosePopup,
151
+ ...action
179
152
  }; // methods
180
153
  _instance.__proto__ = {}; // hidden methods
181
154
  currentRef.instance = _instance;
@@ -183,77 +156,86 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
183
156
  currentRef.close = onClosePopup;
184
157
  return currentRef;
185
158
  });
159
+ const PopupHeaderView = (title, type) => {
160
+ return jsx("div", {
161
+ className: 'DGN-UI-Popup-Header'
162
+ }, jsx(Typography, {
163
+ className: 'DGN-UI-Popup-Header-Title',
164
+ type: 'h3',
165
+ color: 'inherit'
166
+ }, title !== null && title !== void 0 ? title : getGlobal(titleMap.get(type))), jsx(ButtonIcon, {
167
+ circular: true,
168
+ viewType: 'text',
169
+ color: type === 'yesno' ? 'info' : type,
170
+ name: 'Close',
171
+ onClick: () => onClosePopup('isClose')
172
+ }));
173
+ };
174
+ const PopupBodyView = (icon, type, subtitle, description) => {
175
+ return jsx("div", {
176
+ className: 'DGN-UI-Popup-Body'
177
+ }, icon !== false && jsx("div", {
178
+ className: 'DGN-UI-Popup-Body-Icon'
179
+ }, jsx(Icon, {
180
+ name: icon === true ? iconMap.get(type) : icon,
181
+ width: 40,
182
+ height: 40,
183
+ color: colorMap.get(type)
184
+ })), jsx("div", {
185
+ className: 'DGN-UI-Popup-Body-Description'
186
+ }, jsx(Typography, {
187
+ type: 'p2'
188
+ }, subtitle && jsx(Typography, {
189
+ className: 'DGN-UI-Popup-Body-Subtitle',
190
+ fullWidth: true
191
+ }, subtitle), jsx(Typography, {
192
+ ref: onRefChange,
193
+ type: 'p2',
194
+ className: 'DGN-UI-Popup-Body-Detail'
195
+ }, description), (subtitle && descriptionLines > 1 || descriptionLines > 3) && jsx("span", {
196
+ className: 'DGN-More-Action',
197
+ onClick: () => setShowMoreDescription(!showMoreDescription)
198
+ }, getGlobal(showMoreDescription ? 'showLess' : 'showMore')))));
199
+ };
200
+ const PopupActionView = (onConfirm, confirmProps, onCancel, cancelProps, type, yesText, noText) => {
201
+ return onConfirm || onCancel || type === 'yesno' ? jsx("div", {
202
+ className: 'DGN-UI-Popup-Action'
203
+ }, onConfirm || type === 'yesno' ? jsx(Button, {
204
+ viewType: 'filled',
205
+ label: yesText || getGlobal('ok').toUpperCase(),
206
+ color: type === 'yesno' ? 'info' : type,
207
+ onClick: () => {
208
+ onClosePopup('isConfirm');
209
+ onConfirm && onConfirm();
210
+ },
211
+ ...confirmProps
212
+ }) : null, onCancel || type === 'yesno' ? jsx(Button, {
213
+ viewType: 'outlined',
214
+ label: noText || getGlobal('cancel').toUpperCase(),
215
+ color: type === 'yesno' ? 'info' : type,
216
+ onClick: () => {
217
+ onClosePopup('isCancel');
218
+ onCancel && onCancel();
219
+ },
220
+ ...cancelProps
221
+ }) : null) : null;
222
+ };
186
223
  return showPopup && /*#__PURE__*/createPortal(jsx("div", {
187
224
  css: _PopupRootCSS,
188
225
  ref: ref,
189
226
  style: style,
190
- className: ['DGN-UI-Portal DGN-UI-Popup-Portal', className].join(' ').trim().replace(/\s+/g, ' ')
227
+ className: classNames('DGN-UI-Portal DGN-UI-Popup-Portal', className)
191
228
  }, jsx("div", {
192
229
  className: `DGN-UI-Popup ${openState ? 'DGN-Show' : 'DGN-Hide'}`,
193
230
  ...props
194
- }, custom ? custom : jsx(Fragment, null, jsx("div", {
195
- className: 'DGN-UI-Popup-Header ' + 'DGN-' + capitalize(type)
196
- }, jsx(Typography, {
197
- className: 'DGN-UI-Popup-Header-Title',
198
- type: 'h3',
199
- color: 'inherit'
200
- }, title !== null && title !== void 0 ? title : getGlobal(titleMap.get(type))), jsx(ButtonIcon, {
201
- circular: true,
202
- viewType: 'text',
203
- color: type === 'yesno' ? 'info' : type,
204
- name: 'Close',
205
- onClick: () => onClosePopup('isClose')
206
- })), jsx("div", {
207
- className: 'DGN-UI-Popup-Body'
208
- }, icon !== false && jsx("div", {
209
- className: 'DGN-UI-Popup-Body-Icon'
210
- }, jsx(Icon, {
211
- name: icon === true ? iconMap.get(type) : icon,
212
- width: 40,
213
- height: 40,
214
- color: colorMap.get(type)
215
- })), jsx("div", {
216
- className: 'DGN-UI-Popup-Body-Description'
217
- }, jsx(Typography, {
218
- type: 'p2'
219
- }, subtitle && jsx(Typography, {
220
- className: 'DGN-UI-Popup-Body-Subtitle',
221
- fullWidth: true
222
- }, subtitle), jsx(Typography, {
223
- ref: onRefChange,
224
- type: 'p2',
225
- className: 'DGN-UI-Popup-Body-Detail'
226
- }, description), (subtitle && descriptionLines > 1 || descriptionLines > 3) && jsx("span", {
227
- className: 'DGN-More-Action',
228
- onClick: () => setShowMoreDescription(!showMoreDescription)
229
- }, getGlobal(showMoreDescription ? 'showLess' : 'showMore'))))), (onConfirm || onCancel || type === 'yesno') && jsx("div", {
230
- className: 'DGN-UI-Popup-Action'
231
- }, (onConfirm || type === 'yesno') && jsx(Button, {
232
- viewType: 'filled',
233
- label: yesText || getGlobal('ok'),
234
- color: type === 'yesno' ? 'info' : type,
235
- onClick: () => {
236
- onClosePopup('isConfirm');
237
- onConfirm && onConfirm();
238
- },
239
- ...confirmProps
240
- }), (onCancel || type === 'yesno') && jsx(Button, {
241
- viewType: 'outlined',
242
- label: noText || getGlobal('cancel'),
243
- color: type === 'yesno' ? 'info' : type,
244
- onClick: () => {
245
- onClosePopup('isCancel');
246
- onCancel && onCancel();
247
- },
248
- ...cancelProps
249
- }))))), document.body);
231
+ }, custom ? custom : jsx(Fragment, null, PopupHeaderView(title, type), PopupBodyView(icon, type, subtitle, description), PopupActionView(onConfirm, confirmProps, onCancel, cancelProps, type, yesText, noText)))), document.body);
250
232
  }));
251
233
  const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescription, descriptionLines) => css`
252
234
  ${flexRow};
253
235
  ${positionFixed};
254
236
  ${justifyCenter};
255
237
  ${breakWord};
256
- ${parseWidthHeight('100%')}
238
+ ${parseWidthHeight('100%')};
257
239
  top: 0;
258
240
  left: 0;
259
241
  inset: 0;
@@ -263,12 +245,10 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
263
245
  ${flexCol};
264
246
  ${borderRadius4px};
265
247
  ${borderBox};
266
- ${parseWidth(width)};
267
- height: fit-content;
268
- max-width: 80%;
269
- max-height: 80%;
248
+ ${parseWidthHeight(width, 'fit-content')};
249
+ ${parseMaxWidthHeight('80%')};
270
250
  margin: ${isNaN(top) ? top : top + 'px'} auto auto;
271
- background-color: ${white};
251
+ background-color: ${systemWhite};
272
252
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);
273
253
  &.DGN-Show {
274
254
  animation: ${fadeInDown} 0.2s ease;
@@ -280,13 +260,13 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
280
260
  .DGN-UI-Popup-Header {
281
261
  ${flexRow};
282
262
  ${alignCenter};
283
- min-height: 40px;
263
+ ${parseMinHeight(40)};
284
264
  padding: ${spacing([0, 2, 0, 4])};
285
265
  border-radius: 4px 4px 0px 0px;
286
266
  .DGN-UI-Popup-Header-Title {
287
267
  ${flexRow};
288
268
  ${ellipsis};
289
- width: calc(100% - 24px);
269
+ ${parseWidth('calc(100% - 24px)')};
290
270
  }
291
271
  color: ${colorMap.get(type)};
292
272
  background-color: ${hexToRGBA(colorMap.get(type), 0.15)};
@@ -300,34 +280,34 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
300
280
  &::-webkit-scrollbar {
301
281
  ${borderRadius4px};
302
282
  ${parseWidth(24)};
303
- background-color: ${white} !important;
283
+ background-color: ${systemWhite} !important;
304
284
  }
305
285
  &::-webkit-scrollbar-thumb {
306
286
  ${border(8, 'transparent')};
307
287
  border-radius: 24px;
308
288
  mix-blend-mode: normal;
309
- background-color: ${scrollbar} !important;
289
+ background-color: ${fillScrollbarTabbar} !important;
310
290
  background-clip: content-box;
311
291
  }
312
292
  &::-webkit-scrollbar-thumb:hover {
313
293
  ${border(8, 'transparent')};
314
294
  border-radius: 24px;
315
295
  mix-blend-mode: normal;
316
- background-color: ${hover} !important;
296
+ background-color: ${fillHover} !important;
317
297
  background-clip: content-box;
318
298
  }
319
299
  .DGN-UI-Popup-Body-Icon {
320
300
  ${displayBlock};
301
+ ${borderRadius50};
321
302
  ${parseWidth(40)};
322
303
  margin-right: ${spacing([4])};
323
- border-radius: 50%;
324
304
  }
325
305
  .DGN-UI-Popup-Body-Description {
326
306
  ${flexRow};
327
307
  ${positionRelative};
328
308
  ${alignCenter};
329
- min-height: 40px;
330
- height: max-content;
309
+ ${parseMinHeight(40)};
310
+ ${parseHeight('max-content')};
331
311
  .DGN-UI-Popup-Body-Subtitle {
332
312
  margin-bottom: ${(description === null || description === void 0 ? void 0 : description.length) > 0 ? spacing([2]) : spacing([0])};
333
313
  }
@@ -345,7 +325,7 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
345
325
  margin-top: ${spacing([4])};
346
326
  margin-bottom: ${type === 'yesno' ? spacing([0]) : spacing([2])};
347
327
  text-decoration: underline;
348
- color: ${info};
328
+ color: ${semanticInfo};
349
329
  }
350
330
  }
351
331
  }
@@ -354,8 +334,8 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
354
334
  ${justifyEnd};
355
335
  padding: ${spacing([2, 4, 4, 4])};
356
336
  .DGN-UI-Button {
337
+ ${parseMinWidth(80)};
357
338
  margin: 0;
358
- min-width: 80px;
359
339
  &.filled {
360
340
  margin-right: ${spacing([2])};
361
341
  }
@@ -364,14 +344,14 @@ const PopupRootCSS = (width, top, type, description, subtitle, showMoreDescripti
364
344
  }
365
345
  `;
366
346
  Popup.defaultProps = {
347
+ className: '',
348
+ icon: true,
367
349
  open: false,
368
350
  pressESCToClose: false,
369
- icon: true,
370
- width: 480,
351
+ style: {},
371
352
  top: 56,
372
353
  type: 'info',
373
- className: '',
374
- style: {}
354
+ width: 480
375
355
  };
376
356
  Popup.propTypes = {
377
357
  /** If `true`, the component is shown. */
@@ -383,7 +363,7 @@ Popup.propTypes = {
383
363
  /** [Props](https://core.diginet.com.vn/ui/?path=/story/button) applied to the confirm `Button`. */
384
364
  confirmProps: PropTypes.object,
385
365
  /** Details content of the component. */
386
- description: PropTypes.string,
366
+ description: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
387
367
  /** [Icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic) display before content. */
388
368
  icon: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
389
369
  /** Label of cancel button. */
@@ -422,8 +402,6 @@ Popup.propTypes = {
422
402
  * * Callback fired after click on button (callback(true) with confirm Button and callback(false) with cancel Button). Alternate both onCancel, onConfirm methods of options
423
403
  * * close(): Close popup
424
404
  */
425
- reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
426
- current: PropTypes.instanceOf(Element)
427
- })])
405
+ reference: ref
428
406
  };
429
407
  export default Popup;
@@ -254,7 +254,7 @@ const CircleMainCSS = color => css`
254
254
  const CircleMainDeterminateCSS = (circumference, percent, directionAngle, duration) => css`
255
255
  stroke-dasharray: ${`${circumference} ${circumference}`};
256
256
  stroke-dashoffset: ${circumference - validatePercent(percent) / 100 * circumference};
257
- transform: rotate(${directionAngle}deg);
257
+ // transform: rotate(${directionAngle}deg);
258
258
  transform-origin: center;
259
259
  transition: stroke-dashoffset ${duration}s cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
260
260
  `;
package/global/index.js CHANGED
@@ -16,7 +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
+ dropFileHere: 'Kéo và thả tập tin đính kèm vào đây',
20
20
  deleteNotifyText: 'Bạn có chắc muốn xóa (những) đính kèm này?',
21
21
  attachText: 'Đính kèm',
22
22
  errorDefault: {
package/icons/basic.js CHANGED
@@ -2191,6 +2191,34 @@ export const FastRewind = /*#__PURE__*/memo(({
2191
2191
  fill: colors[color] || color
2192
2192
  }));
2193
2193
  });
2194
+ export const Feedback = /*#__PURE__*/memo(({
2195
+ width,
2196
+ height,
2197
+ color = '#7F828E',
2198
+ viewBox = false
2199
+ }) => {
2200
+ return viewBox ? /*#__PURE__*/React.createElement("svg", {
2201
+ width: width || 24,
2202
+ height: height || 24,
2203
+ viewBox: "0 0 24 24",
2204
+ fill: "none"
2205
+ }, /*#__PURE__*/React.createElement("path", {
2206
+ fillRule: "evenodd",
2207
+ clipRule: "evenodd",
2208
+ d: "M20 2H4C2.9 2 2.01 2.9 2.01 4L2 22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM13 14H11V12H13V14ZM11 10H13V6H11V10Z",
2209
+ fill: colors[color] || color
2210
+ })) : /*#__PURE__*/React.createElement("svg", {
2211
+ width: width || 20,
2212
+ height: height || 20,
2213
+ viewBox: "0 0 20 20",
2214
+ fill: "none"
2215
+ }, /*#__PURE__*/React.createElement("path", {
2216
+ fillRule: "evenodd",
2217
+ clipRule: "evenodd",
2218
+ d: "M18 0H2C0.9 0 0.01 0.9 0.01 2L0 20L4 16H18C19.1 16 20 15.1 20 14V2C20 0.9 19.1 0 18 0ZM11 12H9V10H11V12ZM9 8H11V4H9V8Z",
2219
+ fill: colors[color] || color
2220
+ }));
2221
+ });
2194
2222
  export const Filter = /*#__PURE__*/memo(({
2195
2223
  width,
2196
2224
  height,
@@ -3773,6 +3801,30 @@ export const NearMe = /*#__PURE__*/memo(({
3773
3801
  fill: colors[color] || color
3774
3802
  }));
3775
3803
  });
3804
+ export const Newspaper = /*#__PURE__*/memo(({
3805
+ width,
3806
+ height,
3807
+ color = '#7F828E',
3808
+ viewBox = false
3809
+ }) => {
3810
+ return viewBox ? /*#__PURE__*/React.createElement("svg", {
3811
+ width: width || 24,
3812
+ height: height || 24,
3813
+ viewBox: "0 0 24 24",
3814
+ fill: "none"
3815
+ }, /*#__PURE__*/React.createElement("path", {
3816
+ d: "M22 3L20.33 4.67L18.67 3L17 4.67L15.33 3L13.67 4.67L12 3L10.33 4.67L8.67 3L7 4.67L5.33 3L3.67 4.67L2 3V19C2 20.1 2.9 21 4 21H20C21.1 21 22 20.1 22 19V3ZM11 19H4V13H11V19ZM20 19H13V17H20V19ZM20 15H13V13H20V15ZM20 11H4V8H20V11Z",
3817
+ fill: colors[color] || color
3818
+ })) : /*#__PURE__*/React.createElement("svg", {
3819
+ width: width || 20,
3820
+ height: height || 18,
3821
+ viewBox: "0 0 20 18",
3822
+ fill: "none"
3823
+ }, /*#__PURE__*/React.createElement("path", {
3824
+ d: "M20 0L18.33 1.67L16.67 0L15 1.67L13.33 0L11.67 1.67L10 0L8.33 1.67L6.67 0L5 1.67L3.33 0L1.67 1.67L0 0V16C0 17.1 0.9 18 2 18H18C19.1 18 20 17.1 20 16V0ZM9 16H2V10H9V16ZM18 16H11V14H18V16ZM18 12H11V10H18V12ZM18 8H2V5H18V8Z",
3825
+ fill: colors[color] || color
3826
+ }));
3827
+ });
3776
3828
  export const Ninedot = /*#__PURE__*/memo(({
3777
3829
  width,
3778
3830
  height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.80",
3
+ "version": "1.3.81",
4
4
  "description": "The DigiNet core ui",
5
5
  "homepage": "https://diginet.com.vn",
6
6
  "main": "index.js",
package/readme.md CHANGED
@@ -38,6 +38,16 @@ npm test
38
38
  ```
39
39
 
40
40
  ## Changelog
41
+ ## 1.3.81
42
+ - \[Added\]: Icon – Feedback, Newspaper
43
+ - \[Changed\]: Button – Add prop href, urlParams
44
+ - \[Changed\]: Divider – Allow using CORE colors
45
+ - \[Fixed\]: Attachment – Fix callback return attached items not file type; Optimize code
46
+ - \[Fixed\]: PopupV2 – Fix warning prop description
47
+ - \[Fixed\]: Popover – Fix backdrop scroll when show popover
48
+ - \[Fixed\]: DateRangePicker – Fix cannot click end icon
49
+ - \[Fixed\]: CircularProgress – Temporary fix transform rotate inside flex column
50
+
41
51
  ## 1.3.80
42
52
  - \[Changed\]: ButtonMore – Update Button More with new design
43
53
  - \[Changed\]: BABEL – Add babel-plugin-module-resolver
@@ -1,12 +0,0 @@
1
- export default ((width, height) => ({
2
- vertical: `
3
- width: ${isNaN(width) ? width : width + 'px'};
4
- height: 100%;
5
- margin: auto 5px;
6
- `,
7
- horizontal: `
8
- width: 100%;
9
- height: ${isNaN(height) ? height : height + 'px'};
10
- margin: 5px auto;
11
- `
12
- }));