rift-ds 1.34.0 → 1.36.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 (269) hide show
  1. package/README.md +4 -3
  2. package/behaviors/chat-card.css +6 -0
  3. package/behaviors/direction.css +6 -0
  4. package/behaviors/locale.d.ts +9 -0
  5. package/behaviors/locale.js +2 -0
  6. package/behaviors/shell.css +6 -0
  7. package/behaviors/shortcuts.js +2 -2
  8. package/behaviors/visually-hidden.css +6 -0
  9. package/bin/templates/blocks/app/dashboard/page.tsx +1 -1
  10. package/bin/templates/blocks/app/settings/ProfileForm.tsx +1 -1
  11. package/bin/templates/blocks/app/sign-in/page.tsx +3 -3
  12. package/bin/templates/blocks/components/blocks/AppShell.module.css +10 -6
  13. package/chat/ChatAgentPane.css +6 -0
  14. package/chat/ChatTabs.js +1 -1
  15. package/chat/ChatWidget.css +6 -0
  16. package/chat/ChatWidget.d.ts +2 -2
  17. package/chat/ChatWidget.js +1 -1
  18. package/chat/DemoWelcome.js +2 -2
  19. package/chat/FollowupSuggestions.js +1 -1
  20. package/chat/demo.css +6 -0
  21. package/chat/queries.js +1 -1
  22. package/chat/selection.css +6 -0
  23. package/components/Accordion/Accordion.css +6 -0
  24. package/components/ActionBar/ActionBar.css +84 -0
  25. package/components/ActionBar/ActionBar.d.ts +40 -0
  26. package/components/ActionBar/ActionBar.js +29 -0
  27. package/components/ActionCard/ActionCard.css +6 -0
  28. package/components/ActionReadout/ActionReadout.css +6 -0
  29. package/components/AgentPlan/AgentPlan.css +6 -0
  30. package/components/AgentRail/AgentRail.css +6 -0
  31. package/components/AgentStatus/AgentStatus.css +12 -7
  32. package/components/AiButton/AiButton.css +17 -11
  33. package/components/AiButton/AiButton.js +1 -1
  34. package/components/Alert/Alert.css +22 -0
  35. package/components/Alert/Alert.d.ts +2 -2
  36. package/components/Alert/Alert.js +3 -1
  37. package/components/AlertDialog/AlertDialog.css +6 -0
  38. package/components/AnchorNav/AnchorNav.css +6 -0
  39. package/components/AnimatedNumber/AnimatedNumber.css +5 -0
  40. package/components/AppLayout/AppLayout.css +6 -0
  41. package/components/AppSidebar/AppSidebar.css +159 -5
  42. package/components/AppSidebar/AppSidebar.d.ts +13 -1
  43. package/components/AppSidebar/AppSidebar.js +17 -7
  44. package/components/ArtifactCard/ArtifactCard.css +6 -0
  45. package/components/ArtifactPanel/ArtifactPanel.css +6 -0
  46. package/components/Attachment/Attachment.css +6 -0
  47. package/components/Attachment/AttachmentGroup.js +4 -1
  48. package/components/Avatar/Avatar.css +6 -0
  49. package/components/AvatarGroup/AvatarGroup.css +6 -0
  50. package/components/BackToTop/BackToTop.css +6 -0
  51. package/components/Badge/Badge.css +6 -0
  52. package/components/Banner/Banner.css +6 -0
  53. package/components/BentoTile/BentoTile.css +6 -0
  54. package/components/BottomNav/BottomNav.css +6 -0
  55. package/components/Breadcrumb/Breadcrumb.css +6 -0
  56. package/components/Button/Button.css +6 -0
  57. package/components/Button/Button.d.ts +7 -1
  58. package/components/Button/Button.js +2 -1
  59. package/components/ButtonGroup/ButtonGroup.css +6 -0
  60. package/components/Card/Card.css +6 -0
  61. package/components/CardStack/CardStack.css +5 -0
  62. package/components/Carousel/Carousel.css +6 -0
  63. package/components/Chart/Chart.css +9 -1
  64. package/components/ChatHeader/ChatHeader.css +6 -0
  65. package/components/ChatMarker/ChatMarker.css +6 -0
  66. package/components/ChatMessage/ChatMessage.css +6 -0
  67. package/components/ChatThread/ChatThread.css +6 -0
  68. package/components/ChatThread/ChatThread.d.ts +5 -1
  69. package/components/ChatThread/ChatThread.js +1 -1
  70. package/components/Checkbox/Checkbox.css +6 -0
  71. package/components/Checkbox/Checkbox.js +1 -1
  72. package/components/Checklist/Checklist.css +6 -0
  73. package/components/Chip/Chip.css +6 -0
  74. package/components/CodeBlock/CodeBlock.css +6 -0
  75. package/components/CodeDiff/CodeDiff.css +5 -0
  76. package/components/ColorPicker/ColorPicker.css +6 -0
  77. package/components/ColourSwatch/ColourSwatch.css +6 -0
  78. package/components/Combobox/Combobox.css +6 -0
  79. package/components/CommandPalette/CommandPalette.css +6 -0
  80. package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +6 -0
  81. package/components/Composer/Composer.css +6 -0
  82. package/components/ContactCard/ContactCard.css +6 -0
  83. package/components/ContextMenu/ContextMenu.css +6 -0
  84. package/components/ContextMenu/ContextMenu.d.ts +5 -1
  85. package/components/ContextMenu/ContextMenu.js +2 -1
  86. package/components/ContributionGraph/ContributionGraph.css +6 -0
  87. package/components/ContributionGraph/ContributionGraph.d.ts +7 -1
  88. package/components/ContributionGraph/ContributionGraph.js +4 -18
  89. package/components/ContributionGraph/weeks.d.ts +8 -0
  90. package/components/ContributionGraph/weeks.js +25 -0
  91. package/components/CurrencyInput/CurrencyInput.css +6 -0
  92. package/components/DataTable/DataTable.css +6 -0
  93. package/components/DataTable/DataTable.js +7 -3
  94. package/components/DateInput/DateInput.css +6 -0
  95. package/components/DatePicker/DatePicker.css +6 -0
  96. package/components/DateRangePicker/DateRangePicker.css +6 -0
  97. package/components/Deadline/Deadline.css +6 -0
  98. package/components/DecisionRow/DecisionRow.css +6 -0
  99. package/components/DescriptionList/DescriptionList.css +6 -0
  100. package/components/Dialog/Dialog.css +6 -0
  101. package/components/Divider/Divider.css +6 -0
  102. package/components/DocumentChip/DocumentChip.css +6 -0
  103. package/components/DocumentChip/DocumentChip.js +1 -1
  104. package/components/DocumentViewer/DocumentViewer.css +6 -0
  105. package/components/Drawer/Drawer.css +6 -0
  106. package/components/Dropdown/ChosenMark.css +6 -0
  107. package/components/Dropdown/Dropdown.css +6 -0
  108. package/components/Dropdown/Dropdown.js +1 -1
  109. package/components/DropdownMenu/DropdownMenu.css +6 -0
  110. package/components/EmptyState/EmptyState.css +6 -0
  111. package/components/EntityCard/EntityCard.css +6 -0
  112. package/components/EntitySwitcher/EntitySwitcher.css +17 -3
  113. package/components/EntitySwitcher/EntitySwitcher.js +1 -1
  114. package/components/ErrorSummary/ErrorSummary.css +6 -0
  115. package/components/ErrorSummary/ErrorSummary.js +3 -1
  116. package/components/EventCalendar/EventCalendar.css +158 -0
  117. package/components/EventCalendar/EventCalendar.d.ts +50 -4
  118. package/components/EventCalendar/EventCalendar.js +154 -23
  119. package/components/EventCalendar/eventTime.d.ts +31 -0
  120. package/components/EventCalendar/eventTime.js +42 -0
  121. package/components/Field/Field.css +6 -0
  122. package/components/Figure/Figure.css +6 -0
  123. package/components/FileInput/FileInput.css +6 -0
  124. package/components/FileInput/FileInput.d.ts +12 -4
  125. package/components/FileInput/FileInput.js +27 -4
  126. package/components/FilterBar/FilterBar.css +9 -1
  127. package/components/FormSection/FormSection.css +6 -0
  128. package/components/FunnelChart/FunnelChart.css +6 -0
  129. package/components/GanttChart/GanttChart.css +6 -0
  130. package/components/Gauge/Gauge.css +6 -0
  131. package/components/Globe/Globe.css +6 -0
  132. package/components/Grid/Grid.css +6 -0
  133. package/components/Heading/Heading.css +6 -0
  134. package/components/HoverCard/HoverCard.css +6 -0
  135. package/components/Icon/Icon.css +6 -0
  136. package/components/IconButton/IconButton.css +6 -0
  137. package/components/IconButton/IconButton.d.ts +7 -1
  138. package/components/IconButton/IconButton.js +2 -1
  139. package/components/ImageCompare/ImageCompare.css +6 -0
  140. package/components/Input/Input.css +52 -4
  141. package/components/Input/Input.d.ts +8 -0
  142. package/components/Input/Input.js +3 -0
  143. package/components/Inspector/Inspector.css +6 -0
  144. package/components/Instructions/Instructions.css +6 -0
  145. package/components/InterruptCard/InterruptCard.css +6 -0
  146. package/components/Kbd/Kbd.css +6 -0
  147. package/components/LegendTile/LegendTile.css +6 -0
  148. package/components/Lightbox/Lightbox.css +6 -0
  149. package/components/Link/Link.css +9 -1
  150. package/components/LinkList/LinkList.css +6 -0
  151. package/components/List/List.css +6 -0
  152. package/components/MapCallout/MapCallout.css +6 -0
  153. package/components/MapLegend/MapLegend.css +6 -0
  154. package/components/MaskedInput/MaskedInput.css +6 -0
  155. package/components/MegaMenu/MegaMenu.css +6 -0
  156. package/components/Mention/Mention.css +6 -0
  157. package/components/Mention/Mention.js +1 -1
  158. package/components/Menubar/Menubar.css +6 -0
  159. package/components/MessageActions/MessageActions.css +6 -0
  160. package/components/MessageCard/MessageCard.css +6 -0
  161. package/components/Meter/Meter.css +6 -0
  162. package/components/ModelPicker/ModelPicker.css +6 -0
  163. package/components/MotionSwatch/MotionSwatch.css +6 -0
  164. package/components/Nav/Nav.css +6 -0
  165. package/components/NavList/NavList.css +6 -0
  166. package/components/NotificationCenter/NotificationCenter.css +6 -0
  167. package/components/NumberInput/NumberInput.css +6 -0
  168. package/components/OrgChart/OrgChart.css +6 -0
  169. package/components/PageHeader/PageHeader.css +6 -0
  170. package/components/Pagination/Pagination.css +6 -0
  171. package/components/Panel/Panel.css +6 -0
  172. package/components/PinInput/PinInput.css +6 -0
  173. package/components/PixelAvatar/PixelAvatar.css +6 -0
  174. package/components/Popover/Popover.css +6 -0
  175. package/components/Popover/Popover.d.ts +5 -1
  176. package/components/Popover/Popover.js +3 -1
  177. package/components/ProgressBar/ProgressBar.css +6 -0
  178. package/components/ProgressBar/ProgressBar.d.ts +5 -1
  179. package/components/ProgressBar/ProgressBar.js +1 -1
  180. package/components/ProgressiveBlur/ProgressiveBlur.css +6 -0
  181. package/components/PromptSuggestions/PromptSuggestions.css +5 -0
  182. package/components/PromptSuggestions/PromptSuggestions.d.ts +5 -1
  183. package/components/PromptSuggestions/PromptSuggestions.js +1 -1
  184. package/components/Prose/Prose.css +6 -0
  185. package/components/QuestionCard/QuestionCard.css +5 -0
  186. package/components/Quote/Quote.css +6 -0
  187. package/components/RadioButton/RadioButton.css +6 -0
  188. package/components/Rating/Rating.css +6 -0
  189. package/components/Reasoning/Reasoning.css +6 -0
  190. package/components/ResourceTimeline/ResourceTimeline.css +6 -0
  191. package/components/ResourceTimeline/ResourceTimeline.js +2 -2
  192. package/components/RichDropdown/RichDropdown.css +6 -0
  193. package/components/SectionTitle/SectionTitle.css +6 -0
  194. package/components/SegmentedControl/SegmentedControl.css +126 -3
  195. package/components/SegmentedControl/SegmentedControl.d.ts +9 -0
  196. package/components/SegmentedControl/SegmentedControl.js +11 -1
  197. package/components/SelectionCard/SelectionCard.css +6 -0
  198. package/components/ShaderField/ShaderField.css +6 -0
  199. package/components/ShaderField/ShaderField.js +2 -0
  200. package/components/ShaderScene/ShaderScene.css +6 -0
  201. package/components/ShaderScene/ShaderScene.d.ts +3 -3
  202. package/components/ShaderScene/scenes.d.ts +17 -0
  203. package/components/ShaderScene/scenes.js +175 -1
  204. package/components/SidebarPanel/SidebarPanel.css +6 -0
  205. package/components/SignaturePad/SignaturePad.css +6 -0
  206. package/components/SiteFooter/SiteFooter.css +6 -0
  207. package/components/SiteHeader/SiteHeader.css +6 -0
  208. package/components/SiteLayout/SiteLayout.css +6 -0
  209. package/components/Skeleton/Skeleton.css +6 -0
  210. package/components/Slider/Slider.css +6 -0
  211. package/components/SourceChip/SourceChip.css +6 -0
  212. package/components/SourceTrail/SourceTrail.css +6 -0
  213. package/components/SpacingSwatch/SpacingSwatch.css +6 -0
  214. package/components/Sparkline/Sparkline.css +6 -0
  215. package/components/Spinner/Spinner.css +6 -0
  216. package/components/SplitButton/SplitButton.css +6 -0
  217. package/components/SplitButton/SplitButton.d.ts +7 -1
  218. package/components/SplitButton/SplitButton.js +3 -1
  219. package/components/SplitPane/SplitPane.css +6 -0
  220. package/components/Stack/Stack.css +6 -0
  221. package/components/Stat/Stat.css +25 -1
  222. package/components/Stat/Stat.d.ts +5 -0
  223. package/components/Stat/Stat.js +9 -3
  224. package/components/StatusDot/StatusDot.css +6 -0
  225. package/components/Stepper/Stepper.css +6 -0
  226. package/components/StreamingText/StreamingText.css +6 -0
  227. package/components/Swatch/Swatch.css +6 -0
  228. package/components/Table/Table.css +15 -1
  229. package/components/TableToolbar/TableToolbar.css +6 -0
  230. package/components/TableToolbar/TableToolbar.js +2 -2
  231. package/components/Tabs/Tabs.css +6 -0
  232. package/components/TagInput/TagInput.css +6 -0
  233. package/components/Text/Text.css +6 -0
  234. package/components/Textarea/Textarea.css +5 -0
  235. package/components/ThemePicker/ThemePicker.css +6 -0
  236. package/components/ThemeToggle/ThemeToggle.css +6 -0
  237. package/components/ThemeToggle/ThemeToggle.d.ts +1 -1
  238. package/components/ThreadPanel/ThreadPanel.css +6 -0
  239. package/components/ThreadTabs/ThreadTabs.css +6 -0
  240. package/components/ThreadTabs/ThreadTabs.d.ts +5 -1
  241. package/components/ThreadTabs/ThreadTabs.js +2 -1
  242. package/components/TimePicker/TimePicker.css +6 -0
  243. package/components/Timeline/Timeline.css +18 -18
  244. package/components/Toast/Toast.css +6 -0
  245. package/components/Toast/Toast.js +1 -1
  246. package/components/ToggleGroup/ToggleGroup.css +6 -0
  247. package/components/ToggleGroup/ToggleGroup.d.ts +5 -1
  248. package/components/ToggleSwitch/ToggleSwitch.css +21 -3
  249. package/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
  250. package/components/ToggleSwitch/ToggleSwitch.js +2 -2
  251. package/components/ToolCall/ToolCall.css +6 -0
  252. package/components/Toolbar/Toolbar.css +6 -0
  253. package/components/Tooltip/Tooltip.css +6 -0
  254. package/components/TopAppBar/TopAppBar.css +6 -0
  255. package/components/TreeView/TreeView.css +6 -0
  256. package/components/TypographySwatch/TypographySwatch.css +6 -0
  257. package/components/UsageCard/UsageCard.css +6 -0
  258. package/components/Waveform/Waveform.css +6 -0
  259. package/components/Widget/Widget.css +6 -0
  260. package/components/Wizard/Wizard.css +6 -0
  261. package/components/WorldMap/WorldMap.css +6 -0
  262. package/components/registry.json +21 -4
  263. package/components/registry.json.d.ts +21 -4
  264. package/components/registry.json.js +1 -1
  265. package/fonts/material-symbols.css +10 -0
  266. package/index.d.ts +1 -0
  267. package/index.js +2 -0
  268. package/package.json +1 -1
  269. package/tokens/base.css +11 -2
@@ -19,6 +19,16 @@
19
19
  changes the indicator's footprint or rhythm.
20
20
  ============================================ */
21
21
 
22
+ @layer rift.tokens, rift.preset, rift.components;
23
+
24
+ @property --ds-agent-ring-angle {
25
+ syntax: '<angle>';
26
+ initial-value: 0deg;
27
+ inherits: false;
28
+ }
29
+
30
+ @layer rift.components {
31
+
22
32
  .ds-agent-status {
23
33
  --ds-agent-color: var(--color-text-secondary);
24
34
  --ds-agent-label-color: var(--color-text-secondary);
@@ -918,7 +928,6 @@
918
928
  .ds-agent-status-mark--diagonal-swipe .ds-agent-status-mark__dot:nth-child(15) { --ds-agent-step: 7.5; }
919
929
  .ds-agent-status-mark--diagonal-swipe .ds-agent-status-mark__dot:nth-child(16) { --ds-agent-step: 9; }
920
930
 
921
-
922
931
  /* Twinkle: solid, one or two dots dipping on a fixed scatter */
923
932
  .ds-agent-status-mark--animated.ds-agent-status-mark--twinkle .ds-agent-status-mark__dot:nth-child(n) {
924
933
  opacity: 1;
@@ -963,12 +972,6 @@
963
972
  element's own edge and radius.
964
973
  ============================================ */
965
974
 
966
- @property --ds-agent-ring-angle {
967
- syntax: '<angle>';
968
- initial-value: 0deg;
969
- inherits: false;
970
- }
971
-
972
975
  /* Zero specificity, so a host's own position always wins: the ring only
973
976
  needs a containing block, which absolute and fixed already are. */
974
977
  :where(.ds-agent-ring) {
@@ -1238,3 +1241,5 @@
1238
1241
  animation: none;
1239
1242
  }
1240
1243
  }
1244
+
1245
+ } /* @layer rift.components */
@@ -9,6 +9,8 @@
9
9
  the flat action colour.
10
10
  ============================================ */
11
11
 
12
+ @layer rift.tokens, rift.preset, rift.components;
13
+
12
14
  /* The rotation animates a registered custom property: a conic gradient's
13
15
  angle cannot tween otherwise. Browsers without @property render the ring
14
16
  at its initial angle, static — a correct, quieter fallback. */
@@ -18,6 +20,19 @@
18
20
  inherits: false;
19
21
  }
20
22
 
23
+ /* The opening signature: the AI gradient sweeps once around the whole
24
+ border — the button's masked conic ring, run as a single swoosh — then
25
+ fades away, leaving the regular border. The rotation animates a
26
+ registered custom property; without @property support the ring still
27
+ fades in and out, just without turning. */
28
+ @property --ds-ai-summary-ring-angle {
29
+ syntax: '<angle>';
30
+ initial-value: 0deg;
31
+ inherits: false;
32
+ }
33
+
34
+ @layer rift.components {
35
+
21
36
  /* Base */
22
37
  .ds-ai-button {
23
38
  /* Layout */
@@ -505,17 +520,6 @@
505
520
  }
506
521
  }
507
522
 
508
- /* The opening signature: the AI gradient sweeps once around the whole
509
- border — the button's masked conic ring, run as a single swoosh — then
510
- fades away, leaving the regular border. The rotation animates a
511
- registered custom property; without @property support the ring still
512
- fades in and out, just without turning. */
513
- @property --ds-ai-summary-ring-angle {
514
- syntax: '<angle>';
515
- initial-value: 0deg;
516
- inherits: false;
517
- }
518
-
519
523
  .ds-ai-button__summary::before,
520
524
  .ds-ai-button__request::before {
521
525
  content: '';
@@ -762,3 +766,5 @@
762
766
  .ds-tooltip:has(> .ds-ai-button[aria-expanded='true']) .ds-tooltip__panel {
763
767
  display: none;
764
768
  }
769
+
770
+ } /* @layer rift.components */
@@ -300,7 +300,7 @@ const AiButton = React.forwardRef(
300
300
  {
301
301
  layout: "stack",
302
302
  size: "compact",
303
- ariaLabel: suggestionsLabel,
303
+ "aria-label": suggestionsLabel,
304
304
  suggestions: summary.suggestions,
305
305
  onValueChange: onSummarySuggestion
306
306
  }
@@ -3,6 +3,10 @@
3
3
  Contextual feedback with status variants
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-alert {
7
11
  display: flex;
8
12
  align-items: flex-start;
@@ -94,6 +98,22 @@
94
98
  margin: 0;
95
99
  }
96
100
 
101
+ /* Markup in the description: paragraphs and lists stack at the content's
102
+ own gap, with no browser margins, and a list keeps its markers inside the
103
+ content column. Links are the Link component's inline form, which already
104
+ takes the sentence's colour. */
105
+ .ds-alert__description > :where(p, ul, ol) {
106
+ margin: 0;
107
+ }
108
+
109
+ .ds-alert__description > * + :where(p, ul, ol) {
110
+ margin-block-start: var(--gap-100); /* 4px */
111
+ }
112
+
113
+ .ds-alert__description :where(ul, ol) {
114
+ padding-inline-start: var(--padding-500); /* 20px */
115
+ }
116
+
97
117
  /* ============================================
98
118
  ACTIONS
99
119
  ============================================ */
@@ -271,3 +291,5 @@
271
291
  .ds-alert .material-symbols-rounded {
272
292
  color: inherit;
273
293
  }
294
+
295
+ } /* @layer rift.components */
@@ -6,8 +6,8 @@ type AlertOwnProps = {
6
6
  * Note: this shadows the native `title` tooltip attribute, which Alert does not expose.
7
7
  */
8
8
  title?: string;
9
- /** Alert description / body text */
10
- description?: string;
9
+ /** The body under the title. Plain text is the usual case; it also takes a short run of markup, such as a sentence with a Link in it or a list of two or three items. */
10
+ description?: React.ReactNode;
11
11
  /** Alert variant determines colour and icon */
12
12
  variant?: 'info' | 'positive' | 'warning' | 'error' | 'neutral';
13
13
  /** Component size */
@@ -39,7 +39,9 @@ const Alert = React.forwardRef(
39
39
  ) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon`, "aria-hidden": "true", children: iconValue }),
40
40
  /* @__PURE__ */ jsxs("div", { className: `${baseClass}__content`, children: [
41
41
  title && /* @__PURE__ */ jsx("p", { className: `${baseClass}__title`, children: title }),
42
- description && /* @__PURE__ */ jsx("p", { className: `${baseClass}__description`, children: description }),
42
+ description != null && description !== false && description !== "" && // Text sits in a paragraph; markup gets a div, since a paragraph
43
+ // cannot hold another paragraph or a list.
44
+ (typeof description === "string" || typeof description === "number" ? /* @__PURE__ */ jsx("p", { className: `${baseClass}__description`, children: description }) : /* @__PURE__ */ jsx("div", { className: `${baseClass}__description`, children: description })),
43
45
  action != null && action !== false && /* @__PURE__ */ jsx("div", { className: `${baseClass}__actions`, children: action })
44
46
  ] }),
45
47
  dismissible && /* @__PURE__ */ jsx(
@@ -3,6 +3,10 @@
3
3
  Modal confirmation with backdrop overlay
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-alert-dialog {
7
11
  position: fixed;
8
12
  inset: 0;
@@ -131,3 +135,5 @@
131
135
  margin: var(--padding-400);
132
136
  }
133
137
  }
138
+
139
+ } /* @layer rift.components */
@@ -1,3 +1,7 @@
1
+ @layer rift.tokens, rift.preset, rift.components;
2
+
3
+ @layer rift.components {
4
+
1
5
  /* ============================================
2
6
  ANCHOR NAV
3
7
  "On this page" list of anchor links with a
@@ -135,3 +139,5 @@
135
139
  pointer-events: auto;
136
140
  transform: translate(0, -50%);
137
141
  }
142
+
143
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  A number that counts to its value
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  /* Base — inherits the surrounding type entirely: the component is a number
7
11
  inside someone else's composition (a Stat, a table cell, a sentence), so
8
12
  it owns no face, size, or colour of its own. */
@@ -17,3 +21,4 @@
17
21
  font-variant-numeric: tabular-nums;
18
22
  }
19
23
 
24
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Sidebar rail on the left, centered content area
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-app-layout {
7
11
  /* The contained width, AppLayout's own: an app's working column. */
8
12
  --ds-shell-contained-width: 1120px;
@@ -165,3 +169,5 @@
165
169
  padding: var(--padding-500) var(--padding-400);
166
170
  }
167
171
  }
172
+
173
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  Expanded: 280px with labels, accordion, profile
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  /* ============================================
8
12
  WRAPPER
9
13
  ============================================ */
@@ -233,10 +237,10 @@
233
237
  justify-content: space-between;
234
238
  height: 40px;
235
239
  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. */
240
+ /* Collapsed, the 12px margins leave a 40px row in the 64px rail, so the
241
+ hover pill is a perfect circle clear of the rail edges, with the icon
242
+ centred (12 + 8 + 24 + 8 + 12 = 64). Expanded, the start side trades
243
+ 4px of margin for 4px of padding (the --expanded rule below). */
240
244
  margin: 0 var(--padding-300);
241
245
  padding: var(--padding-200);
242
246
  border-radius: var(--radius-pill);
@@ -255,6 +259,18 @@
255
259
  before), so the pill floats off the rail edges while the icon and label
256
260
  keep their exact x-positions against the category labels above. */
257
261
 
262
+ /* Expanded, the pill's start curve bent right up to the icon 8px in, and
263
+ the icon read as crammed against the highlight's edge. The start side
264
+ trades 4px of margin for 4px of padding (8 + 12, still 20), so the icon
265
+ holds its x and the pill reaches a step toward the rail's edge. Margin
266
+ and padding glide on the same duration and easing, so their sum stays 20
267
+ through the sweep and the icon never moves. Not panel mode, whose rows
268
+ keep one seat of their own. */
269
+ .ds-app-sidebar--expanded:not(.ds-app-sidebar--panel-mode) .ds-app-sidebar__btn {
270
+ margin-inline-start: var(--padding-200);
271
+ padding-inline-start: var(--padding-300);
272
+ }
273
+
258
274
  .ds-app-sidebar__btn:hover {
259
275
  background-color: var(--color-action-passive-bg-hover);
260
276
  }
@@ -778,6 +794,82 @@
778
794
  border-inline-end-color: transparent;
779
795
  }
780
796
 
797
+ /* ============================================
798
+ CONTAINED — the rail laid out in its parent
799
+ (fixed={false}), for a framed preview
800
+ or a layout that is not the whole page. The
801
+ parent is a flex row with a definite height.
802
+ Every piece that is fixed to the viewport
803
+ above takes its place in that row instead,
804
+ held there by position: sticky, and a piece
805
+ that overlays (the panel while hidden, the
806
+ phone drawer, its scrim) gives its width
807
+ back with a negative end margin, so none of
808
+ them needs a positioned ancestor. Small
809
+ local stacking values, not the layer tokens:
810
+ the rail stacks only against its own
811
+ neighbours in the frame, never the page.
812
+ ============================================ */
813
+ .ds-app-sidebar--contained {
814
+ position: sticky;
815
+ top: 0;
816
+ /* Sticky honours an inline offset too, which would pin the rail against
817
+ a scrolling ancestor's edge; the row places it instead. */
818
+ inset-inline-start: auto;
819
+ z-index: 3;
820
+ flex: none;
821
+ height: 100%;
822
+ }
823
+
824
+ .ds-app-sidebar--contained.ds-app-sidebar--floating {
825
+ top: var(--ds-sidebar-float-inset, 20px);
826
+ inset-inline-start: auto;
827
+ height: calc(100% - var(--ds-sidebar-float-inset, 20px) * 2);
828
+ margin-block: var(--ds-sidebar-float-inset, 20px);
829
+ margin-inline-start: var(--ds-sidebar-float-inset, 20px);
830
+ }
831
+
832
+ /* The panel follows the rail in the row, so it tracks the rail's width
833
+ with no offsets of its own. Shown, it takes its width beside the rail
834
+ and the content gives way, as AppLayout reserves it; hidden, its end
835
+ margin hands the width back on the same glide. */
836
+ .ds-app-sidebar__panel--contained {
837
+ position: sticky;
838
+ top: 0;
839
+ inset-inline-start: auto;
840
+ z-index: 2;
841
+ flex: none;
842
+ height: 100%;
843
+ margin-inline-end: calc(-1 * var(--ds-sidebar-panel-width, 240px));
844
+ transition:
845
+ margin var(--motion-duration-slow) var(--motion-ease-emphasized),
846
+ opacity var(--motion-duration-base) var(--motion-ease-standard),
847
+ transform var(--motion-duration-slow) var(--motion-ease-emphasized),
848
+ visibility 0s linear var(--motion-duration-base);
849
+ }
850
+
851
+ .ds-app-sidebar__panel--contained.ds-app-sidebar__panel--visible {
852
+ margin-inline-end: 0;
853
+ transition:
854
+ margin var(--motion-duration-slow) var(--motion-ease-emphasized),
855
+ opacity var(--motion-duration-base) var(--motion-ease-standard),
856
+ transform var(--motion-duration-slow) var(--motion-ease-emphasized),
857
+ visibility 0s linear 0s;
858
+ }
859
+
860
+ .ds-app-sidebar__panel--contained.ds-app-sidebar__panel--floating {
861
+ top: var(--ds-sidebar-float-inset, 20px);
862
+ inset-inline-start: auto;
863
+ height: calc(100% - var(--ds-sidebar-float-inset, 20px) * 2);
864
+ margin-block: var(--ds-sidebar-float-inset, 20px);
865
+ margin-inline-start: var(--gap-300);
866
+ margin-inline-end: calc(-1 * (var(--ds-sidebar-panel-width, 240px) + var(--gap-300)));
867
+ }
868
+
869
+ .ds-app-sidebar__panel--contained.ds-app-sidebar__panel--floating.ds-app-sidebar__panel--visible {
870
+ margin-inline-end: 0;
871
+ }
872
+
781
873
  /* ============================================
782
874
  PANEL MODE RAIL — labels under icons
783
875
  With the second level in the panel, the
@@ -835,6 +927,12 @@
835
927
  height: 40px;
836
928
  }
837
929
 
930
+ /* A collapsed EntitySwitcher in the top slot centres its mark on the row
931
+ icons' axis, so it takes the panel rows' deeper icon inset. */
932
+ .ds-app-sidebar--panel-mode .ds-app-sidebar__top-slot {
933
+ --ds-entity-switcher-rail-inset: var(--padding-400);
934
+ }
935
+
838
936
  .ds-app-sidebar--panel-mode .ds-app-sidebar__btn-left {
839
937
  height: 24px;
840
938
  }
@@ -911,6 +1009,16 @@
911
1009
  outline-offset: -2px;
912
1010
  }
913
1011
 
1012
+ /* The rail's standalone controls (the collapse toggle, the profile menu
1013
+ button, the mobile trigger) take the same ring, outside their round box as
1014
+ Button's sits, rather than the browser's default. */
1015
+ .ds-app-sidebar__toggle:focus-visible,
1016
+ .ds-app-sidebar__profile-more:focus-visible,
1017
+ .ds-app-sidebar__mobile-trigger:focus-visible {
1018
+ outline: 2px solid var(--color-action-primary-bg);
1019
+ outline-offset: 2px;
1020
+ }
1021
+
914
1022
  /* ============================================
915
1023
  DRAWER DRILL-IN — the panel's level as a
916
1024
  second screen inside the mobile drawer
@@ -980,7 +1088,9 @@
980
1088
  width: 40px;
981
1089
  height: 40px;
982
1090
  padding: 0;
983
- background: var(--color-bg-container-primary);
1091
+ /* Opaque: the trigger floats over the page's own content, and the
1092
+ container fill is translucent in dark mode. */
1093
+ background: var(--color-bg-page-primary);
984
1094
  border: var(--border-025) solid var(--color-bg-container-border);
985
1095
  border-radius: var(--radius-pill);
986
1096
  color: var(--color-text-primary);
@@ -1017,6 +1127,48 @@
1017
1127
  }
1018
1128
  }
1019
1129
 
1130
+ /* Contained, the phone drawer stays in its parent: the trigger sits at
1131
+ the parent's top start corner (an absolute box with no offsets keeps its
1132
+ place in the row and takes none of it), and the scrim and the drawer
1133
+ cover the parent's height from its start, each handing its width back
1134
+ with an end margin. The drawer's body scroll lock still holds the page. */
1135
+ @media (max-width: 768px) {
1136
+ .ds-app-sidebar--contained.ds-app-sidebar--floating:not(.ds-app-sidebar--mobile-open) {
1137
+ margin: 0;
1138
+ }
1139
+
1140
+ .ds-app-sidebar__mobile-trigger--contained {
1141
+ position: absolute;
1142
+ top: auto;
1143
+ inset-inline-start: auto;
1144
+ z-index: 1;
1145
+ margin-block-start: var(--padding-400);
1146
+ margin-inline-start: var(--padding-400);
1147
+ }
1148
+
1149
+ .ds-app-sidebar__scrim--contained {
1150
+ position: sticky;
1151
+ inset: auto;
1152
+ top: 0;
1153
+ z-index: 2;
1154
+ flex: none;
1155
+ width: 100%;
1156
+ height: 100%;
1157
+ margin-inline-end: -100%;
1158
+ }
1159
+
1160
+ .ds-app-sidebar--contained.ds-app-sidebar--mobile-open {
1161
+ position: sticky;
1162
+ top: 0;
1163
+ bottom: auto;
1164
+ inset-inline-start: auto;
1165
+ z-index: 3;
1166
+ height: 100%;
1167
+ margin: 0;
1168
+ margin-inline-end: -280px; /* ds-allow(spacing): the drawer's own 280px width, handed back to the row */
1169
+ }
1170
+ }
1171
+
1020
1172
  @keyframes ds-app-sidebar-slide-in {
1021
1173
  from {
1022
1174
  transform: translateX(calc(-100% * var(--ds-inline-sign, 1)));
@@ -1089,3 +1241,5 @@
1089
1241
  .ds-app-sidebar__toggle:active::before {
1090
1242
  background-color: var(--color-action-passive-bg-active);
1091
1243
  }
1244
+
1245
+ } /* @layer rift.components */
@@ -69,7 +69,7 @@ type AppSidebarOwnProps = {
69
69
  sections: AppSidebarSection[];
70
70
  /** Profile data for the bottom section */
71
71
  profile?: AppSidebarProfile;
72
- /** Key of the currently active item */
72
+ /** Key of the currently active item. When one of its children is the current page (`activeSubKey` or `activeTertiaryKey`), that child carries `aria-current` instead, and this row drops its fill while the child shows below it. */
73
73
  activeKey?: string;
74
74
  /** Key of the currently active sub-item */
75
75
  activeSubKey?: string;
@@ -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 */
@@ -5,7 +5,7 @@ import { useLinkComponent } from "../../behaviors/LinkProvider.js";
5
5
  import { useLayer } from "../../behaviors/useLayer.js";
6
6
  import { useFocusScope } from "../../behaviors/useFocusScope.js";
7
7
  import { useScrollLock } from "../../behaviors/useScrollLock.js";
8
- import { mediaAbove, mediaBelow, BREAKPOINT_TABLET_PX, BREAKPOINT_MOBILE_PX } from "../../tokens/breakpoints.js";
8
+ import { mediaAbove, mediaBelow, BREAKPOINT_MOBILE_PX, BREAKPOINT_TABLET_PX } from "../../tokens/breakpoints.js";
9
9
  import { Avatar } from "../Avatar/Avatar.js";
10
10
  import { PixelAvatar } from "../PixelAvatar/PixelAvatar.js";
11
11
  import { SidebarPanel } from "../SidebarPanel/SidebarPanel.js";
@@ -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
  {
@@ -346,7 +349,13 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
346
349
  const isOpen = openKeys.has(item.key);
347
350
  const feedsPanel = isPanelMode && hasChildren;
348
351
  const isSource = feedsPanel && item.key === panelSourceKey;
349
- const isActive = isPanelMode && panelVisible ? isSource : activeKey === item.key;
352
+ const childCurrent = Boolean(
353
+ hasChildren && item.children.some(
354
+ (sub) => sub.key === activeSubKey || sub.children?.some((leaf) => leaf.key === activeTertiaryKey)
355
+ )
356
+ );
357
+ const childShows = childCurrent && !isPanelMode && (isExpanded || mobileOpen) && isOpen;
358
+ const isActive = (isPanelMode && panelVisible ? isSource : activeKey === item.key) && !childShows;
350
359
  const isLink = Boolean(item.href) && !hasChildren;
351
360
  const itemClasses = [
352
361
  `${baseClass}__btn`,
@@ -410,7 +419,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
410
419
  },
411
420
  "aria-expanded": feedsPanel ? mobileOpen ? void 0 : isSource && panelVisible : hasChildren ? isOpen : void 0,
412
421
  "aria-controls": feedsPanel && !mobileOpen ? panelId : void 0,
413
- "aria-current": activeKey === item.key ? "page" : void 0,
422
+ "aria-current": activeKey === item.key && !childCurrent ? "page" : void 0,
414
423
  "data-panel-source": isSource ? "true" : void 0,
415
424
  title: !isExpanded && !isPanelMode ? item.label : void 0,
416
425
  children: itemContent
@@ -456,7 +465,7 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
456
465
  },
457
466
  "aria-expanded": mobileOpen ? void 0 : subIsSource && panelVisible,
458
467
  "aria-controls": mobileOpen ? void 0 : panelId,
459
- "aria-current": activeSubKey === sub.key ? "page" : void 0,
468
+ "aria-current": activeSubKey === sub.key && !sub.children?.some((leaf) => leaf.key === activeTertiaryKey) ? "page" : void 0,
460
469
  "data-panel-source": subIsSource ? "true" : void 0,
461
470
  children: subLabel
462
471
  }
@@ -540,7 +549,8 @@ const AppSidebar = React.forwardRef(function AppSidebar2({
540
549
  isExpanded ? `${baseClass}__panel--beside-expanded` : "",
541
550
  isPanelMode ? `${baseClass}__panel--panel-mode` : "",
542
551
  floating ? `${baseClass}__panel--floating` : "",
543
- layout === "inset" ? `${baseClass}__panel--inset` : ""
552
+ layout === "inset" ? `${baseClass}__panel--inset` : "",
553
+ contained ? `${baseClass}__panel--contained` : ""
544
554
  ].filter(Boolean).join(" "),
545
555
  items: panelSource.items,
546
556
  title: panelSource.label,
@@ -5,6 +5,10 @@
5
5
  toggle button: pressed while its artifact is on stage in the panel.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  /* Base */
9
13
 
10
14
  .ds-artifact-card {
@@ -105,3 +109,5 @@
105
109
  opacity: 0.4;
106
110
  cursor: not-allowed;
107
111
  }
112
+
113
+ } /* @layer rift.components */
@@ -10,6 +10,10 @@
10
10
  never leave with the content.
11
11
  ============================================ */
12
12
 
13
+ @layer rift.tokens, rift.preset, rift.components;
14
+
15
+ @layer rift.components {
16
+
13
17
  /* Base */
14
18
 
15
19
  .ds-artifact-panel {
@@ -203,3 +207,5 @@
203
207
  .ds-artifact-panel--inline .ds-artifact-panel__frame {
204
208
  min-height: var(--ds-artifact-panel-stage-height, calc(6 * var(--control-height-default)));
205
209
  }
210
+
211
+ } /* @layer rift.components */
@@ -7,6 +7,10 @@
7
7
  One stylesheet, shared by every member.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  /* ============================================
11
15
  TYPE MARK — what kind of file this is
12
16
  Shared by the tile and the viewer. Every mark, and every glyph a tile
@@ -1134,3 +1138,5 @@ button.ds-attachment-group__single:focus-visible {
1134
1138
  align-items: center;
1135
1139
  gap: var(--gap-100);
1136
1140
  }
1141
+
1142
+ } /* @layer rift.components */
@@ -7,6 +7,7 @@ import { renderTypeMark } from "./typeMark.js";
7
7
  import { AttachmentViewer } from "./AttachmentViewer.js";
8
8
  import "./Attachment.css";
9
9
  import { useLocale } from "../../behaviors/LocaleProvider.js";
10
+ import { revokeAttachmentUrls, useAttachments } from "./useAttachments.js";
10
11
  const isPicture = (item) => item.status === "ready" && item.kind === "image" && Boolean(item.previewSrc);
11
12
  const AttachmentGroup = React.forwardRef(
12
13
  ({
@@ -192,5 +193,7 @@ const AttachmentGroup = React.forwardRef(
192
193
  );
193
194
  AttachmentGroup.displayName = "AttachmentGroup";
194
195
  export {
195
- AttachmentGroup
196
+ AttachmentGroup,
197
+ revokeAttachmentUrls,
198
+ useAttachments
196
199
  };
@@ -3,6 +3,10 @@
3
3
  User profile image with initials fallback
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-avatar {
7
11
  position: relative;
8
12
  display: inline-flex;
@@ -199,3 +203,5 @@
199
203
  .ds-avatar__status--busy {
200
204
  background-color: var(--color-status-error-border);
201
205
  }
206
+
207
+ } /* @layer rift.components */