@telsho/react-google-flight-datepicker 1.1.4 → 1.1.5

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.
@@ -0,0 +1,779 @@
1
+ .react-google-flight-datepicker {
2
+ font-size: 1rem;
3
+ display: contents;
4
+
5
+ & > * {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ .date-picker-demo {
10
+ width: 400px;
11
+ }
12
+
13
+ .btn-outline {
14
+ background-color: transparent;
15
+ background-repeat: no-repeat;
16
+ border: none;
17
+ cursor: pointer;
18
+ overflow: hidden;
19
+ }
20
+
21
+ .date-picker {
22
+ position: relative;
23
+ border-radius: 4px;
24
+ background: white;
25
+ padding: 6px;
26
+
27
+ &.disabled {
28
+ opacity: 0.6;
29
+ cursor: default;
30
+ }
31
+ }
32
+
33
+ .date-picker-input {
34
+ width: 100%;
35
+ display: flex;
36
+ justify-content: space-between;
37
+ border: 1px solid #dadce0;
38
+ border-radius: 4px;
39
+ color: #3c4043;
40
+ height: 56px;
41
+ letter-spacing: 0.2px;
42
+ font-size: 1rem;
43
+ align-items: center;
44
+ overflow: visible;
45
+
46
+
47
+ svg {
48
+ min-width: 24px;
49
+ min-height: 24px;
50
+ }
51
+ }
52
+
53
+ .date-picker-date-group {
54
+ position: relative;
55
+ display: flex;
56
+ justify-content: space-between;
57
+ height: 100%;
58
+ flex-grow: 1;
59
+ }
60
+
61
+ .date {
62
+ display: flex;
63
+ align-items: center;
64
+ height: 100%;
65
+ position: relative;
66
+ border-radius: 2px 0 0 2px;
67
+ padding: 0 13px;
68
+ flex-grow: 1;
69
+ width: 50%;
70
+ background: white;
71
+ border-radius: 4px;
72
+
73
+ &.is-single::before {
74
+ display: none;
75
+ }
76
+ }
77
+
78
+ .date:first-child::before {
79
+ content: '';
80
+ position: absolute;
81
+ right: 0;
82
+ top: 50%;
83
+ transform: translate(0, -50%);
84
+ width: 1px;
85
+ height: 70%;
86
+ background: #dadce0;
87
+ }
88
+
89
+ .selected-date {
90
+ display: flex;
91
+ flex: 1 1 0px;
92
+ align-items: center;
93
+ height: 100%;
94
+ font-size: 0.9rem;
95
+ line-height: normal;
96
+ overflow: hidden;
97
+ text-overflow: ellipsis;
98
+ white-space: nowrap;
99
+ }
100
+
101
+ .date-placeholder {
102
+ color: rgba(0, 0, 0, 0.56);
103
+ }
104
+
105
+ .change-date-group {
106
+ width: 48px;
107
+ display: flex;
108
+ }
109
+
110
+ .change-date-group .change-date-button {
111
+ height: 40px;
112
+ color: #5f6368;
113
+ cursor: pointer;
114
+ padding: 8px 0;
115
+ flex-grow: 1;
116
+
117
+ &:disabled {
118
+ cursor: default;
119
+
120
+ .icon-arrow {
121
+ fill: #93989e;
122
+ }
123
+ }
124
+ }
125
+
126
+ .icon-calendar {
127
+ width: 24px;
128
+ height: 24px;
129
+ fill: #1a73e8;
130
+ margin-right: 12px;
131
+
132
+ &.mobile {
133
+ display: none;
134
+ }
135
+ }
136
+
137
+ .icon-arrow {
138
+ width: 24px;
139
+ height: 24px;
140
+ fill: #5f6368;
141
+ }
142
+
143
+ @keyframes showPopup {
144
+ 0% {
145
+ transform: scale(0.7);
146
+ opacity: 0;
147
+ }
148
+ 100% {
149
+ transform: scale(1);
150
+ opacity: 1;
151
+ }
152
+ }
153
+
154
+ @keyframes hidePopup {
155
+ 0% {
156
+ transform: scale(1);
157
+ opacity: 1;
158
+ }
159
+
160
+ 100% {
161
+ transform: scale(0.7);
162
+ opacity: 0;
163
+ visibility: hidden;
164
+ }
165
+ }
166
+
167
+ .dialog-date-picker {
168
+ background: #fff;
169
+ border-radius: 5px;
170
+ box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3),
171
+ 0 4px 8px 3px rgba(60, 64, 67, 0.15);
172
+ min-width: 200px;
173
+ position: absolute;
174
+ top: -2px;
175
+ left: -2px;
176
+ z-index: 120;
177
+ height: max-content;
178
+ width: 770px;
179
+ margin-bottom: 50px;
180
+ transform-origin: top left;
181
+ opacity: 0;
182
+ transform: scale(0);
183
+
184
+ &.single {
185
+ width: 385px;
186
+ }
187
+
188
+ &.open {
189
+ animation: showPopup 0.2s forwards;
190
+ }
191
+
192
+ &.hide {
193
+ animation: hidePopup 0.2s forwards;
194
+ }
195
+
196
+ &.expand-right {
197
+ left: -2px;
198
+ right: auto;
199
+ transform-origin: top left;
200
+ }
201
+ &.expand-left {
202
+ left: auto;
203
+ right: -2px;
204
+ transform-origin: top right;
205
+ }
206
+ }
207
+
208
+ .dialog-header {
209
+ padding: 8px 8px 8px 24px;
210
+ display: flex;
211
+ justify-content: space-between;
212
+ align-items: center;
213
+ }
214
+
215
+ .dialog-header .date-picker-input {
216
+ height: 48px;
217
+ width: 50%;
218
+ }
219
+
220
+ .date:focus,
221
+ .date.is-focus {
222
+ background-color: #f4f8ff;
223
+
224
+ &::after {
225
+ content: '';
226
+ margin: -1px;
227
+ border: 2px solid #1a73e8;
228
+ border-radius: 4px;
229
+ position: absolute;
230
+ pointer-events: none;
231
+ top: 0;
232
+ bottom: 0;
233
+ left: 0;
234
+ right: 0;
235
+ z-index: 5;
236
+ }
237
+ }
238
+
239
+ .back-button {
240
+ display: none;
241
+ }
242
+
243
+ .dialog-content {
244
+ border-bottom: 1px solid #dadce0;
245
+ border-top: 1px solid #dadce0;
246
+ position: relative;
247
+ }
248
+
249
+ .reset-button {
250
+ font-size: 0.9rem;
251
+ padding: 0 8px;
252
+ height: 36px;
253
+ border-radius: 4px;
254
+ border: none;
255
+ color: #5f6368;
256
+ min-width: 64px;
257
+
258
+ &:hover {
259
+ background-color: #fafafa;
260
+ }
261
+
262
+ &.mobile {
263
+ display: none;
264
+ }
265
+ }
266
+
267
+ .calendar-wrapper {
268
+ margin: 12px 38px 8px;
269
+ overflow: hidden;
270
+ min-height: 353px;
271
+
272
+ &.single {
273
+ margin-left: 36px;
274
+ margin-right: 36px;
275
+ }
276
+ }
277
+
278
+ .tooltip-text {
279
+ position: absolute;
280
+ background-color: #4285f4;
281
+ color: #fff;
282
+ text-align: center;
283
+ border-radius: 6px;
284
+ padding: 5px 15px;
285
+ z-index: 999;
286
+ width: 120px;
287
+ max-width: 120px;
288
+ word-break: break-word;
289
+ visibility: hidden;
290
+ }
291
+
292
+ .tooltip-text::before {
293
+ z-index: 1001;
294
+ border: 6px solid transparent;
295
+ background: transparent;
296
+ content: "";
297
+ margin-left: -6px;
298
+ margin-bottom: -12px;
299
+ border-top-color: #4285f4;
300
+ position: absolute;
301
+ bottom: 0;
302
+ left: 50%;
303
+ }
304
+
305
+ .calendar-content {
306
+ display: flex;
307
+ padding: 0 2px;
308
+ position: relative;
309
+ overflow: hidden;
310
+
311
+ &.isAnimating {
312
+ transition: transform 0.2s ease;
313
+ overflow: initial;
314
+ }
315
+ }
316
+
317
+ .month-calendar {
318
+ width: 308px;
319
+ color: #3c4043;
320
+ margin-right: 43px;
321
+
322
+ &.hidden {
323
+ position: absolute;
324
+ visibility: hidden;
325
+ z-index: -1;
326
+ opacity: 0;
327
+ }
328
+
329
+ &.isAnimating {
330
+ position: absolute;
331
+ left: -350px;
332
+ }
333
+
334
+ .month-calendar {
335
+ &.slide-next {
336
+ position: absolute;
337
+ left: 350px;
338
+ }
339
+
340
+ &.slide-prev {
341
+ position: absolute;
342
+ left: -350px;
343
+ }
344
+ }
345
+ }
346
+
347
+ .month-name {
348
+ text-align: center;
349
+ font-size: 1rem;
350
+ margin-bottom: 10px;
351
+ }
352
+
353
+ .weekdays {
354
+ width: 100%;
355
+ font-size: 0.9rem;
356
+ color: rgba(0, 0, 0, 0.54);
357
+ display: flex;
358
+
359
+ .weekday {
360
+ display: flex;
361
+ align-items: center;
362
+ justify-content: center;
363
+ height: 36px;
364
+ margin: 0;
365
+ flex-grow: 1;
366
+ }
367
+ }
368
+
369
+ .week {
370
+ display: flex;
371
+ justify-content: flex-start;
372
+
373
+ &.first {
374
+ justify-content: flex-end;
375
+ }
376
+ }
377
+
378
+ .day {
379
+ display: flex;
380
+ justify-content: center;
381
+ align-items: center;
382
+ cursor: pointer;
383
+ height: 44px;
384
+ margin: 2px 0;
385
+ text-align: center;
386
+ width: 44px;
387
+ vertical-align: top;
388
+ position: relative;
389
+ border-radius: 50%;
390
+
391
+ .background-day {
392
+ bottom: 0;
393
+ opacity: 0;
394
+ pointer-events: none;
395
+ position: absolute;
396
+ top: 0;
397
+ width: 10px;
398
+ z-index: 1;
399
+
400
+ &.first-day {
401
+ background: linear-gradient(to right, #fff, #daedfd);
402
+ left: -10px;
403
+ }
404
+
405
+ &.last-day {
406
+ background: linear-gradient(to left, #fff, #daedfd);
407
+ right: -10px;
408
+ }
409
+ }
410
+
411
+ &::after {
412
+ border-radius: 100%;
413
+ bottom: 0;
414
+ content: '';
415
+ height: 44px;
416
+ left: 0;
417
+ margin: auto;
418
+ position: absolute;
419
+ right: 0;
420
+ top: 0;
421
+ width: 44px;
422
+ z-index: 2;
423
+ }
424
+
425
+ &:hover::after {
426
+ background-color: #fff;
427
+ border: 2px solid #4285f4;
428
+ bottom: -2px;
429
+ left: -2px;
430
+ right: -2px;
431
+ top: -2px;
432
+ }
433
+
434
+ &.selected {
435
+ color: white;
436
+
437
+ &:hover {
438
+ color: #000;
439
+ }
440
+
441
+ &::after {
442
+ background-color: #4285f4;
443
+ border-radius: 100%;
444
+ }
445
+
446
+ &:hover::after {
447
+ background-color: #fff;
448
+ }
449
+ }
450
+
451
+ &.highlight::before {
452
+ content: '';
453
+ width: 44px;
454
+ height: 44px;
455
+ position: absolute;
456
+ left: 50%;
457
+ top: 50%;
458
+ transform: translate(-50%, -50%);
459
+ background-color: #f7ed7ad1;
460
+ border-radius: 50%;
461
+ }
462
+
463
+ &.hovered {
464
+ background-color: #d9edfd;
465
+ position: relative;
466
+ border-radius: unset;
467
+
468
+ .background-day {
469
+ opacity: 1;
470
+ }
471
+
472
+ &.end {
473
+ background: linear-gradient(90deg, #d9edfd 50%, #fff 50%);
474
+ }
475
+
476
+ &:hover {
477
+ background-color: #d9edfd;
478
+
479
+ &::after {
480
+ border-radius: 100%;
481
+ background-color: #fff;
482
+ }
483
+ }
484
+ }
485
+
486
+ &.selected.hovered {
487
+ background: linear-gradient(90deg, #fff 50%, #d9edfd 50%);
488
+ color: #fff;
489
+
490
+ &.end {
491
+ background: linear-gradient(90deg, #d9edfd 50%, #fff 50%);
492
+ }
493
+
494
+ &:hover {
495
+ color: #000;
496
+ }
497
+
498
+ &::after {
499
+ border-radius: 100%;
500
+ background-color: #4285f4;
501
+ }
502
+
503
+ &:hover::after {
504
+ background-color: #fff;
505
+ }
506
+ }
507
+
508
+ &.disabled {
509
+ pointer-events: none;
510
+ color: rgba(0, 0, 0, 0.26);
511
+
512
+ &.selected {
513
+ color: #fff;
514
+ }
515
+ }
516
+
517
+ .text-day {
518
+ position: relative;
519
+ z-index: 3;
520
+ }
521
+ }
522
+
523
+ .day-content {
524
+ display: flex;
525
+ flex-direction: column;
526
+ align-items: center;
527
+ gap: 2px;
528
+ }
529
+
530
+ .sub-text {
531
+ font-size: 0.75em;
532
+ color: #666;
533
+ text-align: center;
534
+ }
535
+
536
+ .day.has-subtext {
537
+ padding-bottom: 4px;
538
+ }
539
+
540
+ .calendar-flippers {
541
+ position: absolute;
542
+ top: 0;
543
+ left: 0;
544
+ bottom: 0;
545
+ right: 0;
546
+ display: flex;
547
+ justify-content: space-between;
548
+ align-items: center;
549
+ pointer-events: none;
550
+ }
551
+
552
+ .flipper-button {
553
+ background-color: #fff;
554
+ border-radius: 100%;
555
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.12), 0 4px 4px rgba(0, 0, 0, 0.24);
556
+ cursor: pointer;
557
+ height: 40px;
558
+ width: 40px;
559
+ display: flex;
560
+ justify-content: center;
561
+ align-items: center;
562
+ margin: 0 -20px;
563
+ pointer-events: all;
564
+ border: none;
565
+ outline: none;
566
+
567
+ &:focus:hover {
568
+ outline: none;
569
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.12), 0 4px 4px rgba(0, 0, 0, 0.24),
570
+ 0 0 0 2px rgba(0, 0, 0, 0.1);
571
+ }
572
+
573
+ svg {
574
+ width: 24px;
575
+ height: 24px;
576
+ }
577
+
578
+ &.disabled {
579
+ cursor: default;
580
+
581
+ svg {
582
+ fill: #93989e;
583
+ }
584
+ }
585
+ }
586
+ .dialog-footer {
587
+ align-items: center;
588
+ display: flex;
589
+ flex-direction: row-reverse;
590
+ padding: 8px;
591
+
592
+ .submit-button {
593
+ border-radius: 8px;
594
+ padding: 10px 8px;
595
+ border: none;
596
+ line-height: 16px;
597
+ text-transform: uppercase;
598
+ color: #fff;
599
+ background: #4285f4;
600
+ height: 36px;
601
+ min-width: 88px;
602
+ font-weight: 500;
603
+ font-size: 0.9rem;
604
+ cursor: pointer;
605
+ }
606
+ }
607
+
608
+ /** RESPONSIVE MOBILE */
609
+ @media screen and (max-width: 768px) {
610
+ .date-picker-demo {
611
+ width: 100%;
612
+ }
613
+
614
+ .date-picker-input {
615
+ height: 40px;
616
+ border: none;
617
+ border-radius: 0;
618
+ position: relative;
619
+ }
620
+
621
+ .date {
622
+ border: 1px solid #dadce0;
623
+ border-radius: 5px;
624
+ padding: 0 10px;
625
+ flex-grow: 1;
626
+
627
+ &:nth-child(2) {
628
+ margin-left: 10px;
629
+ }
630
+
631
+ &.is-focus {
632
+ height: 40px;
633
+ }
634
+ }
635
+
636
+ .date:first-child::before {
637
+ display: none;
638
+ }
639
+
640
+ .icon-calendar {
641
+ display: none;
642
+
643
+ &.mobile {
644
+ display: block;
645
+ }
646
+ }
647
+
648
+ .reset-button {
649
+ display: none;
650
+
651
+ &.mobile {
652
+ display: block;
653
+ color: rgba(0, 0, 0, 0.87);
654
+ min-width: 88px;
655
+ font-weight: 500;
656
+ }
657
+ }
658
+
659
+ .change-date-group,
660
+ .divider,
661
+ .calendar-flippers,
662
+ .weekdays {
663
+ display: none;
664
+ }
665
+
666
+ .back-button {
667
+ display: block;
668
+ width: 56px;
669
+ height: 100%;
670
+ margin-right: 16px;
671
+ padding: 0;
672
+
673
+ svg {
674
+ width: 20px;
675
+ height: 20px;
676
+ fill: rgba(0, 0, 0, 0.7);
677
+ }
678
+ }
679
+
680
+ .dialog-date-picker {
681
+ border-radius: 0;
682
+ width: 100%;
683
+ height: 100%;
684
+ max-height: 100%;
685
+ position: fixed;
686
+ left: 0;
687
+ right: 0;
688
+ bottom: 10px;
689
+ top: 100%;
690
+ display: flex;
691
+ flex-direction: column;
692
+ opacity: 1;
693
+ transform: none;
694
+ z-index: 999999999;
695
+
696
+ &.open {
697
+ transition: all 0.2s ease-out;
698
+ transform: translate(0, -100%);
699
+ animation: none;
700
+ }
701
+
702
+ &.hide {
703
+ transition: all 0.2s ease-in;
704
+ transform: translate(0, 0);
705
+ animation: none;
706
+ }
707
+ }
708
+
709
+ .dialog-header {
710
+ padding: 8px;
711
+ box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.24);
712
+ z-index: 50;
713
+
714
+ .date-picker-input {
715
+ height: 40px;
716
+ width: 100%;
717
+ }
718
+ }
719
+
720
+ .dialog-content {
721
+ border: none;
722
+ overflow: hidden;
723
+ height: 100%;
724
+ }
725
+
726
+ .calendar-wrapper {
727
+ margin: 0;
728
+ height: 100%;
729
+ display: flex;
730
+ }
731
+
732
+ .calendar-content {
733
+ padding: 0;
734
+ width: 100%;
735
+ height: 100%;
736
+ flex-direction: column;
737
+ flex-grow: 1;
738
+
739
+ }
740
+
741
+ .weekdays.mobile {
742
+ display: flex;
743
+ background-color: #f3f3f3;
744
+ }
745
+
746
+ .month-calendar {
747
+ width: 100%;
748
+ display: flex;
749
+ flex-direction: column;
750
+ }
751
+
752
+ .day {
753
+ width: calc(100% / 7);
754
+ max-width: calc(100% / 7);
755
+
756
+ &.selected:hover,
757
+ &.hovered:hover {
758
+ color: #fff !important;
759
+
760
+ &::after {
761
+ background-color: #4285f4 !important;
762
+ }
763
+ }
764
+ }
765
+
766
+ .month-name {
767
+ text-align: left;
768
+ margin-left: 10px;
769
+ margin-bottom: 0px;
770
+ margin-top: 25px;
771
+ font-weight: bold;
772
+ }
773
+
774
+ .dialog-footer {
775
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.12), 0 4px 4px rgba(0, 0, 0, 0.24);
776
+ padding: 15px 8px;
777
+ }
778
+ }
779
+ }