diginet-core-ui 1.3.73 → 1.3.75
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/MHRP29N0026.svg +13 -0
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -0
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -0
- package/components/accordion/details.js +19 -10
- package/components/accordion/group.js +15 -6
- package/components/accordion/index.js +20 -11
- package/components/accordion/summary.js +18 -9
- package/components/avatar/index.js +20 -20
- package/components/badge/index.js +17 -9
- package/components/button/icon.js +33 -25
- package/components/button/index.js +25 -17
- package/components/card/body.js +12 -4
- package/components/card/extra.js +12 -4
- package/components/card/footer.js +12 -4
- package/components/card/header.js +12 -4
- package/components/card/index.js +12 -4
- package/components/chip/index.js +6 -6
- package/components/form-control/attachment/index.js +197 -192
- package/components/form-control/date-picker/index.js +4 -2
- package/components/form-control/date-range-picker/index.js +21 -14
- package/components/form-control/dropdown/index.js +69 -48
- package/components/form-control/input-base/index.js +505 -483
- package/components/form-control/label/index.js +27 -21
- package/components/form-control/text-input/index.js +8 -5
- package/components/grid/Col.js +8 -7
- package/components/grid/Container.js +16 -15
- package/components/grid/Row.js +16 -15
- package/components/grid/index.js +17 -36
- package/components/image/index.js +164 -0
- package/components/index.js +3 -1
- package/components/modal/body.js +12 -9
- package/components/modal/footer.js +22 -11
- package/components/modal/header.js +25 -13
- package/components/modal/index.js +32 -30
- package/components/modal/modal.js +29 -25
- package/components/others/option-wrapper/index.js +5 -18
- package/components/paging/page-info.js +45 -33
- package/components/paging/page-selector2.js +45 -33
- package/components/popover/body.js +14 -6
- package/components/popover/footer.js +15 -6
- package/components/popover/header.js +17 -7
- package/components/popover/index.js +262 -129
- package/components/status/index.js +12 -4
- package/components/tab/tab-container.js +29 -27
- package/components/tab/tab-header.js +35 -30
- package/components/tab/tab-panel.js +31 -27
- package/components/tab/tab.js +47 -37
- package/components/tree-view/index.js +146 -111
- package/components/typography/index.js +47 -36
- package/icons/basic.js +248 -0
- package/icons/effect.js +44 -36
- package/package.json +1 -1
- package/readme.md +43 -0
- package/styles/general.js +34 -11
- package/theme/index.js +1 -1
- package/theme/set-theme.js +5 -4
- package/utils/index.js +13 -10
- package/utils/useMediaQuery.js +4 -2
|
@@ -7,6 +7,7 @@ import { jsx } from '@emotion/core';
|
|
|
7
7
|
import OptionWrapper from '../others/option-wrapper';
|
|
8
8
|
import { classNames } from '../../utils';
|
|
9
9
|
const CardFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
10
|
+
action = {},
|
|
10
11
|
children,
|
|
11
12
|
className,
|
|
12
13
|
id,
|
|
@@ -14,10 +15,17 @@ const CardFooter = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
14
15
|
title
|
|
15
16
|
}, reference) => {
|
|
16
17
|
const ref = useRef(null);
|
|
17
|
-
useImperativeHandle(reference, () =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
useImperativeHandle(reference, () => {
|
|
19
|
+
const currentRef = ref.current || {};
|
|
20
|
+
currentRef.element = ref.current;
|
|
21
|
+
const _instance = { ...action
|
|
22
|
+
}; // methods
|
|
23
|
+
|
|
24
|
+
_instance.__proto__ = {}; // hidden methods
|
|
25
|
+
|
|
26
|
+
currentRef.instance = _instance;
|
|
27
|
+
return currentRef;
|
|
28
|
+
});
|
|
21
29
|
return useMemo(() => {
|
|
22
30
|
return jsx("div", {
|
|
23
31
|
id: id,
|
|
@@ -8,6 +8,7 @@ import OptionWrapper from '../others/option-wrapper';
|
|
|
8
8
|
import Typography from '../typography';
|
|
9
9
|
import { classNames } from '../../utils';
|
|
10
10
|
const CardHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
11
|
+
action = {},
|
|
11
12
|
children,
|
|
12
13
|
className,
|
|
13
14
|
id,
|
|
@@ -15,10 +16,17 @@ const CardHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
15
16
|
title
|
|
16
17
|
}, reference) => {
|
|
17
18
|
const ref = useRef(null);
|
|
18
|
-
useImperativeHandle(reference, () =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
useImperativeHandle(reference, () => {
|
|
20
|
+
const currentRef = ref.current || {};
|
|
21
|
+
currentRef.element = ref.current;
|
|
22
|
+
const _instance = { ...action
|
|
23
|
+
}; // methods
|
|
24
|
+
|
|
25
|
+
_instance.__proto__ = {}; // hidden methods
|
|
26
|
+
|
|
27
|
+
currentRef.instance = _instance;
|
|
28
|
+
return currentRef;
|
|
29
|
+
});
|
|
22
30
|
return useMemo(() => {
|
|
23
31
|
return jsx("div", {
|
|
24
32
|
id: id,
|
package/components/card/index.js
CHANGED
|
@@ -24,6 +24,7 @@ const {
|
|
|
24
24
|
spacing
|
|
25
25
|
} = theme;
|
|
26
26
|
const Card = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
27
|
+
action = {},
|
|
27
28
|
body: bodyProp,
|
|
28
29
|
bodyStyle,
|
|
29
30
|
children,
|
|
@@ -46,10 +47,17 @@ const Card = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
46
47
|
|
|
47
48
|
const _CardCSS = CardCSS(width, height, headerDivider, footerDivider, dividerColor, direction);
|
|
48
49
|
|
|
49
|
-
useImperativeHandle(reference, () =>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
useImperativeHandle(reference, () => {
|
|
51
|
+
const currentRef = ref.current || {};
|
|
52
|
+
currentRef.element = ref.current;
|
|
53
|
+
const _instance = { ...action
|
|
54
|
+
}; // methods
|
|
55
|
+
|
|
56
|
+
_instance.__proto__ = {}; // hidden methods
|
|
57
|
+
|
|
58
|
+
currentRef.instance = _instance;
|
|
59
|
+
return currentRef;
|
|
60
|
+
});
|
|
53
61
|
const head = header || title ? jsx(CardHeader, {
|
|
54
62
|
className: classNames(className === null || className === void 0 ? void 0 : className.header),
|
|
55
63
|
style: headerStyle,
|
package/components/chip/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { jsx, css } from '@emotion/core';
|
|
7
7
|
import { ButtonIcon, Typography } from '../';
|
|
8
8
|
import Icon from '../../icons';
|
|
9
|
-
import { alignCenter, border, borderBox, flexRow, inlineFlex, justifyCenter, positionRelative, userSelectNone,
|
|
9
|
+
import { alignCenter, border, borderBox, flexRow, inlineFlex, justifyCenter, positionRelative, userSelectNone, cursorNotAllowed, positionAbsolute, overflowHidden } from '../../styles/general';
|
|
10
10
|
import { hexToRGBA } from '../../styles/color-helper';
|
|
11
|
-
import { useTheme } from '../../theme';
|
|
11
|
+
import { useTheme, useColor as colors } from '../../theme';
|
|
12
12
|
const {
|
|
13
13
|
colors: {
|
|
14
14
|
danger,
|
|
@@ -52,9 +52,10 @@ const Chip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
52
52
|
const ref = useRef(null);
|
|
53
53
|
const IconRef = useRef(null);
|
|
54
54
|
if (!onDbClick && onDoubleClick) onDbClick = onDoubleClick;
|
|
55
|
-
|
|
55
|
+
let color = colorMap.get(colorProps) || colorProps;
|
|
56
|
+
if (colors[color]) color = colors[color];
|
|
56
57
|
const infoChip = {
|
|
57
|
-
color:
|
|
58
|
+
color: color,
|
|
58
59
|
contentColor: viewType !== 'filled' ? color : white,
|
|
59
60
|
backgroundColor: viewType !== 'filled' ? white : color,
|
|
60
61
|
iconSize: iconSizeMap.get(size),
|
|
@@ -160,7 +161,6 @@ const ChipLabelCSS = css`
|
|
|
160
161
|
${alignCenter};
|
|
161
162
|
${positionRelative};
|
|
162
163
|
${userSelectNone};
|
|
163
|
-
${whiteSpaceNoWrap};
|
|
164
164
|
`;
|
|
165
165
|
|
|
166
166
|
const ChipRootCSS = (onClick, onDbClick, colorProps, info) => css`
|
|
@@ -268,7 +268,7 @@ Chip.propTypes = {
|
|
|
268
268
|
viewType: PropTypes.oneOf(['ghost', 'outlined', 'filled']),
|
|
269
269
|
|
|
270
270
|
/** color for text or background of Chip */
|
|
271
|
-
color: PropTypes.oneOf(['default', 'primary', 'info', 'success', 'warning', 'danger']),
|
|
271
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(['default', 'primary', 'info', 'success', 'warning', 'danger']), PropTypes.string]),
|
|
272
272
|
|
|
273
273
|
/** size of Chip */
|
|
274
274
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|