intelicoreact 0.0.64 → 0.0.72
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/Atomic/FormElements/CheckboxInput/CheckboxInput.js +6 -2
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +91 -60
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +2 -1
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +48 -17
- package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +21 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +22 -6
- package/dist/Atomic/FormElements/Input/Input.js +15 -4
- package/dist/Atomic/FormElements/Input/Input.stories.js +7 -1
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +17 -50
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +98 -73
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +5 -157
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +17 -12
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +5 -3
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +3 -3
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +7 -7
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +7 -2
- package/dist/Atomic/FormElements/Table/Table.scss +1 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.scss +1 -1
- package/dist/Atomic/MainMenu/MainMenu.scss +2 -2
- package/dist/Atomic/UI/Accordion/Accordion.scss +2 -2
- package/dist/Atomic/UI/Arrow/Arrow.js +7 -8
- package/dist/Atomic/UI/Calendar/Calendar.js +3 -2
- package/dist/Atomic/UI/Calendar/Calendar.stories.js +3 -2
- package/dist/Atomic/UI/Status/Status.scss +1 -1
- package/dist/Molecular/Datepicker/Datepicker.js +451 -0
- package/dist/Molecular/Datepicker/Datepicker.scss +8 -0
- package/dist/Molecular/Datepicker/Datepicker.stories.js +44 -0
- package/dist/Molecular/Datepicker/components/Calendar.js +156 -0
- package/dist/scss/_vars.scss +3 -1
- package/dist/scss/main.scss +1 -1
- package/package.json +6 -4
- package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.js +12 -2
- package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +91 -60
- package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +4 -3
- package/src/Atomic/FormElements/Dropdown/Dropdown.js +53 -19
- package/src/Atomic/FormElements/Dropdown/Dropdown.scss +21 -3
- package/src/Atomic/FormElements/Dropdown/Dropdown.stories.js +28 -15
- package/src/Atomic/FormElements/Input/Input.js +4 -0
- package/src/Atomic/FormElements/Input/Input.stories.js +7 -1
- package/src/Atomic/FormElements/InputDateRange/InputDateRange.js +187 -220
- package/src/Atomic/FormElements/InputDateRange/InputDateRange.scss +98 -73
- package/src/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +35 -122
- package/src/Atomic/FormElements/InputDateRange/components/Datepicker.js +14 -8
- package/src/Atomic/FormElements/InputDateRange/components/OpenedPart.js +6 -4
- package/src/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -1
- package/src/Atomic/FormElements/InputDateRange/dependencies.js +6 -6
- package/src/Atomic/FormElements/RangeCalendar/RangeCalendar.js +5 -2
- package/src/Atomic/FormElements/Table/Table.scss +1 -1
- package/src/Atomic/FormElements/Textarea/Textarea.scss +1 -1
- package/src/Atomic/MainMenu/MainMenu.scss +2 -2
- package/src/Atomic/UI/Accordion/Accordion.scss +2 -2
- package/src/Atomic/UI/Arrow/Arrow.js +5 -5
- package/src/Atomic/UI/Calendar/Calendar.js +2 -2
- package/src/Atomic/UI/Calendar/Calendar.stories.js +2 -1
- package/src/Atomic/UI/Status/Status.scss +1 -1
- package/src/Molecular/Datepicker/Datepicker.js +346 -0
- package/src/Molecular/Datepicker/Datepicker.scss +8 -0
- package/src/Molecular/Datepicker/Datepicker.stories.js +27 -0
- package/src/Molecular/Datepicker/components/Calendar.js +118 -0
- package/src/scss/_vars.scss +3 -1
- package/src/scss/main.scss +1 -1
- package/dist/scss/anme/_anme-bootstrap-grid.scss +0 -748
- package/dist/scss/anme/_anme-elements.scss +0 -269
- package/dist/scss/anme/_anme-grid.scss +0 -111
- package/dist/scss/anme/_anme-justify.scss +0 -111
- package/dist/scss/anme/_anme-mixins-media.scss +0 -116
- package/dist/scss/anme/_anme-mixins.scss +0 -166
- package/dist/scss/anme/_anme-normalize.scss +0 -8
- package/dist/scss/anme/_anme-overall.scss +0 -34
- package/dist/scss/anme/_anme-padding-margins.scss +0 -419
- package/dist/scss/anme/_anme-table.scss +0 -81
- package/dist/scss/anme/_anme-theme.scss +0 -275
- package/dist/scss/anme/_anme-vars.scss +0 -91
- package/dist/scss/anme/_code-styling.scss +0 -23
- package/dist/scss/anme/styles.scss +0 -12
- package/src/scss/anme/_anme-bootstrap-grid.scss +0 -748
- package/src/scss/anme/_anme-elements.scss +0 -269
- package/src/scss/anme/_anme-grid.scss +0 -111
- package/src/scss/anme/_anme-justify.scss +0 -111
- package/src/scss/anme/_anme-mixins-media.scss +0 -116
- package/src/scss/anme/_anme-mixins.scss +0 -166
- package/src/scss/anme/_anme-normalize.scss +0 -8
- package/src/scss/anme/_anme-overall.scss +0 -34
- package/src/scss/anme/_anme-padding-margins.scss +0 -419
- package/src/scss/anme/_anme-table.scss +0 -81
- package/src/scss/anme/_anme-theme.scss +0 -275
- package/src/scss/anme/_anme-vars.scss +0 -91
- package/src/scss/anme/_code-styling.scss +0 -23
- package/src/scss/anme/styles.scss +0 -12
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--input-height:
|
|
2
|
+
--input-height: 28px;
|
|
3
3
|
--label-line-height: 16px;
|
|
4
4
|
// --border-color: rgba(0, 0, 0, 0.3);
|
|
5
|
-
--border-color: #
|
|
5
|
+
--border-color: #E2E5EC;
|
|
6
6
|
--calendar-range-point-color: #6b81dd;
|
|
7
|
-
--font-
|
|
7
|
+
--font-family: 'Roboto';
|
|
8
|
+
--font-size: 13px;
|
|
8
9
|
--line-height: 20px;
|
|
9
|
-
--border-radius:
|
|
10
|
+
--border-radius: 3px;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.date-range-input {
|
|
13
|
-
position: relative;
|
|
14
|
-
width:
|
|
15
|
-
height: calc(var(--input-height) + var(--label-line-height));
|
|
14
|
+
/*position: relative;
|
|
15
|
+
width: 335px;
|
|
16
|
+
//height: calc(var(--input-height) + var(--label-line-height));
|
|
16
17
|
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-flow: column nowrap;
|
|
19
20
|
justify-content: flex-end;
|
|
20
|
-
align-items: flex-start
|
|
21
|
+
align-items: flex-start;*/
|
|
21
22
|
|
|
22
23
|
input::-webkit-outer-spin-button,
|
|
23
24
|
input::-webkit-inner-spin-button {
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
|
|
27
28
|
&__label {
|
|
28
29
|
margin-bottom: 2px;
|
|
30
|
+
font-family: var(--font-family);
|
|
29
31
|
font-size: var(--font-size);
|
|
30
32
|
line-height: var(--label-line-height);
|
|
31
33
|
}
|
|
@@ -48,11 +50,11 @@
|
|
|
48
50
|
flex-flow: column nowrap;
|
|
49
51
|
justify-content: flex-start;
|
|
50
52
|
align-items: flex-start;
|
|
51
|
-
|
|
53
|
+
|
|
52
54
|
background: transparent;
|
|
53
55
|
z-index: 1;
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
|
|
56
58
|
&_right-position {
|
|
57
59
|
left: auto;
|
|
58
60
|
right: 0;
|
|
@@ -70,7 +72,7 @@
|
|
|
70
72
|
flex-flow: row nowrap;
|
|
71
73
|
justify-content: flex-end;
|
|
72
74
|
align-items: flex-start;
|
|
73
|
-
|
|
75
|
+
|
|
74
76
|
background: #FFFFFF;
|
|
75
77
|
border: 1px solid var(--border-color);
|
|
76
78
|
}
|
|
@@ -86,7 +88,7 @@
|
|
|
86
88
|
width: 100%;
|
|
87
89
|
height: 100%;
|
|
88
90
|
padding: 0 10px;
|
|
89
|
-
|
|
91
|
+
|
|
90
92
|
display: flex;
|
|
91
93
|
flex-direction: row;
|
|
92
94
|
flex-flow: row nowrap;
|
|
@@ -95,10 +97,10 @@
|
|
|
95
97
|
|
|
96
98
|
cursor: pointer;
|
|
97
99
|
}
|
|
98
|
-
|
|
100
|
+
|
|
99
101
|
&__interval-key {
|
|
100
102
|
display: inline-block;
|
|
101
|
-
margin-right:
|
|
103
|
+
margin-right: 5px;
|
|
102
104
|
text-transform: capitalize;
|
|
103
105
|
white-space: nowrap;
|
|
104
106
|
text-align: left;
|
|
@@ -224,17 +226,21 @@
|
|
|
224
226
|
|
|
225
227
|
text-transform: capitalize;
|
|
226
228
|
white-space: nowrap;
|
|
229
|
+
font-style: normal;
|
|
230
|
+
font-weight: 300;
|
|
231
|
+
font-family: var(--font-family);
|
|
227
232
|
font-size: var(--font-size);
|
|
228
233
|
line-height: var(--line-height);
|
|
229
234
|
cursor: pointer;
|
|
230
|
-
|
|
235
|
+
|
|
231
236
|
display: flex;
|
|
232
237
|
flex-flow: row nowrap;
|
|
233
238
|
justify-content: flex-start;
|
|
234
239
|
align-items: center;
|
|
235
240
|
|
|
236
241
|
&:hover {
|
|
237
|
-
background-color: rgba(128, 128, 128, 0.1);
|
|
242
|
+
// background-color: rgba(128, 128, 128, 0.1);
|
|
243
|
+
background-color: #F2F2F8;
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
&-icon-active {
|
|
@@ -265,8 +271,9 @@
|
|
|
265
271
|
box-sizing: border-box;
|
|
266
272
|
width: 100%;
|
|
267
273
|
height: fit-content;
|
|
268
|
-
padding: 5px;
|
|
274
|
+
padding: 7.5px 15px;
|
|
269
275
|
border: none;
|
|
276
|
+
background-color: #F7FAFC;
|
|
270
277
|
|
|
271
278
|
display: flex;
|
|
272
279
|
flex-flow: column nowrap;
|
|
@@ -285,6 +292,7 @@
|
|
|
285
292
|
line-height: var(--line-height);
|
|
286
293
|
|
|
287
294
|
&>div:not(.date-picker__inputs-separator) {
|
|
295
|
+
width: 110px;
|
|
288
296
|
height: 100%;
|
|
289
297
|
margin-right: 9px;
|
|
290
298
|
|
|
@@ -307,6 +315,11 @@
|
|
|
307
315
|
}
|
|
308
316
|
}
|
|
309
317
|
|
|
318
|
+
&>div.dropdown {
|
|
319
|
+
width: 80px;
|
|
320
|
+
border-radius: var(--border-radius);
|
|
321
|
+
}
|
|
322
|
+
|
|
310
323
|
.date-picker__inputs-separator {
|
|
311
324
|
margin-right: 9px;
|
|
312
325
|
}
|
|
@@ -317,12 +330,13 @@
|
|
|
317
330
|
width: fit-content;
|
|
318
331
|
height: fit-content;
|
|
319
332
|
padding: 3px 10px;
|
|
333
|
+
border-radius: var(--border-radius);
|
|
320
334
|
|
|
321
|
-
font-family:
|
|
322
|
-
font-style:
|
|
323
|
-
font-weight:
|
|
324
|
-
font-size:
|
|
325
|
-
line-height:
|
|
335
|
+
font-family: var(--font-family);
|
|
336
|
+
font-style: normal;
|
|
337
|
+
font-weight: 300;
|
|
338
|
+
font-size: var(--font-size);
|
|
339
|
+
line-height: var(--input-height);
|
|
326
340
|
letter-spacing: inherit;
|
|
327
341
|
color: inherit;
|
|
328
342
|
}
|
|
@@ -331,7 +345,7 @@
|
|
|
331
345
|
width: 70px;
|
|
332
346
|
height: fit-content;
|
|
333
347
|
border-radius: var(--border-radius);
|
|
334
|
-
|
|
348
|
+
|
|
335
349
|
&>.dropdown__trigger {
|
|
336
350
|
width: 100%;
|
|
337
351
|
height: 100%;
|
|
@@ -399,45 +413,49 @@
|
|
|
399
413
|
box-sizing: border-box;
|
|
400
414
|
width: fit-content;
|
|
401
415
|
height: fit-content;
|
|
402
|
-
|
|
416
|
+
|
|
403
417
|
&-header {
|
|
404
418
|
height: fit-content;
|
|
405
419
|
margin-bottom: 12px;
|
|
406
420
|
|
|
407
421
|
font-size: calc(var(--font-size) + 2px);
|
|
408
422
|
line-height: calc(var(--line-height) + 4px);
|
|
409
|
-
|
|
423
|
+
|
|
424
|
+
font-style: normal;
|
|
425
|
+
font-weight: 500;
|
|
426
|
+
|
|
410
427
|
display: flex;
|
|
411
428
|
justify-content: space-between;
|
|
412
429
|
align-items: center;
|
|
413
|
-
|
|
430
|
+
|
|
414
431
|
&__title {
|
|
415
432
|
text-align: center;
|
|
416
433
|
}
|
|
417
|
-
|
|
434
|
+
|
|
418
435
|
&__next, &__prev {
|
|
436
|
+
background-color: transparent;
|
|
419
437
|
cursor: pointer;
|
|
420
438
|
}
|
|
421
439
|
}
|
|
422
|
-
|
|
440
|
+
|
|
423
441
|
&__week {
|
|
424
442
|
display: flex;
|
|
425
|
-
|
|
443
|
+
|
|
426
444
|
&-title {
|
|
427
445
|
margin-bottom: 5px;
|
|
428
446
|
}
|
|
429
447
|
}
|
|
430
|
-
|
|
448
|
+
|
|
431
449
|
&__day {
|
|
432
450
|
position: relative;
|
|
433
451
|
box-sizing: border-box;
|
|
434
|
-
width:
|
|
435
|
-
height:
|
|
452
|
+
width: 29px;
|
|
453
|
+
height: 22px;
|
|
436
454
|
margin: 1px 0;
|
|
437
455
|
flex-grow: 1;
|
|
438
456
|
flex-basis: 0;
|
|
439
457
|
user-select: none;
|
|
440
|
-
|
|
458
|
+
|
|
441
459
|
display: flex;
|
|
442
460
|
justify-content: center;
|
|
443
461
|
align-items: center;
|
|
@@ -445,80 +463,80 @@
|
|
|
445
463
|
font-size: var(--font-size);
|
|
446
464
|
line-height: var(--line-height);
|
|
447
465
|
text-align: center;
|
|
448
|
-
|
|
466
|
+
|
|
449
467
|
&--clickable {
|
|
450
468
|
cursor: pointer;
|
|
451
|
-
|
|
469
|
+
|
|
452
470
|
&:hover {
|
|
453
471
|
background: #E2E6F8;
|
|
454
472
|
}
|
|
455
473
|
}
|
|
456
|
-
|
|
474
|
+
|
|
457
475
|
&--disabled {
|
|
458
476
|
cursor: default;
|
|
459
477
|
opacity: 0.2;
|
|
460
478
|
pointer-events: none;
|
|
461
|
-
|
|
462
|
-
&:hover {
|
|
463
|
-
background: inherit;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
&--range-end {
|
|
468
|
-
background: #EAF2FF;
|
|
469
|
-
border: 1px solid #EAF2FF;
|
|
470
|
-
border-radius: 0 24px 24px 0;
|
|
471
|
-
color: var(--calendar-range-point-color);
|
|
472
|
-
|
|
473
|
-
&::before {
|
|
474
|
-
content: '';
|
|
475
|
-
display: block;
|
|
476
|
-
width: 100%;
|
|
477
|
-
height: 100%;
|
|
478
|
-
box-sizing: border-box;
|
|
479
|
-
position: absolute;
|
|
480
|
-
border: 1px solid var(--calendar-range-point-color);
|
|
481
|
-
border-radius: 24px;
|
|
482
|
-
pointer-events: none;
|
|
483
|
-
}
|
|
484
479
|
|
|
485
480
|
&:hover {
|
|
486
|
-
|
|
487
|
-
background-color: var(--calendar-range-point-color);
|
|
488
|
-
border-radius: 24px;
|
|
481
|
+
background: inherit;
|
|
489
482
|
}
|
|
490
483
|
}
|
|
491
484
|
|
|
492
|
-
&--range-
|
|
485
|
+
// &--range-end {
|
|
486
|
+
// background: #EAF2FF;
|
|
487
|
+
// border: 1px solid #EAF2FF;
|
|
488
|
+
// border-radius: 0 24px 24px 0;
|
|
489
|
+
// color: var(--calendar-range-point-color);
|
|
490
|
+
|
|
491
|
+
// &::before {
|
|
492
|
+
// content: '';
|
|
493
|
+
// display: block;
|
|
494
|
+
// width: 100%;
|
|
495
|
+
// height: 100%;
|
|
496
|
+
// box-sizing: border-box;
|
|
497
|
+
// position: absolute;
|
|
498
|
+
// border: 1px solid var(--calendar-range-point-color);
|
|
499
|
+
// border-radius: 24px;
|
|
500
|
+
// pointer-events: none;
|
|
501
|
+
// }
|
|
502
|
+
|
|
503
|
+
// &:hover {
|
|
504
|
+
// color: #F8FBFF;
|
|
505
|
+
// background-color: var(--calendar-range-point-color);
|
|
506
|
+
// border-radius: 24px;
|
|
507
|
+
// }
|
|
508
|
+
// }
|
|
509
|
+
|
|
510
|
+
&--range-start, &--range-end {
|
|
493
511
|
background: var(--calendar-range-point-color);
|
|
494
512
|
border: 1px solid var(--calendar-range-point-color);
|
|
495
513
|
box-sizing: border-box;
|
|
496
|
-
border-radius:
|
|
514
|
+
border-radius: var(--border-radius);
|
|
497
515
|
color: #F8FBFF;
|
|
498
|
-
|
|
516
|
+
|
|
499
517
|
&:hover {
|
|
500
518
|
background: var(--calendar-range-point-color);
|
|
501
519
|
color: #F8FBFF;
|
|
502
520
|
}
|
|
503
521
|
}
|
|
504
|
-
|
|
522
|
+
|
|
505
523
|
&--range-inside {
|
|
506
524
|
background: #EAF2FF;
|
|
507
525
|
}
|
|
508
|
-
|
|
526
|
+
|
|
509
527
|
&--prev-range-end {
|
|
510
528
|
background: #E2E5EC;
|
|
511
529
|
border-radius: var(--border-radius);
|
|
512
530
|
}
|
|
513
|
-
|
|
531
|
+
|
|
514
532
|
&--prev-range-inside {
|
|
515
533
|
background: #F7F8FA;
|
|
516
534
|
}
|
|
517
|
-
|
|
535
|
+
|
|
518
536
|
&--title {
|
|
519
|
-
font-size:
|
|
520
|
-
line-height:
|
|
521
|
-
|
|
537
|
+
font-size: var(--font-size);
|
|
538
|
+
line-height: var(--line-height);
|
|
539
|
+
|
|
522
540
|
&:hover {
|
|
523
541
|
background: inherit;
|
|
524
542
|
}
|
|
@@ -533,6 +551,7 @@
|
|
|
533
551
|
padding: 8px 16px;
|
|
534
552
|
border-radius: 0 0 var(--border-radius) 0;
|
|
535
553
|
border: none;
|
|
554
|
+
background-color: #F7FAFC;
|
|
536
555
|
|
|
537
556
|
display: flex;
|
|
538
557
|
flex-flow: row nowrap;
|
|
@@ -552,12 +571,18 @@
|
|
|
552
571
|
|
|
553
572
|
&__button {
|
|
554
573
|
text-transform: capitalize;
|
|
555
|
-
|
|
574
|
+
|
|
556
575
|
&:first-child {
|
|
576
|
+
width: 80px;
|
|
557
577
|
margin-right: 16px;
|
|
578
|
+
background-color: #FFFFFF;
|
|
579
|
+
border: 1px solid #A6ACB1;
|
|
580
|
+
border-radius: var(--border-radius);
|
|
558
581
|
}
|
|
559
582
|
|
|
560
583
|
&:last-child {
|
|
584
|
+
width: 110px;
|
|
585
|
+
border-radius: var(--border-radius);
|
|
561
586
|
}
|
|
562
587
|
}
|
|
563
588
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { /*useEffect
|
|
1
|
+
import React, { /* useEffect, */ useState } from 'react';
|
|
2
2
|
import InputDateRange from './InputDateRange';
|
|
3
3
|
import Table from '../Table/Table';
|
|
4
4
|
|
|
@@ -17,132 +17,45 @@ export default {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
const tableData = {
|
|
21
|
-
header: [
|
|
22
|
-
{ id: 1, label: 'state' },
|
|
23
|
-
{ id: 2, label: 'Tags' },
|
|
24
|
-
{ id: 3, label: 'status' },
|
|
25
|
-
{ id: 4, label: 'loanAmountApproved' },
|
|
26
|
-
{ id: 5, label: 'loanAmountRejected' },
|
|
27
|
-
{ id: 6, label: 'approveRate' },
|
|
28
|
-
{ id: 7, label: 'actions', type: 'actions' }
|
|
29
|
-
],
|
|
30
|
-
rows: [
|
|
31
|
-
{
|
|
32
|
-
id: 1,
|
|
33
|
-
link: { label: 'CA', link: '#s' },
|
|
34
|
-
tags: [{ label: 'Label 1' }],
|
|
35
|
-
status: { value: '90', status: 'active' },
|
|
36
|
-
loanAmountApproved: { value: '$70,000' },
|
|
37
|
-
loanAmountRejected: { value: '$30,000' },
|
|
38
|
-
approveRate: { value: '70%' }
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 2,
|
|
42
|
-
link: { label: 'NY', link: '#s' },
|
|
43
|
-
advancedTags: [
|
|
44
|
-
{
|
|
45
|
-
labelLeft: 'home',
|
|
46
|
-
labelRight: 'hoods',
|
|
47
|
-
active: 3,
|
|
48
|
-
pause: 1,
|
|
49
|
-
merchants: 5
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
labelRight: 'jewelry',
|
|
53
|
-
active: 3,
|
|
54
|
-
pause: 1,
|
|
55
|
-
merchants: 5
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
labelLeft: 'home',
|
|
59
|
-
labelRight: 'improvement',
|
|
60
|
-
active: 0,
|
|
61
|
-
pause: 0,
|
|
62
|
-
warnLeft: true,
|
|
63
|
-
warnLeftMsg: 'landerNotIncluded',
|
|
64
|
-
warnRightMsg: 'noMerchants'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
labelLeft: 'home',
|
|
68
|
-
labelRight: 'hoods',
|
|
69
|
-
active: 3,
|
|
70
|
-
pause: 1,
|
|
71
|
-
merchants: 5
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
labelRight: 'jewelry',
|
|
75
|
-
active: 3,
|
|
76
|
-
pause: 1,
|
|
77
|
-
merchants: 5
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
status: { label: 'Active', className: 'color--green-haze' },
|
|
81
|
-
loanAmountApproved: { value: '$3,000' },
|
|
82
|
-
loanAmountRejected: { value: '$7,000' },
|
|
83
|
-
approveRate: { value: '30%' }
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: 3,
|
|
87
|
-
link: { label: 'NH', link: '#s' },
|
|
88
|
-
tags: [{ label: 'Label 1' }, { label: 'Label 2' }, { label: 'Label 3' }],
|
|
89
|
-
status: { status: 'error' },
|
|
90
|
-
loanAmountApproved: { value: '$70,000' },
|
|
91
|
-
loanAmountRejected: { value: '$30,000' },
|
|
92
|
-
approveRate: { value: '70%' }
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
};
|
|
96
|
-
|
|
97
20
|
const Template = args => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
// useEffect(() => console.log(value), [value]);
|
|
109
|
-
|
|
110
|
-
// return <InputDateRange {...restOfProps} value={value} onChange={setValue} />;
|
|
111
|
-
return (
|
|
112
|
-
<div>
|
|
113
|
-
<div className="mb20">
|
|
114
|
-
<InputDateRange {...restOfProps} value={value} onChange={setValue} />
|
|
115
|
-
</div>
|
|
116
|
-
<div>
|
|
117
|
-
<Table header={state.header} rows={rowsWithActions} onChange={setState} />
|
|
118
|
-
</div>
|
|
21
|
+
const { dateRange, ...restOfProps } = args;
|
|
22
|
+
const [value, setValue] = useState(dateRange);
|
|
23
|
+
// useEffect(() => console.log(value), [value]);
|
|
24
|
+
|
|
25
|
+
// return <InputDateRange {...restOfProps} value={value} onChange={setValue} />;
|
|
26
|
+
return (
|
|
27
|
+
<div>
|
|
28
|
+
<div className="mb20">
|
|
29
|
+
<InputDateRange {...restOfProps} value={value} onChange={setValue} />
|
|
119
30
|
</div>
|
|
120
|
-
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
121
33
|
};
|
|
122
34
|
|
|
123
35
|
export const InputDateRangeTemplate = Template.bind({});
|
|
124
36
|
|
|
125
37
|
InputDateRangeTemplate.args = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
38
|
+
txt: {},
|
|
39
|
+
buttonsTypes: {
|
|
40
|
+
// apply: 'ellipse-apply',
|
|
41
|
+
cancel: 'bark-outline'
|
|
42
|
+
},
|
|
43
|
+
label: 'Date Range',
|
|
44
|
+
dateRange: { intervalKey: 'today' },
|
|
45
|
+
id: 'anyToggleButtonId',
|
|
46
|
+
className: 'anyExternalContainerClassName',
|
|
47
|
+
error: false,
|
|
48
|
+
disabled: false,
|
|
49
|
+
isHoverable: false,
|
|
50
|
+
// short: true,
|
|
51
|
+
isCompact: false,
|
|
52
|
+
// isFocused: true,
|
|
53
|
+
isIntervalsHidden: false,
|
|
54
|
+
isCompareHidden: true,
|
|
55
|
+
hideArrows: false,
|
|
56
|
+
isOptionsRight: false,
|
|
57
|
+
isShortWeekNames: false
|
|
58
|
+
// limitRange,
|
|
59
|
+
// isUseAbs,
|
|
60
|
+
// absTooltip
|
|
148
61
|
};
|
|
@@ -40,7 +40,8 @@ const Datepicker = props => {
|
|
|
40
40
|
isCompareHidden,
|
|
41
41
|
limitRange,
|
|
42
42
|
handleItemClick,
|
|
43
|
-
setActiveInterval
|
|
43
|
+
setActiveInterval,
|
|
44
|
+
isShortWeekNames
|
|
44
45
|
} = props;
|
|
45
46
|
const { start = null, end = null, compare = false } = values;
|
|
46
47
|
const startDateInputRef = useRef(null);
|
|
@@ -293,20 +294,23 @@ const Datepicker = props => {
|
|
|
293
294
|
if (code === 27) doBlur(type, e);
|
|
294
295
|
};
|
|
295
296
|
|
|
297
|
+
const startDateValue = startDate ? moment(startDate).format('ll') : '';
|
|
298
|
+
const endDateValue = endDate ? moment(endDate).subtract(1, 'm').format('ll') : '';
|
|
299
|
+
|
|
296
300
|
return (
|
|
297
301
|
<div className={cn('date-picker', className)}>
|
|
298
302
|
<div className="date-picker__header">
|
|
299
303
|
<div className="date-picker__inputs-block">
|
|
300
304
|
<TextInput
|
|
301
305
|
dataTest="datepicker_start-date-input"
|
|
302
|
-
className={cn(
|
|
303
|
-
value={isStartFocused ? startDateInput :
|
|
304
|
-
disabled={!startDate}
|
|
306
|
+
className={cn( { 'date-picker__date-input_active': hoverStatus === 'start' })}
|
|
307
|
+
value={isStartFocused ? startDateInput : startDateValue}
|
|
305
308
|
onChange={value => setStartDateInput(handleDateInputOnChange(value))}
|
|
306
309
|
onFocus={handleStartDateFocus}
|
|
310
|
+
disabled={!startDate}
|
|
307
311
|
onBlur={handleStartDateBlur}
|
|
308
312
|
onKeyUp={(code, e) => handleKeyPressed(code, e, 'start')}
|
|
309
|
-
ref={startDateInputRef}
|
|
313
|
+
//ref={startDateInputRef}
|
|
310
314
|
// mask={moment(startDate).format('L').replace(/[0-9]/g, '9')}
|
|
311
315
|
/>
|
|
312
316
|
<SelectInput
|
|
@@ -321,14 +325,14 @@ const Datepicker = props => {
|
|
|
321
325
|
<div className="date-picker__inputs-separator date-picker__header--gray">—</div>
|
|
322
326
|
<TextInput
|
|
323
327
|
dataTest="datepicker_end-date-input"
|
|
324
|
-
className={cn(
|
|
325
|
-
value={isEndFocused ? endDateInput :
|
|
328
|
+
className={cn({ 'date-picker__date-input_active': hoverStatus === 'end' })}
|
|
329
|
+
value={isEndFocused ? endDateInput : endDateValue}
|
|
326
330
|
disabled={!endDate}
|
|
327
331
|
onChange={value => setEndDateInput(handleDateInputOnChange(value))}
|
|
328
332
|
onFocus={handleEndDateFocus}
|
|
329
333
|
onBlur={handleEndDateBlur}
|
|
330
334
|
onKeyUp={(code, e) => handleKeyPressed(code, e, 'end')}
|
|
331
|
-
ref={endDateInputRef}
|
|
335
|
+
//ref={endDateInputRef}
|
|
332
336
|
/>
|
|
333
337
|
<SelectInput
|
|
334
338
|
dataTest="datepicker_end-hour-select-input"
|
|
@@ -362,6 +366,7 @@ const Datepicker = props => {
|
|
|
362
366
|
onClick={handleClick}
|
|
363
367
|
onHover={handleHover}
|
|
364
368
|
limitRange={limitRange}
|
|
369
|
+
isShortWeekNames={isShortWeekNames}
|
|
365
370
|
/>
|
|
366
371
|
<Calendar
|
|
367
372
|
className="date-picker__calendar"
|
|
@@ -374,6 +379,7 @@ const Datepicker = props => {
|
|
|
374
379
|
endPrevDate={endPrevDate}
|
|
375
380
|
onClick={handleClick}
|
|
376
381
|
onHover={handleHover}
|
|
382
|
+
isShortWeekNames={isShortWeekNames}
|
|
377
383
|
/>
|
|
378
384
|
</div>
|
|
379
385
|
</div>
|
|
@@ -2,7 +2,7 @@ import React, {useEffect, useState} from 'react';
|
|
|
2
2
|
import moment from 'moment-timezone';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
|
|
5
|
-
import {INTERVALS as intervals, CUSTOM_INTERVAL_KEY as customKey } from '../dependencies';
|
|
5
|
+
import {INTERVALS as intervals, CUSTOM_INTERVAL_KEY as customKey, CUSTOM_INTERVAL_KEY_TEXT } from '../dependencies';
|
|
6
6
|
|
|
7
7
|
import SelectItem from './SelectItem';
|
|
8
8
|
import Datepicker from './Datepicker';
|
|
@@ -25,10 +25,11 @@ const OpenedPart = React.forwardRef((props, ref) => {
|
|
|
25
25
|
isCompare,
|
|
26
26
|
setIsCompare,
|
|
27
27
|
toggleOff,
|
|
28
|
+
isShortWeekNames
|
|
28
29
|
} = props;
|
|
29
|
-
|
|
30
|
+
|
|
30
31
|
const items = isCompact ? [...Object.keys(intervals)] : [...Object.keys(intervals), customKey];
|
|
31
|
-
|
|
32
|
+
|
|
32
33
|
const [activeInterval, setActiveInterval] = useState(actualValues.intervalKey);
|
|
33
34
|
|
|
34
35
|
const handleItemClick = item => {
|
|
@@ -76,7 +77,7 @@ const OpenedPart = React.forwardRef((props, ref) => {
|
|
|
76
77
|
<SelectItem
|
|
77
78
|
key={index}
|
|
78
79
|
item={item}
|
|
79
|
-
label={(txt?.labels && txt?.labels[item]) || intervals[item]?.label || item}
|
|
80
|
+
label={(txt?.labels && txt?.labels[item]) || intervals[item]?.label || (item === customKey ? CUSTOM_INTERVAL_KEY_TEXT : item )}
|
|
80
81
|
isActive={activeInterval === item}
|
|
81
82
|
onItemClick={() => handleItemClick(item.value || item)}
|
|
82
83
|
disabled={item === customKey}
|
|
@@ -103,6 +104,7 @@ const OpenedPart = React.forwardRef((props, ref) => {
|
|
|
103
104
|
isCompareHidden={isCompareHidden}
|
|
104
105
|
limitRange={limitRange}
|
|
105
106
|
setActiveInterval={setActiveInterval}
|
|
107
|
+
isShortWeekNames={isShortWeekNames}
|
|
106
108
|
/>
|
|
107
109
|
)}
|
|
108
110
|
</div>
|
|
@@ -15,7 +15,7 @@ const SelectItem = ({ item, label, isActive, onItemClick, onMouseEnter, disabled
|
|
|
15
15
|
>
|
|
16
16
|
{isActive && (
|
|
17
17
|
<svg className={cn('opened-part__intervals-item-icon-active')} width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
-
<path d="M13.3333 4L5.99999 11.3333L2.66666 8" stroke="black"
|
|
18
|
+
<path d="M13.3333 4L5.99999 11.3333L2.66666 8" stroke="black" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round"/>
|
|
19
19
|
</svg>
|
|
20
20
|
)}
|
|
21
21
|
{label}
|