@redvars/peacock 4.4.0 → 4.5.0

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.
Files changed (236) hide show
  1. package/dist/{BaseField-Cj2rNVeC.js → BaseField-BbOj212R.js} +3 -3
  2. package/dist/{BaseField-Cj2rNVeC.js.map → BaseField-BbOj212R.js.map} +1 -1
  3. package/dist/{BaseInput-CSOLv2-i.js → BaseInput-Cv03GZLu.js} +2 -2
  4. package/dist/{BaseInput-CSOLv2-i.js.map → BaseInput-Cv03GZLu.js.map} +1 -1
  5. package/dist/ai-badge.js +2 -2
  6. package/dist/ai-summary.js +2 -2
  7. package/dist/alert.js +2 -2
  8. package/dist/anchor-nav.js +2 -2
  9. package/dist/app-shell.js +2 -2
  10. package/dist/assistant-panel.js +2 -2
  11. package/dist/assistant-step.js +2 -2
  12. package/dist/assistant-steps.js +2 -2
  13. package/dist/avatar-group.js +2 -2
  14. package/dist/banner.js +2 -2
  15. package/dist/{base-progress-DduJjUeq.js → base-progress-CqsyiVOV.js} +2 -2
  16. package/dist/{base-progress-DduJjUeq.js.map → base-progress-CqsyiVOV.js.map} +1 -1
  17. package/dist/bottom-sheet.js +2 -2
  18. package/dist/breadcrumb.js +2 -2
  19. package/dist/calendar-column-view.js +648 -30
  20. package/dist/calendar-column-view.js.map +1 -1
  21. package/dist/calendar-drag-IXMPZrTN.js +344 -0
  22. package/dist/calendar-drag-IXMPZrTN.js.map +1 -0
  23. package/dist/{calendar-event-_OYdAT3c.js → calendar-event-BQChlMXy.js} +15 -4
  24. package/dist/calendar-event-BQChlMXy.js.map +1 -0
  25. package/dist/calendar-header-DVrfThwr.js +59 -0
  26. package/dist/calendar-header-DVrfThwr.js.map +1 -0
  27. package/dist/calendar-month-view.js +311 -21
  28. package/dist/calendar-month-view.js.map +1 -1
  29. package/dist/calendar-timeline.js +1877 -0
  30. package/dist/calendar-timeline.js.map +1 -0
  31. package/dist/calendar.js +224 -62
  32. package/dist/calendar.js.map +1 -1
  33. package/dist/{canvas-base-Bfpv5_HJ.js → canvas-base-BjiU3Ecl.js} +2 -2
  34. package/dist/{canvas-base-Bfpv5_HJ.js.map → canvas-base-BjiU3Ecl.js.map} +1 -1
  35. package/dist/carousel.js +2 -2
  36. package/dist/{cartesian-chart-SnqFbbXV.js → cartesian-chart-iE3cmeGF.js} +2 -2
  37. package/dist/{cartesian-chart-SnqFbbXV.js.map → cartesian-chart-iE3cmeGF.js.map} +1 -1
  38. package/dist/{cb-group-base-DZIzMlen.js → cb-group-base-CWctDJvy.js} +2 -2
  39. package/dist/{cb-group-base-DZIzMlen.js.map → cb-group-base-CWctDJvy.js.map} +1 -1
  40. package/dist/cb-group.js +3 -3
  41. package/dist/cb-rule.js +3 -3
  42. package/dist/chart-area.js +4 -4
  43. package/dist/chart-bar.js +4 -4
  44. package/dist/{chart-base-C2N0WQLI.js → chart-base-CDyVDmz7.js} +2 -2
  45. package/dist/{chart-base-C2N0WQLI.js.map → chart-base-CDyVDmz7.js.map} +1 -1
  46. package/dist/chart-doughnut.js +3 -3
  47. package/dist/chart-line.js +4 -4
  48. package/dist/chart-pie.js +3 -3
  49. package/dist/chat-event.js +2 -2
  50. package/dist/chat-message.js +2 -2
  51. package/dist/chat-thread.js +2 -2
  52. package/dist/checkbox-group.js +3 -3
  53. package/dist/checkbox.js +3 -3
  54. package/dist/chip-set.js +2 -2
  55. package/dist/chip.js +2 -2
  56. package/dist/circular-progress.js +3 -3
  57. package/dist/citation.js +2 -2
  58. package/dist/code-editor.js +3 -3
  59. package/dist/code-highlighter.js +2 -2
  60. package/dist/color-field.js +4 -4
  61. package/dist/color-picker.js +2 -2
  62. package/dist/command-palette.js +2 -2
  63. package/dist/comment-composer.js +4 -4
  64. package/dist/condition-builder.js +3 -3
  65. package/dist/confirm-dialog.js +2 -2
  66. package/dist/copy-button.js +2 -2
  67. package/dist/currency-field.js +4 -4
  68. package/dist/custom-elements-jsdocs.json +52 -129
  69. package/dist/custom-elements.json +3109 -5
  70. package/dist/{date-vFrYT1S9.js → date-cfPx3alz.js} +20 -3
  71. package/dist/date-cfPx3alz.js.map +1 -0
  72. package/dist/date-field.js +8 -8
  73. package/dist/date-picker.js +4 -4
  74. package/dist/date-range-field.js +8 -8
  75. package/dist/datetime-field.js +7 -7
  76. package/dist/dependency-map.js +3 -3
  77. package/dist/description-item.js +2 -2
  78. package/dist/description-list.js +2 -2
  79. package/dist/{diagram-W_Kddt7I.js → diagram-D2aM93kf.js} +2 -2
  80. package/dist/{diagram-W_Kddt7I.js.map → diagram-D2aM93kf.js.map} +1 -1
  81. package/dist/diagram-controls.js +2 -2
  82. package/dist/diagram-minimap.js +2 -2
  83. package/dist/diagram.js +4 -4
  84. package/dist/diff-viewer.js +2 -2
  85. package/dist/discussion-activity.js +2 -2
  86. package/dist/discussion-comment.js +2 -2
  87. package/dist/discussion.js +4 -4
  88. package/dist/{document-editor-dBgmcyUW.js → document-editor-BS6al7Hq.js} +2 -2
  89. package/dist/{document-editor-dBgmcyUW.js.map → document-editor-BS6al7Hq.js.map} +1 -1
  90. package/dist/document-editor.js +3 -3
  91. package/dist/draft-card.js +2 -2
  92. package/dist/erd.js +3 -3
  93. package/dist/{event-manager-CWAWPOUE.js → event-manager-KGMT2x2Q.js} +10 -8
  94. package/dist/event-manager-KGMT2x2Q.js.map +1 -0
  95. package/dist/file-upload.js +3 -3
  96. package/dist/filter-bar.js +4 -4
  97. package/dist/flow.js +4 -4
  98. package/dist/form.js +2 -2
  99. package/dist/{generative-view-CfW6yMpY.js → generative-view-DsSOPf26.js} +2 -2
  100. package/dist/{generative-view-CfW6yMpY.js.map → generative-view-DsSOPf26.js.map} +1 -1
  101. package/dist/generative-view.js +3 -3
  102. package/dist/html-editor.js +4 -4
  103. package/dist/{i18n-controller-DNAjVSIP.js → i18n-controller-BTeChxE0.js} +2 -2
  104. package/dist/{i18n-controller-DNAjVSIP.js.map → i18n-controller-BTeChxE0.js.map} +1 -1
  105. package/dist/image.js +2 -2
  106. package/dist/index.js +26 -23
  107. package/dist/index.js.map +1 -1
  108. package/dist/inline-edit.js +2 -2
  109. package/dist/input.js +3 -3
  110. package/dist/json-viewer.js +2 -2
  111. package/dist/kanban.js +2 -2
  112. package/dist/kbd.js +2 -2
  113. package/dist/linear-progress.js +3 -3
  114. package/dist/listbox.js +2 -2
  115. package/dist/loader-full.js +13 -13
  116. package/dist/loader.js +17 -13
  117. package/dist/loader.js.map +1 -1
  118. package/dist/markdown-editor.js +4 -4
  119. package/dist/mention-input.js +4 -4
  120. package/dist/modal.js +2 -2
  121. package/dist/navigation-bar.js +2 -2
  122. package/dist/navigation-drawer.js +2 -2
  123. package/dist/navigation-rail.js +2 -2
  124. package/dist/notification-center.js +2 -2
  125. package/dist/number-field.js +4 -4
  126. package/dist/page-header.js +2 -2
  127. package/dist/pagination.js +2 -2
  128. package/dist/password-field.js +4 -4
  129. package/dist/password-rules.js +2 -2
  130. package/dist/phone-field.js +4 -4
  131. package/dist/{picker-field-Mi7_hbo8.js → picker-field-DmXYPvbF.js} +3 -3
  132. package/dist/{picker-field-Mi7_hbo8.js.map → picker-field-DmXYPvbF.js.map} +1 -1
  133. package/dist/pin-input.js +4 -4
  134. package/dist/presence-indicator.js +2 -2
  135. package/dist/prompt-input.js +4 -4
  136. package/dist/radio.js +3 -3
  137. package/dist/{range-utils-BoKOhxVX.js → range-utils-DZe96GnO.js} +2 -2
  138. package/dist/{range-utils-BoKOhxVX.js.map → range-utils-DZe96GnO.js.map} +1 -1
  139. package/dist/rating.js +3 -3
  140. package/dist/redvars-loader.js +2 -2
  141. package/dist/relative-time.js +2 -2
  142. package/dist/resizable-panels.js +2 -2
  143. package/dist/{rich-text-input-O1ku1q-J.js → rich-text-input-BCZ46UF8.js} +3 -3
  144. package/dist/{rich-text-input-O1ku1q-J.js.map → rich-text-input-BCZ46UF8.js.map} +1 -1
  145. package/dist/{schema-BWH1ANdE.js → schema-D0PCeIEA.js} +2 -2
  146. package/dist/{schema-BWH1ANdE.js.map → schema-D0PCeIEA.js.map} +1 -1
  147. package/dist/search.js +3 -3
  148. package/dist/select.js +4 -4
  149. package/dist/side-sheet.js +2 -2
  150. package/dist/signature-pad.js +3 -3
  151. package/dist/site-header.js +2 -2
  152. package/dist/slider.js +3 -3
  153. package/dist/snackbar.js +2 -2
  154. package/dist/sparkline.js +2 -2
  155. package/dist/split-button.js +2 -2
  156. package/dist/src/__internal/i18n/strings.d.ts +16 -0
  157. package/dist/src/__internal/utils/date.d.ts +5 -0
  158. package/dist/src/calendar/base-event.d.ts +5 -0
  159. package/dist/src/calendar/calendar-column-view.d.ts +65 -1
  160. package/dist/src/calendar/calendar-drag.d.ts +91 -0
  161. package/dist/src/calendar/calendar-header.d.ts +28 -0
  162. package/dist/src/calendar/calendar-month-view.d.ts +39 -1
  163. package/dist/src/calendar/calendar.d.ts +83 -6
  164. package/dist/src/calendar/index.d.ts +2 -2
  165. package/dist/src/calendar/types.d.ts +32 -0
  166. package/dist/src/calendar/utils.d.ts +53 -0
  167. package/dist/src/calendar-timeline/calendar-timeline.d.ts +287 -0
  168. package/dist/src/calendar-timeline/index.d.ts +3 -0
  169. package/dist/src/calendar-timeline/layout.d.ts +39 -0
  170. package/dist/src/calendar-timeline/types.d.ts +60 -0
  171. package/dist/src/index.d.ts +4 -2
  172. package/dist/stat.js +2 -2
  173. package/dist/status-indicator.js +2 -2
  174. package/dist/step.js +2 -2
  175. package/dist/stepper.js +2 -2
  176. package/dist/{strings-BpCoUL0V.js → strings-DeiQWMd9.js} +18 -1
  177. package/dist/strings-DeiQWMd9.js.map +1 -0
  178. package/dist/svg.js +2 -2
  179. package/dist/switch.js +3 -3
  180. package/dist/table.js +2 -2
  181. package/dist/test/calendar-timeline.test.d.ts +1 -0
  182. package/dist/textarea.js +4 -4
  183. package/dist/time-field.js +7 -7
  184. package/dist/time-picker.js +4 -4
  185. package/dist/timeline-item.js +2 -2
  186. package/dist/timeline.js +2 -2
  187. package/dist/{toggle-base-BRNNka2o.js → toggle-base-BtjRAZ5z.js} +2 -2
  188. package/dist/{toggle-base-BRNNka2o.js.map → toggle-base-BtjRAZ5z.js.map} +1 -1
  189. package/dist/tour.js +2 -2
  190. package/dist/transfer-list.js +3 -3
  191. package/dist/tree-chart.js +3 -3
  192. package/dist/tree-item.js +2 -2
  193. package/dist/tree.js +2 -2
  194. package/dist/tsconfig.tsbuildinfo +1 -1
  195. package/dist/typing-indicator.js +2 -2
  196. package/dist/url-field.js +4 -4
  197. package/dist/user-menu.js +2 -2
  198. package/dist/{utils-D92ldd1V.js → utils-DcvLgexs.js} +116 -19
  199. package/dist/utils-DcvLgexs.js.map +1 -0
  200. package/dist/{video-DBdRuyh4.js → video-DPjOBk6I.js} +2 -2
  201. package/dist/{video-DBdRuyh4.js.map → video-DPjOBk6I.js.map} +1 -1
  202. package/dist/video.js +3 -3
  203. package/dist/virtual-list.js +2 -2
  204. package/dist/workflow-timeline.js +2 -2
  205. package/dist/workflow.js +3 -3
  206. package/dist/workspace-switcher.js +2 -2
  207. package/package.json +1 -1
  208. package/readme.md +1 -0
  209. package/src/__internal/i18n/strings.ts +25 -0
  210. package/src/__internal/utils/date.ts +19 -0
  211. package/src/calendar/_calendar-header.scss +33 -0
  212. package/src/calendar/base-event.ts +19 -2
  213. package/src/calendar/calendar-column-view.scss +174 -2
  214. package/src/calendar/calendar-column-view.ts +665 -37
  215. package/src/calendar/calendar-drag.ts +403 -0
  216. package/src/calendar/calendar-header.ts +78 -0
  217. package/src/calendar/calendar-month-view.scss +89 -0
  218. package/src/calendar/calendar-month-view.ts +289 -23
  219. package/src/calendar/calendar.scss +2 -27
  220. package/src/calendar/calendar.ts +264 -62
  221. package/src/calendar/event-manager.ts +11 -7
  222. package/src/calendar/index.ts +8 -2
  223. package/src/calendar/types.ts +35 -0
  224. package/src/calendar/utils.ts +160 -20
  225. package/src/calendar-timeline/calendar-timeline.scss +554 -0
  226. package/src/calendar-timeline/calendar-timeline.ts +1528 -0
  227. package/src/calendar-timeline/index.ts +14 -0
  228. package/src/calendar-timeline/layout.ts +129 -0
  229. package/src/calendar-timeline/types.ts +65 -0
  230. package/src/index.ts +18 -0
  231. package/src/loader.ts +4 -0
  232. package/dist/calendar-event-_OYdAT3c.js.map +0 -1
  233. package/dist/date-vFrYT1S9.js.map +0 -1
  234. package/dist/event-manager-CWAWPOUE.js.map +0 -1
  235. package/dist/strings-BpCoUL0V.js.map +0 -1
  236. package/dist/utils-D92ldd1V.js.map +0 -1
@@ -0,0 +1,554 @@
1
+ @use '../../scss/mixin';
2
+ @use '../calendar/calendar-header';
3
+
4
+ @include mixin.base-styles;
5
+
6
+ :host {
7
+ display: block;
8
+ height: 100%;
9
+ min-height: 16em;
10
+
11
+ --calendar-timeline-resource-width: 12rem;
12
+ --calendar-timeline-hour-width: 4rem;
13
+ --calendar-timeline-day-width: 3rem;
14
+ --calendar-timeline-lane-height: 2rem;
15
+ --calendar-timeline-border-color: var(--color-outline-variant);
16
+
17
+ --calendar-timeline-event-bg-color: var(--color-primary-container);
18
+ --calendar-timeline-event-bg-color--hover: var(--color-inverse-primary);
19
+ --calendar-timeline-event-border-color: var(--color-primary);
20
+ --calendar-timeline-event-text-color: var(--color-on-primary-container);
21
+ --calendar-timeline-event-text-color--hover: var(--color-on-primary);
22
+ }
23
+
24
+ .calendar-timeline {
25
+ --_resource-width: var(--calendar-timeline-resource-width);
26
+ --_lane: var(--calendar-timeline-lane-height);
27
+ --_pad: 0.375rem;
28
+ --_border: var(--calendar-timeline-border-color);
29
+
30
+ display: flex;
31
+ flex-direction: column;
32
+ height: 100%;
33
+ overflow: hidden;
34
+ border-radius: var(--shape-corner-large);
35
+ background: var(--color-surface);
36
+ color: var(--color-on-surface);
37
+ }
38
+
39
+ .calendar-header {
40
+ @include calendar-header.styles;
41
+ }
42
+
43
+ .loader {
44
+ display: block;
45
+ }
46
+
47
+ .body {
48
+ display: flex;
49
+ flex: 1;
50
+ flex-direction: column;
51
+ min-height: 0;
52
+ }
53
+
54
+ .message {
55
+ padding: 1rem;
56
+ color: var(--color-on-surface-variant);
57
+ }
58
+
59
+ /* ── Grid ── */
60
+
61
+ // One scroll container: the header stays at the top and the resource column at the inline start.
62
+ .scroller {
63
+ position: relative;
64
+ flex: 1;
65
+ min-height: 0;
66
+ overflow: auto;
67
+ border-top: 1px solid var(--_border);
68
+ }
69
+
70
+ // The resource column, then the time axis: columns share its width but never get narrower than
71
+ // --_slot-min, so a range that does not fit scrolls sideways.
72
+ .table {
73
+ display: grid;
74
+ grid-template-columns:
75
+ var(--_resource-width)
76
+ minmax(calc(var(--_slots) * var(--_slot-min)), 1fr);
77
+ width: max-content;
78
+ min-width: 100%;
79
+ }
80
+
81
+ // Rows keep their own boxes for assistive technology, and share the table's columns.
82
+ .rows,
83
+ .row {
84
+ display: grid;
85
+ grid-column: 1 / -1;
86
+ grid-template-columns: subgrid;
87
+ }
88
+
89
+ .rows {
90
+ position: relative;
91
+ }
92
+
93
+ /* ── Header ── */
94
+
95
+ .header-row {
96
+ position: sticky;
97
+ top: 0;
98
+ z-index: 3;
99
+ background: var(--color-surface-container);
100
+ border-bottom: 1px solid var(--_border);
101
+ }
102
+
103
+ .corner {
104
+ position: sticky;
105
+ inset-inline-start: 0;
106
+ z-index: 1;
107
+ display: flex;
108
+ align-items: flex-end;
109
+ padding: 0.5rem 0.75rem;
110
+ background: var(--color-surface-container);
111
+ border-inline-end: 1px solid var(--_border);
112
+ font-size: 0.75rem;
113
+ font-weight: 500;
114
+ color: var(--color-on-surface-variant);
115
+ }
116
+
117
+ .time-header {
118
+ min-width: 0;
119
+ }
120
+
121
+ .slot-labels {
122
+ display: grid;
123
+ grid-template-columns: repeat(var(--_slots), minmax(0, 1fr));
124
+ height: 100%;
125
+ }
126
+
127
+ .slot-label {
128
+ min-width: 0;
129
+ overflow: hidden;
130
+ padding: 0.375rem 0.25rem;
131
+ border-inline-start: 1px solid var(--_border);
132
+ font-size: 0.75rem;
133
+ color: var(--color-on-surface-variant);
134
+ text-overflow: ellipsis;
135
+ white-space: nowrap;
136
+ // "9 PM" starts with a digit, which takes no direction of its own; read it in its own direction.
137
+ unicode-bidi: plaintext;
138
+ }
139
+
140
+ .day-span {
141
+ grid-column: span 24;
142
+ border-bottom: 1px solid var(--_border);
143
+ font-weight: 500;
144
+ color: var(--color-on-surface);
145
+
146
+ &.today {
147
+ color: var(--color-primary);
148
+ }
149
+ }
150
+
151
+ .day-label {
152
+ display: flex;
153
+ flex-direction: column;
154
+ align-items: center;
155
+ gap: 0.125rem;
156
+
157
+ .day-number {
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: center;
161
+ min-inline-size: 1.75rem;
162
+ block-size: 1.75rem;
163
+ border-radius: var(--shape-corner-full);
164
+ font-size: 0.875rem;
165
+ font-weight: 500;
166
+ color: var(--color-on-surface);
167
+ }
168
+
169
+ &.today .day-number {
170
+ background: var(--color-primary);
171
+ color: var(--color-on-primary);
172
+ }
173
+ }
174
+
175
+ /* ── Rows ── */
176
+
177
+ .resource {
178
+ position: sticky;
179
+ inset-inline-start: 0;
180
+ z-index: 2;
181
+ display: flex;
182
+ flex-direction: column;
183
+ justify-content: center;
184
+ gap: 0.125rem;
185
+ min-width: 0;
186
+ padding: 0.5rem 0.75rem;
187
+ background: var(--color-surface);
188
+ border-inline-end: 1px solid var(--_border);
189
+ border-bottom: 1px solid var(--_border);
190
+
191
+ // Names and details come from the app, in either direction: each is read in its own.
192
+ .resource-title,
193
+ .resource-supporting {
194
+ overflow: hidden;
195
+ text-overflow: ellipsis;
196
+ white-space: nowrap;
197
+ unicode-bidi: plaintext;
198
+ }
199
+
200
+ .resource-title {
201
+ font-size: 0.875rem;
202
+ font-weight: 500;
203
+ }
204
+
205
+ .resource-supporting {
206
+ font-size: 0.75rem;
207
+ color: var(--color-on-surface-variant);
208
+ }
209
+ }
210
+
211
+ // A line at the start of every column, drawn as one background rather than an element each.
212
+ .track {
213
+ position: relative;
214
+ min-width: 0;
215
+ min-height: 3rem;
216
+ height: calc(var(--_lanes, 1) * var(--_lane) + 2 * var(--_pad));
217
+ border-bottom: 1px solid var(--_border);
218
+ background-image: linear-gradient(
219
+ to right,
220
+ var(--_border) 0 1px,
221
+ transparent 1px
222
+ );
223
+ background-size: calc(100% / var(--_slots)) 100%;
224
+ }
225
+
226
+ .empty {
227
+ grid-column: 1 / -1;
228
+ padding: 1.5rem;
229
+ text-align: center;
230
+ color: var(--color-on-surface-variant);
231
+ }
232
+
233
+ /* ── Groups ── */
234
+
235
+ .group-row {
236
+ background: var(--color-surface-container-low);
237
+ }
238
+
239
+ .group-header {
240
+ position: sticky;
241
+ inset-inline-start: 0;
242
+ z-index: 2;
243
+ display: flex;
244
+ align-items: center;
245
+ gap: 0.5rem;
246
+ min-width: 0;
247
+ padding: 0.375rem 0.75rem 0.375rem 0.25rem;
248
+ background: var(--color-surface-container-low);
249
+ border-inline-end: 1px solid var(--_border);
250
+ border-bottom: 1px solid var(--_border);
251
+ }
252
+
253
+ // The same disclosure as wc-table's group headers: the chevron points along the reading
254
+ // direction, and down when the group is open.
255
+ .group-toggle {
256
+ @include mixin.reset-button-styles;
257
+
258
+ display: inline-flex;
259
+ flex: none;
260
+ align-items: center;
261
+ justify-content: center;
262
+ inline-size: 1.75rem;
263
+ block-size: 1.75rem;
264
+ border-radius: var(--shape-corner-full);
265
+ color: var(--color-on-surface-variant);
266
+ cursor: pointer;
267
+
268
+ wc-icon {
269
+ --icon-size: 1.25rem;
270
+ font-size: 1.25rem;
271
+ transition: transform var(--duration-short4, 200ms) ease;
272
+ }
273
+
274
+ &[aria-expanded='true'] wc-icon {
275
+ transform: rotate(90deg);
276
+ }
277
+
278
+ &:dir(rtl) wc-icon {
279
+ transform: scaleX(-1);
280
+ }
281
+
282
+ &:dir(rtl)[aria-expanded='true'] wc-icon {
283
+ transform: rotate(90deg);
284
+ }
285
+
286
+ &:hover {
287
+ background: color-mix(in srgb, var(--color-on-surface) 8%, transparent);
288
+ }
289
+
290
+ &:focus-visible {
291
+ outline: 2px solid var(--color-primary);
292
+ outline-offset: 1px;
293
+ }
294
+ }
295
+
296
+ .group-label {
297
+ min-width: 0;
298
+ overflow: hidden;
299
+ font-size: 0.875rem;
300
+ font-weight: 600;
301
+ text-overflow: ellipsis;
302
+ white-space: nowrap;
303
+ unicode-bidi: plaintext;
304
+ }
305
+
306
+ .group-count {
307
+ flex: none;
308
+ font-size: 0.75rem;
309
+ color: var(--color-on-surface-variant);
310
+ font-variant-numeric: tabular-nums;
311
+ // "3 resources" starts with a digit; read it in its own direction.
312
+ unicode-bidi: plaintext;
313
+ }
314
+
315
+ .group-track {
316
+ position: relative;
317
+ min-width: 0;
318
+ border-bottom: 1px solid var(--_border);
319
+ }
320
+
321
+ // A collapsed group's events, overlapping where they overlap, so busier times read darker.
322
+ .summary {
323
+ position: absolute;
324
+ inset: 0;
325
+
326
+ .summary-bar {
327
+ position: absolute;
328
+ top: 50%;
329
+ height: 0.5rem;
330
+ min-width: 0.25rem;
331
+ margin-top: -0.25rem;
332
+ border-radius: var(--shape-corner-full);
333
+ background: var(--calendar-timeline-event-border-color);
334
+ opacity: 0.45;
335
+ }
336
+ }
337
+
338
+ /* ── Behind the rows: today, weekends, day boundaries and now ── */
339
+
340
+ .overlay {
341
+ position: absolute;
342
+ inset-block: 0;
343
+ inset-inline-start: var(--_resource-width);
344
+ inset-inline-end: 0;
345
+ pointer-events: none;
346
+
347
+ .stripe {
348
+ position: absolute;
349
+ inset-block: 0;
350
+ }
351
+
352
+ .weekend {
353
+ background: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
354
+ }
355
+
356
+ .today {
357
+ background: color-mix(in srgb, var(--color-primary) 6%, transparent);
358
+ }
359
+
360
+ .day-start {
361
+ border-inline-start: 1px solid var(--color-outline);
362
+ }
363
+
364
+ .now {
365
+ position: absolute;
366
+ z-index: 1;
367
+ inset-block: 0;
368
+ inline-size: 2px;
369
+ margin-inline-start: -1px;
370
+ background: var(--color-primary);
371
+ }
372
+ }
373
+
374
+ /* ── Events ── */
375
+
376
+ .event {
377
+ position: absolute;
378
+ top: calc(var(--_pad) + var(--_lane-index, 0) * var(--_lane));
379
+ display: flex;
380
+ align-items: center;
381
+ gap: 0.375rem;
382
+ min-width: 0.375rem;
383
+ height: calc(var(--_lane) - 0.25rem);
384
+ overflow: hidden;
385
+ padding: 0 0.375rem;
386
+ background: var(--calendar-timeline-event-bg-color);
387
+ border-inline-start: 0.25rem solid var(--calendar-timeline-event-border-color);
388
+ border-radius: var(--shape-corner-extra-small);
389
+ font-size: 0.75rem;
390
+ color: var(--calendar-timeline-event-text-color);
391
+ white-space: nowrap;
392
+ transition: background 150ms ease;
393
+ container-type: inline-size;
394
+
395
+ .event-title {
396
+ flex: 0 1 auto;
397
+ min-width: 0;
398
+ overflow: hidden;
399
+ font-weight: 500;
400
+ text-overflow: ellipsis;
401
+ unicode-bidi: plaintext;
402
+ }
403
+
404
+ // Times start with digits, which take no direction of their own: without this, "9:00 – 10:00
405
+ // AM" reads "AM 10:00 – 9:00" in a right-to-left page.
406
+ .event-time {
407
+ flex: 1 1 auto;
408
+ min-width: 0;
409
+ overflow: hidden;
410
+ opacity: 0.8;
411
+ text-overflow: ellipsis;
412
+ unicode-bidi: plaintext;
413
+ }
414
+
415
+ &.clickable {
416
+ cursor: pointer;
417
+
418
+ &:hover {
419
+ background: var(--calendar-timeline-event-bg-color--hover);
420
+ color: var(--calendar-timeline-event-text-color--hover);
421
+
422
+ .resize-handle {
423
+ color: var(--calendar-timeline-event-text-color--hover);
424
+ }
425
+ }
426
+
427
+ &:focus-visible {
428
+ z-index: 1;
429
+ outline: 2px solid var(--color-primary);
430
+ outline-offset: 1px;
431
+ }
432
+ }
433
+
434
+ &.editable {
435
+ cursor: grab;
436
+ user-select: none;
437
+ -webkit-touch-callout: none;
438
+ }
439
+
440
+ // The event being moved stays where it was, faded, while a copy shows where it will land.
441
+ &.drag-source {
442
+ opacity: 0.4;
443
+ }
444
+
445
+ // The event being resized, in place.
446
+ &.lifted {
447
+ z-index: 1;
448
+ box-shadow: var(--elevation-level2);
449
+ }
450
+
451
+ // A new event while it is drawn, a moved one where it will land, and the placeholder that
452
+ // marks a new event until the app adds it.
453
+ &.preview {
454
+ z-index: 1;
455
+ pointer-events: none;
456
+ box-shadow: var(--elevation-level2);
457
+ }
458
+
459
+ &.placeholder {
460
+ box-shadow: var(--elevation-level3);
461
+ }
462
+ }
463
+
464
+ // A bar too narrow for its title and times shows the title alone; its name still has both.
465
+ @container (max-width: 10rem) {
466
+ .event .event-time {
467
+ display: none;
468
+ }
469
+ }
470
+
471
+ // A grip at each edge an event can be resized by; the line in it shows on hover and focus.
472
+ .resize-handle {
473
+ position: absolute;
474
+ z-index: 1;
475
+ inset-block: 0;
476
+ inline-size: 0.375rem;
477
+ color: var(--calendar-timeline-event-text-color);
478
+ cursor: ew-resize;
479
+
480
+ &.start {
481
+ inset-inline-start: 0;
482
+ }
483
+
484
+ &.end {
485
+ inset-inline-end: 0;
486
+ }
487
+
488
+ &::after {
489
+ content: '';
490
+ position: absolute;
491
+ inset: 0;
492
+ margin: auto;
493
+ inline-size: 0.125rem;
494
+ block-size: 0.875rem;
495
+ border-radius: var(--shape-corner-full);
496
+ background: currentColor;
497
+ opacity: 0;
498
+ transition: opacity 150ms ease;
499
+ }
500
+ }
501
+
502
+ .event.editable:hover,
503
+ .event.editable:focus-visible,
504
+ .event.lifted {
505
+ .resize-handle::after {
506
+ opacity: 0.6;
507
+ }
508
+ }
509
+
510
+ /* ── Dragging ── */
511
+
512
+ // Empty time takes presses that add events, so it must not start a text selection or a
513
+ // long-press callout.
514
+ .scroller.addable .track {
515
+ user-select: none;
516
+ -webkit-touch-callout: none;
517
+ }
518
+
519
+ .scroller.dragging {
520
+ user-select: none;
521
+
522
+ // Other events let the pointer through, so they neither flicker on hover nor set the cursor.
523
+ .event {
524
+ pointer-events: none;
525
+ }
526
+ }
527
+
528
+ .scroller.drag-move {
529
+ cursor: grabbing;
530
+ }
531
+
532
+ .scroller.drag-resize {
533
+ cursor: ew-resize;
534
+ }
535
+
536
+ @media (forced-colors: active) {
537
+ .event.preview,
538
+ .event.lifted {
539
+ outline: 2px solid Highlight;
540
+ }
541
+
542
+ .overlay .today {
543
+ outline: 1px solid Highlight;
544
+ outline-offset: -1px;
545
+ }
546
+
547
+ .overlay .now {
548
+ background: Highlight;
549
+ }
550
+
551
+ .summary .summary-bar {
552
+ background: CanvasText;
553
+ }
554
+ }