diginet-core-ui 1.4.51 → 1.4.52
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/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 +1 -1
- 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 -2
- package/components/form-control/dropdown/index.js +16 -14
- package/components/form-control/dropdown-box/index.js +1 -1
- 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 +12 -6
- 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 +2 -2
- 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/effect.js +1 -1
- package/icons/menu/v2/index.js +1 -1
- package/package.json +1 -1
- package/readme.md +4 -0
|
@@ -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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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 (/*#__PURE__*/isValidElement(data)) return data;
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
|
+
const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
|
|
@@ -56,7 +56,7 @@ const ButtonMore = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference
|
|
|
56
56
|
});
|
|
57
57
|
const renderOptions = () => {
|
|
58
58
|
return options.map((item, idx) => {
|
|
59
|
-
if (item !== null && item !== void 0 && item.hidden) return null;else if (/*#__PURE__*/isValidElement(item)) return item;else {
|
|
59
|
+
if (item !== null && item !== void 0 && item.hidden) return null;else if ( /*#__PURE__*/isValidElement(item)) return item;else {
|
|
60
60
|
const icon = item === null || item === void 0 ? void 0 : item.icon;
|
|
61
61
|
const label = item === null || item === void 0 ? void 0 : item.label;
|
|
62
62
|
const action = () => {
|
|
@@ -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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
130
|
+
const Attachment = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
131
131
|
if (!reference) reference = useRef(null);
|
|
132
132
|
const theme = useTheme();
|
|
133
133
|
const {
|
|
@@ -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: ['lowercase']
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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)) {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
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(/*#__PURE__*/forwardRef(({
|
|
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(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
17
|
+
const DateInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
18
18
|
if (!reference) reference = useRef(null);
|
|
19
19
|
|
|
20
20
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -42,7 +42,7 @@ const parseValueToDate = valueProp => {
|
|
|
42
42
|
return valueProp;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
const DatePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
45
|
+
const DatePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
46
46
|
var _ref, _pickerReturnFormat$g, _ipRef$current, _ipRef$current2;
|
|
47
47
|
if (!reference) reference = useRef(null);
|
|
48
48
|
const theme = useTheme();
|
|
@@ -65,7 +65,7 @@ const isAfter = (max, time) => {
|
|
|
65
65
|
const parseDate = day => {
|
|
66
66
|
return Date.parse(new Date(day));
|
|
67
67
|
};
|
|
68
|
-
const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
68
|
+
const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
69
69
|
// props priority: `inProps` > `themeDefaultProps`
|
|
70
70
|
const props = useThemeProps({
|
|
71
71
|
props: inProps,
|
|
@@ -815,8 +815,8 @@ const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, refe
|
|
|
815
815
|
};
|
|
816
816
|
}, []);
|
|
817
817
|
useEffect(() => {
|
|
818
|
+
update(value);
|
|
818
819
|
if (value && value[0] && value[1]) {
|
|
819
|
-
update(value);
|
|
820
820
|
closePicker();
|
|
821
821
|
} else {
|
|
822
822
|
ipRef.current.value = '';
|
|
@@ -47,7 +47,7 @@ const uniqBy = (arr, iteratee) => {
|
|
|
47
47
|
return true;
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
const Dropdown = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
50
|
+
const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
51
51
|
if (!reference) reference = useRef(null);
|
|
52
52
|
const theme = useTheme();
|
|
53
53
|
const {
|
|
@@ -330,19 +330,21 @@ const Dropdown = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference)
|
|
|
330
330
|
let dataSourceUsable = [...dataSourceState];
|
|
331
331
|
|
|
332
332
|
// search dataSource dựa trên txtSearch
|
|
333
|
-
if (!onInput
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
333
|
+
if (!onInput) {
|
|
334
|
+
if (!(action !== null && action !== void 0 && action.loadData) || !onLoadMore) {
|
|
335
|
+
var _dataSourceUsable;
|
|
336
|
+
dataSourceUsable = (_dataSourceUsable = dataSourceUsable) === null || _dataSourceUsable === void 0 ? void 0 : _dataSourceUsable.filter(i => {
|
|
337
|
+
if (searchExpr) {
|
|
338
|
+
// nếu map đc vs 1 trong những <key>(data[key]) của searchExpr
|
|
339
|
+
return !!searchExpr.find(j => handleRenderBySearch(i[j]));
|
|
340
|
+
} else {
|
|
341
|
+
// nếu map đc vs displayValue
|
|
342
|
+
return handleRenderBySearch(displayValue(i)) || handleRenderBySearch(i === null || i === void 0 ? void 0 : i[valueExpr]);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}
|
|
344
346
|
}
|
|
345
|
-
if (vlObjDefaultState && vlObjDefaultState
|
|
347
|
+
if (vlObjDefaultState && (vlObjDefaultState === null || vlObjDefaultState === void 0 ? void 0 : vlObjDefaultState.length) > 0) {
|
|
346
348
|
const length = vlObjDefaultState === null || vlObjDefaultState === void 0 ? void 0 : vlObjDefaultState.length;
|
|
347
349
|
let existItemQuantity = 0;
|
|
348
350
|
for (let index = length - 1; index >= 0; index--) {
|
|
@@ -1045,7 +1047,7 @@ const Dropdown = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference)
|
|
|
1045
1047
|
inputRef.current.removeEventListener('click', onClickInput);
|
|
1046
1048
|
}
|
|
1047
1049
|
};
|
|
1048
|
-
}, [dataSourceState]);
|
|
1050
|
+
}, [dataSourceState, disabled]);
|
|
1049
1051
|
useEffect(() => {
|
|
1050
1052
|
if (!openState && txtSearch) {
|
|
1051
1053
|
if (!onInput) {
|
|
@@ -8,7 +8,7 @@ import { animation, borderColor, displayBlock, overflowHidden, parseHeight, pars
|
|
|
8
8
|
import { useTheme } from "../../../theme";
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../../utils";
|
|
11
|
-
const DropdownBox = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
|
+
const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
12
|
if (!reference) reference = useRef(null);
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
const {
|
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { Children, forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';
|
|
6
6
|
import { useTheme } from "../../../theme";
|
|
7
|
-
const FormGroup = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
|
+
const FormGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
8
8
|
fullWidth,
|
|
9
9
|
oneHelperText,
|
|
10
10
|
marginRight,
|
|
@@ -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
|
const colorMap = new Map([['default', 'semantic/danger'], ['success', 'semantic/success'], ['warning', 'semantic/warning'], ['danger', 'semantic/danger'], ['info', 'semantic/info']]);
|
|
12
|
-
const HelperText = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
|
+
const HelperText = /*#__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 { bgColor, border, borderBottom, borderBottomColor, borderColor, borderNo
|
|
|
9
9
|
import { useTheme } from "../../../theme";
|
|
10
10
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
11
11
|
import { classNames, refType as ref, getProp } from "../../../utils";
|
|
12
|
-
const UncontrolledInputBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
|
+
const UncontrolledInputBase = /*#__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 { bgColor, bgTransparent, border, borderBottom, borderBottomColor, border
|
|
|
9
9
|
import { useTheme } from "../../../theme";
|
|
10
10
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
11
11
|
import { classNames, refType as ref, useInput, getProp } from "../../../utils";
|
|
12
|
-
const InputBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
|
+
const InputBase = /*#__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 { flexRow, parseMinHeight, typographyTypes } from "../../../styles/genera
|
|
|
9
9
|
import { useTheme } from "../../../theme";
|
|
10
10
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
11
11
|
import { classNames, getProp } from "../../../utils";
|
|
12
|
-
const Label = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
|
+
const Label = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
const {
|