diginet-core-ui 1.3.24 → 1.3.29
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/fonts/SF-Pro-Display-Bold.otf +0 -0
- package/assets/fonts/SF-Pro-Display-Medium.otf +0 -0
- package/assets/fonts/SF-Pro-Display-Regular.otf +0 -0
- package/assets/images/icons/wifi.svg +3 -0
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -0
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -0
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -0
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -0
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -0
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -0
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -0
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -0
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -0
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -0
- package/assets/images/menu/dhr/TASK.svg +9 -0
- package/assets/images/menu/erp/D05.svg +8 -0
- package/assets/images/menu/erp/D06.svg +4 -0
- package/assets/images/menu/erp/D90R.svg +9 -0
- package/assets/images/menu/erp/DBC.svg +9 -0
- package/assets/images/menu/erp/{W05F0006.svg → W05F0006N0000.svg} +0 -0
- package/assets/images/menu/erp/{W05F0008.svg → W05F0008N0000.svg} +0 -0
- package/assets/images/menu/erp/{W05F4000.svg → W05F4000N0000.svg} +0 -0
- package/assets/images/menu/erp/{W06F0005.svg → W06F0005N0000.svg} +0 -0
- package/assets/images/menu/erp/{W06F0006.svg → W06F0006N0000.svg} +0 -0
- package/assets/images/menu/erp/{W06F0008.svg → W06F0008N0000.svg} +0 -0
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -0
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -0
- package/components/accordion/css.js +42 -33
- package/components/accordion/details.js +29 -17
- package/components/accordion/group.js +23 -23
- package/components/accordion/index.js +36 -27
- package/components/accordion/summary.js +10 -11
- package/components/alert/index.js +97 -91
- package/components/alert/notify.js +10 -8
- package/components/avatar/index.js +19 -17
- package/components/badge/index.js +122 -139
- package/components/button/icon.js +242 -334
- package/components/button/index.js +272 -427
- package/components/button/more.js +4 -5
- package/components/button/ripple-effect.js +4 -6
- package/components/card/body-card.js +4 -6
- package/components/card/card.js +4 -8
- package/components/card/index.js +4 -5
- package/components/chart/Pie/Sector.js +4 -5
- package/components/chart/Pie/Sectors.js +5 -5
- package/components/chart/Pie/index.js +8 -9
- package/components/chart/Pie-v2/Sector.js +4 -5
- package/components/chart/Pie-v2/Sectors.js +7 -8
- package/components/chart/Pie-v2/index.js +11 -16
- package/components/chart/bar/Bar.js +2 -3
- package/components/chart/bar/Labels.js +9 -11
- package/components/chart/bar/index.js +17 -9
- package/components/chart/bar-v2/Bar.js +2 -3
- package/components/chart/bar-v2/Labels.js +9 -11
- package/components/chart/bar-v2/index.js +17 -9
- package/components/chart/line/Labels.js +8 -10
- package/components/chart/line/Point.js +2 -3
- package/components/chart/line/index.js +17 -9
- package/components/chart/line-v2/Labels.js +8 -10
- package/components/chart/line-v2/Point.js +2 -3
- package/components/chart/line-v2/index.js +17 -9
- package/components/chip/attach.js +12 -16
- package/components/chip/index.js +8 -11
- package/components/collapse/index.js +4 -5
- package/components/divider/index.js +27 -14
- package/components/form-control/attachment/index.js +143 -87
- package/components/form-control/calendar/function.js +24 -23
- package/components/form-control/calendar/index.js +2 -4
- package/components/form-control/calendar/range.js +3 -4
- package/components/form-control/checkbox/index.js +85 -71
- package/components/form-control/control/index.js +4 -6
- package/components/form-control/date-picker/index-old.js +0 -2
- package/components/form-control/date-picker/index.js +39 -43
- package/components/form-control/date-range-picker/index.js +26 -28
- package/components/form-control/dropdown/index.js +173 -202
- package/components/form-control/dropdown-box/index.js +72 -49
- package/components/form-control/form-group/index.js +4 -5
- package/components/form-control/helper-text/index.js +4 -5
- package/components/form-control/input-base/index.js +28 -38
- package/components/form-control/label/index.js +23 -13
- package/components/form-control/money-input/index.js +6 -6
- package/components/form-control/number-input/index.js +12 -14
- package/components/form-control/phone-input/index.js +4 -5
- package/components/form-control/radio/index.js +7 -15
- package/components/form-control/text-input/index.js +14 -24
- package/components/form-control/time-picker/index.js +15 -26
- package/components/form-control/time-picker/swiper.js +2 -4
- package/components/form-control/toggle/index.js +22 -18
- package/components/form-view/helper-text.js +4 -5
- package/components/form-view/index.js +4 -5
- package/components/form-view/input.js +5 -7
- package/components/form-view/label.js +2 -6
- package/components/list/list-item-action.js +7 -8
- package/components/list/list-item-icon.js +4 -5
- package/components/list/list-item-text.js +4 -5
- package/components/list/list-item.js +4 -5
- package/components/list/list.js +4 -5
- package/components/list/sub-header.js +4 -5
- package/components/modal/body.js +4 -6
- package/components/modal/footer.js +4 -6
- package/components/modal/header.js +8 -14
- package/components/modal/index.js +4 -5
- package/components/modal/modal.js +6 -13
- package/components/others/extra/index.js +4 -8
- package/components/others/option-wrapper/index.js +57 -0
- package/components/others/scrollbar/index.js +4 -5
- package/components/paging/page-info.js +282 -231
- package/components/paging/page-selector.js +4 -7
- package/components/popover/index.js +6 -7
- package/components/popup/danger_popup.js +8 -18
- package/components/popup/index.js +26 -34
- package/components/popup/proposals_popup.js +9 -16
- package/components/popup/v2/danger-popup.js +4 -6
- package/components/popup/v2/index.js +116 -98
- package/components/popup/v2/info-popup.js +4 -6
- package/components/popup/v2/success-popup.js +4 -6
- package/components/popup/v2/warning-popup.js +4 -6
- package/components/popup/v2/yes-no-popup.js +4 -6
- package/components/progress/circular.js +17 -26
- package/components/progress/linear.js +11 -13
- package/components/rating/index.js +114 -233
- package/components/slider/slider-container.js +15 -10
- package/components/slider/slider-item.js +10 -12
- package/components/status/index.js +63 -57
- package/components/tab/tab-container.js +26 -24
- package/components/tab/tab-header.js +36 -27
- package/components/tab/tab-panel.js +32 -15
- package/components/tab/tab.js +79 -80
- package/components/tooltip/index.js +4 -4
- package/components/transfer/index.js +10 -11
- package/components/tree-view/css.js +2 -0
- package/components/tree-view/index.js +14 -13
- package/components/typography/index.js +6 -112
- package/css/styles.css +1 -1
- package/css/styles.css.map +1 -1
- package/global/index.js +2 -0
- package/icons/basic.js +1648 -959
- package/icons/effect.js +45 -103
- package/package.json +1 -1
- package/readme.md +66 -0
- package/styles/color-helper.js +7 -146
- package/styles/colors.js +6 -2
- package/styles/font.js +9 -0
- package/styles/general.js +100 -7
- package/styles/typography.js +25 -26
- package/theme/settings.js +9 -2
- package/theme/theme-provider.js +15 -7
- package/theme/with-styles.js +2 -4
- package/theme/with-theme.js +2 -4
- package/utils/isMobile.js +21 -0
- package/utils/renderHTML.js +4 -5
- package/utils/renderIcon.js +15 -11
- package/utils/updatePosition.js +2 -2
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import { jsx, css } from '@emotion/core';
|
|
6
6
|
import theme from '../../../theme/settings';
|
|
7
|
+
import { typography } from "../../../styles/typography";
|
|
7
8
|
|
|
8
9
|
const Labels = ({
|
|
9
10
|
getX,
|
|
@@ -22,7 +23,6 @@ const Labels = ({
|
|
|
22
23
|
minX,
|
|
23
24
|
unitWidth
|
|
24
25
|
}) => {
|
|
25
|
-
const FONT_SIZE = 12;
|
|
26
26
|
const labelContainerCSS = css`
|
|
27
27
|
transform: translate(0, ${labelsOffsetX}px);
|
|
28
28
|
`;
|
|
@@ -34,8 +34,7 @@ const Labels = ({
|
|
|
34
34
|
const LabelCSS = labelStyle === 'italic' ? css`
|
|
35
35
|
fill: ${theme.colors.secondary};
|
|
36
36
|
text-anchor: start;
|
|
37
|
-
|
|
38
|
-
font-family: ${theme.typography.fontFamily};
|
|
37
|
+
${typography.paragraph3};
|
|
39
38
|
text-transform: capitalize;
|
|
40
39
|
cursor: pointer;
|
|
41
40
|
display: inline-block;
|
|
@@ -44,12 +43,15 @@ const Labels = ({
|
|
|
44
43
|
` : css`
|
|
45
44
|
color: ${theme.colors.secondary};
|
|
46
45
|
text-anchor: middle;
|
|
47
|
-
|
|
48
|
-
font-family: ${theme.typography.fontFamily};
|
|
46
|
+
${typography.paragraph3};
|
|
49
47
|
text-transform: capitalize;
|
|
50
48
|
display: inline-block;
|
|
51
49
|
word-break: break-word;
|
|
52
50
|
`;
|
|
51
|
+
const TextCSS = css`
|
|
52
|
+
${typography.paragraph3};
|
|
53
|
+
fill: ${theme.colors.secondary};
|
|
54
|
+
`;
|
|
53
55
|
|
|
54
56
|
if (labelsVisible) {
|
|
55
57
|
let xLabels;
|
|
@@ -96,11 +98,7 @@ const Labels = ({
|
|
|
96
98
|
y: getY(quantity) + labelsHeightX / 3,
|
|
97
99
|
transform: `translate(-${labelsOffsetY}, 0)`,
|
|
98
100
|
textAnchor: "end",
|
|
99
|
-
|
|
100
|
-
fill: theme.colors.secondary,
|
|
101
|
-
fontSize: FONT_SIZE,
|
|
102
|
-
fontFamily: theme.typography.fontFamily
|
|
103
|
-
}
|
|
101
|
+
css: TextCSS
|
|
104
102
|
}, labelsFormatY(quantity)));
|
|
105
103
|
return jsx("g", {
|
|
106
104
|
className: 'DGN-Labels-LineChart'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import { jsx, css } from '@emotion/core';
|
|
6
|
-
import
|
|
6
|
+
import { typography } from "../../../styles/typography";
|
|
7
7
|
|
|
8
8
|
const Points = ({
|
|
9
9
|
data,
|
|
@@ -38,8 +38,7 @@ const Points = ({
|
|
|
38
38
|
`;
|
|
39
39
|
const textChartCSS = css`
|
|
40
40
|
text-anchor: middle;
|
|
41
|
-
|
|
42
|
-
font-family: ${theme.typography.fontFamily};
|
|
41
|
+
${typography.paragraph3};
|
|
43
42
|
`; // create drawing function tooltips in different positions
|
|
44
43
|
|
|
45
44
|
const topTooltipPath = (width, height, offset, radius) => {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
@@ -103,15 +101,25 @@ const BarChart = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
103
101
|
overflow: 'visible',
|
|
104
102
|
margin: `${getLabelsYWidth() * 2}`
|
|
105
103
|
}
|
|
106
|
-
}, jsx(Axis,
|
|
107
|
-
|
|
108
|
-
}
|
|
104
|
+
}, jsx(Axis, { ...props,
|
|
105
|
+
...commonProps
|
|
106
|
+
}), jsx(Grid, { ...props,
|
|
107
|
+
...commonProps
|
|
108
|
+
}), jsx(Labels, {
|
|
109
|
+
data: dataSource,
|
|
110
|
+
...props,
|
|
111
|
+
...commonProps
|
|
112
|
+
}), jsx(Path, {
|
|
109
113
|
data: dataSource,
|
|
110
|
-
viewBoxWidth: viewBoxWidth
|
|
111
|
-
|
|
114
|
+
viewBoxWidth: viewBoxWidth,
|
|
115
|
+
...props,
|
|
116
|
+
...commonProps
|
|
117
|
+
}), jsx(Points, {
|
|
112
118
|
data: dataSource,
|
|
113
|
-
viewBoxWidth: viewBoxWidth
|
|
114
|
-
|
|
119
|
+
viewBoxWidth: viewBoxWidth,
|
|
120
|
+
...props,
|
|
121
|
+
...commonProps
|
|
122
|
+
}));
|
|
115
123
|
}));
|
|
116
124
|
BarChart.defaultProps = {
|
|
117
125
|
data: [],
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import { jsx, css } from '@emotion/core';
|
|
6
6
|
import theme from '../../../theme/settings';
|
|
7
|
+
import { typography } from "../../../styles/typography";
|
|
7
8
|
|
|
8
9
|
const Labels = ({
|
|
9
10
|
getX,
|
|
@@ -22,7 +23,6 @@ const Labels = ({
|
|
|
22
23
|
minX,
|
|
23
24
|
unitWidth
|
|
24
25
|
}) => {
|
|
25
|
-
const FONT_SIZE = 12;
|
|
26
26
|
const labelContainerCSS = css`
|
|
27
27
|
transform: translate(0, ${labelsOffsetX}px);
|
|
28
28
|
`;
|
|
@@ -34,8 +34,7 @@ const Labels = ({
|
|
|
34
34
|
const LabelCSS = labelStyle === 'italic' ? css`
|
|
35
35
|
fill: ${theme.colors.secondary};
|
|
36
36
|
text-anchor: start;
|
|
37
|
-
|
|
38
|
-
font-family: ${theme.typography.fontFamily};
|
|
37
|
+
${typography.paragraph3};
|
|
39
38
|
text-transform: capitalize;
|
|
40
39
|
cursor: pointer;
|
|
41
40
|
display: inline-block;
|
|
@@ -44,12 +43,15 @@ const Labels = ({
|
|
|
44
43
|
` : css`
|
|
45
44
|
color: ${theme.colors.secondary};
|
|
46
45
|
text-anchor: middle;
|
|
47
|
-
|
|
48
|
-
font-family: ${theme.typography.fontFamily};
|
|
46
|
+
${typography.paragraph3};
|
|
49
47
|
text-transform: capitalize;
|
|
50
48
|
display: inline-block;
|
|
51
49
|
word-break: break-word;
|
|
52
50
|
`;
|
|
51
|
+
const TextCSS = css`
|
|
52
|
+
${typography.paragraph3};
|
|
53
|
+
fill: ${theme.colors.secondary};
|
|
54
|
+
`;
|
|
53
55
|
|
|
54
56
|
if (labelsVisible) {
|
|
55
57
|
let xLabels;
|
|
@@ -96,11 +98,7 @@ const Labels = ({
|
|
|
96
98
|
y: getY(quantity) + labelsHeightX / 3,
|
|
97
99
|
transform: `translate(-${labelsOffsetY}, 0)`,
|
|
98
100
|
textAnchor: "end",
|
|
99
|
-
|
|
100
|
-
fill: theme.colors.secondary,
|
|
101
|
-
fontSize: FONT_SIZE,
|
|
102
|
-
fontFamily: theme.typography.fontFamily
|
|
103
|
-
}
|
|
101
|
+
css: TextCSS
|
|
104
102
|
}, labelsFormatY(quantity)));
|
|
105
103
|
return jsx("g", {
|
|
106
104
|
className: 'DGN-Labels-LineChart'
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import { jsx, css } from '@emotion/core';
|
|
7
|
-
import theme from '../../../theme/settings';
|
|
8
7
|
import { randomString } from '../../../utils';
|
|
8
|
+
import { typography } from "../../../styles/typography";
|
|
9
9
|
|
|
10
10
|
const Points = ({
|
|
11
11
|
data,
|
|
@@ -44,8 +44,7 @@ const Points = ({
|
|
|
44
44
|
`;
|
|
45
45
|
const textChartCSS = css`
|
|
46
46
|
text-anchor: middle;
|
|
47
|
-
|
|
48
|
-
font-family: ${theme.typography.fontFamily};
|
|
47
|
+
${typography.paragraph3};
|
|
49
48
|
`; // create drawing function tooltips in different positions
|
|
50
49
|
|
|
51
50
|
const topTooltipPath = (width, height, offset, radius) => {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
@@ -103,15 +101,25 @@ const BarChart = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
103
101
|
overflow: 'visible',
|
|
104
102
|
margin: `${getLabelsYWidth() * 2}`
|
|
105
103
|
}
|
|
106
|
-
}, jsx(Axis,
|
|
107
|
-
|
|
108
|
-
}
|
|
104
|
+
}, jsx(Axis, { ...props,
|
|
105
|
+
...commonProps
|
|
106
|
+
}), jsx(Grid, { ...props,
|
|
107
|
+
...commonProps
|
|
108
|
+
}), jsx(Labels, {
|
|
109
|
+
data: dataSource,
|
|
110
|
+
...props,
|
|
111
|
+
...commonProps
|
|
112
|
+
}), jsx(Path, {
|
|
109
113
|
data: dataSource,
|
|
110
|
-
viewBoxWidth: viewBoxWidth
|
|
111
|
-
|
|
114
|
+
viewBoxWidth: viewBoxWidth,
|
|
115
|
+
...props,
|
|
116
|
+
...commonProps
|
|
117
|
+
}), jsx(Points, {
|
|
112
118
|
data: dataSource,
|
|
113
|
-
viewBoxWidth: viewBoxWidth
|
|
114
|
-
|
|
119
|
+
viewBoxWidth: viewBoxWidth,
|
|
120
|
+
...props,
|
|
121
|
+
...commonProps
|
|
122
|
+
}));
|
|
115
123
|
}));
|
|
116
124
|
BarChart.defaultProps = {
|
|
117
125
|
data: [],
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
@@ -7,10 +5,9 @@ import { Fragment, memo, useMemo, useRef, useState, forwardRef as _nonUse } from
|
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
8
6
|
import { jsx, css } from '@emotion/core';
|
|
9
7
|
import Chip from './';
|
|
10
|
-
import Icon from '../../icons';
|
|
11
8
|
import { Pdf, Word, Sheet, Presentation, Image, Compressed, Another } from '../../icons';
|
|
12
9
|
import { capitalize, getFileType } from '../../utils';
|
|
13
|
-
import { ModalSample, Slider, SliderItem } from '../';
|
|
10
|
+
import { ButtonIcon, ModalSample, Slider, SliderItem } from '../';
|
|
14
11
|
const FileTypeIcon = {
|
|
15
12
|
Pdf,
|
|
16
13
|
Word,
|
|
@@ -131,31 +128,30 @@ const AttachChip = /*#__PURE__*/memo(({
|
|
|
131
128
|
url: file.URL
|
|
132
129
|
})));
|
|
133
130
|
}, [open]);
|
|
134
|
-
return jsx(Fragment, null, jsx(Chip,
|
|
131
|
+
return jsx(Fragment, null, jsx(Chip, { ...props,
|
|
135
132
|
clearAble: false,
|
|
136
133
|
label: renderLabel(file.FileName),
|
|
137
134
|
startIcon: getStartIcon(),
|
|
138
|
-
endIcon: jsx(
|
|
135
|
+
endIcon: jsx(ButtonIcon, {
|
|
136
|
+
viewType: 'ghost',
|
|
139
137
|
name: 'more',
|
|
140
|
-
|
|
141
|
-
height: 18,
|
|
142
|
-
viewBox: true,
|
|
138
|
+
size: 'tiny',
|
|
143
139
|
onClick: onShowMoreOption
|
|
144
140
|
})
|
|
145
|
-
}
|
|
141
|
+
}, jsx("div", {
|
|
146
142
|
css: MoreAction,
|
|
147
143
|
ref: moreActionRef
|
|
148
|
-
}, jsx(
|
|
144
|
+
}, jsx(ButtonIcon, {
|
|
145
|
+
viewType: 'ghost',
|
|
149
146
|
name: 'view',
|
|
150
|
-
viewBox: true,
|
|
151
147
|
onClick: e => viewAction(e, file)
|
|
152
|
-
}), jsx(
|
|
148
|
+
}), jsx(ButtonIcon, {
|
|
149
|
+
viewType: 'ghost',
|
|
153
150
|
name: 'download',
|
|
154
|
-
viewBox: true,
|
|
155
151
|
onClick: e => downloadAction(e, file)
|
|
156
|
-
}), jsx(
|
|
152
|
+
}), jsx(ButtonIcon, {
|
|
153
|
+
viewType: 'ghost',
|
|
157
154
|
name: 'delete',
|
|
158
|
-
viewBox: true,
|
|
159
155
|
onClick: e => deleteAction(e, file)
|
|
160
156
|
}))), attachView);
|
|
161
157
|
});
|
package/components/chip/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { memo, useRef, forwardRef, useEffect, useMemo } from 'react';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
8
6
|
import { jsx, css } from '@emotion/core';
|
|
9
|
-
import { Typography } from '../';
|
|
10
|
-
import Icon from '../../icons';
|
|
7
|
+
import { ButtonIcon, Typography } from '../';
|
|
11
8
|
import theme from '../../theme/settings';
|
|
12
9
|
const Chip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
13
10
|
viewType,
|
|
@@ -91,6 +88,7 @@ const Chip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
91
88
|
display: inline-flex;
|
|
92
89
|
position: relative;
|
|
93
90
|
align-items: center;
|
|
91
|
+
width: max-content;
|
|
94
92
|
margin-right: 15px;
|
|
95
93
|
padding: 0 6px;
|
|
96
94
|
color: ${theme.colors.secondary};
|
|
@@ -254,26 +252,25 @@ const Chip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
254
252
|
css: ChipIcon,
|
|
255
253
|
className: 'end-icon ' + size,
|
|
256
254
|
ref: IconRef
|
|
257
|
-
}, jsx(
|
|
255
|
+
}, jsx(ButtonIcon, {
|
|
256
|
+
viewType: 'ghost',
|
|
258
257
|
name: 'Close',
|
|
259
258
|
className: 'clear-icon',
|
|
260
259
|
color: viewType === 'outlined' && color ? 'inherit' : undefined,
|
|
261
|
-
width: 10,
|
|
262
|
-
height: 10,
|
|
263
260
|
onClick: onRemoveHandler
|
|
264
261
|
})) : endIcon && jsx("div", {
|
|
265
262
|
css: ChipIcon,
|
|
266
263
|
className: 'end-icon ' + size,
|
|
267
264
|
ref: IconRef
|
|
268
265
|
}, endIcon), [clearAble]);
|
|
269
|
-
return jsx("div",
|
|
266
|
+
return jsx("div", {
|
|
270
267
|
css: ChipRoot,
|
|
271
|
-
ref: ref
|
|
272
|
-
|
|
268
|
+
ref: ref,
|
|
269
|
+
...props,
|
|
273
270
|
className: ['DGN-UI-Chip', size, className].join(' ').trim(),
|
|
274
271
|
onClick: readOnly ? null : handleClick,
|
|
275
272
|
onDoubleClick: onDbClick || onDoubleClick
|
|
276
|
-
}
|
|
273
|
+
}, startIconView, labelView, endIconView, children);
|
|
277
274
|
}));
|
|
278
275
|
Chip.defaultProps = {
|
|
279
276
|
label: '',
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
@@ -46,10 +44,11 @@ const Collapse = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
46
44
|
};
|
|
47
45
|
}
|
|
48
46
|
}, [open]);
|
|
49
|
-
return jsx("div",
|
|
47
|
+
return jsx("div", {
|
|
50
48
|
css: CollapseRoot,
|
|
51
|
-
ref: ref
|
|
52
|
-
|
|
49
|
+
ref: ref,
|
|
50
|
+
...props
|
|
51
|
+
}, children);
|
|
53
52
|
}));
|
|
54
53
|
Collapse.defaultProps = {
|
|
55
54
|
open: false
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { memo, useMemo, useEffect, useRef, forwardRef } from 'react';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
8
6
|
import { jsx, css } from '@emotion/core';
|
|
9
|
-
import
|
|
7
|
+
import { noBorder } from '../../styles/general';
|
|
8
|
+
import { color as colors } from '../../styles/colors';
|
|
9
|
+
const {
|
|
10
|
+
system: {
|
|
11
|
+
disabled: systemDisabled
|
|
12
|
+
}
|
|
13
|
+
} = colors;
|
|
10
14
|
const Divider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
11
|
-
children,
|
|
12
15
|
width,
|
|
13
16
|
height,
|
|
14
17
|
direction,
|
|
15
18
|
color,
|
|
16
19
|
className,
|
|
20
|
+
style,
|
|
17
21
|
...props
|
|
18
22
|
}, ref) => {
|
|
19
23
|
if (!ref) {
|
|
@@ -21,18 +25,19 @@ const Divider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
const DividerRoot = css`
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
${noBorder}
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
margin: 0;
|
|
31
|
+
background-color: ${colors.semantic[color] || color};
|
|
27
32
|
&.vertical {
|
|
28
33
|
width: ${width ? isNaN(width) ? width : width + 'px' : '1px'};
|
|
29
34
|
height: ${height ? isNaN(height) ? height : height + 'px' : '100%'};
|
|
30
|
-
margin: auto 5px;
|
|
35
|
+
/* margin: auto 5px; */
|
|
31
36
|
}
|
|
32
37
|
&.horizontal {
|
|
33
38
|
width: ${width ? isNaN(width) ? height : width + 'px' : '100%'};
|
|
34
39
|
height: ${height ? isNaN(height) ? height : height + 'px' : '1px'};
|
|
35
|
-
margin: 5px auto;
|
|
40
|
+
/* margin: 5px auto; */
|
|
36
41
|
}
|
|
37
42
|
`;
|
|
38
43
|
useEffect(() => {
|
|
@@ -40,16 +45,18 @@ const Divider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
40
45
|
ref.current.style.height = ref.current.parentNode.offsetHeight + 'px';
|
|
41
46
|
}
|
|
42
47
|
}, []);
|
|
43
|
-
|
|
48
|
+
return useMemo(() => jsx("hr", {
|
|
44
49
|
css: DividerRoot,
|
|
45
50
|
ref: ref,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
style: style,
|
|
52
|
+
className: ['DGN-UI-Divider', direction, className].join(' ').trim(),
|
|
53
|
+
...props
|
|
54
|
+
}), [width, height, color, style, className]);
|
|
49
55
|
}));
|
|
50
56
|
Divider.defaultProps = {
|
|
51
|
-
color:
|
|
57
|
+
color: systemDisabled,
|
|
52
58
|
direction: 'horizontal',
|
|
59
|
+
style: {},
|
|
53
60
|
className: ''
|
|
54
61
|
};
|
|
55
62
|
Divider.propTypes = {
|
|
@@ -65,6 +72,12 @@ Divider.propTypes = {
|
|
|
65
72
|
/** direction of divider */
|
|
66
73
|
direction: PropTypes.oneOf(['vertical', 'horizontal']),
|
|
67
74
|
|
|
75
|
+
/** style inline of divider */
|
|
76
|
+
style: PropTypes.object,
|
|
77
|
+
|
|
78
|
+
/** className of divider */
|
|
79
|
+
className: PropTypes.string,
|
|
80
|
+
|
|
68
81
|
/** any props else */
|
|
69
82
|
props: PropTypes.object
|
|
70
83
|
};
|