rift-ds 1.35.0 → 1.37.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 (265) hide show
  1. package/README.md +2 -1
  2. package/behaviors/chat-card.css +6 -0
  3. package/behaviors/direction.css +6 -0
  4. package/behaviors/matchParts.d.ts +9 -0
  5. package/behaviors/matchParts.js +10 -0
  6. package/behaviors/shell.css +6 -0
  7. package/behaviors/shortcuts.js +2 -2
  8. package/behaviors/useLayer.d.ts +2 -2
  9. package/behaviors/visually-hidden.css +6 -0
  10. package/bin/templates/blocks/app/landing/page.module.css +50 -0
  11. package/bin/templates/blocks/app/landing/page.tsx +157 -0
  12. package/bin/templates/blocks/app/pricing/page.module.css +15 -0
  13. package/bin/templates/blocks/app/pricing/page.tsx +173 -0
  14. package/bin/templates/blocks/app/settings/ProfileForm.tsx +1 -1
  15. package/bin/templates/blocks/app/sign-in/page.tsx +3 -3
  16. package/bin/templates/blocks/components/blocks/MarketingShell.module.css +66 -0
  17. package/bin/templates/blocks/components/blocks/MarketingShell.tsx +141 -0
  18. package/bin/templates/blocks/components/blocks/emberScene.ts +1 -1
  19. package/bin/templates/blocks/registry.json +24 -0
  20. package/chat/AssistantTurn.js +5 -20
  21. package/chat/ChatAgentPane.css +6 -0
  22. package/chat/ChatWidget.css +6 -0
  23. package/chat/demo.css +6 -0
  24. package/chat/queries.js +1 -1
  25. package/chat/selection.css +6 -0
  26. package/components/Accordion/Accordion.css +6 -0
  27. package/components/ActionBar/ActionBar.css +6 -0
  28. package/components/ActionCard/ActionCard.css +6 -0
  29. package/components/ActionReadout/ActionReadout.css +6 -0
  30. package/components/AgentPlan/AgentPlan.css +6 -0
  31. package/components/AgentRail/AgentRail.css +6 -0
  32. package/components/AgentStatus/AgentStatus.css +12 -7
  33. package/components/AiButton/AiButton.css +17 -11
  34. package/components/Alert/Alert.css +6 -0
  35. package/components/AlertDialog/AlertDialog.css +6 -0
  36. package/components/AnchorNav/AnchorNav.css +6 -0
  37. package/components/AnimatedNumber/AnimatedNumber.css +5 -0
  38. package/components/AppLayout/AppLayout.css +6 -0
  39. package/components/AppSidebar/AppSidebar.css +19 -1
  40. package/components/AppSidebar/AppSidebar.d.ts +1 -1
  41. package/components/AppSidebar/AppSidebar.js +10 -4
  42. package/components/ArtifactCard/ArtifactCard.css +6 -0
  43. package/components/ArtifactPanel/ArtifactPanel.css +6 -0
  44. package/components/Attachment/Attachment.css +6 -0
  45. package/components/Attachment/AttachmentGroup.js +4 -1
  46. package/components/Avatar/Avatar.css +6 -0
  47. package/components/AvatarGroup/AvatarGroup.css +6 -0
  48. package/components/BackToTop/BackToTop.css +6 -0
  49. package/components/Badge/Badge.css +6 -0
  50. package/components/Banner/Banner.css +6 -0
  51. package/components/BentoTile/BentoTile.css +6 -0
  52. package/components/BottomNav/BottomNav.css +6 -0
  53. package/components/Breadcrumb/Breadcrumb.css +6 -0
  54. package/components/Button/Button.css +6 -0
  55. package/components/Button/Button.d.ts +7 -1
  56. package/components/Button/Button.js +2 -1
  57. package/components/ButtonGroup/ButtonGroup.css +6 -0
  58. package/components/Card/Card.css +6 -0
  59. package/components/CardStack/CardStack.css +5 -0
  60. package/components/Carousel/Carousel.css +6 -0
  61. package/components/Chart/ActiveReporter.d.ts +32 -0
  62. package/components/Chart/ActiveReporter.js +31 -0
  63. package/components/Chart/AreaChart.d.ts +7 -1
  64. package/components/Chart/AreaChart.js +8 -3
  65. package/components/Chart/BarChart.d.ts +12 -0
  66. package/components/Chart/BarChart.js +8 -3
  67. package/components/Chart/Chart.css +9 -1
  68. package/components/Chart/ComboChart.d.ts +7 -1
  69. package/components/Chart/ComboChart.js +8 -3
  70. package/components/Chart/LineChart.d.ts +7 -1
  71. package/components/Chart/LineChart.js +8 -3
  72. package/components/Chart/StackedBarChart.d.ts +7 -1
  73. package/components/Chart/StackedBarChart.js +8 -3
  74. package/components/ChatHeader/ChatHeader.css +6 -0
  75. package/components/ChatMarker/ChatMarker.css +6 -0
  76. package/components/ChatMessage/ChatMessage.css +6 -0
  77. package/components/ChatThread/ChatThread.css +6 -0
  78. package/components/Checkbox/Checkbox.css +6 -0
  79. package/components/Checkbox/Checkbox.js +1 -1
  80. package/components/Checklist/Checklist.css +6 -0
  81. package/components/Chip/Chip.css +6 -0
  82. package/components/CodeBlock/CodeBlock.css +6 -0
  83. package/components/CodeDiff/CodeDiff.css +5 -0
  84. package/components/ColorPicker/ColorPicker.css +6 -0
  85. package/components/ColourSwatch/ColourSwatch.css +6 -0
  86. package/components/Combobox/Combobox.css +32 -0
  87. package/components/Combobox/Combobox.d.ts +10 -0
  88. package/components/Combobox/Combobox.js +10 -0
  89. package/components/CommandPalette/CommandPalette.css +32 -0
  90. package/components/CommandPalette/CommandPalette.d.ts +2 -1
  91. package/components/CommandPalette/CommandPalette.js +21 -4
  92. package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +6 -0
  93. package/components/Composer/Composer.css +6 -0
  94. package/components/ContactCard/ContactCard.css +6 -0
  95. package/components/ContextMenu/ContextMenu.css +6 -0
  96. package/components/ContributionGraph/ContributionGraph.css +6 -0
  97. package/components/CurrencyInput/CurrencyInput.css +6 -0
  98. package/components/DataTable/DataTable.css +6 -0
  99. package/components/DataTable/DataTable.js +6 -2
  100. package/components/DateInput/DateInput.css +6 -0
  101. package/components/DatePicker/DatePicker.css +6 -0
  102. package/components/DateRangePicker/DateRangePicker.css +6 -0
  103. package/components/Deadline/Deadline.css +6 -0
  104. package/components/DecisionRow/DecisionRow.css +6 -0
  105. package/components/DescriptionList/DescriptionList.css +6 -0
  106. package/components/Dialog/Dialog.css +6 -0
  107. package/components/Divider/Divider.css +6 -0
  108. package/components/DocumentChip/DocumentChip.css +6 -0
  109. package/components/DocumentViewer/DocumentViewer.css +6 -0
  110. package/components/Drawer/Drawer.css +55 -7
  111. package/components/Drawer/Drawer.d.ts +17 -1
  112. package/components/Drawer/Drawer.js +27 -5
  113. package/components/Dropdown/ChosenMark.css +6 -0
  114. package/components/Dropdown/Dropdown.css +46 -0
  115. package/components/Dropdown/Dropdown.d.ts +7 -0
  116. package/components/Dropdown/Dropdown.js +23 -38
  117. package/components/DropdownMenu/DropdownMenu.css +6 -0
  118. package/components/EmptyState/EmptyState.css +6 -0
  119. package/components/EntityCard/EntityCard.css +6 -0
  120. package/components/EntitySwitcher/EntitySwitcher.css +6 -0
  121. package/components/ErrorSummary/ErrorSummary.css +6 -0
  122. package/components/ErrorSummary/ErrorSummary.js +3 -1
  123. package/components/EventCalendar/EventCalendar.css +6 -0
  124. package/components/Field/Field.css +6 -0
  125. package/components/Figure/Figure.css +6 -0
  126. package/components/FileInput/FileInput.css +6 -0
  127. package/components/FilterBar/FilterBar.css +9 -1
  128. package/components/FormSection/FormSection.css +6 -0
  129. package/components/FunnelChart/FunnelChart.css +6 -0
  130. package/components/GanttChart/GanttChart.css +6 -0
  131. package/components/Gauge/Gauge.css +6 -0
  132. package/components/Globe/Globe.css +6 -0
  133. package/components/Grid/Grid.css +6 -0
  134. package/components/Heading/Heading.css +6 -0
  135. package/components/HoverCard/HoverCard.css +6 -0
  136. package/components/Icon/Icon.css +6 -0
  137. package/components/IconButton/IconButton.css +6 -0
  138. package/components/IconButton/IconButton.d.ts +7 -1
  139. package/components/IconButton/IconButton.js +2 -1
  140. package/components/ImageCompare/ImageCompare.css +6 -0
  141. package/components/Input/Input.css +22 -4
  142. package/components/Inspector/Inspector.css +6 -0
  143. package/components/Instructions/Instructions.css +27 -0
  144. package/components/Instructions/Instructions.d.ts +5 -2
  145. package/components/Instructions/Instructions.js +1 -1
  146. package/components/InterruptCard/InterruptCard.css +6 -0
  147. package/components/Kbd/Kbd.css +6 -0
  148. package/components/LegendTile/LegendTile.css +6 -0
  149. package/components/Lightbox/Lightbox.css +6 -0
  150. package/components/Link/Link.css +9 -1
  151. package/components/LinkList/LinkList.css +6 -0
  152. package/components/List/List.css +6 -0
  153. package/components/MapCallout/MapCallout.css +6 -0
  154. package/components/MapLegend/MapLegend.css +6 -0
  155. package/components/MaskedInput/MaskedInput.css +6 -0
  156. package/components/MegaMenu/MegaMenu.css +6 -0
  157. package/components/Mention/Mention.css +6 -0
  158. package/components/Mention/Mention.js +7 -7
  159. package/components/Menubar/Menubar.css +6 -0
  160. package/components/MessageActions/MessageActions.css +6 -0
  161. package/components/MessageCard/MessageCard.css +6 -0
  162. package/components/Meter/Meter.css +6 -0
  163. package/components/ModelPicker/ModelPicker.css +6 -0
  164. package/components/MotionSwatch/MotionSwatch.css +6 -0
  165. package/components/Nav/Nav.css +6 -0
  166. package/components/NavList/NavList.css +6 -0
  167. package/components/NavList/NavList.d.ts +2 -0
  168. package/components/NavList/NavList.js +1 -0
  169. package/components/NotificationCenter/NotificationCenter.css +6 -0
  170. package/components/NumberInput/NumberInput.css +6 -0
  171. package/components/OrgChart/OrgChart.css +6 -0
  172. package/components/PageHeader/PageHeader.css +6 -0
  173. package/components/Pagination/Pagination.css +6 -0
  174. package/components/Panel/Panel.css +6 -0
  175. package/components/PinInput/PinInput.css +6 -0
  176. package/components/PixelAvatar/PixelAvatar.css +6 -0
  177. package/components/Popover/Popover.css +6 -0
  178. package/components/ProgressBar/ProgressBar.css +6 -0
  179. package/components/ProgressiveBlur/ProgressiveBlur.css +6 -0
  180. package/components/PromptSuggestions/PromptSuggestions.css +5 -0
  181. package/components/Prose/Prose.css +6 -0
  182. package/components/QuestionCard/QuestionCard.css +5 -0
  183. package/components/Quote/Quote.css +6 -0
  184. package/components/RadioButton/RadioButton.css +6 -0
  185. package/components/Rating/Rating.css +6 -0
  186. package/components/Reasoning/Reasoning.css +6 -0
  187. package/components/ResourceTimeline/ResourceTimeline.css +6 -0
  188. package/components/RichDropdown/RichDropdown.css +6 -0
  189. package/components/SectionTitle/SectionTitle.css +6 -0
  190. package/components/SegmentedControl/SegmentedControl.css +6 -0
  191. package/components/SelectionCard/SelectionCard.css +6 -0
  192. package/components/ShaderField/ShaderField.css +6 -0
  193. package/components/ShaderField/ShaderField.js +2 -0
  194. package/components/ShaderScene/ShaderScene.css +6 -0
  195. package/components/ShaderScene/ShaderScene.d.ts +3 -2
  196. package/components/ShaderScene/assemble.js +13 -5
  197. package/components/ShaderScene/renderer.d.ts +2 -2
  198. package/components/ShaderScene/types.d.ts +2 -1
  199. package/components/SidebarPanel/SidebarPanel.css +6 -0
  200. package/components/SignaturePad/SignaturePad.css +6 -0
  201. package/components/SiteFooter/SiteFooter.css +6 -0
  202. package/components/SiteHeader/SiteHeader.css +6 -0
  203. package/components/SiteLayout/SiteLayout.css +6 -0
  204. package/components/Skeleton/Skeleton.css +6 -0
  205. package/components/Slider/Slider.css +6 -0
  206. package/components/SourceChip/SourceChip.css +6 -0
  207. package/components/SourceTrail/SourceTrail.css +6 -0
  208. package/components/SpacingSwatch/SpacingSwatch.css +6 -0
  209. package/components/Sparkline/Sparkline.css +6 -0
  210. package/components/Spinner/Spinner.css +6 -0
  211. package/components/SplitButton/SplitButton.css +6 -0
  212. package/components/SplitButton/SplitButton.d.ts +7 -1
  213. package/components/SplitButton/SplitButton.js +3 -1
  214. package/components/SplitPane/SplitPane.css +6 -0
  215. package/components/Stack/Stack.css +6 -0
  216. package/components/Stat/Stat.css +13 -1
  217. package/components/StatusDot/StatusDot.css +6 -0
  218. package/components/Stepper/Stepper.css +6 -0
  219. package/components/StreamingText/StreamingText.css +6 -0
  220. package/components/Swatch/Swatch.css +6 -0
  221. package/components/Table/Table.css +15 -1
  222. package/components/TableToolbar/TableToolbar.css +6 -0
  223. package/components/Tabs/Tabs.css +6 -0
  224. package/components/TagInput/TagInput.css +6 -0
  225. package/components/Text/Text.css +6 -0
  226. package/components/Textarea/Textarea.css +5 -0
  227. package/components/ThemePicker/ThemePicker.css +6 -0
  228. package/components/ThemeToggle/ThemeToggle.css +6 -0
  229. package/components/ThreadPanel/ThreadPanel.css +6 -0
  230. package/components/ThreadTabs/ThreadTabs.css +6 -0
  231. package/components/TimePicker/TimePicker.css +6 -0
  232. package/components/Timeline/Timeline.css +18 -18
  233. package/components/Toast/Toast.css +6 -0
  234. package/components/Toast/Toast.js +1 -1
  235. package/components/ToggleGroup/ToggleGroup.css +6 -0
  236. package/components/ToggleSwitch/ToggleSwitch.css +21 -3
  237. package/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
  238. package/components/ToggleSwitch/ToggleSwitch.js +2 -2
  239. package/components/ToolCall/ToolCall.css +6 -0
  240. package/components/Toolbar/Toolbar.css +6 -0
  241. package/components/Tooltip/Tooltip.css +6 -0
  242. package/components/TopAppBar/TopAppBar.css +6 -0
  243. package/components/TreeView/TreeView.css +6 -0
  244. package/components/TypographySwatch/TypographySwatch.css +6 -0
  245. package/components/UsageCard/UsageCard.css +6 -0
  246. package/components/Waveform/Waveform.css +6 -0
  247. package/components/Widget/Widget.css +6 -0
  248. package/components/Wizard/Wizard.css +6 -0
  249. package/components/WorldMap/WorldMap.css +6 -0
  250. package/components/registry.json +3 -3
  251. package/components/registry.json.d.ts +3 -3
  252. package/components/registry.json.js +1 -1
  253. package/fonts/material-symbols.css +10 -0
  254. package/markdown/index.d.ts +8 -0
  255. package/markdown/index.js +10 -0
  256. package/markdown/mappers.d.ts +31 -0
  257. package/markdown/mappers.js +43 -0
  258. package/package.json +7 -2
  259. package/tokens/base.css +11 -2
  260. package/tokens/presets/contrast.css +8 -0
  261. package/tokens/presets/forest.css +8 -0
  262. package/tokens/presets/plum.css +18 -5
  263. package/tokens/presets/warm.css +10 -5
  264. package/tokens/presets/zest.css +22 -5
  265. package/tokens/values.json.js +1 -1
@@ -1,7 +1,8 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import React, { useCallback, useId } from "react";
4
4
  import { ResponsiveContainer, LineChart as LineChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Line } from "recharts";
5
+ import { ActiveReporter } from "./ActiveReporter.js";
5
6
  import { readTokenPx, getChartSeriesColors } from "./palette.js";
6
7
  import { useChartAnimation } from "./useChartAnimation.js";
7
8
  import "./Chart.css";
@@ -31,6 +32,7 @@ const LineChart = React.forwardRef(({
31
32
  height = 350,
32
33
  bare = false,
33
34
  className = "",
35
+ onActiveChange,
34
36
  yAxisFormatter,
35
37
  locale: localeProp,
36
38
  ...rest
@@ -51,8 +53,11 @@ const LineChart = React.forwardRef(({
51
53
  const seriesColors = getChartSeriesColors();
52
54
  const renderTooltip = useCallback(
53
55
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
54
- (props) => /* @__PURE__ */ jsx(LineChartTooltip, { ...props, locale }),
55
- [locale]
56
+ (props) => /* @__PURE__ */ jsxs(Fragment, { children: [
57
+ onActiveChange && /* @__PURE__ */ jsx(ActiveReporter, { ...props, data, xKey, onActiveChange }),
58
+ /* @__PURE__ */ jsx(LineChartTooltip, { ...props, locale })
59
+ ] }),
60
+ [locale, data, xKey, onActiveChange]
56
61
  );
57
62
  return /* @__PURE__ */ jsxs(
58
63
  "div",
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ChartSummaryItem } from './BarChart';
2
+ import { ChartActiveHandler, ChartSummaryItem } from './BarChart';
3
3
  export interface BarSeriesConfig {
4
4
  /** Key in data for this series */
5
5
  dataKey: string;
@@ -33,6 +33,12 @@ type StackedBarChartOwnProps = {
33
33
  yAxisFormatter?: (value: number) => string;
34
34
  /** Strip the card chrome (border, padding, fill) when the chart sits inside another panel that supplies the surface */
35
35
  bare?: boolean;
36
+ /**
37
+ * Called when the active point changes: with the row of `data` under the
38
+ * pointer or the keyboard cursor and its index, and with `null, null` once
39
+ * neither is on the plot. For a headline figure that follows the cursor.
40
+ */
41
+ onActiveChange?: ChartActiveHandler;
36
42
  /** Additional CSS classes on the wrapper */
37
43
  className?: string;
38
44
  };
@@ -1,7 +1,8 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import React, { useCallback, useId } from "react";
4
4
  import { ResponsiveContainer, BarChart, CartesianGrid, XAxis, YAxis, Tooltip, Bar } from "recharts";
5
+ import { ActiveReporter } from "./ActiveReporter.js";
5
6
  import { readTokenPx, getChartSeriesColors } from "./palette.js";
6
7
  import { useChartAnimation } from "./useChartAnimation.js";
7
8
  import "./Chart.css";
@@ -32,6 +33,7 @@ const StackedBarChart = React.forwardRef(({
32
33
  yAxisFormatter,
33
34
  bare = false,
34
35
  className = "",
36
+ onActiveChange,
35
37
  locale: localeProp,
36
38
  ...rest
37
39
  }, ref) => {
@@ -52,8 +54,11 @@ const StackedBarChart = React.forwardRef(({
52
54
  const defaultColors = getChartSeriesColors();
53
55
  const renderTooltip = useCallback(
54
56
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
55
- (props) => /* @__PURE__ */ jsx(StackedTooltip, { ...props, locale }),
56
- [locale]
57
+ (props) => /* @__PURE__ */ jsxs(Fragment, { children: [
58
+ onActiveChange && /* @__PURE__ */ jsx(ActiveReporter, { ...props, data, xKey, onActiveChange }),
59
+ /* @__PURE__ */ jsx(StackedTooltip, { ...props, locale })
60
+ ] }),
61
+ [locale, data, xKey, onActiveChange]
57
62
  );
58
63
  return /* @__PURE__ */ jsxs(
59
64
  "div",
@@ -5,6 +5,10 @@
5
5
  it floats free of the transcript.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  /* Base */
9
13
  .ds-chat-header {
10
14
  display: flex;
@@ -33,3 +37,5 @@
33
37
  gap: var(--gap-100);
34
38
  flex-shrink: 0;
35
39
  }
40
+
41
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Inline conversation separator for dates and system notes
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-chat-marker {
7
11
  display: flex;
8
12
  align-items: center;
@@ -59,3 +63,5 @@
59
63
  .ds-chat-marker .material-symbols-rounded {
60
64
  color: inherit;
61
65
  }
66
+
67
+ } /* @layer rift.components */
@@ -9,6 +9,10 @@
9
9
  means repointing those four and nothing else.
10
10
  ============================================ */
11
11
 
12
+ @layer rift.tokens, rift.preset, rift.components;
13
+
14
+ @layer rift.components {
15
+
12
16
  .ds-chat-message {
13
17
  /* Gutter width matches the Avatar sm footprint, so a run of turns keeps
14
18
  its left edge whether or not each row shows its avatar. Consumers can
@@ -337,3 +341,5 @@
337
341
  opacity: 0.55;
338
342
  }
339
343
  }
344
+
345
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  send-to-top anchoring, subtle scrollbar.
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  /* Base — the root is the scroll container. Inline gutters live on
8
12
  __content, so the scrollbar rides the component's far edge. */
9
13
  .ds-chat-thread {
@@ -193,3 +197,5 @@
193
197
  justify-content: flex-end;
194
198
  width: 100%;
195
199
  }
200
+
201
+ } /* @layer rift.components */
@@ -11,6 +11,10 @@
11
11
  lights it on hover.
12
12
  ============================================ */
13
13
 
14
+ @layer rift.tokens, rift.preset, rift.components;
15
+
16
+ @layer rift.components {
17
+
14
18
  .ds-checkbox {
15
19
  display: inline-flex;
16
20
  align-items: center;
@@ -195,3 +199,5 @@
195
199
  flex-wrap: wrap;
196
200
  gap: var(--gap-200) var(--gap-500); /* 8px rows, 20px between options */
197
201
  }
202
+
203
+ } /* @layer rift.components */
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import React, { useState, useId } from "react";
4
4
  import { Field } from "../Field/Field.js";
5
5
  import "./Checkbox.css";
@@ -7,6 +7,10 @@
7
7
  a WidgetRow list, on --color-divider.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  /* Base */
11
15
  .ds-checklist {
12
16
  display: flex;
@@ -121,3 +125,5 @@
121
125
  .ds-checklist__description {
122
126
  color: var(--color-text-tertiary);
123
127
  }
128
+
129
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  clickable, selectable, and removable variants.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  .ds-chip {
9
13
  /* Layout */
10
14
  display: inline-flex;
@@ -286,3 +290,5 @@
286
290
  .ds-chip .material-symbols-rounded {
287
291
  color: inherit;
288
292
  }
293
+
294
+ } /* @layer rift.components */
@@ -6,6 +6,10 @@
6
6
  code is the one sanctioned monospace context.
7
7
  ============================================ */
8
8
 
9
+ @layer rift.tokens, rift.preset, rift.components;
10
+
11
+ @layer rift.components {
12
+
9
13
  .ds-code-block {
10
14
  display: flex;
11
15
  flex-direction: column;
@@ -228,3 +232,5 @@
228
232
  .ds-code-block .material-symbols-rounded {
229
233
  color: inherit;
230
234
  }
235
+
236
+ } /* @layer rift.components */
@@ -6,6 +6,10 @@
6
6
  code is the one sanctioned monospace context.
7
7
  ============================================ */
8
8
 
9
+ @layer rift.tokens, rift.preset, rift.components;
10
+
11
+ @layer rift.components {
12
+
9
13
  .ds-codediff {
10
14
  display: flex;
11
15
  flex-direction: column;
@@ -172,3 +176,4 @@
172
176
  itself is decorative (aria-hidden).
173
177
  ============================================ */
174
178
 
179
+ } /* @layer rift.components */
@@ -14,6 +14,10 @@
14
14
  tokens.
15
15
  ============================================ */
16
16
 
17
+ @layer rift.tokens, rift.preset, rift.components;
18
+
19
+ @layer rift.components {
20
+
17
21
  /* Base */
18
22
 
19
23
  .ds-colorpicker {
@@ -276,3 +280,5 @@
276
280
  .ds-colorpicker--error .ds-colorpicker__trigger {
277
281
  border-color: var(--color-status-error-border);
278
282
  }
283
+
284
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  Primitive, Hex, and RGB values in a box.
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-colour-swatch {
8
12
  /* Layout */
9
13
  display: flex;
@@ -89,3 +93,5 @@
89
93
  .ds-colour-swatch__data {
90
94
  word-break: break-word;
91
95
  }
96
+
97
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  multi-select chips and async loading state
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-combobox {
8
12
  display: flex;
9
13
  flex-direction: column;
@@ -253,6 +257,32 @@
253
257
  flex-direction: column;
254
258
  gap: var(--gap-050);
255
259
  min-width: 0;
260
+ flex: 1;
261
+ }
262
+
263
+ /* The rich row, shared with Dropdown's: a leading mark, and a secondary
264
+ value at the row's end before the chosen mark. The icon side takes the
265
+ padding step below the text side (Button's rule, design.md). */
266
+ .ds-combobox__option-icon {
267
+ --icon-size: var(--icon-size-500);
268
+ color: var(--color-icon-primary);
269
+ flex-shrink: 0;
270
+ }
271
+
272
+ .ds-combobox__option:has(.ds-combobox__option-icon) {
273
+ padding-inline-start: var(--padding-200);
274
+ }
275
+
276
+ .ds-combobox__option-trailing {
277
+ flex-shrink: 0;
278
+ margin-inline-start: var(--gap-200);
279
+ font-family: var(--font-paragraph-sm-family);
280
+ font-size: var(--font-paragraph-sm-size);
281
+ font-weight: var(--font-paragraph-sm-weight);
282
+ line-height: var(--font-paragraph-sm-line-height);
283
+ letter-spacing: var(--font-paragraph-sm-letter-spacing);
284
+ font-variant-numeric: tabular-nums;
285
+ color: var(--color-text-secondary);
256
286
  }
257
287
 
258
288
  .ds-combobox__option-label {
@@ -403,3 +433,5 @@
403
433
  .ds-combobox--compact .ds-combobox__control {
404
434
  padding-inline: var(--padding-200);
405
435
  }
436
+
437
+ } /* @layer rift.components */
@@ -6,6 +6,16 @@ export interface ComboboxOption {
6
6
  value: string;
7
7
  /** Optional secondary line shown under the label */
8
8
  description?: string;
9
+ /**
10
+ * Mark drawn before the label in the option row: a Material Symbol name
11
+ * (string) or a custom element (ReactNode) such as an Avatar or a logo.
12
+ */
13
+ icon?: string | React.ReactNode;
14
+ /**
15
+ * Content at the end of the option row, before the chosen mark: a balance,
16
+ * a count, a Badge. Shown in the row only, never in the field.
17
+ */
18
+ trailing?: React.ReactNode;
9
19
  /** Whether this option is disabled */
10
20
  disabled?: boolean;
11
21
  }
@@ -7,6 +7,7 @@ import { useAnchoredPosition } from "../../behaviors/useAnchoredPosition.js";
7
7
  import { Field } from "../Field/Field.js";
8
8
  import "./Combobox.css";
9
9
  import "../../fonts/material-symbols.css";
10
+ import { mirrorClass } from "../../behaviors/direction.js";
10
11
  const Combobox = React.forwardRef(({
11
12
  label,
12
13
  placeholder = "Search…",
@@ -243,10 +244,19 @@ const Combobox = React.forwardRef(({
243
244
  onMouseDown: (e) => e.preventDefault(),
244
245
  onClick: () => handleSelect(option),
245
246
  children: [
247
+ option.icon && (typeof option.icon === "string" ? /* @__PURE__ */ jsx(
248
+ "span",
249
+ {
250
+ className: `${baseClass}__option-icon material-symbols-rounded ${mirrorClass(option.icon)}`,
251
+ "aria-hidden": "true",
252
+ children: option.icon
253
+ }
254
+ ) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-icon`, "aria-hidden": "true", children: option.icon })),
246
255
  /* @__PURE__ */ jsxs("span", { className: `${baseClass}__option-text`, children: [
247
256
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-label`, children: option.label }),
248
257
  option.description && /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-description`, children: option.description })
249
258
  ] }),
259
+ option.trailing != null && option.trailing !== false && /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-trailing`, children: option.trailing }),
250
260
  isSelected && /* @__PURE__ */ jsx(ChosenMark, {})
251
261
  ]
252
262
  },
@@ -3,6 +3,10 @@
3
3
  Modal Cmd+K launcher over a grouped command list
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-command-palette {
7
11
  position: fixed;
8
12
  inset: 0;
@@ -246,6 +250,32 @@
246
250
  white-space: nowrap;
247
251
  }
248
252
 
253
+ /* While a query narrows the list, the typed part of each row's text holds
254
+ full strength and the labels step back, the way a mention menu marks a
255
+ match, so a row whose name holds the query reads strongest. Colour
256
+ carries it as well as weight, because a theme may set both paragraph
257
+ weights the same. A destructive row keeps its own colour. */
258
+ .ds-command-palette--filtered .ds-command-palette__command-label {
259
+ color: var(--color-text-secondary);
260
+ }
261
+
262
+ .ds-command-palette__match {
263
+ font-weight: var(--font-paragraph-sm-emphasis-weight);
264
+ color: var(--color-text-primary);
265
+ }
266
+
267
+ .ds-command-palette__command-label .ds-command-palette__match {
268
+ font-weight: inherit;
269
+ }
270
+
271
+ .ds-command-palette--filtered .ds-command-palette__command--destructive .ds-command-palette__command-label {
272
+ color: var(--color-action-destructive-text-secondary);
273
+ }
274
+
275
+ .ds-command-palette__command--destructive .ds-command-palette__command-label .ds-command-palette__match {
276
+ color: inherit;
277
+ }
278
+
249
279
  /* ============================================
250
280
  SHORTCUT KEYS
251
281
  ============================================ */
@@ -329,3 +359,5 @@
329
359
  .ds-command-palette .material-symbols-rounded {
330
360
  color: inherit;
331
361
  }
362
+
363
+ } /* @layer rift.components */
@@ -90,7 +90,8 @@ export interface CommandPaletteProps extends CommandPaletteOwnProps, Omit<React.
90
90
  }
91
91
  /**
92
92
  * CommandPalette component — a modal Cmd+K launcher that searches a grouped
93
- * command list. Filtering matches labels, descriptions, and keywords; the
93
+ * command list. Filtering matches labels, descriptions, and keywords, and the
94
+ * part of a row's text that holds what was typed is drawn stronger; the
94
95
  * arrow keys move a highlight that stays in view, and Enter runs the command.
95
96
  */
96
97
  export declare const CommandPalette: React.ForwardRefExoticComponent<CommandPaletteProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import React, { useState, useRef, useCallback, useId, useMemo, useEffect } from "react";
4
4
  import { IconButton } from "../IconButton/IconButton.js";
5
5
  import ReactDOM from "react-dom";
@@ -10,9 +10,19 @@ import { useMounted } from "../../behaviors/useMounted.js";
10
10
  import { useLayer } from "../../behaviors/useLayer.js";
11
11
  import { useFocusScope } from "../../behaviors/useFocusScope.js";
12
12
  import { useScrollLock } from "../../behaviors/useScrollLock.js";
13
+ import { matchParts } from "../../behaviors/matchParts.js";
13
14
  import { useShortcut } from "../../behaviors/shortcuts.js";
14
15
  import { mirrorClass } from "../../behaviors/direction.js";
15
16
  const DEFAULT_HOTKEY_KEYS = ["meta+k", "ctrl+k"];
17
+ const renderMatch = (text, query) => {
18
+ const parts = matchParts(text, query);
19
+ if (!parts) return text;
20
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
21
+ parts[0],
22
+ /* @__PURE__ */ jsx("span", { className: "ds-command-palette__match", children: parts[1] }),
23
+ parts[2]
24
+ ] });
25
+ };
16
26
  const CommandPalette = React.forwardRef(({
17
27
  open,
18
28
  onOpenChange,
@@ -138,7 +148,14 @@ const CommandPalette = React.forwardRef(({
138
148
  const listboxId = `${generatedId}-listbox`;
139
149
  const activeCommand = flatCommands[activeIndex];
140
150
  const activeDescendantId = activeCommand && !loading ? `${generatedId}-command-${activeCommand.id}` : void 0;
141
- const classes = [baseClass, open ? `${baseClass}--open` : "", className].filter(Boolean).join(" ");
151
+ const classes = [
152
+ baseClass,
153
+ open ? `${baseClass}--open` : "",
154
+ // Under manualFiltering the host chose the rows by its own test, so a
155
+ // row may not hold the query at all: the labels keep full strength.
156
+ !manualFiltering && query.trim() !== "" ? `${baseClass}--filtered` : "",
157
+ className
158
+ ].filter(Boolean).join(" ");
142
159
  let commandIndex = 0;
143
160
  const palette = /* @__PURE__ */ jsxs("div", { className: classes, children: [
144
161
  /* @__PURE__ */ jsx(
@@ -243,8 +260,8 @@ const CommandPalette = React.forwardRef(({
243
260
  }
244
261
  ),
245
262
  /* @__PURE__ */ jsxs("span", { className: `${baseClass}__command-text`, children: [
246
- /* @__PURE__ */ jsx("span", { className: `${baseClass}__command-label`, children: command.label }),
247
- command.description && /* @__PURE__ */ jsx("span", { className: `${baseClass}__command-description`, children: command.description })
263
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__command-label`, children: renderMatch(command.label, query) }),
264
+ command.description && /* @__PURE__ */ jsx("span", { className: `${baseClass}__command-description`, children: renderMatch(command.description, query) })
248
265
  ] }),
249
266
  command.keys ? /* @__PURE__ */ jsx("span", { className: `${baseClass}__shortcut`, children: /* @__PURE__ */ jsx(Kbd, { keys: command.keys, keyLabels, size: "compact" }) }) : command.shortcut && command.shortcut.length > 0 && /* @__PURE__ */ jsx("span", { className: `${baseClass}__shortcut`, children: command.shortcut.map((key, i) => /* @__PURE__ */ jsx(Kbd, { size: "compact", children: key }, i)) }),
250
267
  command.trailing && /* @__PURE__ */ jsx("span", { className: `${baseClass}__trailing`, children: command.trailing })
@@ -8,6 +8,10 @@
8
8
  family in a row, and it hovers like a field.
9
9
  ============================================ */
10
10
 
11
+ @layer rift.tokens, rift.preset, rift.components;
12
+
13
+ @layer rift.components {
14
+
11
15
  .ds-command-palette-trigger {
12
16
  display: inline-flex;
13
17
  align-items: center;
@@ -107,3 +111,5 @@
107
111
  .ds-command-palette-trigger:not(.ds-command-palette-trigger--icon-only) {
108
112
  padding-inline: var(--padding-200);
109
113
  }
114
+
115
+ } /* @layer rift.components */
@@ -3,6 +3,8 @@
3
3
  The chat input shell: file tray, auto-growing textarea, send/stop
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
6
8
  /* The focus treatment animates a registered custom property, exactly as
7
9
  AiButton does: a conic gradient's angle cannot tween otherwise. Browsers
8
10
  without @property render the ring at its initial angle, static — a
@@ -14,6 +16,8 @@
14
16
  inherits: false;
15
17
  }
16
18
 
19
+ @layer rift.components {
20
+
17
21
  .ds-composer {
18
22
  /* Anchors the focus ring and glow pseudo-elements */
19
23
  position: relative;
@@ -792,3 +796,5 @@
792
796
  flex-basis: 100%;
793
797
  margin: var(--ds-composer-ring) var(--ds-composer-ring) 0;
794
798
  }
799
+
800
+ } /* @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
  CONTACT CARD
3
7
  ============================================ */
@@ -130,3 +134,5 @@
130
134
  .ds-contact-card .material-symbols-rounded {
131
135
  color: inherit;
132
136
  }
137
+
138
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  Panel and item styling mirror DropdownMenu.
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  /* Base — a plain block wrapper around the right-clickable area
8
12
  (a real box, so the keyboard-invocation fallback can measure it) */
9
13
  .ds-context-menu {
@@ -311,3 +315,5 @@
311
315
  .ds-context-menu__panel--compact .ds-context-menu__item--has-submenu {
312
316
  padding-inline-end: var(--padding-200);
313
317
  }
318
+
319
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  day, coloured by the contribution colour ramp
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  /* Card chrome, header, and padding come from the shared chart styles
8
12
  (Chart.css); this file owns the grid, legend, and cell ramp. */
9
13
 
@@ -167,3 +171,5 @@
167
171
  .ds-contribution-graph__legend-label:last-child {
168
172
  margin-inline-start: var(--gap-050);
169
173
  }
174
+
175
+ } /* @layer rift.components */
@@ -7,6 +7,12 @@
7
7
  grouped on blur.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  .ds-currency-input .ds-input__field {
11
15
  font-variant-numeric: tabular-nums;
12
16
  }
17
+
18
+ } /* @layer rift.components */
@@ -7,6 +7,10 @@
7
7
  only styles the chrome around it.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  .ds-data-table {
11
15
  display: flex;
12
16
  flex-direction: column;
@@ -1361,3 +1365,5 @@
1361
1365
  /* Banner is a page-wide strip; over a table it takes the frame's corner. */
1362
1366
  border-radius: var(--radius-300);
1363
1367
  }
1368
+
1369
+ } /* @layer rift.components */
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import React, { useMemo, useState, useEffect, useRef, useId, useLayoutEffect, useDeferredValue, useCallback } from "react";
4
- import { useTable, tableFeatures, columnVisibilityFeature, columnPinningFeature, columnOrderingFeature, rowSelectionFeature, globalFilteringFeature, columnFilteringFeature, rowSortingFeature, createFilteredRowModel, createSortedRowModel } from "@tanstack/react-table";
4
+ import { tableFeatures, columnVisibilityFeature, columnPinningFeature, columnOrderingFeature, rowSelectionFeature, globalFilteringFeature, columnFilteringFeature, rowSortingFeature, createFilteredRowModel, createSortedRowModel, useTable } from "@tanstack/react-table";
5
5
  import { DropdownMenu } from "../DropdownMenu/DropdownMenu.js";
6
6
  import { Dropdown } from "../Dropdown/Dropdown.js";
7
7
  import { IconButton } from "../IconButton/IconButton.js";
@@ -37,6 +37,7 @@ import "../../fonts/material-symbols.css";
37
37
  import { useLocale } from "../../behaviors/LocaleProvider.js";
38
38
  import { logicalArrowKey, isRtl } from "../../behaviors/direction.js";
39
39
  import { formatPercent } from "../../behaviors/locale.js";
40
+ import { periodColumns, periodsOf, totalOf } from "./periodColumns.js";
40
41
  const DEFAULT_COLUMN_LABELS = {
41
42
  menu: (header) => `${header} column options`,
42
43
  sortAscending: "Sort ascending",
@@ -2541,5 +2542,8 @@ function reconcileDataTableView(view, columns) {
2541
2542
  }
2542
2543
  export {
2543
2544
  DataTable,
2544
- reconcileDataTableView
2545
+ periodColumns,
2546
+ periodsOf,
2547
+ reconcileDataTableView,
2548
+ totalOf
2545
2549
  };
@@ -3,6 +3,10 @@
3
3
  Date input with calendar icon and label
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-date-input {
7
11
  display: flex;
8
12
  flex-direction: column;
@@ -151,3 +155,5 @@
151
155
  .ds-date-input--compact .ds-date-input__field {
152
156
  padding-inline-start: calc(var(--padding-200) + 20px + var(--gap-200)); /* 8px + 20px icon + 8px gap */
153
157
  }
158
+
159
+ } /* @layer rift.components */