@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,7 +1,4 @@
|
|
|
1
1
|
[
|
|
2
|
-
"--slotted-border-strong",
|
|
3
|
-
"--slotted-border-subtle",
|
|
4
|
-
"--slotted-border-width-thin",
|
|
5
2
|
"--slotted-control-border-width",
|
|
6
3
|
"--slotted-control-height-lg",
|
|
7
4
|
"--slotted-control-height-md",
|
|
@@ -12,43 +9,21 @@
|
|
|
12
9
|
"--slotted-control-radius",
|
|
13
10
|
"--slotted-control-transition-duration",
|
|
14
11
|
"--slotted-control-transition-easing",
|
|
15
|
-
"--slotted-date-picker-content-backdrop-filter",
|
|
16
|
-
"--slotted-date-picker-content-border-color",
|
|
17
|
-
"--slotted-date-picker-content-color",
|
|
18
|
-
"--slotted-date-picker-content-padding",
|
|
19
|
-
"--slotted-date-picker-content-radius",
|
|
20
|
-
"--slotted-date-picker-content-shadow",
|
|
21
12
|
"--slotted-date-picker-invalid-focus-ring-color",
|
|
22
13
|
"--slotted-date-picker-radius",
|
|
23
|
-
"--slotted-date-picker-surface",
|
|
24
14
|
"--slotted-date-picker-trigger-active-background",
|
|
25
15
|
"--slotted-date-picker-trigger-color",
|
|
26
16
|
"--slotted-date-picker-trigger-hover-background",
|
|
27
17
|
"--slotted-date-picker-trigger-size",
|
|
28
18
|
"--slotted-disabled-foreground",
|
|
29
|
-
"--slotted-drawer-resizer-line-color",
|
|
30
|
-
"--slotted-duration-medium",
|
|
31
|
-
"--slotted-duration-short",
|
|
32
|
-
"--slotted-easing-enter",
|
|
33
|
-
"--slotted-easing-exit",
|
|
34
19
|
"--slotted-focus-ring-color",
|
|
35
20
|
"--slotted-focus-ring-color-invalid",
|
|
36
21
|
"--slotted-focus-ring-offset",
|
|
37
22
|
"--slotted-focus-ring-width",
|
|
38
|
-
"--slotted-radius-full",
|
|
39
|
-
"--slotted-radius-lg",
|
|
40
|
-
"--slotted-shadow-md",
|
|
41
|
-
"--slotted-space-11",
|
|
42
23
|
"--slotted-space-2",
|
|
43
|
-
"--slotted-space-4",
|
|
44
|
-
"--slotted-space-5",
|
|
45
|
-
"--slotted-space-9",
|
|
46
|
-
"--slotted-surface-raised",
|
|
47
24
|
"--slotted-target-comfortable",
|
|
48
25
|
"--slotted-target-min",
|
|
49
|
-
"--slotted-text",
|
|
50
26
|
"--slotted-text-muted",
|
|
51
27
|
"--slotted-tone-secondary-subtle-active",
|
|
52
|
-
"--slotted-tone-secondary-subtle-hover"
|
|
53
|
-
"--slotted-z-index-popover"
|
|
28
|
+
"--slotted-tone-secondary-subtle-hover"
|
|
54
29
|
]
|
|
@@ -9,17 +9,11 @@
|
|
|
9
9
|
* │ │ └────────────┘ └────────────┘ └───────┘ └─────────┘ │ │
|
|
10
10
|
* │ └────────────────────────────────────────────────────────────────┘ │
|
|
11
11
|
* └─────────────────────────────────────────────────────────────────────┘
|
|
12
|
-
*
|
|
13
|
-
* │ ┌─ content ─ the surface ─────────────────────────────┐ │
|
|
14
|
-
* │ │ head: start – end · length · limit │ │
|
|
15
|
-
* │ │ presets │ calendar │ │
|
|
16
|
-
* │ │ footer │ │
|
|
17
|
-
* │ └─────────────────────────────────────────────────────┘ │
|
|
18
|
-
* └───────────────────────────────────────────────────────────┘
|
|
12
|
+
* the panel is `picker-panel`'s, and the months in it `calendar`'s
|
|
19
13
|
*
|
|
20
|
-
* The
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
* The families inside keep their own `data-ui`. Nothing here selects a segment
|
|
15
|
+
* or a day: this stylesheet owns the frame, the separator and the two buttons
|
|
16
|
+
* in it.
|
|
23
17
|
*
|
|
24
18
|
* **The frame speaks to the two fields through their tokens and never
|
|
25
19
|
* through their parts.** A `date-field` in `variant="plain"` still draws its
|
|
@@ -530,484 +524,4 @@
|
|
|
530
524
|
[data-ui-date-range-picker][data-part-root][data-disabled] [data-part-separator] {
|
|
531
525
|
color: var(--slotted-disabled-foreground);
|
|
532
526
|
}
|
|
533
|
-
|
|
534
|
-
/* ── The layer ────────────────────────────────────────────────────────
|
|
535
|
-
*
|
|
536
|
-
* What `packages/core/src/positioner` writes `position`, `left` and `top`
|
|
537
|
-
* onto. The painted surface is one element in, as every overlay is built.
|
|
538
|
-
*/
|
|
539
|
-
[data-ui-date-range-picker][data-part-positioner] {
|
|
540
|
-
/* Only the block inset: the positioner writes `left` and never `right`,
|
|
541
|
-
and `inset-inline-start` would resolve to `right` in a right-to-left
|
|
542
|
-
document and win over the measured value. */
|
|
543
|
-
position: absolute;
|
|
544
|
-
inset-block-start: 0;
|
|
545
|
-
|
|
546
|
-
box-sizing: border-box;
|
|
547
|
-
isolation: isolate;
|
|
548
|
-
/* The layer is only a frame around the surface; the surface takes the
|
|
549
|
-
pointer, and the frame must not swallow a press meant for the page. */
|
|
550
|
-
pointer-events: none;
|
|
551
|
-
z-index: calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));
|
|
552
|
-
|
|
553
|
-
/* The layer arrives along the axis it opens on and never along the inline
|
|
554
|
-
one, which is the rule `select` records. */
|
|
555
|
-
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
556
|
-
opacity: 0;
|
|
557
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
558
|
-
transition:
|
|
559
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
560
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
[data-ui-date-range-picker][data-part-positioner][data-side='top'] {
|
|
564
|
-
translate: 0 var(--_enter-distance);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
568
|
-
[data-ui-date-range-picker][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
569
|
-
translate: 0 0;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
[data-ui-date-range-picker][data-part-positioner][data-open] {
|
|
573
|
-
opacity: 1;
|
|
574
|
-
translate: 0 0;
|
|
575
|
-
transition: none;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/* The entrance is a keyframe animation and not a transition, for the reason
|
|
579
|
-
`select` records: a transition starts from the style the browser computed
|
|
580
|
-
last, and the positioner writes `data-side` in the same style update as
|
|
581
|
-
the family opens the layer. Only a layer the positioner placed arrives. */
|
|
582
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned] {
|
|
583
|
-
animation: slotted-date-range-picker-enter-down var(--slotted-duration-medium)
|
|
584
|
-
var(--slotted-easing-enter);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
588
|
-
animation-name: slotted-date-range-picker-enter-up;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned]:is(
|
|
592
|
-
[data-side='left'],
|
|
593
|
-
[data-side='right']
|
|
594
|
-
) {
|
|
595
|
-
animation-name: slotted-date-range-picker-fade;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
@keyframes slotted-date-range-picker-enter-down {
|
|
599
|
-
from {
|
|
600
|
-
opacity: 0;
|
|
601
|
-
translate: 0 calc(-1 * var(--_enter-distance));
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
@keyframes slotted-date-range-picker-enter-up {
|
|
606
|
-
from {
|
|
607
|
-
opacity: 0;
|
|
608
|
-
translate: 0 var(--_enter-distance);
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
@keyframes slotted-date-range-picker-fade {
|
|
613
|
-
from {
|
|
614
|
-
opacity: 0;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
/* Stillness keeps the fade and drops the movement. */
|
|
619
|
-
@media (prefers-reduced-motion: reduce) {
|
|
620
|
-
[data-ui-date-range-picker][data-part-positioner],
|
|
621
|
-
[data-ui-date-range-picker][data-part-positioner][data-side='top'],
|
|
622
|
-
[data-ui-date-range-picker][data-part-positioner][data-side='left'],
|
|
623
|
-
[data-ui-date-range-picker][data-part-positioner][data-side='right'] {
|
|
624
|
-
translate: 0 0;
|
|
625
|
-
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned],
|
|
629
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
630
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
631
|
-
[data-ui-date-range-picker][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
632
|
-
animation-name: slotted-date-range-picker-fade;
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/* The anchor scrolled out of its own clipper. The calendar is still open and
|
|
637
|
-
still belongs to a control the reader can no longer see. */
|
|
638
|
-
[data-ui-date-range-picker][data-part-positioner][data-detached] {
|
|
639
|
-
visibility: hidden;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* The surface. It is sized by the calendar inside it rather than by the
|
|
644
|
-
* control it hangs from, and it is a grid of `auto` tracks for the reason
|
|
645
|
-
* `date-picker` records: a percentage flex basis against a shrink-wrapped
|
|
646
|
-
* container makes the surface wider than anything in it.
|
|
647
|
-
*/
|
|
648
|
-
[data-ui-date-range-picker] [data-part-content] {
|
|
649
|
-
background-color: var(
|
|
650
|
-
--slotted-date-range-picker-surface,
|
|
651
|
-
var(--slotted-surface-raised, Canvas)
|
|
652
|
-
);
|
|
653
|
-
border: var(--slotted-border-width-thin, 1px) solid
|
|
654
|
-
var(
|
|
655
|
-
--slotted-date-range-picker-content-border-color,
|
|
656
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
657
|
-
);
|
|
658
|
-
border-radius: var(--slotted-date-range-picker-content-radius, var(--slotted-radius-lg, 8px));
|
|
659
|
-
box-shadow: var(--slotted-date-range-picker-content-shadow, var(--slotted-shadow-md));
|
|
660
|
-
box-sizing: border-box;
|
|
661
|
-
color: var(--slotted-date-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
662
|
-
display: grid;
|
|
663
|
-
gap: var(--slotted-space-5, 0.75rem);
|
|
664
|
-
grid-template-areas: 'head' 'panels' 'footer';
|
|
665
|
-
/* `minmax(0, 1fr)` and not `auto`: an `auto` track takes the calendar's
|
|
666
|
-
own two-month width as its floor, and the cap below is then a cap on a
|
|
667
|
-
box the track has already overflowed. A zero floor lets the track be
|
|
668
|
-
the room there is, and the calendar's `max-inline-size: 100%` follows. */
|
|
669
|
-
grid-template-columns: minmax(0, 1fr);
|
|
670
|
-
/* Capped by the room the positioner measured, so two months that do not
|
|
671
|
-
fit beside each other wrap under one another — the calendar's own
|
|
672
|
-
container rule — instead of running past the edge of the screen. */
|
|
673
|
-
max-inline-size: var(--slotted-positioner-available-width, 100vw);
|
|
674
|
-
padding: var(--slotted-date-range-picker-content-padding, var(--slotted-space-5, 0.75rem));
|
|
675
|
-
/* The layer above gave up the pointer; the surface takes it back. */
|
|
676
|
-
pointer-events: auto;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* The shortcuts and the calendar, as a wrapping row. Where there is room
|
|
681
|
-
* the column of shortcuts stands beside the grid; where there is not, the
|
|
682
|
-
* grid drops under it and the column stretches into a list across the
|
|
683
|
-
* surface — no container query, because a surface sized by its contents
|
|
684
|
-
* has no width of its own to ask about, which is the rule `datetime-picker`
|
|
685
|
-
* records for its own two panels.
|
|
686
|
-
*/
|
|
687
|
-
[data-ui-date-range-picker] [data-part-panels] {
|
|
688
|
-
align-items: flex-start;
|
|
689
|
-
display: flex;
|
|
690
|
-
flex-wrap: wrap;
|
|
691
|
-
gap: var(--slotted-space-5, 0.75rem);
|
|
692
|
-
grid-area: panels;
|
|
693
|
-
min-inline-size: 0;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
[data-ui-date-range-picker] [data-part-panels] > [data-ui-calendar] {
|
|
697
|
-
flex: 0 1 auto;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
/* ── The band ─────────────────────────────────────────────────────────
|
|
701
|
-
*
|
|
702
|
-
* What the reader has so far, and how long it is. The two ends are drawn
|
|
703
|
-
* as they stand, the one not yet chosen as its placeholder, and the length
|
|
704
|
-
* answers the question the reader is actually asking while the run is
|
|
705
|
-
* being drawn.
|
|
706
|
-
*
|
|
707
|
-
* It renders at the panel's width and contributes nothing to it, by the
|
|
708
|
-
* pair `datetime-picker` records: `inline-size: 0` takes the band out of the
|
|
709
|
-
* grid's measurement and `min-inline-size: 100%` puts it back at the track's
|
|
710
|
-
* own width, so the calendar decides how wide the panel is and the band
|
|
711
|
-
* wraps inside whatever it decides.
|
|
712
|
-
*/
|
|
713
|
-
[data-ui-date-range-picker] [data-part-head] {
|
|
714
|
-
box-sizing: border-box;
|
|
715
|
-
inline-size: 0;
|
|
716
|
-
min-inline-size: 100%;
|
|
717
|
-
|
|
718
|
-
align-items: baseline;
|
|
719
|
-
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
720
|
-
var(
|
|
721
|
-
--slotted-date-range-picker-content-border-color,
|
|
722
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
723
|
-
);
|
|
724
|
-
column-gap: var(--slotted-space-2, 0.25rem);
|
|
725
|
-
display: flex;
|
|
726
|
-
flex-wrap: wrap;
|
|
727
|
-
grid-area: head;
|
|
728
|
-
/* Air under the words before the rule — the same step the footer keeps
|
|
729
|
-
between its rule and its buttons, so the two bands hold the surface
|
|
730
|
-
symmetrically. */
|
|
731
|
-
padding-block-end: var(--slotted-space-3, 0.375rem);
|
|
732
|
-
row-gap: var(--slotted-space-1, 0.125rem);
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
/* The two ends and the dash between them are one run, and the run does not
|
|
736
|
-
break inside itself: "12 Sep –" on one line and "16 Sep" on the next is a
|
|
737
|
-
range read twice. */
|
|
738
|
-
[data-ui-date-range-picker] [data-part-head] > [data-part-head-start],
|
|
739
|
-
[data-ui-date-range-picker] [data-part-head] > [data-part-head-end] {
|
|
740
|
-
color: var(--slotted-date-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
741
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
742
|
-
font-variant-numeric: tabular-nums;
|
|
743
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
744
|
-
/* A date in words is a mixed run — a month name beside numbers — so it is
|
|
745
|
-
laid out by its own content rather than by the paragraph. */
|
|
746
|
-
unicode-bidi: plaintext;
|
|
747
|
-
white-space: nowrap;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/* The dash between the two ends is a text node the bindings write between
|
|
751
|
-
the two spans, and not a pseudo-element on either: each span lays its own
|
|
752
|
-
date out by that date's first strong character, and a pseudo-element on
|
|
753
|
-
one of them followed the date's direction rather than the band's. As a
|
|
754
|
-
flex item of its own the dash stands between the two ends in the band's
|
|
755
|
-
direction, which is the only direction it has. */
|
|
756
|
-
|
|
757
|
-
/* The end not yet written, drawn as its placeholder beside the one that is;
|
|
758
|
-
and the pending one, which is a proposal and reads as the band's own
|
|
759
|
-
proposal in the calendar does. */
|
|
760
|
-
[data-ui-date-range-picker]
|
|
761
|
-
[data-part-head]
|
|
762
|
-
:is([data-part-head-start], [data-part-head-end])[data-placeholder] {
|
|
763
|
-
color: var(--slotted-date-range-picker-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
764
|
-
font-weight: var(--slotted-font-weight-regular, 400);
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
[data-ui-date-range-picker]
|
|
768
|
-
[data-part-head]
|
|
769
|
-
:is([data-part-head-start], [data-part-head-end])[data-pending] {
|
|
770
|
-
color: var(--slotted-date-range-picker-pending-color, var(--slotted-tone-accent-text));
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* The length. It stands at the reading end of the band, in the accent's
|
|
775
|
-
* text tone, because it is the number the band exists to say; pending, it
|
|
776
|
-
* keeps the tone and drops a step of weight, the way the calendar's pending
|
|
777
|
-
* band keeps the tint and drops a step of share.
|
|
778
|
-
*/
|
|
779
|
-
[data-ui-date-range-picker] [data-part-length] {
|
|
780
|
-
color: var(--slotted-date-range-picker-length-color, var(--slotted-tone-accent-text));
|
|
781
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
782
|
-
font-variant-numeric: tabular-nums;
|
|
783
|
-
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
784
|
-
margin-inline-start: auto;
|
|
785
|
-
padding-inline-start: var(--slotted-space-4, 0.5rem);
|
|
786
|
-
/* "10 days" is a number and a word, and a right-to-left band would put
|
|
787
|
-
the word first; the run is laid out by its own first strong character. */
|
|
788
|
-
unicode-bidi: plaintext;
|
|
789
|
-
white-space: nowrap;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
[data-ui-date-range-picker] [data-part-length][data-pending] {
|
|
793
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
/* An empty length still holds its line, so the band does not grow a row
|
|
797
|
-
when the first end is chosen. */
|
|
798
|
-
[data-ui-date-range-picker] [data-part-length]:empty::before {
|
|
799
|
-
content: '\200B';
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
/* The limit, on a row of its own under the ends: a rule the grid enforces
|
|
803
|
-
is a rule the band names. */
|
|
804
|
-
[data-ui-date-range-picker] [data-part-limit] {
|
|
805
|
-
color: var(--slotted-date-range-picker-limit-color, var(--slotted-text-muted, GrayText));
|
|
806
|
-
flex-basis: 100%;
|
|
807
|
-
font-size: var(--slotted-font-size-xs, 11px);
|
|
808
|
-
unicode-bidi: plaintext;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
/* ── The shortcuts ────────────────────────────────────────────────────
|
|
812
|
-
*
|
|
813
|
-
* This family ships no list of them: "last 7 days" is a business calendar,
|
|
814
|
-
* and a library that guessed at one would be guessing at a fiscal year. It
|
|
815
|
-
* ships the column they stand in and the button each one is.
|
|
816
|
-
*/
|
|
817
|
-
[data-ui-date-range-picker] [data-part-presets] {
|
|
818
|
-
align-items: stretch;
|
|
819
|
-
display: flex;
|
|
820
|
-
/* It grows: beside the grid it takes what the surface leaves, and alone
|
|
821
|
-
on a line — the grid having dropped under it — it becomes a list across
|
|
822
|
-
the surface rather than a column against one edge. No rule between the
|
|
823
|
-
two: a rule on the end edge is right beside the grid and wrong above
|
|
824
|
-
it, and the column cannot know which it is. */
|
|
825
|
-
flex: 1 0 auto;
|
|
826
|
-
flex-direction: column;
|
|
827
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* One shortcut. Quiet — no edge, the surface's ink — and reading from the
|
|
832
|
-
* start edge: stretched and centerd, four labels form a ragged column with
|
|
833
|
-
* no left edge to run down. Selected, it takes the accent's subtle ground
|
|
834
|
-
* and text, which is the pair `calendar` gives a day inside the run.
|
|
835
|
-
*/
|
|
836
|
-
[data-ui-date-range-picker] [data-part-preset] {
|
|
837
|
-
appearance: none;
|
|
838
|
-
background-color: transparent;
|
|
839
|
-
border: 0;
|
|
840
|
-
border-radius: var(--slotted-date-range-picker-radius, var(--slotted-control-radius, 4px));
|
|
841
|
-
color: var(--slotted-date-range-picker-content-color, var(--slotted-text, CanvasText));
|
|
842
|
-
cursor: pointer;
|
|
843
|
-
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
844
|
-
font-size: var(--slotted-font-size-sm, 13px);
|
|
845
|
-
line-height: var(--slotted-line-height-sm, 1.4);
|
|
846
|
-
min-block-size: var(--slotted-target-min, 24px);
|
|
847
|
-
padding-block: var(--slotted-space-2, 0.25rem);
|
|
848
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
849
|
-
text-align: start;
|
|
850
|
-
touch-action: manipulation;
|
|
851
|
-
transition:
|
|
852
|
-
background-color var(--slotted-control-transition-duration)
|
|
853
|
-
var(--slotted-control-transition-easing),
|
|
854
|
-
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
855
|
-
white-space: nowrap;
|
|
856
|
-
-webkit-tap-highlight-color: transparent;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
[data-ui-date-range-picker] [data-part-preset]:hover:not(:disabled):not([data-selected]) {
|
|
860
|
-
background-color: var(
|
|
861
|
-
--slotted-date-range-picker-preset-hover-background,
|
|
862
|
-
var(--slotted-tone-secondary-subtle-hover)
|
|
863
|
-
);
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
[data-ui-date-range-picker] [data-part-preset]:active:not(:disabled):not([data-selected]) {
|
|
867
|
-
background-color: var(
|
|
868
|
-
--slotted-date-range-picker-preset-active-background,
|
|
869
|
-
var(--slotted-tone-secondary-subtle-active)
|
|
870
|
-
);
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
[data-ui-date-range-picker] [data-part-preset][data-selected] {
|
|
874
|
-
background-color: var(
|
|
875
|
-
--slotted-date-range-picker-preset-selected-background,
|
|
876
|
-
var(--slotted-tone-accent-subtle-hover)
|
|
877
|
-
);
|
|
878
|
-
color: var(--slotted-date-range-picker-preset-selected-color, var(--slotted-tone-accent-text));
|
|
879
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
[data-ui-date-range-picker] [data-part-preset]:focus-visible {
|
|
883
|
-
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
884
|
-
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
[data-ui-date-range-picker] [data-part-preset]:disabled {
|
|
888
|
-
color: var(--slotted-disabled-foreground);
|
|
889
|
-
cursor: not-allowed;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
[data-ui-date-range-picker] [data-part-footer] {
|
|
893
|
-
box-sizing: border-box;
|
|
894
|
-
inline-size: 0;
|
|
895
|
-
min-inline-size: 100%;
|
|
896
|
-
|
|
897
|
-
align-items: center;
|
|
898
|
-
border-block-start: var(--slotted-border-width-thin, 1px) solid
|
|
899
|
-
var(
|
|
900
|
-
--slotted-date-range-picker-content-border-color,
|
|
901
|
-
var(--slotted-border-subtle, ButtonBorder)
|
|
902
|
-
);
|
|
903
|
-
display: flex;
|
|
904
|
-
gap: var(--slotted-space-2, 0.25rem);
|
|
905
|
-
grid-area: footer;
|
|
906
|
-
justify-content: flex-end;
|
|
907
|
-
padding-block-start: var(--slotted-space-4, 0.5rem);
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/* ── Narrow, on a finger ──────────────────────────────────────────────
|
|
911
|
-
*
|
|
912
|
-
* §2.7 of `docs/component-features.md` asks for it by name: a popover on the
|
|
913
|
-
* desktop and a sheet in a narrow viewport. The DOM does not change, so the
|
|
914
|
-
* decision is testable without a device.
|
|
915
|
-
*/
|
|
916
|
-
@media (max-width: 480px) and (pointer: coarse) {
|
|
917
|
-
[data-ui-date-range-picker][data-part-positioner][data-presentation='sheet'] {
|
|
918
|
-
/* A sheet is not placed against an anchor, it is placed against the
|
|
919
|
-
screen. */
|
|
920
|
-
inset: auto 0 0;
|
|
921
|
-
position: fixed;
|
|
922
|
-
translate: 0 var(--slotted-space-9, 2rem);
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
[data-ui-date-range-picker][data-part-positioner][data-presentation='sheet'][data-open] {
|
|
926
|
-
translate: 0 0;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
[data-ui-date-range-picker][data-part-positioner][data-presentation='sheet']
|
|
930
|
-
[data-part-content] {
|
|
931
|
-
border-end-end-radius: 0;
|
|
932
|
-
border-end-start-radius: 0;
|
|
933
|
-
border-inline: 0;
|
|
934
|
-
border-block-end: 0;
|
|
935
|
-
inline-size: var(--slotted-date-range-picker-sheet-inline-size, 100%);
|
|
936
|
-
max-inline-size: none;
|
|
937
|
-
/* Two months wider than the screen would scroll sideways; the grid
|
|
938
|
-
inside answers its own width and drops to one column instead. */
|
|
939
|
-
justify-content: center;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
[data-ui-date-range-picker][data-part-positioner][data-presentation='sheet']
|
|
943
|
-
[data-part-presets] {
|
|
944
|
-
/* Beside the grid there is no room for a column of shortcuts, so they
|
|
945
|
-
become a row above it and keep their labels. */
|
|
946
|
-
flex-direction: row;
|
|
947
|
-
flex-wrap: wrap;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
/**
|
|
951
|
-
* The grip every bottom sheet carries, in the drawer's geometry and line
|
|
952
|
-
* color: a pill three rem by a quarter, centerd in a row one target tall
|
|
953
|
-
* that the content keeps clear at its top. A pull down on it dismisses the
|
|
954
|
-
* sheet; Escape and the press outside stay the accessible ways out.
|
|
955
|
-
*/
|
|
956
|
-
[data-ui-date-range-picker][data-part-positioner][data-presentation='sheet']
|
|
957
|
-
> [data-part-content] {
|
|
958
|
-
padding-block-start: var(--slotted-target-min, 24px);
|
|
959
|
-
position: relative;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
[data-ui-date-range-picker][data-part-positioner][data-presentation='sheet']
|
|
963
|
-
> [data-part-content]
|
|
964
|
-
> [data-part-grip] {
|
|
965
|
-
background-clip: content-box;
|
|
966
|
-
background-color: var(
|
|
967
|
-
--slotted-drawer-resizer-line-color,
|
|
968
|
-
var(--slotted-border-strong, ButtonBorder)
|
|
969
|
-
);
|
|
970
|
-
block-size: var(--slotted-space-2, 0.25rem);
|
|
971
|
-
border-radius: var(--slotted-radius-full, 9999px);
|
|
972
|
-
box-sizing: content-box;
|
|
973
|
-
cursor: grab;
|
|
974
|
-
inline-size: var(--slotted-space-11, 3rem);
|
|
975
|
-
inset-block-start: 0;
|
|
976
|
-
inset-inline: 0;
|
|
977
|
-
margin-inline: auto;
|
|
978
|
-
padding-block: calc((var(--slotted-target-min, 24px) - var(--slotted-space-2, 0.25rem)) / 2);
|
|
979
|
-
position: absolute;
|
|
980
|
-
touch-action: none;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
@media (forced-colors: active) {
|
|
985
|
-
/* A transparent border has no system color to be remapped to, so the
|
|
986
|
-
`plain` frame would lose its only edge where an edge matters most. */
|
|
987
|
-
[data-ui-date-range-picker][data-part-root][data-variant='plain'] [data-part-control] {
|
|
988
|
-
border-color: ButtonBorder;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
/* The underline is painted with a background, and forced colors replace
|
|
992
|
-
a background that is not one of the system's own. */
|
|
993
|
-
[data-ui-date-range-picker] [data-part-start]::after,
|
|
994
|
-
[data-ui-date-range-picker] [data-part-end]::after {
|
|
995
|
-
forced-color-adjust: none;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
/* The underline keeps its ink as the text's own: a tone has nothing to
|
|
999
|
-
map to here, and `currentcolor` is whatever the system gave the frame. */
|
|
1000
|
-
[data-ui-date-range-picker] [data-part-start]::after,
|
|
1001
|
-
[data-ui-date-range-picker] [data-part-end]::after {
|
|
1002
|
-
background-color: currentcolor;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
/* A tinted ground has nothing to tint in a palette the system replaced;
|
|
1006
|
-
the selected shortcut takes the pair the system keeps legible. */
|
|
1007
|
-
[data-ui-date-range-picker] [data-part-preset][data-selected] {
|
|
1008
|
-
background-color: Highlight;
|
|
1009
|
-
color: HighlightText;
|
|
1010
|
-
forced-color-adjust: none;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
527
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[
|
|
2
|
-
"--slotted-border-strong",
|
|
3
2
|
"--slotted-border-subtle",
|
|
4
|
-
"--slotted-border-width-thin",
|
|
5
3
|
"--slotted-control-border-color",
|
|
6
4
|
"--slotted-control-border-width",
|
|
7
5
|
"--slotted-control-font-family",
|
|
@@ -34,11 +32,6 @@
|
|
|
34
32
|
"--slotted-date-range-picker-background",
|
|
35
33
|
"--slotted-date-range-picker-border-color",
|
|
36
34
|
"--slotted-date-range-picker-color",
|
|
37
|
-
"--slotted-date-range-picker-content-border-color",
|
|
38
|
-
"--slotted-date-range-picker-content-color",
|
|
39
|
-
"--slotted-date-range-picker-content-padding",
|
|
40
|
-
"--slotted-date-range-picker-content-radius",
|
|
41
|
-
"--slotted-date-range-picker-content-shadow",
|
|
42
35
|
"--slotted-date-range-picker-current-color",
|
|
43
36
|
"--slotted-date-range-picker-current-size",
|
|
44
37
|
"--slotted-date-range-picker-disabled-background",
|
|
@@ -48,55 +41,25 @@
|
|
|
48
41
|
"--slotted-date-range-picker-invalid-border-color",
|
|
49
42
|
"--slotted-date-range-picker-invalid-edge-width",
|
|
50
43
|
"--slotted-date-range-picker-invalid-focus-ring-color",
|
|
51
|
-
"--slotted-date-range-picker-length-color",
|
|
52
|
-
"--slotted-date-range-picker-limit-color",
|
|
53
|
-
"--slotted-date-range-picker-pending-color",
|
|
54
|
-
"--slotted-date-range-picker-placeholder-color",
|
|
55
44
|
"--slotted-date-range-picker-plain-hover-background",
|
|
56
|
-
"--slotted-date-range-picker-preset-active-background",
|
|
57
|
-
"--slotted-date-range-picker-preset-hover-background",
|
|
58
|
-
"--slotted-date-range-picker-preset-selected-background",
|
|
59
|
-
"--slotted-date-range-picker-preset-selected-color",
|
|
60
45
|
"--slotted-date-range-picker-radius",
|
|
61
46
|
"--slotted-date-range-picker-readonly-background",
|
|
62
47
|
"--slotted-date-range-picker-separator-color",
|
|
63
48
|
"--slotted-date-range-picker-shadow",
|
|
64
|
-
"--slotted-date-range-picker-sheet-inline-size",
|
|
65
49
|
"--slotted-date-range-picker-subtle-background",
|
|
66
50
|
"--slotted-date-range-picker-subtle-border-color",
|
|
67
51
|
"--slotted-date-range-picker-subtle-hover-background",
|
|
68
|
-
"--slotted-date-range-picker-surface",
|
|
69
52
|
"--slotted-disabled-background",
|
|
70
53
|
"--slotted-disabled-border",
|
|
71
54
|
"--slotted-disabled-foreground",
|
|
72
|
-
"--slotted-drawer-resizer-line-color",
|
|
73
|
-
"--slotted-duration-medium",
|
|
74
|
-
"--slotted-duration-short",
|
|
75
|
-
"--slotted-easing-enter",
|
|
76
|
-
"--slotted-easing-exit",
|
|
77
55
|
"--slotted-focus-ring-color",
|
|
78
56
|
"--slotted-focus-ring-color-invalid",
|
|
79
57
|
"--slotted-focus-ring-offset",
|
|
80
58
|
"--slotted-focus-ring-width",
|
|
81
|
-
"--slotted-font-size-sm",
|
|
82
|
-
"--slotted-font-size-xs",
|
|
83
|
-
"--slotted-font-weight-medium",
|
|
84
|
-
"--slotted-font-weight-regular",
|
|
85
|
-
"--slotted-font-weight-semibold",
|
|
86
|
-
"--slotted-line-height-sm",
|
|
87
|
-
"--slotted-radius-full",
|
|
88
|
-
"--slotted-radius-lg",
|
|
89
59
|
"--slotted-radius-none",
|
|
90
60
|
"--slotted-radius-xs",
|
|
91
|
-
"--slotted-shadow-md",
|
|
92
61
|
"--slotted-space-1",
|
|
93
|
-
"--slotted-space-11",
|
|
94
62
|
"--slotted-space-2",
|
|
95
|
-
"--slotted-space-3",
|
|
96
|
-
"--slotted-space-4",
|
|
97
|
-
"--slotted-space-5",
|
|
98
|
-
"--slotted-space-9",
|
|
99
|
-
"--slotted-surface-raised",
|
|
100
63
|
"--slotted-surface-sunken",
|
|
101
64
|
"--slotted-target-comfortable",
|
|
102
65
|
"--slotted-target-min",
|
|
@@ -104,10 +67,7 @@
|
|
|
104
67
|
"--slotted-text-muted",
|
|
105
68
|
"--slotted-tone-accent-border",
|
|
106
69
|
"--slotted-tone-accent-solid",
|
|
107
|
-
"--slotted-tone-accent-subtle-hover",
|
|
108
|
-
"--slotted-tone-accent-text",
|
|
109
70
|
"--slotted-tone-danger-border",
|
|
110
71
|
"--slotted-tone-secondary-subtle-active",
|
|
111
|
-
"--slotted-tone-secondary-subtle-hover"
|
|
112
|
-
"--slotted-z-index-popover"
|
|
72
|
+
"--slotted-tone-secondary-subtle-hover"
|
|
113
73
|
]
|