@slotted/styles 0.1.0-beta.39 → 0.1.0-beta.40
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/package.json +5 -1
- package/src/aspect-ratio/aspect-ratio.css +15 -14
- package/src/badge/badge.css +3 -0
- package/src/calendar/calendar.css +210 -171
- package/src/calendar/calendar.tokens.json +17 -2
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/date-picker/date-picker.css +5 -302
- package/src/date-picker/date-picker.tokens.json +1 -26
- package/src/date-range-picker/date-range-picker.css +4 -490
- package/src/date-range-picker/date-range-picker.tokens.json +1 -41
- package/src/datetime-picker/datetime-picker.css +23 -738
- package/src/datetime-picker/datetime-picker.tokens.json +1 -53
- package/src/datetime-range-picker/datetime-range-picker.css +6 -959
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -71
- package/src/grid/grid.css +3 -2
- package/src/inline/inline.css +1 -1
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/progress-indicator/progress-indicator.css +3 -2
- package/src/skeleton/skeleton.css +19 -0
- package/src/stack/stack.css +1 -1
- package/src/time-picker/time-picker.css +4 -545
- package/src/time-picker/time-picker.tokens.json +1 -41
- package/src/time-range-picker/time-range-picker.css +5 -875
- package/src/time-range-picker/time-range-picker.tokens.json +1 -70
- package/src/tree/tree.css +5 -1
|
@@ -1,43 +1,23 @@
|
|
|
1
1
|
@layer slotted.components {
|
|
2
2
|
/**
|
|
3
|
-
* ── A one-line frame, and
|
|
3
|
+
* ── A one-line frame, and the months of a run behind it ────────────────
|
|
4
4
|
*
|
|
5
5
|
* ┌─ root ──────────────────────────────────────────────────────────────┐
|
|
6
6
|
* │ ┌─ control ── the frame ─────────────────────────────────────────┐ │
|
|
7
7
|
* │ │ ┌ trigger ──────────────────────────────────────────────────┐ │ │
|
|
8
|
-
* │ │ │ summary: 12
|
|
8
|
+
* │ │ │ summary: 12 Sep, 14:00 – 14 Sep, 11:00 ┌ clear ┐ month │ │ │
|
|
9
9
|
* │ │ └───────────────────────────────────────────┴───────┴───────┘ │ │
|
|
10
10
|
* │ └────────────────────────────────────────────────────────────────┘ │
|
|
11
11
|
* └─────────────────────────────────────────────────────────────────────┘
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* │ │ head: tabs [ PICKUP · 12 Sep, 14:00 ] [ RETURN · — ] │ │
|
|
15
|
-
* │ │ field [datetime-field] now │ │
|
|
16
|
-
* │ │ hint Choose the return day length · limit │ │
|
|
17
|
-
* │ │ presets: chip chip chip │ │
|
|
18
|
-
* │ │ panel (the current end): date-panel │ list │ │
|
|
19
|
-
* │ │ footer done │ │
|
|
20
|
-
* │ └─────────────────────────────────────────────────────┘ │
|
|
21
|
-
* └───────────────────────────────────────────────────────────┘
|
|
22
|
-
*
|
|
23
|
-
* The field and the calendar inside keep their own `data-ui`. Nothing here
|
|
24
|
-
* selects a segment or a day: this stylesheet owns the frame, the layer,
|
|
25
|
-
* the band the field stands in, and the list beside the calendar.
|
|
12
|
+
* the panel is `picker-panel`'s, the months in it `calendar`'s, the
|
|
13
|
+
* hours `clock`'s and the ends typed in it `datetime-field`'s
|
|
26
14
|
*
|
|
27
15
|
* **The frame is one line at any width.** Two segmented fields stood in it
|
|
28
16
|
* first — the shape `date-range-picker` has — and were withdrawn at the
|
|
29
17
|
* visual gate: a segment cannot shrink, and two fields broke the frame into
|
|
30
18
|
* two lines in any form column narrower than they are, against the height
|
|
31
|
-
* every control shares. The frame keeps the value in words
|
|
32
|
-
*
|
|
33
|
-
* **The band speaks to the field through its tokens and never through its
|
|
34
|
-
* parts** — the rule `date-range-picker` records.
|
|
35
|
-
*
|
|
36
|
-
* **One end at a time.** Two lists side by side, under two fields, were
|
|
37
|
-
* refused at the release gate as too much interface at once for a lay
|
|
38
|
-
* reader and for a phone. The tab says which end, the panel shows only
|
|
39
|
-
* that end, and choosing one end moves to the other — the end list
|
|
40
|
-
* appears already striking what the chosen start refuses.
|
|
19
|
+
* every control shares. The frame keeps the value in words, and the fields
|
|
20
|
+
* live in the head of the panel.
|
|
41
21
|
*/
|
|
42
22
|
[data-ui-datetime-range-picker][data-part-root] {
|
|
43
23
|
display: block;
|
|
@@ -467,937 +447,4 @@
|
|
|
467
447
|
> [data-ui-icon] {
|
|
468
448
|
color: var(--slotted-disabled-foreground);
|
|
469
449
|
}
|
|
470
|
-
|
|
471
|
-
/* ── The layer ────────────────────────────────────────────────────────
|
|
472
|
-
*
|
|
473
|
-
* What `packages/core/src/positioner` writes `position`, `left` and `top`
|
|
474
|
-
* onto. The painted surface is one element in, as every overlay is built.
|
|
475
|
-
*/
|
|
476
|
-
[data-ui-datetime-range-picker][data-part-positioner] {
|
|
477
|
-
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
478
|
-
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
479
|
-
document and win over the measured value. */
|
|
480
|
-
position: absolute;
|
|
481
|
-
inset-block-start: 0;
|
|
482
|
-
|
|
483
|
-
box-sizing: border-box;
|
|
484
|
-
isolation: isolate;
|
|
485
|
-
pointer-events: none;
|
|
486
|
-
z-index: calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));
|
|
487
|
-
|
|
488
|
-
/* The layer arrives along the axis it opens on and never along the inline
|
|
489
|
-
one, which is the rule `select` records. */
|
|
490
|
-
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
491
|
-
opacity: 0;
|
|
492
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
493
|
-
transition:
|
|
494
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
495
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-side='top'] {
|
|
499
|
-
translate: 0 var(--_enter-distance);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
[data-ui-datetime-range-picker][data-part-positioner]:is(
|
|
503
|
-
[data-side='left'],
|
|
504
|
-
[data-side='right']
|
|
505
|
-
) {
|
|
506
|
-
translate: 0 0;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open] {
|
|
510
|
-
opacity: 1;
|
|
511
|
-
translate: 0 0;
|
|
512
|
-
transition: none;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/* The entrance is a keyframe animation and not a transition, for the reason
|
|
516
|
-
`select` records: only a layer the positioner placed arrives. */
|
|
517
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned] {
|
|
518
|
-
animation: slotted-datetime-range-picker-enter-down var(--slotted-duration-medium)
|
|
519
|
-
var(--slotted-easing-enter);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
523
|
-
animation-name: slotted-datetime-range-picker-enter-up;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned]:is(
|
|
527
|
-
[data-side='left'],
|
|
528
|
-
[data-side='right']
|
|
529
|
-
) {
|
|
530
|
-
animation-name: slotted-datetime-range-picker-fade;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
@keyframes slotted-datetime-range-picker-enter-down {
|
|
534
|
-
from {
|
|
535
|
-
opacity: 0;
|
|
536
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
@keyframes slotted-datetime-range-picker-enter-up {
|
|
541
|
-
from {
|
|
542
|
-
opacity: 0;
|
|
543
|
-
translate: 0 var(--_enter-distance);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
@keyframes slotted-datetime-range-picker-fade {
|
|
548
|
-
from {
|
|
549
|
-
opacity: 0;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
/* Stillness keeps the fade and drops the movement. */
|
|
554
|
-
@media (prefers-reduced-motion: reduce) {
|
|
555
|
-
[data-ui-datetime-range-picker][data-part-positioner],
|
|
556
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-side='top'],
|
|
557
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-side='left'],
|
|
558
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-side='right'] {
|
|
559
|
-
translate: 0 0;
|
|
560
|
-
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned],
|
|
564
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
565
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
566
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
567
|
-
animation-name: slotted-datetime-range-picker-fade;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/* The anchor scrolled out of its own clipper. */
|
|
572
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-detached] {
|
|
573
|
-
visibility: hidden;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* The surface. It is sized by the calendar and the list inside it rather
|
|
578
|
-
* than by the control it hangs from, and it is a grid of one
|
|
579
|
-
* `minmax(0, 1fr)` track for the reason `date-range-picker` records: an
|
|
580
|
-
* `auto` track takes the calendar's own width as its floor, and the cap
|
|
581
|
-
* below would then cap a box the track had already overflowed.
|
|
582
|
-
*/
|
|
583
|
-
[data-ui-datetime-range-picker] [data-part-content] {
|
|
584
|
-
background-color: var(
|
|
585
|
-
--slotted-datetime-range-picker-surface,
|
|
586
|
-
var(--slotted-surface-raised, Canvas)
|
|
587
|
-
);
|
|
588
|
-
border: var(--slotted-border-width-thin, 1px) solid
|
|
589
|
-
var(
|
|
590
|
-
--slotted-datetime-range-picker-content-border-color,
|
|
591
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
592
|
-
);
|
|
593
|
-
border-radius: var(
|
|
594
|
-
--slotted-datetime-range-picker-content-radius,
|
|
595
|
-
var(--slotted-radius-lg, 8px)
|
|
596
|
-
);
|
|
597
|
-
box-shadow: var(--slotted-datetime-range-picker-content-shadow, var(--slotted-shadow-md));
|
|
598
|
-
box-sizing: border-box;
|
|
599
|
-
color: var(--slotted-datetime-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
600
|
-
/* The type of the surface follows density with the control scale, as the
|
|
601
|
-
calendar's does: a list at the page's size beside a grid at the
|
|
602
|
-
control's read as two sizes in dense. */
|
|
603
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
604
|
-
font-size: var(--slotted-control-font-size-md, 13px);
|
|
605
|
-
/**
|
|
606
|
-
* One row's height, stated once, because the list's cap is counted in
|
|
607
|
-
* rows — eight and a half of them at every density, the arithmetic
|
|
608
|
-
* `time-picker` records. The pitch is the row plus the air under it.
|
|
609
|
-
*/
|
|
610
|
-
--_row: max(var(--slotted-target-min, 24px), var(--slotted-control-height-sm, 30px));
|
|
611
|
-
--_row-pitch: calc(var(--_row) + var(--slotted-space-1, 0.125rem));
|
|
612
|
-
|
|
613
|
-
display: grid;
|
|
614
|
-
/* The bands breathe by the step the dialogs of the date chain use: a
|
|
615
|
-
surface holding a field and a list is a dialog, not a menu. */
|
|
616
|
-
gap: var(--slotted-space-5, 0.75rem);
|
|
617
|
-
grid-template-areas: 'head' 'presets' 'panel' 'footer';
|
|
618
|
-
grid-template-columns: minmax(0, 1fr);
|
|
619
|
-
/* Capped by the room the positioner measured, so the list drops under a
|
|
620
|
-
calendar it does not fit beside instead of running past the edge of
|
|
621
|
-
the screen; and by thirty rems before that, because a surface that
|
|
622
|
-
shrink-wraps a list takes its widest row, and a column of times reads
|
|
623
|
-
at half of that. */
|
|
624
|
-
max-inline-size: min(
|
|
625
|
-
var(--slotted-positioner-available-width, 100vw),
|
|
626
|
-
var(--slotted-datetime-range-picker-content-max-inline-size, 30rem)
|
|
627
|
-
);
|
|
628
|
-
padding: var(--slotted-datetime-range-picker-content-padding, var(--slotted-space-5, 0.75rem));
|
|
629
|
-
/* The layer above gave up the pointer; the surface takes it back. */
|
|
630
|
-
pointer-events: auto;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
/* ── The band ─────────────────────────────────────────────────────────
|
|
634
|
-
*
|
|
635
|
-
* Three rows: which end is being chosen, where the reader types it, and
|
|
636
|
-
* what to do next. It renders at the panel's width and contributes nothing
|
|
637
|
-
* to it, by the pair `datetime-picker` records.
|
|
638
|
-
*/
|
|
639
|
-
[data-ui-datetime-range-picker] [data-part-head] {
|
|
640
|
-
box-sizing: border-box;
|
|
641
|
-
inline-size: 0;
|
|
642
|
-
min-inline-size: 100%;
|
|
643
|
-
|
|
644
|
-
/* A grid, so the field and now, and the hint and the length, share a
|
|
645
|
-
row without a wrapper the anatomy would have to name. */
|
|
646
|
-
column-gap: var(--slotted-space-2, 0.25rem);
|
|
647
|
-
display: grid;
|
|
648
|
-
grid-area: head;
|
|
649
|
-
grid-template-areas: 'tabs tabs' 'field now' 'hint length' 'limit limit';
|
|
650
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
651
|
-
row-gap: var(--slotted-space-2, 0.25rem);
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
[data-ui-datetime-range-picker] [data-part-tabs] {
|
|
655
|
-
grid-area: tabs;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
[data-ui-datetime-range-picker] [data-part-field] {
|
|
659
|
-
grid-area: field;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
[data-ui-datetime-range-picker] [data-part-head] > [data-part-now] {
|
|
663
|
-
align-self: center;
|
|
664
|
-
grid-area: now;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
[data-ui-datetime-range-picker] [data-part-hint] {
|
|
668
|
-
align-self: center;
|
|
669
|
-
grid-area: hint;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
[data-ui-datetime-range-picker] [data-part-length] {
|
|
673
|
-
align-self: center;
|
|
674
|
-
grid-area: length;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
[data-ui-datetime-range-picker] [data-part-limit] {
|
|
678
|
-
grid-area: limit;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/* ── The two ends, as tabs ────────────────────────────────────────────
|
|
682
|
-
*
|
|
683
|
-
* One end at a time. Two equal halves, the label over the value; the
|
|
684
|
-
* current one carries the underline `date-range-picker` draws under its
|
|
685
|
-
* current field, in the accent, and the other reads as the step to come.
|
|
686
|
-
* The row is the whole width so the two are the same size whatever their
|
|
687
|
-
* values, and a thumb finds them without aiming.
|
|
688
|
-
*/
|
|
689
|
-
[data-ui-datetime-range-picker] [data-part-tabs] {
|
|
690
|
-
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
691
|
-
var(
|
|
692
|
-
--slotted-datetime-range-picker-content-border-color,
|
|
693
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
694
|
-
);
|
|
695
|
-
display: grid;
|
|
696
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
697
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
[data-ui-datetime-range-picker] [data-part-tab] {
|
|
701
|
-
appearance: none;
|
|
702
|
-
background-color: transparent;
|
|
703
|
-
border: 0;
|
|
704
|
-
border-start-end-radius: var(
|
|
705
|
-
--slotted-datetime-range-picker-option-radius,
|
|
706
|
-
var(--slotted-radius-sm, 4px)
|
|
707
|
-
);
|
|
708
|
-
border-start-start-radius: var(
|
|
709
|
-
--slotted-datetime-range-picker-option-radius,
|
|
710
|
-
var(--slotted-radius-sm, 4px)
|
|
711
|
-
);
|
|
712
|
-
color: var(--slotted-datetime-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
713
|
-
cursor: pointer;
|
|
714
|
-
display: flex;
|
|
715
|
-
flex-direction: column;
|
|
716
|
-
font: inherit;
|
|
717
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
718
|
-
min-block-size: var(--slotted-datetime-range-picker-tab-block-size, calc(var(--_row) * 1.5));
|
|
719
|
-
min-inline-size: 0;
|
|
720
|
-
padding-block: var(--slotted-space-2, 0.25rem) var(--slotted-space-3, 0.375rem);
|
|
721
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
722
|
-
position: relative;
|
|
723
|
-
text-align: start;
|
|
724
|
-
touch-action: manipulation;
|
|
725
|
-
transition: background-color var(--slotted-control-transition-duration)
|
|
726
|
-
var(--slotted-control-transition-easing);
|
|
727
|
-
-webkit-tap-highlight-color: transparent;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
[data-ui-datetime-range-picker] [data-part-tab]::after {
|
|
731
|
-
background-color: var(
|
|
732
|
-
--slotted-datetime-range-picker-current-color,
|
|
733
|
-
var(--slotted-tone-accent-solid)
|
|
734
|
-
);
|
|
735
|
-
block-size: var(--slotted-datetime-range-picker-current-size, 2px);
|
|
736
|
-
border-start-end-radius: var(--slotted-radius-xs, 2px);
|
|
737
|
-
border-start-start-radius: var(--slotted-radius-xs, 2px);
|
|
738
|
-
content: '';
|
|
739
|
-
/* Over the row's own hairline, so the current tab's mark and the rule
|
|
740
|
-
are one line. */
|
|
741
|
-
inset-block-end: calc(-1 * var(--slotted-border-width-thin, 1px));
|
|
742
|
-
inset-inline: 0;
|
|
743
|
-
opacity: 0;
|
|
744
|
-
position: absolute;
|
|
745
|
-
transition: opacity var(--slotted-control-transition-duration)
|
|
746
|
-
var(--slotted-control-transition-easing);
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
[data-ui-datetime-range-picker] [data-part-tab][data-current]::after {
|
|
750
|
-
opacity: 1;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
[data-ui-datetime-range-picker] [data-part-tab]:hover:not(:disabled):not([data-current]) {
|
|
754
|
-
background-color: var(
|
|
755
|
-
--slotted-datetime-range-picker-option-hover-background,
|
|
756
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
757
|
-
);
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
[data-ui-datetime-range-picker] [data-part-tab]:focus-visible {
|
|
761
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
762
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
[data-ui-datetime-range-picker] [data-part-tab]:disabled {
|
|
766
|
-
color: var(--slotted-disabled-foreground);
|
|
767
|
-
cursor: not-allowed;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/* The label, in the muted ink for both ends alike: which end is current
|
|
771
|
-
is said once, by the underline. */
|
|
772
|
-
[data-ui-datetime-range-picker] [data-part-tab-label] {
|
|
773
|
-
color: var(--slotted-datetime-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
774
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
775
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
776
|
-
letter-spacing: var(--slotted-letter-spacing-wide, 0.02em);
|
|
777
|
-
text-transform: uppercase;
|
|
778
|
-
white-space: nowrap;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
[data-ui-datetime-range-picker] [data-part-tab-value] {
|
|
782
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
783
|
-
font-variant-numeric: tabular-nums;
|
|
784
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
785
|
-
overflow: hidden;
|
|
786
|
-
text-overflow: ellipsis;
|
|
787
|
-
unicode-bidi: plaintext;
|
|
788
|
-
white-space: nowrap;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
[data-ui-datetime-range-picker] [data-part-tab][data-placeholder] [data-part-tab-value] {
|
|
792
|
-
color: var(--slotted-datetime-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
793
|
-
font-weight: var(--slotted-font-weight-regular, 400);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
/* ── The field row ────────────────────────────────────────────────────
|
|
797
|
-
*
|
|
798
|
-
* The current end's field in `plain`, spoken to in the only language this
|
|
799
|
-
* stylesheet is allowed: the tokens the field reads. Its border, inline
|
|
800
|
-
* padding, hover wash, invalid edge and lift are zeroed; its own focus ring
|
|
801
|
-
* stays, because in the band the field is the control the reader is in.
|
|
802
|
-
* `now` sits at the reading end of the same row. On a coarse pointer the
|
|
803
|
-
* row is `now` alone: a segment is a spinbutton and raises no keyboard.
|
|
804
|
-
*/
|
|
805
|
-
[data-ui-datetime-range-picker] [data-part-field] {
|
|
806
|
-
--slotted-control-border-width: 0px;
|
|
807
|
-
--slotted-control-padding-inline-sm: var(--slotted-space-2, 0.25rem);
|
|
808
|
-
--slotted-control-padding-inline-md: var(--slotted-space-2, 0.25rem);
|
|
809
|
-
--slotted-control-padding-inline-lg: var(--slotted-space-2, 0.25rem);
|
|
810
|
-
--slotted-datetime-field-plain-hover-background: transparent;
|
|
811
|
-
--slotted-datetime-field-invalid-border-color: transparent;
|
|
812
|
-
--slotted-datetime-field-shadow: none;
|
|
813
|
-
--slotted-control-shadow-focus-geometry: 0 0 0 0;
|
|
814
|
-
|
|
815
|
-
display: flex;
|
|
816
|
-
flex: 0 1 auto;
|
|
817
|
-
min-inline-size: 0;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/* ── What to do next ──────────────────────────────────────────────────
|
|
821
|
-
*
|
|
822
|
-
* The hint at the start, the duration at the reading end; the limit on a
|
|
823
|
-
* line of its own under them. The hint is the difference between a panel
|
|
824
|
-
* that refuses and a panel that explains.
|
|
825
|
-
*/
|
|
826
|
-
[data-ui-datetime-range-picker] [data-part-hint] {
|
|
827
|
-
color: var(--slotted-datetime-range-picker-hint-color, var(--slotted-text-muted, GrayText));
|
|
828
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
829
|
-
min-inline-size: 0;
|
|
830
|
-
padding-inline-start: var(--slotted-space-2, 0.25rem);
|
|
831
|
-
text-wrap: balance;
|
|
832
|
-
unicode-bidi: plaintext;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
[data-ui-datetime-range-picker] [data-part-hint][data-invalid] {
|
|
836
|
-
color: var(--slotted-datetime-range-picker-invalid-color, var(--slotted-tone-danger-text));
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
/* The duration, at the reading end, in the accent's text tone: it is the
|
|
840
|
-
number the band exists to say. Pending, it drops a step of weight. */
|
|
841
|
-
[data-ui-datetime-range-picker] [data-part-length] {
|
|
842
|
-
color: var(--slotted-datetime-range-picker-length-color, var(--slotted-tone-accent-text));
|
|
843
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
844
|
-
font-variant-numeric: tabular-nums;
|
|
845
|
-
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
846
|
-
padding-inline: var(--slotted-space-4, 0.5rem) var(--slotted-space-2, 0.25rem);
|
|
847
|
-
unicode-bidi: plaintext;
|
|
848
|
-
white-space: nowrap;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
[data-ui-datetime-range-picker] [data-part-length][data-pending] {
|
|
852
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
/* An empty length still holds its line, so the band does not grow a row
|
|
856
|
-
when the first end is chosen. */
|
|
857
|
-
[data-ui-datetime-range-picker] [data-part-length]:empty::before {
|
|
858
|
-
content: '\200B';
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
[data-ui-datetime-range-picker] [data-part-limit] {
|
|
862
|
-
color: var(--slotted-datetime-range-picker-limit-color, var(--slotted-text-muted, GrayText));
|
|
863
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
864
|
-
padding-inline-start: var(--slotted-space-2, 0.25rem);
|
|
865
|
-
unicode-bidi: plaintext;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
/* ── The panel ────────────────────────────────────────────────────────
|
|
869
|
-
*
|
|
870
|
-
* The current end, one at a time: the calendar in range mode with both
|
|
871
|
-
* dates drawn, and the list of that end beside it, running on its day.
|
|
872
|
-
* `data-position` says which. Two items in a wrapping row: the list drops
|
|
873
|
-
* under the grid when the row cannot hold the grid and a list of nine rems
|
|
874
|
-
* — with one list there is nothing to keep together, so the row wraps by
|
|
875
|
-
* itself and no break in rems is needed; a break in rems broke the row in
|
|
876
|
-
* dense, where the grid is narrower and both fit. Half a step on every
|
|
877
|
-
* item and the same half taken back on the row, in place of `gap`, the
|
|
878
|
-
* habit of the date chain.
|
|
879
|
-
*/
|
|
880
|
-
[data-ui-datetime-range-picker] [data-part-panel] {
|
|
881
|
-
--_panel-gap: calc(var(--slotted-space-4, 0.5rem) / 2);
|
|
882
|
-
|
|
883
|
-
align-items: stretch;
|
|
884
|
-
display: flex;
|
|
885
|
-
flex-wrap: wrap;
|
|
886
|
-
grid-area: panel;
|
|
887
|
-
margin: calc(-1 * var(--_panel-gap));
|
|
888
|
-
min-inline-size: 0;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
[data-ui-datetime-range-picker] [data-part-panel] > * {
|
|
892
|
-
margin: var(--_panel-gap);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
/* The calendar keeps its own width and wraps its second month under the
|
|
896
|
-
first when the surface is narrow, which is its own container rule. */
|
|
897
|
-
[data-ui-datetime-range-picker] [data-part-date-panel] {
|
|
898
|
-
flex: 0 1 auto;
|
|
899
|
-
min-inline-size: 0;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
[data-ui-datetime-range-picker] [data-part-panel] > [data-part-list],
|
|
903
|
-
[data-ui-datetime-range-picker] [data-part-panel] > [data-part-empty] {
|
|
904
|
-
flex: 1 1 var(--slotted-datetime-range-picker-list-min-inline-size, 9rem);
|
|
905
|
-
min-inline-size: var(--slotted-datetime-range-picker-list-min-inline-size, 9rem);
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/* A hairline between the grid and the list while they share a row. */
|
|
909
|
-
[data-ui-datetime-range-picker] [data-part-date-panel] + [data-part-list],
|
|
910
|
-
[data-ui-datetime-range-picker] [data-part-date-panel] + [data-part-empty] {
|
|
911
|
-
border-inline-start: var(--slotted-border-width-thin, 1px) solid
|
|
912
|
-
var(
|
|
913
|
-
--slotted-datetime-range-picker-content-border-color,
|
|
914
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
915
|
-
);
|
|
916
|
-
padding-inline-start: var(--slotted-space-4, 0.5rem);
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
[data-ui-datetime-range-picker] [data-part-now] {
|
|
920
|
-
appearance: none;
|
|
921
|
-
background-color: transparent;
|
|
922
|
-
border: 0;
|
|
923
|
-
border-radius: var(
|
|
924
|
-
--slotted-datetime-range-picker-option-radius,
|
|
925
|
-
var(--slotted-radius-sm, 4px)
|
|
926
|
-
);
|
|
927
|
-
color: var(--slotted-datetime-range-picker-now-color, var(--slotted-tone-accent-text));
|
|
928
|
-
cursor: pointer;
|
|
929
|
-
flex: 0 0 auto;
|
|
930
|
-
font: inherit;
|
|
931
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
932
|
-
min-block-size: var(--_row);
|
|
933
|
-
padding-block: var(--slotted-space-1, 0.125rem);
|
|
934
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
935
|
-
touch-action: manipulation;
|
|
936
|
-
transition: background-color var(--slotted-control-transition-duration)
|
|
937
|
-
var(--slotted-control-transition-easing);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
[data-ui-datetime-range-picker] [data-part-now]:hover:not(:disabled):not([data-disabled]) {
|
|
941
|
-
background-color: var(
|
|
942
|
-
--slotted-datetime-range-picker-option-hover-background,
|
|
943
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
944
|
-
);
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
[data-ui-datetime-range-picker] [data-part-now]:focus-visible {
|
|
948
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
949
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
[data-ui-datetime-range-picker] [data-part-now]:disabled {
|
|
953
|
-
color: var(--slotted-disabled-foreground);
|
|
954
|
-
cursor: not-allowed;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
/* ── The shortcuts ────────────────────────────────────────────────────
|
|
958
|
-
*
|
|
959
|
-
* This family ships no list of them: "the morning shift" is a business
|
|
960
|
-
* clock. It ships the row they stand in and the chip each one is, between
|
|
961
|
-
* the band and the panel, wrapping when they do not fit.
|
|
962
|
-
*/
|
|
963
|
-
[data-ui-datetime-range-picker] [data-part-presets] {
|
|
964
|
-
display: flex;
|
|
965
|
-
flex-wrap: wrap;
|
|
966
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
967
|
-
grid-area: presets;
|
|
968
|
-
min-inline-size: 0;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
[data-ui-datetime-range-picker] [data-part-preset] {
|
|
972
|
-
appearance: none;
|
|
973
|
-
background-color: var(
|
|
974
|
-
--slotted-datetime-range-picker-preset-background,
|
|
975
|
-
var(--slotted-tone-secondary-subtle)
|
|
976
|
-
);
|
|
977
|
-
border: 0;
|
|
978
|
-
border-radius: var(
|
|
979
|
-
--slotted-datetime-range-picker-preset-radius,
|
|
980
|
-
var(--slotted-radius-pill, 999px)
|
|
981
|
-
);
|
|
982
|
-
color: var(--slotted-datetime-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
983
|
-
cursor: pointer;
|
|
984
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
985
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
986
|
-
line-height: var(--slotted-line-height-sm, 1.4);
|
|
987
|
-
min-block-size: var(--_row);
|
|
988
|
-
padding-block: var(--slotted-space-1, 0.125rem);
|
|
989
|
-
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
990
|
-
text-align: start;
|
|
991
|
-
touch-action: manipulation;
|
|
992
|
-
transition:
|
|
993
|
-
background-color var(--slotted-control-transition-duration)
|
|
994
|
-
var(--slotted-control-transition-easing),
|
|
995
|
-
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
996
|
-
white-space: nowrap;
|
|
997
|
-
-webkit-tap-highlight-color: transparent;
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
[data-ui-datetime-range-picker] [data-part-preset]:hover:not(:disabled):not([data-selected]) {
|
|
1001
|
-
background-color: var(
|
|
1002
|
-
--slotted-datetime-range-picker-preset-hover-background,
|
|
1003
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
1004
|
-
);
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
[data-ui-datetime-range-picker] [data-part-preset]:active:not(:disabled):not([data-selected]) {
|
|
1008
|
-
background-color: var(
|
|
1009
|
-
--slotted-datetime-range-picker-preset-active-background,
|
|
1010
|
-
var(--slotted-tone-secondary-subtle-active)
|
|
1011
|
-
);
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
[data-ui-datetime-range-picker] [data-part-preset][data-selected] {
|
|
1015
|
-
background-color: var(
|
|
1016
|
-
--slotted-datetime-range-picker-preset-selected-background,
|
|
1017
|
-
var(--slotted-tone-accent-subtle-hover)
|
|
1018
|
-
);
|
|
1019
|
-
color: var(
|
|
1020
|
-
--slotted-datetime-range-picker-preset-selected-color,
|
|
1021
|
-
var(--slotted-tone-accent-text)
|
|
1022
|
-
);
|
|
1023
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
[data-ui-datetime-range-picker] [data-part-preset]:focus-visible {
|
|
1027
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1028
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
[data-ui-datetime-range-picker] [data-part-preset]:disabled {
|
|
1032
|
-
color: var(--slotted-disabled-foreground);
|
|
1033
|
-
cursor: not-allowed;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
/* ── The list ─────────────────────────────────────────────────────────
|
|
1037
|
-
*
|
|
1038
|
-
* One column of times, the current end's, capped in control heights so the
|
|
1039
|
-
* cap holds at every density, and scrolled rather than truncated —
|
|
1040
|
-
* `time-picker`'s list.
|
|
1041
|
-
*/
|
|
1042
|
-
[data-ui-datetime-range-picker] [data-part-list] {
|
|
1043
|
-
display: flex;
|
|
1044
|
-
flex-direction: column;
|
|
1045
|
-
/* One step of air between rows, so the chosen row's painted ground and
|
|
1046
|
-
the focused row's inset ring never share an edge. */
|
|
1047
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
1048
|
-
/* Eight rows and half of the ninth: a list cut on a row boundary looks
|
|
1049
|
-
like the whole list. */
|
|
1050
|
-
max-block-size: var(
|
|
1051
|
-
--slotted-datetime-range-picker-list-block-size,
|
|
1052
|
-
calc(var(--_row-pitch) * 8.5)
|
|
1053
|
-
);
|
|
1054
|
-
min-inline-size: 0;
|
|
1055
|
-
overflow-y: auto;
|
|
1056
|
-
/* A highlight moved by a key lands whole rather than half under the edge. */
|
|
1057
|
-
scroll-padding-block: var(--slotted-space-2, 0.25rem);
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
[data-ui-datetime-range-picker] [data-part-option] {
|
|
1061
|
-
/* The time and its duration share a baseline, and the line box is the
|
|
1062
|
-
row: baseline alignment alone would seat both at the top of a row
|
|
1063
|
-
taller than one line, and a length line-height centers them in it. */
|
|
1064
|
-
align-items: baseline;
|
|
1065
|
-
background-color: transparent;
|
|
1066
|
-
border-radius: var(
|
|
1067
|
-
--slotted-datetime-range-picker-option-radius,
|
|
1068
|
-
var(--slotted-radius-sm, 4px)
|
|
1069
|
-
);
|
|
1070
|
-
color: inherit;
|
|
1071
|
-
cursor: pointer;
|
|
1072
|
-
display: flex;
|
|
1073
|
-
flex: 0 0 auto;
|
|
1074
|
-
font-variant-numeric: tabular-nums;
|
|
1075
|
-
gap: var(--slotted-space-3, 0.375rem);
|
|
1076
|
-
justify-content: space-between;
|
|
1077
|
-
line-height: var(--_row);
|
|
1078
|
-
/* The row *is* `--_row`: no block padding on top of it, so eight rows are
|
|
1079
|
-
eight rows and the cap that counts them is arithmetic. */
|
|
1080
|
-
min-block-size: var(--_row);
|
|
1081
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1082
|
-
transition:
|
|
1083
|
-
background-color var(--slotted-control-transition-duration)
|
|
1084
|
-
var(--slotted-control-transition-easing),
|
|
1085
|
-
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
1086
|
-
user-select: none;
|
|
1087
|
-
-webkit-tap-highlight-color: transparent;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* The duration this option would make, beside it: "15:00 · 1 hr", the way
|
|
1092
|
-
* a calendar application lists the end times of an event. It is the answer
|
|
1093
|
-
* to the question the reader is actually asking while choosing an end, read
|
|
1094
|
-
* row by row rather than one option at a time from the band. In the list of
|
|
1095
|
-
* the other end it is the duration to the end already chosen. Muted, so the
|
|
1096
|
-
* time stays what the row is; on the chosen row it takes the row's own ink.
|
|
1097
|
-
*/
|
|
1098
|
-
[data-ui-datetime-range-picker] [data-part-option-duration] {
|
|
1099
|
-
color: var(--slotted-datetime-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
1100
|
-
flex: 0 1 auto;
|
|
1101
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
1102
|
-
min-inline-size: 0;
|
|
1103
|
-
overflow: hidden;
|
|
1104
|
-
text-overflow: ellipsis;
|
|
1105
|
-
unicode-bidi: plaintext;
|
|
1106
|
-
white-space: nowrap;
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
[data-ui-datetime-range-picker] [data-part-option][data-selected] [data-part-option-duration],
|
|
1110
|
-
[data-ui-datetime-range-picker] [data-part-option][data-disabled] [data-part-option-duration] {
|
|
1111
|
-
color: inherit;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
/* ── Option states ────────────────────────────────────────────────────
|
|
1115
|
-
*
|
|
1116
|
-
* Written strongest last, and each weaker one guarded against every stronger
|
|
1117
|
-
* one it can meet: the chosen time outranks the highlight, and the highlight
|
|
1118
|
-
* outranks the pointer. Specificity is what makes this a rule rather than an
|
|
1119
|
-
* ordering — the defect `time-picker` records from its visual gate.
|
|
1120
|
-
*/
|
|
1121
|
-
[data-ui-datetime-range-picker]
|
|
1122
|
-
[data-part-option]:hover:not([data-disabled]):not([data-selected]):not([data-current]) {
|
|
1123
|
-
background-color: var(
|
|
1124
|
-
--slotted-datetime-range-picker-option-hover-background,
|
|
1125
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
1126
|
-
);
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
[data-ui-datetime-range-picker] [data-part-option][data-current]:not([data-selected]) {
|
|
1130
|
-
background-color: var(
|
|
1131
|
-
--slotted-datetime-range-picker-option-current-background,
|
|
1132
|
-
var(--slotted-tone-secondary-subtle-active)
|
|
1133
|
-
);
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
[data-ui-datetime-range-picker] [data-part-option]:focus-visible {
|
|
1137
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1138
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
[data-ui-datetime-range-picker] [data-part-option][data-selected] {
|
|
1142
|
-
background-color: var(
|
|
1143
|
-
--slotted-datetime-range-picker-option-selected-background,
|
|
1144
|
-
var(--slotted-tone-accent-solid)
|
|
1145
|
-
);
|
|
1146
|
-
color: var(
|
|
1147
|
-
--slotted-datetime-range-picker-option-selected-color,
|
|
1148
|
-
var(--slotted-tone-accent-on-solid)
|
|
1149
|
-
);
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
/* The chosen row still answers the pointer, one step along its own tone. */
|
|
1153
|
-
[data-ui-datetime-range-picker] [data-part-option][data-selected]:hover:not([data-disabled]) {
|
|
1154
|
-
background-color: var(
|
|
1155
|
-
--slotted-datetime-range-picker-option-selected-hover-background,
|
|
1156
|
-
var(--slotted-tone-accent-solid-hover)
|
|
1157
|
-
);
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* A time a bound, the predicate or the other end refuses. It stays in the
|
|
1162
|
-
* list by default, because a list that silently drops rows is a list whose
|
|
1163
|
-
* step the reader cannot infer — and it is muted to the color the theme
|
|
1164
|
-
* measures rather than faded by opacity, so it stays readable.
|
|
1165
|
-
*/
|
|
1166
|
-
[data-ui-datetime-range-picker] [data-part-option][data-disabled] {
|
|
1167
|
-
background-color: transparent;
|
|
1168
|
-
color: var(--slotted-disabled-foreground);
|
|
1169
|
-
cursor: not-allowed;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/* Nothing available for this end at all. A sentence rather than an empty
|
|
1173
|
-
box, the reason `time-picker` records. */
|
|
1174
|
-
[data-ui-datetime-range-picker] [data-part-empty] {
|
|
1175
|
-
align-items: center;
|
|
1176
|
-
color: var(--slotted-datetime-range-picker-label-color, var(--slotted-text-muted, GrayText));
|
|
1177
|
-
display: flex;
|
|
1178
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
1179
|
-
justify-content: center;
|
|
1180
|
-
min-block-size: calc(var(--_row) * 2);
|
|
1181
|
-
padding: var(--slotted-space-4, 0.5rem);
|
|
1182
|
-
text-align: center;
|
|
1183
|
-
text-wrap: balance;
|
|
1184
|
-
/* A sentence laid out by its own first strong character, so a full stop
|
|
1185
|
-
does not lead it in a right-to-left document. */
|
|
1186
|
-
unicode-bidi: plaintext;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
/* The consumer's own actions and, at the reading end, `done`: the way out
|
|
1190
|
-
of a sheet that fills the screen and of an edit left half way. */
|
|
1191
|
-
[data-ui-datetime-range-picker] [data-part-footer] {
|
|
1192
|
-
box-sizing: border-box;
|
|
1193
|
-
inline-size: 0;
|
|
1194
|
-
min-inline-size: 100%;
|
|
1195
|
-
|
|
1196
|
-
align-items: center;
|
|
1197
|
-
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
1198
|
-
var(
|
|
1199
|
-
--slotted-datetime-range-picker-content-border-color,
|
|
1200
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
1201
|
-
);
|
|
1202
|
-
display: flex;
|
|
1203
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
1204
|
-
grid-area: footer;
|
|
1205
|
-
justify-content: flex-end;
|
|
1206
|
-
padding-block-start: var(--slotted-space-3, 0.375rem);
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
[data-ui-datetime-range-picker] [data-part-done] {
|
|
1210
|
-
appearance: none;
|
|
1211
|
-
background-color: var(
|
|
1212
|
-
--slotted-datetime-range-picker-done-background,
|
|
1213
|
-
var(--slotted-tone-accent-solid)
|
|
1214
|
-
);
|
|
1215
|
-
border: 0;
|
|
1216
|
-
border-radius: var(--slotted-datetime-range-picker-radius, var(--slotted-control-radius, 4px));
|
|
1217
|
-
color: var(
|
|
1218
|
-
--slotted-datetime-range-picker-done-color,
|
|
1219
|
-
var(--slotted-tone-accent-on-solid, Canvas)
|
|
1220
|
-
);
|
|
1221
|
-
cursor: pointer;
|
|
1222
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
1223
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
1224
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1225
|
-
line-height: var(--slotted-line-height-sm, 1.4);
|
|
1226
|
-
margin-inline-start: auto;
|
|
1227
|
-
min-block-size: var(--_row);
|
|
1228
|
-
padding-block: var(--slotted-space-1, 0.125rem);
|
|
1229
|
-
padding-inline: var(--slotted-space-5, 0.75rem);
|
|
1230
|
-
touch-action: manipulation;
|
|
1231
|
-
transition: background-color var(--slotted-control-transition-duration)
|
|
1232
|
-
var(--slotted-control-transition-easing);
|
|
1233
|
-
-webkit-tap-highlight-color: transparent;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
[data-ui-datetime-range-picker] [data-part-done]:hover:not(:disabled) {
|
|
1237
|
-
background-color: var(
|
|
1238
|
-
--slotted-datetime-range-picker-done-hover-background,
|
|
1239
|
-
var(--slotted-tone-accent-solid-hover)
|
|
1240
|
-
);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
[data-ui-datetime-range-picker] [data-part-done]:active:not(:disabled) {
|
|
1244
|
-
background-color: var(
|
|
1245
|
-
--slotted-datetime-range-picker-done-active-background,
|
|
1246
|
-
var(--slotted-tone-accent-solid-active)
|
|
1247
|
-
);
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
[data-ui-datetime-range-picker] [data-part-done]:focus-visible {
|
|
1251
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
1252
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
/* ── On a finger ──────────────────────────────────────────────────────
|
|
1256
|
-
*
|
|
1257
|
-
* The row is the touch target: the theme raises the control heights to
|
|
1258
|
-
* `--slotted-target-comfortable` under a coarse pointer, and the row is
|
|
1259
|
-
* counted in them. The field is not drawn — a segment is a spinbutton and
|
|
1260
|
-
* raises no keyboard — and the list is the way to a time.
|
|
1261
|
-
*/
|
|
1262
|
-
@media (pointer: coarse) {
|
|
1263
|
-
[data-ui-datetime-range-picker] [data-part-field] {
|
|
1264
|
-
display: none;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
/* ── Narrow, on a finger ──────────────────────────────────────────────
|
|
1269
|
-
*
|
|
1270
|
-
* §2.7 of `docs/component-features.md` asks for it by name: a popover on the
|
|
1271
|
-
* desktop and a sheet in a narrow viewport. The DOM does not change.
|
|
1272
|
-
*/
|
|
1273
|
-
@media (max-width: 480px) and (pointer: coarse) {
|
|
1274
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet'] {
|
|
1275
|
-
inset: auto 0 0;
|
|
1276
|
-
position: fixed;
|
|
1277
|
-
translate: 0 var(--slotted-space-9, 2rem);
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet'][data-open] {
|
|
1281
|
-
translate: 0 0;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1285
|
-
[data-part-content] {
|
|
1286
|
-
border-end-end-radius: 0;
|
|
1287
|
-
border-end-start-radius: 0;
|
|
1288
|
-
border-inline: 0;
|
|
1289
|
-
border-block-end: 0;
|
|
1290
|
-
inline-size: var(--slotted-datetime-range-picker-sheet-inline-size, 100%);
|
|
1291
|
-
max-inline-size: none;
|
|
1292
|
-
/* A month wider than the screen would scroll sideways; the grid inside
|
|
1293
|
-
answers its own width instead. */
|
|
1294
|
-
justify-content: center;
|
|
1295
|
-
/* A sheet taller than the screen — a grid and a list on a short phone,
|
|
1296
|
-
a list on a phone held sideways — scrolls as one, so the tabs stay
|
|
1297
|
-
reachable rather than above the top edge. `dvh` follows the
|
|
1298
|
-
browser's own bars; `vh` is the fallback. */
|
|
1299
|
-
max-block-size: 100vh;
|
|
1300
|
-
max-block-size: 100dvh;
|
|
1301
|
-
overflow-y: auto;
|
|
1302
|
-
overscroll-behavior: contain;
|
|
1303
|
-
padding-block-end: max(
|
|
1304
|
-
var(--slotted-datetime-range-picker-content-padding, var(--slotted-space-5, 0.75rem)),
|
|
1305
|
-
env(safe-area-inset-bottom, 0px)
|
|
1306
|
-
);
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
/* Four rows and a half under the grid on a phone, at the touch height:
|
|
1310
|
-
the grid, the list and done fit a short screen together. */
|
|
1311
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1312
|
-
[data-part-list] {
|
|
1313
|
-
max-block-size: calc(var(--_row-pitch) * 4.5);
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
/* The list under the grid on a phone, whatever the row's width: a grid
|
|
1317
|
-
and a column side by side leave neither room enough. */
|
|
1318
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1319
|
-
[data-part-panel]
|
|
1320
|
-
> [data-part-list],
|
|
1321
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1322
|
-
[data-part-panel]
|
|
1323
|
-
> [data-part-empty] {
|
|
1324
|
-
flex-basis: 100%;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1328
|
-
[data-part-date-panel]
|
|
1329
|
-
+ [data-part-list] {
|
|
1330
|
-
border-inline-start: 0;
|
|
1331
|
-
padding-inline-start: 0;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1335
|
-
[data-part-tab] {
|
|
1336
|
-
min-block-size: var(
|
|
1337
|
-
--slotted-datetime-range-picker-tab-block-size,
|
|
1338
|
-
var(--slotted-target-comfortable, 44px)
|
|
1339
|
-
);
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
* The grip every bottom sheet carries, in the drawer's geometry and line
|
|
1344
|
-
* color: a pill three rem by a quarter, centerd in a row one target tall
|
|
1345
|
-
* that the content keeps clear at its top. A pull down on it dismisses the
|
|
1346
|
-
* sheet; Escape and the press outside stay the accessible ways out.
|
|
1347
|
-
*/
|
|
1348
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1349
|
-
> [data-part-content] {
|
|
1350
|
-
padding-block-start: var(--slotted-target-min, 24px);
|
|
1351
|
-
position: relative;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
[data-ui-datetime-range-picker][data-part-positioner][data-presentation='sheet']
|
|
1355
|
-
> [data-part-content]
|
|
1356
|
-
> [data-part-grip] {
|
|
1357
|
-
background-clip: content-box;
|
|
1358
|
-
background-color: var(
|
|
1359
|
-
--slotted-drawer-resizer-line-color,
|
|
1360
|
-
var(--slotted-border-strong, ButtonBorder)
|
|
1361
|
-
);
|
|
1362
|
-
block-size: var(--slotted-space-2, 0.25rem);
|
|
1363
|
-
border-radius: var(--slotted-radius-full, 9999px);
|
|
1364
|
-
box-sizing: content-box;
|
|
1365
|
-
cursor: grab;
|
|
1366
|
-
inline-size: var(--slotted-space-11, 3rem);
|
|
1367
|
-
inset-block-start: 0;
|
|
1368
|
-
inset-inline: 0;
|
|
1369
|
-
margin-inline: auto;
|
|
1370
|
-
padding-block: calc((var(--slotted-target-min, 24px) - var(--slotted-space-2, 0.25rem)) / 2);
|
|
1371
|
-
position: absolute;
|
|
1372
|
-
touch-action: none;
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
@media (forced-colors: active) {
|
|
1377
|
-
[data-ui-datetime-range-picker][data-part-root][data-variant='plain'] [data-part-control] {
|
|
1378
|
-
border-color: ButtonBorder;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
/* The tab's underline is painted with a background, and forced colors
|
|
1382
|
-
replace a background that is not one of the system's own. */
|
|
1383
|
-
[data-ui-datetime-range-picker] [data-part-tab]::after {
|
|
1384
|
-
forced-color-adjust: none;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
[data-ui-datetime-range-picker] [data-part-tab]::after {
|
|
1388
|
-
background-color: currentcolor;
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
[data-ui-datetime-range-picker] [data-part-preset][data-selected],
|
|
1392
|
-
[data-ui-datetime-range-picker] [data-part-option][data-selected] {
|
|
1393
|
-
background-color: Highlight;
|
|
1394
|
-
color: HighlightText;
|
|
1395
|
-
forced-color-adjust: none;
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
[data-ui-datetime-range-picker] [data-part-option][data-current]:not([data-selected]) {
|
|
1399
|
-
outline: var(--slotted-focus-ring-width, 2px) solid Highlight;
|
|
1400
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
450
|
}
|