@ionic/core 9.0.11-dev.11793889755.165fa328 → 9.0.11-dev.11793900758.1bf6a6e5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-accordion.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/{p-BCQSEpww.js → p-B7ExaLVL.js} +1 -1
- package/css/ionic/bundle.ionic.css +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime-button.cjs.entry.js +33 -6
- package/dist/cjs/ion-datetime.cjs.entry.js +339 -37
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion.ionic.css +11 -6
- package/dist/collection/components/datetime/datetime.ionic.css +211 -5
- package/dist/collection/components/datetime/datetime.ios.css +164 -0
- package/dist/collection/components/datetime/datetime.js +394 -36
- package/dist/collection/components/datetime/datetime.md.css +152 -0
- package/dist/collection/components/datetime/utils/state.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +34 -6
- package/dist/docs.json +153 -3
- package/dist/esm/{format-NT7iHsbA.js → format-DUHrIiJq.js} +1 -1
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-datetime-button.entry.js +34 -7
- package/dist/esm/ion-datetime.entry.js +340 -38
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +21 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-0f694e87.entry.js → p-8b107444.entry.js} +1 -1
- package/dist/ionic/{p-BtccSO5J.js → p-CaOPF8Xt.js} +1 -1
- package/dist/ionic/p-ceca04fb.entry.js +4 -0
- package/dist/ionic/p-ec99dc1f.entry.js +4 -0
- package/dist/types/components/datetime/datetime-interface.d.ts +4 -0
- package/dist/types/components/datetime/datetime.d.ts +73 -6
- package/dist/types/components/datetime/utils/state.d.ts +5 -2
- package/dist/types/components.d.ts +37 -4
- package/hydrate/index.js +381 -44
- package/hydrate/index.mjs +381 -44
- package/package.json +1 -1
- package/dist/ionic/p-0743a26a.entry.js +0 -4
- package/dist/ionic/p-ad46d2fd.entry.js +0 -4
|
@@ -346,11 +346,140 @@
|
|
|
346
346
|
|
|
347
347
|
:host .calendar-day-wrapper {
|
|
348
348
|
display: flex;
|
|
349
|
+
position: relative;
|
|
349
350
|
align-items: center;
|
|
350
351
|
justify-content: center;
|
|
351
352
|
min-width: 0;
|
|
352
353
|
min-height: 0;
|
|
353
354
|
overflow: visible;
|
|
355
|
+
/**
|
|
356
|
+
* Create a stacking context so the range track
|
|
357
|
+
* (::before with z-index: -1) stays behind the
|
|
358
|
+
* day button but above the host background.
|
|
359
|
+
*/
|
|
360
|
+
z-index: 0;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The focus ring can extend past the cell, so lift the focused day
|
|
365
|
+
* above the following days, whose range track would otherwise cover it.
|
|
366
|
+
*/
|
|
367
|
+
:host .calendar-day-wrapper:focus-within {
|
|
368
|
+
z-index: 1;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Keep the range announcement available to screen readers
|
|
373
|
+
* without showing it or covering the calendar.
|
|
374
|
+
*/
|
|
375
|
+
.datetime-range-announcement {
|
|
376
|
+
-webkit-margin-start: -1px;
|
|
377
|
+
margin-inline-start: -1px;
|
|
378
|
+
-webkit-margin-end: -1px;
|
|
379
|
+
margin-inline-end: -1px;
|
|
380
|
+
margin-top: -1px;
|
|
381
|
+
margin-bottom: -1px;
|
|
382
|
+
padding-left: 0;
|
|
383
|
+
padding-right: 0;
|
|
384
|
+
padding-top: 0;
|
|
385
|
+
padding-bottom: 0;
|
|
386
|
+
position: absolute;
|
|
387
|
+
width: 1px;
|
|
388
|
+
height: 1px;
|
|
389
|
+
border: 0;
|
|
390
|
+
white-space: nowrap;
|
|
391
|
+
overflow: hidden;
|
|
392
|
+
clip: rect(0, 0, 0, 0);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Each day in the range draws its own piece of the track with a
|
|
397
|
+
* ::before. In-range days fill the cell, while the start and end
|
|
398
|
+
* caps cover the half between the pill center and the next day.
|
|
399
|
+
*
|
|
400
|
+
* Grid columns are `1fr`, so cell edges land on fractional pixels
|
|
401
|
+
* and a cell's track can fall a hairline short of its neighbor's.
|
|
402
|
+
* Each day therefore extends 1px toward the next day in the range,
|
|
403
|
+
* which the next day paints over except inside such a gap.
|
|
404
|
+
*
|
|
405
|
+
* @prop --range-background: The background color of the range selection track.
|
|
406
|
+
*/
|
|
407
|
+
:host .calendar-day-wrapper-in-range::before,
|
|
408
|
+
:host .calendar-day-wrapper-range-start::before,
|
|
409
|
+
:host .calendar-day-wrapper-range-end::before {
|
|
410
|
+
position: absolute;
|
|
411
|
+
top: 50%;
|
|
412
|
+
inset-inline-start: 0;
|
|
413
|
+
inset-inline-end: 0;
|
|
414
|
+
height: var(--range-track-height);
|
|
415
|
+
transform: translateY(-50%);
|
|
416
|
+
/**
|
|
417
|
+
* `--range-background` is translucent by default, so it is layered
|
|
418
|
+
* over the datetime background to paint an opaque track. Where two
|
|
419
|
+
* days overlap, the color stays the same instead of doubling up
|
|
420
|
+
* into a darker line.
|
|
421
|
+
*/
|
|
422
|
+
background: linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));
|
|
423
|
+
content: "";
|
|
424
|
+
z-index: -1;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
:host .calendar-day-wrapper-range-start::before {
|
|
428
|
+
inset-inline-start: 50%;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
:host .calendar-day-wrapper-range-end::before {
|
|
432
|
+
inset-inline-end: 50%;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Only extend toward a day that draws the track as well. The last
|
|
437
|
+
* day of a week is followed by the next row, and the next day is
|
|
438
|
+
* unpainted when it ends the selection or is disabled inside the
|
|
439
|
+
* range, so extending there would leave a 1px nub.
|
|
440
|
+
*/
|
|
441
|
+
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
442
|
+
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before,
|
|
443
|
+
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
444
|
+
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before {
|
|
445
|
+
inset-inline-end: -1px;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* A range that continues onto the next week runs the track
|
|
450
|
+
* through the grid padding to the edge of the calendar.
|
|
451
|
+
*/
|
|
452
|
+
:host .calendar-day-wrapper-in-range:nth-child(7n)::before,
|
|
453
|
+
:host .calendar-day-wrapper-range-start:nth-child(7n)::before {
|
|
454
|
+
inset-inline-end: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,
|
|
458
|
+
:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before {
|
|
459
|
+
inset-inline-start: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* When a single day is both the start and end of the range,
|
|
464
|
+
* do not show a track since there is nothing to connect.
|
|
465
|
+
*/
|
|
466
|
+
:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before {
|
|
467
|
+
display: none;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* When the component is disabled, fade the whole grid once instead of
|
|
472
|
+
* fading each day. Fading a day makes it its own compositing group, so
|
|
473
|
+
* the 1px that each day extends toward the next would be painted twice
|
|
474
|
+
* and read as a darker seam. The day buttons drop their own disabled
|
|
475
|
+
* opacity so the grid is the only thing applying it.
|
|
476
|
+
*/
|
|
477
|
+
:host(.datetime-disabled.datetime-range) .calendar-month-grid {
|
|
478
|
+
opacity: 0.4;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
:host(.datetime-disabled.datetime-range) .calendar-month-grid .calendar-day[disabled] {
|
|
482
|
+
opacity: 1;
|
|
354
483
|
}
|
|
355
484
|
|
|
356
485
|
/**
|
|
@@ -451,7 +580,7 @@
|
|
|
451
580
|
*/
|
|
452
581
|
--background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
|
|
453
582
|
--focus-ring-color: var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));
|
|
454
|
-
--focus-ring-width: var(--token-border-
|
|
583
|
+
--focus-ring-width: var(--token-border-size-050, var(--token-scale-050, 2px));
|
|
455
584
|
/**
|
|
456
585
|
* TODO(FW-6931): Remove these variables upon solving the root cause
|
|
457
586
|
*/
|
|
@@ -601,16 +730,16 @@
|
|
|
601
730
|
}
|
|
602
731
|
|
|
603
732
|
.calendar-day[disabled]:not(.calendar-day-constrained) {
|
|
604
|
-
color: var(--token-primitives-neutral-500, #9fa5ad);
|
|
733
|
+
color: var(--token-text-disabled, var(--token-primitives-neutral-500, #9fa5ad));
|
|
605
734
|
}
|
|
606
735
|
|
|
607
736
|
.calendar-day.calendar-day-today {
|
|
608
|
-
color: var(--token-
|
|
737
|
+
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
609
738
|
}
|
|
610
739
|
|
|
611
740
|
.calendar-day.calendar-day-active,
|
|
612
741
|
.calendar-day.calendar-day-active.calendar-day-adjacent-day {
|
|
613
|
-
background: var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff));
|
|
742
|
+
background: var(--token-bg-primary-subtle-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff)));
|
|
614
743
|
}
|
|
615
744
|
|
|
616
745
|
.calendar-day:focus-visible {
|
|
@@ -618,7 +747,7 @@
|
|
|
618
747
|
}
|
|
619
748
|
|
|
620
749
|
@media (any-hover: hover) {
|
|
621
|
-
.calendar-day:not([disabled]):not(:active):hover {
|
|
750
|
+
.calendar-day:not([disabled]):not(:active):not(.calendar-day-in-range):hover {
|
|
622
751
|
background: var(--token-semantics-primary-200, var(--token-primitives-blue-200, #e4e8ff));
|
|
623
752
|
}
|
|
624
753
|
}
|
|
@@ -635,6 +764,83 @@
|
|
|
635
764
|
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
636
765
|
}
|
|
637
766
|
|
|
767
|
+
:host {
|
|
768
|
+
--range-background: var(--token-bg-primary-subtle-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff)));
|
|
769
|
+
--range-track-height: var(--token-scale-1200, 48px);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
:host .calendar-day.calendar-day-range-start,
|
|
773
|
+
:host .calendar-day.calendar-day-range-end {
|
|
774
|
+
border-radius: var(--token-border-radius-full, 999px);
|
|
775
|
+
background: var(--token-bg-primary-base-default, var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef))));
|
|
776
|
+
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
.calendar-day.calendar-day-in-range {
|
|
780
|
+
border-radius: 0;
|
|
781
|
+
background: none;
|
|
782
|
+
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.calendar-day.calendar-day-today.calendar-day-in-range {
|
|
786
|
+
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
:host .calendar-day.calendar-day-today.calendar-day-range-start,
|
|
790
|
+
:host .calendar-day.calendar-day-today.calendar-day-range-end {
|
|
791
|
+
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
@media (any-hover: hover) {
|
|
795
|
+
.calendar-day.calendar-day-range-start:not([disabled]):not(:active):hover,
|
|
796
|
+
.calendar-day.calendar-day-range-end:not([disabled]):not(:active):hover {
|
|
797
|
+
background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
.calendar-day.calendar-day-range-start:active,
|
|
801
|
+
.calendar-day.calendar-day-range-end:active {
|
|
802
|
+
background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.calendar-day.calendar-day-in-range:active {
|
|
806
|
+
background: var(--token-bg-primary-subtle-press, var(--token-semantics-primary-300, var(--token-primitives-blue-300, #d0d7fa)));
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
:host(.datetime-disabled.datetime-range) .calendar-day[disabled]:not(.calendar-day-constrained) {
|
|
810
|
+
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-adjacent-day[disabled] {
|
|
814
|
+
color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a));
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-today[disabled] {
|
|
818
|
+
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-start[disabled],
|
|
822
|
+
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-end[disabled] {
|
|
823
|
+
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
:host(.datetime-readonly) .calendar-day.calendar-day-range-start[disabled],
|
|
827
|
+
:host(.datetime-readonly) .calendar-day.calendar-day-range-end[disabled] {
|
|
828
|
+
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
:host(.datetime-readonly) .calendar-day.calendar-day-in-range[disabled] {
|
|
832
|
+
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-in-range[disabled] {
|
|
836
|
+
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-start[disabled],
|
|
840
|
+
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-end[disabled] {
|
|
841
|
+
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
842
|
+
}
|
|
843
|
+
|
|
638
844
|
:host .datetime-time {
|
|
639
845
|
-webkit-padding-start: var(--token-space-400, var(--token-scale-400, 16px));
|
|
640
846
|
padding-inline-start: var(--token-space-400, var(--token-scale-400, 16px));
|
|
@@ -349,11 +349,140 @@
|
|
|
349
349
|
|
|
350
350
|
:host .calendar-day-wrapper {
|
|
351
351
|
display: flex;
|
|
352
|
+
position: relative;
|
|
352
353
|
align-items: center;
|
|
353
354
|
justify-content: center;
|
|
354
355
|
min-width: 0;
|
|
355
356
|
min-height: 0;
|
|
356
357
|
overflow: visible;
|
|
358
|
+
/**
|
|
359
|
+
* Create a stacking context so the range track
|
|
360
|
+
* (::before with z-index: -1) stays behind the
|
|
361
|
+
* day button but above the host background.
|
|
362
|
+
*/
|
|
363
|
+
z-index: 0;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The focus ring can extend past the cell, so lift the focused day
|
|
368
|
+
* above the following days, whose range track would otherwise cover it.
|
|
369
|
+
*/
|
|
370
|
+
:host .calendar-day-wrapper:focus-within {
|
|
371
|
+
z-index: 1;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Keep the range announcement available to screen readers
|
|
376
|
+
* without showing it or covering the calendar.
|
|
377
|
+
*/
|
|
378
|
+
.datetime-range-announcement {
|
|
379
|
+
-webkit-margin-start: -1px;
|
|
380
|
+
margin-inline-start: -1px;
|
|
381
|
+
-webkit-margin-end: -1px;
|
|
382
|
+
margin-inline-end: -1px;
|
|
383
|
+
margin-top: -1px;
|
|
384
|
+
margin-bottom: -1px;
|
|
385
|
+
padding-left: 0;
|
|
386
|
+
padding-right: 0;
|
|
387
|
+
padding-top: 0;
|
|
388
|
+
padding-bottom: 0;
|
|
389
|
+
position: absolute;
|
|
390
|
+
width: 1px;
|
|
391
|
+
height: 1px;
|
|
392
|
+
border: 0;
|
|
393
|
+
white-space: nowrap;
|
|
394
|
+
overflow: hidden;
|
|
395
|
+
clip: rect(0, 0, 0, 0);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Each day in the range draws its own piece of the track with a
|
|
400
|
+
* ::before. In-range days fill the cell, while the start and end
|
|
401
|
+
* caps cover the half between the pill center and the next day.
|
|
402
|
+
*
|
|
403
|
+
* Grid columns are `1fr`, so cell edges land on fractional pixels
|
|
404
|
+
* and a cell's track can fall a hairline short of its neighbor's.
|
|
405
|
+
* Each day therefore extends 1px toward the next day in the range,
|
|
406
|
+
* which the next day paints over except inside such a gap.
|
|
407
|
+
*
|
|
408
|
+
* @prop --range-background: The background color of the range selection track.
|
|
409
|
+
*/
|
|
410
|
+
:host .calendar-day-wrapper-in-range::before,
|
|
411
|
+
:host .calendar-day-wrapper-range-start::before,
|
|
412
|
+
:host .calendar-day-wrapper-range-end::before {
|
|
413
|
+
position: absolute;
|
|
414
|
+
top: 50%;
|
|
415
|
+
inset-inline-start: 0;
|
|
416
|
+
inset-inline-end: 0;
|
|
417
|
+
height: var(--range-track-height);
|
|
418
|
+
transform: translateY(-50%);
|
|
419
|
+
/**
|
|
420
|
+
* `--range-background` is translucent by default, so it is layered
|
|
421
|
+
* over the datetime background to paint an opaque track. Where two
|
|
422
|
+
* days overlap, the color stays the same instead of doubling up
|
|
423
|
+
* into a darker line.
|
|
424
|
+
*/
|
|
425
|
+
background: linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));
|
|
426
|
+
content: "";
|
|
427
|
+
z-index: -1;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
:host .calendar-day-wrapper-range-start::before {
|
|
431
|
+
inset-inline-start: 50%;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
:host .calendar-day-wrapper-range-end::before {
|
|
435
|
+
inset-inline-end: 50%;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Only extend toward a day that draws the track as well. The last
|
|
440
|
+
* day of a week is followed by the next row, and the next day is
|
|
441
|
+
* unpainted when it ends the selection or is disabled inside the
|
|
442
|
+
* range, so extending there would leave a 1px nub.
|
|
443
|
+
*/
|
|
444
|
+
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
445
|
+
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before,
|
|
446
|
+
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
447
|
+
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before {
|
|
448
|
+
inset-inline-end: -1px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A range that continues onto the next week runs the track
|
|
453
|
+
* through the grid padding to the edge of the calendar.
|
|
454
|
+
*/
|
|
455
|
+
:host .calendar-day-wrapper-in-range:nth-child(7n)::before,
|
|
456
|
+
:host .calendar-day-wrapper-range-start:nth-child(7n)::before {
|
|
457
|
+
inset-inline-end: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,
|
|
461
|
+
:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before {
|
|
462
|
+
inset-inline-start: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* When a single day is both the start and end of the range,
|
|
467
|
+
* do not show a track since there is nothing to connect.
|
|
468
|
+
*/
|
|
469
|
+
:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before {
|
|
470
|
+
display: none;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* When the component is disabled, fade the whole grid once instead of
|
|
475
|
+
* fading each day. Fading a day makes it its own compositing group, so
|
|
476
|
+
* the 1px that each day extends toward the next would be painted twice
|
|
477
|
+
* and read as a darker seam. The day buttons drop their own disabled
|
|
478
|
+
* opacity so the grid is the only thing applying it.
|
|
479
|
+
*/
|
|
480
|
+
:host(.datetime-disabled.datetime-range) .calendar-month-grid {
|
|
481
|
+
opacity: 0.4;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
:host(.datetime-disabled.datetime-range) .calendar-month-grid .calendar-day[disabled] {
|
|
485
|
+
opacity: 1;
|
|
357
486
|
}
|
|
358
487
|
|
|
359
488
|
/**
|
|
@@ -1035,6 +1164,41 @@ ion-picker {
|
|
|
1035
1164
|
color: var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));
|
|
1036
1165
|
}
|
|
1037
1166
|
|
|
1167
|
+
:host {
|
|
1168
|
+
--range-background: rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.12);
|
|
1169
|
+
--range-track-height: 40px;
|
|
1170
|
+
--range-track-edge-overflow: 8px;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
:host(.ion-color) {
|
|
1174
|
+
--range-background: rgba(var(--ion-color-base-rgb), 0.12);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* The wrapper has `height: 0`, which makes `top: 50%` on the range
|
|
1179
|
+
* track resolve to 0 and pins the track to the top of the cell.
|
|
1180
|
+
* Override to `auto` so the track stays vertically centered. Apply
|
|
1181
|
+
* it to every wrapper in range mode so range rows are not taller
|
|
1182
|
+
* than the other rows.
|
|
1183
|
+
*/
|
|
1184
|
+
:host(.datetime-range) .calendar-day-wrapper {
|
|
1185
|
+
height: auto;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
:host .calendar-day.calendar-day-range-start,
|
|
1189
|
+
:host .calendar-day.calendar-day-range-end {
|
|
1190
|
+
border-radius: 50%;
|
|
1191
|
+
background: var(--ion-color-primary, #0054e9);
|
|
1192
|
+
color: var(--ion-color-primary-contrast, #fff);
|
|
1193
|
+
font-weight: 600;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
:host(.ion-color) .calendar-day.calendar-day-range-start,
|
|
1197
|
+
:host(.ion-color) .calendar-day.calendar-day-range-end {
|
|
1198
|
+
background: var(--ion-color-base);
|
|
1199
|
+
color: var(--ion-color-contrast);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1038
1202
|
:host .datetime-time {
|
|
1039
1203
|
-webkit-padding-start: 16px;
|
|
1040
1204
|
padding-inline-start: 16px;
|