@slotted/styles 0.0.0-stage → 0.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +10 -2
- package/package.json +276 -3
- package/src/accordion/accordion.css +96 -0
- package/src/accordion/accordion.tokens.json +14 -0
- package/src/action-bar/action-bar.css +455 -0
- package/src/action-bar/action-bar.tokens.json +50 -0
- package/src/action-sheet/action-sheet.css +462 -0
- package/src/action-sheet/action-sheet.tokens.json +59 -0
- package/src/alert/alert.css +764 -0
- package/src/alert/alert.tokens.json +77 -0
- package/src/app-shell/app-shell.css +1899 -0
- package/src/app-shell/app-shell.tokens.json +88 -0
- package/src/aspect-ratio/aspect-ratio.css +131 -0
- package/src/aspect-ratio/aspect-ratio.tokens.json +1 -0
- package/src/attachment/attachment.css +906 -0
- package/src/attachment/attachment.tokens.json +85 -0
- package/src/avatar/avatar.css +598 -0
- package/src/avatar/avatar.tokens.json +64 -0
- package/src/avatar-group/avatar-group.css +268 -0
- package/src/avatar-group/avatar-group.tokens.json +16 -0
- package/src/badge/badge.css +462 -0
- package/src/badge/badge.tokens.json +58 -0
- package/src/breadcrumb/breadcrumb.css +441 -0
- package/src/breadcrumb/breadcrumb.tokens.json +50 -0
- package/src/button/button.css +754 -0
- package/src/button/button.tokens.json +72 -0
- package/src/button-group/button-group.css +455 -0
- package/src/button-group/button-group.tokens.json +11 -0
- package/src/calendar/calendar.css +846 -0
- package/src/calendar/calendar.tokens.json +67 -0
- package/src/card/card.css +602 -0
- package/src/card/card.tokens.json +68 -0
- package/src/carousel/carousel.css +860 -0
- package/src/carousel/carousel.tokens.json +62 -0
- package/src/cascader/cascader.css +1320 -0
- package/src/cascader/cascader.tokens.json +103 -0
- package/src/chart/chart.css +1473 -0
- package/src/chart/chart.tokens.json +107 -0
- package/src/checkbox/checkbox.css +1011 -0
- package/src/checkbox/checkbox.tokens.json +102 -0
- package/src/checkbox-group/checkbox-group.css +70 -0
- package/src/checkbox-group/checkbox-group.tokens.json +6 -0
- package/src/code-block/code-block.css +555 -0
- package/src/code-block/code-block.tokens.json +69 -0
- package/src/collapsible/collapsible.css +546 -0
- package/src/collapsible/collapsible.tokens.json +55 -0
- package/src/color-picker/color-picker.css +607 -0
- package/src/color-picker/color-picker.tokens.json +58 -0
- package/src/column-manager/column-manager.css +452 -0
- package/src/column-manager/column-manager.tokens.json +43 -0
- package/src/combobox/combobox.css +1048 -0
- package/src/combobox/combobox.tokens.json +112 -0
- package/src/command-palette/command-palette.css +1000 -0
- package/src/command-palette/command-palette.tokens.json +75 -0
- package/src/container/container.css +198 -0
- package/src/container/container.tokens.json +18 -0
- package/src/context-menu/context-menu.css +104 -0
- package/src/context-menu/context-menu.tokens.json +11 -0
- package/src/currency-field/currency-field.css +787 -0
- package/src/currency-field/currency-field.tokens.json +80 -0
- package/src/dashboard-grid/dashboard-grid.css +748 -0
- package/src/dashboard-grid/dashboard-grid.tokens.json +67 -0
- package/src/data-grid/data-grid.css +2484 -0
- package/src/data-grid/data-grid.tokens.json +100 -0
- package/src/data-list/data-list.css +455 -0
- package/src/data-list/data-list.tokens.json +35 -0
- package/src/date-field/date-field.css +560 -0
- package/src/date-field/date-field.tokens.json +80 -0
- package/src/date-picker/date-picker.css +420 -0
- package/src/date-picker/date-picker.tokens.json +49 -0
- package/src/date-range-picker/date-range-picker.css +983 -0
- package/src/date-range-picker/date-range-picker.tokens.json +109 -0
- package/src/datetime-field/datetime-field.css +850 -0
- package/src/datetime-field/datetime-field.tokens.json +91 -0
- package/src/datetime-picker/datetime-picker.css +843 -0
- package/src/datetime-picker/datetime-picker.tokens.json +78 -0
- package/src/datetime-range-picker/datetime-range-picker.css +1375 -0
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +135 -0
- package/src/description-list/description-list.css +675 -0
- package/src/description-list/description-list.tokens.json +66 -0
- package/src/detail-panel/detail-panel.css +329 -0
- package/src/detail-panel/detail-panel.tokens.json +33 -0
- package/src/dialog/dialog.css +968 -0
- package/src/dialog/dialog.tokens.json +66 -0
- package/src/divider/divider.css +131 -0
- package/src/divider/divider.tokens.json +18 -0
- package/src/drawer/drawer.css +1303 -0
- package/src/drawer/drawer.tokens.json +75 -0
- package/src/entity-picker/entity-picker.css +1367 -0
- package/src/entity-picker/entity-picker.tokens.json +118 -0
- package/src/event-calendar/event-calendar.css +2148 -0
- package/src/event-calendar/event-calendar.tokens.json +87 -0
- package/src/field/field.css +707 -0
- package/src/field/field.tokens.json +58 -0
- package/src/field-group/field-group.css +226 -0
- package/src/field-group/field-group.tokens.json +33 -0
- package/src/filter-bar/filter-bar.css +1306 -0
- package/src/filter-bar/filter-bar.tokens.json +78 -0
- package/src/form/form.css +218 -0
- package/src/form/form.tokens.json +32 -0
- package/src/fullscreen/fullscreen.css +376 -0
- package/src/fullscreen/fullscreen.tokens.json +50 -0
- package/src/grid/grid.css +173 -0
- package/src/grid/grid.tokens.json +20 -0
- package/src/highlight/highlight.css +135 -0
- package/src/highlight/highlight.tokens.json +16 -0
- package/src/hover-card/hover-card.css +93 -0
- package/src/hover-card/hover-card.tokens.json +17 -0
- package/src/icon/icon.css +136 -0
- package/src/icon/icon.tokens.json +14 -0
- package/src/image/image.css +449 -0
- package/src/image/image.tokens.json +27 -0
- package/src/import-export-center/import-export-center.css +1175 -0
- package/src/import-export-center/import-export-center.tokens.json +84 -0
- package/src/inline/inline.css +149 -0
- package/src/inline/inline.tokens.json +14 -0
- package/src/inline-message/inline-message.css +396 -0
- package/src/inline-message/inline-message.tokens.json +19 -0
- package/src/kbd/kbd.css +490 -0
- package/src/kbd/kbd.tokens.json +40 -0
- package/src/link/link.css +237 -0
- package/src/link/link.tokens.json +25 -0
- package/src/list/list.css +240 -0
- package/src/list/list.tokens.json +42 -0
- package/src/list-item/list-item.css +937 -0
- package/src/list-item/list-item.tokens.json +114 -0
- package/src/listbox/listbox.css +674 -0
- package/src/listbox/listbox.tokens.json +72 -0
- package/src/loading-overlay/loading-overlay.css +730 -0
- package/src/loading-overlay/loading-overlay.tokens.json +48 -0
- package/src/markdown/markdown.css +168 -0
- package/src/markdown/markdown.tokens.json +18 -0
- package/src/menu/menu.css +817 -0
- package/src/menu/menu.tokens.json +78 -0
- package/src/menubar/menubar.css +170 -0
- package/src/menubar/menubar.tokens.json +32 -0
- package/src/message/message.css +1453 -0
- package/src/message/message.tokens.json +85 -0
- package/src/message-scroller/message-scroller.css +371 -0
- package/src/message-scroller/message-scroller.tokens.json +47 -0
- package/src/multi-select/multi-select.css +1427 -0
- package/src/multi-select/multi-select.tokens.json +114 -0
- package/src/navigation-menu/navigation-menu.css +1029 -0
- package/src/navigation-menu/navigation-menu.tokens.json +70 -0
- package/src/notification-center/notification-center.css +856 -0
- package/src/notification-center/notification-center.tokens.json +84 -0
- package/src/number-field/number-field.css +794 -0
- package/src/number-field/number-field.tokens.json +80 -0
- package/src/otp-input/otp-input.css +525 -0
- package/src/otp-input/otp-input.tokens.json +69 -0
- package/src/page/page.css +179 -0
- package/src/page/page.tokens.json +20 -0
- package/src/page-header/page-header.css +1181 -0
- package/src/page-header/page-header.tokens.json +71 -0
- package/src/pagination/pagination.css +500 -0
- package/src/pagination/pagination.tokens.json +56 -0
- package/src/popover/popover.css +526 -0
- package/src/popover/popover.tokens.json +60 -0
- package/src/progress-indicator/progress-indicator.css +1584 -0
- package/src/progress-indicator/progress-indicator.tokens.json +50 -0
- package/src/prompt-composer/prompt-composer.css +680 -0
- package/src/prompt-composer/prompt-composer.tokens.json +99 -0
- package/src/prose/prose.css +733 -0
- package/src/prose/prose.tokens.json +79 -0
- package/src/radio-group/radio-group.css +778 -0
- package/src/radio-group/radio-group.tokens.json +103 -0
- package/src/rating/rating.css +1071 -0
- package/src/rating/rating.tokens.json +88 -0
- package/src/result-state/result-state.css +980 -0
- package/src/result-state/result-state.tokens.json +63 -0
- package/src/runtime-properties.mjs +321 -0
- package/src/saved-views/saved-views.css +394 -0
- package/src/saved-views/saved-views.tokens.json +41 -0
- package/src/scroll-area/scroll-area.css +481 -0
- package/src/scroll-area/scroll-area.tokens.json +15 -0
- package/src/section/section.css +177 -0
- package/src/section/section.tokens.json +39 -0
- package/src/segmented-control/segmented-control.css +564 -0
- package/src/segmented-control/segmented-control.tokens.json +67 -0
- package/src/select/select.css +1593 -0
- package/src/select/select.tokens.json +110 -0
- package/src/side-navigation/side-navigation.css +1096 -0
- package/src/side-navigation/side-navigation.tokens.json +87 -0
- package/src/skeleton/skeleton.css +431 -0
- package/src/skeleton/skeleton.tokens.json +29 -0
- package/src/slider/slider.css +792 -0
- package/src/slider/slider.tokens.json +75 -0
- package/src/sparkline/sparkline.css +282 -0
- package/src/sparkline/sparkline.tokens.json +45 -0
- package/src/spinner/spinner.css +224 -0
- package/src/spinner/spinner.tokens.json +8 -0
- package/src/split-button/split-button.css +253 -0
- package/src/split-button/split-button.tokens.json +12 -0
- package/src/splitter/splitter.css +336 -0
- package/src/splitter/splitter.tokens.json +24 -0
- package/src/stack/stack.css +128 -0
- package/src/stack/stack.tokens.json +14 -0
- package/src/stat-card/stat-card.css +641 -0
- package/src/stat-card/stat-card.tokens.json +95 -0
- package/src/status-indicator/status-indicator.css +481 -0
- package/src/status-indicator/status-indicator.tokens.json +38 -0
- package/src/stepper/stepper.css +629 -0
- package/src/stepper/stepper.tokens.json +72 -0
- package/src/switch/switch.css +703 -0
- package/src/switch/switch.tokens.json +75 -0
- package/src/table/table.css +1482 -0
- package/src/table/table.tokens.json +69 -0
- package/src/table-of-contents/table-of-contents.css +533 -0
- package/src/table-of-contents/table-of-contents.tokens.json +53 -0
- package/src/tabs/tabs.css +998 -0
- package/src/tabs/tabs.tokens.json +82 -0
- package/src/tag/tag.css +768 -0
- package/src/tag/tag.tokens.json +85 -0
- package/src/tags-input/tags-input.css +757 -0
- package/src/tags-input/tags-input.tokens.json +84 -0
- package/src/text-field/text-field.css +900 -0
- package/src/text-field/text-field.tokens.json +87 -0
- package/src/textarea/textarea.css +365 -0
- package/src/textarea/textarea.tokens.json +59 -0
- package/src/time-field/time-field.css +719 -0
- package/src/time-field/time-field.tokens.json +86 -0
- package/src/time-picker/time-picker.css +665 -0
- package/src/time-picker/time-picker.tokens.json +66 -0
- package/src/time-range-picker/time-range-picker.css +1287 -0
- package/src/time-range-picker/time-range-picker.tokens.json +134 -0
- package/src/timeline/timeline.css +1596 -0
- package/src/timeline/timeline.tokens.json +96 -0
- package/src/toast/toast.css +943 -0
- package/src/toast/toast.tokens.json +90 -0
- package/src/toggle/toggle.css +290 -0
- package/src/toggle/toggle.tokens.json +54 -0
- package/src/toggle-group/toggle-group.css +463 -0
- package/src/toggle-group/toggle-group.tokens.json +54 -0
- package/src/toolbar/toolbar.css +434 -0
- package/src/toolbar/toolbar.tokens.json +49 -0
- package/src/tooltip/tooltip.css +368 -0
- package/src/tooltip/tooltip.tokens.json +39 -0
- package/src/top-navigation/top-navigation.css +1287 -0
- package/src/top-navigation/top-navigation.tokens.json +91 -0
- package/src/tour/tour.css +680 -0
- package/src/tour/tour.tokens.json +67 -0
- package/src/transfer/transfer.css +571 -0
- package/src/transfer/transfer.tokens.json +49 -0
- package/src/tree/tree.css +1000 -0
- package/src/tree/tree.tokens.json +80 -0
- package/src/typography/typography.css +211 -0
- package/src/typography/typography.tokens.json +31 -0
- package/src/upload/upload.css +1706 -0
- package/src/upload/upload.tokens.json +123 -0
- package/src/visually-hidden/visually-hidden.css +52 -0
- package/src/visually-hidden/visually-hidden.tokens.json +1 -0
- package/src/wizard/wizard.css +740 -0
- package/src/wizard/wizard.tokens.json +63 -0
|
@@ -0,0 +1,2148 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* ── The root ────────────────────────────────────────────────────────────
|
|
4
|
+
*
|
|
5
|
+
* A heading, the controls that move it, and one of three bodies: the month
|
|
6
|
+
* table, the time grid, or the list. Everything is sized from the control
|
|
7
|
+
* scales, so a calendar at `dense` is the same calendar with less air rather
|
|
8
|
+
* than a different drawing.
|
|
9
|
+
*/
|
|
10
|
+
[data-ui='event-calendar'][data-part='root'] {
|
|
11
|
+
container: slotted-event-calendar / inline-size;
|
|
12
|
+
|
|
13
|
+
/** Grid rules, drawn once per cell edge. */
|
|
14
|
+
--_rule: var(--slotted-event-calendar-rule-color, var(--slotted-border-subtle, #d8dee6));
|
|
15
|
+
--_rule-width: var(--slotted-border-width-thin, 1px);
|
|
16
|
+
/**
|
|
17
|
+
* The air between an event and anything beside it: a grid rule, the
|
|
18
|
+
* event in the next column, the one in the next lane. An event that
|
|
19
|
+
* touched a rule read as part of the grid, and two that touched read as
|
|
20
|
+
* one.
|
|
21
|
+
*/
|
|
22
|
+
--_air: var(--slotted-space-2, 0.25rem);
|
|
23
|
+
/**
|
|
24
|
+
* An hour is two small controls tall, so a thirty-minute slot is one small
|
|
25
|
+
* control: the grid shrinks with density as the controls around it do —
|
|
26
|
+
* 60, 52 and 48 pixels at the three steps.
|
|
27
|
+
*/
|
|
28
|
+
--_hour: var(
|
|
29
|
+
--slotted-event-calendar-hour-size,
|
|
30
|
+
calc(var(--slotted-control-height-sm, 30px) * 2)
|
|
31
|
+
);
|
|
32
|
+
/**
|
|
33
|
+
* An event line is the inside of a small control; lanes are that far
|
|
34
|
+
* apart plus the air. It never goes below the minimum target less the
|
|
35
|
+
* air, so two lanes stand at least a minimum target apart: at `dense`
|
|
36
|
+
* the inside of a small control is 16, a pitch of 20, and the 12-pixel
|
|
37
|
+
* type filled the line to its edges.
|
|
38
|
+
*/
|
|
39
|
+
--_event-size: max(
|
|
40
|
+
var(--slotted-control-inner-size-sm, 22px),
|
|
41
|
+
calc(var(--slotted-target-min, 24px) - var(--_air))
|
|
42
|
+
);
|
|
43
|
+
--_event-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
44
|
+
--_event-radius: var(--slotted-event-calendar-event-radius, var(--slotted-radius-sm, 4px));
|
|
45
|
+
/**
|
|
46
|
+
* An event is its calendar's slot of the data scale mixed into the
|
|
47
|
+
* ground, inside an edge of the same slot mixed stronger, and written in
|
|
48
|
+
* the page's ink tinted toward the same slot: one hue carries the
|
|
49
|
+
* identity through the ground, the edge and the words. Each state moves
|
|
50
|
+
* the same three along one line — rest, hover, press — and the event that
|
|
51
|
+
* is open or held by the pointer leaves the line for the solid slot,
|
|
52
|
+
* darkened until white type on it passes 4.5:1 (the palette's lightest
|
|
53
|
+
* slot, green, needs a fifth of black).
|
|
54
|
+
*/
|
|
55
|
+
--_tint: 14%;
|
|
56
|
+
--_tint-hover: 21%;
|
|
57
|
+
--_tint-active: 27%;
|
|
58
|
+
--_edge: 34%;
|
|
59
|
+
--_edge-hover: 50%;
|
|
60
|
+
/* A slot mixed a seventh into a near-black ground is mud: the dark scheme
|
|
61
|
+
takes more of the slot at every step, chosen by the region's own
|
|
62
|
+
`color-scheme` through `light-dark()`, so a light island in a dark page
|
|
63
|
+
keeps the light scale. */
|
|
64
|
+
--_tint-dark: 24%;
|
|
65
|
+
--_tint-hover-dark: 32%;
|
|
66
|
+
--_tint-active-dark: 38%;
|
|
67
|
+
--_edge-dark: 44%;
|
|
68
|
+
--_edge-hover-dark: 60%;
|
|
69
|
+
--_ink-mix: 58%;
|
|
70
|
+
--_hue: var(--slotted-text-muted, #5b6b7f);
|
|
71
|
+
/** The ground of time nobody works in, in every scheme a step off the page. */
|
|
72
|
+
--_off: color-mix(in oklab, var(--slotted-text-muted, #5b6b7f) 7%, transparent);
|
|
73
|
+
/** The gutter holds the longest hour label of a 12-hour locale, "12 PM". */
|
|
74
|
+
--_gutter: calc(var(--slotted-space-11, 3rem) + var(--slotted-space-4, 0.5rem));
|
|
75
|
+
--_gap: var(--slotted-control-gap-md, 8px);
|
|
76
|
+
/**
|
|
77
|
+
* The line box of the two small texts, rounded to a whole pixel against
|
|
78
|
+
* the element's own size. 1.4 × 12 is 16.8 and 1.45 × 13 is 18.85: a
|
|
79
|
+
* weekday header, a column header and a list day stack those lines under
|
|
80
|
+
* a rule, and every rule below them landed on a fraction of a pixel.
|
|
81
|
+
*/
|
|
82
|
+
--_line-xs: round(nearest, calc(1em * var(--slotted-line-height-xs, 1.4)), 1px);
|
|
83
|
+
--_line-sm: round(nearest, calc(1em * var(--slotted-line-height-sm, 1.45)), 1px);
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The ground the calendar sits on. It draws no box of its own — on a
|
|
87
|
+
* sunken page, a card or a panel it takes that ground — and every fill it
|
|
88
|
+
* mixes is mixed over this one value, so a consumer who names the ground
|
|
89
|
+
* with `--slotted-event-calendar-background` moves the fills with it.
|
|
90
|
+
*/
|
|
91
|
+
--_base: var(--slotted-event-calendar-background, var(--slotted-surface, #ffffff));
|
|
92
|
+
|
|
93
|
+
background-color: var(--slotted-event-calendar-background, transparent);
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
color: var(--slotted-text, #0f172a);
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
99
|
+
font-size: var(--slotted-control-font-size-md, 13px);
|
|
100
|
+
gap: var(--slotted-space-5, 0.75rem);
|
|
101
|
+
min-block-size: 0;
|
|
102
|
+
min-inline-size: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[data-ui='event-calendar'] *,
|
|
106
|
+
[data-ui='event-calendar'] *::before,
|
|
107
|
+
[data-ui='event-calendar'] *::after {
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* ── The header ──────────────────────────────────────────────────────────
|
|
113
|
+
*
|
|
114
|
+
* `header`, `title`, `body` and `actions` are also parts of `popover` and
|
|
115
|
+
* `alert`, which this family draws inside itself — the "+N" panel, the
|
|
116
|
+
* detail, the error. A descendant selector reached into them and laid the
|
|
117
|
+
* popover's header out as this one's grid; these four are selected as
|
|
118
|
+
* children of the root, where only this family's own can be.
|
|
119
|
+
*
|
|
120
|
+
* Three compositions, chosen by the calendar's own width rather than left
|
|
121
|
+
* to wrapping: one row when everything fits; the title and the navigation
|
|
122
|
+
* over the views and the filter; and, narrowest, the title alone, then the
|
|
123
|
+
* navigation and the filter, then the views across the whole width. Wrapping
|
|
124
|
+
* decided the order by accident and left a filter alone on a line of its
|
|
125
|
+
* own.
|
|
126
|
+
*
|
|
127
|
+
* It is a grid with no column gap: an area a calendar does not draw — no
|
|
128
|
+
* filter with one calendar, no actions — is an empty `auto` track, and a gap
|
|
129
|
+
* beside it would still be drawn. The air is each area's own start margin.
|
|
130
|
+
*/
|
|
131
|
+
[data-ui='event-calendar'] > [data-part='header'] {
|
|
132
|
+
align-items: center;
|
|
133
|
+
display: grid;
|
|
134
|
+
grid-template-areas: 'title navigation views filter actions';
|
|
135
|
+
grid-template-columns: minmax(0, 1fr) auto auto auto auto;
|
|
136
|
+
row-gap: var(--slotted-space-4, 0.5rem);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
[data-ui='event-calendar'] > [data-part='header'] > [data-part='title'] {
|
|
140
|
+
font-family: var(
|
|
141
|
+
--slotted-font-family-heading,
|
|
142
|
+
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
143
|
+
);
|
|
144
|
+
font-size: var(--slotted-font-size-lg, 1rem);
|
|
145
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
146
|
+
grid-area: title;
|
|
147
|
+
line-height: var(--slotted-line-height-lg, 1.5);
|
|
148
|
+
margin: 0;
|
|
149
|
+
min-inline-size: 0;
|
|
150
|
+
overflow-wrap: anywhere;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
[data-ui='event-calendar'] [data-part='navigation'] {
|
|
154
|
+
align-items: center;
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
157
|
+
grid-area: navigation;
|
|
158
|
+
margin-inline-start: var(--slotted-space-6, 1rem);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-ui='event-calendar'] [data-part='views'] {
|
|
162
|
+
display: flex;
|
|
163
|
+
grid-area: views;
|
|
164
|
+
margin-inline-start: var(--slotted-space-5, 0.75rem);
|
|
165
|
+
min-inline-size: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-ui='event-calendar'] [data-part='filter'] {
|
|
169
|
+
grid-area: filter;
|
|
170
|
+
margin-inline-start: var(--_gap);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
[data-ui='event-calendar'] > [data-part='header'] > [data-part='actions'] {
|
|
174
|
+
align-items: center;
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
gap: var(--_gap);
|
|
177
|
+
grid-area: actions;
|
|
178
|
+
margin-inline-start: var(--_gap);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The four header controls the family draws itself: "today", the filter,
|
|
183
|
+
* and the two page triggers. `button` fixes its own `data-part` to `root`,
|
|
184
|
+
* so it cannot carry this family's part; the look is the outlined secondary
|
|
185
|
+
* control every form already shows, read from the same control tokens.
|
|
186
|
+
*/
|
|
187
|
+
[data-ui='event-calendar'] [data-part='today'],
|
|
188
|
+
[data-ui='event-calendar'] [data-part='filter'],
|
|
189
|
+
[data-ui='event-calendar'] [data-part='previous'],
|
|
190
|
+
[data-ui='event-calendar'] [data-part='next'] {
|
|
191
|
+
align-items: center;
|
|
192
|
+
appearance: none;
|
|
193
|
+
background-color: var(--slotted-control-surface, #ffffff);
|
|
194
|
+
block-size: var(--slotted-control-height-md, 34px);
|
|
195
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-control-border-color, #bfc7d1);
|
|
196
|
+
border-radius: var(--slotted-control-radius, 4px);
|
|
197
|
+
box-shadow: var(--slotted-control-shadow, none);
|
|
198
|
+
color: var(--slotted-text, #0f172a);
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
font: inherit;
|
|
202
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
203
|
+
gap: var(--slotted-control-gap-md, 8px);
|
|
204
|
+
justify-content: center;
|
|
205
|
+
padding-block: 0;
|
|
206
|
+
padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
207
|
+
touch-action: manipulation;
|
|
208
|
+
transition:
|
|
209
|
+
background-color var(--slotted-control-transition-duration)
|
|
210
|
+
var(--slotted-control-transition-easing),
|
|
211
|
+
border-color var(--slotted-control-transition-duration)
|
|
212
|
+
var(--slotted-control-transition-easing);
|
|
213
|
+
white-space: nowrap;
|
|
214
|
+
-webkit-tap-highlight-color: transparent;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
[data-ui='event-calendar'] [data-part='previous'],
|
|
218
|
+
[data-ui='event-calendar'] [data-part='next'] {
|
|
219
|
+
inline-size: var(--slotted-control-height-md, 34px);
|
|
220
|
+
padding-inline: 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[data-ui='event-calendar'] [data-part='today']:hover:not([data-disabled]),
|
|
224
|
+
[data-ui='event-calendar'] [data-part='filter']:hover:not([data-disabled]),
|
|
225
|
+
[data-ui='event-calendar'] [data-part='previous']:hover:not([data-disabled]),
|
|
226
|
+
[data-ui='event-calendar'] [data-part='next']:hover:not([data-disabled]) {
|
|
227
|
+
background-color: var(--slotted-tone-secondary-subtle-hover, #eef1f5);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
[data-ui='event-calendar'] [data-part='today']:active:not([data-disabled]),
|
|
231
|
+
[data-ui='event-calendar'] [data-part='filter']:active:not([data-disabled]),
|
|
232
|
+
[data-ui='event-calendar'] [data-part='previous']:active:not([data-disabled]),
|
|
233
|
+
[data-ui='event-calendar'] [data-part='next']:active:not([data-disabled]),
|
|
234
|
+
[data-ui='event-calendar'] [data-part='filter'][aria-expanded='true'] {
|
|
235
|
+
background-color: var(--slotted-tone-secondary-subtle-active, #e2e8f0);
|
|
236
|
+
transition-duration: var(--slotted-duration-instant);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* One chevron, turned. The artwork points along the writing direction, so
|
|
241
|
+
* "previous" is "next" turned half a turn, and both follow `dir` — the rule
|
|
242
|
+
* `pagination` set and `calendar` follows. The mark is the library's `Glyph`
|
|
243
|
+
* inside an `icon` box, which the binding draws; the header only sizes and
|
|
244
|
+
* turns the box.
|
|
245
|
+
*/
|
|
246
|
+
[data-ui='event-calendar'] [data-part='previous'] > [data-ui='icon'],
|
|
247
|
+
[data-ui='event-calendar'] [data-part='next'] > [data-ui='icon'],
|
|
248
|
+
[data-ui='event-calendar'] [data-part='filter'] > [data-ui='icon'] {
|
|
249
|
+
--slotted-icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
[data-ui='event-calendar'] [data-part='previous'] > [data-ui='icon'] {
|
|
253
|
+
rotate: 180deg;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
[data-ui='event-calendar']:dir(rtl) [data-part='previous'] > [data-ui='icon'] {
|
|
257
|
+
rotate: 0deg;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
[data-ui='event-calendar']:dir(rtl) [data-part='next'] > [data-ui='icon'] {
|
|
261
|
+
rotate: 180deg;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[data-ui='event-calendar'] [data-part='filter'] > [data-ui='icon'] {
|
|
265
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* ── Focus ───────────────────────────────────────────────────────────────
|
|
270
|
+
*
|
|
271
|
+
* Every control of the family draws the theme's ring. A cell draws it
|
|
272
|
+
* inside its own edge, because the cell beside it shares that edge and a
|
|
273
|
+
* ring hung outside would be half under the neighbour.
|
|
274
|
+
*/
|
|
275
|
+
[data-ui='event-calendar'] [data-part='today']:focus-visible,
|
|
276
|
+
[data-ui='event-calendar'] [data-part='filter']:focus-visible,
|
|
277
|
+
[data-ui='event-calendar'] [data-part='previous']:focus-visible,
|
|
278
|
+
[data-ui='event-calendar'] [data-part='next']:focus-visible,
|
|
279
|
+
[data-ui='event-calendar'] [data-part='day-number']:focus-visible {
|
|
280
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
281
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
[data-ui='event-calendar'] [data-part='day']:focus-visible,
|
|
285
|
+
[data-ui='event-calendar'] [data-part='column-header']:focus-visible,
|
|
286
|
+
[data-ui='event-calendar'] [data-part='all-day-cell']:focus-visible,
|
|
287
|
+
[data-ui='event-calendar'] [data-part='column']:focus-visible {
|
|
288
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
289
|
+
outline-offset: calc(var(--slotted-focus-ring-width, 2px) * -1);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* An event sits in the air the grid leaves around it, and its ring stands
|
|
294
|
+
* in that air: one pixel out, inside the space to the next event or rule.
|
|
295
|
+
*/
|
|
296
|
+
[data-ui='event-calendar'] [data-part='event']:focus-visible,
|
|
297
|
+
[data-ui='event-calendar'] [data-part='more']:focus-visible {
|
|
298
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
299
|
+
outline-offset: 1px;
|
|
300
|
+
z-index: 3;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* ── The body ────────────────────────────────────────────────────────────
|
|
305
|
+
*
|
|
306
|
+
* A column that fills what the root is given. With no height on the root,
|
|
307
|
+
* the month and the list take their content's height and the hours take at
|
|
308
|
+
* most 40rem; a root with a height gives the hours the rest of it.
|
|
309
|
+
*/
|
|
310
|
+
[data-ui='event-calendar'] > [data-part='body'] {
|
|
311
|
+
display: flex;
|
|
312
|
+
flex: 1 1 auto;
|
|
313
|
+
flex-direction: column;
|
|
314
|
+
min-block-size: 0;
|
|
315
|
+
position: relative;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* With a context menu the body is that family's target. Its inward mark
|
|
320
|
+
* would outline the whole grid; the calendar marks the event or the
|
|
321
|
+
* stretch the commands act on instead.
|
|
322
|
+
*/
|
|
323
|
+
[data-ui='event-calendar'] > [data-part='body'][data-ui='context-menu'] {
|
|
324
|
+
--slotted-context-menu-mark-width: 0px;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* One indicator for the wait: an indeterminate bar on the body's top edge,
|
|
329
|
+
* over the grid's first rule. The grid stays painted — it is structure the
|
|
330
|
+
* date already decides — and nothing moves when the events arrive.
|
|
331
|
+
*/
|
|
332
|
+
/* A list in a root given a height scrolls under its header, as a screen of
|
|
333
|
+
an application does; with no height the body is the list's height and
|
|
334
|
+
nothing scrolls. The panels are the body's siblings, so nothing it
|
|
335
|
+
clips. */
|
|
336
|
+
[data-ui='event-calendar'][data-layout='list'] > [data-part='body'] {
|
|
337
|
+
overflow-y: auto;
|
|
338
|
+
overscroll-behavior: contain;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
[data-ui='event-calendar'] > [data-part='body'] > [data-part='loader'] {
|
|
342
|
+
inset-block-start: 0;
|
|
343
|
+
inset-inline: 0;
|
|
344
|
+
pointer-events: none;
|
|
345
|
+
position: absolute;
|
|
346
|
+
z-index: 4;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
[data-ui='event-calendar'] > [data-part='body'] > [data-part='error'] {
|
|
350
|
+
margin-block-end: var(--slotted-space-5, 0.75rem);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
[data-ui='event-calendar'] > [data-part='body'][aria-busy='true'] [data-part='event'] {
|
|
354
|
+
opacity: 0.6;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* ── The month ───────────────────────────────────────────────────────────
|
|
359
|
+
*
|
|
360
|
+
* A real `table` with the grid role, so rows and cells are implied, as in
|
|
361
|
+
* `calendar`. Every week reserves the same lanes — `maxEvents` of them and
|
|
362
|
+
* one for "+N" — so the rows are one height across weeks and months, and a
|
|
363
|
+
* month whose events are still loading is the same boxes as the month they
|
|
364
|
+
* land in.
|
|
365
|
+
*/
|
|
366
|
+
/* A root given a height — a phone screen, a pane of an application — gives
|
|
367
|
+
the rest of it to the weeks: the month grows as a column item and the
|
|
368
|
+
table spreads the height over its rows, instead of ending half way down
|
|
369
|
+
the screen. With no height on the root it is its content's height. */
|
|
370
|
+
[data-ui='event-calendar'] [data-part='month'] {
|
|
371
|
+
flex: 1 0 auto;
|
|
372
|
+
border-block-start: var(--_rule-width) solid var(--_rule);
|
|
373
|
+
border-collapse: separate;
|
|
374
|
+
border-inline-start: var(--_rule-width) solid var(--_rule);
|
|
375
|
+
border-spacing: 0;
|
|
376
|
+
inline-size: 100%;
|
|
377
|
+
table-layout: fixed;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
[data-ui='event-calendar'] [data-part='weekday'],
|
|
381
|
+
[data-ui='event-calendar'] [data-part='week-number-header'] {
|
|
382
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
383
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
384
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
385
|
+
line-height: var(--_line-xs);
|
|
386
|
+
overflow: hidden;
|
|
387
|
+
padding-block: var(--slotted-space-3, 0.375rem);
|
|
388
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
389
|
+
text-align: start;
|
|
390
|
+
text-overflow: ellipsis;
|
|
391
|
+
white-space: nowrap;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='weekday'],
|
|
395
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='week-number-header'] {
|
|
396
|
+
border-block-end: var(--_rule-width) solid var(--_rule);
|
|
397
|
+
border-inline-end: var(--_rule-width) solid var(--_rule);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/** The week-number column is a quarter of a day, enough for two digits. */
|
|
401
|
+
[data-ui='event-calendar'] [data-part='week-number-header'],
|
|
402
|
+
[data-ui='event-calendar'] [data-part='week-number'] {
|
|
403
|
+
inline-size: calc(var(--slotted-space-9, 2rem) + var(--slotted-space-2, 0.25rem));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
[data-ui='event-calendar'] [data-part='week-number'] {
|
|
407
|
+
border-block-end: var(--_rule-width) solid var(--_rule);
|
|
408
|
+
border-inline-end: var(--_rule-width) solid var(--_rule);
|
|
409
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
410
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
411
|
+
font-variant-numeric: tabular-nums;
|
|
412
|
+
font-weight: var(--slotted-font-weight-regular, 400);
|
|
413
|
+
padding-block-start: var(--slotted-space-4, 0.5rem);
|
|
414
|
+
text-align: center;
|
|
415
|
+
vertical-align: top;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* A day is a cell with a ruled end and bottom. `--_pad` is its inset — the
|
|
420
|
+
* air between the rules and what the cell holds — and the one number a bar
|
|
421
|
+
* reads to reach across into the cells after it.
|
|
422
|
+
*/
|
|
423
|
+
[data-ui='event-calendar'] [data-part='day'] {
|
|
424
|
+
--_pad: var(--_air);
|
|
425
|
+
|
|
426
|
+
border-block-end: var(--_rule-width) solid var(--_rule);
|
|
427
|
+
border-inline-end: var(--_rule-width) solid var(--_rule);
|
|
428
|
+
padding: var(--_pad);
|
|
429
|
+
position: relative;
|
|
430
|
+
vertical-align: top;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
[data-ui='event-calendar'] [data-part='day'][data-non-working],
|
|
434
|
+
[data-ui='event-calendar'] [data-part='column'][data-non-working],
|
|
435
|
+
[data-ui='event-calendar'] [data-part='all-day-cell'][data-non-working] {
|
|
436
|
+
background-color: var(--slotted-event-calendar-off-background, var(--_off));
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* A run of days is one band, not a row of boxes: every chosen cell draws
|
|
441
|
+
* the band's top and bottom edge, and only the first and last of a run in
|
|
442
|
+
* a row draw its start and end. The inline edges are inset shadows, so the
|
|
443
|
+
* offset carries the direction: `--_run-direction` turns it in RTL.
|
|
444
|
+
*/
|
|
445
|
+
[data-ui='event-calendar'] [data-part='day'][data-selected],
|
|
446
|
+
[data-ui='event-calendar'] [data-part='all-day-cell'][data-selected] {
|
|
447
|
+
--_run-edge: var(--slotted-border-width-thin, 1px);
|
|
448
|
+
--_run-color: var(
|
|
449
|
+
--slotted-event-calendar-selection-border-color,
|
|
450
|
+
var(--slotted-tone-accent-border, #2563eb)
|
|
451
|
+
);
|
|
452
|
+
--_run-start: 0px;
|
|
453
|
+
--_run-end: 0px;
|
|
454
|
+
--_run-direction: 1;
|
|
455
|
+
|
|
456
|
+
background-color: var(
|
|
457
|
+
--slotted-event-calendar-selection-background,
|
|
458
|
+
var(--slotted-tone-accent-surface, #eff6ff)
|
|
459
|
+
);
|
|
460
|
+
box-shadow:
|
|
461
|
+
inset 0 var(--_run-edge) 0 0 var(--_run-color),
|
|
462
|
+
inset 0 calc(var(--_run-edge) * -1) 0 0 var(--_run-color),
|
|
463
|
+
inset calc(var(--_run-start) * var(--_run-direction)) 0 0 0 var(--_run-color),
|
|
464
|
+
inset calc(var(--_run-end) * var(--_run-direction) * -1) 0 0 0 var(--_run-color);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
[data-ui='event-calendar']:dir(rtl) [data-part='day'][data-selected],
|
|
468
|
+
[data-ui='event-calendar']:dir(rtl) [data-part='all-day-cell'][data-selected] {
|
|
469
|
+
--_run-direction: -1;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
[data-ui='event-calendar'] [data-part='day'][data-selected]:not([data-selected] + *),
|
|
473
|
+
[data-ui='event-calendar'] [data-part='all-day-cell'][data-selected]:not([data-selected] + *) {
|
|
474
|
+
--_run-start: var(--_run-edge);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
[data-ui='event-calendar'] [data-part='day'][data-selected]:not(:has(+ [data-selected])),
|
|
478
|
+
[data-ui='event-calendar']
|
|
479
|
+
[data-part='all-day-cell'][data-selected]:not(:has(+ [data-selected])) {
|
|
480
|
+
--_run-end: var(--_run-edge);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* The day's number on the start side, the consumer's content for the day
|
|
485
|
+
* on the end side, one line: a price, a count of free slots, a holiday.
|
|
486
|
+
*/
|
|
487
|
+
[data-ui='event-calendar'] [data-part='day-header'] {
|
|
488
|
+
align-items: center;
|
|
489
|
+
display: flex;
|
|
490
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
491
|
+
justify-content: space-between;
|
|
492
|
+
margin-block-end: var(--_air);
|
|
493
|
+
min-inline-size: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
[data-ui='event-calendar'] [data-part='day-content'] {
|
|
497
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
498
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
499
|
+
line-height: var(--_line-xs);
|
|
500
|
+
min-inline-size: 0;
|
|
501
|
+
overflow: hidden;
|
|
502
|
+
text-overflow: ellipsis;
|
|
503
|
+
unicode-bidi: plaintext;
|
|
504
|
+
white-space: nowrap;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* The day's number is a small round control, the size of what stands inside
|
|
509
|
+
* a control, so it lines up with the lanes under it. Today is the accent
|
|
510
|
+
* solid, the one filled mark on the page.
|
|
511
|
+
*/
|
|
512
|
+
[data-ui='event-calendar'] [data-part='day-number'] {
|
|
513
|
+
align-items: center;
|
|
514
|
+
appearance: none;
|
|
515
|
+
background-color: transparent;
|
|
516
|
+
block-size: var(--_event-size);
|
|
517
|
+
border: 0;
|
|
518
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
519
|
+
color: inherit;
|
|
520
|
+
cursor: pointer;
|
|
521
|
+
display: inline-flex;
|
|
522
|
+
flex: 0 0 auto;
|
|
523
|
+
font: inherit;
|
|
524
|
+
font-size: var(--_event-font-size);
|
|
525
|
+
font-variant-numeric: tabular-nums;
|
|
526
|
+
justify-content: center;
|
|
527
|
+
min-inline-size: var(--_event-size);
|
|
528
|
+
padding-block: 0;
|
|
529
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
530
|
+
transition: background-color var(--slotted-control-transition-duration)
|
|
531
|
+
var(--slotted-control-transition-easing);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
[data-ui='event-calendar'] [data-part='day-number']:hover:not([data-disabled]) {
|
|
535
|
+
background-color: var(--slotted-tone-secondary-subtle-hover, #eef1f5);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
[data-ui='event-calendar'] [data-part='day-number']:active:not([data-disabled]) {
|
|
539
|
+
background-color: var(--slotted-tone-secondary-subtle-active, #e2e8f0);
|
|
540
|
+
transition-duration: var(--slotted-duration-instant);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
[data-ui='event-calendar'] [data-part='day'][data-outside-month] [data-part='day-number'] {
|
|
544
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
[data-ui='event-calendar'] [data-today] > [data-part='day-header'] [data-part='day-number'],
|
|
548
|
+
[data-ui='event-calendar'] [data-part='column-header'][data-today] [data-part='day-number'] {
|
|
549
|
+
background-color: var(
|
|
550
|
+
--slotted-event-calendar-today-background,
|
|
551
|
+
var(--slotted-tone-accent-solid, #2563eb)
|
|
552
|
+
);
|
|
553
|
+
color: var(--slotted-event-calendar-today-color, var(--slotted-tone-accent-on-solid, #ffffff));
|
|
554
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Lanes. One grid row per lane and one more for "+N", every row one lane
|
|
559
|
+
* tall and the air between them, so a lane is the same height in every day
|
|
560
|
+
* of every week and a bar crossing from one cell into the next stays on its
|
|
561
|
+
* line.
|
|
562
|
+
*/
|
|
563
|
+
[data-ui='event-calendar'] [data-part='day-events'],
|
|
564
|
+
[data-ui='event-calendar'] [data-part='all-day-cell'] {
|
|
565
|
+
display: grid;
|
|
566
|
+
grid-template-columns: minmax(0, 1fr);
|
|
567
|
+
grid-template-rows: repeat(var(--slotted-event-calendar-lanes, 3), var(--_event-size));
|
|
568
|
+
row-gap: var(--_air);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
[data-ui='event-calendar'] [data-part='day-events'] {
|
|
572
|
+
container: slotted-event-calendar-day / inline-size;
|
|
573
|
+
grid-template-rows:
|
|
574
|
+
repeat(var(--slotted-event-calendar-lanes, 3), var(--_event-size))
|
|
575
|
+
var(--_event-size);
|
|
576
|
+
position: relative;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[data-ui='event-calendar'] [data-part='day-events'] > [data-part='event'],
|
|
580
|
+
[data-ui='event-calendar'] [data-part='all-day-cell'] > [data-part='event'] {
|
|
581
|
+
grid-column: 1;
|
|
582
|
+
grid-row: var(--slotted-event-lane, 1);
|
|
583
|
+
justify-self: start;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
[data-ui='event-calendar'] [data-part='day-events'] > [data-part='more'] {
|
|
587
|
+
grid-column: 1;
|
|
588
|
+
grid-row: -2 / -1;
|
|
589
|
+
justify-self: start;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* ── The event ───────────────────────────────────────────────────────────
|
|
594
|
+
*
|
|
595
|
+
* One element in three places: a line in a lane, a block in a column, a row
|
|
596
|
+
* in the list. What it is painted with is its calendar's slot of the data
|
|
597
|
+
* scale; the slot is the identity and the text is the meaning, so the ink
|
|
598
|
+
* stays the page's own.
|
|
599
|
+
*/
|
|
600
|
+
[data-ui='event-calendar'] [data-part='event'] {
|
|
601
|
+
align-items: center;
|
|
602
|
+
appearance: none;
|
|
603
|
+
background-color: transparent;
|
|
604
|
+
border: var(--slotted-border-width-thin, 1px) solid transparent;
|
|
605
|
+
border-radius: var(--_event-radius);
|
|
606
|
+
color: var(--slotted-text, #0f172a);
|
|
607
|
+
cursor: pointer;
|
|
608
|
+
display: flex;
|
|
609
|
+
font: inherit;
|
|
610
|
+
font-size: var(--_event-font-size);
|
|
611
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
612
|
+
line-height: var(--_line-xs);
|
|
613
|
+
margin: 0;
|
|
614
|
+
min-inline-size: 0;
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
padding-block: 0;
|
|
617
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
618
|
+
text-align: start;
|
|
619
|
+
text-decoration: none;
|
|
620
|
+
transition:
|
|
621
|
+
background-color var(--slotted-control-transition-duration)
|
|
622
|
+
var(--slotted-control-transition-easing),
|
|
623
|
+
border-color var(--slotted-control-transition-duration)
|
|
624
|
+
var(--slotted-control-transition-easing);
|
|
625
|
+
-webkit-tap-highlight-color: transparent;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='1'] {
|
|
629
|
+
--_hue: var(--slotted-data-1, #2563eb);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='2'] {
|
|
633
|
+
--_hue: var(--slotted-data-2, #ea580c);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='3'] {
|
|
637
|
+
--_hue: var(--slotted-data-3, #0891b2);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='4'] {
|
|
641
|
+
--_hue: var(--slotted-data-4, #dc2626);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='5'] {
|
|
645
|
+
--_hue: var(--slotted-data-5, #7c3aed);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='6'] {
|
|
649
|
+
--_hue: var(--slotted-data-6, #a16207);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='7'] {
|
|
653
|
+
--_hue: var(--slotted-data-7, #c026d3);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
[data-ui='event-calendar'] [data-part='event'][data-color='8'] {
|
|
657
|
+
--_hue: var(--slotted-data-8, #16a34a);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Each text of an event takes its direction from its own content. A title
|
|
662
|
+
* is the consumer's string, and an English title on a Hebrew page read
|
|
663
|
+
* "AM 7:30" and lost its start to the ellipsis when it inherited the page's
|
|
664
|
+
* direction instead.
|
|
665
|
+
*/
|
|
666
|
+
[data-ui='event-calendar'] [data-part='event-time'],
|
|
667
|
+
[data-ui='event-calendar'] [data-part='event-title'],
|
|
668
|
+
[data-ui='event-calendar'] [data-part='event-location'],
|
|
669
|
+
[data-ui='event-calendar'] [data-part='more'],
|
|
670
|
+
[data-ui='event-calendar'] [data-part='hour'],
|
|
671
|
+
[data-ui='event-calendar'] [data-part='zone'],
|
|
672
|
+
[data-ui='event-calendar'] [data-part='selection'],
|
|
673
|
+
[data-ui='event-calendar'] [data-part='offset-change'] {
|
|
674
|
+
unicode-bidi: plaintext;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
[data-ui='event-calendar'] [data-part='event-time'] {
|
|
678
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
679
|
+
flex: 0 0 auto;
|
|
680
|
+
font-variant-numeric: tabular-nums;
|
|
681
|
+
white-space: nowrap;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
[data-ui='event-calendar'] [data-part='event-title'] {
|
|
685
|
+
flex: 0 1 auto;
|
|
686
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
687
|
+
min-inline-size: 0;
|
|
688
|
+
overflow: hidden;
|
|
689
|
+
text-overflow: ellipsis;
|
|
690
|
+
white-space: nowrap;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
[data-ui='event-calendar'] [data-part='event-location'] {
|
|
694
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
695
|
+
min-inline-size: 0;
|
|
696
|
+
overflow: hidden;
|
|
697
|
+
text-overflow: ellipsis;
|
|
698
|
+
white-space: nowrap;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/** Text for assistive technology alone, in the shape `visually-hidden` draws. */
|
|
702
|
+
[data-ui='event-calendar'] [data-part='event-meta'],
|
|
703
|
+
[data-ui='event-calendar'] [data-part='continuation'] {
|
|
704
|
+
block-size: 1px;
|
|
705
|
+
clip-path: inset(50%);
|
|
706
|
+
inline-size: 1px;
|
|
707
|
+
margin: -1px;
|
|
708
|
+
overflow: hidden;
|
|
709
|
+
padding: 0;
|
|
710
|
+
position: absolute;
|
|
711
|
+
white-space: nowrap;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* A timed event of one day in the month is a line, not a bar: its mark, its
|
|
716
|
+
* time and its title, and no ground. A month where every meeting was a bar
|
|
717
|
+
* read as a wall of colour, and the all-day events — the ones a month is
|
|
718
|
+
* for — no longer stood out from it.
|
|
719
|
+
*/
|
|
720
|
+
[data-ui='event-calendar'] [data-part='day-events'] > [data-part='event']:not([data-bar]) {
|
|
721
|
+
position: relative;
|
|
722
|
+
block-size: var(--_event-size);
|
|
723
|
+
inline-size: 100%;
|
|
724
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
[data-ui='event-calendar'] [data-part='day-events'] > [data-part='event']:not([data-bar])::before,
|
|
728
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event']::before {
|
|
729
|
+
background-color: var(--_hue);
|
|
730
|
+
block-size: var(--slotted-space-4, 0.5rem);
|
|
731
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
732
|
+
content: '';
|
|
733
|
+
flex: 0 0 auto;
|
|
734
|
+
inline-size: var(--slotted-space-4, 0.5rem);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
[data-ui='event-calendar']
|
|
738
|
+
[data-part='day-events']
|
|
739
|
+
> [data-part='event']:not([data-bar]):hover:not([data-disabled]) {
|
|
740
|
+
background-color: var(--slotted-tone-secondary-subtle-hover, #eef1f5);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
[data-ui='event-calendar']
|
|
744
|
+
[data-part='day-events']
|
|
745
|
+
> [data-part='event']:not([data-bar]):active:not([data-disabled], [data-open]) {
|
|
746
|
+
background-color: var(--slotted-tone-secondary-subtle-active, #e2e8f0);
|
|
747
|
+
transition-duration: var(--slotted-duration-instant);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
[data-ui='event-calendar']
|
|
751
|
+
[data-part='day-events']
|
|
752
|
+
> [data-part='event']:not([data-bar])[data-open] {
|
|
753
|
+
background-color: light-dark(
|
|
754
|
+
color-mix(in oklab, var(--_hue) var(--_tint), var(--_base)),
|
|
755
|
+
color-mix(in oklab, var(--_hue) var(--_tint-dark), var(--_base))
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* A bar and a block: the calendar's ground inside the calendar's edge, all
|
|
761
|
+
* the way round, written in the calendar's ink. A coloured stripe down one
|
|
762
|
+
* side was the other answer, and it is the one every generated interface
|
|
763
|
+
* reaches for. `--_ground` is named because the block's fade below paints
|
|
764
|
+
* with it, so the fade follows every state the ground does.
|
|
765
|
+
*/
|
|
766
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar],
|
|
767
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] {
|
|
768
|
+
--_ground: light-dark(
|
|
769
|
+
color-mix(in oklab, var(--_hue) var(--_tint), var(--_base)),
|
|
770
|
+
color-mix(in oklab, var(--_hue) var(--_tint-dark), var(--_base))
|
|
771
|
+
);
|
|
772
|
+
--_ink: color-mix(in oklab, var(--_hue) var(--_ink-mix), var(--slotted-text, #0f172a));
|
|
773
|
+
|
|
774
|
+
background-color: var(--_ground);
|
|
775
|
+
border-color: light-dark(
|
|
776
|
+
color-mix(in oklab, var(--_hue) var(--_edge), var(--_base)),
|
|
777
|
+
color-mix(in oklab, var(--_hue) var(--_edge-dark), var(--_base))
|
|
778
|
+
);
|
|
779
|
+
color: var(--_ink);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] [data-part='event-time'],
|
|
783
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] [data-part='event-location'],
|
|
784
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] > [data-part='event-time'],
|
|
785
|
+
[data-ui='event-calendar']
|
|
786
|
+
[data-part='column']
|
|
787
|
+
> [data-part='event']
|
|
788
|
+
> [data-part='event-location'] {
|
|
789
|
+
color: color-mix(in oklab, var(--_ink) 72%, var(--_ground));
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
[data-ui='event-calendar']
|
|
793
|
+
[data-part='event'][data-bar]:hover:not(
|
|
794
|
+
[data-disabled],
|
|
795
|
+
[data-open],
|
|
796
|
+
[data-dragging],
|
|
797
|
+
[data-context]
|
|
798
|
+
),
|
|
799
|
+
[data-ui='event-calendar']
|
|
800
|
+
[data-part='column']
|
|
801
|
+
> [data-part='event']:hover:not([data-disabled], [data-open], [data-dragging], [data-context]) {
|
|
802
|
+
--_ground: light-dark(
|
|
803
|
+
color-mix(in oklab, var(--_hue) var(--_tint-hover), var(--_base)),
|
|
804
|
+
color-mix(in oklab, var(--_hue) var(--_tint-hover-dark), var(--_base))
|
|
805
|
+
);
|
|
806
|
+
|
|
807
|
+
border-color: light-dark(
|
|
808
|
+
color-mix(in oklab, var(--_hue) var(--_edge-hover), var(--_base)),
|
|
809
|
+
color-mix(in oklab, var(--_hue) var(--_edge-hover-dark), var(--_base))
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
[data-ui='event-calendar']
|
|
814
|
+
[data-part='event'][data-bar]:active:not(
|
|
815
|
+
[data-disabled],
|
|
816
|
+
[data-open],
|
|
817
|
+
[data-dragging],
|
|
818
|
+
[data-context]
|
|
819
|
+
),
|
|
820
|
+
[data-ui='event-calendar']
|
|
821
|
+
[data-part='column']
|
|
822
|
+
> [data-part='event']:active:not(
|
|
823
|
+
[data-disabled],
|
|
824
|
+
[data-open],
|
|
825
|
+
[data-dragging],
|
|
826
|
+
[data-context]
|
|
827
|
+
) {
|
|
828
|
+
--_ground: light-dark(
|
|
829
|
+
color-mix(in oklab, var(--_hue) var(--_tint-active), var(--_base)),
|
|
830
|
+
color-mix(in oklab, var(--_hue) var(--_tint-active-dark), var(--_base))
|
|
831
|
+
);
|
|
832
|
+
|
|
833
|
+
transition-duration: var(--slotted-duration-instant);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* The event whose detail is open, and the one the pointer is carrying, is
|
|
838
|
+
* the solid slot: the one thing on the grid in its calendar's full colour,
|
|
839
|
+
* so the eye finds it without reading. The slot is darkened by a fifth so
|
|
840
|
+
* white type holds 4.5:1 on every slot of the scale. The event a context
|
|
841
|
+
* menu acts on is drawn the same way, for the same reason.
|
|
842
|
+
*/
|
|
843
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-open],
|
|
844
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-open],
|
|
845
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-context],
|
|
846
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-context],
|
|
847
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-dragging],
|
|
848
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-dragging] {
|
|
849
|
+
--_ground: color-mix(in oklab, var(--_hue) 80%, #000000);
|
|
850
|
+
--_ink: #ffffff;
|
|
851
|
+
|
|
852
|
+
border-color: var(--_ground);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* A destination `canDrop` refuses: the event in hand leaves the solid slot
|
|
857
|
+
* for its resting tint inside the danger edge, dashed — the outline of an
|
|
858
|
+
* event that will not land there — and the pointer says it cannot drop.
|
|
859
|
+
* Letting go puts it back where it was.
|
|
860
|
+
*/
|
|
861
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-dragging][data-drop-invalid],
|
|
862
|
+
[data-ui='event-calendar']
|
|
863
|
+
[data-part='column']
|
|
864
|
+
> [data-part='event'][data-dragging][data-drop-invalid] {
|
|
865
|
+
--_ground: light-dark(
|
|
866
|
+
color-mix(in oklab, var(--_hue) var(--_tint), var(--_base)),
|
|
867
|
+
color-mix(in oklab, var(--_hue) var(--_tint-dark), var(--_base))
|
|
868
|
+
);
|
|
869
|
+
--_ink: color-mix(in oklab, var(--_hue) var(--_ink-mix), var(--slotted-text, #0f172a));
|
|
870
|
+
|
|
871
|
+
border-color: var(--slotted-tone-danger-border, #dc2626);
|
|
872
|
+
border-style: dashed;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
[data-ui='event-calendar']:has([data-part='event'][data-drop-invalid]),
|
|
876
|
+
[data-ui='event-calendar']:has([data-part='event'][data-drop-invalid]) * {
|
|
877
|
+
cursor: not-allowed;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/* The solid slot answers the pointer by darkening, never by going back to the tint. */
|
|
881
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-open]:hover:not([data-disabled]),
|
|
882
|
+
[data-ui='event-calendar']
|
|
883
|
+
[data-part='column']
|
|
884
|
+
> [data-part='event'][data-open]:hover:not([data-disabled]) {
|
|
885
|
+
--_ground: color-mix(in oklab, var(--_hue) 70%, #000000);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/* And the press one step further down the same line: 80, 70, 60. */
|
|
889
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-open]:active:not([data-disabled]),
|
|
890
|
+
[data-ui='event-calendar']
|
|
891
|
+
[data-part='column']
|
|
892
|
+
> [data-part='event'][data-open]:active:not([data-disabled]) {
|
|
893
|
+
--_ground: color-mix(in oklab, var(--_hue) 60%, #000000);
|
|
894
|
+
|
|
895
|
+
transition-duration: var(--slotted-duration-instant);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* A block holds what its height holds. When the title wraps past the end of
|
|
900
|
+
* a short block, the last line fades into the block's own ground instead of
|
|
901
|
+
* being cut by its edge; a block whose words end above the fade shows
|
|
902
|
+
* nothing of it, because the fade is the ground it lies on.
|
|
903
|
+
*/
|
|
904
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event']:not([data-short])::after {
|
|
905
|
+
background-image: linear-gradient(to bottom, transparent, var(--_ground));
|
|
906
|
+
block-size: min(var(--slotted-space-6, 1rem), 45%);
|
|
907
|
+
border-end-end-radius: inherit;
|
|
908
|
+
border-end-start-radius: inherit;
|
|
909
|
+
content: '';
|
|
910
|
+
inset-block-end: 0;
|
|
911
|
+
inset-inline: 0;
|
|
912
|
+
pointer-events: none;
|
|
913
|
+
position: absolute;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* An event that has ended steps back: less of its colour, its words in the
|
|
918
|
+
* muted ink. The day's remaining events are the ones a reader acts on.
|
|
919
|
+
*/
|
|
920
|
+
[data-ui='event-calendar'] [data-part='event'][data-past]:not([data-open], [data-dragging]) {
|
|
921
|
+
--_tint: 7%;
|
|
922
|
+
--_tint-hover: 13%;
|
|
923
|
+
--_edge: 20%;
|
|
924
|
+
--_tint-dark: 12%;
|
|
925
|
+
--_tint-hover-dark: 19%;
|
|
926
|
+
--_edge-dark: 26%;
|
|
927
|
+
--_ink-mix: 30%;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
[data-ui='event-calendar']
|
|
931
|
+
[data-part='day-events']
|
|
932
|
+
> [data-part='event'][data-past]:not([data-bar])::before {
|
|
933
|
+
opacity: 0.55;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
[data-ui='event-calendar']
|
|
937
|
+
[data-part='day-events']
|
|
938
|
+
> [data-part='event'][data-past]:not([data-bar]) {
|
|
939
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/* The list steps a past event back the same way: its mark faded and its
|
|
943
|
+
words in the muted ink, the time and the place quieter still. */
|
|
944
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'][data-past]::before {
|
|
945
|
+
opacity: 0.55;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'][data-past] {
|
|
949
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* A bar across days is drawn in the cell of its first day in the row, as
|
|
954
|
+
* wide as the cells it covers less the air at both ends: `span` cells, each
|
|
955
|
+
* its content plus two insets and one rule, less the inset and rule of the
|
|
956
|
+
* last. It is placed out of flow in its lane's grid area — the cell's lanes
|
|
957
|
+
* are its containing block — for two reasons: the cells after it paint their
|
|
958
|
+
* ground after it in tree order, and a bar under the next cell's ground is a
|
|
959
|
+
* bar cut off at the first edge; and a bar in flow is content running out of
|
|
960
|
+
* its cell, where a placed one is a box put where it belongs.
|
|
961
|
+
*
|
|
962
|
+
* A bar that goes on past the row — into next week, or from last week —
|
|
963
|
+
* stops in the air like any other, with its end squared and a chevron on
|
|
964
|
+
* it pointing the way it continues. Running it into the table's edge made
|
|
965
|
+
* it read as clipped rather than continued.
|
|
966
|
+
*/
|
|
967
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] {
|
|
968
|
+
block-size: var(--_event-size);
|
|
969
|
+
inline-size: calc(
|
|
970
|
+
var(--slotted-event-span, 1) * (100% + 2 * var(--_pad, 0px) + var(--_rule-width)) - 2 *
|
|
971
|
+
var(--_pad, 0px) - var(--_rule-width)
|
|
972
|
+
);
|
|
973
|
+
inset-block-start: 0;
|
|
974
|
+
inset-inline-start: 0;
|
|
975
|
+
position: absolute;
|
|
976
|
+
z-index: 1;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-continues-before] {
|
|
980
|
+
border-end-start-radius: 0;
|
|
981
|
+
border-start-start-radius: 0;
|
|
982
|
+
padding-inline-start: var(--slotted-space-1, 0.125rem);
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar][data-continues-after] {
|
|
986
|
+
border-end-end-radius: 0;
|
|
987
|
+
border-start-end-radius: 0;
|
|
988
|
+
padding-inline-end: var(--slotted-space-1, 0.125rem);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] > [data-ui='icon'][data-edge] {
|
|
992
|
+
color: color-mix(in oklab, var(--_hue) 70%, var(--slotted-text, #0f172a));
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] > [data-ui='icon'][data-edge='start'] {
|
|
996
|
+
rotate: 180deg;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] > [data-ui='icon'][data-edge='end'] {
|
|
1000
|
+
margin-inline-start: auto;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
[data-ui='event-calendar']:dir(rtl)
|
|
1004
|
+
[data-part='event'][data-bar]
|
|
1005
|
+
> [data-ui='icon'][data-edge='start'] {
|
|
1006
|
+
rotate: 0deg;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
[data-ui='event-calendar']:dir(rtl)
|
|
1010
|
+
[data-part='event'][data-bar]
|
|
1011
|
+
> [data-ui='icon'][data-edge='end'] {
|
|
1012
|
+
rotate: 180deg;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Tentative is the edge without the ground, dashed: an event not yet agreed
|
|
1017
|
+
* is an outline of one. Cancelled keeps its place and strikes its title, so
|
|
1018
|
+
* the slot a reader remembers is still where they remember it.
|
|
1019
|
+
*/
|
|
1020
|
+
[data-ui='event-calendar']
|
|
1021
|
+
[data-part='event'][data-status='tentative'][data-bar]:not([data-open], [data-dragging]),
|
|
1022
|
+
[data-ui='event-calendar']
|
|
1023
|
+
[data-part='column']
|
|
1024
|
+
> [data-part='event'][data-status='tentative']:not([data-open], [data-dragging]) {
|
|
1025
|
+
--_tint: 0%;
|
|
1026
|
+
--_tint-hover: 7%;
|
|
1027
|
+
--_tint-active: 12%;
|
|
1028
|
+
--_tint-dark: 0%;
|
|
1029
|
+
--_tint-hover-dark: 12%;
|
|
1030
|
+
--_tint-active-dark: 18%;
|
|
1031
|
+
|
|
1032
|
+
border-color: var(--_hue);
|
|
1033
|
+
border-style: dashed;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
[data-ui='event-calendar'] [data-part='event'][data-status='cancelled'] {
|
|
1037
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
[data-ui='event-calendar']
|
|
1041
|
+
[data-part='event'][data-status='cancelled']
|
|
1042
|
+
[data-part='event-title'] {
|
|
1043
|
+
text-decoration: line-through;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* ── Editing ─────────────────────────────────────────────────────────────
|
|
1048
|
+
*
|
|
1049
|
+
* An editable event in a grid is picked up by a press that travels four
|
|
1050
|
+
* pixels; `touch-action: none` is what lets a finger drag it instead of
|
|
1051
|
+
* scrolling the page under it. While it moves it is drawn where it would
|
|
1052
|
+
* land — the layout is the family's own, not a ghost — lifted by the
|
|
1053
|
+
* floating shadow, and it lets the pointer through to the cell beneath it so
|
|
1054
|
+
* the cell under the finger is the one it lands on.
|
|
1055
|
+
*/
|
|
1056
|
+
[data-ui='event-calendar'] [data-part='event'][data-editable] {
|
|
1057
|
+
cursor: grab;
|
|
1058
|
+
touch-action: none;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
[data-ui='event-calendar'] [data-part='event'][data-dragging] {
|
|
1062
|
+
box-shadow: var(--slotted-shadow-md, none);
|
|
1063
|
+
cursor: grabbing;
|
|
1064
|
+
pointer-events: none;
|
|
1065
|
+
z-index: 5;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* The end an edit pulls: the bottom of a block, the inline end of a bar. A
|
|
1070
|
+
* strip the width of the air around an event, drawn with a short grip only
|
|
1071
|
+
* while the event is hovered or focused, so a resting grid carries no marks
|
|
1072
|
+
* nobody is using.
|
|
1073
|
+
*/
|
|
1074
|
+
[data-ui='event-calendar'] [data-part='resize-handle'] {
|
|
1075
|
+
display: flex;
|
|
1076
|
+
inset-block-end: 0;
|
|
1077
|
+
inset-inline: 0;
|
|
1078
|
+
align-items: center;
|
|
1079
|
+
block-size: var(--slotted-space-4, 0.5rem);
|
|
1080
|
+
cursor: ns-resize;
|
|
1081
|
+
justify-content: center;
|
|
1082
|
+
position: absolute;
|
|
1083
|
+
touch-action: none;
|
|
1084
|
+
/* Over the fade a block ends in, which is painted after its children. */
|
|
1085
|
+
z-index: 1;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] > [data-part='resize-handle'] {
|
|
1089
|
+
block-size: auto;
|
|
1090
|
+
cursor: ew-resize;
|
|
1091
|
+
inline-size: var(--slotted-space-4, 0.5rem);
|
|
1092
|
+
inset-block: 0;
|
|
1093
|
+
inset-inline: auto 0;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
[data-ui='event-calendar'] [data-part='resize-handle']::before {
|
|
1097
|
+
background-color: var(--_ink, var(--_hue));
|
|
1098
|
+
block-size: var(--slotted-border-width-thick, 2px);
|
|
1099
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
1100
|
+
content: '';
|
|
1101
|
+
inline-size: var(--slotted-space-6, 1rem);
|
|
1102
|
+
opacity: 0;
|
|
1103
|
+
/* The grip leaves on the exit curve and arrives, below, on the enter one. */
|
|
1104
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar] > [data-part='resize-handle']::before {
|
|
1108
|
+
block-size: var(--slotted-space-4, 0.5rem);
|
|
1109
|
+
inline-size: var(--slotted-border-width-thick, 2px);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
[data-ui='event-calendar']
|
|
1113
|
+
[data-part='event']:hover:not([data-disabled])
|
|
1114
|
+
> [data-part='resize-handle']::before,
|
|
1115
|
+
[data-ui='event-calendar']
|
|
1116
|
+
[data-part='event']:focus-visible
|
|
1117
|
+
> [data-part='resize-handle']::before,
|
|
1118
|
+
[data-ui='event-calendar']
|
|
1119
|
+
[data-part='event'][data-dragging]
|
|
1120
|
+
> [data-part='resize-handle']::before {
|
|
1121
|
+
opacity: 1;
|
|
1122
|
+
transition-timing-function: var(--slotted-easing-enter);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/** "+N": a quiet line under the lanes, or a block in the last column. */
|
|
1126
|
+
[data-ui='event-calendar'] [data-part='more'] {
|
|
1127
|
+
align-items: center;
|
|
1128
|
+
appearance: none;
|
|
1129
|
+
background-color: transparent;
|
|
1130
|
+
block-size: var(--_event-size);
|
|
1131
|
+
border: var(--slotted-border-width-thin, 1px) solid transparent;
|
|
1132
|
+
border-radius: var(--_event-radius);
|
|
1133
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1134
|
+
cursor: pointer;
|
|
1135
|
+
display: inline-flex;
|
|
1136
|
+
font: inherit;
|
|
1137
|
+
font-size: var(--_event-font-size);
|
|
1138
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1139
|
+
/* "+2" and "more" are two items of the flex row, which drops the space
|
|
1140
|
+
between them; the gap is that space. */
|
|
1141
|
+
gap: 0.3em;
|
|
1142
|
+
max-inline-size: 100%;
|
|
1143
|
+
overflow: hidden;
|
|
1144
|
+
padding-block: 0;
|
|
1145
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
1146
|
+
transition:
|
|
1147
|
+
background-color var(--slotted-control-transition-duration)
|
|
1148
|
+
var(--slotted-control-transition-easing),
|
|
1149
|
+
border-color var(--slotted-control-transition-duration)
|
|
1150
|
+
var(--slotted-control-transition-easing),
|
|
1151
|
+
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
1152
|
+
white-space: nowrap;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
[data-ui='event-calendar'] [data-part='more']:hover:not([data-disabled]),
|
|
1156
|
+
[data-ui='event-calendar'] [data-part='more'][aria-expanded='true'] {
|
|
1157
|
+
background-color: var(--slotted-tone-secondary-subtle-hover, #eef1f5);
|
|
1158
|
+
color: var(--slotted-text, #0f172a);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
[data-ui='event-calendar'] [data-part='more']:active:not([data-disabled]) {
|
|
1162
|
+
background-color: var(--slotted-tone-secondary-subtle-active, #e2e8f0);
|
|
1163
|
+
transition-duration: var(--slotted-duration-instant);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* What an event keeps when it is narrow. The title is the event's name and
|
|
1168
|
+
* goes last; the time is already said by where the event stands, and the
|
|
1169
|
+
* place is a detail. A day of the month narrower than a time and a word keeps
|
|
1170
|
+
* the mark and the title; a block narrower than a word keeps the title, and
|
|
1171
|
+
* one narrower than three letters keeps its colour alone — its name stays in
|
|
1172
|
+
* the accessibility tree whatever the width. Cut to "D…" and "1:…", the
|
|
1173
|
+
* words were noise that looked like text.
|
|
1174
|
+
*/
|
|
1175
|
+
@container slotted-event-calendar-day (max-width: 7.5rem) {
|
|
1176
|
+
[data-ui='event-calendar']
|
|
1177
|
+
[data-part='day-events']
|
|
1178
|
+
> [data-part='event']:not([data-bar])
|
|
1179
|
+
> [data-part='event-time'] {
|
|
1180
|
+
display: none;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
@container slotted-event-calendar-event (max-width: 4.5rem) {
|
|
1185
|
+
[data-ui='event-calendar']
|
|
1186
|
+
[data-part='column']
|
|
1187
|
+
> [data-part='event']
|
|
1188
|
+
> [data-part='event-time'],
|
|
1189
|
+
[data-ui='event-calendar']
|
|
1190
|
+
[data-part='column']
|
|
1191
|
+
> [data-part='event']
|
|
1192
|
+
> [data-part='event-location'] {
|
|
1193
|
+
display: none;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] {
|
|
1197
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
@container slotted-event-calendar-event (max-width: 2rem) {
|
|
1202
|
+
[data-ui='event-calendar']
|
|
1203
|
+
[data-part='column']
|
|
1204
|
+
> [data-part='event']
|
|
1205
|
+
> [data-part='event-title'] {
|
|
1206
|
+
block-size: 1px;
|
|
1207
|
+
clip-path: inset(50%);
|
|
1208
|
+
inline-size: 1px;
|
|
1209
|
+
overflow: hidden;
|
|
1210
|
+
position: absolute;
|
|
1211
|
+
white-space: nowrap;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
@container slotted-event-calendar-event (max-width: 4.5rem) {
|
|
1216
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'] > span {
|
|
1217
|
+
display: none;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* ── The time grid ───────────────────────────────────────────────────────
|
|
1223
|
+
*
|
|
1224
|
+
* Three rows that must share their columns: the headers, the all-day lanes
|
|
1225
|
+
* and the hours. They are three grids with one template, not one grid, so
|
|
1226
|
+
* the hours can scroll under the two that stay. The two that stay reserve
|
|
1227
|
+
* the scroller's gutter, which is what keeps a column header over its
|
|
1228
|
+
* column when the hours have a scrollbar and the headers do not.
|
|
1229
|
+
*/
|
|
1230
|
+
[data-ui='event-calendar'] [data-part='time-grid'] {
|
|
1231
|
+
border-block-start: var(--_rule-width) solid var(--_rule);
|
|
1232
|
+
display: flex;
|
|
1233
|
+
flex: 1 1 auto;
|
|
1234
|
+
flex-direction: column;
|
|
1235
|
+
min-block-size: 0;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
[data-ui='event-calendar'] [data-part='time-head'] {
|
|
1239
|
+
border-block-end: var(--_rule-width) solid var(--_rule);
|
|
1240
|
+
overflow: hidden;
|
|
1241
|
+
scrollbar-gutter: stable;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
[data-ui='event-calendar'] [data-part='columns'],
|
|
1245
|
+
[data-ui='event-calendar'] [data-part='all-day-row'],
|
|
1246
|
+
[data-ui='event-calendar'] [data-part='time-row'] {
|
|
1247
|
+
display: grid;
|
|
1248
|
+
grid-template-columns: var(--_gutter) repeat(
|
|
1249
|
+
var(--slotted-event-calendar-days, 7),
|
|
1250
|
+
minmax(0, 1fr)
|
|
1251
|
+
);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
[data-ui='event-calendar'] [data-part='columns'] {
|
|
1255
|
+
border-block-end: var(--_rule-width) solid var(--_rule);
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
[data-ui='event-calendar'] [data-part='zone'] {
|
|
1259
|
+
align-self: end;
|
|
1260
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1261
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1262
|
+
font-variant-numeric: tabular-nums;
|
|
1263
|
+
line-height: var(--_line-xs);
|
|
1264
|
+
overflow: hidden;
|
|
1265
|
+
padding-block: var(--slotted-space-3, 0.375rem);
|
|
1266
|
+
padding-inline: var(--slotted-space-2, 0.25rem) var(--slotted-space-3, 0.375rem);
|
|
1267
|
+
text-align: end;
|
|
1268
|
+
text-overflow: ellipsis;
|
|
1269
|
+
white-space: nowrap;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* The weekday over the date, centred in the column. The date is a round
|
|
1274
|
+
* mark with its digits centred in it, and a weekday set on the column's
|
|
1275
|
+
* start edge sat a padding and a half away from digits it was meant to
|
|
1276
|
+
* stand over.
|
|
1277
|
+
*/
|
|
1278
|
+
[data-ui='event-calendar'] [data-part='column-header'] {
|
|
1279
|
+
align-items: center;
|
|
1280
|
+
border-inline-start: var(--_rule-width) solid var(--_rule);
|
|
1281
|
+
display: flex;
|
|
1282
|
+
flex-direction: column;
|
|
1283
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
1284
|
+
min-inline-size: 0;
|
|
1285
|
+
padding-block: var(--slotted-space-3, 0.375rem);
|
|
1286
|
+
padding-inline: var(--_air);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
[data-ui='event-calendar'] [data-part='column-header'] [data-part='weekday'] {
|
|
1290
|
+
max-inline-size: 100%;
|
|
1291
|
+
padding: 0;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
[data-ui='event-calendar'] [data-part='column-header'][data-today] [data-part='weekday'] {
|
|
1295
|
+
color: var(--slotted-tone-accent-text, #1d4ed8);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
[data-ui='event-calendar'] [data-part='column-header'] [data-part='day-number'] {
|
|
1299
|
+
block-size: var(--slotted-control-inner-size-lg, 28px);
|
|
1300
|
+
font-size: var(--slotted-font-size-lg, 1rem);
|
|
1301
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1302
|
+
min-inline-size: var(--slotted-control-inner-size-lg, 28px);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
[data-ui='event-calendar'] [data-part='column-header'] [data-part='day-content'],
|
|
1306
|
+
[data-ui='event-calendar'] [data-part='offset-change'] {
|
|
1307
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1308
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1309
|
+
line-height: var(--_line-xs);
|
|
1310
|
+
max-inline-size: 100%;
|
|
1311
|
+
overflow: hidden;
|
|
1312
|
+
text-align: center;
|
|
1313
|
+
text-overflow: ellipsis;
|
|
1314
|
+
white-space: nowrap;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
/* Two short lines rather than an ellipsis: "Dia inteiro" in the gutter of
|
|
1318
|
+
"12 PM" read "Dia int…". */
|
|
1319
|
+
[data-ui='event-calendar'] [data-part='all-day-label'] {
|
|
1320
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1321
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1322
|
+
hyphens: auto;
|
|
1323
|
+
line-height: var(--_line-xs);
|
|
1324
|
+
overflow-wrap: break-word;
|
|
1325
|
+
padding-block: calc(var(--_air) + (var(--_event-size) - 1lh) / 2);
|
|
1326
|
+
padding-inline: var(--slotted-space-2, 0.25rem) var(--slotted-space-3, 0.375rem);
|
|
1327
|
+
text-align: end;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
[data-ui='event-calendar'] [data-part='all-day-cell'] {
|
|
1331
|
+
--_pad: var(--_air);
|
|
1332
|
+
|
|
1333
|
+
border-inline-start: var(--_rule-width) solid var(--_rule);
|
|
1334
|
+
min-inline-size: 0;
|
|
1335
|
+
padding: var(--_pad);
|
|
1336
|
+
position: relative;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
[data-ui='event-calendar'] [data-part='scroller'] {
|
|
1340
|
+
flex: 1 1 40rem;
|
|
1341
|
+
max-block-size: max-content;
|
|
1342
|
+
min-block-size: 0;
|
|
1343
|
+
overflow-y: auto;
|
|
1344
|
+
overscroll-behavior: contain;
|
|
1345
|
+
scrollbar-gutter: stable;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
[data-ui='event-calendar'] [data-part='gutter'] {
|
|
1349
|
+
display: flex;
|
|
1350
|
+
flex-direction: column;
|
|
1351
|
+
min-inline-size: 0;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* An hour label is set on the line it names, half above and half below it.
|
|
1356
|
+
* The first hour's line is the grid's own top edge, so its label is not
|
|
1357
|
+
* drawn: half of it would hang above the scroller.
|
|
1358
|
+
*/
|
|
1359
|
+
[data-ui='event-calendar'] [data-part='hour'] {
|
|
1360
|
+
block-size: var(--_hour);
|
|
1361
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1362
|
+
flex: 0 0 auto;
|
|
1363
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1364
|
+
font-variant-numeric: tabular-nums;
|
|
1365
|
+
line-height: var(--_line-xs);
|
|
1366
|
+
overflow: hidden;
|
|
1367
|
+
padding-inline-end: var(--slotted-space-3, 0.375rem);
|
|
1368
|
+
text-align: end;
|
|
1369
|
+
text-overflow: ellipsis;
|
|
1370
|
+
translate: 0 calc(var(--_line-xs) / -2);
|
|
1371
|
+
white-space: nowrap;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
[data-ui='event-calendar'] [data-part='hour']:nth-child(1 of [data-part='hour']) {
|
|
1375
|
+
visibility: hidden;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* A column is its day's hours. The hour rules and the slot rules are a
|
|
1380
|
+
* background, not elements: forty-eight lines a day across seven days would
|
|
1381
|
+
* be three hundred nodes that say nothing.
|
|
1382
|
+
*/
|
|
1383
|
+
[data-ui='event-calendar'] [data-part='column'] {
|
|
1384
|
+
background-image:
|
|
1385
|
+
linear-gradient(to bottom, var(--_rule) var(--_rule-width), transparent var(--_rule-width)),
|
|
1386
|
+
linear-gradient(
|
|
1387
|
+
to bottom,
|
|
1388
|
+
color-mix(in oklab, var(--_rule) 45%, transparent) var(--_rule-width),
|
|
1389
|
+
transparent var(--_rule-width)
|
|
1390
|
+
);
|
|
1391
|
+
background-size:
|
|
1392
|
+
100% var(--_hour),
|
|
1393
|
+
100% calc(var(--_hour) * var(--slotted-event-calendar-slot, 30) / 60);
|
|
1394
|
+
border-inline-start: var(--_rule-width) solid var(--_rule);
|
|
1395
|
+
min-inline-size: 0;
|
|
1396
|
+
position: relative;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
[data-ui='event-calendar'] [data-part='column'][data-today] {
|
|
1400
|
+
background-color: color-mix(
|
|
1401
|
+
in oklab,
|
|
1402
|
+
var(--slotted-tone-accent-surface, #eff6ff) 50%,
|
|
1403
|
+
transparent
|
|
1404
|
+
);
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* A block in a column: its place and height are minutes, its column and
|
|
1409
|
+
* span a share of the day's width. Every block stands in the air: off the
|
|
1410
|
+
* column's rule, off its neighbour, off the hour line it starts on and the
|
|
1411
|
+
* block that starts where it ends. The last stretch of the column's width is
|
|
1412
|
+
* left clear, so there is always an empty slot under the pointer to press.
|
|
1413
|
+
*/
|
|
1414
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'],
|
|
1415
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'],
|
|
1416
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='selection'] {
|
|
1417
|
+
--_room: calc(100% - var(--slotted-space-5, 0.75rem));
|
|
1418
|
+
--_share: calc(var(--_room) / var(--slotted-event-columns, 1));
|
|
1419
|
+
|
|
1420
|
+
block-size: max(
|
|
1421
|
+
calc(var(--slotted-event-length, 30) * var(--_hour) / 60 - var(--_air)),
|
|
1422
|
+
var(--_event-size)
|
|
1423
|
+
);
|
|
1424
|
+
inline-size: calc(var(--_share) * var(--slotted-event-span, 1) - var(--_air));
|
|
1425
|
+
inset-block-start: calc(var(--slotted-event-start, 0) * var(--_hour) / 60 + var(--_air) / 2);
|
|
1426
|
+
inset-inline-start: calc(var(--_share) * var(--slotted-event-column, 0) + var(--_air));
|
|
1427
|
+
position: absolute;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] {
|
|
1431
|
+
align-content: start;
|
|
1432
|
+
align-items: start;
|
|
1433
|
+
container: slotted-event-calendar-event / inline-size;
|
|
1434
|
+
flex-direction: column;
|
|
1435
|
+
gap: 0;
|
|
1436
|
+
padding-block: var(--slotted-space-1, 0.125rem);
|
|
1437
|
+
z-index: 1;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* The lines of a block keep their height and the block clips what does not
|
|
1442
|
+
* fit, the last line first. A flex column that shrank them laid the time
|
|
1443
|
+
* over the title in a one-hour block at `dense`.
|
|
1444
|
+
*/
|
|
1445
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] > * {
|
|
1446
|
+
flex-shrink: 0;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
[data-ui='event-calendar']
|
|
1450
|
+
[data-part='column']
|
|
1451
|
+
> [data-part='event']
|
|
1452
|
+
> [data-part='event-title'] {
|
|
1453
|
+
max-inline-size: 100%;
|
|
1454
|
+
order: -1;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* A block tall enough for two lines wraps its title on words, up to three
|
|
1459
|
+
* lines, before it truncates: a block a third of a column wide showed
|
|
1460
|
+
* "Design …" where "Design critique" fits on two lines. A word wider than
|
|
1461
|
+
* the block is hyphenated in the page's language, and cut only without one.
|
|
1462
|
+
*/
|
|
1463
|
+
[data-ui='event-calendar']
|
|
1464
|
+
[data-part='column']
|
|
1465
|
+
> [data-part='event']:not([data-short])
|
|
1466
|
+
> [data-part='event-title'] {
|
|
1467
|
+
-webkit-box-orient: vertical;
|
|
1468
|
+
display: -webkit-box;
|
|
1469
|
+
hyphens: auto;
|
|
1470
|
+
-webkit-line-clamp: 3;
|
|
1471
|
+
line-clamp: 3;
|
|
1472
|
+
overflow-wrap: break-word;
|
|
1473
|
+
white-space: normal;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
[data-ui='event-calendar']
|
|
1477
|
+
[data-part='column']
|
|
1478
|
+
> [data-part='event']
|
|
1479
|
+
> [data-part='event-location'],
|
|
1480
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] > [data-part='event-time'] {
|
|
1481
|
+
max-inline-size: 100%;
|
|
1482
|
+
overflow: hidden;
|
|
1483
|
+
text-overflow: ellipsis;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* A short block puts its time after its title on one line, and the title
|
|
1488
|
+
* takes the room first: a block that can show one word shows the name, not
|
|
1489
|
+
* the hour the grid already states by where the block stands.
|
|
1490
|
+
*/
|
|
1491
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-short] {
|
|
1492
|
+
align-items: center;
|
|
1493
|
+
flex-direction: row;
|
|
1494
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
1495
|
+
padding-block: 0;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
[data-ui='event-calendar']
|
|
1499
|
+
[data-part='column']
|
|
1500
|
+
> [data-part='event'][data-short]
|
|
1501
|
+
> [data-part='event-title'] {
|
|
1502
|
+
flex: 0 0 auto;
|
|
1503
|
+
max-inline-size: 100%;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
[data-ui='event-calendar']
|
|
1507
|
+
[data-part='column']
|
|
1508
|
+
> [data-part='event'][data-short]
|
|
1509
|
+
> [data-part='event-time'] {
|
|
1510
|
+
flex: 1 1 0;
|
|
1511
|
+
min-inline-size: 0;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* A block that goes on above or below what the column shows — it began
|
|
1516
|
+
* yesterday, it ends tomorrow, it runs past the visible hours — has that
|
|
1517
|
+
* edge squared and dashed: the same edge, broken where the event is not
|
|
1518
|
+
* over.
|
|
1519
|
+
*/
|
|
1520
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-clipped-start],
|
|
1521
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-continues-before] {
|
|
1522
|
+
border-block-start-style: dashed;
|
|
1523
|
+
border-start-end-radius: 0;
|
|
1524
|
+
border-start-start-radius: 0;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-clipped-end],
|
|
1528
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'][data-continues-after] {
|
|
1529
|
+
border-block-end-style: dashed;
|
|
1530
|
+
border-end-end-radius: 0;
|
|
1531
|
+
border-end-start-radius: 0;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/* A step of muted ink over the page, not the sunken surface: in the dark
|
|
1535
|
+
scheme that surface lies below the page, and the "+N" read as a hole.
|
|
1536
|
+
Hover and press take six more points of the same ink each, 9, 15 and
|
|
1537
|
+
21: the surface's own hover landed within a hundredth of the rest in
|
|
1538
|
+
every scheme, lighter than the chip in the light one. */
|
|
1539
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'] {
|
|
1540
|
+
align-items: start;
|
|
1541
|
+
container: slotted-event-calendar-event / inline-size;
|
|
1542
|
+
background-color: color-mix(in oklab, var(--slotted-text-muted, #5b6b7f) 9%, var(--_base));
|
|
1543
|
+
border-color: color-mix(in oklab, var(--slotted-text-muted, #5b6b7f) 24%, var(--_base));
|
|
1544
|
+
padding-block: var(--slotted-space-1, 0.125rem);
|
|
1545
|
+
z-index: 1;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more']:hover:not([data-disabled]),
|
|
1549
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'][aria-expanded='true'] {
|
|
1550
|
+
background-color: color-mix(in oklab, var(--slotted-text-muted, #5b6b7f) 15%, var(--_base));
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more']:active:not([data-disabled]) {
|
|
1554
|
+
background-color: color-mix(in oklab, var(--slotted-text-muted, #5b6b7f) 21%, var(--_base));
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* A day one column wide draws its first events whole and lays the count of
|
|
1559
|
+
* the rest at the end of the time they take, at the end of the line: a chip
|
|
1560
|
+
* on the surface, not a column of its own, clear of the title the drawn
|
|
1561
|
+
* event opens with. It is the day's "+N" by every other measure — the same
|
|
1562
|
+
* popover, the same name — and shows the count alone.
|
|
1563
|
+
*/
|
|
1564
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'][data-overlay] {
|
|
1565
|
+
align-items: center;
|
|
1566
|
+
background-color: var(--_base);
|
|
1567
|
+
block-size: auto;
|
|
1568
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
1569
|
+
box-shadow: var(--slotted-shadow-sm, none);
|
|
1570
|
+
/* Not a container: a size container ignores its content, and the chip
|
|
1571
|
+
is exactly its content. */
|
|
1572
|
+
container-type: normal;
|
|
1573
|
+
inline-size: auto;
|
|
1574
|
+
inset-block-start: calc(
|
|
1575
|
+
(var(--slotted-event-start, 0) + var(--slotted-event-length, 30)) * var(--_hour) / 60 -
|
|
1576
|
+
var(--_air)
|
|
1577
|
+
);
|
|
1578
|
+
inset-inline: auto var(--slotted-space-4, 0.5rem);
|
|
1579
|
+
line-height: var(--_line-xs);
|
|
1580
|
+
translate: 0 -100%;
|
|
1581
|
+
padding-block: 0;
|
|
1582
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1583
|
+
z-index: 3;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'][data-overlay] > span {
|
|
1587
|
+
display: none;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='selection'] {
|
|
1591
|
+
background-color: var(
|
|
1592
|
+
--slotted-event-calendar-selection-background,
|
|
1593
|
+
var(--slotted-tone-accent-surface, #eff6ff)
|
|
1594
|
+
);
|
|
1595
|
+
border: var(--slotted-border-width-thin, 1px) solid
|
|
1596
|
+
var(
|
|
1597
|
+
--slotted-event-calendar-selection-border-color,
|
|
1598
|
+
var(--slotted-tone-accent-border, #2563eb)
|
|
1599
|
+
);
|
|
1600
|
+
border-radius: var(--_event-radius);
|
|
1601
|
+
color: var(--slotted-tone-accent-text, #1d4ed8);
|
|
1602
|
+
font-size: var(--_event-font-size);
|
|
1603
|
+
font-variant-numeric: tabular-nums;
|
|
1604
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1605
|
+
inline-size: calc(var(--_room) - var(--_air));
|
|
1606
|
+
inset-inline-start: var(--_air);
|
|
1607
|
+
line-height: var(--_line-xs);
|
|
1608
|
+
overflow: hidden;
|
|
1609
|
+
padding-block: var(--slotted-space-1, 0.125rem);
|
|
1610
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1611
|
+
pointer-events: none;
|
|
1612
|
+
text-overflow: ellipsis;
|
|
1613
|
+
white-space: nowrap;
|
|
1614
|
+
z-index: 2;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
/** Time nobody works in: the same step off the page in every scheme. */
|
|
1618
|
+
[data-ui='event-calendar'] [data-part='off-hours'] {
|
|
1619
|
+
background-color: var(--slotted-event-calendar-off-background, var(--_off));
|
|
1620
|
+
block-size: calc(var(--slotted-event-length, 0) * var(--_hour) / 60);
|
|
1621
|
+
inset-block-start: calc(var(--slotted-event-start, 0) * var(--_hour) / 60);
|
|
1622
|
+
inset-inline: 0;
|
|
1623
|
+
pointer-events: none;
|
|
1624
|
+
position: absolute;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Now: a thick accent line across today's column, with a dot where it meets
|
|
1629
|
+
* the column's edge. Accent and not danger — the present is not a failure.
|
|
1630
|
+
*/
|
|
1631
|
+
[data-ui='event-calendar'] [data-part='now'],
|
|
1632
|
+
[data-ui='event-calendar'] [data-part='offset-line'] {
|
|
1633
|
+
inset-block-start: calc(var(--slotted-event-start, 0) * var(--_hour) / 60);
|
|
1634
|
+
inset-inline: 0;
|
|
1635
|
+
pointer-events: none;
|
|
1636
|
+
position: absolute;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
[data-ui='event-calendar'] [data-part='now'] {
|
|
1640
|
+
border-block-start: var(--slotted-border-width-thick, 2px) solid
|
|
1641
|
+
var(--slotted-event-calendar-now-color, var(--slotted-tone-accent-solid, #2563eb));
|
|
1642
|
+
translate: 0 -50%;
|
|
1643
|
+
z-index: 2;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
[data-ui='event-calendar'] [data-part='now']::before {
|
|
1647
|
+
background-color: var(
|
|
1648
|
+
--slotted-event-calendar-now-color,
|
|
1649
|
+
var(--slotted-tone-accent-solid, #2563eb)
|
|
1650
|
+
);
|
|
1651
|
+
block-size: var(--slotted-space-4, 0.5rem);
|
|
1652
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
1653
|
+
content: '';
|
|
1654
|
+
inline-size: var(--slotted-space-4, 0.5rem);
|
|
1655
|
+
inset-block-start: calc(
|
|
1656
|
+
var(--slotted-space-4, 0.5rem) / -2 - var(--slotted-border-width-thick, 2px) / 2
|
|
1657
|
+
);
|
|
1658
|
+
inset-inline-start: calc(var(--slotted-space-4, 0.5rem) / -2);
|
|
1659
|
+
position: absolute;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
[data-ui='event-calendar'] [data-part='offset-line'] {
|
|
1663
|
+
border-block-start: var(--slotted-border-width-thin, 1px) dashed
|
|
1664
|
+
var(--slotted-border-strong, #78899c);
|
|
1665
|
+
z-index: 1;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* ── The list ────────────────────────────────────────────────────────────
|
|
1670
|
+
*
|
|
1671
|
+
* A day per section: its heading on the start side, its events beside it,
|
|
1672
|
+
* and one rule between days. Reached through the root and the body, so a
|
|
1673
|
+
* description list in a detail — whose own part is also `list` — keeps none
|
|
1674
|
+
* of it.
|
|
1675
|
+
*/
|
|
1676
|
+
[data-ui='event-calendar'] > [data-part='body'] > [data-part='list'] {
|
|
1677
|
+
border-block-start: var(--_rule-width) solid var(--_rule);
|
|
1678
|
+
display: flex;
|
|
1679
|
+
flex-direction: column;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
[data-ui='event-calendar'] [data-part='list-day'] {
|
|
1683
|
+
border-block-end: var(--_rule-width) solid var(--_rule);
|
|
1684
|
+
column-gap: var(--slotted-space-6, 1rem);
|
|
1685
|
+
display: grid;
|
|
1686
|
+
grid-template-columns: calc(var(--slotted-space-12, 4rem) * 2) minmax(0, 1fr);
|
|
1687
|
+
padding-block: var(--slotted-space-4, 0.5rem);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* The day in two lines: the weekday small and quiet over the date, which
|
|
1692
|
+
* carries the weight. A line of its own each, so the date is never broken
|
|
1693
|
+
* inside itself; beside the events at every width but the narrowest, where
|
|
1694
|
+
* the two sit on one line above them.
|
|
1695
|
+
*/
|
|
1696
|
+
[data-ui='event-calendar'] [data-part='list-day-heading'] {
|
|
1697
|
+
display: flex;
|
|
1698
|
+
flex-direction: column;
|
|
1699
|
+
margin: 0;
|
|
1700
|
+
padding-block: var(--slotted-space-3, 0.375rem);
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
[data-ui='event-calendar'] [data-part='list-weekday'] {
|
|
1704
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1705
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1706
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1707
|
+
line-height: var(--_line-xs);
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
[data-ui='event-calendar'] [data-part='list-date'] {
|
|
1711
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
1712
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
1713
|
+
line-height: var(--_line-sm);
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
[data-ui='event-calendar'] [data-part='list-day'][data-today] [data-part='list-day-heading'],
|
|
1717
|
+
[data-ui='event-calendar'] [data-part='list-day'][data-today] [data-part='list-weekday'] {
|
|
1718
|
+
color: var(--slotted-tone-accent-text, #1d4ed8);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
[data-ui='event-calendar'] [data-part='list-events'] {
|
|
1722
|
+
display: flex;
|
|
1723
|
+
flex-direction: column;
|
|
1724
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
1725
|
+
list-style: none;
|
|
1726
|
+
margin: 0;
|
|
1727
|
+
padding: 0;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* A list row: the time in a column of its own, the calendar's mark, the
|
|
1732
|
+
* title and the place under it. The time column is one width for every row,
|
|
1733
|
+
* so the titles start on one line down the whole list.
|
|
1734
|
+
*/
|
|
1735
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'] {
|
|
1736
|
+
align-items: start;
|
|
1737
|
+
column-gap: var(--slotted-space-4, 0.5rem);
|
|
1738
|
+
display: grid;
|
|
1739
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
1740
|
+
/* Wide enough for "11:00 AM – 12:00 PM" on one line at the list's size. */
|
|
1741
|
+
grid-template-columns: calc(var(--slotted-space-12, 4rem) * 2.5) auto minmax(0, 1fr);
|
|
1742
|
+
inline-size: 100%;
|
|
1743
|
+
line-height: var(--_line-sm);
|
|
1744
|
+
min-block-size: var(--slotted-control-height-md, 34px);
|
|
1745
|
+
padding-block: var(--slotted-space-3, 0.375rem);
|
|
1746
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
/** The mark sits on the centre of the title's first line, whatever the row's height. */
|
|
1750
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event']::before {
|
|
1751
|
+
grid-column: 2;
|
|
1752
|
+
grid-row: 1;
|
|
1753
|
+
margin-block-start: calc((1lh - var(--slotted-space-4, 0.5rem)) / 2);
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event-time'] {
|
|
1757
|
+
grid-column: 1;
|
|
1758
|
+
grid-row: 1;
|
|
1759
|
+
white-space: normal;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
/* A row grows downward, so a list wraps what a grid cell truncates. */
|
|
1763
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event-title'] {
|
|
1764
|
+
grid-column: 3;
|
|
1765
|
+
grid-row: 1;
|
|
1766
|
+
overflow-wrap: break-word;
|
|
1767
|
+
white-space: normal;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event-location'] {
|
|
1771
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1772
|
+
grid-column: 3;
|
|
1773
|
+
line-height: var(--_line-xs);
|
|
1774
|
+
grid-row: 2;
|
|
1775
|
+
overflow-wrap: break-word;
|
|
1776
|
+
white-space: normal;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
[data-ui='event-calendar']
|
|
1780
|
+
[data-part='list-events']
|
|
1781
|
+
[data-part='event']:hover:not([data-disabled]) {
|
|
1782
|
+
background-color: var(--slotted-tone-secondary-subtle-hover, #eef1f5);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
[data-ui='event-calendar']
|
|
1786
|
+
[data-part='list-events']
|
|
1787
|
+
[data-part='event']:active:not([data-disabled], [data-open], [data-context]) {
|
|
1788
|
+
background-color: var(--slotted-tone-secondary-subtle-active, #e2e8f0);
|
|
1789
|
+
transition-duration: var(--slotted-duration-instant);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'][data-open],
|
|
1793
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'][data-context] {
|
|
1794
|
+
background-color: light-dark(
|
|
1795
|
+
color-mix(in oklab, var(--_hue) var(--_tint), var(--_base)),
|
|
1796
|
+
color-mix(in oklab, var(--_hue) var(--_tint-dark), var(--_base))
|
|
1797
|
+
);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
[data-ui='event-calendar']
|
|
1801
|
+
[data-part='list-events']
|
|
1802
|
+
[data-part='event'][data-status='tentative']::before {
|
|
1803
|
+
background-color: transparent;
|
|
1804
|
+
border: var(--slotted-border-width-medium, 1.5px) solid var(--_hue);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
/* The day and the hours of the detail break between them, never inside. */
|
|
1808
|
+
[data-ui='event-calendar'] [data-part='detail-day'],
|
|
1809
|
+
[data-ui='event-calendar'] [data-part='detail-range'] {
|
|
1810
|
+
display: inline-block;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* The detail's body holds the application's blocks — a description list, a
|
|
1815
|
+
* row of actions — and spaces them, so a template needs no wrapper to keep
|
|
1816
|
+
* its button off the list above it.
|
|
1817
|
+
*/
|
|
1818
|
+
[data-ui='event-calendar'] [data-ui='popover'] > [data-part='content'] > [data-part='body'],
|
|
1819
|
+
[data-ui='event-calendar'] [data-ui='drawer'] [data-part='panel'] > [data-part='body'] {
|
|
1820
|
+
display: grid;
|
|
1821
|
+
gap: var(--slotted-space-5, 0.75rem);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* The events of one day in the "+N" panel: the mark and the title, the time
|
|
1826
|
+
* under the title. The panel is a sixth of a page wide, and a column of time
|
|
1827
|
+
* beside the titles left each title a word.
|
|
1828
|
+
*/
|
|
1829
|
+
[data-ui='event-calendar'] [data-part='list-events'][data-layout='stacked'] [data-part='event'] {
|
|
1830
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
[data-ui='event-calendar']
|
|
1834
|
+
[data-part='list-events'][data-layout='stacked']
|
|
1835
|
+
[data-part='event']::before {
|
|
1836
|
+
grid-column: 1;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
[data-ui='event-calendar']
|
|
1840
|
+
[data-part='list-events'][data-layout='stacked']
|
|
1841
|
+
[data-part='event-title'] {
|
|
1842
|
+
grid-column: 2;
|
|
1843
|
+
grid-row: 1;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
[data-ui='event-calendar']
|
|
1847
|
+
[data-part='list-events'][data-layout='stacked']
|
|
1848
|
+
[data-part='event-time'] {
|
|
1849
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1850
|
+
grid-column: 2;
|
|
1851
|
+
grid-row: 2;
|
|
1852
|
+
line-height: var(--_line-xs);
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
[data-ui='event-calendar']
|
|
1856
|
+
[data-part='list-events'][data-layout='stacked']
|
|
1857
|
+
[data-part='event-location'] {
|
|
1858
|
+
grid-column: 2;
|
|
1859
|
+
grid-row: 3;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
[data-ui='event-calendar'] [data-part='empty'] {
|
|
1863
|
+
align-items: center;
|
|
1864
|
+
color: var(--slotted-text-muted, #5b6b7f);
|
|
1865
|
+
display: flex;
|
|
1866
|
+
flex-direction: column;
|
|
1867
|
+
gap: var(--slotted-space-5, 0.75rem);
|
|
1868
|
+
padding-block: var(--slotted-space-10, 2.5rem);
|
|
1869
|
+
padding-inline: var(--slotted-space-6, 1rem);
|
|
1870
|
+
text-align: center;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* ── Reflow ──────────────────────────────────────────────────────────────
|
|
1875
|
+
*
|
|
1876
|
+
* The breakpoints are literal because CSS forbids a custom property in a
|
|
1877
|
+
* container condition. They answer the calendar's own width, never the
|
|
1878
|
+
* viewport's. The switch from a grid to a list under 600 pixels is the
|
|
1879
|
+
* script's, because it changes what is in the DOM; everything here is a
|
|
1880
|
+
* grid that stays a grid, laid out for the room it has.
|
|
1881
|
+
*
|
|
1882
|
+
* 960: the header's five areas no longer fit one row beside a day view's
|
|
1883
|
+
* title ("Wednesday, September 23, 2026"), so the title and the navigation
|
|
1884
|
+
* take the first row and the views and the filter the second.
|
|
1885
|
+
*/
|
|
1886
|
+
@container slotted-event-calendar (max-width: 959px) {
|
|
1887
|
+
/* The navigation spans the last two columns of the first line: held to
|
|
1888
|
+
the fourth alone, it made that column its width, and with no actions
|
|
1889
|
+
the filter stopped short of the edge by the width of three buttons. */
|
|
1890
|
+
[data-ui='event-calendar'] > [data-part='header'] {
|
|
1891
|
+
grid-template-areas:
|
|
1892
|
+
'title title navigation navigation'
|
|
1893
|
+
'views . filter actions';
|
|
1894
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
[data-ui='event-calendar'] [data-part='navigation'] {
|
|
1898
|
+
justify-self: end;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
[data-ui='event-calendar'] [data-part='views'] {
|
|
1902
|
+
margin-inline-start: 0;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* 600: a list row's time column goes under its title, the month and the
|
|
1908
|
+
* week draw their events as marks of colour, and the day becomes the
|
|
1909
|
+
* target. Seven columns of 50 pixels hold a colour and nothing legible:
|
|
1910
|
+
* three letters of a title are a guess, not a name, and every event keeps
|
|
1911
|
+
* its whole name for assistive technology.
|
|
1912
|
+
*/
|
|
1913
|
+
@container slotted-event-calendar (max-width: 599px) {
|
|
1914
|
+
[data-ui='event-calendar'][data-part='root'] {
|
|
1915
|
+
--_gutter: calc(var(--slotted-space-10, 2.5rem) + var(--slotted-space-2, 0.25rem));
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
[data-ui='event-calendar'] [data-part='list-day'] {
|
|
1919
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1920
|
+
row-gap: var(--slotted-space-1, 0.125rem);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
/* Above the events, the weekday and the date read as one line. */
|
|
1924
|
+
[data-ui='event-calendar'] [data-part='list-day-heading'] {
|
|
1925
|
+
align-items: baseline;
|
|
1926
|
+
column-gap: var(--slotted-space-3, 0.375rem);
|
|
1927
|
+
flex-direction: row;
|
|
1928
|
+
flex-wrap: wrap;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'] {
|
|
1932
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event']::before {
|
|
1936
|
+
grid-column: 1;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event-title'] {
|
|
1940
|
+
grid-column: 2;
|
|
1941
|
+
grid-row: 1;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event-time'] {
|
|
1945
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1946
|
+
grid-column: 2;
|
|
1947
|
+
grid-row: 2;
|
|
1948
|
+
line-height: var(--_line-xs);
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event-location'] {
|
|
1952
|
+
grid-column: 2;
|
|
1953
|
+
grid-row: 3;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='day'] {
|
|
1957
|
+
--_event-size: var(--slotted-space-3, 0.375rem);
|
|
1958
|
+
--_air: var(--slotted-space-1, 0.125rem);
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='day-header'] {
|
|
1962
|
+
margin-block-end: var(--slotted-space-2, 0.25rem);
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='day-number'] {
|
|
1966
|
+
block-size: var(--slotted-control-inner-size-sm, 22px);
|
|
1967
|
+
min-inline-size: var(--slotted-control-inner-size-sm, 22px);
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
/** The whole cell is the day's target, through its number. */
|
|
1971
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='day-number']::after {
|
|
1972
|
+
content: '';
|
|
1973
|
+
inset: 0;
|
|
1974
|
+
position: absolute;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
/* A month's mark is six pixels tall and no target; the day is. A block in
|
|
1978
|
+
a column is a column wide and stays one. */
|
|
1979
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event'] {
|
|
1980
|
+
padding: 0;
|
|
1981
|
+
pointer-events: none;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* A block with no words carries its calendar alone, so it takes the
|
|
1986
|
+
* pressed tint and the calendar's own edge: at the resting tint a column
|
|
1987
|
+
* of pale blocks read as one colour.
|
|
1988
|
+
*/
|
|
1989
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] {
|
|
1990
|
+
background-color: light-dark(
|
|
1991
|
+
color-mix(in oklab, var(--_hue) var(--_tint-active), var(--_base)),
|
|
1992
|
+
color-mix(in oklab, var(--_hue) var(--_tint-active-dark), var(--_base))
|
|
1993
|
+
);
|
|
1994
|
+
border-color: var(--_hue);
|
|
1995
|
+
padding: 0;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'] {
|
|
1999
|
+
justify-content: center;
|
|
2000
|
+
padding-inline: 0;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event'][data-bar] {
|
|
2004
|
+
background-color: var(--_hue);
|
|
2005
|
+
border-color: var(--_hue);
|
|
2006
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event']:not([data-bar]) {
|
|
2010
|
+
inline-size: var(--slotted-space-4, 0.5rem);
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event']::before {
|
|
2014
|
+
block-size: var(--slotted-space-3, 0.375rem);
|
|
2015
|
+
inline-size: var(--slotted-space-3, 0.375rem);
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event'][data-bar]::before,
|
|
2019
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event'][data-bar]::after {
|
|
2020
|
+
display: none;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='event'] > *,
|
|
2024
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] > *,
|
|
2025
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='day-content'],
|
|
2026
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='more'] > *,
|
|
2027
|
+
[data-ui='event-calendar'] [data-part='column-header'] [data-part='day-content'],
|
|
2028
|
+
[data-ui='event-calendar'] [data-part='offset-change'] {
|
|
2029
|
+
block-size: 1px;
|
|
2030
|
+
clip-path: inset(50%);
|
|
2031
|
+
inline-size: 1px;
|
|
2032
|
+
margin: -1px;
|
|
2033
|
+
overflow: hidden;
|
|
2034
|
+
padding: 0;
|
|
2035
|
+
position: absolute;
|
|
2036
|
+
white-space: nowrap;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='more'] {
|
|
2040
|
+
block-size: auto;
|
|
2041
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
2042
|
+
line-height: var(--_line-xs);
|
|
2043
|
+
padding: 0;
|
|
2044
|
+
pointer-events: none;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
[data-ui='event-calendar'] [data-part='month'] [data-part='day-events'] {
|
|
2048
|
+
grid-template-rows:
|
|
2049
|
+
repeat(var(--slotted-event-calendar-lanes, 3), var(--_event-size))
|
|
2050
|
+
auto;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
[data-ui='event-calendar'] [data-part='column-header'] [data-part='day-number'] {
|
|
2054
|
+
block-size: var(--slotted-control-inner-size-md, 24px);
|
|
2055
|
+
font-size: var(--slotted-font-size-md, 0.875rem);
|
|
2056
|
+
min-inline-size: var(--slotted-control-inner-size-md, 24px);
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'],
|
|
2060
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='more'] {
|
|
2061
|
+
--_room: 100%;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* 480: the title takes a row of its own, the navigation and the filter the
|
|
2067
|
+
* next, and the views the whole width of the last, one equal segment each.
|
|
2068
|
+
* The filter keeps its name for assistive technology and draws its funnel
|
|
2069
|
+
* alone.
|
|
2070
|
+
*/
|
|
2071
|
+
@container slotted-event-calendar (max-width: 479px) {
|
|
2072
|
+
[data-ui='event-calendar'] > [data-part='header'] {
|
|
2073
|
+
grid-template-areas:
|
|
2074
|
+
'title title title title'
|
|
2075
|
+
'navigation . filter actions'
|
|
2076
|
+
'views views views views';
|
|
2077
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
[data-ui='event-calendar'] [data-part='navigation'] {
|
|
2081
|
+
justify-self: start;
|
|
2082
|
+
margin-inline-start: 0;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
[data-ui='event-calendar'] [data-part='views'] > * {
|
|
2086
|
+
flex: 1 1 auto;
|
|
2087
|
+
min-inline-size: 0;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
[data-ui='event-calendar'] [data-part='filter'] {
|
|
2091
|
+
inline-size: var(--slotted-control-height-md, 34px);
|
|
2092
|
+
padding-inline: 0;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
/* The funnel stays: an icon-only control keeps its mark and names itself
|
|
2096
|
+
with the words it hides. The chevron goes with the words. */
|
|
2097
|
+
[data-ui='event-calendar'] [data-part='filter'] > [data-ui='icon']:last-child {
|
|
2098
|
+
display: none;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
[data-ui='event-calendar'] [data-part='filter'] > :not([data-ui='icon']) {
|
|
2102
|
+
block-size: 1px;
|
|
2103
|
+
clip-path: inset(50%);
|
|
2104
|
+
inline-size: 1px;
|
|
2105
|
+
margin: -1px;
|
|
2106
|
+
overflow: hidden;
|
|
2107
|
+
position: absolute;
|
|
2108
|
+
white-space: nowrap;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
@media (forced-colors: active) {
|
|
2113
|
+
/* The event's dot and the now marker are shapes painted with a
|
|
2114
|
+
background, which forced colours would replace: the mark would go and
|
|
2115
|
+
the box it sat in would stay. The icons are `Glyph` elements stroked
|
|
2116
|
+
with the forced ink, and need nothing here. */
|
|
2117
|
+
[data-ui='event-calendar'] [data-part='event']::before,
|
|
2118
|
+
[data-ui='event-calendar'] [data-part='now']::before {
|
|
2119
|
+
forced-color-adjust: none;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* The tint has nothing to mix in a palette the system replaced, so an
|
|
2124
|
+
* event keeps its edge, in the text colour.
|
|
2125
|
+
*/
|
|
2126
|
+
[data-ui='event-calendar'] [data-part='event'][data-bar],
|
|
2127
|
+
[data-ui='event-calendar'] [data-part='column'] > [data-part='event'] {
|
|
2128
|
+
border-color: currentcolor;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
/* A timed line of the month and a row of the list have no edge: the
|
|
2132
|
+
transparent one they keep for geometry would be painted in the text
|
|
2133
|
+
colour, and the line would read as a bar. */
|
|
2134
|
+
[data-ui='event-calendar'] [data-part='day-events'] > [data-part='event']:not([data-bar]),
|
|
2135
|
+
[data-ui='event-calendar'] [data-part='list-events'] [data-part='event'] {
|
|
2136
|
+
border-color: Canvas;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
/* Today is the one filled mark: the system's own highlight pair, kept
|
|
2140
|
+
whole, where the replaced palette left a ring round an empty square. */
|
|
2141
|
+
[data-ui='event-calendar'] [data-today] > [data-part='day-header'] [data-part='day-number'],
|
|
2142
|
+
[data-ui='event-calendar'] [data-part='column-header'][data-today] [data-part='day-number'] {
|
|
2143
|
+
background-color: Highlight;
|
|
2144
|
+
color: HighlightText;
|
|
2145
|
+
forced-color-adjust: none;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
}
|