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
@@ -3,6 +3,10 @@
3
3
  Range input for selecting values
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-slider {
7
11
  display: flex;
8
12
  align-items: center;
@@ -117,3 +121,5 @@
117
121
  opacity: 0.4;
118
122
  pointer-events: none;
119
123
  }
124
+
125
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  span otherwise.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  .ds-source-chip {
9
13
  /* Layout */
10
14
  display: inline-flex;
@@ -307,3 +311,5 @@ button.ds-source-chip {
307
311
  .ds-source-chip .material-symbols-rounded {
308
312
  color: inherit;
309
313
  }
314
+
315
+ } /* @layer rift.components */
@@ -9,6 +9,10 @@
9
9
  more row in the run, not a different species.
10
10
  ============================================ */
11
11
 
12
+ @layer rift.tokens, rift.preset, rift.components;
13
+
14
+ @layer rift.components {
15
+
12
16
  .ds-source-trail {
13
17
  display: flex;
14
18
  flex-direction: column;
@@ -224,3 +228,5 @@
224
228
  .ds-source-trail__header:has(.ds-source-trail__chevron) {
225
229
  padding-inline-end: calc(var(--ds-chat-card-inset) - var(--padding-100));
226
230
  }
231
+
232
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  visual preview, size label, and pixel value.
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-spacing-swatch {
8
12
  /* Layout */
9
13
  display: flex;
@@ -106,3 +110,5 @@
106
110
  line-height: var(--font-paragraph-line-height);
107
111
  color: var(--color-text-tertiary);
108
112
  }
113
+
114
+ } /* @layer rift.components */
@@ -6,6 +6,10 @@
6
6
  is one custom property swap.
7
7
  ============================================ */
8
8
 
9
+ @layer rift.tokens, rift.preset, rift.components;
10
+
11
+ @layer rift.components {
12
+
9
13
  /* Base */
10
14
 
11
15
  .ds-sparkline {
@@ -74,3 +78,5 @@
74
78
  .ds-sparkline--neutral {
75
79
  color: var(--color-text-secondary);
76
80
  }
81
+
82
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Animated circular loading indicator
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-spinner {
7
11
  display: inline-flex;
8
12
  align-items: center;
@@ -82,3 +86,5 @@
82
86
  transform: rotate(360deg);
83
87
  }
84
88
  }
89
+
90
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Primary action + attached menu of alternatives
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-split-button {
7
11
  display: inline-flex;
8
12
  align-items: stretch;
@@ -91,3 +95,5 @@
91
95
  .ds-split-button--secondary .ds-split-button__trigger {
92
96
  border-inline-start: none;
93
97
  }
98
+
99
+ } /* @layer rift.components */
@@ -7,6 +7,12 @@ type SplitButtonOwnProps = {
7
7
  label: string;
8
8
  /** Click handler for the primary action */
9
9
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
10
+ /**
11
+ * The primary segment's native type. Defaults to `button`; set `submit` to
12
+ * make the primary action its form's submit button. The menu trigger is
13
+ * always `button`, so opening the menu never submits.
14
+ */
15
+ type?: 'button' | 'submit' | 'reset';
10
16
  /** Menu entries for the alternative actions */
11
17
  items: DropdownMenuEntry[];
12
18
  /**
@@ -35,7 +41,7 @@ type SplitButtonOwnProps = {
35
41
  /** Additional CSS classes, applied to the wrapper around both segments, not the primary button */
36
42
  className?: string;
37
43
  };
38
- export interface SplitButtonProps extends SplitButtonOwnProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof SplitButtonOwnProps | 'type'> {
44
+ export interface SplitButtonProps extends SplitButtonOwnProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof SplitButtonOwnProps> {
39
45
  }
40
46
  /**
41
47
  * A primary action with an attached menu of alternatives — "Save" beside
@@ -9,6 +9,7 @@ const SplitButton = React.forwardRef(
9
9
  ({
10
10
  label,
11
11
  onClick,
12
+ type = "button",
12
13
  items,
13
14
  variant = "primary",
14
15
  tone,
@@ -44,7 +45,8 @@ const SplitButton = React.forwardRef(
44
45
  size,
45
46
  disabled,
46
47
  loading,
47
- onClick
48
+ onClick,
49
+ type
48
50
  }
49
51
  ),
50
52
  /* @__PURE__ */ jsx(
@@ -5,6 +5,10 @@
5
5
  set from JS; everything visual is tokens.
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-split-pane {
@@ -104,3 +108,5 @@
104
108
  .ds-split-pane--dragging .ds-split-pane__grip {
105
109
  background-color: var(--color-icon-secondary);
106
110
  }
111
+
112
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  --ds-stack-gap, set from the `gap` prop.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  /* Base */
9
13
  .ds-stack {
10
14
  display: flex;
@@ -66,3 +70,5 @@
66
70
  .ds-stack--justify-between {
67
71
  justify-content: space-between;
68
72
  }
73
+
74
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  a metrics band.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  .ds-stat {
9
13
  display: inline-flex;
10
14
  flex-direction: column;
@@ -90,13 +94,27 @@
90
94
  color: var(--color-text-tertiary);
91
95
  }
92
96
 
97
+ /* A caption placed under the label: the label's area holds both lines,
98
+ so every placement's grid keeps its areas. */
99
+ .ds-stat__label--captioned {
100
+ display: flex;
101
+ flex-direction: column;
102
+ align-items: flex-start;
103
+ }
104
+
105
+ .ds-stat__label--captioned .ds-stat__caption {
106
+ margin-inline-start: 0;
107
+ }
108
+
93
109
  /* ============================================
94
110
  DELTA — trend-coloured annotation
95
111
  ============================================ */
96
112
 
113
+ /* The arrow sits on the delta's first line, not the middle of its whole
114
+ height, so a delta that wraps keeps its arrow beside its opening words. */
97
115
  .ds-stat__delta {
98
116
  display: inline-flex;
99
- align-items: center;
117
+ align-items: flex-start;
100
118
  gap: var(--gap-050);
101
119
  font-family: var(--font-paragraph-sm-emphasis-family);
102
120
  font-size: var(--font-paragraph-sm-emphasis-size);
@@ -108,6 +126,10 @@
108
126
  .ds-stat__delta .material-symbols-rounded {
109
127
  --icon-size: var(--icon-size-500);
110
128
  line-height: 1;
129
+ flex-shrink: 0;
130
+ /* Centred on one line of the delta's text, whatever a theme makes of the
131
+ line height and the icon size. */
132
+ margin-block-start: calc((var(--font-paragraph-sm-emphasis-line-height) - var(--icon-size)) / 2);
111
133
  }
112
134
 
113
135
  /* The trend tokens are theme-split for contrast: the brightest ramp steps
@@ -241,3 +263,5 @@
241
263
  .ds-stat .material-symbols-rounded {
242
264
  color: inherit;
243
265
  }
266
+
267
+ } /* @layer rift.components */
@@ -23,6 +23,11 @@ type StatOwnProps = {
23
23
  icon?: string | React.ReactNode;
24
24
  /** A short note at the far end of the top row, in the caption face: the period the figure covers ("Last 30 days"), its source. */
25
25
  caption?: React.ReactNode;
26
+ /**
27
+ * Where the caption sits: `head`, at the far end of the top row beside the
28
+ * icon, or `label`, a second line under the label. Defaults to `head`.
29
+ */
30
+ captionPlacement?: 'head' | 'label';
26
31
  /** Shown after the value, label and delta, such as a Sparkline of the metric's recent history or an AvatarGroup of who it counts. */
27
32
  children?: React.ReactNode;
28
33
  /** The BCP 47 locale a number `value` is written in, such as `ar-EG`. Defaults to `en-US`. This component can render from a Server Component, so it takes the prop alone and reads no LocaleProvider. */
@@ -19,6 +19,7 @@ const Stat = React.forwardRef(
19
19
  size = "default",
20
20
  icon,
21
21
  caption,
22
+ captionPlacement = "head",
22
23
  children,
23
24
  locale = DEFAULT_LOCALE,
24
25
  className = "",
@@ -27,7 +28,9 @@ const Stat = React.forwardRef(
27
28
  const baseClass = "ds-stat";
28
29
  const hasIcon = icon != null && icon !== false && icon !== "";
29
30
  const hasCaption = caption != null && caption !== false && caption !== "";
30
- const hasHead = hasIcon || hasCaption;
31
+ const captionInHead = hasCaption && captionPlacement === "head";
32
+ const captionInLabel = hasCaption && captionPlacement === "label";
33
+ const hasHead = hasIcon || captionInHead;
31
34
  const classes = [
32
35
  baseClass,
33
36
  `${baseClass}--${size}`,
@@ -38,7 +41,10 @@ const Stat = React.forwardRef(
38
41
  ].filter(Boolean).join(" ");
39
42
  const parts = /* @__PURE__ */ jsxs(Fragment, { children: [
40
43
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__value`, children: typeof value === "number" ? formatNumber(value, locale) : value }),
41
- /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }),
44
+ captionInLabel ? /* @__PURE__ */ jsxs("span", { className: `${baseClass}__label ${baseClass}__label--captioned`, children: [
45
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__label-text`, children: label }),
46
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__caption`, children: caption })
47
+ ] }) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }),
42
48
  delta && /* @__PURE__ */ jsxs("span", { className: `${baseClass}__delta ${baseClass}__delta--${trend}`, children: [
43
49
  /* @__PURE__ */ jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: TREND_ICONS[trend] }),
44
50
  delta
@@ -47,7 +53,7 @@ const Stat = React.forwardRef(
47
53
  return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
48
54
  hasHead && /* @__PURE__ */ jsxs("span", { className: `${baseClass}__head`, children: [
49
55
  hasIcon && (typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, size: "500", tile: true, className: `${baseClass}__icon` }) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__icon`, "aria-hidden": "true", children: icon })),
50
- hasCaption && /* @__PURE__ */ jsx("span", { className: `${baseClass}__caption`, children: caption })
56
+ captionInHead && /* @__PURE__ */ jsx("span", { className: `${baseClass}__caption`, children: caption })
51
57
  ] }),
52
58
  deltaPlacement === "auto" ? /* @__PURE__ */ jsx("span", { className: `${baseClass}__body`, children: parts }) : parts,
53
59
  children != null && children !== false && /* @__PURE__ */ jsx("span", { className: `${baseClass}__extra`, children })
@@ -4,6 +4,10 @@
4
4
  label, hollow outline and live pulse
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  /* Base */
8
12
 
9
13
  .ds-status-dot {
@@ -126,3 +130,5 @@
126
130
  opacity: 0;
127
131
  }
128
132
  }
133
+
134
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  and multi-stage flows
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  /* Base */
8
12
 
9
13
  .ds-stepper {
@@ -214,3 +218,5 @@ button.ds-stepper__content:hover .ds-stepper__label {
214
218
  .ds-stepper .material-symbols-rounded {
215
219
  color: inherit;
216
220
  }
221
+
222
+ } /* @layer rift.components */
@@ -6,6 +6,10 @@
6
6
  text style of its own.
7
7
  ============================================ */
8
8
 
9
+ @layer rift.tokens, rift.preset, rift.components;
10
+
11
+ @layer rift.components {
12
+
9
13
  /* Base */
10
14
 
11
15
  .ds-streaming-text {
@@ -38,3 +42,5 @@
38
42
  opacity: 0.15;
39
43
  }
40
44
  }
45
+
46
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Clickable colour tile for palettes and pickers
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  /* Base */
7
11
 
8
12
  .ds-swatch {
@@ -50,3 +54,5 @@
50
54
  opacity: 0.4;
51
55
  cursor: not-allowed;
52
56
  }
57
+
58
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Data table with flexible cell content
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-table {
7
11
  width: 100%;
8
12
  border-collapse: separate;
@@ -59,10 +63,18 @@
59
63
  font-weight: var(--font-paragraph-emphasis-weight);
60
64
  }
61
65
 
62
- .ds-table__row--total {
66
+ /* The total's rule sits on its cells: with border-collapse: separate a
67
+ row's own border never paints (the bordered variant's dividers below are
68
+ on cells for the same reason). In the bordered table the row above drops
69
+ its hairline, so the heavier rule is the only line between them. */
70
+ .ds-table__row--total .ds-table__cell {
63
71
  border-top: var(--border-050) solid var(--color-table-divider);
64
72
  }
65
73
 
74
+ .ds-table--bordered .ds-table__row:has(+ .ds-table__row--total) .ds-table__cell {
75
+ border-bottom: none;
76
+ }
77
+
66
78
  /* ============================================
67
79
  HEADER CELL
68
80
  ============================================ */
@@ -273,3 +285,5 @@
273
285
  overflow-wrap: anywhere;
274
286
  word-break: break-word;
275
287
  }
288
+
289
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  A long AI command grows its own row.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  .ds-table-toolbar {
9
13
  position: relative;
10
14
  display: flex;
@@ -641,3 +645,5 @@
641
645
  opacity: 1;
642
646
  transition: opacity var(--motion-duration-fast) var(--motion-ease-standard) var(--motion-duration-base);
643
647
  }
648
+
649
+ } /* @layer rift.components */
@@ -111,7 +111,7 @@ function ToolbarPanel({
111
111
  {
112
112
  size,
113
113
  surface: "menu",
114
- ariaLabel,
114
+ "aria-label": ariaLabel,
115
115
  position,
116
116
  onOpenChange,
117
117
  content,
@@ -1437,7 +1437,7 @@ const TableToolbar = React.forwardRef(
1437
1437
  {
1438
1438
  surface: "menu",
1439
1439
  size,
1440
- ariaLabel: labels.filters(activeFilters),
1440
+ "aria-label": labels.filters(activeFilters),
1441
1441
  onOpenChange: dropIncomplete,
1442
1442
  content: panelContent,
1443
1443
  children: /* @__PURE__ */ jsx(
@@ -3,6 +3,10 @@
3
3
  Horizontal tab navigation with underline
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  /* A row that does not fit its container scrolls inline rather than running
7
11
  off the page: the tabs never wrap or shrink, the scrollbar is hidden (a
8
12
  swipe, a trackpad or the arrow keys, whose focus scrolls the tab into
@@ -179,3 +183,5 @@
179
183
  outline-offset: 2px;
180
184
  border-radius: var(--radius-200);
181
185
  }
186
+
187
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  held as removable tags inside the field
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-taginput {
8
12
  display: flex;
9
13
  flex-direction: column;
@@ -167,3 +171,5 @@
167
171
  .ds-taginput .material-symbols-rounded {
168
172
  color: inherit;
169
173
  }
174
+
175
+ } /* @layer rift.components */
@@ -8,6 +8,10 @@
8
8
  the small tiers borrow from paragraph-sm.
9
9
  ============================================ */
10
10
 
11
+ @layer rift.tokens, rift.preset, rift.components;
12
+
13
+ @layer rift.components {
14
+
11
15
  /* Base */
12
16
  .ds-text {
13
17
  margin: 0;
@@ -127,3 +131,5 @@
127
131
  .ds-text--align-end {
128
132
  text-align: end;
129
133
  }
134
+
135
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Multi-line text input with label and counter
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-textarea {
7
11
  display: flex;
8
12
  flex-direction: column;
@@ -107,3 +111,4 @@
107
111
  letter-spacing: var(--font-paragraph-sm-letter-spacing);
108
112
  }
109
113
 
114
+ } /* @layer rift.components */
@@ -7,6 +7,10 @@
7
7
  so the three read as one family in a row.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  .ds-theme-picker {
11
15
  position: relative;
12
16
  display: inline-flex;
@@ -193,3 +197,5 @@
193
197
  .ds-theme-picker--open .ds-theme-picker__trigger-tip .ds-tooltip__panel {
194
198
  display: none;
195
199
  }
200
+
201
+ } /* @layer rift.components */
@@ -7,6 +7,10 @@
7
7
  tooltips included, is SegmentedControl's.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  .ds-theme-toggle {
11
15
  flex-shrink: 0;
12
16
  }
@@ -14,3 +18,5 @@
14
18
  /* The cycle form is SegmentedControl's (`ds-segmented-control--cycle`),
15
19
  which draws the circle; `ds-theme-toggle--cycle` stays as a consumer
16
20
  hook and styles nothing here. */
21
+
22
+ } /* @layer rift.components */
@@ -15,7 +15,7 @@ type ThemeToggleOwnProps = {
15
15
  onValueChange?: (value: ColorModeSetting) => void;
16
16
  /** Control size, on SegmentedControl's scale: `default` (the default), the height of the CommandPaletteTrigger and AiButton beside it in a top bar, or `compact`. */
17
17
  size?: 'default' | 'compact';
18
- /** Show each segment's label beside its icon. Set `false` for an icon-only strip: each label becomes the segment's tooltip on hover and keyboard focus, and stays its accessible name. */
18
+ /** Show each segment's label beside its icon. Set `false` for an icon-only strip: each label becomes the segment's tooltip on hover and keyboard focus, and stays its accessible name. The labelled strip is wider than an expanded AppSidebar, so its `footerSlot` takes the icon-only strip. */
19
19
  showLabels?: boolean;
20
20
  /**
21
21
  * Draw one circle that shows the current setting and steps to the next on
@@ -13,6 +13,10 @@
13
13
  row is a perfect circle around its icon (12 + 8 + 24 + 8 + 12 = 64).
14
14
  ============================================ */
15
15
 
16
+ @layer rift.tokens, rift.preset, rift.components;
17
+
18
+ @layer rift.components {
19
+
16
20
  .ds-thread-panel {
17
21
  /* Width and padding combine on the root and the rows, so the component
18
22
  declares its own sizing model rather than leaning on a host reset —
@@ -995,3 +999,5 @@
995
999
  .ds-thread-panel__thread:has(.ds-thread-panel__thread-icon) {
996
1000
  padding-inline-start: var(--padding-200);
997
1001
  }
1002
+
1003
+ } /* @layer rift.components */
@@ -13,6 +13,10 @@
13
13
  (the base beat), since a dismissal should feel lighter than an arrival.
14
14
  ============================================ */
15
15
 
16
+ @layer rift.tokens, rift.preset, rift.components;
17
+
18
+ @layer rift.components {
19
+
16
20
  .ds-thread-tabs {
17
21
  display: flex;
18
22
  align-items: center;
@@ -260,3 +264,5 @@
260
264
  .ds-thread-tabs__trigger:has(.ds-thread-tabs__status, .ds-thread-tabs__icon) {
261
265
  padding-inline-start: var(--padding-200);
262
266
  }
267
+
268
+ } /* @layer rift.components */
@@ -36,7 +36,11 @@ type ThreadTabsOwnProps = {
36
36
  onAdd?: () => void;
37
37
  /** Accessible name for the new-tab button. */
38
38
  addLabel?: string;
39
- /** Accessible name for the tab strip. */
39
+ /**
40
+ * Legacy accessible-name prop for the tab strip. Defaults to "Open threads"; a native `aria-label` wins when both are passed, and names the strip rather than the wrapper.
41
+ *
42
+ * @deprecated Pass the native `aria-label` attribute instead.
43
+ */
40
44
  ariaLabel?: string;
41
45
  /** Additional CSS classes */
42
46
  className?: string;
@@ -30,6 +30,7 @@ const ThreadTabs = React.forwardRef(
30
30
  onAdd,
31
31
  addLabel = "New thread",
32
32
  ariaLabel = "Open threads",
33
+ "aria-label": nativeAriaLabel,
33
34
  className = "",
34
35
  ...rest
35
36
  }, ref) => {
@@ -106,7 +107,7 @@ const ThreadTabs = React.forwardRef(
106
107
  };
107
108
  const classes = [baseClass, className].filter(Boolean).join(" ");
108
109
  return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
109
- /* @__PURE__ */ jsx("ul", { className: `${baseClass}__list`, "aria-label": ariaLabel, ref: listRef, children: entries.map(({ tab, leaving: isLeaving }) => {
110
+ /* @__PURE__ */ jsx("ul", { className: `${baseClass}__list`, "aria-label": nativeAriaLabel ?? ariaLabel, ref: listRef, children: entries.map(({ tab, leaving: isLeaving }) => {
110
111
  const active = !isLeaving && tab.id === activeId;
111
112
  const status = tab.status ?? (tab.unread ? "unread" : "idle");
112
113
  const entering = !isLeaving && !enteredRef.current.has(tab.id);
@@ -6,6 +6,10 @@
6
6
  input.
7
7
  ============================================ */
8
8
 
9
+ @layer rift.tokens, rift.preset, rift.components;
10
+
11
+ @layer rift.components {
12
+
9
13
  /* ============================================
10
14
  BASE
11
15
  ============================================ */
@@ -234,3 +238,5 @@
234
238
  .ds-timepicker--compact .ds-timepicker__trigger {
235
239
  padding-inline: var(--padding-200);
236
240
  }
241
+
242
+ } /* @layer rift.components */