@majoo-ui/react 1.58.12 → 1.58.14
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/progressIndicator/ProgressIndicator.d.ts +5 -1
- package/index.esm.js +147 -76
- package/index.umd.js +149 -76
- package/package.json +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface ProgressListData {
|
|
3
3
|
progress: number;
|
|
4
|
-
title
|
|
4
|
+
title?: string | (() => HTMLElement | React.ReactElement | JSX.Element);
|
|
5
5
|
icon?: React.ReactElement | undefined;
|
|
6
|
+
render?: () => JSX.Element | JSX.Element;
|
|
6
7
|
}
|
|
7
8
|
interface ProgressIndicatorProps {
|
|
9
|
+
direction?: 'horizontal' | 'vertical';
|
|
8
10
|
progress: number;
|
|
9
11
|
progressError?: number;
|
|
10
12
|
progressList: ProgressListData[];
|
|
13
|
+
width?: number;
|
|
14
|
+
gap?: number;
|
|
11
15
|
}
|
|
12
16
|
export default function ProgressIndicator(props: ProgressIndicatorProps): JSX.Element;
|
|
13
17
|
export {};
|
package/index.esm.js
CHANGED
|
@@ -50641,6 +50641,11 @@ const Status = styled('div', {
|
|
|
50641
50641
|
borderColor: '$red400'
|
|
50642
50642
|
}
|
|
50643
50643
|
},
|
|
50644
|
+
completed: {
|
|
50645
|
+
true: {
|
|
50646
|
+
backgroundColor: '$primary500'
|
|
50647
|
+
}
|
|
50648
|
+
},
|
|
50644
50649
|
withIcon: {
|
|
50645
50650
|
true: {
|
|
50646
50651
|
display: 'flex',
|
|
@@ -50650,11 +50655,6 @@ const Status = styled('div', {
|
|
|
50650
50655
|
height: 40,
|
|
50651
50656
|
borderWidth: 2
|
|
50652
50657
|
}
|
|
50653
|
-
},
|
|
50654
|
-
completed: {
|
|
50655
|
-
true: {
|
|
50656
|
-
backgroundColor: '$primary500'
|
|
50657
|
-
}
|
|
50658
50658
|
}
|
|
50659
50659
|
}
|
|
50660
50660
|
});
|
|
@@ -50721,7 +50721,10 @@ function ProgressIndicator(props) {
|
|
|
50721
50721
|
const {
|
|
50722
50722
|
progressList,
|
|
50723
50723
|
progress,
|
|
50724
|
-
progressError
|
|
50724
|
+
progressError,
|
|
50725
|
+
direction = 'horizontal',
|
|
50726
|
+
width,
|
|
50727
|
+
gap = 80
|
|
50725
50728
|
} = props;
|
|
50726
50729
|
const isMobile = useMediaQuery('(max-width: 767px)');
|
|
50727
50730
|
const isIcon = Boolean((_a = progressList === null || progressList === void 0 ? void 0 : progressList[0]) === null || _a === void 0 ? void 0 : _a.icon);
|
|
@@ -50755,84 +50758,152 @@ function ProgressIndicator(props) {
|
|
|
50755
50758
|
};
|
|
50756
50759
|
return isCompleted ? jsx(SvgCheckFilled, {}, void 0) : /*#__PURE__*/cloneElement(item === null || item === void 0 ? void 0 : item.icon, iconProps);
|
|
50757
50760
|
}
|
|
50758
|
-
|
|
50759
|
-
|
|
50760
|
-
|
|
50761
|
-
children: jsx(Flex$1, Object.assign({
|
|
50762
|
-
css: {
|
|
50763
|
-
margin: '0px 8px',
|
|
50764
|
-
'@md': {
|
|
50765
|
-
margin: '0px 4px'
|
|
50766
|
-
},
|
|
50767
|
-
'& > div:not(:first-child):not(:last-child)': {
|
|
50768
|
-
'.title-progress': {
|
|
50769
|
-
display: 'flex',
|
|
50770
|
-
justifyContent: 'center'
|
|
50771
|
-
}
|
|
50772
|
-
},
|
|
50773
|
-
'& > div:first-child': {
|
|
50774
|
-
'.title-progress': {
|
|
50775
|
-
display: 'flex',
|
|
50776
|
-
justifyContent: 'start',
|
|
50777
|
-
left: '-10%',
|
|
50778
|
-
right: `-${isIcon ? 500 : 3000}%`
|
|
50779
|
-
}
|
|
50780
|
-
},
|
|
50781
|
-
'& > div:last-child': {
|
|
50782
|
-
'.title-progress': {
|
|
50783
|
-
display: 'flex',
|
|
50784
|
-
justifyContent: 'end',
|
|
50785
|
-
right: '-10%',
|
|
50786
|
-
left: `-${isIcon ? 500 : 3000}%`
|
|
50787
|
-
}
|
|
50788
|
-
}
|
|
50789
|
-
},
|
|
50790
|
-
justify: "between"
|
|
50761
|
+
function renderHorizontalIndicator() {
|
|
50762
|
+
return jsx(Container$4, Object.assign({
|
|
50763
|
+
direction: "column"
|
|
50791
50764
|
}, {
|
|
50792
|
-
children:
|
|
50793
|
-
|
|
50794
|
-
|
|
50795
|
-
|
|
50796
|
-
|
|
50797
|
-
|
|
50798
|
-
|
|
50799
|
-
|
|
50765
|
+
children: jsx(Flex$1, Object.assign({
|
|
50766
|
+
css: {
|
|
50767
|
+
margin: '0px 8px',
|
|
50768
|
+
'@md': {
|
|
50769
|
+
margin: '0px 4px'
|
|
50770
|
+
},
|
|
50771
|
+
'& > div:not(:first-child):not(:last-child)': {
|
|
50772
|
+
'.title-progress': {
|
|
50773
|
+
display: 'flex',
|
|
50774
|
+
justifyContent: 'center'
|
|
50775
|
+
}
|
|
50776
|
+
},
|
|
50777
|
+
'& > div:first-child': {
|
|
50778
|
+
'.title-progress': {
|
|
50779
|
+
display: 'flex',
|
|
50780
|
+
justifyContent: 'start',
|
|
50781
|
+
left: '-10%',
|
|
50782
|
+
right: `-${isIcon ? 500 : 3000}%`
|
|
50783
|
+
}
|
|
50784
|
+
},
|
|
50785
|
+
'& > div:last-child': {
|
|
50786
|
+
'.title-progress': {
|
|
50787
|
+
display: 'flex',
|
|
50788
|
+
justifyContent: 'end',
|
|
50789
|
+
right: '-10%',
|
|
50790
|
+
left: `-${isIcon ? 500 : 3000}%`
|
|
50791
|
+
}
|
|
50800
50792
|
}
|
|
50801
|
-
},
|
|
50802
|
-
|
|
50803
|
-
|
|
50804
|
-
|
|
50805
|
-
|
|
50793
|
+
},
|
|
50794
|
+
justify: "between"
|
|
50795
|
+
}, {
|
|
50796
|
+
children: progressList === null || progressList === void 0 ? void 0 : progressList.map((item, index) => {
|
|
50797
|
+
var _a;
|
|
50798
|
+
const isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
|
|
50799
|
+
return jsxs(Flex$1, Object.assign({
|
|
50800
|
+
align: "center",
|
|
50801
|
+
css: {
|
|
50802
|
+
flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0,
|
|
50803
|
+
paddingTop: 45
|
|
50804
|
+
}
|
|
50806
50805
|
}, {
|
|
50807
|
-
children: [
|
|
50808
|
-
|
|
50809
|
-
|
|
50810
|
-
|
|
50811
|
-
top: -45,
|
|
50812
|
-
left: `-${isIcon ? 250 : 2000}%`,
|
|
50813
|
-
right: `-${isIcon ? 250 : 2000}%`
|
|
50814
|
-
}
|
|
50806
|
+
children: [jsxs(Status, Object.assign({
|
|
50807
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
50808
|
+
withIcon: isIcon,
|
|
50809
|
+
completed: isCompleted
|
|
50815
50810
|
}, {
|
|
50816
|
-
children: jsx(
|
|
50811
|
+
children: [isIcon && renderIcon(item), jsx(Box, Object.assign({
|
|
50812
|
+
className: "title-progress",
|
|
50817
50813
|
css: {
|
|
50818
|
-
|
|
50819
|
-
|
|
50820
|
-
|
|
50814
|
+
position: 'absolute',
|
|
50815
|
+
top: -45,
|
|
50816
|
+
left: `-${isIcon ? 250 : 2000}%`,
|
|
50817
|
+
right: `-${isIcon ? 250 : 2000}%`
|
|
50818
|
+
}
|
|
50821
50819
|
}, {
|
|
50822
|
-
children:
|
|
50823
|
-
|
|
50824
|
-
|
|
50825
|
-
|
|
50826
|
-
|
|
50827
|
-
|
|
50820
|
+
children: jsx(Title, Object.assign({
|
|
50821
|
+
css: {
|
|
50822
|
+
opacity: isMobile && (item === null || item === void 0 ? void 0 : item.progress) !== progress ? 0 : 1
|
|
50823
|
+
},
|
|
50824
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress)
|
|
50825
|
+
}, {
|
|
50826
|
+
children: typeof (item === null || item === void 0 ? void 0 : item.title) === 'function' ? (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.call(item) : item === null || item === void 0 ? void 0 : item.title
|
|
50827
|
+
}), index)
|
|
50828
|
+
}), void 0)]
|
|
50829
|
+
}), void 0), jsx(Line, {
|
|
50830
|
+
state: getState((item === null || item === void 0 ? void 0 : item.progress) + 1),
|
|
50831
|
+
withIcon: isIcon,
|
|
50832
|
+
css: {
|
|
50833
|
+
display: (progressList === null || progressList === void 0 ? void 0 : progressList.length) === index + 1 ? 'none' : 'unset'
|
|
50834
|
+
}
|
|
50835
|
+
}, void 0)]
|
|
50836
|
+
}), index);
|
|
50837
|
+
})
|
|
50838
|
+
}), void 0)
|
|
50839
|
+
}), void 0);
|
|
50840
|
+
}
|
|
50841
|
+
function renderVerticalIndicator() {
|
|
50842
|
+
return jsx(Container$4, Object.assign({
|
|
50843
|
+
direction: "column"
|
|
50844
|
+
}, {
|
|
50845
|
+
children: jsx(Flex$1, Object.assign({
|
|
50846
|
+
align: "start",
|
|
50847
|
+
direction: "column",
|
|
50848
|
+
css: {
|
|
50849
|
+
margin: '$spacing-01'
|
|
50850
|
+
},
|
|
50851
|
+
justify: "between"
|
|
50852
|
+
}, {
|
|
50853
|
+
children: progressList === null || progressList === void 0 ? void 0 : progressList.map((item, index) => {
|
|
50854
|
+
var _a;
|
|
50855
|
+
const isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
|
|
50856
|
+
return jsxs(Flex$1, Object.assign({
|
|
50857
|
+
direction: "column",
|
|
50858
|
+
align: "center",
|
|
50828
50859
|
css: {
|
|
50829
|
-
|
|
50860
|
+
flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0
|
|
50830
50861
|
}
|
|
50831
|
-
},
|
|
50832
|
-
|
|
50833
|
-
|
|
50834
|
-
|
|
50835
|
-
|
|
50862
|
+
}, {
|
|
50863
|
+
children: [jsxs(Status, Object.assign({
|
|
50864
|
+
css: {
|
|
50865
|
+
borderWidth: 1,
|
|
50866
|
+
height: 8,
|
|
50867
|
+
width: 8
|
|
50868
|
+
},
|
|
50869
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
50870
|
+
withIcon: isIcon,
|
|
50871
|
+
completed: isCompleted
|
|
50872
|
+
}, {
|
|
50873
|
+
children: [isIcon && renderIcon(item), jsx(Box, Object.assign({
|
|
50874
|
+
className: "title-progress",
|
|
50875
|
+
css: {
|
|
50876
|
+
position: 'absolute',
|
|
50877
|
+
top: isIcon ? 10 : -5,
|
|
50878
|
+
left: isIcon ? 40 : 20,
|
|
50879
|
+
right: width ? `-${width}px` : -300
|
|
50880
|
+
}
|
|
50881
|
+
}, {
|
|
50882
|
+
children: item.render ? jsx(Fragment, {
|
|
50883
|
+
children: typeof (item === null || item === void 0 ? void 0 : item.render) === 'function' ? item === null || item === void 0 ? void 0 : item.render() : item === null || item === void 0 ? void 0 : item.render
|
|
50884
|
+
}, void 0) : jsx(Title, Object.assign({
|
|
50885
|
+
css: {
|
|
50886
|
+
opacity: isMobile && (item === null || item === void 0 ? void 0 : item.progress) !== progress ? 0 : 1
|
|
50887
|
+
},
|
|
50888
|
+
state: getState((item === null || item === void 0 ? void 0 : item.progress) + 1)
|
|
50889
|
+
}, {
|
|
50890
|
+
children: typeof (item === null || item === void 0 ? void 0 : item.title) === 'function' ? (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.call(item) : item === null || item === void 0 ? void 0 : item.title
|
|
50891
|
+
}), index)
|
|
50892
|
+
}), void 0)]
|
|
50893
|
+
}), void 0), jsx(Line, {
|
|
50894
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
50895
|
+
withIcon: isIcon,
|
|
50896
|
+
css: {
|
|
50897
|
+
width: 2,
|
|
50898
|
+
height: gap
|
|
50899
|
+
}
|
|
50900
|
+
}, void 0)]
|
|
50901
|
+
}), index + 'vertical');
|
|
50902
|
+
})
|
|
50903
|
+
}), void 0)
|
|
50904
|
+
}), void 0);
|
|
50905
|
+
}
|
|
50906
|
+
return direction === 'horizontal' ? renderHorizontalIndicator() : renderVerticalIndicator();
|
|
50836
50907
|
}
|
|
50837
50908
|
|
|
50838
50909
|
var $$2 = _export;
|
package/index.umd.js
CHANGED
|
@@ -51094,6 +51094,11 @@
|
|
|
51094
51094
|
borderColor: '$red400'
|
|
51095
51095
|
}
|
|
51096
51096
|
},
|
|
51097
|
+
completed: {
|
|
51098
|
+
true: {
|
|
51099
|
+
backgroundColor: '$primary500'
|
|
51100
|
+
}
|
|
51101
|
+
},
|
|
51097
51102
|
withIcon: {
|
|
51098
51103
|
true: {
|
|
51099
51104
|
display: 'flex',
|
|
@@ -51103,11 +51108,6 @@
|
|
|
51103
51108
|
height: 40,
|
|
51104
51109
|
borderWidth: 2
|
|
51105
51110
|
}
|
|
51106
|
-
},
|
|
51107
|
-
completed: {
|
|
51108
|
-
true: {
|
|
51109
|
-
backgroundColor: '$primary500'
|
|
51110
|
-
}
|
|
51111
51111
|
}
|
|
51112
51112
|
}
|
|
51113
51113
|
});
|
|
@@ -51175,7 +51175,12 @@
|
|
|
51175
51175
|
var _a;
|
|
51176
51176
|
var progressList = props.progressList,
|
|
51177
51177
|
progress = props.progress,
|
|
51178
|
-
progressError = props.progressError
|
|
51178
|
+
progressError = props.progressError,
|
|
51179
|
+
_b = props.direction,
|
|
51180
|
+
direction = _b === void 0 ? 'horizontal' : _b,
|
|
51181
|
+
width = props.width,
|
|
51182
|
+
_c = props.gap,
|
|
51183
|
+
gap = _c === void 0 ? 80 : _c;
|
|
51179
51184
|
var isMobile = useMediaQuery('(max-width: 767px)');
|
|
51180
51185
|
var isIcon = Boolean((_a = progressList === null || progressList === void 0 ? void 0 : progressList[0]) === null || _a === void 0 ? void 0 : _a.icon);
|
|
51181
51186
|
function getState(itemProgress) {
|
|
@@ -51208,84 +51213,152 @@
|
|
|
51208
51213
|
};
|
|
51209
51214
|
return isCompleted ? jsxRuntime.jsx(SvgCheckFilled, {}, void 0) : /*#__PURE__*/React.cloneElement(item === null || item === void 0 ? void 0 : item.icon, iconProps);
|
|
51210
51215
|
}
|
|
51211
|
-
|
|
51212
|
-
|
|
51213
|
-
|
|
51214
|
-
children: jsxRuntime.jsx(Flex$1, __assign({
|
|
51215
|
-
css: {
|
|
51216
|
-
margin: '0px 8px',
|
|
51217
|
-
'@md': {
|
|
51218
|
-
margin: '0px 4px'
|
|
51219
|
-
},
|
|
51220
|
-
'& > div:not(:first-child):not(:last-child)': {
|
|
51221
|
-
'.title-progress': {
|
|
51222
|
-
display: 'flex',
|
|
51223
|
-
justifyContent: 'center'
|
|
51224
|
-
}
|
|
51225
|
-
},
|
|
51226
|
-
'& > div:first-child': {
|
|
51227
|
-
'.title-progress': {
|
|
51228
|
-
display: 'flex',
|
|
51229
|
-
justifyContent: 'start',
|
|
51230
|
-
left: '-10%',
|
|
51231
|
-
right: "-".concat(isIcon ? 500 : 3000, "%")
|
|
51232
|
-
}
|
|
51233
|
-
},
|
|
51234
|
-
'& > div:last-child': {
|
|
51235
|
-
'.title-progress': {
|
|
51236
|
-
display: 'flex',
|
|
51237
|
-
justifyContent: 'end',
|
|
51238
|
-
right: '-10%',
|
|
51239
|
-
left: "-".concat(isIcon ? 500 : 3000, "%")
|
|
51240
|
-
}
|
|
51241
|
-
}
|
|
51242
|
-
},
|
|
51243
|
-
justify: "between"
|
|
51216
|
+
function renderHorizontalIndicator() {
|
|
51217
|
+
return jsxRuntime.jsx(Container$4, __assign({
|
|
51218
|
+
direction: "column"
|
|
51244
51219
|
}, {
|
|
51245
|
-
children:
|
|
51246
|
-
|
|
51247
|
-
|
|
51248
|
-
|
|
51249
|
-
|
|
51250
|
-
|
|
51251
|
-
|
|
51252
|
-
|
|
51220
|
+
children: jsxRuntime.jsx(Flex$1, __assign({
|
|
51221
|
+
css: {
|
|
51222
|
+
margin: '0px 8px',
|
|
51223
|
+
'@md': {
|
|
51224
|
+
margin: '0px 4px'
|
|
51225
|
+
},
|
|
51226
|
+
'& > div:not(:first-child):not(:last-child)': {
|
|
51227
|
+
'.title-progress': {
|
|
51228
|
+
display: 'flex',
|
|
51229
|
+
justifyContent: 'center'
|
|
51230
|
+
}
|
|
51231
|
+
},
|
|
51232
|
+
'& > div:first-child': {
|
|
51233
|
+
'.title-progress': {
|
|
51234
|
+
display: 'flex',
|
|
51235
|
+
justifyContent: 'start',
|
|
51236
|
+
left: '-10%',
|
|
51237
|
+
right: "-".concat(isIcon ? 500 : 3000, "%")
|
|
51238
|
+
}
|
|
51239
|
+
},
|
|
51240
|
+
'& > div:last-child': {
|
|
51241
|
+
'.title-progress': {
|
|
51242
|
+
display: 'flex',
|
|
51243
|
+
justifyContent: 'end',
|
|
51244
|
+
right: '-10%',
|
|
51245
|
+
left: "-".concat(isIcon ? 500 : 3000, "%")
|
|
51246
|
+
}
|
|
51253
51247
|
}
|
|
51254
|
-
},
|
|
51255
|
-
|
|
51256
|
-
|
|
51257
|
-
|
|
51258
|
-
|
|
51248
|
+
},
|
|
51249
|
+
justify: "between"
|
|
51250
|
+
}, {
|
|
51251
|
+
children: progressList === null || progressList === void 0 ? void 0 : progressList.map(function (item, index) {
|
|
51252
|
+
var _a;
|
|
51253
|
+
var isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
|
|
51254
|
+
return jsxRuntime.jsxs(Flex$1, __assign({
|
|
51255
|
+
align: "center",
|
|
51256
|
+
css: {
|
|
51257
|
+
flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0,
|
|
51258
|
+
paddingTop: 45
|
|
51259
|
+
}
|
|
51259
51260
|
}, {
|
|
51260
|
-
children: [
|
|
51261
|
-
|
|
51262
|
-
|
|
51263
|
-
|
|
51264
|
-
top: -45,
|
|
51265
|
-
left: "-".concat(isIcon ? 250 : 2000, "%"),
|
|
51266
|
-
right: "-".concat(isIcon ? 250 : 2000, "%")
|
|
51267
|
-
}
|
|
51261
|
+
children: [jsxRuntime.jsxs(Status, __assign({
|
|
51262
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
51263
|
+
withIcon: isIcon,
|
|
51264
|
+
completed: isCompleted
|
|
51268
51265
|
}, {
|
|
51269
|
-
children: jsxRuntime.jsx(
|
|
51266
|
+
children: [isIcon && renderIcon(item), jsxRuntime.jsx(Box, __assign({
|
|
51267
|
+
className: "title-progress",
|
|
51270
51268
|
css: {
|
|
51271
|
-
|
|
51272
|
-
|
|
51273
|
-
|
|
51269
|
+
position: 'absolute',
|
|
51270
|
+
top: -45,
|
|
51271
|
+
left: "-".concat(isIcon ? 250 : 2000, "%"),
|
|
51272
|
+
right: "-".concat(isIcon ? 250 : 2000, "%")
|
|
51273
|
+
}
|
|
51274
51274
|
}, {
|
|
51275
|
-
children:
|
|
51276
|
-
|
|
51277
|
-
|
|
51278
|
-
|
|
51279
|
-
|
|
51280
|
-
|
|
51275
|
+
children: jsxRuntime.jsx(Title, __assign({
|
|
51276
|
+
css: {
|
|
51277
|
+
opacity: isMobile && (item === null || item === void 0 ? void 0 : item.progress) !== progress ? 0 : 1
|
|
51278
|
+
},
|
|
51279
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress)
|
|
51280
|
+
}, {
|
|
51281
|
+
children: typeof (item === null || item === void 0 ? void 0 : item.title) === 'function' ? (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.call(item) : item === null || item === void 0 ? void 0 : item.title
|
|
51282
|
+
}), index)
|
|
51283
|
+
}), void 0)]
|
|
51284
|
+
}), void 0), jsxRuntime.jsx(Line, {
|
|
51285
|
+
state: getState((item === null || item === void 0 ? void 0 : item.progress) + 1),
|
|
51286
|
+
withIcon: isIcon,
|
|
51287
|
+
css: {
|
|
51288
|
+
display: (progressList === null || progressList === void 0 ? void 0 : progressList.length) === index + 1 ? 'none' : 'unset'
|
|
51289
|
+
}
|
|
51290
|
+
}, void 0)]
|
|
51291
|
+
}), index);
|
|
51292
|
+
})
|
|
51293
|
+
}), void 0)
|
|
51294
|
+
}), void 0);
|
|
51295
|
+
}
|
|
51296
|
+
function renderVerticalIndicator() {
|
|
51297
|
+
return jsxRuntime.jsx(Container$4, __assign({
|
|
51298
|
+
direction: "column"
|
|
51299
|
+
}, {
|
|
51300
|
+
children: jsxRuntime.jsx(Flex$1, __assign({
|
|
51301
|
+
align: "start",
|
|
51302
|
+
direction: "column",
|
|
51303
|
+
css: {
|
|
51304
|
+
margin: '$spacing-01'
|
|
51305
|
+
},
|
|
51306
|
+
justify: "between"
|
|
51307
|
+
}, {
|
|
51308
|
+
children: progressList === null || progressList === void 0 ? void 0 : progressList.map(function (item, index) {
|
|
51309
|
+
var _a;
|
|
51310
|
+
var isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
|
|
51311
|
+
return jsxRuntime.jsxs(Flex$1, __assign({
|
|
51312
|
+
direction: "column",
|
|
51313
|
+
align: "center",
|
|
51281
51314
|
css: {
|
|
51282
|
-
|
|
51315
|
+
flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0
|
|
51283
51316
|
}
|
|
51284
|
-
},
|
|
51285
|
-
|
|
51286
|
-
|
|
51287
|
-
|
|
51288
|
-
|
|
51317
|
+
}, {
|
|
51318
|
+
children: [jsxRuntime.jsxs(Status, __assign({
|
|
51319
|
+
css: {
|
|
51320
|
+
borderWidth: 1,
|
|
51321
|
+
height: 8,
|
|
51322
|
+
width: 8
|
|
51323
|
+
},
|
|
51324
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
51325
|
+
withIcon: isIcon,
|
|
51326
|
+
completed: isCompleted
|
|
51327
|
+
}, {
|
|
51328
|
+
children: [isIcon && renderIcon(item), jsxRuntime.jsx(Box, __assign({
|
|
51329
|
+
className: "title-progress",
|
|
51330
|
+
css: {
|
|
51331
|
+
position: 'absolute',
|
|
51332
|
+
top: isIcon ? 10 : -5,
|
|
51333
|
+
left: isIcon ? 40 : 20,
|
|
51334
|
+
right: width ? "-".concat(width, "px") : -300
|
|
51335
|
+
}
|
|
51336
|
+
}, {
|
|
51337
|
+
children: item.render ? jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
51338
|
+
children: typeof (item === null || item === void 0 ? void 0 : item.render) === 'function' ? item === null || item === void 0 ? void 0 : item.render() : item === null || item === void 0 ? void 0 : item.render
|
|
51339
|
+
}, void 0) : jsxRuntime.jsx(Title, __assign({
|
|
51340
|
+
css: {
|
|
51341
|
+
opacity: isMobile && (item === null || item === void 0 ? void 0 : item.progress) !== progress ? 0 : 1
|
|
51342
|
+
},
|
|
51343
|
+
state: getState((item === null || item === void 0 ? void 0 : item.progress) + 1)
|
|
51344
|
+
}, {
|
|
51345
|
+
children: typeof (item === null || item === void 0 ? void 0 : item.title) === 'function' ? (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.call(item) : item === null || item === void 0 ? void 0 : item.title
|
|
51346
|
+
}), index)
|
|
51347
|
+
}), void 0)]
|
|
51348
|
+
}), void 0), jsxRuntime.jsx(Line, {
|
|
51349
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
51350
|
+
withIcon: isIcon,
|
|
51351
|
+
css: {
|
|
51352
|
+
width: 2,
|
|
51353
|
+
height: gap
|
|
51354
|
+
}
|
|
51355
|
+
}, void 0)]
|
|
51356
|
+
}), index + 'vertical');
|
|
51357
|
+
})
|
|
51358
|
+
}), void 0)
|
|
51359
|
+
}), void 0);
|
|
51360
|
+
}
|
|
51361
|
+
return direction === 'horizontal' ? renderHorizontalIndicator() : renderVerticalIndicator();
|
|
51289
51362
|
}
|
|
51290
51363
|
|
|
51291
51364
|
var $$2 = _export;
|