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
@@ -3,6 +3,10 @@
3
3
  Inline calendar with month navigation
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-date-picker {
7
11
  display: inline-flex;
8
12
  flex-direction: column;
@@ -227,3 +231,5 @@
227
231
  opacity: 0.4;
228
232
  pointer-events: none;
229
233
  }
234
+
235
+ } /* @layer rift.components */
@@ -10,6 +10,10 @@
10
10
  chips above, which wrap.
11
11
  ============================================ */
12
12
 
13
+ @layer rift.tokens, rift.preset, rift.components;
14
+
15
+ @layer rift.components {
16
+
13
17
  /* Layout */
14
18
  .ds-date-range-picker {
15
19
  max-inline-size: 100%;
@@ -90,3 +94,5 @@
90
94
  .ds-date-picker__gridcell:has(> .ds-date-range-picker__cell--preview-end):dir(rtl) {
91
95
  background: linear-gradient(to right, transparent 50%, var(--color-action-passive-bg-active) 50%); /* ds-allow(physical): the right-to-left twin of the rule above */
92
96
  }
97
+
98
+ } /* @layer rift.components */
@@ -7,6 +7,10 @@
7
7
  warning, then error, and error once it passes.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  /* Base */
11
15
  .ds-deadline {
12
16
  display: inline-flex;
@@ -80,3 +84,5 @@
80
84
  .ds-deadline--text.ds-deadline--overdue {
81
85
  font-weight: var(--font-paragraph-emphasis-weight);
82
86
  }
87
+
88
+ } /* @layer rift.components */
@@ -7,6 +7,10 @@
7
7
  to go.
8
8
  ============================================ */
9
9
 
10
+ @layer rift.tokens, rift.preset, rift.components;
11
+
12
+ @layer rift.components {
13
+
10
14
  /* Base */
11
15
 
12
16
  .ds-decision-row {
@@ -44,3 +48,5 @@
44
48
  .ds-decision-row .ds-widget-row__actions {
45
49
  margin-inline-start: auto;
46
50
  }
51
+
52
+ } /* @layer rift.components */
@@ -8,6 +8,10 @@
8
8
  never by the viewport.
9
9
  ============================================ */
10
10
 
11
+ @layer rift.tokens, rift.preset, rift.components;
12
+
13
+ @layer rift.components {
14
+
11
15
  /* Frame */
12
16
  .ds-description-list__frame {
13
17
  container-type: inline-size;
@@ -210,3 +214,5 @@
210
214
  grid-template-columns: repeat(min(var(--ds-description-list-columns, 2), 2), minmax(0, 1fr));
211
215
  }
212
216
  }
217
+
218
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  General-purpose modal with backdrop overlay
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-dialog {
7
11
  position: fixed;
8
12
  inset: 0;
@@ -152,3 +156,5 @@
152
156
  margin: var(--padding-400);
153
157
  }
154
158
  }
159
+
160
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Thin rule separating stacked content
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  /* Base — plain horizontal <hr> */
7
11
  .ds-divider {
8
12
  border: none;
@@ -98,3 +102,5 @@
98
102
  margin-block: 0;
99
103
  margin-inline: var(--gap-500); /* 20px */
100
104
  }
105
+
106
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  metadata line, upload progress, optional remove.
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-document-chip {
8
12
  /* Accent indirection — the error modifier repoints one variable
9
13
  instead of restyling each part */
@@ -224,3 +228,5 @@
224
228
  .ds-document-chip:has(> .ds-document-chip__remove) {
225
229
  padding-inline-end: var(--padding-200);
226
230
  }
231
+
232
+ } /* @layer rift.components */
@@ -8,6 +8,10 @@
8
8
  control-height scale, or its container's.
9
9
  ============================================ */
10
10
 
11
+ @layer rift.tokens, rift.preset, rift.components;
12
+
13
+ @layer rift.components {
14
+
11
15
  /* Base */
12
16
  .ds-document-viewer {
13
17
  display: flex;
@@ -186,3 +190,5 @@
186
190
  line-height: var(--font-paragraph-line-height);
187
191
  color: var(--color-text-secondary);
188
192
  }
193
+
194
+ } /* @layer rift.components */
@@ -1,8 +1,12 @@
1
1
  /* ============================================
2
2
  DRAWER COMPONENT
3
- Edge-anchored modal panel that slides in
3
+ Edge-anchored panel, modal by default, that slides in
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-drawer {
7
11
  position: fixed;
8
12
  inset: 0;
@@ -11,6 +15,9 @@
11
15
  visibility: hidden; /* keeps panel controls out of the tab order when closed */
12
16
  pointer-events: none;
13
17
  transition: visibility var(--motion-duration-slow) var(--motion-ease-standard);
18
+ /* How far the closed panel rests off its edge: its own size, plus the
19
+ float gap when it is held off the edge. */
20
+ --ds-drawer-offset: 100%;
14
21
  }
15
22
 
16
23
  .ds-drawer--open {
@@ -93,43 +100,58 @@
93
100
  .ds-drawer--left .ds-drawer__panel {
94
101
  height: 100%;
95
102
  border-right: var(--border-025) solid var(--color-bg-container-border); /* ds-allow(physical): a left drawer sits on the screen's left edge */
96
- transform: translateX(-100%); /* ds-allow(physical): it slides in from the screen's left edge */
103
+ transform: translateX(calc(-1 * var(--ds-drawer-offset))); /* ds-allow(physical): it slides in from the screen's left edge */
97
104
  }
98
105
 
99
106
  .ds-drawer--right .ds-drawer__panel {
100
107
  height: 100%;
101
108
  border-left: var(--border-025) solid var(--color-bg-container-border); /* ds-allow(physical): a right drawer sits on the screen's right edge */
102
- transform: translateX(100%); /* ds-allow(physical): it slides in from the screen's right edge */
109
+ transform: translateX(var(--ds-drawer-offset)); /* ds-allow(physical): it slides in from the screen's right edge */
103
110
  }
104
111
 
105
112
  .ds-drawer--start .ds-drawer__panel {
106
113
  height: 100%;
107
114
  border-inline-end: var(--border-025) solid var(--color-bg-container-border);
108
- transform: translateX(calc(-100% * var(--ds-inline-sign, 1)));
115
+ transform: translateX(calc(-1 * var(--ds-drawer-offset) * var(--ds-inline-sign, 1)));
109
116
  }
110
117
 
111
118
  .ds-drawer--end .ds-drawer__panel {
112
119
  height: 100%;
113
120
  border-inline-start: var(--border-025) solid var(--color-bg-container-border);
114
- transform: translateX(calc(100% * var(--ds-inline-sign, 1)));
121
+ transform: translateX(calc(var(--ds-drawer-offset) * var(--ds-inline-sign, 1)));
115
122
  }
116
123
 
117
124
  .ds-drawer--top .ds-drawer__panel {
118
125
  width: 100%;
119
126
  border-bottom: var(--border-025) solid var(--color-bg-container-border);
120
- transform: translateY(-100%);
127
+ transform: translateY(calc(-1 * var(--ds-drawer-offset)));
121
128
  }
122
129
 
123
130
  .ds-drawer--bottom .ds-drawer__panel {
124
131
  width: 100%;
125
132
  border-top: var(--border-025) solid var(--color-bg-container-border);
126
- transform: translateY(100%);
133
+ transform: translateY(var(--ds-drawer-offset));
127
134
  }
128
135
 
129
136
  .ds-drawer--open .ds-drawer__panel {
130
137
  transform: translate(0, 0);
131
138
  }
132
139
 
140
+ /* ============================================
141
+ NON-MODAL
142
+ The page beside the panel stays live: the
143
+ root lets every press through and only the
144
+ panel takes them. No scrim is rendered.
145
+ ============================================ */
146
+
147
+ .ds-drawer--non-modal.ds-drawer--open {
148
+ pointer-events: none;
149
+ }
150
+
151
+ .ds-drawer--non-modal.ds-drawer--open .ds-drawer__panel {
152
+ pointer-events: auto;
153
+ }
154
+
133
155
  /* ============================================
134
156
  SIZES — measured along the slide axis
135
157
  ============================================ */
@@ -173,6 +195,30 @@
173
195
  max-height: 75vh;
174
196
  }
175
197
 
198
+ /* ============================================
199
+ FLOATING
200
+ The raised edge of the floating app shell
201
+ (src/behaviors/shell.css): held off every
202
+ edge by the float gap, a hairline all round,
203
+ the shell radius and the floating shadow.
204
+ After SIZES, so its width cap outranks theirs;
205
+ border-box, so a size is the whole card and
206
+ the card fits inside the gap.
207
+ ============================================ */
208
+
209
+ .ds-drawer--floating {
210
+ padding: var(--padding-500); /* 20px, the same step as the shell's float gap */
211
+ --ds-drawer-offset: calc(100% + var(--padding-500));
212
+ }
213
+
214
+ .ds-drawer.ds-drawer--floating .ds-drawer__panel {
215
+ box-sizing: border-box;
216
+ max-width: 100%;
217
+ border: var(--border-025) solid var(--color-bg-container-border);
218
+ border-radius: var(--radius-600);
219
+ box-shadow: var(--shadow-floating);
220
+ }
221
+
176
222
  /* ============================================
177
223
  HEADER
178
224
  ============================================ */
@@ -271,3 +317,5 @@
271
317
  transition: none;
272
318
  }
273
319
  }
320
+
321
+ } /* @layer rift.components */
@@ -32,6 +32,21 @@ type DrawerOwnProps = {
32
32
  size?: 'sm' | 'md' | 'lg';
33
33
  /** Whether ESC, scrim click, and the close button can dismiss */
34
34
  dismissible?: boolean;
35
+ /**
36
+ * Whether the drawer takes over the page. `true` (the default) draws the
37
+ * scrim, traps focus, locks scroll and makes the page behind inert. `false`
38
+ * leaves the page live beside the panel, for a detail view that follows a
39
+ * list: no scrim, no trap, and a press outside never closes it. Focus still
40
+ * moves into the panel on open; on close it returns to the opener only if
41
+ * it is still inside the panel.
42
+ */
43
+ modal?: boolean;
44
+ /**
45
+ * How the panel meets the edge. `flush` (the default) runs to the edge with
46
+ * a hairline on the side facing the page; `floating` holds the panel off
47
+ * every edge as a raised, rounded card.
48
+ */
49
+ layout?: 'flush' | 'floating';
35
50
  /** Accessible name of the close button. */
36
51
  closeLabel?: string;
37
52
  /** Additional CSS classes — applied to the portal container, not the panel */
@@ -43,7 +58,8 @@ export interface DrawerProps extends DrawerOwnProps, Omit<React.ComponentPropsWi
43
58
  * Drawer component — an edge-anchored panel that slides in over the page.
44
59
  * Shares Dialog's modal semantics (focus trap, focus restore, scroll lock,
45
60
  * ESC/scrim dismissal) but is anchored to a viewport edge, which suits
46
- * filter panels, detail views, and mobile navigation.
61
+ * filter panels, detail views, and mobile navigation. With `modal={false}`
62
+ * it rests beside a page that stays live.
47
63
  *
48
64
  * Renders through a portal into `document.body`. The forwarded ref and any
49
65
  * unrecognised props target the **panel** (the `role="dialog"` element), not the
@@ -23,6 +23,8 @@ const Drawer = React.forwardRef(
23
23
  side = "right",
24
24
  size = "md",
25
25
  dismissible = true,
26
+ modal = true,
27
+ layout = "flush",
26
28
  closeLabel = "Close drawer",
27
29
  className = "",
28
30
  ...rest
@@ -37,9 +39,27 @@ const Drawer = React.forwardRef(
37
39
  else if (ref) ref.current = node;
38
40
  };
39
41
  const mounted = useMounted();
40
- const layer = useLayer({ open, dismissOnEscape: dismissible, onDismiss: () => onOpenChange(false) });
41
- useFocusScope(panelRef, { active: open });
42
- useScrollLock(open);
42
+ const layer = useLayer({
43
+ open,
44
+ dismissOnEscape: dismissible,
45
+ onDismiss: () => onOpenChange(false),
46
+ passive: !modal,
47
+ getElements: modal ? void 0 : () => [panelRef.current]
48
+ });
49
+ useFocusScope(panelRef, {
50
+ active: open,
51
+ trap: modal,
52
+ inertOutside: modal,
53
+ // The page stays live beside a non-modal drawer, so by the time it
54
+ // closes focus may already be where the reader put it. Only a focus
55
+ // still inside the panel goes back to the opener.
56
+ restoreFocus: modal ? true : () => {
57
+ const active = document.activeElement;
58
+ if (!(active instanceof HTMLElement) || active === document.body) return null;
59
+ return panelRef.current?.contains(active) ? null : active;
60
+ }
61
+ });
62
+ useScrollLock(open && modal);
43
63
  const handleScrimClick = () => {
44
64
  if (dismissible && layer.ownsPress()) onOpenChange(false);
45
65
  };
@@ -47,11 +67,13 @@ const Drawer = React.forwardRef(
47
67
  baseClass,
48
68
  `${baseClass}--${side}`,
49
69
  `${baseClass}--${size}`,
70
+ layout === "floating" ? `${baseClass}--floating` : "",
71
+ modal ? "" : `${baseClass}--non-modal`,
50
72
  open ? `${baseClass}--open` : "",
51
73
  className
52
74
  ].filter(Boolean).join(" ");
53
75
  const drawer = /* @__PURE__ */ jsxs("div", { className: classes, "data-state": open ? "open" : "closed", children: [
54
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__scrim`, onClick: handleScrimClick }),
76
+ modal && /* @__PURE__ */ jsx("div", { className: `${baseClass}__scrim`, onClick: handleScrimClick }),
55
77
  /* @__PURE__ */ jsxs(
56
78
  "div",
57
79
  {
@@ -60,7 +82,7 @@ const Drawer = React.forwardRef(
60
82
  "data-state": open ? "open" : "closed",
61
83
  ref: setPanelRef,
62
84
  role: "dialog",
63
- "aria-modal": "true",
85
+ "aria-modal": modal ? "true" : void 0,
64
86
  "aria-labelledby": titleId,
65
87
  "aria-describedby": description ? descId : rest["aria-describedby"],
66
88
  tabIndex: -1,
@@ -10,6 +10,10 @@
10
10
  tick beside a label, not a leading icon.
11
11
  ============================================ */
12
12
 
13
+ @layer rift.tokens, rift.preset, rift.components;
14
+
15
+ @layer rift.components {
16
+
13
17
  .ds-chosen-mark {
14
18
  --icon-size: var(--icon-size-500);
15
19
  flex-shrink: 0;
@@ -17,3 +21,5 @@
17
21
  color: var(--color-action-primary-bg);
18
22
  line-height: 1;
19
23
  }
24
+
25
+ } /* @layer rift.components */
@@ -3,6 +3,10 @@
3
3
  Custom select with menu, keyboard navigation
4
4
  ============================================ */
5
5
 
6
+ @layer rift.tokens, rift.preset, rift.components;
7
+
8
+ @layer rift.components {
9
+
6
10
  .ds-dropdown {
7
11
  display: flex;
8
12
  flex-direction: column;
@@ -222,6 +226,46 @@
222
226
  align-items: center;
223
227
  gap: var(--gap-100);
224
228
  min-width: 0;
229
+ flex: 1;
230
+ }
231
+
232
+ /* The rich row, shared with Combobox's: a label over a tertiary second
233
+ line, and a secondary value at the row's end before the chosen mark. A
234
+ row with a second line gives its leading mark the wider gap. */
235
+ .ds-dropdown__option-content:has(.ds-dropdown__option-text) {
236
+ gap: var(--gap-200);
237
+ }
238
+
239
+ .ds-dropdown__option-text {
240
+ display: flex;
241
+ flex-direction: column;
242
+ gap: var(--gap-050);
243
+ min-width: 0;
244
+ }
245
+
246
+ .ds-dropdown__option-description {
247
+ font-family: var(--font-paragraph-sm-family);
248
+ font-size: var(--font-paragraph-sm-size);
249
+ font-weight: var(--font-paragraph-sm-weight);
250
+ line-height: var(--font-paragraph-sm-line-height);
251
+ letter-spacing: var(--font-paragraph-sm-letter-spacing);
252
+ color: var(--color-text-tertiary);
253
+ }
254
+
255
+ .ds-dropdown__option-trailing {
256
+ flex-shrink: 0;
257
+ margin-inline-start: var(--gap-400);
258
+ font-family: var(--font-paragraph-sm-family);
259
+ font-size: var(--font-paragraph-sm-size);
260
+ font-weight: var(--font-paragraph-sm-weight);
261
+ line-height: var(--font-paragraph-sm-line-height);
262
+ letter-spacing: var(--font-paragraph-sm-letter-spacing);
263
+ font-variant-numeric: tabular-nums;
264
+ color: var(--color-text-secondary);
265
+ }
266
+
267
+ .ds-dropdown__option-trailing + .ds-chosen-mark {
268
+ margin-inline-start: var(--gap-200);
225
269
  }
226
270
 
227
271
  .ds-dropdown__option-icon {
@@ -320,3 +364,5 @@
320
364
  .ds-dropdown__option:has(.ds-chosen-mark) {
321
365
  padding-inline-end: var(--padding-200);
322
366
  }
367
+
368
+ } /* @layer rift.components */
@@ -17,6 +17,13 @@ export interface DropdownOption {
17
17
  * or custom element (ReactNode).
18
18
  */
19
19
  icon?: string | React.ReactNode;
20
+ /** A second line under the label, in the option row only: an account number, a person's email. */
21
+ description?: string;
22
+ /**
23
+ * Content at the end of the option row, before the chosen mark: a balance,
24
+ * a count, a Badge. Shown in the row only, never on the closed trigger.
25
+ */
26
+ trailing?: React.ReactNode;
20
27
  /** Whether this option is disabled */
21
28
  disabled?: boolean;
22
29
  }
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import React, { useState, useId, useRef, useEffect } from "react";
4
4
  import { useAnchoredPosition } from "../../behaviors/useAnchoredPosition.js";
5
5
  import { useLayer } from "../../behaviors/useLayer.js";
@@ -188,6 +188,24 @@ const Dropdown = React.forwardRef(
188
188
  focusedEl?.scrollIntoView({ block: "nearest" });
189
189
  }
190
190
  }, [focusedIndex, isOpen, inputId]);
191
+ const renderOptionBody = (option) => /* @__PURE__ */ jsxs(Fragment, { children: [
192
+ /* @__PURE__ */ jsxs("span", { className: `${baseClass}__option-content`, children: [
193
+ option.icon && (typeof option.icon === "string" ? /* @__PURE__ */ jsx(
194
+ "span",
195
+ {
196
+ className: `${baseClass}__option-icon material-symbols-rounded ${mirrorClass(option.icon)}`,
197
+ "aria-hidden": "true",
198
+ children: option.icon
199
+ }
200
+ ) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-icon`, "aria-hidden": "true", children: option.icon })),
201
+ option.description ? /* @__PURE__ */ jsxs("span", { className: `${baseClass}__option-text`, children: [
202
+ /* @__PURE__ */ jsx("span", { children: option.label }),
203
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-description`, children: option.description })
204
+ ] }) : option.label
205
+ ] }),
206
+ option.trailing != null && option.trailing !== false && /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-trailing`, children: option.trailing }),
207
+ option.value === value && /* @__PURE__ */ jsx(ChosenMark, {})
208
+ ] });
191
209
  const activeOptionId = isOpen && focusedIndex >= 0 && flatOptions[focusedIndex] ? `${inputId}-option-${focusedIndex}` : void 0;
192
210
  return /* @__PURE__ */ jsxs(
193
211
  Field,
@@ -265,7 +283,7 @@ const Dropdown = React.forwardRef(
265
283
  "aria-label": group.label,
266
284
  children: group.options.map((option) => {
267
285
  const myIndex = flatIndex++;
268
- return /* @__PURE__ */ jsxs(
286
+ return /* @__PURE__ */ jsx(
269
287
  "li",
270
288
  {
271
289
  id: `${inputId}-option-${myIndex}`,
@@ -280,27 +298,7 @@ const Dropdown = React.forwardRef(
280
298
  "aria-selected": option.value === value,
281
299
  "aria-disabled": option.disabled,
282
300
  onClick: () => !option.disabled && handleSelect(option.value),
283
- children: [
284
- /* @__PURE__ */ jsxs("span", { className: `${baseClass}__option-content`, children: [
285
- option.icon && (typeof option.icon === "string" ? /* @__PURE__ */ jsx(
286
- "span",
287
- {
288
- className: `${baseClass}__option-icon material-symbols-rounded ${mirrorClass(option.icon)}`,
289
- "aria-hidden": "true",
290
- children: option.icon
291
- }
292
- ) : /* @__PURE__ */ jsx(
293
- "span",
294
- {
295
- className: `${baseClass}__option-icon`,
296
- "aria-hidden": "true",
297
- children: option.icon
298
- }
299
- )),
300
- option.label
301
- ] }),
302
- option.value === value && /* @__PURE__ */ jsx(ChosenMark, {})
303
- ]
301
+ children: renderOptionBody(option)
304
302
  },
305
303
  option.value
306
304
  );
@@ -309,7 +307,7 @@ const Dropdown = React.forwardRef(
309
307
  ),
310
308
  groupIdx < groups.length - 1 && /* @__PURE__ */ jsx("li", { className: `${baseClass}__separator`, role: "separator" })
311
309
  ] }, `group-${groupIdx}`));
312
- })() : options.map((option, index) => /* @__PURE__ */ jsxs(
310
+ })() : options.map((option, index) => /* @__PURE__ */ jsx(
313
311
  "li",
314
312
  {
315
313
  id: `${inputId}-option-${index}`,
@@ -324,20 +322,7 @@ const Dropdown = React.forwardRef(
324
322
  "aria-selected": option.value === value,
325
323
  "aria-disabled": option.disabled,
326
324
  onClick: () => !option.disabled && handleSelect(option.value),
327
- children: [
328
- /* @__PURE__ */ jsxs("span", { className: `${baseClass}__option-content`, children: [
329
- option.icon && (typeof option.icon === "string" ? /* @__PURE__ */ jsx(
330
- "span",
331
- {
332
- className: `${baseClass}__option-icon material-symbols-rounded ${mirrorClass(option.icon)}`,
333
- "aria-hidden": "true",
334
- children: option.icon
335
- }
336
- ) : /* @__PURE__ */ jsx("span", { className: `${baseClass}__option-icon`, "aria-hidden": "true", children: option.icon })),
337
- option.label
338
- ] }),
339
- option.value === value && /* @__PURE__ */ jsx(ChosenMark, {})
340
- ]
325
+ children: renderOptionBody(option)
341
326
  },
342
327
  option.value
343
328
  ))
@@ -5,6 +5,10 @@
5
5
  Tokens aligned to Figma spec.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  .ds-dropdown-menu {
9
13
  position: relative;
10
14
  display: inline-flex;
@@ -405,3 +409,5 @@
405
409
  .ds-dropdown-menu__panel--compact .ds-dropdown-menu__item--has-submenu {
406
410
  padding-inline-end: var(--padding-200);
407
411
  }
412
+
413
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  that have nothing to show
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-empty-state {
8
12
  display: flex;
9
13
  flex-direction: column;
@@ -146,3 +150,5 @@
146
150
  .ds-empty-state .material-symbols-rounded:not(:where(.ds-empty-state__action *)) {
147
151
  color: inherit;
148
152
  }
153
+
154
+ } /* @layer rift.components */
@@ -4,6 +4,10 @@
4
4
  and a label. Used on Icons and Logos pages.
5
5
  ============================================ */
6
6
 
7
+ @layer rift.tokens, rift.preset, rift.components;
8
+
9
+ @layer rift.components {
10
+
7
11
  .ds-entity-card {
8
12
  /* Layout */
9
13
  display: flex;
@@ -67,3 +71,5 @@
67
71
  text-align: center;
68
72
  word-break: break-word;
69
73
  }
74
+
75
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  at rest, the passive wash on hover and focus at --radius-200).
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  .ds-entity-switcher {
9
13
  display: flex;
10
14
  width: 100%;
@@ -339,3 +343,5 @@
339
343
  font-size: var(--font-paragraph-sm-size);
340
344
  line-height: var(--font-paragraph-sm-line-height);
341
345
  }
346
+
347
+ } /* @layer rift.components */
@@ -5,6 +5,10 @@
5
5
  heading and a list of links, one per error.
6
6
  ============================================ */
7
7
 
8
+ @layer rift.tokens, rift.preset, rift.components;
9
+
10
+ @layer rift.components {
11
+
8
12
  /* Base */
9
13
  .ds-error-summary {
10
14
  display: flex;
@@ -92,3 +96,5 @@
92
96
  outline: var(--border-050) solid var(--color-action-primary-bg);
93
97
  outline-offset: var(--border-050);
94
98
  }
99
+
100
+ } /* @layer rift.components */
@@ -5,6 +5,7 @@ import { useLocale } from "../../behaviors/LocaleProvider.js";
5
5
  import { formatNumber } from "../../behaviors/locale.js";
6
6
  import "../../fonts/material-symbols.css";
7
7
  import "./ErrorSummary.css";
8
+ import { fieldErrorsFrom } from "./fieldErrors.js";
8
9
  const DEFAULT_TITLE_LABEL = (count, formatted) => count === 1 ? "There is a problem" : `There are ${formatted} problems`;
9
10
  function ErrorSummary({
10
11
  errors,
@@ -66,5 +67,6 @@ function ErrorSummary({
66
67
  );
67
68
  }
68
69
  export {
69
- ErrorSummary
70
+ ErrorSummary,
71
+ fieldErrorsFrom
70
72
  };