@stokr/components-library 2.3.63-beta.1 → 2.3.64
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/dist/components/InfoIcon/InfoIcon.js +17 -49
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +7 -7
- package/dist/components/Payment/PaymentDisplay.js +176 -0
- package/dist/components/Payment/PaymentDisplay.stories.js +302 -0
- package/dist/components/Payment/TimerComponent.js +80 -0
- package/dist/components/Payment/TimerComponent.stories.js +236 -0
- package/dist/components/Timeline/Timeline.js +53 -0
- package/dist/components/Timeline/Timeline.stories.js +393 -0
- package/dist/components/Timeline/Timeline.styles.js +74 -0
- package/dist/components/Timeline/TimelineStep.js +88 -0
- package/dist/components/Timeline/index.js +19 -0
- package/dist/components/TransactionDetails/TransactionDetailsTable.js +64 -0
- package/dist/components/TransactionDetails/TransactionDetailsTable.stories.js +305 -0
- package/dist/index.js +44 -77
- package/dist/static/images/bitcoin-logo.svg +9 -0
- package/dist/static/images/check-icon.svg +3 -0
- package/dist/static/images/cross-icon.svg +3 -0
- package/dist/static/images/usdc-logo.svg +5 -0
- package/dist/static/images/usdq-logo.png +0 -0
- package/package.json +1 -2
- package/dist/static/images/1.svg +0 -4
- package/dist/static/images/2.svg +0 -4
- package/dist/static/images/3.svg +0 -3
- package/dist/static/images/4.svg +0 -3
- package/dist/static/images/amazon-logo.png +0 -0
- package/dist/static/images/avatar-cog.png +0 -0
- package/dist/static/images/avatar.png +0 -0
- package/dist/static/images/camera.svg +0 -1
- package/dist/static/images/document-back.svg +0 -1
- package/dist/static/images/document-small.svg +0 -1
- package/dist/static/images/document.svg +0 -1
- package/dist/static/images/favicon.png +0 -0
- package/dist/static/images/hdd.png +0 -0
- package/dist/static/images/lemonway.png +0 -0
- package/dist/static/images/member-item-picture.png +0 -0
- package/dist/static/images/nav_green.svg +0 -31
- package/dist/static/images/one.jpg +0 -0
- package/dist/static/images/passport.svg +0 -1
- package/dist/static/images/profile-picture-placeholder.png +0 -0
- package/dist/static/images/profile-picture-placeholder.svg +0 -1
- package/dist/static/images/profile-picture.png +0 -0
- package/dist/static/images/shark.jpg +0 -0
- package/dist/static/images/three.jpg +0 -0
- package/dist/static/images/two-sided-document.svg +0 -26
- package/dist/static/images/two.jpg +0 -0
- package/dist/static/images/user-profile.png +0 -0
- package/dist/static/images/whales.png +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TimerComponent = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _useTimer = require("../../hooks/useTimer");
|
|
9
|
+
var _moment = require("../../utils/moment");
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
12
|
+
var _Text = require("../Text/Text.styles");
|
|
13
|
+
var _Icon = require("../Icon/Icon.style");
|
|
14
|
+
var _Grid = require("../Grid/Grid.styles");
|
|
15
|
+
var _rwd = _interopRequireDefault(require("../../styles/rwd"));
|
|
16
|
+
var _templateObject;
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
20
|
+
const TimerBlock = _styledComponents.default.div.withConfig({
|
|
21
|
+
displayName: "TimerComponent__TimerBlock",
|
|
22
|
+
componentId: "sc-1gskuum-0"
|
|
23
|
+
})(["background-color:", ";padding:24px 27px;text-align:start;max-width:", ";margin:auto;strong{font-weight:600;}p{font-size:14px !important;margin:0 !important;}", " ", ":first-child{margin-bottom:16px;}", ""], _colors.default.grey3, props => props.maxWidth || '550px', _rwd.default.Medium(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n p {\n font-size: 16px !important;\n }\n "]))), _Text.Text, props => props.red && "\n #timer-text {\n color: ".concat(_colors.default.darkRed, ";\n }\n "));
|
|
24
|
+
const TimerComponent = exports.TimerComponent = /*#__PURE__*/(0, _react.memo)(_ref => {
|
|
25
|
+
let {
|
|
26
|
+
timerId,
|
|
27
|
+
onTimerExpired,
|
|
28
|
+
warningThreshold = 60 * 5,
|
|
29
|
+
// 5 minutes
|
|
30
|
+
// Customizable text props
|
|
31
|
+
title = 'This offer is time-limited',
|
|
32
|
+
description = 'Please note that this offer is valid only for a limited period and will expire in',
|
|
33
|
+
// Style props
|
|
34
|
+
containerStyle,
|
|
35
|
+
timerBlockStyle,
|
|
36
|
+
className,
|
|
37
|
+
maxWidth,
|
|
38
|
+
// Icon props
|
|
39
|
+
icon = _Icon.iconsMap.inProgress,
|
|
40
|
+
iconSize = 16,
|
|
41
|
+
showIcon = true
|
|
42
|
+
} = _ref;
|
|
43
|
+
const {
|
|
44
|
+
secondsRemaining,
|
|
45
|
+
hasTimerFinished,
|
|
46
|
+
stopTimer
|
|
47
|
+
} = (0, _useTimer.useTimer)(timerId);
|
|
48
|
+
|
|
49
|
+
// Handle timer expiration
|
|
50
|
+
_react.default.useEffect(() => {
|
|
51
|
+
if (hasTimerFinished) {
|
|
52
|
+
stopTimer();
|
|
53
|
+
if (onTimerExpired) {
|
|
54
|
+
onTimerExpired();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [hasTimerFinished, onTimerExpired, stopTimer]);
|
|
58
|
+
const isWarning = secondsRemaining < warningThreshold;
|
|
59
|
+
const formattedTime = _moment.moment.utc(secondsRemaining * 1000).format('HH:mm:ss');
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(TimerBlock, {
|
|
61
|
+
red: isWarning,
|
|
62
|
+
maxWidth: maxWidth,
|
|
63
|
+
style: timerBlockStyle,
|
|
64
|
+
className: className
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
style: containerStyle
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_Text.Text, null, /*#__PURE__*/_react.default.createElement(_Grid.FlexContainer, {
|
|
68
|
+
itemsCenter: true,
|
|
69
|
+
style: {
|
|
70
|
+
gap: 8
|
|
71
|
+
}
|
|
72
|
+
}, showIcon && /*#__PURE__*/_react.default.createElement(_Icon.Icon, {
|
|
73
|
+
icon: icon,
|
|
74
|
+
size: iconSize
|
|
75
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("strong", null, title)))), /*#__PURE__*/_react.default.createElement(_Text.Text, null, /*#__PURE__*/_react.default.createElement("p", null, description, " ", /*#__PURE__*/_react.default.createElement("strong", {
|
|
76
|
+
id: "timer-text"
|
|
77
|
+
}, formattedTime)))));
|
|
78
|
+
});
|
|
79
|
+
TimerComponent.displayName = 'TimerComponent';
|
|
80
|
+
var _default = exports.default = TimerComponent;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.WithoutIcon = exports.WithCallback = exports.WarningState = exports.VeryShortTimer = exports.ShortTimer = exports.LongTimer = exports.Default = exports.CustomWidth = exports.CustomWarningThreshold = exports.CustomTitle = exports.CustomStyling = exports.CustomDescription = exports.CompleteCustom = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _TimerComponent = _interopRequireDefault(require("./TimerComponent"));
|
|
9
|
+
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
|
|
10
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
11
|
+
var _TimerService = _interopRequireDefault(require("../../services/TimerService"));
|
|
12
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
13
|
+
const _excluded = ["timerId", "duration", "children"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
17
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
|
+
var _default = exports.default = {
|
|
20
|
+
title: 'Components Library/Payment/TimerComponent',
|
|
21
|
+
component: _TimerComponent.default,
|
|
22
|
+
argTypes: {
|
|
23
|
+
timerId: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
description: 'Unique identifier for the timer'
|
|
26
|
+
},
|
|
27
|
+
onTimerExpired: {
|
|
28
|
+
action: 'timerExpired',
|
|
29
|
+
description: 'Callback function called when timer expires'
|
|
30
|
+
},
|
|
31
|
+
warningThreshold: {
|
|
32
|
+
control: 'number',
|
|
33
|
+
description: 'Seconds remaining before warning state (default: 300 = 5 minutes)',
|
|
34
|
+
defaultValue: 300
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
control: 'text',
|
|
38
|
+
description: 'Title text displayed in the timer component'
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
control: 'text',
|
|
42
|
+
description: 'Description text displayed before the timer'
|
|
43
|
+
},
|
|
44
|
+
maxWidth: {
|
|
45
|
+
control: 'text',
|
|
46
|
+
description: 'Maximum width of the timer block'
|
|
47
|
+
},
|
|
48
|
+
containerStyle: {
|
|
49
|
+
control: 'object',
|
|
50
|
+
description: 'Style object for the inner container'
|
|
51
|
+
},
|
|
52
|
+
timerBlockStyle: {
|
|
53
|
+
control: 'object',
|
|
54
|
+
description: 'Style object for the timer block'
|
|
55
|
+
},
|
|
56
|
+
className: {
|
|
57
|
+
control: 'text',
|
|
58
|
+
description: 'CSS class name for the timer block'
|
|
59
|
+
},
|
|
60
|
+
icon: {
|
|
61
|
+
control: false,
|
|
62
|
+
description: 'Icon identifier from iconsMap'
|
|
63
|
+
},
|
|
64
|
+
iconSize: {
|
|
65
|
+
control: 'number',
|
|
66
|
+
description: 'Size of the icon in pixels'
|
|
67
|
+
},
|
|
68
|
+
showIcon: {
|
|
69
|
+
control: 'boolean',
|
|
70
|
+
description: 'Show/hide the icon',
|
|
71
|
+
defaultValue: true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))]
|
|
75
|
+
}; // Helper component to start timer for stories
|
|
76
|
+
const TimerWrapper = _ref => {
|
|
77
|
+
let {
|
|
78
|
+
timerId,
|
|
79
|
+
duration,
|
|
80
|
+
children
|
|
81
|
+
} = _ref,
|
|
82
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
83
|
+
(0, _react.useEffect)(() => {
|
|
84
|
+
// Start timer when component mounts
|
|
85
|
+
_TimerService.default.startTimer(timerId, duration, () => {},
|
|
86
|
+
// onTick callback
|
|
87
|
+
() => {} // onExpired callback
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
// Cleanup: stop timer when component unmounts
|
|
91
|
+
return () => {
|
|
92
|
+
_TimerService.default.stopTimer(timerId);
|
|
93
|
+
};
|
|
94
|
+
}, [timerId, duration]);
|
|
95
|
+
return /*#__PURE__*/_react.default.cloneElement(children, props);
|
|
96
|
+
};
|
|
97
|
+
const Template = args => {
|
|
98
|
+
const timerId = args.timerId || 'storybook-timer-1';
|
|
99
|
+
const duration = args.duration || 600; // 10 minutes default
|
|
100
|
+
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(TimerWrapper, _extends({
|
|
102
|
+
timerId: timerId,
|
|
103
|
+
duration: duration
|
|
104
|
+
}, args), /*#__PURE__*/_react.default.createElement(_TimerComponent.default, _extends({
|
|
105
|
+
timerId: timerId
|
|
106
|
+
}, args))));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// Default timer (10 minutes)
|
|
110
|
+
const Default = exports.Default = Template.bind({});
|
|
111
|
+
Default.args = {
|
|
112
|
+
timerId: 'storybook-timer-default',
|
|
113
|
+
duration: 600 // 10 minutes
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// Short timer (1 minute) - will show warning immediately
|
|
117
|
+
const ShortTimer = exports.ShortTimer = Template.bind({});
|
|
118
|
+
ShortTimer.args = {
|
|
119
|
+
timerId: 'storybook-timer-short',
|
|
120
|
+
duration: 60,
|
|
121
|
+
// 1 minute
|
|
122
|
+
warningThreshold: 60
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Warning state (less than 5 minutes)
|
|
126
|
+
const WarningState = exports.WarningState = Template.bind({});
|
|
127
|
+
WarningState.args = {
|
|
128
|
+
timerId: 'storybook-timer-warning',
|
|
129
|
+
duration: 240,
|
|
130
|
+
// 4 minutes - will be in warning state
|
|
131
|
+
warningThreshold: 300
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// Very short timer (30 seconds)
|
|
135
|
+
const VeryShortTimer = exports.VeryShortTimer = Template.bind({});
|
|
136
|
+
VeryShortTimer.args = {
|
|
137
|
+
timerId: 'storybook-timer-very-short',
|
|
138
|
+
duration: 30,
|
|
139
|
+
// 30 seconds
|
|
140
|
+
warningThreshold: 60
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// Custom title
|
|
144
|
+
const CustomTitle = exports.CustomTitle = Template.bind({});
|
|
145
|
+
CustomTitle.args = {
|
|
146
|
+
timerId: 'storybook-timer-custom-title',
|
|
147
|
+
duration: 600,
|
|
148
|
+
title: 'Limited Time Offer',
|
|
149
|
+
description: 'Hurry up! This special offer expires in'
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// Custom description
|
|
153
|
+
const CustomDescription = exports.CustomDescription = Template.bind({});
|
|
154
|
+
CustomDescription.args = {
|
|
155
|
+
timerId: 'storybook-timer-custom-desc',
|
|
156
|
+
duration: 600,
|
|
157
|
+
description: 'Complete your purchase within'
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// Without icon
|
|
161
|
+
const WithoutIcon = exports.WithoutIcon = Template.bind({});
|
|
162
|
+
WithoutIcon.args = {
|
|
163
|
+
timerId: 'storybook-timer-no-icon',
|
|
164
|
+
duration: 600,
|
|
165
|
+
showIcon: false
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// Custom width
|
|
169
|
+
const CustomWidth = exports.CustomWidth = Template.bind({});
|
|
170
|
+
CustomWidth.args = {
|
|
171
|
+
timerId: 'storybook-timer-custom-width',
|
|
172
|
+
duration: 600,
|
|
173
|
+
maxWidth: '800px'
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// Custom styling
|
|
177
|
+
const CustomStyling = exports.CustomStyling = Template.bind({});
|
|
178
|
+
CustomStyling.args = {
|
|
179
|
+
timerId: 'storybook-timer-custom-style',
|
|
180
|
+
duration: 600,
|
|
181
|
+
timerBlockStyle: {
|
|
182
|
+
backgroundColor: _colors.default.veryLightGreen,
|
|
183
|
+
border: "1px solid ".concat(_colors.default.freshGreen),
|
|
184
|
+
borderRadius: '8px'
|
|
185
|
+
},
|
|
186
|
+
containerStyle: {
|
|
187
|
+
padding: '8px'
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// Long timer (1 hour)
|
|
192
|
+
const LongTimer = exports.LongTimer = Template.bind({});
|
|
193
|
+
LongTimer.args = {
|
|
194
|
+
timerId: 'storybook-timer-long',
|
|
195
|
+
duration: 3600,
|
|
196
|
+
// 1 hour
|
|
197
|
+
warningThreshold: 300
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// Custom warning threshold
|
|
201
|
+
const CustomWarningThreshold = exports.CustomWarningThreshold = Template.bind({});
|
|
202
|
+
CustomWarningThreshold.args = {
|
|
203
|
+
timerId: 'storybook-timer-custom-threshold',
|
|
204
|
+
duration: 600,
|
|
205
|
+
warningThreshold: 120 // 2 minutes warning threshold
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
// Complete custom example
|
|
209
|
+
const CompleteCustom = exports.CompleteCustom = Template.bind({});
|
|
210
|
+
CompleteCustom.args = {
|
|
211
|
+
timerId: 'storybook-timer-complete',
|
|
212
|
+
duration: 900,
|
|
213
|
+
// 15 minutes
|
|
214
|
+
title: 'Special Promotion Ending Soon',
|
|
215
|
+
description: "Don't miss out! This exclusive deal will expire in",
|
|
216
|
+
warningThreshold: 300,
|
|
217
|
+
maxWidth: '700px',
|
|
218
|
+
iconSize: 20,
|
|
219
|
+
timerBlockStyle: {
|
|
220
|
+
backgroundColor: _colors.default.grey3,
|
|
221
|
+
borderRadius: '12px',
|
|
222
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)'
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// With callback
|
|
227
|
+
const WithCallback = exports.WithCallback = Template.bind({});
|
|
228
|
+
WithCallback.args = {
|
|
229
|
+
timerId: 'storybook-timer-callback',
|
|
230
|
+
duration: 60,
|
|
231
|
+
// 1 minute for quick testing
|
|
232
|
+
onTimerExpired: () => {
|
|
233
|
+
console.log('Timer expired!');
|
|
234
|
+
alert('Timer has expired!');
|
|
235
|
+
}
|
|
236
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Timeline = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Timeline = require("./Timeline.styles");
|
|
9
|
+
var _TimelineStep = require("./TimelineStep");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const Timeline = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
steps = [],
|
|
14
|
+
maxWidth,
|
|
15
|
+
dateFormat,
|
|
16
|
+
showInfoIcons = true,
|
|
17
|
+
infoIconPosition = 'right',
|
|
18
|
+
// Style props
|
|
19
|
+
containerStyle,
|
|
20
|
+
className,
|
|
21
|
+
stepStyle,
|
|
22
|
+
iconStyle,
|
|
23
|
+
contentStyle
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_Timeline.TimelineContainer, {
|
|
26
|
+
maxWidth: maxWidth,
|
|
27
|
+
style: containerStyle,
|
|
28
|
+
className: className
|
|
29
|
+
}, steps.map((step, index) => {
|
|
30
|
+
const isLast = index === steps.length - 1;
|
|
31
|
+
const nextStep = !isLast ? steps[index + 1] : null;
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_TimelineStep.TimelineStep, {
|
|
33
|
+
key: step.id || index,
|
|
34
|
+
state: step.state || 'inactive',
|
|
35
|
+
date: step.date,
|
|
36
|
+
title: step.title,
|
|
37
|
+
tooltip: step.tooltip,
|
|
38
|
+
caption: step.caption,
|
|
39
|
+
isLast: isLast,
|
|
40
|
+
nextState: nextStep === null || nextStep === void 0 ? void 0 : nextStep.state,
|
|
41
|
+
customIcon: step.customIcon,
|
|
42
|
+
showInfoIcon: showInfoIcons,
|
|
43
|
+
infoIconPosition: infoIconPosition,
|
|
44
|
+
dateFormat: dateFormat,
|
|
45
|
+
stepStyle: step.stepStyle || stepStyle,
|
|
46
|
+
iconStyle: step.iconStyle || iconStyle,
|
|
47
|
+
contentStyle: step.contentStyle || contentStyle,
|
|
48
|
+
className: step.className
|
|
49
|
+
});
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
exports.Timeline = Timeline;
|
|
53
|
+
var _default = exports.default = Timeline;
|