rift-ds 1.33.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 (95) hide show
  1. package/README.md +3 -3
  2. package/behaviors/chat-card.css +11 -6
  3. package/behaviors/locale.d.ts +9 -0
  4. package/behaviors/locale.js +2 -0
  5. package/bin/templates/blocks/app/dashboard/page.tsx +1 -1
  6. package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -6
  7. package/chat/AssistantTurn.d.ts +2 -0
  8. package/chat/AssistantTurn.js +18 -7
  9. package/chat/ChatProvider.js +14 -0
  10. package/chat/ChatTabs.js +1 -1
  11. package/chat/ChatWidget.css +10 -0
  12. package/chat/ChatWidget.d.ts +9 -5
  13. package/chat/ChatWidget.js +7 -4
  14. package/chat/DemoWelcome.js +2 -2
  15. package/chat/FollowupSuggestions.js +1 -1
  16. package/chat/agentState.d.ts +2 -1
  17. package/chat/agentState.js +4 -1
  18. package/chat/awaiting.d.ts +19 -0
  19. package/chat/awaiting.js +21 -0
  20. package/chat/context.d.ts +4 -0
  21. package/chat/index.d.ts +1 -0
  22. package/chat/index.js +3 -1
  23. package/chat/server.d.ts +8 -3
  24. package/chat/server.js +1 -1
  25. package/components/ActionBar/ActionBar.css +78 -0
  26. package/components/ActionBar/ActionBar.d.ts +40 -0
  27. package/components/ActionBar/ActionBar.js +29 -0
  28. package/components/ActionCard/ActionCard.css +3 -3
  29. package/components/AgentStatus/AgentStatus.css +114 -22
  30. package/components/AgentStatus/AgentStatus.d.ts +10 -7
  31. package/components/AgentStatus/AgentStatus.js +10 -0
  32. package/components/AiButton/AiButton.d.ts +3 -3
  33. package/components/AiButton/AiButton.js +1 -1
  34. package/components/Alert/Alert.css +16 -0
  35. package/components/Alert/Alert.d.ts +2 -2
  36. package/components/Alert/Alert.js +3 -1
  37. package/components/AppSidebar/AppSidebar.css +140 -4
  38. package/components/AppSidebar/AppSidebar.d.ts +12 -0
  39. package/components/AppSidebar/AppSidebar.js +7 -3
  40. package/components/ChatThread/ChatThread.d.ts +5 -1
  41. package/components/ChatThread/ChatThread.js +1 -1
  42. package/components/Composer/Composer.css +14 -9
  43. package/components/Composer/Composer.d.ts +10 -8
  44. package/components/Composer/Composer.js +2 -1
  45. package/components/ContextMenu/ContextMenu.d.ts +5 -1
  46. package/components/ContextMenu/ContextMenu.js +2 -1
  47. package/components/ContributionGraph/ContributionGraph.d.ts +7 -1
  48. package/components/ContributionGraph/ContributionGraph.js +4 -18
  49. package/components/ContributionGraph/weeks.d.ts +8 -0
  50. package/components/ContributionGraph/weeks.js +25 -0
  51. package/components/DataTable/DataTable.js +1 -1
  52. package/components/DocumentChip/DocumentChip.js +1 -1
  53. package/components/EntitySwitcher/EntitySwitcher.css +11 -3
  54. package/components/EntitySwitcher/EntitySwitcher.js +1 -1
  55. package/components/EventCalendar/EventCalendar.css +152 -0
  56. package/components/EventCalendar/EventCalendar.d.ts +50 -4
  57. package/components/EventCalendar/EventCalendar.js +154 -23
  58. package/components/EventCalendar/eventTime.d.ts +31 -0
  59. package/components/EventCalendar/eventTime.js +42 -0
  60. package/components/FileInput/FileInput.d.ts +12 -4
  61. package/components/FileInput/FileInput.js +27 -4
  62. package/components/Input/Input.css +30 -0
  63. package/components/Input/Input.d.ts +8 -0
  64. package/components/Input/Input.js +3 -0
  65. package/components/MessageCard/MessageCard.css +1 -1
  66. package/components/Popover/Popover.d.ts +5 -1
  67. package/components/Popover/Popover.js +3 -1
  68. package/components/ProgressBar/ProgressBar.d.ts +5 -1
  69. package/components/ProgressBar/ProgressBar.js +1 -1
  70. package/components/PromptSuggestions/PromptSuggestions.d.ts +5 -1
  71. package/components/PromptSuggestions/PromptSuggestions.js +1 -1
  72. package/components/ResourceTimeline/ResourceTimeline.js +2 -2
  73. package/components/SegmentedControl/SegmentedControl.css +120 -3
  74. package/components/SegmentedControl/SegmentedControl.d.ts +9 -0
  75. package/components/SegmentedControl/SegmentedControl.js +11 -1
  76. package/components/ShaderScene/ShaderScene.d.ts +3 -3
  77. package/components/ShaderScene/scenes.d.ts +17 -0
  78. package/components/ShaderScene/scenes.js +175 -1
  79. package/components/SourceTrail/SourceTrail.css +1 -1
  80. package/components/Stat/Stat.css +12 -0
  81. package/components/Stat/Stat.d.ts +5 -0
  82. package/components/Stat/Stat.js +9 -3
  83. package/components/TableToolbar/TableToolbar.js +2 -2
  84. package/components/ThemeToggle/ThemeToggle.d.ts +1 -1
  85. package/components/ThreadTabs/ThreadTabs.d.ts +5 -1
  86. package/components/ThreadTabs/ThreadTabs.js +2 -1
  87. package/components/ToggleGroup/ToggleGroup.d.ts +5 -1
  88. package/components/ToolCall/ToolCall.css +2 -2
  89. package/components/UsageCard/UsageCard.css +4 -3
  90. package/components/registry.json +21 -4
  91. package/components/registry.json.d.ts +21 -4
  92. package/components/registry.json.js +1 -1
  93. package/index.d.ts +1 -0
  94. package/index.js +2 -0
  95. package/package.json +1 -1
@@ -233,10 +233,10 @@
233
233
  justify-content: space-between;
234
234
  height: 40px;
235
235
  min-width: 0;
236
- /* The same inset in both states: in the collapsed 64px rail the 12px
237
- margins leave a 40px row, so the hover pill is a perfect circle clear
238
- of the rail edges, with the icon centred (12 + 8 + 24 + 8 + 12 = 64);
239
- expanded, these are the pill's edge inset. Nothing to transition. */
236
+ /* Collapsed, the 12px margins leave a 40px row in the 64px rail, so the
237
+ hover pill is a perfect circle clear of the rail edges, with the icon
238
+ centred (12 + 8 + 24 + 8 + 12 = 64). Expanded, the start side trades
239
+ 4px of margin for 4px of padding (the --expanded rule below). */
240
240
  margin: 0 var(--padding-300);
241
241
  padding: var(--padding-200);
242
242
  border-radius: var(--radius-pill);
@@ -255,6 +255,18 @@
255
255
  before), so the pill floats off the rail edges while the icon and label
256
256
  keep their exact x-positions against the category labels above. */
257
257
 
258
+ /* Expanded, the pill's start curve bent right up to the icon 8px in, and
259
+ the icon read as crammed against the highlight's edge. The start side
260
+ trades 4px of margin for 4px of padding (8 + 12, still 20), so the icon
261
+ holds its x and the pill reaches a step toward the rail's edge. Margin
262
+ and padding glide on the same duration and easing, so their sum stays 20
263
+ through the sweep and the icon never moves. Not panel mode, whose rows
264
+ keep one seat of their own. */
265
+ .ds-app-sidebar--expanded:not(.ds-app-sidebar--panel-mode) .ds-app-sidebar__btn {
266
+ margin-inline-start: var(--padding-200);
267
+ padding-inline-start: var(--padding-300);
268
+ }
269
+
258
270
  .ds-app-sidebar__btn:hover {
259
271
  background-color: var(--color-action-passive-bg-hover);
260
272
  }
@@ -778,6 +790,82 @@
778
790
  border-inline-end-color: transparent;
779
791
  }
780
792
 
793
+ /* ============================================
794
+ CONTAINED — the rail laid out in its parent
795
+ (fixed={false}), for a framed preview
796
+ or a layout that is not the whole page. The
797
+ parent is a flex row with a definite height.
798
+ Every piece that is fixed to the viewport
799
+ above takes its place in that row instead,
800
+ held there by position: sticky, and a piece
801
+ that overlays (the panel while hidden, the
802
+ phone drawer, its scrim) gives its width
803
+ back with a negative end margin, so none of
804
+ them needs a positioned ancestor. Small
805
+ local stacking values, not the layer tokens:
806
+ the rail stacks only against its own
807
+ neighbours in the frame, never the page.
808
+ ============================================ */
809
+ .ds-app-sidebar--contained {
810
+ position: sticky;
811
+ top: 0;
812
+ /* Sticky honours an inline offset too, which would pin the rail against
813
+ a scrolling ancestor's edge; the row places it instead. */
814
+ inset-inline-start: auto;
815
+ z-index: 3;
816
+ flex: none;
817
+ height: 100%;
818
+ }
819
+
820
+ .ds-app-sidebar--contained.ds-app-sidebar--floating {
821
+ top: var(--ds-sidebar-float-inset, 20px);
822
+ inset-inline-start: auto;
823
+ height: calc(100% - var(--ds-sidebar-float-inset, 20px) * 2);
824
+ margin-block: var(--ds-sidebar-float-inset, 20px);
825
+ margin-inline-start: var(--ds-sidebar-float-inset, 20px);
826
+ }
827
+
828
+ /* The panel follows the rail in the row, so it tracks the rail's width
829
+ with no offsets of its own. Shown, it takes its width beside the rail
830
+ and the content gives way, as AppLayout reserves it; hidden, its end
831
+ margin hands the width back on the same glide. */
832
+ .ds-app-sidebar__panel--contained {
833
+ position: sticky;
834
+ top: 0;
835
+ inset-inline-start: auto;
836
+ z-index: 2;
837
+ flex: none;
838
+ height: 100%;
839
+ margin-inline-end: calc(-1 * var(--ds-sidebar-panel-width, 240px));
840
+ transition:
841
+ margin var(--motion-duration-slow) var(--motion-ease-emphasized),
842
+ opacity var(--motion-duration-base) var(--motion-ease-standard),
843
+ transform var(--motion-duration-slow) var(--motion-ease-emphasized),
844
+ visibility 0s linear var(--motion-duration-base);
845
+ }
846
+
847
+ .ds-app-sidebar__panel--contained.ds-app-sidebar__panel--visible {
848
+ margin-inline-end: 0;
849
+ transition:
850
+ margin var(--motion-duration-slow) var(--motion-ease-emphasized),
851
+ opacity var(--motion-duration-base) var(--motion-ease-standard),
852
+ transform var(--motion-duration-slow) var(--motion-ease-emphasized),
853
+ visibility 0s linear 0s;
854
+ }
855
+
856
+ .ds-app-sidebar__panel--contained.ds-app-sidebar__panel--floating {
857
+ top: var(--ds-sidebar-float-inset, 20px);
858
+ inset-inline-start: auto;
859
+ height: calc(100% - var(--ds-sidebar-float-inset, 20px) * 2);
860
+ margin-block: var(--ds-sidebar-float-inset, 20px);
861
+ margin-inline-start: var(--gap-300);
862
+ margin-inline-end: calc(-1 * (var(--ds-sidebar-panel-width, 240px) + var(--gap-300)));
863
+ }
864
+
865
+ .ds-app-sidebar__panel--contained.ds-app-sidebar__panel--floating.ds-app-sidebar__panel--visible {
866
+ margin-inline-end: 0;
867
+ }
868
+
781
869
  /* ============================================
782
870
  PANEL MODE RAIL — labels under icons
783
871
  With the second level in the panel, the
@@ -835,6 +923,12 @@
835
923
  height: 40px;
836
924
  }
837
925
 
926
+ /* A collapsed EntitySwitcher in the top slot centres its mark on the row
927
+ icons' axis, so it takes the panel rows' deeper icon inset. */
928
+ .ds-app-sidebar--panel-mode .ds-app-sidebar__top-slot {
929
+ --ds-entity-switcher-rail-inset: var(--padding-400);
930
+ }
931
+
838
932
  .ds-app-sidebar--panel-mode .ds-app-sidebar__btn-left {
839
933
  height: 24px;
840
934
  }
@@ -1017,6 +1111,48 @@
1017
1111
  }
1018
1112
  }
1019
1113
 
1114
+ /* Contained, the phone drawer stays in its parent: the trigger sits at
1115
+ the parent's top start corner (an absolute box with no offsets keeps its
1116
+ place in the row and takes none of it), and the scrim and the drawer
1117
+ cover the parent's height from its start, each handing its width back
1118
+ with an end margin. The drawer's body scroll lock still holds the page. */
1119
+ @media (max-width: 768px) {
1120
+ .ds-app-sidebar--contained.ds-app-sidebar--floating:not(.ds-app-sidebar--mobile-open) {
1121
+ margin: 0;
1122
+ }
1123
+
1124
+ .ds-app-sidebar__mobile-trigger--contained {
1125
+ position: absolute;
1126
+ top: auto;
1127
+ inset-inline-start: auto;
1128
+ z-index: 1;
1129
+ margin-block-start: var(--padding-400);
1130
+ margin-inline-start: var(--padding-400);
1131
+ }
1132
+
1133
+ .ds-app-sidebar__scrim--contained {
1134
+ position: sticky;
1135
+ inset: auto;
1136
+ top: 0;
1137
+ z-index: 2;
1138
+ flex: none;
1139
+ width: 100%;
1140
+ height: 100%;
1141
+ margin-inline-end: -100%;
1142
+ }
1143
+
1144
+ .ds-app-sidebar--contained.ds-app-sidebar--mobile-open {
1145
+ position: sticky;
1146
+ top: 0;
1147
+ bottom: auto;
1148
+ inset-inline-start: auto;
1149
+ z-index: 3;
1150
+ height: 100%;
1151
+ margin: 0;
1152
+ margin-inline-end: -280px; /* ds-allow(spacing): the drawer's own 280px width, handed back to the row */
1153
+ }
1154
+ }
1155
+
1020
1156
  @keyframes ds-app-sidebar-slide-in {
1021
1157
  from {
1022
1158
  transform: translateX(calc(-100% * var(--ds-inline-sign, 1)));
@@ -117,6 +117,18 @@ type AppSidebarOwnProps = {
117
117
  * @deprecated Use `layout="floating"`.
118
118
  */
119
119
  floating?: boolean;
120
+ /**
121
+ * Pin the rail to the viewport. `true` (the default) fixes it to the
122
+ * viewport's start edge at the viewport's height, with the side panel and
123
+ * the phone drawer fixed beside it, as a full-page app wants. `false`
124
+ * lays it out in its parent instead, for a framed preview or a layout that
125
+ * is not the whole page: the parent is a flex row with a definite height,
126
+ * the rail is its first item at the parent's height (sticky, so it holds
127
+ * while the parent scrolls), and the content beside it gives way as the
128
+ * rail expands and the side panel opens. On a phone the trigger, the scrim
129
+ * and the drawer stay inside the parent too.
130
+ */
131
+ fixed?: boolean;
120
132
  /** Rendered under the logo row, above the nav; fades out while collapsed */
121
133
  topSlot?: React.ReactNode;
122
134
  /** Keeps `topSlot` shown while collapsed instead of fading it, clipped by the sweeping rail as the nav rows are, for content that draws its own collapsed form: a switcher that holds its mark on the rail's axis and fades the rest. The slot carries `data-expanded`, so its content can key off the rail's state */
@@ -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: [
@@ -65,13 +65,17 @@
65
65
  }
66
66
 
67
67
  /* ============================================
68
- AI GLOW — opt-in via the `aiGlow` prop
69
- While focused, the plain selected border stands down and the AI gradient
70
- ring takes its place — the same "a model answers here" signal AiButton
71
- carries, for composers whose messages are answered by a model.
68
+ AI GLOW — the `aiGlow` prop
69
+ The AI gradient ring in place of the shell's border: AiButton's signal
70
+ that a model is at work. By default (`aiGlow="streaming"`) a composer
71
+ wears it only while a response streams (the working rules below): focus
72
+ keeps the plain selected border, so the ring means work alone. `aiGlow`
73
+ as `true` adds the focus form, `--ai-glow-focus`: while focused, the
74
+ plain selected border stands down and the ring takes its place. `false`
75
+ leaves both classes off.
72
76
  ============================================ */
73
77
 
74
- .ds-composer--ai-glow:focus-within {
78
+ .ds-composer--ai-glow-focus:focus-within {
75
79
  border-color: transparent;
76
80
  }
77
81
 
@@ -154,13 +158,13 @@
154
158
  the entrance pace and the ring fades up a --motion-duration-fast beat
155
159
  behind it — the transition here (the destination state's) governs the
156
160
  way in; the resting rules above govern the quick way back. */
157
- .ds-composer--ai-glow:focus-within::before {
161
+ .ds-composer--ai-glow-focus:focus-within::before {
158
162
  opacity: 1;
159
163
  transition: opacity var(--motion-duration-slower) var(--motion-ease-entrance) var(--motion-duration-fast);
160
164
  animation-play-state: running;
161
165
  }
162
166
 
163
- .ds-composer--ai-glow:focus-within::after {
167
+ .ds-composer--ai-glow-focus:focus-within::after {
164
168
  opacity: 0.3;
165
169
  transform: none;
166
170
  transition:
@@ -198,8 +202,9 @@
198
202
 
199
203
  /* Working: while a response streams, the ring stays lit and keeps turning
200
204
  whether or not the field holds focus — the visible half of the `streaming`
201
- contract for glowing composers. The pairing is defined in design.md's
202
- Composer section; streaming without aiGlow changes nothing. */
205
+ contract, and the only time a composer on the default wears the ring at
206
+ all. The pairing is defined in design.md's Composer section; with
207
+ `aiGlow` off, streaming changes nothing here. */
203
208
  .ds-composer--ai-glow.ds-composer--streaming {
204
209
  border-color: transparent;
205
210
  }
@@ -26,8 +26,8 @@ type ComposerOwnProps = {
26
26
  onSubmit?: (value: string) => void;
27
27
  /**
28
28
  * A response is streaming: the send button becomes a stop button, submit
29
- * is blocked, and Enter is inert. On a glowing composer (`aiGlow`) the
30
- * gradient ring also stays lit and keeps turning while this is true.
29
+ * is blocked, and Enter is inert. The gradient ring is lit and turning
30
+ * while this is true, unless `aiGlow` is `false`.
31
31
  */
32
32
  streaming?: boolean;
33
33
  /** Fires when the stop button is pressed while `streaming`. */
@@ -39,13 +39,15 @@ type ComposerOwnProps = {
39
39
  /** Growth cap in text rows before the textarea scrolls internally. Defaults to 12 in a chat composer, or 3 in the mini composer. */
40
40
  maxRows?: number;
41
41
  /**
42
- * While focused, the shell wears AiButton's slowly rotating gradient ring
43
- * and glow in place of the plain selected border — the system's "a model
44
- * answers here" signal, for composers whose messages are answered by one.
45
- * While `streaming`, the ring stays lit and turning whether or not the
46
- * field holds focus. Off by default.
42
+ * AiButton's slowly rotating gradient ring and glow on the shell, the
43
+ * system's "a model is at work here" signal. `'streaming'`, the default,
44
+ * lights it only while `streaming` is true and keeps the plain selected
45
+ * border on focus, so the ring means the agent is working and nothing
46
+ * else, and a resting composer never competes with a reply's live status.
47
+ * `true` also lights it whenever the field is focused, in place of the
48
+ * selected border. `false` never lights it.
47
49
  */
48
- aiGlow?: boolean;
50
+ aiGlow?: boolean | 'streaming';
49
51
  /**
50
52
  * Contextual note rendered as a full-width, non-interactive chip — the
51
53
  * "what the model is looking at" line a chat host pins over the message
@@ -37,7 +37,7 @@ const Composer = React.forwardRef(
37
37
  size = "default",
38
38
  inline = false,
39
39
  maxRows = inline === true ? 3 : 12,
40
- aiGlow = false,
40
+ aiGlow = "streaming",
41
41
  context,
42
42
  contextIcon,
43
43
  contextPlacement = "inside",
@@ -366,6 +366,7 @@ const Composer = React.forwardRef(
366
366
  const classes = [
367
367
  baseClass,
368
368
  aiGlow ? `${baseClass}--ai-glow` : "",
369
+ aiGlow === true ? `${baseClass}--ai-glow-focus` : "",
369
370
  inline === true && size === "compact" ? `${baseClass}--compact` : "",
370
371
  inline ? `${baseClass}--inline` : "",
371
372
  inline === "chat" ? `${baseClass}--inline-chat` : "",
@@ -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: [