diginet-core-ui 1.4.57 → 1.4.58-beta.1.1
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.
- package/assets/images/menu/dhr/MHRP29N0035.svg +13 -0
- package/assets/images/menu/dhr/MHRP29N0036.svg +14 -0
- package/components/accordion/details.js +1 -1
- package/components/accordion/group.js +1 -1
- package/components/accordion/index.js +1 -1
- package/components/accordion/summary.js +1 -1
- package/components/alert/index.js +1 -1
- package/components/alert/notify.js +1 -1
- package/components/avatar/index.js +2 -2
- package/components/badge/index.js +1 -1
- package/components/breadcrumb/index.js +1 -1
- package/components/button/icon.js +1 -1
- package/components/button/index.js +1 -1
- package/components/button/more.js +2 -2
- package/components/button/ripple-effect.js +1 -1
- package/components/card/body.js +1 -1
- package/components/card/extra.js +1 -1
- package/components/card/footer.js +1 -1
- package/components/card/header.js +1 -1
- package/components/card/index.js +1 -1
- package/components/chart/Pie/Circle.js +1 -1
- package/components/chart/Pie/Sector.js +1 -1
- package/components/chart/Pie/index.js +1 -1
- package/components/chart/Pie-v2/Circle.js +1 -1
- package/components/chart/Pie-v2/Sector.js +1 -1
- package/components/chart/Pie-v2/index.js +1 -1
- package/components/chart/bar/Bar.js +1 -1
- package/components/chart/bar/index.js +1 -1
- package/components/chart/bar-v2/Bar.js +1 -1
- package/components/chart/bar-v2/index.js +1 -1
- package/components/chart/line/index.js +1 -1
- package/components/chart/line-v2/index.js +1 -1
- package/components/check-text/index.js +1 -1
- package/components/check-text/interview-confirmation.js +1 -1
- package/components/check-text/interview-status.js +1 -1
- package/components/chip/index.js +1 -1
- package/components/collapse/index.js +1 -1
- package/components/divider/index.js +1 -1
- package/components/form-control/attachment/index.js +22 -22
- package/components/form-control/calendar/function.js +1 -1
- package/components/form-control/calendar/index.js +2 -2
- package/components/form-control/calendar/range.js +1 -1
- package/components/form-control/checkbox/index.js +1 -1
- package/components/form-control/control/index.js +1 -1
- package/components/form-control/date-input/index.js +1 -1
- package/components/form-control/date-picker/index.js +1 -1
- package/components/form-control/date-range-picker/index.js +2 -1
- package/components/form-control/dropdown/index.js +7 -4
- package/components/form-control/dropdown-box/index.js +64 -22
- package/components/form-control/form-group/index.js +1 -1
- package/components/form-control/helper-text/index.js +1 -1
- package/components/form-control/input-base/UncontrolledInputBase.js +1 -1
- package/components/form-control/input-base/index.js +1 -1
- package/components/form-control/label/index.js +1 -1
- package/components/form-control/money-input/index.js +1 -1
- package/components/form-control/number-input/index2.js +40 -16
- package/components/form-control/password-input/index.js +1 -1
- package/components/form-control/phone-input/index.js +1 -1
- package/components/form-control/radio/index.js +1 -1
- package/components/form-control/text-input/index.js +1 -1
- package/components/form-control/time-picker/index.js +1 -1
- package/components/form-control/time-picker/v2/index.js +1 -1
- package/components/form-control/toggle/index.js +1 -1
- package/components/form-view/input.js +1 -1
- package/components/grid/index.js +1 -1
- package/components/image/index.js +1 -1
- package/components/list/list-item-action.js +1 -1
- package/components/list/list-item-icon.js +1 -1
- package/components/list/list-item-text.js +1 -1
- package/components/list/list-item.js +1 -1
- package/components/list/list.js +1 -1
- package/components/list/sub-header.js +1 -1
- package/components/modal/body.js +1 -1
- package/components/modal/footer.js +1 -1
- package/components/modal/header.js +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.js +1 -1
- package/components/others/option-wrapper/index.js +1 -1
- package/components/paging/page-info.js +35 -35
- package/components/paging/page-selector.js +1 -1
- package/components/paper/index.js +1 -1
- package/components/popover/body.js +1 -1
- package/components/popover/footer.js +1 -1
- package/components/popover/header.js +1 -1
- package/components/popover/index.js +14 -14
- package/components/popup/index.js +1 -1
- package/components/popup/v2/index.js +1 -1
- package/components/progress/circular.js +1 -1
- package/components/progress/linear.js +1 -1
- package/components/rating/index.js +1 -1
- package/components/skeleton/index.js +1 -1
- package/components/slider/slider-container.js +1 -1
- package/components/slider/slider-item.js +1 -1
- package/components/status/index.js +1 -1
- package/components/tab/tab-container.js +1 -1
- package/components/tab/tab-header.js +1 -1
- package/components/tab/tab-panel.js +1 -1
- package/components/tab/tab.js +1 -1
- package/components/tooltip/index.js +1 -1
- package/components/transfer/index.js +1 -1
- package/components/tree-view/index.js +1 -1
- package/components/typography/index.js +1 -1
- package/icons/basic.js +76 -0
- package/icons/effect.js +1 -1
- package/icons/menu/v2/index.js +1 -1
- package/package.json +78 -44
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2445_39)">
|
|
3
|
+
<path d="M27.9999 32.8V26C27.9999 24.9 27.0999 24 25.9999 24H12.9999C11.8999 24 10.9999 24.9 10.9999 26V32.8C9.19988 32.2 7.89988 30.4 8.19988 28.4L9.09988 22.4C9.39988 20.5 11.0999 19 13.0999 19H25.8999C27.8999 19 29.5999 20.4 29.8999 22.4L30.7999 28.4C31.0999 30.4 29.7999 32.3 27.9999 32.8Z" fill="#2680EB"/>
|
|
4
|
+
<path d="M19.5002 17.8C22.4002 17.8 24.8002 15.4 24.8002 12.4C24.8002 9.4 22.4002 7 19.5002 7C16.6002 7 14.2002 9.5 14.2002 12.4C14.2002 15.4 16.6002 17.8 19.5002 17.8Z" fill="#2680EB"/>
|
|
5
|
+
<path d="M26 25H13C12.5 25 12 25.5 12 26V34C12 34.5 12.5 35 13 35H26C26.5 35 27 34.5 27 34V26C27 25.5 26.5 25 26 25ZM19.5 31.5C18.7 31.5 18 30.8 18 30C18 29.2 18.7 28.5 19.5 28.5C20.3 28.5 21 29.2 21 30C21 30.8 20.3 31.5 19.5 31.5Z" fill="#FF8C00"/>
|
|
6
|
+
<path d="M37.8 13.4L21.9 0.700024C20.8 -0.199976 19.1 -0.199976 18 0.700024L11.3 5.80002V4.20002C11.3 3.00002 10.3 2.00002 9.1 2.00002H6.1C4.9 2.00002 3.9 3.00002 3.9 4.20002V11.1C3.9 11.2 3.9 11.2 3.9 11.3L1.2 13.3C0.5 14 0 15 0 16V35.8C0 37.5 1.4 39 3.2 39H35.8C37.6 39 39 37.5 39 35.8V15.9C39 14.9 38.6 14 37.8 13.4ZM6.4 4.40002H8.9V7.50002L6.4 9.50002V4.40002ZM36.5 35.8C36.5 36.2 36.2 36.6 35.8 36.6H3.2C2.8 36.6 2.5 36.3 2.5 35.8V16C2.5 15.8 2.6 15.5 2.8 15.4L5.6 13.3L8.7 10.9L8.9 10.7L11.4 8.80002L19.5 2.60002C19.6 2.50002 19.8 2.50002 19.9 2.50002C20.1 2.50002 20.2 2.50002 20.4 2.70002L36.3 15.4C36.5 15.5 36.6 15.8 36.6 16V35.8H36.5Z" fill="#2680EB"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="clip0_2445_39">
|
|
10
|
+
<rect width="39" height="39" fill="white"/>
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2445_40)">
|
|
3
|
+
<path d="M21.8 20.7C20.5 21.8 19.4 23.3 18.8 25C18.8 25.1 18.8 25.1 18.7 25.2H9.90003C8.90003 25.2 8.10003 26 8.10003 27V33.0999C6.40003 32.5999 5.30003 30.9 5.60003 29.1L6.40003 23.7C6.70003 21.9 8.20003 20.7 9.90003 20.7H21.3C21.5 20.7 21.7 20.7 21.8 20.7Z" fill="#2680EB"/>
|
|
4
|
+
<path d="M15.6999 19.6C18.2999 19.6 20.3999 17.4 20.3999 14.8C20.3999 12.1 18.2999 10 15.5999 10C12.9999 10 10.8999 12.2 10.8999 14.8C10.8999 17.5 13.0999 19.7 15.6999 19.6Z" fill="#2680EB"/>
|
|
5
|
+
<path d="M18 29C18 28 18.1 27 18.4 26.1H9.9C9.4 26.1 9 26.5 9 27V34.1C9 34.6 9.4 35 9.9 35H19.8C18.7 33.3 18 31.2 18 29ZM15.7 31.9C15 31.9 14.4 31.3 14.4 30.6C14.4 29.8 15 29.3 15.7 29.3C16.4 29.3 17 29.9 17 30.6C17 31.3 16.4 31.9 15.7 31.9Z" fill="#FF8C00"/>
|
|
6
|
+
<path d="M37.8 13.4L21.9 0.700024C20.8 -0.199976 19.1 -0.199976 18 0.700024L11.3 5.80002V4.20002C11.3 3.00002 10.3 2.00002 9.1 2.00002H6.1C5 2.00002 4 3.00002 4 4.20002V11.1C4 11.2 4 11.3 4 11.3L1.3 13.3C0.5 14 0 15 0 16V35.8C0 37.6 1.4 39 3.2 39H24.4C23.1 38.4 21.9 37.6 21 36.5H3.2C2.8 36.5 2.5 36.2 2.5 35.7V16C2.5 15.7 2.6 15.5 2.8 15.4L5.6 13.3L8.7 10.9L8.9 10.7L11.4 8.80002L19.6 2.60002C19.7 2.50002 19.9 2.40002 20 2.40002C20.2 2.40002 20.3 2.50002 20.5 2.60002L36.4 15.3C36.6 15.4 36.7 15.7 36.7 15.9V20.9C37.7 21.9 38.6 23.1 39.2 24.3V15.8C39 14.9 38.6 14 37.8 13.4ZM8.9 7.60002L6.4 9.50002V4.50002H8.9V7.60002Z" fill="#2680EB"/>
|
|
7
|
+
<path d="M34.4 20.6C32.8 19.6 31 19 29 19C28.5 19 28.1 19 27.7 19.1C26.9 19.2 26 19.4 25.3 19.7C24.9 19.9 24.4 20.1 24 20.3C22 21.4 20.5 23.2 19.7 25.3C19.2 26.5 19 27.7 19 29C19 34.5 23.5 39 29 39C34.5 39 39 34.5 39 29C39 25.5 37.1 22.3 34.4 20.6ZM35.2 25.8L29.3 33.8C29 34.3 28.4 34.6 27.8 34.6H27.7C27.2 34.6 26.6 34.4 26.3 34L22.8 30.2C22.3 29.6 22.3 28.7 22.9 28.1C23.2 27.8 23.5 27.7 23.9 27.7C24.3 27.7 24.7 27.9 25 28.2L27.5 30.9L27.6 31C27.7 31 27.7 31 27.7 30.9L32.7 24.1C33 23.7 33.4 23.5 33.9 23.5C34.2 23.5 34.5 23.6 34.8 23.8C35.6 24.2 35.7 25.1 35.2 25.8Z" fill="#1CA261"/>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="clip0_2445_40">
|
|
11
|
+
<rect width="39" height="39" fill="white"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
</defs>
|
|
14
|
+
</svg>
|
|
@@ -7,7 +7,7 @@ import { boxBorder, overflowHidden, parseHeight, pointerEventsNone, positionRela
|
|
|
7
7
|
import { useTheme } from "../../theme";
|
|
8
8
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
9
9
|
import { classNames, getProp } from "../../utils";
|
|
10
|
-
const AccordionDetails = /*#__PURE__*/memo(
|
|
10
|
+
const AccordionDetails = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
if (!reference) reference = useRef(null);
|
|
12
12
|
const theme = useTheme();
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ import { borderRadius, borderRadius4px } from "../../styles/general";
|
|
|
7
7
|
import { useTheme } from "../../theme";
|
|
8
8
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
9
9
|
import { classNames } from "../../utils";
|
|
10
|
-
const AccordionGroup = /*#__PURE__*/memo(
|
|
10
|
+
const AccordionGroup = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
if (!reference) reference = useRef(null);
|
|
12
12
|
const theme = useTheme();
|
|
13
13
|
|
|
@@ -45,7 +45,7 @@ const handleTransition = (timer, el, beginHeight, endHeight = null) => {
|
|
|
45
45
|
el.style.height = endHeight;
|
|
46
46
|
}, duration);
|
|
47
47
|
};
|
|
48
|
-
const Accordion = /*#__PURE__*/memo(
|
|
48
|
+
const Accordion = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
49
49
|
var _ref$current;
|
|
50
50
|
if (!reference) reference = useRef(null);
|
|
51
51
|
const theme = useTheme();
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../theme";
|
|
|
9
9
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../utils";
|
|
11
11
|
import AccordionContext from "./context";
|
|
12
|
-
const AccordionSummary = /*#__PURE__*/memo(
|
|
12
|
+
const AccordionSummary = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
const {
|
|
@@ -15,7 +15,7 @@ const primaryTypoMap = new Map([['tiny', 'typography.heading5'], ['small', 'typo
|
|
|
15
15
|
const iconSizeMap = new Map([['tiny', 16], ['small', 20], ['medium', 24]]);
|
|
16
16
|
const linearProgressSizeMap = new Map([['tiny', 2], ['small', 3], ['medium', 4]]);
|
|
17
17
|
const transitionTime = 300;
|
|
18
|
-
const Alert = /*#__PURE__*/memo(
|
|
18
|
+
const Alert = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
19
19
|
if (!reference) reference = useRef(null);
|
|
20
20
|
const theme = useTheme();
|
|
21
21
|
const {
|
|
@@ -27,7 +27,7 @@ const positionHorizontalMap = new Map([['left', css`
|
|
|
27
27
|
`], ['right', css`
|
|
28
28
|
right: 15px;
|
|
29
29
|
`]]);
|
|
30
|
-
const Notify = /*#__PURE__*/memo(
|
|
30
|
+
const Notify = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
31
31
|
if (!reference) reference = useRef(null);
|
|
32
32
|
const theme = useTheme();
|
|
33
33
|
|
|
@@ -22,7 +22,7 @@ const checkFileType = (type, matchType) => {
|
|
|
22
22
|
return new RegExp(matchType).test(type);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Avatar = /*#__PURE__*/memo(
|
|
25
|
+
const Avatar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
26
26
|
if (!reference) reference = useRef(null);
|
|
27
27
|
const theme = useTheme();
|
|
28
28
|
|
|
@@ -108,7 +108,7 @@ const Avatar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) =
|
|
|
108
108
|
!!onRemove && onRemove();
|
|
109
109
|
};
|
|
110
110
|
const renderData = () => {
|
|
111
|
-
if (
|
|
111
|
+
if (/*#__PURE__*/isValidElement(data)) return data;
|
|
112
112
|
const info = Object.keys(data || {});
|
|
113
113
|
if (info !== null && info !== void 0 && info.length) {
|
|
114
114
|
return info.map((key, index) => {
|
|
@@ -57,7 +57,7 @@ const calDotPos = (anchorOrigin, contentDirection, dotSize, hasContent, size) =>
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
const Badge = /*#__PURE__*/memo(
|
|
60
|
+
const Badge = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
61
61
|
if (!reference) reference = useRef(null);
|
|
62
62
|
const theme = useTheme();
|
|
63
63
|
const {
|
|
@@ -14,7 +14,7 @@ import { classNames, getProp } from "../../utils";
|
|
|
14
14
|
const sizeIconMap = new Map([['tiny', 16], ['small', 18], ['medium', 20]]);
|
|
15
15
|
const sizeTypographyPMap = new Map([['tiny', 'p3'], ['small', 'p2'], ['medium', 'p1']]);
|
|
16
16
|
const sizeTypographyHMap = new Map([['tiny', 'h5'], ['small', 'h4'], ['medium', 'h3']]);
|
|
17
|
-
const Breadcrumb = /*#__PURE__*/memo(
|
|
17
|
+
const Breadcrumb = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
18
18
|
if (!reference) reference = useRef(null);
|
|
19
19
|
const theme = useTheme();
|
|
20
20
|
const {
|
|
@@ -48,7 +48,7 @@ const IconLoadingView = iconSize => {
|
|
|
48
48
|
width: parseInt(iconSize)
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
const ButtonIcon = /*#__PURE__*/memo(
|
|
51
|
+
const ButtonIcon = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
52
52
|
var _sizeMap$get, _sizeMap$get2;
|
|
53
53
|
if (!reference) reference = useRef(null);
|
|
54
54
|
const theme = useTheme();
|
|
@@ -55,7 +55,7 @@ const typographySizeMap = new Map([['tiny', 'h5'], ['small', 'h5'], ['medium', '
|
|
|
55
55
|
const minHeightSizeMap = new Map([['tiny', '24px'], ['small', '32px'], ['medium', '40px'], ['large', '48px'], ['giant', '56px']]);
|
|
56
56
|
const minHeightSizeLinkMap = new Map([['tiny', '16px'], ['small', '20px'], ['medium', '24px'], ['large', '32px'], ['giant', '40px']]);
|
|
57
57
|
const alphaLoading = 0.2;
|
|
58
|
-
const Button = /*#__PURE__*/memo(
|
|
58
|
+
const Button = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
59
59
|
var _iconSizeMap;
|
|
60
60
|
if (!reference) reference = useRef(null);
|
|
61
61
|
const theme = useTheme();
|
|
@@ -9,7 +9,7 @@ import { bgColor, borderNone, cursorPointer, displayFlex, flexCol, flexRow, item
|
|
|
9
9
|
import { useTheme } from "../../theme";
|
|
10
10
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
11
11
|
import { classNames, getProp } from "../../utils";
|
|
12
|
-
const ButtonMore = /*#__PURE__*/memo(
|
|
12
|
+
const ButtonMore = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
|
|
@@ -58,7 +58,7 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referenc
|
|
|
58
58
|
});
|
|
59
59
|
const renderOptions = () => {
|
|
60
60
|
return options.map((item, idx) => {
|
|
61
|
-
if (item !== null && item !== void 0 && item.hidden) return null;else if (
|
|
61
|
+
if (item !== null && item !== void 0 && item.hidden) return null;else if (/*#__PURE__*/isValidElement(item)) return item;else {
|
|
62
62
|
const icon = item === null || item === void 0 ? void 0 : item.icon;
|
|
63
63
|
const label = item === null || item === void 0 ? void 0 : item.label;
|
|
64
64
|
const className = (item === null || item === void 0 ? void 0 : item.className) || '';
|
|
@@ -13,7 +13,7 @@ const useDebouncedRippleCleanUp = (rippleCount, duration, cleanUpFunction) => {
|
|
|
13
13
|
return undefined;
|
|
14
14
|
}, [rippleCount, duration, cleanUpFunction]);
|
|
15
15
|
};
|
|
16
|
-
const Ripple = /*#__PURE__*/memo(
|
|
16
|
+
const Ripple = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
17
17
|
duration = 850,
|
|
18
18
|
color = 'system/standard',
|
|
19
19
|
circular = false,
|
package/components/card/body.js
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
7
7
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, refType as ref } from "../../utils";
|
|
9
|
-
const CardBody = /*#__PURE__*/memo(
|
|
9
|
+
const CardBody = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
10
10
|
if (!reference) reference = useRef(null);
|
|
11
11
|
|
|
12
12
|
// props priority: `inProps` > `themeDefaultProps`
|
package/components/card/extra.js
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
7
7
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, refType as ref } from "../../utils";
|
|
9
|
-
const CardExtra = /*#__PURE__*/memo(
|
|
9
|
+
const CardExtra = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
10
10
|
if (!reference) reference = useRef(null);
|
|
11
11
|
|
|
12
12
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
7
7
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, refType as ref } from "../../utils";
|
|
9
|
-
const CardFooter = /*#__PURE__*/memo(
|
|
9
|
+
const CardFooter = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
10
10
|
if (!reference) reference = useRef(null);
|
|
11
11
|
|
|
12
12
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
8
8
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
9
9
|
import { classNames, refType as ref } from "../../utils";
|
|
10
|
-
const CardHeader = /*#__PURE__*/memo(
|
|
10
|
+
const CardHeader = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
if (!reference) reference = useRef(null);
|
|
12
12
|
|
|
13
13
|
// props priority: `inProps` > `themeDefaultProps`
|
package/components/card/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { CardBody } from "./body";
|
|
|
12
12
|
import { CardFooter } from "./footer";
|
|
13
13
|
import CardHeader from "./header";
|
|
14
14
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
15
|
-
const Card = /*#__PURE__*/memo(
|
|
15
|
+
const Card = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
16
16
|
if (!reference) reference = useRef(null);
|
|
17
17
|
const theme = useTheme();
|
|
18
18
|
const {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { memo, forwardRef } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
|
-
const Circle = /*#__PURE__*/memo(
|
|
6
|
+
const Circle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
7
|
center,
|
|
8
8
|
color,
|
|
9
9
|
onMouseEnter,
|
|
@@ -4,7 +4,7 @@ import { useRef, memo, forwardRef } from 'react';
|
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import { jsx, css } from '@emotion/core';
|
|
7
|
-
const Sector = /*#__PURE__*/memo(
|
|
7
|
+
const Sector = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
8
8
|
fill,
|
|
9
9
|
strokeColor,
|
|
10
10
|
strokeLinejoin,
|
|
@@ -7,7 +7,7 @@ import { jsx, css } from '@emotion/core';
|
|
|
7
7
|
import Circle from "./Circle";
|
|
8
8
|
import Sectors from "./Sectors";
|
|
9
9
|
import Sector from "./Sector";
|
|
10
|
-
const PieChart = /*#__PURE__*/memo(
|
|
10
|
+
const PieChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
11
11
|
expandOnHover,
|
|
12
12
|
renderSelectedItem,
|
|
13
13
|
type,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { memo, forwardRef } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
|
-
const Circle = /*#__PURE__*/memo(
|
|
6
|
+
const Circle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
7
|
center,
|
|
8
8
|
color,
|
|
9
9
|
onMouseEnter,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useRef, memo, forwardRef } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { jsx, css } from '@emotion/core';
|
|
6
|
-
const Sector = /*#__PURE__*/memo(
|
|
6
|
+
const Sector = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
7
|
fill,
|
|
8
8
|
strokeColor,
|
|
9
9
|
strokeLinejoin,
|
|
@@ -9,7 +9,7 @@ import { typography } from "../../../styles/typography";
|
|
|
9
9
|
import Circle from "./Circle";
|
|
10
10
|
import Sectors from "./Sectors";
|
|
11
11
|
import Sector from "./Sector";
|
|
12
|
-
const PieChart = /*#__PURE__*/memo(
|
|
12
|
+
const PieChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
13
13
|
expandOnHover,
|
|
14
14
|
renderSelectedItem,
|
|
15
15
|
// type,
|
|
@@ -5,7 +5,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import Labels from "./Labels";
|
|
7
7
|
import { typography } from "../../../styles/typography";
|
|
8
|
-
const Bars = /*#__PURE__*/memo(
|
|
8
|
+
const Bars = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
9
9
|
// barsOpacity,
|
|
10
10
|
barsMargin,
|
|
11
11
|
barsColor,
|
|
@@ -9,7 +9,7 @@ import Labels from "./Labels";
|
|
|
9
9
|
import Grid from "./Grid";
|
|
10
10
|
import Bars from "./Bar";
|
|
11
11
|
import { randomString } from "../../../utils";
|
|
12
|
-
const BarChart = /*#__PURE__*/memo(
|
|
12
|
+
const BarChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
13
13
|
labelsVisible,
|
|
14
14
|
labelsCharacterWidth,
|
|
15
15
|
labelsCountY,
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import Labels from "./Labels";
|
|
7
7
|
import { randomString } from "../../../utils";
|
|
8
8
|
import { typography } from "../../../styles/typography";
|
|
9
|
-
const Bars = /*#__PURE__*/memo(
|
|
9
|
+
const Bars = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
10
10
|
// barsOpacity,
|
|
11
11
|
barsMargin,
|
|
12
12
|
barsColor,
|
|
@@ -9,7 +9,7 @@ import Labels from "./Labels";
|
|
|
9
9
|
import Grid from "./Grid";
|
|
10
10
|
import Bars from "./Bar";
|
|
11
11
|
import { randomString } from "../../../utils";
|
|
12
|
-
const BarChart = /*#__PURE__*/memo(
|
|
12
|
+
const BarChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
13
13
|
labelsVisible,
|
|
14
14
|
labelsCharacterWidth,
|
|
15
15
|
labelsCountY,
|
|
@@ -10,7 +10,7 @@ import Points from "./Point";
|
|
|
10
10
|
// import Title from './Title';
|
|
11
11
|
import Path from "./Path";
|
|
12
12
|
import { randomString } from "../../../utils";
|
|
13
|
-
const LineChart = /*#__PURE__*/memo(
|
|
13
|
+
const LineChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
14
14
|
labelsVisible,
|
|
15
15
|
labelsCharacterWidth,
|
|
16
16
|
labelsCountY,
|
|
@@ -10,7 +10,7 @@ import Points from "./Point";
|
|
|
10
10
|
// import Title from './Title';
|
|
11
11
|
import Path from "./Path";
|
|
12
12
|
import { randomString } from "../../../utils";
|
|
13
|
-
const BarChart = /*#__PURE__*/memo(
|
|
13
|
+
const BarChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
14
14
|
labelsVisible,
|
|
15
15
|
labelsCharacterWidth,
|
|
16
16
|
labelsCountY,
|
package/components/chip/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const iconSizeMap = new Map([['small', `16px`], ['medium', `20px`], ['large', `2
|
|
|
15
15
|
const typographySizeMap = new Map([['small', 'p3'], ['medium', 'p2'], ['large', 'p1']]);
|
|
16
16
|
const paddingSizeMap = new Map([['small', `0px 6px`], ['medium', `0px 8px`], ['large', `0px 10px`]]);
|
|
17
17
|
const minHeightSizeMap = new Map([['small', `20px`], ['medium', `24px`], ['large', `28px`]]);
|
|
18
|
-
const Chip = /*#__PURE__*/memo(
|
|
18
|
+
const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
19
19
|
if (!reference) reference = useRef(null);
|
|
20
20
|
const theme = useTheme();
|
|
21
21
|
const {
|
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
6
6
|
import { displayBlock, parseWidthHeight, positionRelative } from "../../styles/general";
|
|
7
|
-
const Collapse = /*#__PURE__*/memo(
|
|
7
|
+
const Collapse = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
8
8
|
children,
|
|
9
9
|
className,
|
|
10
10
|
id,
|
|
@@ -8,7 +8,7 @@ import { bgColor, borderNone, flexShrink0, parseWidthHeight } from "../../styles
|
|
|
8
8
|
import { useTheme } from "../../theme";
|
|
9
9
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../utils";
|
|
11
|
-
const Divider = /*#__PURE__*/memo(
|
|
11
|
+
const Divider = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
12
|
if (!reference) reference = useRef(null);
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
const {
|
|
@@ -127,7 +127,7 @@ const handleDownload = (url, name, onDownload) => {
|
|
|
127
127
|
const divideSizeMap = new Map([['B', 1], ['KB', 1024], ['MB', 1024 ** 2], ['GB', 1024 ** 3], ['TB', 1024 ** 4]]);
|
|
128
128
|
const viewTypeIconMap = new Map([['detail', 'ListView'], ['icon', 'IconView'], ['picture', 'ModuleView']]);
|
|
129
129
|
const viewTypeSwitchMap = new Map([['detail', 'icon'], ['icon', 'picture'], ['picture', 'detail']]);
|
|
130
|
-
const Attachment = /*#__PURE__*/memo(
|
|
130
|
+
const Attachment = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
131
131
|
if (!reference) reference = useRef(null);
|
|
132
132
|
const theme = useTheme();
|
|
133
133
|
const {
|
|
@@ -1442,17 +1442,17 @@ Attachment.propTypes = {
|
|
|
1442
1442
|
allowSort: PropTypes.bool,
|
|
1443
1443
|
/** Class for component. */
|
|
1444
1444
|
className: PropTypes.string,
|
|
1445
|
-
/** List attachment:<br />
|
|
1446
|
-
* [{<br />
|
|
1447
|
-
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1448
|
-
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/demo.jpg",<br />
|
|
1449
|
-
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1450
|
-
* "FileSize": 248837,<br />
|
|
1451
|
-
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1452
|
-
* "CreateUserID": "LEMONADMIN",<br />
|
|
1453
|
-
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1454
|
-
* "UserName": "Quản trị hệ thống"<br />
|
|
1455
|
-
* }, ...]
|
|
1445
|
+
/** List attachment:<br />
|
|
1446
|
+
* [{<br />
|
|
1447
|
+
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1448
|
+
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/demo.jpg",<br />
|
|
1449
|
+
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1450
|
+
* "FileSize": 248837,<br />
|
|
1451
|
+
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1452
|
+
* "CreateUserID": "LEMONADMIN",<br />
|
|
1453
|
+
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1454
|
+
* "UserName": "Quản trị hệ thống"<br />
|
|
1455
|
+
* }, ...]
|
|
1456
1456
|
*/
|
|
1457
1457
|
data: PropTypes.array,
|
|
1458
1458
|
/** The message to display when deleting files. */
|
|
@@ -1483,16 +1483,16 @@ Attachment.propTypes = {
|
|
|
1483
1483
|
onChange: PropTypes.func,
|
|
1484
1484
|
/** Download attached event, if not it will use default. */
|
|
1485
1485
|
onDownload: PropTypes.func,
|
|
1486
|
-
/**
|
|
1487
|
-
* event when removed file(s)
|
|
1488
|
-
*
|
|
1489
|
-
* return data: {<br/>
|
|
1490
|
-
* attached: [Files] (insist old and all new files )<br/>
|
|
1491
|
-
* allNewAttached: [Files]<br/>
|
|
1492
|
-
* oldAttached: [Files]<br/>
|
|
1493
|
-
* removedAttached: [Files]<br/>
|
|
1494
|
-
* element: [NodeList (just removed)]<br/>
|
|
1495
|
-
* }
|
|
1486
|
+
/**
|
|
1487
|
+
* event when removed file(s)
|
|
1488
|
+
*
|
|
1489
|
+
* return data: {<br/>
|
|
1490
|
+
* attached: [Files] (insist old and all new files )<br/>
|
|
1491
|
+
* allNewAttached: [Files]<br/>
|
|
1492
|
+
* oldAttached: [Files]<br/>
|
|
1493
|
+
* removedAttached: [Files]<br/>
|
|
1494
|
+
* element: [NodeList (just removed)]<br/>
|
|
1495
|
+
* }
|
|
1496
1496
|
*/
|
|
1497
1497
|
onRemove: PropTypes.func,
|
|
1498
1498
|
/** View attached event, if not it will use default. */
|
|
@@ -652,7 +652,7 @@ const renderNavigator = (className, refs, dbLeftFn, leftFn, rightFn, dbRightFn,
|
|
|
652
652
|
color: 'primary',
|
|
653
653
|
type: 'h3',
|
|
654
654
|
ref: refs.content,
|
|
655
|
-
format: ['
|
|
655
|
+
format: ['sentence']
|
|
656
656
|
}))), jsx("div", {
|
|
657
657
|
className: className.navigator.around
|
|
658
658
|
}, jsx(ButtonIcon, {
|
|
@@ -7,7 +7,7 @@ import { useTheme } from "../../../theme";
|
|
|
7
7
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, date as moment } from "../../../utils";
|
|
9
9
|
import { generateCalendarCSS, isAfterLimit, isBeforeLimit, isValidDate, onUpdateCalendar, renderHeader, renderNavigator } from "./function";
|
|
10
|
-
const Calendar = /*#__PURE__*/memo(
|
|
10
|
+
const Calendar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
var _zoomLevel$get, _zoomLevel$get2;
|
|
12
12
|
if (!reference) reference = useRef(null);
|
|
13
13
|
const theme = useTheme();
|
|
@@ -226,7 +226,7 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
226
226
|
* START EFFECT
|
|
227
227
|
*/
|
|
228
228
|
useEffect(() => {
|
|
229
|
-
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue)) {
|
|
229
|
+
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue) && !value) {
|
|
230
230
|
if (isBeforeLimit(min, defaultValue)) {
|
|
231
231
|
onUpdate(min);
|
|
232
232
|
} else if (isAfterLimit(max, defaultValue)) {
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../../theme";
|
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { getProp } from "../../../utils";
|
|
11
11
|
import { generateCalendarCSS, isValidDate, onUpdateCalendar, renderHeader, renderNavigator } from "./function";
|
|
12
|
-
const CalendarRange = /*#__PURE__*/memo(
|
|
12
|
+
const CalendarRange = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
const {
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../../theme";
|
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp, randomString, refType as ref } from "../../../utils";
|
|
11
11
|
const padding = 0.75;
|
|
12
|
-
const Checkbox = /*#__PURE__*/memo(
|
|
12
|
+
const Checkbox = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
|
|
15
15
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { displayBlock, pointerEventsNone, positionRelative, textColor, userSelectNone } from "../../../styles/general";
|
|
8
8
|
import { getProp } from "../../../utils";
|
|
9
9
|
import { useTheme } from "../../../theme";
|
|
10
|
-
const Control = /*#__PURE__*/memo(
|
|
10
|
+
const Control = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
11
11
|
children,
|
|
12
12
|
className,
|
|
13
13
|
disabled,
|
|
@@ -14,7 +14,7 @@ import useDateInputState from "./useDateInputState";
|
|
|
14
14
|
import useIsFocused from "./useIsFocused";
|
|
15
15
|
import useKeyboardInputEvent from "./useKeyboardInputEvent";
|
|
16
16
|
import { getInputSelectedState, isFieldFullValue, useEventCallback, useInputSelection, validateDateTime } from "./utils";
|
|
17
|
-
const DateInput = /*#__PURE__*/memo(
|
|
17
|
+
const DateInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
18
18
|
if (!reference) reference = useRef(null);
|
|
19
19
|
|
|
20
20
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -64,7 +64,7 @@ const getDateFormats = (locale, minZoom) => {
|
|
|
64
64
|
}
|
|
65
65
|
return formatMap.get(minZoom);
|
|
66
66
|
};
|
|
67
|
-
const DatePicker = /*#__PURE__*/memo(
|
|
67
|
+
const DatePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
68
68
|
var _getDateFormats, _pickerReturnFormat$g, _ipRef$current, _ipRef$current2;
|
|
69
69
|
if (!reference) reference = useRef(null);
|
|
70
70
|
const theme = useTheme();
|
|
@@ -66,7 +66,7 @@ const isAfter = (max, time) => {
|
|
|
66
66
|
const parseDate = day => {
|
|
67
67
|
return Date.parse(new Date(day));
|
|
68
68
|
};
|
|
69
|
-
const DateRangePicker = /*#__PURE__*/memo(
|
|
69
|
+
const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
70
70
|
var _periodOptions$dataSo;
|
|
71
71
|
// props priority: `inProps` > `themeDefaultProps`
|
|
72
72
|
const props = useThemeProps({
|
|
@@ -752,6 +752,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
752
752
|
}
|
|
753
753
|
ipRef.current && ipRef.current.blur();
|
|
754
754
|
updateTempValues([]);
|
|
755
|
+
setOpenState(false);
|
|
755
756
|
};
|
|
756
757
|
const onClickOutside = e => {
|
|
757
758
|
if (ipConRef.current && !ipConRef.current.contains(e.target) && ipRef.current && !ipRef.current.contains(e.target) && pickerRef.current && !pickerRef.current.contains(e.target)) {
|