rift-ds 1.34.0 → 1.35.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 (69) hide show
  1. package/README.md +3 -3
  2. package/behaviors/locale.d.ts +9 -0
  3. package/behaviors/locale.js +2 -0
  4. package/bin/templates/blocks/app/dashboard/page.tsx +1 -1
  5. package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -6
  6. package/chat/ChatTabs.js +1 -1
  7. package/chat/ChatWidget.d.ts +2 -2
  8. package/chat/ChatWidget.js +1 -1
  9. package/chat/DemoWelcome.js +2 -2
  10. package/chat/FollowupSuggestions.js +1 -1
  11. package/components/ActionBar/ActionBar.css +78 -0
  12. package/components/ActionBar/ActionBar.d.ts +40 -0
  13. package/components/ActionBar/ActionBar.js +29 -0
  14. package/components/AiButton/AiButton.js +1 -1
  15. package/components/Alert/Alert.css +16 -0
  16. package/components/Alert/Alert.d.ts +2 -2
  17. package/components/Alert/Alert.js +3 -1
  18. package/components/AppSidebar/AppSidebar.css +140 -4
  19. package/components/AppSidebar/AppSidebar.d.ts +12 -0
  20. package/components/AppSidebar/AppSidebar.js +7 -3
  21. package/components/ChatThread/ChatThread.d.ts +5 -1
  22. package/components/ChatThread/ChatThread.js +1 -1
  23. package/components/ContextMenu/ContextMenu.d.ts +5 -1
  24. package/components/ContextMenu/ContextMenu.js +2 -1
  25. package/components/ContributionGraph/ContributionGraph.d.ts +7 -1
  26. package/components/ContributionGraph/ContributionGraph.js +4 -18
  27. package/components/ContributionGraph/weeks.d.ts +8 -0
  28. package/components/ContributionGraph/weeks.js +25 -0
  29. package/components/DataTable/DataTable.js +1 -1
  30. package/components/DocumentChip/DocumentChip.js +1 -1
  31. package/components/EntitySwitcher/EntitySwitcher.css +11 -3
  32. package/components/EntitySwitcher/EntitySwitcher.js +1 -1
  33. package/components/EventCalendar/EventCalendar.css +152 -0
  34. package/components/EventCalendar/EventCalendar.d.ts +50 -4
  35. package/components/EventCalendar/EventCalendar.js +154 -23
  36. package/components/EventCalendar/eventTime.d.ts +31 -0
  37. package/components/EventCalendar/eventTime.js +42 -0
  38. package/components/FileInput/FileInput.d.ts +12 -4
  39. package/components/FileInput/FileInput.js +27 -4
  40. package/components/Input/Input.css +30 -0
  41. package/components/Input/Input.d.ts +8 -0
  42. package/components/Input/Input.js +3 -0
  43. package/components/Popover/Popover.d.ts +5 -1
  44. package/components/Popover/Popover.js +3 -1
  45. package/components/ProgressBar/ProgressBar.d.ts +5 -1
  46. package/components/ProgressBar/ProgressBar.js +1 -1
  47. package/components/PromptSuggestions/PromptSuggestions.d.ts +5 -1
  48. package/components/PromptSuggestions/PromptSuggestions.js +1 -1
  49. package/components/ResourceTimeline/ResourceTimeline.js +2 -2
  50. package/components/SegmentedControl/SegmentedControl.css +120 -3
  51. package/components/SegmentedControl/SegmentedControl.d.ts +9 -0
  52. package/components/SegmentedControl/SegmentedControl.js +11 -1
  53. package/components/ShaderScene/ShaderScene.d.ts +3 -3
  54. package/components/ShaderScene/scenes.d.ts +17 -0
  55. package/components/ShaderScene/scenes.js +175 -1
  56. package/components/Stat/Stat.css +12 -0
  57. package/components/Stat/Stat.d.ts +5 -0
  58. package/components/Stat/Stat.js +9 -3
  59. package/components/TableToolbar/TableToolbar.js +2 -2
  60. package/components/ThemeToggle/ThemeToggle.d.ts +1 -1
  61. package/components/ThreadTabs/ThreadTabs.d.ts +5 -1
  62. package/components/ThreadTabs/ThreadTabs.js +2 -1
  63. package/components/ToggleGroup/ToggleGroup.d.ts +5 -1
  64. package/components/registry.json +21 -4
  65. package/components/registry.json.d.ts +21 -4
  66. package/components/registry.json.js +1 -1
  67. package/index.d.ts +1 -0
  68. package/index.js +2 -0
  69. package/package.json +1 -1
@@ -53,6 +53,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
53
53
  onProfileMore,
54
54
  layout: layoutProp,
55
55
  floating: floatingProp = false,
56
+ fixed = true,
56
57
  topSlot,
57
58
  persistentTopSlot = false,
58
59
  footerSlot,
@@ -73,6 +74,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
73
74
  const baseClass = "ds-app-sidebar";
74
75
  const layout = layoutProp ?? (floatingProp ? "floating" : "flush");
75
76
  const floating = layout === "floating";
77
+ const contained = !fixed;
76
78
  const Link = useLinkComponent(linkComponent);
77
79
  const avatarSeed = (item) => typeof item.pixelAvatar === "string" ? item.pixelAvatar : item.label;
78
80
  const avatarItems = sections.flatMap(
@@ -251,6 +253,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
251
253
  isExpanded || mobileOpen ? `${baseClass}--expanded` : "",
252
254
  floating ? `${baseClass}--floating` : "",
253
255
  layout === "inset" ? `${baseClass}--inset` : "",
256
+ contained ? `${baseClass}--contained` : "",
254
257
  mobileOpen ? `${baseClass}--mobile-open` : "",
255
258
  isPanelMode ? `${baseClass}--panel-mode` : "",
256
259
  className
@@ -260,7 +263,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
260
263
  "button",
261
264
  {
262
265
  type: "button",
263
- className: `${baseClass}__mobile-trigger`,
266
+ className: `${baseClass}__mobile-trigger${contained ? ` ${baseClass}__mobile-trigger--contained` : ""}`,
264
267
  "aria-label": openLabel,
265
268
  "aria-expanded": mobileOpen,
266
269
  "aria-controls": drawerId,
@@ -268,7 +271,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
268
271
  children: /* @__PURE__ */ jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "menu" })
269
272
  }
270
273
  ),
271
- mobileOpen && /* @__PURE__ */ jsx("div", { className: `${baseClass}__scrim`, onClick: () => layer.ownsPress() && closeMobile(), "aria-hidden": "true" }),
274
+ mobileOpen && /* @__PURE__ */ jsx("div", { className: `${baseClass}__scrim${contained ? ` ${baseClass}__scrim--contained` : ""}`, onClick: () => layer.ownsPress() && closeMobile(), "aria-hidden": "true" }),
272
275
  /* @__PURE__ */ jsxs(
273
276
  "nav",
274
277
  {
@@ -540,7 +543,8 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
540
543
  isExpanded ? `${baseClass}__panel--beside-expanded` : "",
541
544
  isPanelMode ? `${baseClass}__panel--panel-mode` : "",
542
545
  floating ? `${baseClass}__panel--floating` : "",
543
- layout === "inset" ? `${baseClass}__panel--inset` : ""
546
+ layout === "inset" ? `${baseClass}__panel--inset` : "",
547
+ contained ? `${baseClass}__panel--contained` : ""
544
548
  ].filter(Boolean).join(" "),
545
549
  items: panelSource.items,
546
550
  title: panelSource.label,
@@ -20,7 +20,11 @@ type ChatThreadOwnProps = {
20
20
  * returning to the bottom, or the next send, takes hold again.
21
21
  */
22
22
  flow?: 'top-down' | 'bottom-up';
23
- /** Accessible name for the scrollable conversation region. */
23
+ /**
24
+ * Legacy accessible-name prop for the scrollable conversation region. Defaults to "Conversation"; a native `aria-label` wins when both are passed.
25
+ *
26
+ * @deprecated Pass the native `aria-label` attribute instead.
27
+ */
24
28
  ariaLabel?: string;
25
29
  /** Accessible name for the scroll-to-bottom control. */
26
30
  jumpLabel?: string;
@@ -194,7 +194,7 @@ const ChatThread = React.forwardRef(
194
194
  ref: setRef,
195
195
  className: classes,
196
196
  role: "region",
197
- "aria-label": ariaLabel,
197
+ "aria-label": rest["aria-label"] ?? ariaLabel,
198
198
  tabIndex: 0,
199
199
  onScroll: handleScroll,
200
200
  children: [
@@ -7,7 +7,11 @@ type ContextMenuOwnProps = {
7
7
  items: DropdownMenuEntry[];
8
8
  /** Component size */
9
9
  size?: 'default' | 'compact';
10
- /** Accessible name for the menu */
10
+ /**
11
+ * Legacy accessible-name prop for the menu. A native `aria-label` wins when both are passed, and names the menu rather than the wrapper.
12
+ *
13
+ * @deprecated Pass the native `aria-label` attribute instead.
14
+ */
11
15
  ariaLabel?: string;
12
16
  /** Replaces any legend an item's `keys` is written with, such as `{ ctrl: 'Strg' }` for a German keyboard. */
13
17
  keyLabels?: ShortcutKeyLabels;
@@ -164,6 +164,7 @@ const ContextMenu = React.forwardRef(
164
164
  items,
165
165
  size = "default",
166
166
  ariaLabel,
167
+ "aria-label": nativeAriaLabel,
167
168
  keyLabels,
168
169
  className = "",
169
170
  children,
@@ -389,7 +390,7 @@ const ContextMenu = React.forwardRef(
389
390
  {
390
391
  className: panelClasses,
391
392
  role: "menu",
392
- "aria-label": ariaLabel,
393
+ "aria-label": nativeAriaLabel ?? ariaLabel,
393
394
  "aria-activedescendant": focusedIndex >= 0 ? `${generatedId}-item-${focusedIndex}` : void 0,
394
395
  tabIndex: -1,
395
396
  ref: (el) => {
@@ -10,7 +10,7 @@ export interface ContributionDay {
10
10
  }
11
11
  /** Props owned by ContributionGraph itself; everything else falls through to the root div. */
12
12
  type ContributionGraphOwnProps = {
13
- /** One entry per day, ordered oldest to newest */
13
+ /** One entry per day. Each is drawn on its own weekday's row, so a day left out is an empty cell. */
14
14
  days: ContributionDay[];
15
15
  /**
16
16
  * Chart title, in the shared chart header.
@@ -23,6 +23,12 @@ type ContributionGraphOwnProps = {
23
23
  bare?: boolean;
24
24
  /** Summary line shown under the grid, e.g. "496 contributions in the last year" */
25
25
  caption?: string;
26
+ /**
27
+ * Whether the week columns stretch to fill the graph's width. Defaults to
28
+ * `true`. Set `false` to keep every column at the base cell size, so a short
29
+ * run of weeks draws small squares at the start of its box instead of large ones.
30
+ */
31
+ fill?: boolean;
26
32
  /** Show month labels above the grid */
27
33
  showMonthLabels?: boolean;
28
34
  /** Show the Less → More legend under the grid */
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
- import { weekStartOf, DEFAULT_LOCALE, weekdayOffset } from "../../behaviors/locale.js";
3
+ import { weekStartOf, DEFAULT_LOCALE } from "../../behaviors/locale.js";
4
+ import { buildWeeks } from "./weeks.js";
4
5
  import "../Chart/Chart.css";
5
6
  import "./ContributionGraph.css";
6
7
  const localeMonths = (locale) => {
@@ -19,22 +20,6 @@ const cellLabelFor = (locale) => (count, date) => {
19
20
  if (count === 1) return `1 contribution on ${formatted}`;
20
21
  return `${count} contributions on ${formatted}`;
21
22
  };
22
- const buildWeeks = (days, weekStart) => {
23
- const weeks = [];
24
- let week = [];
25
- days.forEach((day, index) => {
26
- if (index === 0) {
27
- week = Array(weekdayOffset(parseDay(day.date).getDay(), weekStart)).fill(null);
28
- }
29
- week.push(day);
30
- if (week.length === 7) {
31
- weeks.push(week);
32
- week = [];
33
- }
34
- });
35
- if (week.length > 0) weeks.push(week);
36
- return weeks;
37
- };
38
23
  const buildMonthLabels = (weeks, monthNames) => {
39
24
  const labels = [];
40
25
  let previousMonth = -1;
@@ -60,6 +45,7 @@ const ContributionGraph = React.forwardRef(({
60
45
  subtitle,
61
46
  bare = false,
62
47
  caption,
48
+ fill = true,
63
49
  showMonthLabels = true,
64
50
  showLegend = true,
65
51
  gridLabel,
@@ -82,7 +68,7 @@ const ContributionGraph = React.forwardRef(({
82
68
  "ds-contribution-graph",
83
69
  className
84
70
  ].filter(Boolean).join(" ");
85
- const columnTemplate = `repeat(${weeks.length}, minmax(var(--ds-contribution-cell), 1fr))`;
71
+ const columnTemplate = fill ? `repeat(${weeks.length}, minmax(var(--ds-contribution-cell), 1fr))` : `repeat(${weeks.length}, var(--ds-contribution-cell))`;
86
72
  return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
87
73
  (title || subtitle) && /* @__PURE__ */ jsx("div", { className: `${chartClass}__header`, children: /* @__PURE__ */ jsxs("div", { className: `${chartClass}__header-text`, children: [
88
74
  title && /* @__PURE__ */ jsx("h3", { className: `${chartClass}__title`, children: title }),
@@ -0,0 +1,8 @@
1
+ import { Weekday } from '../../behaviors/locale';
2
+ /**
3
+ * Group days into calendar weeks, each column starting on `weekStart`, each
4
+ * day at its weekday's row. The last week ends at the last day.
5
+ */
6
+ export declare function buildWeeks<T extends {
7
+ date: string;
8
+ }>(days: readonly T[], weekStart: Weekday): (T | null)[][];
@@ -0,0 +1,25 @@
1
+ import { weekdayOffset } from "../../behaviors/locale.js";
2
+ const MAX_WEEKS = 530;
3
+ const dayNumber = (date) => {
4
+ const match = /^(\d{4})-(\d{2})-(\d{2})/.exec(date);
5
+ return match ? Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3])) / 864e5 : null;
6
+ };
7
+ function buildWeeks(days, weekStart) {
8
+ const placed = days.map((day) => ({ day, n: dayNumber(day.date) })).filter((entry) => entry.n !== null);
9
+ if (placed.length === 0) return [];
10
+ const first = Math.min(...placed.map((entry) => entry.n));
11
+ const gridStart = first - weekdayOffset(((first + 4) % 7 + 7) % 7, weekStart);
12
+ const last = Math.min(Math.max(...placed.map((entry) => entry.n)), gridStart + MAX_WEEKS * 7 - 1);
13
+ const weekCount = Math.floor((last - gridStart) / 7) + 1;
14
+ const weeks = Array.from({ length: weekCount }, () => Array(7).fill(null));
15
+ for (const { day, n } of placed) {
16
+ if (n > last) continue;
17
+ const offset = n - gridStart;
18
+ weeks[Math.floor(offset / 7)][offset % 7] = day;
19
+ }
20
+ weeks[weekCount - 1].length = (last - gridStart) % 7 + 1;
21
+ return weeks;
22
+ }
23
+ export {
24
+ buildWeeks
25
+ };
@@ -1739,7 +1739,7 @@ function DataTable({
1739
1739
  size: "compact",
1740
1740
  open: headerFilter === shown.id,
1741
1741
  onOpenChange: (open) => open ? setHeaderFilter(shown.id) : closeHeaderFilter(),
1742
- ariaLabel: filterLabels.filtered(text),
1742
+ "aria-label": filterLabels.filtered(text),
1743
1743
  surface: "menu",
1744
1744
  content: /* @__PURE__ */ jsx("div", { className: `${baseClass}__menu-row`, children: /* @__PURE__ */ jsx(
1745
1745
  FilterEditor,
@@ -53,7 +53,7 @@ const DocumentChip = React.forwardRef(
53
53
  size: "compact",
54
54
  value: progress,
55
55
  showLabel: true,
56
- ariaLabel: progressLabel(name)
56
+ "aria-label": progressLabel(name)
57
57
  }
58
58
  ),
59
59
  showDetail && !error && progress === void 0 && meta && /* @__PURE__ */ jsx("span", { className: `${baseClass}__meta`, children: meta })
@@ -29,8 +29,9 @@
29
29
  TRIGGER
30
30
  A card that is a control: the container fill and hairline, the passive
31
31
  wash on hover. The edge is an inset shadow rather than a border so it
32
- takes no room, and the mark starts one --padding-300 in: inside a rail
33
- held at the nav rows' inset, that seats it on the collapsed rail's axis.
32
+ takes no room, and the mark starts one --padding-300 in. Collapsed, the
33
+ start padding centres the mark in the trigger instead (below), so it sits
34
+ on the rail's axis in any rail width.
34
35
  ============================================ */
35
36
 
36
37
  .ds-entity-switcher__trigger {
@@ -50,7 +51,8 @@
50
51
  cursor: pointer;
51
52
  transition:
52
53
  background-color var(--motion-duration-base) var(--motion-ease-standard),
53
- box-shadow var(--motion-duration-base) var(--motion-ease-standard);
54
+ box-shadow var(--motion-duration-base) var(--motion-ease-standard),
55
+ padding-inline-start var(--motion-duration-slow) var(--motion-ease-emphasized);
54
56
  }
55
57
 
56
58
  .ds-entity-switcher__trigger:hover,
@@ -85,6 +87,12 @@
85
87
  :where([data-expanded='false']) .ds-entity-switcher:not(.ds-entity-switcher--expanded) .ds-entity-switcher__trigger {
86
88
  background-color: transparent;
87
89
  box-shadow: none;
90
+ /* The mark centres where a rail's row icon centres: the row's icon inset
91
+ (AppSidebar's panel mode sets the hook), less half of what the larger
92
+ mark adds. The padding moves with the rail's sweep. */
93
+ padding-inline-start: calc(
94
+ var(--ds-entity-switcher-rail-inset, var(--padding-200)) - (var(--icon-size-800) - var(--icon-size-600)) / 2
95
+ );
88
96
  }
89
97
 
90
98
  .ds-entity-switcher--collapsed .ds-entity-switcher__trigger .ds-entity-switcher__text,
@@ -296,7 +296,7 @@ function EntitySwitcher({
296
296
  align: "start",
297
297
  open,
298
298
  onOpenChange: setOpen,
299
- ariaLabel: `${switcherLabel}: ${selected.item.name}`,
299
+ "aria-label": `${switcherLabel}: ${selected.item.name}`,
300
300
  children: /* @__PURE__ */ jsxs("button", { type: "button", className: "ds-entity-switcher__trigger", children: [
301
301
  /* @__PURE__ */ jsx(Mark, { item: selected.item, large: true }),
302
302
  /* @__PURE__ */ jsxs("span", { className: "ds-entity-switcher__text", children: [
@@ -22,6 +22,15 @@
22
22
  padding: var(--padding-400);
23
23
  }
24
24
 
25
+ /* Bare — inside a Panel or Widget that already draws the surface, the
26
+ calendar drops its own, so the two never double their borders. */
27
+ .ds-event-calendar--bare {
28
+ background-color: transparent;
29
+ border: none;
30
+ border-radius: 0;
31
+ padding: 0;
32
+ }
33
+
25
34
  /* ============================================
26
35
  HEADER
27
36
  ============================================ */
@@ -453,6 +462,149 @@ button.ds-event-calendar__more:focus-visible {
453
462
  grid-template-columns: 1fr;
454
463
  }
455
464
 
465
+ /* ============================================
466
+ DAY VIEW SCHEDULE — the day as a list
467
+ Each event leads with its start over its end
468
+ in a column of its own, so the titles line up;
469
+ a bar in the event's accent sits between. The
470
+ rows take the pill's fill and hover.
471
+ ============================================ */
472
+
473
+ .ds-event-calendar__agenda {
474
+ display: flex;
475
+ flex-direction: column;
476
+ gap: var(--gap-050);
477
+ margin: 0;
478
+ padding: 0;
479
+ list-style: none;
480
+ }
481
+
482
+ .ds-event-calendar__agenda-item {
483
+ display: flex;
484
+ }
485
+
486
+ :where(.ds-event-calendar__agenda-event) {
487
+ --ds-event-accent: var(--color-status-neutral-border);
488
+ }
489
+
490
+ .ds-event-calendar__agenda-event {
491
+ display: flex;
492
+ align-items: stretch;
493
+ gap: var(--gap-200);
494
+ flex: 1 1 auto;
495
+ min-width: 0;
496
+ margin: 0;
497
+ padding: var(--padding-150) var(--padding-200);
498
+ background-color: var(--color-calendar-event-bg);
499
+ border: var(--border-025) solid transparent;
500
+ border-radius: var(--radius-200);
501
+ color: inherit;
502
+ font: inherit;
503
+ text-align: start;
504
+ }
505
+
506
+ button.ds-event-calendar__agenda-event {
507
+ cursor: pointer;
508
+ transition:
509
+ background-color var(--motion-duration-fast) var(--motion-ease-standard),
510
+ border-color var(--motion-duration-fast) var(--motion-ease-standard);
511
+ }
512
+
513
+ button.ds-event-calendar__agenda-event:hover {
514
+ background-color: var(--color-calendar-event-bg-hover);
515
+ border-color: var(--color-calendar-event-border);
516
+ }
517
+
518
+ button.ds-event-calendar__agenda-event:focus-visible {
519
+ outline: 2px solid var(--color-action-primary-bg);
520
+ outline-offset: -2px;
521
+ }
522
+
523
+ .ds-event-calendar__agenda-time {
524
+ display: flex;
525
+ flex: none;
526
+ flex-direction: column;
527
+ min-inline-size: calc(var(--control-height-default) * 2);
528
+ font-variant-numeric: tabular-nums;
529
+ }
530
+
531
+ .ds-event-calendar__agenda-start {
532
+ color: var(--color-text-primary);
533
+ font-family: var(--font-paragraph-sm-emphasis-family);
534
+ font-size: var(--font-paragraph-sm-emphasis-size);
535
+ font-weight: var(--font-paragraph-sm-emphasis-weight);
536
+ line-height: var(--font-paragraph-sm-emphasis-line-height);
537
+ letter-spacing: var(--font-paragraph-sm-emphasis-letter-spacing);
538
+ }
539
+
540
+ .ds-event-calendar__agenda-end {
541
+ color: var(--color-text-tertiary);
542
+ font-family: var(--font-paragraph-sm-family);
543
+ font-size: var(--font-paragraph-sm-size);
544
+ font-weight: var(--font-paragraph-sm-weight);
545
+ line-height: var(--font-paragraph-sm-line-height);
546
+ letter-spacing: var(--font-paragraph-sm-letter-spacing);
547
+ }
548
+
549
+ .ds-event-calendar__agenda-bar {
550
+ flex: none;
551
+ width: var(--gap-050);
552
+ border-radius: var(--radius-pill);
553
+ background-color: var(--ds-event-accent);
554
+ }
555
+
556
+ .ds-event-calendar__agenda-title {
557
+ flex: 1 1 auto;
558
+ min-width: 0;
559
+ align-self: center;
560
+ overflow-wrap: anywhere;
561
+ color: var(--color-text-primary);
562
+ font-family: var(--font-paragraph-emphasis-family);
563
+ font-size: var(--font-paragraph-emphasis-size);
564
+ font-weight: var(--font-paragraph-emphasis-weight);
565
+ line-height: var(--font-paragraph-emphasis-line-height);
566
+ letter-spacing: var(--font-paragraph-emphasis-letter-spacing);
567
+ }
568
+
569
+ .ds-event-calendar__agenda-empty {
570
+ margin: 0;
571
+ padding: var(--padding-300) var(--padding-200);
572
+ color: var(--color-text-tertiary);
573
+ font-family: var(--font-paragraph-sm-family);
574
+ font-size: var(--font-paragraph-sm-size);
575
+ font-weight: var(--font-paragraph-sm-weight);
576
+ line-height: var(--font-paragraph-sm-line-height);
577
+ letter-spacing: var(--font-paragraph-sm-letter-spacing);
578
+ }
579
+
580
+ /* Now — today's convention, the inverse chip, with a rule running on from
581
+ it across the schedule. Current, not selected, so never the action
582
+ colour. */
583
+ .ds-event-calendar__now {
584
+ display: flex;
585
+ align-items: center;
586
+ gap: var(--gap-100);
587
+ }
588
+
589
+ .ds-event-calendar__now::after {
590
+ content: '';
591
+ flex: 1 1 auto;
592
+ border-block-start: var(--border-050) solid var(--color-bg-page-inverse);
593
+ }
594
+
595
+ .ds-event-calendar__now-label {
596
+ flex: none;
597
+ padding: 0 var(--padding-100);
598
+ background-color: var(--color-bg-page-inverse);
599
+ border-radius: var(--radius-pill);
600
+ color: var(--color-text-on-inverse);
601
+ font-family: var(--font-paragraph-sm-emphasis-family);
602
+ font-size: var(--font-paragraph-sm-emphasis-size);
603
+ font-weight: var(--font-paragraph-sm-emphasis-weight);
604
+ line-height: var(--font-paragraph-sm-emphasis-line-height);
605
+ letter-spacing: var(--font-paragraph-sm-emphasis-letter-spacing);
606
+ }
607
+
456
608
  /* ============================================
457
609
  SELECTED DAY — the host's panel for the chosen day
458
610
  ============================================ */
@@ -10,7 +10,17 @@ export interface EventCalendarEvent {
10
10
  endDate?: string;
11
11
  /** Short label shown in the event pill. */
12
12
  title: string;
13
- /** Start time as already-formatted text like "09:30". Untimed events sort first. */
13
+ /** When the event starts, as a 24-hour `HH:mm` string ("08:50", "13:40"). The calendar writes it in the resolved locale and sorts each day by it: untimed events first, then by the clock. */
14
+ start?: string;
15
+ /** When the event ends, as a 24-hour `HH:mm` string, later than `start`. With it, the event shows and is named with its range ("8:50 – 9:50 AM" in `en-US`). */
16
+ end?: string;
17
+ /**
18
+ * Start time as already-formatted text like "09:30" or "1:40 PM", shown
19
+ * as written in place of `start` and `end` when it is set. Without `start`
20
+ * it sorts by the clock where it reads as a clock time, after untimed
21
+ * events and ahead of any other text.
22
+ * @deprecated Use `start` (and `end`), which the calendar formats in the resolved locale.
23
+ */
14
24
  time?: string;
15
25
  /** Accent for the pill's dot, from the core accent roles. Defaults to `neutral`. */
16
26
  color?: EventCalendarColor;
@@ -49,8 +59,32 @@ type EventCalendarOwnProps = {
49
59
  * consumer; pair with `onDateClick` to move it.
50
60
  */
51
61
  selectedDate?: string;
52
- /** The date the calendar treats as today (`YYYY-MM-DD`): it carries the today chip and picks the month shown first. Defaults to the device's date; pin it for a demo, a test or a time zone the device is not in. */
62
+ /**
63
+ * The date the calendar treats as today (`YYYY-MM-DD`): it carries the
64
+ * today chip and picks the month shown first. Defaults to the device's
65
+ * date, read in the browser only: a server render draws no today chip and
66
+ * the browser adds it once it hydrates, so a server in another time zone
67
+ * can never put it on the wrong day, and it moves on at midnight. The month
68
+ * shown first still falls back to the render-time clock, so a server-rendered
69
+ * host passes `today` (or `defaultMonth`) when the first month must match.
70
+ * Pin it for a demo, a test or a time zone the device is not in.
71
+ */
53
72
  today?: string;
73
+ /**
74
+ * The time (24-hour `HH:mm`) the day view's now marker sits at, when the
75
+ * day shown is `today`. Defaults to the device's clock, read in the browser
76
+ * only and moved on every minute, so a server render draws no marker; pin
77
+ * it for a demo, a test or a screenshot.
78
+ */
79
+ now?: string;
80
+ /** The text of the day view's now marker. */
81
+ nowLabel?: string;
82
+ /** What the day view's schedule shows in place of a time for an event with none. */
83
+ allDayLabel?: string;
84
+ /** What the day view's schedule says on a day with no events. */
85
+ emptyDayLabel?: string;
86
+ /** Strips the calendar's own fill, border, radius and padding, for a Panel or Widget that already draws the surface. */
87
+ bare?: boolean;
54
88
  /** What each event colour means, shown as a row of dots and labels under the grid. With `legendToggles`, each entry also shows and hides its colour's events. */
55
89
  legend?: EventCalendarLegendItem[];
56
90
  /** Makes each legend entry a selectable Chip that shows or hides the events of its colour, so a reader can narrow a busy calendar by kind. */
@@ -72,7 +106,7 @@ type EventCalendarOwnProps = {
72
106
  renderSelectedDay?: (date: string, events: EventCalendarEvent[]) => React.ReactNode;
73
107
  /** Trailing header slot, e.g. a "New event" Button. */
74
108
  actions?: React.ReactNode;
75
- /** `month` shows the whole month, a day's overflow folded behind "+N more"; `week` shows one week in tall cells with every event, stepping a week at a time from the selected day's week (else today's), which it keeps as its own state after mount; `day` shows that one day the same way, stepping a day at a time. */
109
+ /** `month` shows the whole month, a day's overflow folded behind "+N more"; `week` shows one week in tall cells with every event, stepping a week at a time from the selected day's week (else today's), which it keeps as its own state after mount; `day` shows that one day as a schedule, each event's start and end time first, with a now marker on today, stepping a day at a time. */
76
110
  view?: 'month' | 'week' | 'day';
77
111
  /** Accessible name of the previous-month button. */
78
112
  previousLabel?: string;
@@ -92,9 +126,21 @@ type EventCalendarOwnProps = {
92
126
  * The month heading, given the first day of the month in view: the visible
93
127
  * title and the name of the day grid. Defaults to the month name and the
94
128
  * year in `locale` ("January 2026" in `en-US`). Month view only; the week
95
- * view's heading is the week's range in `locale`.
129
+ * view's heading is `weekLabel`, the day view's `dayLabel`.
96
130
  */
97
131
  monthLabel?: (month: Date) => string;
132
+ /**
133
+ * The week view's heading, given the first and last day of the week in
134
+ * view: the visible title and the name of the week's cells. Defaults to
135
+ * the range in `locale` ("August 16 – 22, 2026" in `en-US`).
136
+ */
137
+ weekLabel?: (start: Date, end: Date) => string;
138
+ /**
139
+ * The full name of a day, given the day: the day view's heading and every
140
+ * day's spoken name. Defaults to the weekday and the date in `locale`
141
+ * ("Thursday, August 20, 2026" in `en-US`).
142
+ */
143
+ dayLabel?: (date: Date) => string;
98
144
  /**
99
145
  * Accessible name of a day's "+N more" overflow button, given the number of
100
146
  * hidden events and the day. Defaults to "N more events" followed by the