@majoo-ui/react 1.56.3 → 1.57.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/components/barChart/BarChart.d.ts +82 -0
- package/components/barChart/index.d.ts +1 -0
- package/components/index.d.ts +2 -0
- package/components/pieChart/PieChart.d.ts +78 -0
- package/components/pieChart/index.d.ts +1 -0
- package/index.esm.css +4 -0
- package/index.esm.js +586 -77
- package/index.umd.css +4 -0
- package/index.umd.js +593 -75
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -1334,7 +1334,7 @@
|
|
|
1334
1334
|
bgDark: '#FFFFFF'
|
|
1335
1335
|
}
|
|
1336
1336
|
});
|
|
1337
|
-
var colors$
|
|
1337
|
+
var colors$7 = core.foundations.colors;
|
|
1338
1338
|
|
|
1339
1339
|
const normalize = {
|
|
1340
1340
|
'*,::before,::after': {
|
|
@@ -3278,7 +3278,7 @@
|
|
|
3278
3278
|
columnNumber: 17
|
|
3279
3279
|
}
|
|
3280
3280
|
}, /*#__PURE__*/React__namespace.createElement(icons.CloseOutline, {
|
|
3281
|
-
color: colors$
|
|
3281
|
+
color: colors$7.iconSecondary,
|
|
3282
3282
|
size: "16px",
|
|
3283
3283
|
__self: undefined,
|
|
3284
3284
|
__source: {
|
|
@@ -3719,7 +3719,7 @@
|
|
|
3719
3719
|
columnNumber: 7
|
|
3720
3720
|
}
|
|
3721
3721
|
}, /*#__PURE__*/React__namespace.createElement(icons.CloseOutline, {
|
|
3722
|
-
color: colors$
|
|
3722
|
+
color: colors$7.iconSecondary,
|
|
3723
3723
|
size: "16px",
|
|
3724
3724
|
__self: undefined,
|
|
3725
3725
|
__source: {
|
|
@@ -3806,7 +3806,7 @@
|
|
|
3806
3806
|
columnNumber: 9
|
|
3807
3807
|
}
|
|
3808
3808
|
}, /*#__PURE__*/React__namespace.createElement(icons.CloseOutline, {
|
|
3809
|
-
color: colors$
|
|
3809
|
+
color: colors$7.iconSecondary,
|
|
3810
3810
|
size: "16px",
|
|
3811
3811
|
__self: undefined,
|
|
3812
3812
|
__source: {
|
|
@@ -7847,7 +7847,7 @@
|
|
|
7847
7847
|
}
|
|
7848
7848
|
}, /*#__PURE__*/React__default["default"].createElement(icons.CloseOutline, {
|
|
7849
7849
|
size: 16,
|
|
7850
|
-
color: colors$
|
|
7850
|
+
color: colors$7.iconSecondary,
|
|
7851
7851
|
style: {
|
|
7852
7852
|
verticalAlign: 'middle'
|
|
7853
7853
|
},
|
|
@@ -8381,7 +8381,7 @@
|
|
|
8381
8381
|
const _excluded$e = ["size", "onChange", "css", "disabled", "withDebounce", "defaultValue"];
|
|
8382
8382
|
var _jsxFileName$z = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputSearchbox/InputSearchbox.js";
|
|
8383
8383
|
const {
|
|
8384
|
-
colors: colors$
|
|
8384
|
+
colors: colors$6
|
|
8385
8385
|
} = core.foundations;
|
|
8386
8386
|
const InputSearchbox = _ref => {
|
|
8387
8387
|
var _props$value;
|
|
@@ -8457,7 +8457,7 @@
|
|
|
8457
8457
|
}
|
|
8458
8458
|
})), /*#__PURE__*/React__default["default"].createElement(InputRightElement, {
|
|
8459
8459
|
children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
|
|
8460
|
-
color: colors$
|
|
8460
|
+
color: colors$6.iconSecondary,
|
|
8461
8461
|
__self: undefined,
|
|
8462
8462
|
__source: {
|
|
8463
8463
|
fileName: _jsxFileName$z,
|
|
@@ -9363,7 +9363,7 @@
|
|
|
9363
9363
|
readOnly: readOnly
|
|
9364
9364
|
}, {
|
|
9365
9365
|
children: jsxRuntime.jsx(icons.CaretDownOutline, {
|
|
9366
|
-
color: readOnly ? colors$
|
|
9366
|
+
color: readOnly ? colors$7.gray300 : iconColor
|
|
9367
9367
|
}, void 0)
|
|
9368
9368
|
}), void 0);
|
|
9369
9369
|
};
|
|
@@ -9575,7 +9575,7 @@
|
|
|
9575
9575
|
}, {
|
|
9576
9576
|
children: jsxRuntime.jsx(icons.CircleInfoOutline, {
|
|
9577
9577
|
size: "16px",
|
|
9578
|
-
color: colors$
|
|
9578
|
+
color: colors$7.iconDisable,
|
|
9579
9579
|
style: {
|
|
9580
9580
|
verticalAlign: 'text-bottom'
|
|
9581
9581
|
}
|
|
@@ -11610,7 +11610,7 @@
|
|
|
11610
11610
|
columnNumber: 11
|
|
11611
11611
|
}
|
|
11612
11612
|
}), /*#__PURE__*/React__default["default"].createElement(IconCaretDown, {
|
|
11613
|
-
color: disabled || readOnly ? colors$
|
|
11613
|
+
color: disabled || readOnly ? colors$7.iconDisable : colors$7.iconPrimary,
|
|
11614
11614
|
__self: undefined,
|
|
11615
11615
|
__source: {
|
|
11616
11616
|
fileName: _jsxFileName$w,
|
|
@@ -11709,7 +11709,7 @@
|
|
|
11709
11709
|
columnNumber: 19
|
|
11710
11710
|
}
|
|
11711
11711
|
}, showAllTags ? /*#__PURE__*/React__default["default"].createElement(icons.ChevronUpOutline, {
|
|
11712
|
-
color: colors$
|
|
11712
|
+
color: colors$7.iconSecondary,
|
|
11713
11713
|
__self: undefined,
|
|
11714
11714
|
__source: {
|
|
11715
11715
|
fileName: _jsxFileName$w,
|
|
@@ -11717,7 +11717,7 @@
|
|
|
11717
11717
|
columnNumber: 23
|
|
11718
11718
|
}
|
|
11719
11719
|
}) : /*#__PURE__*/React__default["default"].createElement(icons.ChevronDownOutline, {
|
|
11720
|
-
color: colors$
|
|
11720
|
+
color: colors$7.iconSecondary,
|
|
11721
11721
|
__self: undefined,
|
|
11722
11722
|
__source: {
|
|
11723
11723
|
fileName: _jsxFileName$w,
|
|
@@ -11874,7 +11874,7 @@
|
|
|
11874
11874
|
columnNumber: 23
|
|
11875
11875
|
}
|
|
11876
11876
|
}, item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
11877
|
-
color: colors$
|
|
11877
|
+
color: colors$7.iconDisable,
|
|
11878
11878
|
__self: undefined,
|
|
11879
11879
|
__source: {
|
|
11880
11880
|
fileName: _jsxFileName$w,
|
|
@@ -11882,7 +11882,7 @@
|
|
|
11882
11882
|
columnNumber: 27
|
|
11883
11883
|
}
|
|
11884
11884
|
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
11885
|
-
color: colors$
|
|
11885
|
+
color: colors$7.iconGreen,
|
|
11886
11886
|
__self: undefined,
|
|
11887
11887
|
__source: {
|
|
11888
11888
|
fileName: _jsxFileName$w,
|
|
@@ -11947,7 +11947,7 @@
|
|
|
11947
11947
|
}
|
|
11948
11948
|
}, /*#__PURE__*/React__default["default"].createElement(icons.CircleInfoOutline, {
|
|
11949
11949
|
size: "16px",
|
|
11950
|
-
color: colors$
|
|
11950
|
+
color: colors$7.iconDisable,
|
|
11951
11951
|
style: {
|
|
11952
11952
|
verticalAlign: 'text-bottom'
|
|
11953
11953
|
},
|
|
@@ -12283,7 +12283,7 @@
|
|
|
12283
12283
|
columnNumber: 9
|
|
12284
12284
|
}
|
|
12285
12285
|
}, /*#__PURE__*/React__default["default"].createElement(icons.CirclePlusOutline, {
|
|
12286
|
-
color: colors$
|
|
12286
|
+
color: colors$7.iconGreen,
|
|
12287
12287
|
__self: this,
|
|
12288
12288
|
__source: {
|
|
12289
12289
|
fileName: _jsxFileName$u,
|
|
@@ -12579,7 +12579,7 @@
|
|
|
12579
12579
|
}, {
|
|
12580
12580
|
children: jsxRuntime.jsx(icons.SortingOutline, {
|
|
12581
12581
|
size: 16,
|
|
12582
|
-
color: colors$
|
|
12582
|
+
color: colors$7.iconSecondary
|
|
12583
12583
|
}, void 0)
|
|
12584
12584
|
}), void 0)]
|
|
12585
12585
|
}), void 0), isLoading && jsxRuntime.jsx(Flex$1, __assign({
|
|
@@ -12809,18 +12809,18 @@
|
|
|
12809
12809
|
}), void 0);
|
|
12810
12810
|
});
|
|
12811
12811
|
|
|
12812
|
-
var colors$
|
|
12812
|
+
var colors$5 = core.foundations.colors;
|
|
12813
12813
|
function InputOTP(props) {
|
|
12814
12814
|
var isError = props.isError;
|
|
12815
12815
|
var inputStyles = {
|
|
12816
12816
|
width: 48,
|
|
12817
12817
|
height: 48,
|
|
12818
|
-
border: "1px solid ".concat(isError ? colors$
|
|
12818
|
+
border: "1px solid ".concat(isError ? colors$5.textRed : colors$5.gray300),
|
|
12819
12819
|
borderRadius: 4,
|
|
12820
12820
|
fontWeight: 600,
|
|
12821
12821
|
fontSize: 24,
|
|
12822
12822
|
textAlign: 'center',
|
|
12823
|
-
color: colors$
|
|
12823
|
+
color: colors$5.textPrimary
|
|
12824
12824
|
};
|
|
12825
12825
|
return jsxRuntime.jsx(OTPInput__default["default"], __assign({
|
|
12826
12826
|
inputStyles: inputStyles
|
|
@@ -13088,7 +13088,7 @@
|
|
|
13088
13088
|
}, {
|
|
13089
13089
|
children: jsxRuntime.jsx(icons.MinusOutline, {
|
|
13090
13090
|
size: 24,
|
|
13091
|
-
color: disabled || disabledDecrement ? colors$
|
|
13091
|
+
color: disabled || disabledDecrement ? colors$7.iconDisable : colors$7.primary500
|
|
13092
13092
|
}, void 0)
|
|
13093
13093
|
}), void 0), jsxRuntime.jsx(Input$4, {
|
|
13094
13094
|
ref: ref,
|
|
@@ -13111,7 +13111,7 @@
|
|
|
13111
13111
|
}, {
|
|
13112
13112
|
children: jsxRuntime.jsx(icons.PlusOutline, {
|
|
13113
13113
|
size: 24,
|
|
13114
|
-
color: disabled || disabledIncrement ? colors$
|
|
13114
|
+
color: disabled || disabledIncrement ? colors$7.iconDisable : colors$7.primary500
|
|
13115
13115
|
}, void 0)
|
|
13116
13116
|
}), void 0)]
|
|
13117
13117
|
}), void 0);
|
|
@@ -13849,7 +13849,7 @@
|
|
|
13849
13849
|
columnNumber: 11
|
|
13850
13850
|
}
|
|
13851
13851
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ChevronLgLeftOutline, {
|
|
13852
|
-
color: colors$
|
|
13852
|
+
color: colors$7.iconGreen,
|
|
13853
13853
|
__self: undefined,
|
|
13854
13854
|
__source: {
|
|
13855
13855
|
fileName: _jsxFileName$r,
|
|
@@ -13878,7 +13878,7 @@
|
|
|
13878
13878
|
columnNumber: 11
|
|
13879
13879
|
}
|
|
13880
13880
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ChevronLgRightOutline, {
|
|
13881
|
-
color: colors$
|
|
13881
|
+
color: colors$7.iconGreen,
|
|
13882
13882
|
__self: undefined,
|
|
13883
13883
|
__source: {
|
|
13884
13884
|
fileName: _jsxFileName$r,
|
|
@@ -13938,7 +13938,7 @@
|
|
|
13938
13938
|
columnNumber: 9
|
|
13939
13939
|
}
|
|
13940
13940
|
}, icon && /*#__PURE__*/React__default["default"].cloneElement(icon, {
|
|
13941
|
-
color: activeTabs === value || isIconHovered ? colors$
|
|
13941
|
+
color: activeTabs === value || isIconHovered ? colors$7.iconGreen : colors$7.iconDisable
|
|
13942
13942
|
}), (!icon || activeTabs === value) && children)));
|
|
13943
13943
|
};
|
|
13944
13944
|
const TabsContent$1 = _ref4 => {
|
|
@@ -14210,7 +14210,7 @@
|
|
|
14210
14210
|
columnNumber: 15
|
|
14211
14211
|
}
|
|
14212
14212
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ChevronLeftOutline, {
|
|
14213
|
-
color: colors$
|
|
14213
|
+
color: colors$7.iconGreen,
|
|
14214
14214
|
__self: this,
|
|
14215
14215
|
__source: {
|
|
14216
14216
|
fileName: _jsxFileName$q,
|
|
@@ -14240,7 +14240,7 @@
|
|
|
14240
14240
|
columnNumber: 15
|
|
14241
14241
|
}
|
|
14242
14242
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ChevronRightOutline, {
|
|
14243
|
-
color: colors$
|
|
14243
|
+
color: colors$7.iconGreen,
|
|
14244
14244
|
__self: this,
|
|
14245
14245
|
__source: {
|
|
14246
14246
|
fileName: _jsxFileName$q,
|
|
@@ -17090,7 +17090,7 @@
|
|
|
17090
17090
|
}
|
|
17091
17091
|
}, /*#__PURE__*/React__default["default"].createElement(InputLeftElement, {
|
|
17092
17092
|
children: /*#__PURE__*/React__default["default"].createElement(icons.TimeOutline, {
|
|
17093
|
-
color: disabled ? colors$
|
|
17093
|
+
color: disabled ? colors$7.iconDisable : colors$7.iconPrimary,
|
|
17094
17094
|
__self: this,
|
|
17095
17095
|
__source: {
|
|
17096
17096
|
fileName: _jsxFileName$l,
|
|
@@ -17838,9 +17838,9 @@
|
|
|
17838
17838
|
var getInputPickerValue = function getInputPickerValue(type, date, isTimePicker) {
|
|
17839
17839
|
if (!date) return '';
|
|
17840
17840
|
if (type === SINGLE_PICKER) {
|
|
17841
|
-
return "".concat(moment__default["default"](date).format(isTimePicker ? '
|
|
17841
|
+
return "".concat(moment__default["default"](date).format(isTimePicker ? 'DD MMMM YYYY, HH:mm' : 'DD MMMM YYYY'));
|
|
17842
17842
|
} else {
|
|
17843
|
-
return "".concat(moment__default["default"](date[0]).format('
|
|
17843
|
+
return "".concat(moment__default["default"](date[0]).format('DD MMM YYYY'), " - ").concat(moment__default["default"](date[1]).format('DD MMM YYYY'));
|
|
17844
17844
|
}
|
|
17845
17845
|
};
|
|
17846
17846
|
function InputDatePicker(_a) {
|
|
@@ -18370,7 +18370,7 @@
|
|
|
18370
18370
|
columnNumber: 15
|
|
18371
18371
|
}
|
|
18372
18372
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ArrowLeftOutline, {
|
|
18373
|
-
color: currentPage === 1 ? colors$
|
|
18373
|
+
color: currentPage === 1 ? colors$7.iconDisable : colors$7.iconPrimary,
|
|
18374
18374
|
__self: undefined,
|
|
18375
18375
|
__source: {
|
|
18376
18376
|
fileName: _jsxFileName$k,
|
|
@@ -18423,7 +18423,7 @@
|
|
|
18423
18423
|
columnNumber: 15
|
|
18424
18424
|
}
|
|
18425
18425
|
}, /*#__PURE__*/React__default["default"].createElement(icons.ArrowRightOutline, {
|
|
18426
|
-
color: currentPage === totalPages ? colors$
|
|
18426
|
+
color: currentPage === totalPages ? colors$7.iconDisable : colors$7.iconPrimary,
|
|
18427
18427
|
__self: undefined,
|
|
18428
18428
|
__source: {
|
|
18429
18429
|
fileName: _jsxFileName$k,
|
|
@@ -18578,7 +18578,7 @@
|
|
|
18578
18578
|
columnNumber: 13
|
|
18579
18579
|
}
|
|
18580
18580
|
}, selectedLimit.toString()), /*#__PURE__*/React__default["default"].createElement(icons.ChevronDownOutline, {
|
|
18581
|
-
color: colors$
|
|
18581
|
+
color: colors$7.gray400,
|
|
18582
18582
|
__self: this,
|
|
18583
18583
|
__source: {
|
|
18584
18584
|
fileName: _jsxFileName$j,
|
|
@@ -18816,23 +18816,23 @@
|
|
|
18816
18816
|
userSelect: 'none',
|
|
18817
18817
|
color: '$textPrimary',
|
|
18818
18818
|
'&[data-disabled]': {
|
|
18819
|
-
color: colors$
|
|
18819
|
+
color: colors$7.gray400,
|
|
18820
18820
|
pointerEvents: 'none'
|
|
18821
18821
|
},
|
|
18822
18822
|
'&:hover': {
|
|
18823
18823
|
cursor: 'pointer',
|
|
18824
|
-
backgroundColor: colors$
|
|
18824
|
+
backgroundColor: colors$7.gray100
|
|
18825
18825
|
},
|
|
18826
18826
|
'&:active': {
|
|
18827
|
-
backgroundColor: colors$
|
|
18827
|
+
backgroundColor: colors$7.gray150
|
|
18828
18828
|
},
|
|
18829
18829
|
'&:focus': {
|
|
18830
|
-
backgroundColor: colors$
|
|
18830
|
+
backgroundColor: colors$7.gray100
|
|
18831
18831
|
}
|
|
18832
18832
|
});
|
|
18833
18833
|
var ContextMenuSeparator = styled('div', {
|
|
18834
18834
|
height: 1,
|
|
18835
|
-
backgroundColor: colors$
|
|
18835
|
+
backgroundColor: colors$7.gray150,
|
|
18836
18836
|
margin: 5
|
|
18837
18837
|
});
|
|
18838
18838
|
|
|
@@ -19131,7 +19131,7 @@
|
|
|
19131
19131
|
justify: "between",
|
|
19132
19132
|
gap: 5,
|
|
19133
19133
|
css: {
|
|
19134
|
-
backgroundColor: colors$
|
|
19134
|
+
backgroundColor: colors$7.bgGray,
|
|
19135
19135
|
padding: "$spacing-04 $spacing-05 ".concat('selection' in row.values ? '$spacing-04 $spacing-07' : ''),
|
|
19136
19136
|
borderBottom: '1pt solid $bgBorder',
|
|
19137
19137
|
alignItems: cell.column.accessor ? getAlign(cellAlign) : 'center'
|
|
@@ -19154,7 +19154,7 @@
|
|
|
19154
19154
|
gap: 3,
|
|
19155
19155
|
css: {
|
|
19156
19156
|
height: '40px',
|
|
19157
|
-
backgroundColor: colors$
|
|
19157
|
+
backgroundColor: colors$7.bgGray,
|
|
19158
19158
|
paddingRight: '$spacing-04'
|
|
19159
19159
|
}
|
|
19160
19160
|
}, {
|
|
@@ -20143,7 +20143,7 @@
|
|
|
20143
20143
|
children: [leftAddOnCells.map(function (_, index) {
|
|
20144
20144
|
return jsxRuntime.jsx("td", {
|
|
20145
20145
|
style: {
|
|
20146
|
-
backgroundColor: colors$
|
|
20146
|
+
backgroundColor: colors$7.bgGray
|
|
20147
20147
|
}
|
|
20148
20148
|
}, index);
|
|
20149
20149
|
}), jsxRuntime.jsxs(React__namespace.Fragment, {
|
|
@@ -21288,7 +21288,7 @@
|
|
|
21288
21288
|
});
|
|
21289
21289
|
const StyledOverlay = styled(ADialog__namespace.Overlay, {
|
|
21290
21290
|
zIndex: 1,
|
|
21291
|
-
backgroundColor: colors$
|
|
21291
|
+
backgroundColor: colors$7.bgDimmer,
|
|
21292
21292
|
position: 'fixed',
|
|
21293
21293
|
inset: 0,
|
|
21294
21294
|
'@media (prefers-reduced-motion: no-preference)': {
|
|
@@ -21321,14 +21321,14 @@
|
|
|
21321
21321
|
display: 'flex',
|
|
21322
21322
|
flexDirection: 'row',
|
|
21323
21323
|
justifyContent: 'space-between',
|
|
21324
|
-
color: colors$
|
|
21324
|
+
color: colors$7.gray900,
|
|
21325
21325
|
fontSize: 17,
|
|
21326
21326
|
fontWeight: 500
|
|
21327
21327
|
});
|
|
21328
21328
|
const StyledDescription$1 = styled(ADialog__namespace.Description, {
|
|
21329
21329
|
mx: 24,
|
|
21330
21330
|
my: 20,
|
|
21331
|
-
color: colors$
|
|
21331
|
+
color: colors$7.gray900,
|
|
21332
21332
|
fontSize: 15,
|
|
21333
21333
|
lineHeight: 1.5
|
|
21334
21334
|
});
|
|
@@ -21978,17 +21978,17 @@
|
|
|
21978
21978
|
position: 'relative',
|
|
21979
21979
|
userSelect: 'none',
|
|
21980
21980
|
'&[data-disabled]': {
|
|
21981
|
-
color: colors$
|
|
21981
|
+
color: colors$7.gray400,
|
|
21982
21982
|
pointerEvents: 'none'
|
|
21983
21983
|
},
|
|
21984
21984
|
'&:hover': {
|
|
21985
21985
|
cursor: 'pointer'
|
|
21986
21986
|
},
|
|
21987
21987
|
'&:active': {
|
|
21988
|
-
backgroundColor: colors$
|
|
21988
|
+
backgroundColor: colors$7.gray150
|
|
21989
21989
|
},
|
|
21990
21990
|
'&:focus': {
|
|
21991
|
-
backgroundColor: colors$
|
|
21991
|
+
backgroundColor: colors$7.gray100
|
|
21992
21992
|
}
|
|
21993
21993
|
};
|
|
21994
21994
|
const StyledItem = styled(DropdownMenuPrimitive__namespace.Item, Object.assign({}, itemStyles));
|
|
@@ -22005,11 +22005,11 @@
|
|
|
22005
22005
|
padding: '8px 0',
|
|
22006
22006
|
fontSize: 12,
|
|
22007
22007
|
lineHeight: '25px',
|
|
22008
|
-
color: colors$
|
|
22008
|
+
color: colors$7.gray700
|
|
22009
22009
|
});
|
|
22010
22010
|
const StyledSeparator = styled(DropdownMenuPrimitive__namespace.Separator, {
|
|
22011
22011
|
height: 1,
|
|
22012
|
-
backgroundColor: colors$
|
|
22012
|
+
backgroundColor: colors$7.gray150,
|
|
22013
22013
|
margin: 5
|
|
22014
22014
|
});
|
|
22015
22015
|
const StyledItemIndicator = styled(DropdownMenuPrimitive__namespace.ItemIndicator, {
|
|
@@ -22106,7 +22106,7 @@
|
|
|
22106
22106
|
color: 'white'
|
|
22107
22107
|
},
|
|
22108
22108
|
'[data-disabled] &': {
|
|
22109
|
-
color: colors$
|
|
22109
|
+
color: colors$7.gray400
|
|
22110
22110
|
}
|
|
22111
22111
|
});
|
|
22112
22112
|
const StyledDropdown = styled(Button$4, {
|
|
@@ -25895,7 +25895,7 @@
|
|
|
25895
25895
|
buttonType: "secondary"
|
|
25896
25896
|
}, {
|
|
25897
25897
|
children: jsxRuntime.jsx(icons.ChevronLeftOutline, {
|
|
25898
|
-
color: colors$
|
|
25898
|
+
color: colors$7.btnPrimary
|
|
25899
25899
|
}, void 0)
|
|
25900
25900
|
}), void 0), jsxRuntime.jsxs(Flex$1, __assign({
|
|
25901
25901
|
align: "center",
|
|
@@ -25955,7 +25955,7 @@
|
|
|
25955
25955
|
buttonType: "secondary"
|
|
25956
25956
|
}, {
|
|
25957
25957
|
children: jsxRuntime.jsx(icons.ChevronRightOutline, {
|
|
25958
|
-
color: colors$
|
|
25958
|
+
color: colors$7.btnPrimary
|
|
25959
25959
|
}, void 0)
|
|
25960
25960
|
}), void 0)]
|
|
25961
25961
|
}), void 0);
|
|
@@ -29034,7 +29034,7 @@
|
|
|
29034
29034
|
marginRight: 9
|
|
29035
29035
|
},
|
|
29036
29036
|
size: "24",
|
|
29037
|
-
color: colors$
|
|
29037
|
+
color: colors$7.bgGreen,
|
|
29038
29038
|
__self: undefined,
|
|
29039
29039
|
__source: {
|
|
29040
29040
|
fileName: _jsxFileName$4,
|
|
@@ -29055,7 +29055,7 @@
|
|
|
29055
29055
|
margin: '0 9px'
|
|
29056
29056
|
},
|
|
29057
29057
|
size: "20",
|
|
29058
|
-
color: colors$
|
|
29058
|
+
color: colors$7.iconSecondary,
|
|
29059
29059
|
__self: undefined,
|
|
29060
29060
|
__source: {
|
|
29061
29061
|
fileName: _jsxFileName$4,
|
|
@@ -29127,7 +29127,7 @@
|
|
|
29127
29127
|
}
|
|
29128
29128
|
}, /*#__PURE__*/React__default["default"].createElement(StyledCircleInfoOutline, {
|
|
29129
29129
|
size: "20",
|
|
29130
|
-
color: colors$
|
|
29130
|
+
color: colors$7.iconPrimary,
|
|
29131
29131
|
__self: undefined,
|
|
29132
29132
|
__source: {
|
|
29133
29133
|
fileName: _jsxFileName$4,
|
|
@@ -29554,10 +29554,10 @@
|
|
|
29554
29554
|
const DesktopContainer = styled(Flex$1, {
|
|
29555
29555
|
display: 'none',
|
|
29556
29556
|
'& .active-scroll-spy': {
|
|
29557
|
-
borderLeft: `4px solid ${colors$
|
|
29557
|
+
borderLeft: `4px solid ${colors$7.primary500} !important`
|
|
29558
29558
|
},
|
|
29559
29559
|
'& .active-scroll-spy .link-title': {
|
|
29560
|
-
color: `${colors$
|
|
29560
|
+
color: `${colors$7.primary500} !important`
|
|
29561
29561
|
},
|
|
29562
29562
|
'@md': {
|
|
29563
29563
|
display: 'unset'
|
|
@@ -29565,7 +29565,7 @@
|
|
|
29565
29565
|
});
|
|
29566
29566
|
const MobileContainer = styled(Flex$1, {
|
|
29567
29567
|
backgroundColor: '$white',
|
|
29568
|
-
border: `1px solid ${colors$
|
|
29568
|
+
border: `1px solid ${colors$7.gray150}`,
|
|
29569
29569
|
borderRadius: 8,
|
|
29570
29570
|
padding: '8px 8px',
|
|
29571
29571
|
width: '100%',
|
|
@@ -29692,7 +29692,7 @@
|
|
|
29692
29692
|
marginLeft: '-4px !important',
|
|
29693
29693
|
borderLeftWidth: '4px !important',
|
|
29694
29694
|
borderLeftStyle: 'solid !important',
|
|
29695
|
-
borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$
|
|
29695
|
+
borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$7.primary500 : 'transparent'} !important`,
|
|
29696
29696
|
paddingLeft: '16px !important',
|
|
29697
29697
|
minHeight: 25
|
|
29698
29698
|
},
|
|
@@ -48238,11 +48238,11 @@
|
|
|
48238
48238
|
var getColor = function getColor(state) {
|
|
48239
48239
|
switch (state) {
|
|
48240
48240
|
case 'error':
|
|
48241
|
-
return colors$
|
|
48241
|
+
return colors$7.red400;
|
|
48242
48242
|
case 'active':
|
|
48243
|
-
return colors$
|
|
48243
|
+
return colors$7.primary500;
|
|
48244
48244
|
default:
|
|
48245
|
-
return colors$
|
|
48245
|
+
return colors$7.gray150;
|
|
48246
48246
|
}
|
|
48247
48247
|
};
|
|
48248
48248
|
var iconProps = {
|
|
@@ -49089,7 +49089,7 @@
|
|
|
49089
49089
|
}), void 0);
|
|
49090
49090
|
};
|
|
49091
49091
|
|
|
49092
|
-
var colors$
|
|
49092
|
+
var colors$4 = core.foundations.colors;
|
|
49093
49093
|
var ComparatorItem = function ComparatorItem(props) {
|
|
49094
49094
|
var dataKey = props.dataKey,
|
|
49095
49095
|
color = props.color,
|
|
@@ -49163,7 +49163,7 @@
|
|
|
49163
49163
|
}
|
|
49164
49164
|
}, {
|
|
49165
49165
|
children: jsxRuntime.jsx(icons.CloseOutline, {
|
|
49166
|
-
color: colors$
|
|
49166
|
+
color: colors$4.textSecondary,
|
|
49167
49167
|
size: 24
|
|
49168
49168
|
}, void 0)
|
|
49169
49169
|
}), void 0)]
|
|
@@ -49188,7 +49188,7 @@
|
|
|
49188
49188
|
}), void 0);
|
|
49189
49189
|
};
|
|
49190
49190
|
|
|
49191
|
-
var colors$
|
|
49191
|
+
var colors$3 = core.foundations.colors;
|
|
49192
49192
|
var ComparatorController = function ComparatorController(_a) {
|
|
49193
49193
|
var option = _a.option,
|
|
49194
49194
|
onComparatorAdd = _a.onComparatorAdd,
|
|
@@ -49257,7 +49257,7 @@
|
|
|
49257
49257
|
},
|
|
49258
49258
|
leftIcon: jsxRuntime.jsx(icons.PlusOutline, {
|
|
49259
49259
|
size: 24,
|
|
49260
|
-
color: colors$
|
|
49260
|
+
color: colors$3.primary500
|
|
49261
49261
|
}, void 0),
|
|
49262
49262
|
onClick: function () {
|
|
49263
49263
|
return handleToggle();
|
|
@@ -49582,7 +49582,7 @@
|
|
|
49582
49582
|
legendData: []
|
|
49583
49583
|
};
|
|
49584
49584
|
|
|
49585
|
-
var colors = core.foundations.colors;
|
|
49585
|
+
var colors$2 = core.foundations.colors;
|
|
49586
49586
|
var Container$2 = styled('div', {
|
|
49587
49587
|
'@sm': {
|
|
49588
49588
|
overflowY: 'hidden',
|
|
@@ -49733,7 +49733,7 @@
|
|
|
49733
49733
|
setFilteredData([{
|
|
49734
49734
|
dataKey: 'novalue',
|
|
49735
49735
|
name: 'novalue',
|
|
49736
|
-
color: colors.chartYellow,
|
|
49736
|
+
color: colors$2.chartYellow,
|
|
49737
49737
|
hide: true
|
|
49738
49738
|
}]);
|
|
49739
49739
|
setIsComparator(false);
|
|
@@ -49758,7 +49758,7 @@
|
|
|
49758
49758
|
cx: cx,
|
|
49759
49759
|
cy: cy,
|
|
49760
49760
|
r: 10,
|
|
49761
|
-
fill: colors.white,
|
|
49761
|
+
fill: colors$2.white,
|
|
49762
49762
|
stroke: fill,
|
|
49763
49763
|
strokeWidth: 3
|
|
49764
49764
|
}, void 0);
|
|
@@ -49878,7 +49878,7 @@
|
|
|
49878
49878
|
cx: cx,
|
|
49879
49879
|
cy: cy,
|
|
49880
49880
|
r: 10,
|
|
49881
|
-
fill: colors.white,
|
|
49881
|
+
fill: colors$2.white,
|
|
49882
49882
|
stroke: fill,
|
|
49883
49883
|
strokeWidth: 3
|
|
49884
49884
|
}, void 0);
|
|
@@ -50219,7 +50219,7 @@
|
|
|
50219
50219
|
}
|
|
50220
50220
|
}, void 0) : jsxRuntime.jsx(icons.MinusOutline, {
|
|
50221
50221
|
size: 16,
|
|
50222
|
-
color: colors$
|
|
50222
|
+
color: colors$7.iconDisable
|
|
50223
50223
|
}, void 0)
|
|
50224
50224
|
}, void 0)
|
|
50225
50225
|
}), index + indexSubRow + 'tb-cell-collapse');
|
|
@@ -50525,9 +50525,9 @@
|
|
|
50525
50525
|
function getBaseColor(color) {
|
|
50526
50526
|
switch (color) {
|
|
50527
50527
|
case 'primary':
|
|
50528
|
-
return colors$
|
|
50528
|
+
return colors$7.gray300;
|
|
50529
50529
|
default:
|
|
50530
|
-
return colors$
|
|
50530
|
+
return colors$7.gray150;
|
|
50531
50531
|
}
|
|
50532
50532
|
}
|
|
50533
50533
|
function getSize(size) {
|
|
@@ -50690,9 +50690,9 @@
|
|
|
50690
50690
|
}
|
|
50691
50691
|
}, {
|
|
50692
50692
|
children: [showAllTags ? jsxRuntime.jsx(icons.ChevronUpOutline, {
|
|
50693
|
-
color: colors$
|
|
50693
|
+
color: colors$7.iconSecondary
|
|
50694
50694
|
}, void 0) : jsxRuntime.jsx(icons.ChevronDownOutline, {
|
|
50695
|
-
color: colors$
|
|
50695
|
+
color: colors$7.iconSecondary
|
|
50696
50696
|
}, void 0), jsxRuntime.jsx(Paragraph, __assign({
|
|
50697
50697
|
css: {
|
|
50698
50698
|
fontWeight: 600,
|
|
@@ -50718,6 +50718,522 @@
|
|
|
50718
50718
|
counterLabel: 'produk dipilih'
|
|
50719
50719
|
};
|
|
50720
50720
|
|
|
50721
|
+
var colors$1 = core.foundations.colors;
|
|
50722
|
+
var renderLegend$1 = function renderLegend(formattedData, legend, subtitle, tickFormatter) {
|
|
50723
|
+
return jsxRuntime.jsxs(Box, __assign({
|
|
50724
|
+
css: {
|
|
50725
|
+
marginTop: '$spacing-09'
|
|
50726
|
+
}
|
|
50727
|
+
}, {
|
|
50728
|
+
children: [subtitle && jsxRuntime.jsx(Flex$1, __assign({
|
|
50729
|
+
justify: "center"
|
|
50730
|
+
}, {
|
|
50731
|
+
children: jsxRuntime.jsx(Heading, __assign({
|
|
50732
|
+
css: {
|
|
50733
|
+
marginBottom: '$spacing-06'
|
|
50734
|
+
},
|
|
50735
|
+
heading: "sectionTitle"
|
|
50736
|
+
}, {
|
|
50737
|
+
children: subtitle
|
|
50738
|
+
}), void 0)
|
|
50739
|
+
}), void 0), formattedData.length > 0 && jsxRuntime.jsx(Flex$1, __assign({
|
|
50740
|
+
direction: "column",
|
|
50741
|
+
gap: 5
|
|
50742
|
+
}, {
|
|
50743
|
+
children: formattedData.map(function (data, index) {
|
|
50744
|
+
var _a, _b;
|
|
50745
|
+
return jsxRuntime.jsxs(Box, {
|
|
50746
|
+
children: [jsxRuntime.jsxs(Flex$1, __assign({
|
|
50747
|
+
justify: "between"
|
|
50748
|
+
}, {
|
|
50749
|
+
children: [jsxRuntime.jsxs(Flex$1, __assign({
|
|
50750
|
+
align: "center"
|
|
50751
|
+
}, {
|
|
50752
|
+
children: [jsxRuntime.jsx(Box, {
|
|
50753
|
+
css: {
|
|
50754
|
+
backgroundColor: data.color,
|
|
50755
|
+
borderRadius: '50%',
|
|
50756
|
+
height: 12,
|
|
50757
|
+
width: 12,
|
|
50758
|
+
display: 'inline-block',
|
|
50759
|
+
marginRight: '$spacing-03'
|
|
50760
|
+
}
|
|
50761
|
+
}, void 0), jsxRuntime.jsx(Box, __assign({
|
|
50762
|
+
css: {
|
|
50763
|
+
width: 120
|
|
50764
|
+
}
|
|
50765
|
+
}, {
|
|
50766
|
+
children: jsxRuntime.jsx(Text$1, __assign({
|
|
50767
|
+
variant: "label",
|
|
50768
|
+
color: "secondary"
|
|
50769
|
+
}, {
|
|
50770
|
+
children: data.name
|
|
50771
|
+
}), void 0)
|
|
50772
|
+
}), void 0)]
|
|
50773
|
+
}), void 0), legend.showTotal && jsxRuntime.jsx(Text$1, __assign({
|
|
50774
|
+
variant: "label",
|
|
50775
|
+
color: "secondary"
|
|
50776
|
+
}, {
|
|
50777
|
+
children: tickFormatter ? tickFormatter === null || tickFormatter === void 0 ? void 0 : tickFormatter((_a = formattedData[index]) === null || _a === void 0 ? void 0 : _a.total) : (_b = formattedData[index]) === null || _b === void 0 ? void 0 : _b.total
|
|
50778
|
+
}), void 0)]
|
|
50779
|
+
}), void 0), jsxRuntime.jsx(Separator$2, {
|
|
50780
|
+
css: {
|
|
50781
|
+
marginTop: '$spacing-03'
|
|
50782
|
+
}
|
|
50783
|
+
}, void 0)]
|
|
50784
|
+
}, index);
|
|
50785
|
+
})
|
|
50786
|
+
}), void 0)]
|
|
50787
|
+
}), void 0);
|
|
50788
|
+
};
|
|
50789
|
+
var DEFAULT_DATA = [{
|
|
50790
|
+
name: 'none',
|
|
50791
|
+
total: 0,
|
|
50792
|
+
color: colors$1.chartGreen
|
|
50793
|
+
}];
|
|
50794
|
+
function BarChartComponent(_a) {
|
|
50795
|
+
var _b, _c;
|
|
50796
|
+
var css = _a.css,
|
|
50797
|
+
data = _a.data,
|
|
50798
|
+
legend = _a.legend,
|
|
50799
|
+
title = _a.title,
|
|
50800
|
+
subtitle = _a.subtitle,
|
|
50801
|
+
tooltip = _a.tooltip,
|
|
50802
|
+
direction = _a.direction,
|
|
50803
|
+
tickFormatter = _a.tickFormatter,
|
|
50804
|
+
label = _a.label,
|
|
50805
|
+
yAxis = _a.yAxis;
|
|
50806
|
+
var isHorizontal = direction === 'horizontal';
|
|
50807
|
+
var MIN_HEIGHT = 350;
|
|
50808
|
+
var MIN_WIDTH = 500;
|
|
50809
|
+
var formattedData = data.length ? data : DEFAULT_DATA;
|
|
50810
|
+
var CustomTooltip = function CustomTooltip(_a) {
|
|
50811
|
+
var _b;
|
|
50812
|
+
var _c = _a.payload,
|
|
50813
|
+
payload = _c === void 0 ? {} : _c,
|
|
50814
|
+
_d = _a.active,
|
|
50815
|
+
active = _d === void 0 ? false : _d;
|
|
50816
|
+
if (active) {
|
|
50817
|
+
var _e = payload[0].payload,
|
|
50818
|
+
total = _e.total,
|
|
50819
|
+
name_1 = _e.name;
|
|
50820
|
+
return jsxRuntime.jsxs(Box, __assign({
|
|
50821
|
+
css: {
|
|
50822
|
+
backgroundColor: '$textContent',
|
|
50823
|
+
color: '$white',
|
|
50824
|
+
borderRadius: '$sm',
|
|
50825
|
+
padding: '$spacing-02',
|
|
50826
|
+
flexDirection: 'column'
|
|
50827
|
+
}
|
|
50828
|
+
}, {
|
|
50829
|
+
children: [jsxRuntime.jsx(Text$1, __assign({
|
|
50830
|
+
variant: "placeholder",
|
|
50831
|
+
color: "disable",
|
|
50832
|
+
css: {
|
|
50833
|
+
fontSize: 11
|
|
50834
|
+
}
|
|
50835
|
+
}, {
|
|
50836
|
+
children: name_1
|
|
50837
|
+
}), void 0), jsxRuntime.jsx(Paragraph, __assign({
|
|
50838
|
+
paragraph: "shortContentRegular",
|
|
50839
|
+
css: {
|
|
50840
|
+
color: '$white',
|
|
50841
|
+
fontSize: 12
|
|
50842
|
+
}
|
|
50843
|
+
}, {
|
|
50844
|
+
children: (tooltip === null || tooltip === void 0 ? void 0 : tooltip.label) ? (_b = tooltip === null || tooltip === void 0 ? void 0 : tooltip.label) === null || _b === void 0 ? void 0 : _b.call(tooltip, total) : total
|
|
50845
|
+
}), void 0)]
|
|
50846
|
+
}), void 0);
|
|
50847
|
+
}
|
|
50848
|
+
return null;
|
|
50849
|
+
};
|
|
50850
|
+
return jsxRuntime.jsxs(Box, {
|
|
50851
|
+
children: [title && jsxRuntime.jsx(Heading, __assign({
|
|
50852
|
+
css: {
|
|
50853
|
+
marginBottom: '$spacing-07'
|
|
50854
|
+
},
|
|
50855
|
+
heading: "sectionTitle"
|
|
50856
|
+
}, {
|
|
50857
|
+
children: title
|
|
50858
|
+
}), void 0), jsxRuntime.jsx(Box, __assign({
|
|
50859
|
+
css: __assign({
|
|
50860
|
+
width: MIN_WIDTH,
|
|
50861
|
+
height: MIN_HEIGHT
|
|
50862
|
+
}, css)
|
|
50863
|
+
}, {
|
|
50864
|
+
children: jsxRuntime.jsx(recharts.ResponsiveContainer, {
|
|
50865
|
+
children: jsxRuntime.jsxs(recharts.BarChart, __assign({
|
|
50866
|
+
width: MIN_WIDTH,
|
|
50867
|
+
height: MIN_HEIGHT,
|
|
50868
|
+
data: formattedData,
|
|
50869
|
+
layout: isHorizontal ? 'vertical' : 'horizontal'
|
|
50870
|
+
}, {
|
|
50871
|
+
children: [jsxRuntime.jsx(recharts.CartesianGrid, {
|
|
50872
|
+
stroke: colors$1.gray150,
|
|
50873
|
+
vertical: isHorizontal,
|
|
50874
|
+
horizontal: !isHorizontal
|
|
50875
|
+
}, void 0), isHorizontal && jsxRuntime.jsx(recharts.XAxis, __assign({
|
|
50876
|
+
type: "number",
|
|
50877
|
+
stroke: colors$1.textSecondary,
|
|
50878
|
+
fontSize: 12,
|
|
50879
|
+
axisLine: false
|
|
50880
|
+
}, isHorizontal && {
|
|
50881
|
+
tickFormatter: tickFormatter
|
|
50882
|
+
}), void 0), jsxRuntime.jsx(recharts.YAxis, __assign({
|
|
50883
|
+
axisLine: false,
|
|
50884
|
+
type: isHorizontal ? 'category' : 'number',
|
|
50885
|
+
dataKey: isHorizontal ? 'name' : 'total',
|
|
50886
|
+
width: isHorizontal ? 100 : 50,
|
|
50887
|
+
hide: !(yAxis === null || yAxis === void 0 ? void 0 : yAxis.show),
|
|
50888
|
+
stroke: colors$1.textSecondary,
|
|
50889
|
+
fontSize: 12
|
|
50890
|
+
}, !isHorizontal && {
|
|
50891
|
+
tickFormatter: tickFormatter
|
|
50892
|
+
}), void 0), data.length > 0 && jsxRuntime.jsx(recharts.Tooltip, {
|
|
50893
|
+
wrapperStyle: {
|
|
50894
|
+
outline: 'none'
|
|
50895
|
+
},
|
|
50896
|
+
cursor: {
|
|
50897
|
+
fill: 'transparent'
|
|
50898
|
+
},
|
|
50899
|
+
content: (tooltip === null || tooltip === void 0 ? void 0 : tooltip.render) ? (_b = tooltip === null || tooltip === void 0 ? void 0 : tooltip.render) === null || _b === void 0 ? void 0 : _b.call(tooltip) : jsxRuntime.jsx(CustomTooltip, {}, void 0)
|
|
50900
|
+
}, void 0), (legend === null || legend === void 0 ? void 0 : legend.show) && jsxRuntime.jsx(recharts.Legend, {
|
|
50901
|
+
content: renderLegend$1(formattedData, legend, subtitle, tickFormatter)
|
|
50902
|
+
}, void 0), jsxRuntime.jsxs(recharts.Bar, __assign({
|
|
50903
|
+
dataKey: "total",
|
|
50904
|
+
barSize: 12,
|
|
50905
|
+
radius: 50
|
|
50906
|
+
}, {
|
|
50907
|
+
children: [formattedData.map(function (item) {
|
|
50908
|
+
return jsxRuntime.jsx(recharts.Cell, {
|
|
50909
|
+
fill: item.color || colors$1.chartGreen
|
|
50910
|
+
}, item.name);
|
|
50911
|
+
}), (label === null || label === void 0 ? void 0 : label.show) && jsxRuntime.jsx(recharts.LabelList, {
|
|
50912
|
+
style: {
|
|
50913
|
+
marginLeft: '-8px'
|
|
50914
|
+
},
|
|
50915
|
+
dataKey: (label === null || label === void 0 ? void 0 : label.dataKey) || 'total',
|
|
50916
|
+
formatter: label === null || label === void 0 ? void 0 : label.formatter,
|
|
50917
|
+
position: (label === null || label === void 0 ? void 0 : label.position) || 'top',
|
|
50918
|
+
content: (_c = label === null || label === void 0 ? void 0 : label.render) === null || _c === void 0 ? void 0 : _c.call(label),
|
|
50919
|
+
fill: colors$1.textDisable,
|
|
50920
|
+
fontSize: 12
|
|
50921
|
+
}, void 0)]
|
|
50922
|
+
}), void 0)]
|
|
50923
|
+
}), void 0)
|
|
50924
|
+
}, void 0)
|
|
50925
|
+
}), void 0)]
|
|
50926
|
+
}, void 0);
|
|
50927
|
+
}
|
|
50928
|
+
BarChartComponent.defaultProps = {
|
|
50929
|
+
data: [],
|
|
50930
|
+
legend: {
|
|
50931
|
+
show: true,
|
|
50932
|
+
showTotal: true
|
|
50933
|
+
},
|
|
50934
|
+
yAxis: {
|
|
50935
|
+
show: true
|
|
50936
|
+
}
|
|
50937
|
+
};
|
|
50938
|
+
|
|
50939
|
+
var colors = core.foundations.colors;
|
|
50940
|
+
var renderActiveShape = function renderActiveShape(props, avatar, acronym, validAvatar, activeRef) {
|
|
50941
|
+
var cx = props.cx,
|
|
50942
|
+
cy = props.cy,
|
|
50943
|
+
innerRadius = props.innerRadius,
|
|
50944
|
+
outerRadius = props.outerRadius,
|
|
50945
|
+
startAngle = props.startAngle,
|
|
50946
|
+
endAngle = props.endAngle,
|
|
50947
|
+
fill = props.fill;
|
|
50948
|
+
var IMG_WIDHT = 40;
|
|
50949
|
+
var IMG_HEIGHT = 40;
|
|
50950
|
+
return jsxRuntime.jsx(React__default["default"].Fragment, {
|
|
50951
|
+
children: jsxRuntime.jsxs("g", {
|
|
50952
|
+
children: [jsxRuntime.jsx("clipPath", __assign({
|
|
50953
|
+
id: "circleAvatar"
|
|
50954
|
+
}, {
|
|
50955
|
+
children: jsxRuntime.jsx("circle", {
|
|
50956
|
+
cx: cx,
|
|
50957
|
+
cy: cy,
|
|
50958
|
+
r: IMG_WIDHT / 2,
|
|
50959
|
+
fill: "#FFFFFF"
|
|
50960
|
+
}, void 0)
|
|
50961
|
+
}), void 0), validAvatar ? jsxRuntime.jsx("image", {
|
|
50962
|
+
x: cx - IMG_WIDHT / 2,
|
|
50963
|
+
y: cy - IMG_HEIGHT / 2,
|
|
50964
|
+
width: IMG_WIDHT,
|
|
50965
|
+
height: IMG_HEIGHT,
|
|
50966
|
+
href: avatar,
|
|
50967
|
+
clipPath: "url(#circleAvatar)"
|
|
50968
|
+
}, void 0) : jsxRuntime.jsxs(React__default["default"].Fragment, {
|
|
50969
|
+
children: [jsxRuntime.jsx("circle", {
|
|
50970
|
+
cx: cx,
|
|
50971
|
+
cy: cy,
|
|
50972
|
+
r: IMG_WIDHT / 2,
|
|
50973
|
+
fill: core.foundations.colors.bgBorder
|
|
50974
|
+
}, void 0), jsxRuntime.jsx("text", __assign({
|
|
50975
|
+
x: cx,
|
|
50976
|
+
y: cy,
|
|
50977
|
+
textAnchor: "middle",
|
|
50978
|
+
alignmentBaseline: "middle",
|
|
50979
|
+
fontFamily: "main",
|
|
50980
|
+
fontWeight: "600"
|
|
50981
|
+
}, {
|
|
50982
|
+
children: acronym
|
|
50983
|
+
}), void 0)]
|
|
50984
|
+
}, void 0), jsxRuntime.jsx(recharts.Sector, {
|
|
50985
|
+
cx: cx,
|
|
50986
|
+
cy: cy,
|
|
50987
|
+
innerRadius: innerRadius,
|
|
50988
|
+
outerRadius: activeRef.current ? outerRadius + 10 : outerRadius,
|
|
50989
|
+
startAngle: startAngle,
|
|
50990
|
+
endAngle: endAngle,
|
|
50991
|
+
fill: fill,
|
|
50992
|
+
style: {
|
|
50993
|
+
outline: 'none'
|
|
50994
|
+
}
|
|
50995
|
+
}, void 0)]
|
|
50996
|
+
}, void 0)
|
|
50997
|
+
}, void 0);
|
|
50998
|
+
};
|
|
50999
|
+
var renderLegend = function renderLegend(formattedData, legend, subtitle) {
|
|
51000
|
+
return jsxRuntime.jsxs(Box, {
|
|
51001
|
+
children: [subtitle && jsxRuntime.jsx(Flex$1, __assign({
|
|
51002
|
+
css: {
|
|
51003
|
+
margin: '$spacing-06'
|
|
51004
|
+
},
|
|
51005
|
+
justify: "center"
|
|
51006
|
+
}, {
|
|
51007
|
+
children: jsxRuntime.jsx(Heading, __assign({
|
|
51008
|
+
heading: "sectionTitle"
|
|
51009
|
+
}, {
|
|
51010
|
+
children: subtitle
|
|
51011
|
+
}), void 0)
|
|
51012
|
+
}), void 0), formattedData.length > 0 && jsxRuntime.jsx(Flex$1, __assign({
|
|
51013
|
+
direction: "column",
|
|
51014
|
+
gap: 5
|
|
51015
|
+
}, {
|
|
51016
|
+
children: formattedData === null || formattedData === void 0 ? void 0 : formattedData.map(function (data, index) {
|
|
51017
|
+
var _a;
|
|
51018
|
+
return jsxRuntime.jsxs(Box, {
|
|
51019
|
+
children: [jsxRuntime.jsxs(Flex$1, __assign({
|
|
51020
|
+
justify: "between"
|
|
51021
|
+
}, {
|
|
51022
|
+
children: [jsxRuntime.jsxs(Flex$1, __assign({
|
|
51023
|
+
align: "center"
|
|
51024
|
+
}, {
|
|
51025
|
+
children: [jsxRuntime.jsx(Box, {
|
|
51026
|
+
css: {
|
|
51027
|
+
backgroundColor: data.color,
|
|
51028
|
+
borderRadius: '50%',
|
|
51029
|
+
height: 12,
|
|
51030
|
+
width: 12,
|
|
51031
|
+
display: 'inline-block',
|
|
51032
|
+
marginRight: '$spacing-03'
|
|
51033
|
+
}
|
|
51034
|
+
}, void 0), jsxRuntime.jsx(Box, __assign({
|
|
51035
|
+
css: {
|
|
51036
|
+
width: 120
|
|
51037
|
+
}
|
|
51038
|
+
}, {
|
|
51039
|
+
children: jsxRuntime.jsx(Text$1, __assign({
|
|
51040
|
+
variant: "label",
|
|
51041
|
+
color: "secondary"
|
|
51042
|
+
}, {
|
|
51043
|
+
children: data.name
|
|
51044
|
+
}), void 0)
|
|
51045
|
+
}), void 0)]
|
|
51046
|
+
}), void 0), (legend === null || legend === void 0 ? void 0 : legend.showTotal) && jsxRuntime.jsx(Text$1, __assign({
|
|
51047
|
+
variant: "label",
|
|
51048
|
+
color: "secondary"
|
|
51049
|
+
}, {
|
|
51050
|
+
children: (_a = formattedData[index]) === null || _a === void 0 ? void 0 : _a.total
|
|
51051
|
+
}), void 0)]
|
|
51052
|
+
}), void 0), jsxRuntime.jsx(Separator$2, {
|
|
51053
|
+
css: {
|
|
51054
|
+
marginTop: '$spacing-03'
|
|
51055
|
+
}
|
|
51056
|
+
}, void 0)]
|
|
51057
|
+
}, index);
|
|
51058
|
+
})
|
|
51059
|
+
}), void 0)]
|
|
51060
|
+
}, void 0);
|
|
51061
|
+
};
|
|
51062
|
+
var PieChartComponent = function PieChartComponent(_a) {
|
|
51063
|
+
var _b;
|
|
51064
|
+
var data = _a.data,
|
|
51065
|
+
css = _a.css,
|
|
51066
|
+
avatarURL = _a.avatarURL,
|
|
51067
|
+
avatarAcronym = _a.avatarAcronym,
|
|
51068
|
+
validAvatar = _a.validAvatar,
|
|
51069
|
+
legend = _a.legend,
|
|
51070
|
+
isMobile = _a.isMobile,
|
|
51071
|
+
tooltip = _a.tooltip,
|
|
51072
|
+
showPercentage = _a.showPercentage,
|
|
51073
|
+
title = _a.title,
|
|
51074
|
+
subtitle = _a.subtitle;
|
|
51075
|
+
var emptyData = [{
|
|
51076
|
+
id: '0',
|
|
51077
|
+
name: '',
|
|
51078
|
+
total: 1,
|
|
51079
|
+
color: core.foundations.colors.chartLightGray
|
|
51080
|
+
}];
|
|
51081
|
+
var dataChart = data.map(function (item) {
|
|
51082
|
+
return __assign(__assign({}, item), {
|
|
51083
|
+
total: Number(item.total)
|
|
51084
|
+
});
|
|
51085
|
+
});
|
|
51086
|
+
var activeRef = React.useRef();
|
|
51087
|
+
var formattedData = data.length > 0 ? dataChart : emptyData;
|
|
51088
|
+
var _c = React.useState(0),
|
|
51089
|
+
activeIndex = _c[0],
|
|
51090
|
+
setActiveIndex = _c[1];
|
|
51091
|
+
var CONTAINER_HEIGHT = (legend === null || legend === void 0 ? void 0 : legend.position) === 'bottom' ? 350 : 180;
|
|
51092
|
+
var CONTAINER_WIDTH = isMobile ? 350 : 450;
|
|
51093
|
+
var CHART_HEIGHT = 150;
|
|
51094
|
+
var CHART_WIDTH = 450;
|
|
51095
|
+
var CustomTooltip = function CustomTooltip(_a) {
|
|
51096
|
+
var _b;
|
|
51097
|
+
var _c = _a.payload,
|
|
51098
|
+
payload = _c === void 0 ? {} : _c,
|
|
51099
|
+
_d = _a.active,
|
|
51100
|
+
active = _d === void 0 ? false : _d;
|
|
51101
|
+
if (active) {
|
|
51102
|
+
var _e = payload[0].payload,
|
|
51103
|
+
total = _e.total,
|
|
51104
|
+
name_1 = _e.name;
|
|
51105
|
+
return jsxRuntime.jsxs(Box, __assign({
|
|
51106
|
+
css: {
|
|
51107
|
+
backgroundColor: '$textContent',
|
|
51108
|
+
color: '$white',
|
|
51109
|
+
borderRadius: '$sm',
|
|
51110
|
+
padding: '$spacing-02',
|
|
51111
|
+
flexDirection: 'column'
|
|
51112
|
+
}
|
|
51113
|
+
}, {
|
|
51114
|
+
children: [jsxRuntime.jsx(Text$1, __assign({
|
|
51115
|
+
variant: "placeholder",
|
|
51116
|
+
color: "disable",
|
|
51117
|
+
css: {
|
|
51118
|
+
fontSize: 11
|
|
51119
|
+
}
|
|
51120
|
+
}, {
|
|
51121
|
+
children: name_1
|
|
51122
|
+
}), void 0), jsxRuntime.jsx(Paragraph, __assign({
|
|
51123
|
+
paragraph: "shortContentRegular",
|
|
51124
|
+
css: {
|
|
51125
|
+
color: '$white',
|
|
51126
|
+
fontSize: 12
|
|
51127
|
+
}
|
|
51128
|
+
}, {
|
|
51129
|
+
children: (tooltip === null || tooltip === void 0 ? void 0 : tooltip.label) ? (_b = tooltip === null || tooltip === void 0 ? void 0 : tooltip.label) === null || _b === void 0 ? void 0 : _b.call(tooltip, total) : total
|
|
51130
|
+
}), void 0)]
|
|
51131
|
+
}), void 0);
|
|
51132
|
+
}
|
|
51133
|
+
return null;
|
|
51134
|
+
};
|
|
51135
|
+
var RADIAN = Math.PI / 180;
|
|
51136
|
+
var renderCustomizedLabel = function renderCustomizedLabel(_a) {
|
|
51137
|
+
var cx = _a.cx,
|
|
51138
|
+
cy = _a.cy,
|
|
51139
|
+
midAngle = _a.midAngle,
|
|
51140
|
+
innerRadius = _a.innerRadius,
|
|
51141
|
+
outerRadius = _a.outerRadius,
|
|
51142
|
+
percent = _a.percent;
|
|
51143
|
+
_a.index;
|
|
51144
|
+
var radius = innerRadius + (outerRadius - innerRadius) * 0.5;
|
|
51145
|
+
var x = cx + radius * Math.cos(-midAngle * RADIAN);
|
|
51146
|
+
var y = cy + radius * Math.sin(-midAngle * RADIAN);
|
|
51147
|
+
return jsxRuntime.jsx("text", __assign({
|
|
51148
|
+
x: x,
|
|
51149
|
+
y: y,
|
|
51150
|
+
fill: "white",
|
|
51151
|
+
textAnchor: x > cx ? 'start' : 'end',
|
|
51152
|
+
dominantBaseline: "central"
|
|
51153
|
+
}, {
|
|
51154
|
+
children: "".concat((percent * 100).toFixed(0), "%")
|
|
51155
|
+
}), void 0);
|
|
51156
|
+
};
|
|
51157
|
+
return jsxRuntime.jsxs(Box, {
|
|
51158
|
+
children: [title && jsxRuntime.jsx(Heading, __assign({
|
|
51159
|
+
css: {
|
|
51160
|
+
marginBottom: '$spacing-06'
|
|
51161
|
+
},
|
|
51162
|
+
heading: "sectionTitle"
|
|
51163
|
+
}, {
|
|
51164
|
+
children: title
|
|
51165
|
+
}), void 0), jsxRuntime.jsx(Box, __assign({
|
|
51166
|
+
css: __assign({
|
|
51167
|
+
position: 'relative',
|
|
51168
|
+
width: CONTAINER_WIDTH,
|
|
51169
|
+
height: CONTAINER_HEIGHT
|
|
51170
|
+
}, css)
|
|
51171
|
+
}, {
|
|
51172
|
+
children: jsxRuntime.jsx(recharts.ResponsiveContainer, __assign({
|
|
51173
|
+
width: "100%",
|
|
51174
|
+
height: "100%"
|
|
51175
|
+
}, {
|
|
51176
|
+
children: jsxRuntime.jsxs(recharts.PieChart, __assign({
|
|
51177
|
+
width: CHART_WIDTH,
|
|
51178
|
+
height: CHART_HEIGHT
|
|
51179
|
+
}, {
|
|
51180
|
+
children: [jsxRuntime.jsx(recharts.Pie, __assign({
|
|
51181
|
+
activeIndex: activeIndex,
|
|
51182
|
+
activeShape: function (shape) {
|
|
51183
|
+
return renderActiveShape(shape, avatarURL, avatarAcronym, validAvatar, activeRef);
|
|
51184
|
+
},
|
|
51185
|
+
data: formattedData,
|
|
51186
|
+
cx: "50%",
|
|
51187
|
+
cy: "50%",
|
|
51188
|
+
innerRadius: 50,
|
|
51189
|
+
outerRadius: 80,
|
|
51190
|
+
dataKey: "total",
|
|
51191
|
+
onMouseEnter: function (x) {
|
|
51192
|
+
setActiveIndex(formattedData.findIndex(function (y) {
|
|
51193
|
+
return y.name === x.name;
|
|
51194
|
+
}));
|
|
51195
|
+
activeRef.current = true;
|
|
51196
|
+
},
|
|
51197
|
+
blendStroke: true
|
|
51198
|
+
}, showPercentage && {
|
|
51199
|
+
label: renderCustomizedLabel,
|
|
51200
|
+
labelLine: false
|
|
51201
|
+
}, {
|
|
51202
|
+
children: formattedData.map(function (item) {
|
|
51203
|
+
return jsxRuntime.jsx(recharts.Cell, {
|
|
51204
|
+
fill: item.color || colors.chartGreen
|
|
51205
|
+
}, item.name);
|
|
51206
|
+
})
|
|
51207
|
+
}), void 0), data.length > 0 && jsxRuntime.jsx(recharts.Tooltip, {
|
|
51208
|
+
wrapperStyle: {
|
|
51209
|
+
outline: 'none'
|
|
51210
|
+
},
|
|
51211
|
+
cursor: true,
|
|
51212
|
+
content: (tooltip === null || tooltip === void 0 ? void 0 : tooltip.render) ? (_b = tooltip === null || tooltip === void 0 ? void 0 : tooltip.render) === null || _b === void 0 ? void 0 : _b.call(tooltip) : jsxRuntime.jsx(CustomTooltip, {}, void 0)
|
|
51213
|
+
}, void 0), Boolean(legend === null || legend === void 0 ? void 0 : legend.show) && jsxRuntime.jsx(recharts.Legend, __assign({}, (legend === null || legend === void 0 ? void 0 : legend.position) !== 'bottom' && {
|
|
51214
|
+
verticalAlign: 'middle',
|
|
51215
|
+
align: (legend === null || legend === void 0 ? void 0 : legend.position) || 'right',
|
|
51216
|
+
layout: 'vertical'
|
|
51217
|
+
}, {
|
|
51218
|
+
content: renderLegend(formattedData, legend, subtitle)
|
|
51219
|
+
}), void 0)]
|
|
51220
|
+
}), void 0)
|
|
51221
|
+
}), void 0)
|
|
51222
|
+
}), void 0)]
|
|
51223
|
+
}, void 0);
|
|
51224
|
+
};
|
|
51225
|
+
PieChartComponent.defaultProps = {
|
|
51226
|
+
data: [],
|
|
51227
|
+
avatarURL: undefined,
|
|
51228
|
+
avatarAcronym: '',
|
|
51229
|
+
validAvatar: false,
|
|
51230
|
+
legend: {
|
|
51231
|
+
data: [],
|
|
51232
|
+
position: 'right'
|
|
51233
|
+
},
|
|
51234
|
+
isMobile: false
|
|
51235
|
+
};
|
|
51236
|
+
|
|
50721
51237
|
var _jsxFileName = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/colors/Colors.js";
|
|
50722
51238
|
const StyledPaper = styled(Paper, {
|
|
50723
51239
|
borderRadius: '10px 10px 0 0',
|
|
@@ -52240,6 +52756,7 @@
|
|
|
52240
52756
|
exports.BannerDescription = BannerDescription;
|
|
52241
52757
|
exports.BannerLink = BannerLink;
|
|
52242
52758
|
exports.BannerTitle = BannerTitle;
|
|
52759
|
+
exports.BarChart = BarChartComponent;
|
|
52243
52760
|
exports.Box = Box;
|
|
52244
52761
|
exports.Breadcrumb = Breadcrumb;
|
|
52245
52762
|
exports.BreadcrumbItem = BreadcrumbItem;
|
|
@@ -52372,6 +52889,7 @@
|
|
|
52372
52889
|
exports.Paper = Paper;
|
|
52373
52890
|
exports.PaperComponent = PaperComponent;
|
|
52374
52891
|
exports.Paragraph = Paragraph;
|
|
52892
|
+
exports.PieChart = PieChartComponent;
|
|
52375
52893
|
exports.Popover = Popover;
|
|
52376
52894
|
exports.PopoverClose = PopoverClose;
|
|
52377
52895
|
exports.PopoverContent = PopoverContent;
|