diginet-core-ui 1.3.59-beta.2 → 1.3.60
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/MHRP39N0009.svg +2 -2
- package/assets/images/menu/dhr/MHRP39N0010.svg +6 -6
- package/assets/images/menu/dhr/MHRP39N0011.svg +13 -6
- package/assets/images/menu/dhr/MHRP39N0015.svg +4 -4
- package/assets/images/menu/dhr/MHRP89N1000.svg +5 -4
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -4
- package/assets/images/menu/dhr/W09F2000.svg +5 -3
- package/components/button/index.js +1 -0
- package/components/button/more.js +16 -16
- package/components/button/ripple-effect.js +0 -2
- package/components/card/card.js +28 -30
- package/components/card/index.js +0 -1
- package/components/chart/Pie/Circle.js +1 -2
- package/components/chart/Pie-v2/Circle.js +5 -4
- package/components/chart/Pie-v2/Sector.js +25 -19
- package/components/chart/Pie-v2/Sectors.js +15 -16
- package/components/chart/Pie-v2/index.js +16 -141
- package/components/chart/bar/Bar.js +18 -20
- package/components/chart/bar/Labels.js +18 -20
- package/components/chart/bar/index.js +2 -3
- package/components/chart/bar-v2/Bar.js +21 -23
- package/components/chart/bar-v2/Labels.js +19 -21
- package/components/chart/bar-v2/index.js +2 -3
- package/components/chart/line/Labels.js +18 -21
- package/components/chart/line/Path.js +6 -7
- package/components/chart/line/Point.js +0 -2
- package/components/chart/line/Title.js +2 -1
- package/components/chart/line/index.js +1 -22
- package/components/chart/line-v2/Labels.js +18 -21
- package/components/chart/line-v2/Path.js +14 -15
- package/components/chart/line-v2/Point.js +2 -4
- package/components/chart/line-v2/Title.js +2 -1
- package/components/chart/line-v2/index.js +7 -8
- package/components/check-text/index.js +21 -22
- package/components/chip/attach.js +3 -3
- package/components/chip/index.js +2 -1
- package/components/form-control/calendar/index.js +1 -1
- package/components/form-control/calendar/range.js +33 -33
- package/components/form-control/checkbox/index.js +6 -6
- package/components/form-control/dropdown/index.js +1 -1
- package/components/form-control/form/index.js +0 -1
- package/components/form-control/number-input/index.js +18 -5
- package/components/form-control/phone-input/index.js +27 -13
- package/components/form-control/time-picker/index.js +1 -2
- package/components/form-control/time-picker/swiper.js +76 -80
- package/components/form-view/helper-text.js +0 -1
- package/components/grid/Col.js +1 -1
- package/components/modal/index.js +0 -1
- package/components/others/extra/index.js +0 -2
- package/components/others/scrollbar/index.js +26 -25
- package/components/popup/danger_popup.js +1 -3
- package/components/popup/index.js +2 -2
- package/components/popup/proposals_popup.js +0 -1
- package/components/progress/circular.js +0 -2
- package/components/tooltip/index.js +2 -1
- package/components/transfer/index.js +91 -83
- package/icons/basic.js +45 -49
- package/icons/effect.js +19 -17
- package/icons/general/clock/clock.js +0 -1
- package/icons/general/color-handler/background.js +0 -1
- package/icons/general/color-handler/text.js +0 -1
- package/icons/general/emoji/emoji.js +0 -1
- package/icons/general/font-properties/bold.js +0 -1
- package/icons/general/font-properties/font-family.js +0 -1
- package/icons/general/font-properties/font-size.js +0 -1
- package/icons/general/font-properties/italic.js +0 -1
- package/icons/general/font-properties/underline.js +0 -1
- package/icons/general/hyperlink/hyperlink.js +0 -1
- package/icons/general/indent/decrease.js +0 -1
- package/icons/general/indent/increase.js +0 -1
- package/icons/general/list/bullets.js +0 -1
- package/icons/general/list/numbering.js +0 -1
- package/icons/general/picture/picture.js +0 -1
- package/icons/general/steps/redo.js +0 -1
- package/icons/general/steps/undo.js +0 -1
- package/icons/general/text-align/center.js +0 -1
- package/icons/general/text-align/justify.js +0 -1
- package/icons/general/text-align/left.js +0 -1
- package/icons/general/text-align/right.js +0 -1
- package/icons/menu/dhr.js +1 -2
- package/icons/menu/erp.js +0 -1
- package/package.json +31 -54
- package/readme.md +5 -0
- package/styles/animation.js +1 -2
- package/styles/color-helper.js +3 -5
- package/styles/font.js +4 -5
- package/styles/media-queries.js +10 -0
- package/theme/index.js +3 -1
- package/theme/make-styles.js +105 -25
- package/theme/theme-provider.js +9 -0
- package/theme/with-styles.js +15 -0
- package/theme/with-theme.js +9 -0
- package/utils/console.js +1 -0
- package/utils/error/error.js +1 -0
- package/utils/index.js +1 -0
- package/utils/number.js +63 -0
- package/utils/promisify.js +1 -2
- package/utils/renderIcon.js +6 -8
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path d="
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M21 3.00006L3 10.5301V11.5101L9.84 14.1601L12.48 21.0001H13.46L21 3.00006Z" fill="#7F828E"/>
|
|
3
3
|
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path d="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<path d="
|
|
6
|
-
<path d="
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16 9.50006C17.46 9.50006 18.78 10.0701 19.76 11.0001H21V9.00006H3V11.0001H12.24C13.22 10.0701 14.54 9.50006 16 9.50006Z" fill="#7F828E"/>
|
|
3
|
+
<path d="M21 5.00006H3V7.00006H21V5.00006Z" fill="#7F828E"/>
|
|
4
|
+
<path d="M10.88 17.0001H3V19.0001H12.24C11.65 18.4501 11.18 17.7701 10.88 17.0001Z" fill="#7F828E"/>
|
|
5
|
+
<path d="M10.88 13.0001H3V15.0001H10.5C10.5 14.2901 10.64 13.6201 10.88 13.0001Z" fill="#7F828E"/>
|
|
6
|
+
<path d="M19.43 17.0201C19.79 16.4301 20 15.7401 20 15.0001C20 12.7901 18.21 11.0001 16 11.0001C13.79 11.0001 12 12.7901 12 15.0001C12 17.2101 13.79 19.0001 16 19.0001C16.74 19.0001 17.43 18.7801 18.02 18.4301L20.59 21.0001L22 19.5901L19.43 17.0201ZM16 17.0001C14.9 17.0001 14 16.1001 14 15.0001C14 13.9001 14.9 13.0001 16 13.0001C17.1 13.0001 18 13.9001 18 15.0001C18 16.1001 17.1 17.0001 16 17.0001Z" fill="#7F828E"/>
|
|
7
7
|
</svg>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<path d="
|
|
6
|
-
<path
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0)">
|
|
3
|
+
<path d="M16.08 11.5401H18.08V4.5401C18.08 3.4401 17.18 2.5401 16.08 2.5401H4.07996C2.97996 2.5401 2.07996 3.4401 2.07996 4.5401V16.5401C2.07996 17.6401 2.97996 18.5401 4.07996 18.5401H11.08V16.5401H4.07996V4.3201H16.08V11.5401Z" fill="#7F828E"/>
|
|
4
|
+
<path d="M14.08 12.5401H6.07996V14.5401H14.08V12.5401Z" fill="#7F828E"/>
|
|
5
|
+
<path d="M11.08 11.5401H14.08V9.5401H6.07996V11.5401H11.08Z" fill="#7F828E"/>
|
|
6
|
+
<path d="M14.08 6.5401H6.07996V8.5401H14.08V6.5401Z" fill="#7F828E"/>
|
|
7
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.39 21.4601L11.92 17.9601L13.32 16.5501L15.39 18.6301L20.52 13.4601L21.92 14.8701L15.39 21.4601Z" fill="#7F828E"/>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="clip0">
|
|
11
|
+
<rect width="24" height="24" fill="white"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
</defs>
|
|
7
14
|
</svg>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path d="
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
1
|
+
<svg width="22" height="19" viewBox="0 0 22 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16.7895 17.135L20.0096 19L19.1551 15.485L22 13.12L18.2536 12.815L16.7895 9.5L15.3253 12.815L11.5789 13.12L14.4239 15.485L13.5694 19L16.7895 17.135Z" fill="#7F828E"/>
|
|
3
|
+
<path d="M9.26316 9.5C11.8221 9.5 13.8947 7.37438 13.8947 4.75C13.8947 2.12562 11.8221 0 9.26316 0C6.70421 0 4.63158 2.12562 4.63158 4.75C4.63158 7.37438 6.70421 9.5 9.26316 9.5Z" fill="#7F828E"/>
|
|
4
|
+
<path d="M6.69907 12.1373C3.61621 12.7076 0 14.2071 0 16.625V19H11.2779L11.896 16.4575L6.69907 12.1373Z" fill="#7F828E"/>
|
|
5
5
|
</svg>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
2
|
+
<g id="Group_4" data-name="Group 4" transform="translate(-904.173 -528.063)">
|
|
3
|
+
<rect id="Rectangle_2" data-name="Rectangle 2" width="24" height="24" transform="translate(904.173 528.063)" fill="none"/>
|
|
4
|
+
<path id="Path_1" data-name="Path 1" d="M-14.66-100.938v20a10.017,10.017,0,0,1-9-10A10.017,10.017,0,0,1-14.66-100.938Zm2.03,0v8.99h8.97A10.044,10.044,0,0,0-12.63-100.938Zm0,11.011v8.989a10.034,10.034,0,0,0,8.97-8.989Z" transform="translate(929.832 631)"/>
|
|
5
|
+
</g>
|
|
5
6
|
</svg>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
2
|
+
<g id="Group_4" data-name="Group 4" transform="translate(-904.173 -528.063)">
|
|
3
|
+
<rect id="Rectangle_2" data-name="Rectangle 2" width="24" height="24" transform="translate(904.173 528.063)" fill="none"/>
|
|
4
|
+
<path id="Path_1" data-name="Path 1" d="M-14.66-100.938v20a10.017,10.017,0,0,1-9-10A10.017,10.017,0,0,1-14.66-100.938Zm2.03,0v8.99h8.97A10.044,10.044,0,0,0-12.63-100.938Zm0,11.011v8.989a10.034,10.034,0,0,0,8.97-8.989Z" transform="translate(929.832 631)"/>
|
|
5
|
+
</g>
|
|
5
6
|
</svg>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<
|
|
3
|
-
<path
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="26.293" height="24.102" viewBox="0 0 26.293 24.102">
|
|
2
|
+
<g id="hosonhanvien_mss" transform="translate(0 -2.5)">
|
|
3
|
+
<path id="Path_3972" data-name="Path 3972" d="M17.973,21.295,13.787,19.2a1.153,1.153,0,0,1-.64-1.036V16.684c.1-.123.206-.262.315-.417a10.029,10.029,0,0,0,1.294-2.541,1.739,1.739,0,0,0,1.02-1.585V10.388a1.748,1.748,0,0,0-.438-1.15V6.907a3.928,3.928,0,0,0-.917-2.859A5.516,5.516,0,0,0,10.079,2.5,5.517,5.517,0,0,0,5.737,4.047,3.929,3.929,0,0,0,4.82,6.906V9.237a1.748,1.748,0,0,0-.438,1.15V12.14A1.743,1.743,0,0,0,5.038,13.5a9.2,9.2,0,0,0,1.535,3.171v1.45a1.158,1.158,0,0,1-.6,1.017L2.06,21.273A3.953,3.953,0,0,0,0,24.745V26.6H20.158V24.83A3.932,3.932,0,0,0,17.973,21.295Z" transform="translate(0)" fill="#707070"/>
|
|
4
|
+
<path id="Path_3973" data-name="Path 3973" d="M42,24.679l-4.261-1.845a.868.868,0,0,1-.308-.338l2.859,0s.165.016.422.016a4.6,4.6,0,0,0,1.753-.31,1.3,1.3,0,0,0,.545-1.941c-.817-1.163-2.725-4.2-2.784-7.284,0-.053-.174-5.295-5.351-5.337a6.5,6.5,0,0,0-1.478.181,4.734,4.734,0,0,1,.291,2.005V11.9a2.394,2.394,0,0,1,.438,1.376v1.753a2.409,2.409,0,0,1-1.142,2.043,10.651,10.651,0,0,1-1.292,2.463q-.1.14-.194.265v1.253a.492.492,0,0,0,.277.448l4.186,2.093a4.585,4.585,0,0,1,2.548,4.124v1.773h5.478v-1.62A3.543,3.543,0,0,0,42,24.679Z" transform="translate(-17.696 -2.886)" fill="#707070"/>
|
|
5
|
+
</g>
|
|
4
6
|
</svg>
|
|
@@ -23,25 +23,25 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
23
23
|
|
|
24
24
|
const [open, setOpen] = useState(false);
|
|
25
25
|
const ButtonMoreStyle = css`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
:last-of-type {
|
|
34
|
-
border-top-left-radius: 0;
|
|
35
|
-
border-bottom-left-radius: 0;
|
|
36
|
-
margin-left: 0;
|
|
37
|
-
}
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
button {
|
|
28
|
+
:first-of-type {
|
|
29
|
+
border-top-right-radius: 0;
|
|
30
|
+
border-bottom-right-radius: 0;
|
|
31
|
+
margin-right: 1px;
|
|
38
32
|
}
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
:last-of-type {
|
|
34
|
+
border-top-left-radius: 0;
|
|
35
|
+
border-bottom-left-radius: 0;
|
|
36
|
+
margin-left: 0;
|
|
41
37
|
}
|
|
42
|
-
|
|
38
|
+
}
|
|
39
|
+
.more-icon-close {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
43
|
|
|
44
|
-
const showMoreOption =
|
|
44
|
+
const showMoreOption = e => {
|
|
45
45
|
if (!open) {
|
|
46
46
|
setOpen(true);
|
|
47
47
|
}
|
package/components/card/card.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-undef */
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
@@ -9,18 +7,18 @@ import PropTypes from 'prop-types';
|
|
|
9
7
|
import { jsx, css } from '@emotion/core';
|
|
10
8
|
import CardContext from './context';
|
|
11
9
|
const Card = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
open,
|
|
11
|
+
type,
|
|
12
|
+
title,
|
|
15
13
|
style,
|
|
16
14
|
top,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
pressESCToClose,
|
|
16
|
+
darkTheme,
|
|
17
|
+
autoFocus,
|
|
18
|
+
refs,
|
|
21
19
|
onClose,
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
onConfirm,
|
|
21
|
+
onCancel,
|
|
24
22
|
children,
|
|
25
23
|
width,
|
|
26
24
|
...props
|
|
@@ -31,25 +29,25 @@ const Card = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
31
29
|
|
|
32
30
|
const cardBoxRef = useRef(null);
|
|
33
31
|
const CardBox = css`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
background-color: white;
|
|
33
|
+
border-radius: 4px;
|
|
34
|
+
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
border-radius: 10px;
|
|
37
|
+
display: flex;
|
|
38
|
+
position: relative;
|
|
39
|
+
max-height: calc(100% - ${isNaN(top) ? top : +top + 'px'});
|
|
40
|
+
min-width: 150px;
|
|
41
|
+
max-width: 90%;
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
height: max-content;
|
|
44
|
+
width: ${isNaN(width) ? width : width + 'px'};
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
-webkit-box-orient: vertical;
|
|
47
|
+
-webkit-box-direction: normal;
|
|
48
|
+
/* min-height: 152px; */
|
|
49
|
+
cursor: 'initial';
|
|
50
|
+
`;
|
|
53
51
|
|
|
54
52
|
const onShowCard = () => {
|
|
55
53
|
setOpenState(true);
|
package/components/card/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import PropTypes from
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
5
|
import { memo, forwardRef } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/core';
|
|
7
7
|
const Circle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
@@ -19,7 +19,6 @@ const Circle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
19
19
|
quantity
|
|
20
20
|
}, ref) => {
|
|
21
21
|
return jsx("ellipse", {
|
|
22
|
-
ref: ref,
|
|
23
22
|
cx: center,
|
|
24
23
|
cy: center,
|
|
25
24
|
fill: color,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import PropTypes from
|
|
4
|
+
import PropTypes from "prop-types";
|
|
5
5
|
import { memo, forwardRef } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/core';
|
|
7
7
|
const Circle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
@@ -15,10 +15,10 @@ const Circle = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
15
15
|
radius,
|
|
16
16
|
strokeColor,
|
|
17
17
|
strokeWidth,
|
|
18
|
-
name
|
|
18
|
+
name,
|
|
19
|
+
quantity
|
|
19
20
|
}, ref) => {
|
|
20
21
|
return jsx("ellipse", {
|
|
21
|
-
ref: ref,
|
|
22
22
|
cx: center,
|
|
23
23
|
cy: center,
|
|
24
24
|
fill: color,
|
|
@@ -44,6 +44,7 @@ Circle.propTypes = {
|
|
|
44
44
|
radius: PropTypes.number.isRequired,
|
|
45
45
|
strokeColor: PropTypes.string,
|
|
46
46
|
strokeWidth: PropTypes.number,
|
|
47
|
-
name: PropTypes.string
|
|
47
|
+
name: PropTypes.string,
|
|
48
|
+
quantity: PropTypes.number
|
|
48
49
|
};
|
|
49
50
|
export default Circle;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { useRef, memo, forwardRef } from 'react';
|
|
5
|
-
import PropTypes from
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
6
|
import { jsx, css } from '@emotion/core';
|
|
7
7
|
const Sector = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
8
8
|
fill,
|
|
@@ -18,6 +18,8 @@ const Sector = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
18
18
|
renderSelectedItem,
|
|
19
19
|
className,
|
|
20
20
|
path,
|
|
21
|
+
name,
|
|
22
|
+
quantity,
|
|
21
23
|
href,
|
|
22
24
|
transitionDuration,
|
|
23
25
|
transitionTimingFunction,
|
|
@@ -32,20 +34,20 @@ const Sector = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
32
34
|
|
|
33
35
|
const pathRef = useRef(null);
|
|
34
36
|
const SectorCSS = expandOnHover || expandedIndex >= 0 ? css`
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
transition-property: ${transitionProperty};
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
transition-timing-function: ${transitionTimingFunction};
|
|
40
|
+
transition-duration: ${transitionDuration};
|
|
41
|
+
&:hover {
|
|
42
|
+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
43
|
+
filter: drop-shadow( 0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.5));
|
|
44
|
+
}
|
|
45
|
+
` : css`
|
|
46
|
+
transition-property: all;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition-timing-function: ${transitionTimingFunction};
|
|
49
|
+
transition-duration: ${transitionDuration};
|
|
50
|
+
`;
|
|
49
51
|
const content = jsx("path", {
|
|
50
52
|
d: path,
|
|
51
53
|
fill: fill,
|
|
@@ -73,13 +75,14 @@ const Sector = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
73
75
|
return result;
|
|
74
76
|
}));
|
|
75
77
|
Sector.defaultProps = {
|
|
76
|
-
strokeColor:
|
|
78
|
+
strokeColor: "#fff",
|
|
77
79
|
strokeWidth: 0,
|
|
78
|
-
strokeLinejoin:
|
|
80
|
+
strokeLinejoin: "round",
|
|
81
|
+
name: null,
|
|
79
82
|
quantity: null,
|
|
80
83
|
href: null,
|
|
81
|
-
transitionDuration:
|
|
82
|
-
transitionTimingFunction:
|
|
84
|
+
transitionDuration: "0.5s",
|
|
85
|
+
transitionTimingFunction: "ease-in",
|
|
83
86
|
transitionProperty: 'd'
|
|
84
87
|
};
|
|
85
88
|
Sector.propTypes = {
|
|
@@ -108,6 +111,9 @@ Sector.propTypes = {
|
|
|
108
111
|
|
|
109
112
|
/** The strokeWidth attribute is a presentation attribute defining the width of the stroke to be applied to the shape */
|
|
110
113
|
strokeWidth: PropTypes.number,
|
|
114
|
+
|
|
115
|
+
/** The title is add from the data */
|
|
116
|
+
name: PropTypes.string,
|
|
111
117
|
quantity: PropTypes.number,
|
|
112
118
|
href: PropTypes.string,
|
|
113
119
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
|
|
3
1
|
/** @jsxRuntime classic */
|
|
4
2
|
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { useState } from 'react';
|
|
7
|
-
import PropTypes from
|
|
8
|
-
import Sector from
|
|
5
|
+
import PropTypes from "prop-types";
|
|
6
|
+
import Sector from "./Sector";
|
|
7
|
+
import ReactDOMServer from 'react-dom/server';
|
|
9
8
|
import { jsx, css } from '@emotion/core';
|
|
10
|
-
import { randomString } from '../../../utils';
|
|
11
|
-
import { typography } from
|
|
9
|
+
import { randomString, parseTextToHTML } from '../../../utils';
|
|
10
|
+
import { typography } from "../../../styles/typography";
|
|
12
11
|
|
|
13
12
|
const Sectors = ({
|
|
14
13
|
center,
|
|
@@ -38,7 +37,7 @@ const Sectors = ({
|
|
|
38
37
|
let angleStart = startAngle;
|
|
39
38
|
let angleEnd = startAngle;
|
|
40
39
|
|
|
41
|
-
const getPath = (d, i) => {
|
|
40
|
+
const getPath = (d, i, e) => {
|
|
42
41
|
const anglePosition = (angleStart + angleEnd) / 2;
|
|
43
42
|
var rotateX = 0;
|
|
44
43
|
var rotateY = 0;
|
|
@@ -78,10 +77,10 @@ const Sectors = ({
|
|
|
78
77
|
${typography.paragraph1};
|
|
79
78
|
stroke-dasharray: 1000;
|
|
80
79
|
stroke-dashoffset: 1000;
|
|
81
|
-
|
|
80
|
+
animation: draw 8s ease-in-out forwards;
|
|
82
81
|
@keyframes draw {
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
to {
|
|
83
|
+
stroke-dashoffset: 0;
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
`;
|
|
@@ -95,7 +94,7 @@ const Sectors = ({
|
|
|
95
94
|
animation: dash 1s linear forwards;
|
|
96
95
|
&:hover {
|
|
97
96
|
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
98
|
-
filter: drop-shadow(0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.2));
|
|
97
|
+
filter: drop-shadow( 0.05rem 0.05rem 0.1rem rgba(0, 0, 0, 0.2));
|
|
99
98
|
}
|
|
100
99
|
@keyframes dash {
|
|
101
100
|
to {
|
|
@@ -104,7 +103,7 @@ const Sectors = ({
|
|
|
104
103
|
}
|
|
105
104
|
`;
|
|
106
105
|
return jsx("g", {
|
|
107
|
-
key:
|
|
106
|
+
key: "Path" + i
|
|
108
107
|
}, jsx("path", {
|
|
109
108
|
d: path1,
|
|
110
109
|
stroke: d.color,
|
|
@@ -165,9 +164,9 @@ const Sectors = ({
|
|
|
165
164
|
|
|
166
165
|
return jsx("g", {
|
|
167
166
|
key: i,
|
|
168
|
-
id:
|
|
167
|
+
id: "sector" + i
|
|
169
168
|
}, jsx(Sector, {
|
|
170
|
-
key:
|
|
169
|
+
key: "sector" + i,
|
|
171
170
|
fill: d.color,
|
|
172
171
|
path: path,
|
|
173
172
|
href: d.href,
|
|
@@ -189,8 +188,8 @@ const Sectors = ({
|
|
|
189
188
|
Sectors.defaultProps = {
|
|
190
189
|
expandSize: 10,
|
|
191
190
|
strokeWidthTooltip: 2,
|
|
192
|
-
transitionTimingFunction:
|
|
193
|
-
strokeLinejoin:
|
|
191
|
+
transitionTimingFunction: "ease-out",
|
|
192
|
+
strokeLinejoin: "round",
|
|
194
193
|
transitionProperty: 'd'
|
|
195
194
|
};
|
|
196
195
|
Sectors.propTypes = {
|