@stokr/components-library 2.3.63-beta.2 → 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 -5
- 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,393 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.WithoutTooltips = exports.SimpleTimeline = exports.PendingState = exports.PayoutDeclined = exports.PayoutConfirmed = exports.LongCaptions = exports.InitiatedState = exports.DeclinedState = exports.CustomWidth = exports.CustomStyling = exports.CancelledState = exports.AllStates = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Timeline = require("./Timeline");
|
|
9
|
+
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
|
|
10
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
11
|
+
var _moment = require("../../utils/moment");
|
|
12
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
var _default = exports.default = {
|
|
15
|
+
title: 'Components Library/Timeline',
|
|
16
|
+
component: _Timeline.Timeline,
|
|
17
|
+
argTypes: {
|
|
18
|
+
steps: {
|
|
19
|
+
control: 'object',
|
|
20
|
+
description: 'Array of step objects with state, date, title, tooltip, and caption'
|
|
21
|
+
},
|
|
22
|
+
maxWidth: {
|
|
23
|
+
control: 'text',
|
|
24
|
+
description: 'Maximum width of the timeline container'
|
|
25
|
+
},
|
|
26
|
+
showInfoIcons: {
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
description: 'Show/hide info icons for tooltips',
|
|
29
|
+
defaultValue: true
|
|
30
|
+
},
|
|
31
|
+
infoIconPosition: {
|
|
32
|
+
control: 'select',
|
|
33
|
+
options: ['top', 'bottom', 'left', 'right'],
|
|
34
|
+
description: 'Position of tooltip relative to info icon'
|
|
35
|
+
},
|
|
36
|
+
containerStyle: {
|
|
37
|
+
control: 'object',
|
|
38
|
+
description: 'Style object for the timeline container'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))]
|
|
42
|
+
};
|
|
43
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_Timeline.Timeline, args);
|
|
44
|
+
|
|
45
|
+
// Pending state (first step active)
|
|
46
|
+
const PendingState = exports.PendingState = Template.bind({});
|
|
47
|
+
PendingState.args = {
|
|
48
|
+
steps: [{
|
|
49
|
+
id: 'pending',
|
|
50
|
+
date: '2025-08-10T11:57:00',
|
|
51
|
+
title: 'Pending',
|
|
52
|
+
tooltip: 'Payout is pending your confirmation',
|
|
53
|
+
caption: 'Payout is pending your confirmation.'
|
|
54
|
+
}, {
|
|
55
|
+
id: 'initiated',
|
|
56
|
+
state: 'inactive',
|
|
57
|
+
title: 'Initiated',
|
|
58
|
+
tooltip: 'Payout initiation information'
|
|
59
|
+
}, {
|
|
60
|
+
id: 'payout-confirmed',
|
|
61
|
+
state: 'inactive',
|
|
62
|
+
title: 'Payout Confirmed',
|
|
63
|
+
tooltip: 'Payout confirmation information'
|
|
64
|
+
}, {
|
|
65
|
+
id: 'paid-out',
|
|
66
|
+
state: 'inactive',
|
|
67
|
+
title: 'Paid out',
|
|
68
|
+
tooltip: 'Payout completion information'
|
|
69
|
+
}]
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// Initiated state (first two steps completed/active)
|
|
73
|
+
const InitiatedState = exports.InitiatedState = Template.bind({});
|
|
74
|
+
InitiatedState.args = {
|
|
75
|
+
steps: [{
|
|
76
|
+
id: 'pending',
|
|
77
|
+
state: 'completed',
|
|
78
|
+
date: '2025-08-10T11:57:00',
|
|
79
|
+
title: 'Pending',
|
|
80
|
+
tooltip: 'Payout was pending'
|
|
81
|
+
}, {
|
|
82
|
+
id: 'initiated',
|
|
83
|
+
date: '2025-08-12T11:57:00',
|
|
84
|
+
title: 'Initiated',
|
|
85
|
+
tooltip: 'Awaiting your confirmation',
|
|
86
|
+
caption: 'Awaiting your confirmation.'
|
|
87
|
+
}, {
|
|
88
|
+
id: 'transferee-notified',
|
|
89
|
+
state: 'inactive',
|
|
90
|
+
title: 'Transferee notified',
|
|
91
|
+
tooltip: 'Transferee notification information'
|
|
92
|
+
}, {
|
|
93
|
+
id: 'payout-confirmed',
|
|
94
|
+
state: 'inactive',
|
|
95
|
+
title: 'Payout Confirmed',
|
|
96
|
+
tooltip: 'Payout confirmation information'
|
|
97
|
+
}, {
|
|
98
|
+
id: 'paid-out',
|
|
99
|
+
state: 'inactive',
|
|
100
|
+
title: 'Paid out',
|
|
101
|
+
tooltip: 'Payout completion information'
|
|
102
|
+
}]
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// Payout Declined (failed state)
|
|
106
|
+
const PayoutDeclined = exports.PayoutDeclined = Template.bind({});
|
|
107
|
+
PayoutDeclined.args = {
|
|
108
|
+
steps: [{
|
|
109
|
+
id: 'pending',
|
|
110
|
+
state: 'completed',
|
|
111
|
+
date: '2025-08-10T11:57:00',
|
|
112
|
+
title: 'Pending',
|
|
113
|
+
tooltip: 'Payout was pending'
|
|
114
|
+
}, {
|
|
115
|
+
id: 'initiated',
|
|
116
|
+
state: 'completed',
|
|
117
|
+
date: '2025-08-12T11:57:00',
|
|
118
|
+
title: 'Initiated',
|
|
119
|
+
tooltip: 'Payout was initiated'
|
|
120
|
+
}, {
|
|
121
|
+
id: 'transferee-notified',
|
|
122
|
+
state: 'completed',
|
|
123
|
+
date: '2025-08-14T07:12:00',
|
|
124
|
+
title: 'Transferee notified',
|
|
125
|
+
tooltip: 'Transferee was notified',
|
|
126
|
+
caption: 'Change text'
|
|
127
|
+
}, {
|
|
128
|
+
id: 'payout-declined',
|
|
129
|
+
state: 'failed',
|
|
130
|
+
date: '2025-08-16T21:39:00',
|
|
131
|
+
title: 'Payout Declined',
|
|
132
|
+
tooltip: 'Payout was declined',
|
|
133
|
+
caption: 'Transferee declined the payout.'
|
|
134
|
+
}, {
|
|
135
|
+
id: 'paid-out',
|
|
136
|
+
state: 'inactive',
|
|
137
|
+
title: 'Paid out',
|
|
138
|
+
tooltip: 'Payout completion information'
|
|
139
|
+
}]
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// Payout Confirmed (successful flow)
|
|
143
|
+
const PayoutConfirmed = exports.PayoutConfirmed = Template.bind({});
|
|
144
|
+
PayoutConfirmed.args = {
|
|
145
|
+
steps: [{
|
|
146
|
+
id: 'pending',
|
|
147
|
+
state: 'completed',
|
|
148
|
+
date: '2025-08-10T11:57:00',
|
|
149
|
+
title: 'Pending',
|
|
150
|
+
tooltip: 'Payout was pending'
|
|
151
|
+
}, {
|
|
152
|
+
id: 'initiated',
|
|
153
|
+
state: 'completed',
|
|
154
|
+
date: '2025-08-12T11:57:00',
|
|
155
|
+
title: 'Initiated',
|
|
156
|
+
tooltip: 'Payout was initiated'
|
|
157
|
+
}, {
|
|
158
|
+
id: 'transferee-notified',
|
|
159
|
+
state: 'completed',
|
|
160
|
+
date: '2025-08-14T07:12:00',
|
|
161
|
+
title: 'Transferee notified',
|
|
162
|
+
tooltip: 'Transferee was notified',
|
|
163
|
+
caption: 'Change text'
|
|
164
|
+
}, {
|
|
165
|
+
id: 'payout-confirmed',
|
|
166
|
+
state: 'completed',
|
|
167
|
+
date: '2025-08-16T21:39:00',
|
|
168
|
+
title: 'Payout Confirmed',
|
|
169
|
+
tooltip: 'Payout was confirmed',
|
|
170
|
+
caption: 'Transferee has confirmed the payout.'
|
|
171
|
+
}, {
|
|
172
|
+
id: 'paid-out',
|
|
173
|
+
state: 'inactive',
|
|
174
|
+
title: 'Paid out',
|
|
175
|
+
tooltip: 'Payout completion information'
|
|
176
|
+
}]
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// All states example
|
|
180
|
+
const AllStates = exports.AllStates = Template.bind({});
|
|
181
|
+
AllStates.args = {
|
|
182
|
+
steps: [{
|
|
183
|
+
id: 'completed',
|
|
184
|
+
state: 'completed',
|
|
185
|
+
date: '2025-08-10T11:57:00',
|
|
186
|
+
title: 'Completed Step',
|
|
187
|
+
tooltip: 'This step is completed',
|
|
188
|
+
caption: 'This step has been successfully completed.'
|
|
189
|
+
}, {
|
|
190
|
+
id: 'active',
|
|
191
|
+
date: '2025-08-12T11:57:00',
|
|
192
|
+
title: 'Active Step',
|
|
193
|
+
tooltip: 'This step is currently active',
|
|
194
|
+
caption: 'This step is currently in progress.'
|
|
195
|
+
}, {
|
|
196
|
+
id: 'pending',
|
|
197
|
+
state: 'pending',
|
|
198
|
+
date: '2025-08-14T07:12:00',
|
|
199
|
+
title: 'Pending Step',
|
|
200
|
+
tooltip: 'This step is pending',
|
|
201
|
+
caption: 'This step is waiting to be processed.'
|
|
202
|
+
}, {
|
|
203
|
+
id: 'failed',
|
|
204
|
+
state: 'failed',
|
|
205
|
+
date: '2025-08-16T21:39:00',
|
|
206
|
+
title: 'Failed Step',
|
|
207
|
+
tooltip: 'This step has failed',
|
|
208
|
+
caption: 'This step encountered an error.'
|
|
209
|
+
}, {
|
|
210
|
+
id: 'inactive',
|
|
211
|
+
state: 'inactive',
|
|
212
|
+
title: 'Inactive Step',
|
|
213
|
+
tooltip: 'This step is not yet started'
|
|
214
|
+
}]
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// Simple timeline without dates
|
|
218
|
+
const SimpleTimeline = exports.SimpleTimeline = Template.bind({});
|
|
219
|
+
SimpleTimeline.args = {
|
|
220
|
+
steps: [{
|
|
221
|
+
id: 'step1',
|
|
222
|
+
state: 'completed',
|
|
223
|
+
title: 'Step 1',
|
|
224
|
+
tooltip: 'First step completed'
|
|
225
|
+
}, {
|
|
226
|
+
id: 'step2',
|
|
227
|
+
title: 'Step 2',
|
|
228
|
+
tooltip: 'Second step in progress',
|
|
229
|
+
caption: 'Currently working on this step.'
|
|
230
|
+
}, {
|
|
231
|
+
id: 'step3',
|
|
232
|
+
state: 'inactive',
|
|
233
|
+
title: 'Step 3',
|
|
234
|
+
tooltip: 'Third step not started'
|
|
235
|
+
}]
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// Without tooltips
|
|
239
|
+
const WithoutTooltips = exports.WithoutTooltips = Template.bind({});
|
|
240
|
+
WithoutTooltips.args = {
|
|
241
|
+
steps: [{
|
|
242
|
+
id: 'step1',
|
|
243
|
+
state: 'completed',
|
|
244
|
+
date: '2025-08-10T11:57:00',
|
|
245
|
+
title: 'Completed',
|
|
246
|
+
caption: 'This step is done.'
|
|
247
|
+
}, {
|
|
248
|
+
id: 'step2',
|
|
249
|
+
date: '2025-08-12T11:57:00',
|
|
250
|
+
title: 'Active',
|
|
251
|
+
caption: 'This step is in progress.'
|
|
252
|
+
}, {
|
|
253
|
+
id: 'step3',
|
|
254
|
+
state: 'inactive',
|
|
255
|
+
title: 'Upcoming'
|
|
256
|
+
}],
|
|
257
|
+
showInfoIcons: false
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
// Custom width
|
|
261
|
+
const CustomWidth = exports.CustomWidth = Template.bind({});
|
|
262
|
+
CustomWidth.args = {
|
|
263
|
+
steps: [{
|
|
264
|
+
id: 'step1',
|
|
265
|
+
state: 'completed',
|
|
266
|
+
date: '2025-08-10T11:57:00',
|
|
267
|
+
title: 'Step 1',
|
|
268
|
+
tooltip: 'First step'
|
|
269
|
+
}, {
|
|
270
|
+
id: 'step2',
|
|
271
|
+
date: '2025-08-12T11:57:00',
|
|
272
|
+
title: 'Step 2',
|
|
273
|
+
tooltip: 'Second step'
|
|
274
|
+
}, {
|
|
275
|
+
id: 'step3',
|
|
276
|
+
state: 'inactive',
|
|
277
|
+
title: 'Step 3',
|
|
278
|
+
tooltip: 'Third step'
|
|
279
|
+
}],
|
|
280
|
+
maxWidth: '600px'
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
// Long captions
|
|
284
|
+
const LongCaptions = exports.LongCaptions = Template.bind({});
|
|
285
|
+
LongCaptions.args = {
|
|
286
|
+
steps: [{
|
|
287
|
+
id: 'step1',
|
|
288
|
+
state: 'completed',
|
|
289
|
+
date: '2025-08-10T11:57:00',
|
|
290
|
+
title: 'Document Upload',
|
|
291
|
+
tooltip: 'Document upload information',
|
|
292
|
+
caption: 'All required documents have been successfully uploaded and verified by our team. The verification process took approximately 2 business days.'
|
|
293
|
+
}, {
|
|
294
|
+
id: 'step2',
|
|
295
|
+
date: '2025-08-12T11:57:00',
|
|
296
|
+
title: 'Review Process',
|
|
297
|
+
tooltip: 'Review process information',
|
|
298
|
+
caption: 'Your application is currently under review. Our compliance team is examining all submitted documents to ensure they meet our requirements. This typically takes 3-5 business days.'
|
|
299
|
+
}, {
|
|
300
|
+
id: 'step3',
|
|
301
|
+
state: 'inactive',
|
|
302
|
+
title: 'Approval',
|
|
303
|
+
tooltip: 'Approval information',
|
|
304
|
+
caption: 'Once the review is complete, you will receive a notification about the approval status of your application.'
|
|
305
|
+
}]
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// Custom styling
|
|
309
|
+
const CustomStyling = exports.CustomStyling = Template.bind({});
|
|
310
|
+
CustomStyling.args = {
|
|
311
|
+
steps: [{
|
|
312
|
+
id: 'step1',
|
|
313
|
+
state: 'completed',
|
|
314
|
+
date: '2025-08-10T11:57:00',
|
|
315
|
+
title: 'Step 1',
|
|
316
|
+
tooltip: 'First step'
|
|
317
|
+
}, {
|
|
318
|
+
id: 'step2',
|
|
319
|
+
date: '2025-08-12T11:57:00',
|
|
320
|
+
title: 'Step 2',
|
|
321
|
+
tooltip: 'Second step'
|
|
322
|
+
}, {
|
|
323
|
+
id: 'step3',
|
|
324
|
+
state: 'inactive',
|
|
325
|
+
title: 'Step 3',
|
|
326
|
+
tooltip: 'Third step'
|
|
327
|
+
}],
|
|
328
|
+
containerStyle: {
|
|
329
|
+
padding: '20px',
|
|
330
|
+
backgroundColor: _colors.default.grey3,
|
|
331
|
+
borderRadius: '8px'
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
// Cancelled state
|
|
336
|
+
const CancelledState = exports.CancelledState = Template.bind({});
|
|
337
|
+
CancelledState.args = {
|
|
338
|
+
steps: [{
|
|
339
|
+
id: 'step1',
|
|
340
|
+
state: 'completed',
|
|
341
|
+
date: '2025-08-10T11:57:00',
|
|
342
|
+
title: 'Started',
|
|
343
|
+
tooltip: 'Process started'
|
|
344
|
+
}, {
|
|
345
|
+
id: 'step2',
|
|
346
|
+
state: 'completed',
|
|
347
|
+
date: '2025-08-12T11:57:00',
|
|
348
|
+
title: 'In Progress',
|
|
349
|
+
tooltip: 'Process in progress'
|
|
350
|
+
}, {
|
|
351
|
+
id: 'step3',
|
|
352
|
+
state: 'cancelled',
|
|
353
|
+
date: '2025-08-14T07:12:00',
|
|
354
|
+
title: 'Cancelled',
|
|
355
|
+
tooltip: 'Process was cancelled',
|
|
356
|
+
caption: 'The process was cancelled by the user.'
|
|
357
|
+
}, {
|
|
358
|
+
id: 'step4',
|
|
359
|
+
state: 'inactive',
|
|
360
|
+
title: 'Completed',
|
|
361
|
+
tooltip: 'Completion information'
|
|
362
|
+
}]
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
// Declined state
|
|
366
|
+
const DeclinedState = exports.DeclinedState = Template.bind({});
|
|
367
|
+
DeclinedState.args = {
|
|
368
|
+
steps: [{
|
|
369
|
+
id: 'step1',
|
|
370
|
+
state: 'completed',
|
|
371
|
+
date: '2025-08-10T11:57:00',
|
|
372
|
+
title: 'Submitted',
|
|
373
|
+
tooltip: 'Application submitted'
|
|
374
|
+
}, {
|
|
375
|
+
id: 'step2',
|
|
376
|
+
state: 'completed',
|
|
377
|
+
date: '2025-08-12T11:57:00',
|
|
378
|
+
title: 'Under Review',
|
|
379
|
+
tooltip: 'Application under review'
|
|
380
|
+
}, {
|
|
381
|
+
id: 'step3',
|
|
382
|
+
state: 'declined',
|
|
383
|
+
date: '2025-08-14T07:12:00',
|
|
384
|
+
title: 'Declined',
|
|
385
|
+
tooltip: 'Application declined',
|
|
386
|
+
caption: 'Your application was declined due to incomplete information.'
|
|
387
|
+
}, {
|
|
388
|
+
id: 'step4',
|
|
389
|
+
state: 'inactive',
|
|
390
|
+
title: 'Approved',
|
|
391
|
+
tooltip: 'Approval information'
|
|
392
|
+
}]
|
|
393
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TimelineStepWrapper = exports.TimelineContainer = exports.StepTitle = exports.StepIcon = exports.StepHeader = exports.StepDate = exports.StepContent = exports.StepCaption = exports.IconContainer = exports.ConnectingLine = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
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); }
|
|
11
|
+
const iconSize = 20;
|
|
12
|
+
const TimelineContainer = exports.TimelineContainer = _styledComponents.default.div.withConfig({
|
|
13
|
+
displayName: "Timelinestyles__TimelineContainer",
|
|
14
|
+
componentId: "sc-1anwsc5-0"
|
|
15
|
+
})(["position:relative;width:100%;max-width:", ";"], props => props.maxWidth || '100%');
|
|
16
|
+
const TimelineStepWrapper = exports.TimelineStepWrapper = _styledComponents.default.div.withConfig({
|
|
17
|
+
displayName: "Timelinestyles__TimelineStepWrapper",
|
|
18
|
+
componentId: "sc-1anwsc5-1"
|
|
19
|
+
})(["position:relative;display:flex;align-items:flex-start;margin-bottom:", ";"], props => props.isLast ? '0' : '10px');
|
|
20
|
+
const IconContainer = exports.IconContainer = _styledComponents.default.div.withConfig({
|
|
21
|
+
displayName: "Timelinestyles__IconContainer",
|
|
22
|
+
componentId: "sc-1anwsc5-2"
|
|
23
|
+
})(["display:flex;flex-direction:column;align-items:center;min-width:24px;width:24px;margin-right:16px;align-self:stretch;gap:4px;"]);
|
|
24
|
+
const StepIcon = exports.StepIcon = _styledComponents.default.div.withConfig({
|
|
25
|
+
displayName: "Timelinestyles__StepIcon",
|
|
26
|
+
componentId: "sc-1anwsc5-3"
|
|
27
|
+
})(["width:", "px;height:", "px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease;", " svg path{stroke:", ";}"], iconSize, iconSize, props => {
|
|
28
|
+
switch (props.state) {
|
|
29
|
+
case 'completed':
|
|
30
|
+
return (0, _styledComponents.css)(["background-color:", ";color:", ";"], _colors.default.freshGreen, _colors.default.white);
|
|
31
|
+
case 'pending':
|
|
32
|
+
return (0, _styledComponents.css)(["background-color:", ";color:", ";"], _colors.default.warningOrange, _colors.default.white);
|
|
33
|
+
case 'failed':
|
|
34
|
+
case 'cancelled':
|
|
35
|
+
return (0, _styledComponents.css)(["background-color:", ";color:", ";"], _colors.default.darkRed, _colors.default.white);
|
|
36
|
+
case 'inactive':
|
|
37
|
+
default:
|
|
38
|
+
return (0, _styledComponents.css)(["background-color:transparent;border:1.5px solid ", ";color:", ";"], _colors.default.lightGrey, _colors.default.grey2);
|
|
39
|
+
}
|
|
40
|
+
}, _colors.default.white);
|
|
41
|
+
const ConnectingLine = exports.ConnectingLine = _styledComponents.default.div.withConfig({
|
|
42
|
+
displayName: "Timelinestyles__ConnectingLine",
|
|
43
|
+
componentId: "sc-1anwsc5-4"
|
|
44
|
+
})(["width:2px;flex:1;min-height:10px;align-self:center;", ""], props => {
|
|
45
|
+
const lineColor = props.state === 'completed' ? _colors.default.freshGreen : props.state === 'pending' ? _colors.default.warningOrange : props.state === 'failed' || props.state === 'cancelled' ? _colors.default.darkRed : _colors.default.lightGrey;
|
|
46
|
+
return (0, _styledComponents.css)(["background-color:", ";"], lineColor);
|
|
47
|
+
});
|
|
48
|
+
const StepContent = exports.StepContent = _styledComponents.default.div.withConfig({
|
|
49
|
+
displayName: "Timelinestyles__StepContent",
|
|
50
|
+
componentId: "sc-1anwsc5-5"
|
|
51
|
+
})(["flex:1;padding-bottom:", ";display:flex;flex-direction:column;gap:4px;"], props => props.hasCaption ? '8px' : '0');
|
|
52
|
+
const StepHeader = exports.StepHeader = _styledComponents.default.div.withConfig({
|
|
53
|
+
displayName: "Timelinestyles__StepHeader",
|
|
54
|
+
componentId: "sc-1anwsc5-6"
|
|
55
|
+
})(["display:flex;align-items:center;gap:8px;"]);
|
|
56
|
+
const StepDate = exports.StepDate = _styledComponents.default.span.withConfig({
|
|
57
|
+
displayName: "Timelinestyles__StepDate",
|
|
58
|
+
componentId: "sc-1anwsc5-7"
|
|
59
|
+
})(["color:", ";font-size:11px;font-weight:400;text-transform:uppercase;line-height:15px;letter-spacing:2px;word-wrap:break-word;"], _colors.default.black);
|
|
60
|
+
const StepTitle = exports.StepTitle = _styledComponents.default.span.withConfig({
|
|
61
|
+
displayName: "Timelinestyles__StepTitle",
|
|
62
|
+
componentId: "sc-1anwsc5-8"
|
|
63
|
+
})(["color:", ";font-size:16px;font-weight:600;line-height:24px;letter-spacing:0.6px;word-wrap:break-word;"], props => {
|
|
64
|
+
switch (props.state) {
|
|
65
|
+
case 'inactive':
|
|
66
|
+
return _colors.default.grey2;
|
|
67
|
+
default:
|
|
68
|
+
return _colors.default.black;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const StepCaption = exports.StepCaption = _styledComponents.default.div.withConfig({
|
|
72
|
+
displayName: "Timelinestyles__StepCaption",
|
|
73
|
+
componentId: "sc-1anwsc5-9"
|
|
74
|
+
})(["color:", ";margin-top:4px;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0.6px;word-wrap:break-word;"], _colors.default.grey2);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TimelineStep = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Icon = require("../Icon/Icon.style");
|
|
9
|
+
var _InfoIcon = require("../InfoIcon/InfoIcon");
|
|
10
|
+
var _Timeline = require("./Timeline.styles");
|
|
11
|
+
var _crossIcon = require("static/images/cross-icon.svg");
|
|
12
|
+
var _checkIcon = require("static/images/check-icon.svg");
|
|
13
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const TimelineStep = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
state = 'inactive',
|
|
18
|
+
date,
|
|
19
|
+
title,
|
|
20
|
+
tooltip,
|
|
21
|
+
caption,
|
|
22
|
+
isLast = false,
|
|
23
|
+
nextState,
|
|
24
|
+
customIcon,
|
|
25
|
+
showInfoIcon = true,
|
|
26
|
+
infoIconPosition = 'right',
|
|
27
|
+
// Style props
|
|
28
|
+
stepStyle,
|
|
29
|
+
iconStyle,
|
|
30
|
+
contentStyle,
|
|
31
|
+
className
|
|
32
|
+
} = _ref;
|
|
33
|
+
const getIcon = () => {
|
|
34
|
+
if (customIcon) return customIcon;
|
|
35
|
+
switch (state) {
|
|
36
|
+
case 'completed':
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_checkIcon.ReactComponent, {
|
|
38
|
+
width: 12,
|
|
39
|
+
height: 12
|
|
40
|
+
});
|
|
41
|
+
case 'pending':
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_Icon.Icon, {
|
|
43
|
+
icon: _Icon.iconsMap.inProgress,
|
|
44
|
+
size: 12,
|
|
45
|
+
style: {
|
|
46
|
+
marginLeft: 1
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
case 'failed':
|
|
50
|
+
case 'cancelled':
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_crossIcon.ReactComponent, {
|
|
52
|
+
width: 8,
|
|
53
|
+
height: 8
|
|
54
|
+
});
|
|
55
|
+
case 'inactive':
|
|
56
|
+
default:
|
|
57
|
+
return null;
|
|
58
|
+
// Empty circle (handled by border)
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const formattedDate = date ? (0, _moment.default)(date).format('DD. MMM YYYY HH:mm') : null;
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_Timeline.TimelineStepWrapper, {
|
|
63
|
+
isLast: isLast,
|
|
64
|
+
style: stepStyle,
|
|
65
|
+
className: className
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_Timeline.IconContainer, null, /*#__PURE__*/_react.default.createElement(_Timeline.StepIcon, {
|
|
67
|
+
state: state,
|
|
68
|
+
style: iconStyle
|
|
69
|
+
}, getIcon()), !isLast && /*#__PURE__*/_react.default.createElement(_Timeline.ConnectingLine, {
|
|
70
|
+
state: state,
|
|
71
|
+
nextState: nextState
|
|
72
|
+
})), /*#__PURE__*/_react.default.createElement(_Timeline.StepContent, {
|
|
73
|
+
hasCaption: !!caption,
|
|
74
|
+
style: contentStyle
|
|
75
|
+
}, formattedDate && /*#__PURE__*/_react.default.createElement(_Timeline.StepDate, null, formattedDate), /*#__PURE__*/_react.default.createElement(_Timeline.StepHeader, null, /*#__PURE__*/_react.default.createElement(_Timeline.StepTitle, {
|
|
76
|
+
state: state,
|
|
77
|
+
isActive: state === 'active' || state === 'pending'
|
|
78
|
+
}, title), showInfoIcon && tooltip && /*#__PURE__*/_react.default.createElement(_InfoIcon.InfoIcon, {
|
|
79
|
+
title: tooltip,
|
|
80
|
+
position: infoIconPosition,
|
|
81
|
+
noMargin: true,
|
|
82
|
+
containerStyle: {
|
|
83
|
+
marginTop: 1
|
|
84
|
+
}
|
|
85
|
+
})), caption && /*#__PURE__*/_react.default.createElement(_Timeline.StepCaption, null, caption)));
|
|
86
|
+
};
|
|
87
|
+
exports.TimelineStep = TimelineStep;
|
|
88
|
+
var _default = exports.default = TimelineStep;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Timeline", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Timeline.Timeline;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "TimelineStep", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _TimelineStep.TimelineStep;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _Timeline = require("./Timeline");
|
|
19
|
+
var _TimelineStep = require("./TimelineStep");
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TransactionDetailsTable = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const TableContainer = _styledComponents.default.div.withConfig({
|
|
12
|
+
displayName: "TransactionDetailsTable__TableContainer",
|
|
13
|
+
componentId: "sc-yy5fem-0"
|
|
14
|
+
})(["border:", ";overflow:auto;max-width:", ";margin:auto;width:100%;"], props => props.showBorders ? "1px solid ".concat(_colors.default.lightGrey) : 'none', props => props.maxWidth || '550px');
|
|
15
|
+
const Table = _styledComponents.default.table.withConfig({
|
|
16
|
+
displayName: "TransactionDetailsTable__Table",
|
|
17
|
+
componentId: "sc-yy5fem-1"
|
|
18
|
+
})(["width:100%;border-collapse:collapse;"]);
|
|
19
|
+
const Row = _styledComponents.default.tr.withConfig({
|
|
20
|
+
displayName: "TransactionDetailsTable__Row",
|
|
21
|
+
componentId: "sc-yy5fem-2"
|
|
22
|
+
})(["border-bottom:", ";&:last-child{border-bottom:none;}"], props => props.showBorders ? "1px solid ".concat(_colors.default.lightGrey) : 'none');
|
|
23
|
+
const LabelCell = _styledComponents.default.td.withConfig({
|
|
24
|
+
displayName: "TransactionDetailsTable__LabelCell",
|
|
25
|
+
componentId: "sc-yy5fem-3"
|
|
26
|
+
})(["padding:16px 20px;color:", ";width:50%;vertical-align:top;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0.1px;word-wrap:break-word;text-align:start;"], _colors.default.darkGrey);
|
|
27
|
+
const ValueCell = _styledComponents.default.td.withConfig({
|
|
28
|
+
displayName: "TransactionDetailsTable__ValueCell",
|
|
29
|
+
componentId: "sc-yy5fem-4"
|
|
30
|
+
})(["padding:16px 20px;color:", ";width:50%;vertical-align:top;text-align:right;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0.1px;word-wrap:break-word;"], _colors.default.black);
|
|
31
|
+
const TransactionDetailsTable = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
data,
|
|
34
|
+
showBorders = true,
|
|
35
|
+
labelCellStyle,
|
|
36
|
+
valueCellStyle,
|
|
37
|
+
rowStyle,
|
|
38
|
+
containerStyle,
|
|
39
|
+
maxWidth,
|
|
40
|
+
className,
|
|
41
|
+
labelCellClassName,
|
|
42
|
+
valueCellClassName,
|
|
43
|
+
rowClassName
|
|
44
|
+
} = _ref;
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(TableContainer, {
|
|
46
|
+
style: containerStyle,
|
|
47
|
+
showBorders: showBorders,
|
|
48
|
+
maxWidth: maxWidth,
|
|
49
|
+
className: className
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(Table, null, /*#__PURE__*/_react.default.createElement("tbody", null, data.map((item, index) => /*#__PURE__*/_react.default.createElement(Row, {
|
|
51
|
+
key: item.label || index,
|
|
52
|
+
style: rowStyle ? rowStyle(index, item) : {},
|
|
53
|
+
showBorders: showBorders,
|
|
54
|
+
className: rowClassName ? rowClassName(index, item) : undefined
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(LabelCell, {
|
|
56
|
+
style: labelCellStyle ? labelCellStyle(index, item) : {},
|
|
57
|
+
className: labelCellClassName ? labelCellClassName(index, item) : undefined
|
|
58
|
+
}, item.label, item.labelIcon && item.labelIcon), /*#__PURE__*/_react.default.createElement(ValueCell, {
|
|
59
|
+
style: valueCellStyle ? valueCellStyle(index, item) : {},
|
|
60
|
+
className: valueCellClassName ? valueCellClassName(index, item) : undefined
|
|
61
|
+
}, item.valueIcon && item.valueIcon, item.value))))));
|
|
62
|
+
};
|
|
63
|
+
exports.TransactionDetailsTable = TransactionDetailsTable;
|
|
64
|
+
var _default = exports.default = TransactionDetailsTable;
|