rift-ds 1.23.0 → 1.25.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 (124) hide show
  1. package/README.md +4 -4
  2. package/behaviors/shell.css +119 -0
  3. package/bin/templates/blocks/components/blocks/AppShell.module.css +69 -15
  4. package/bin/templates/blocks/components/blocks/AppShell.tsx +45 -30
  5. package/bin/templates/blocks/registry.json +1 -1
  6. package/chat/ChatAgentPane.css +6 -6
  7. package/chat/ChatLauncher.d.ts +3 -3
  8. package/chat/ChatWidget.css +260 -8
  9. package/chat/ChatWidget.d.ts +41 -6
  10. package/chat/ChatWidget.js +49 -2
  11. package/chat/index.d.ts +1 -1
  12. package/chat/registry.json.d.ts +1 -1
  13. package/chat/registry.json.js +1 -1
  14. package/components/AppLayout/AppLayout.css +17 -4
  15. package/components/AppLayout/AppLayout.d.ts +8 -5
  16. package/components/AppLayout/AppLayout.js +2 -0
  17. package/components/AppSidebar/AppSidebar.css +108 -23
  18. package/components/AppSidebar/AppSidebar.d.ts +8 -5
  19. package/components/AppSidebar/AppSidebar.js +6 -3
  20. package/components/Attachment/Attachment.css +8 -0
  21. package/components/Attachment/AttachmentViewer.js +26 -5
  22. package/components/Attachment/fileTypes.d.ts +4 -0
  23. package/components/CurrencyInput/CurrencyInput.css +12 -0
  24. package/components/CurrencyInput/CurrencyInput.d.ts +51 -0
  25. package/components/CurrencyInput/CurrencyInput.js +158 -0
  26. package/components/DataTable/columnTypes.js +4 -16
  27. package/components/DatePicker/DatePicker.d.ts +2 -0
  28. package/components/DatePicker/DatePicker.js +44 -131
  29. package/components/DatePicker/MonthGrid.d.ts +56 -0
  30. package/components/DatePicker/MonthGrid.js +65 -0
  31. package/components/DatePicker/calendar.d.ts +42 -0
  32. package/components/DatePicker/calendar.js +108 -0
  33. package/components/DateRangePicker/DateRangePicker.css +92 -0
  34. package/components/DateRangePicker/DateRangePicker.d.ts +86 -0
  35. package/components/DateRangePicker/DateRangePicker.js +294 -0
  36. package/components/Deadline/Deadline.css +82 -0
  37. package/components/Deadline/Deadline.d.ts +44 -0
  38. package/components/Deadline/Deadline.js +94 -0
  39. package/components/Deadline/deadlineStatus.d.ts +15 -0
  40. package/components/Deadline/deadlineStatus.js +13 -0
  41. package/components/DescriptionList/DescriptionList.css +184 -0
  42. package/components/DescriptionList/DescriptionList.d.ts +64 -0
  43. package/components/DescriptionList/DescriptionList.js +100 -0
  44. package/components/DescriptionList/DescriptionListCopy.d.ts +18 -0
  45. package/components/DescriptionList/DescriptionListCopy.js +45 -0
  46. package/components/DocumentViewer/DocumentViewer.css +188 -0
  47. package/components/DocumentViewer/DocumentViewer.d.ts +59 -0
  48. package/components/DocumentViewer/DocumentViewer.js +185 -0
  49. package/components/ErrorSummary/ErrorSummary.css +94 -0
  50. package/components/ErrorSummary/ErrorSummary.d.ts +34 -0
  51. package/components/ErrorSummary/ErrorSummary.js +70 -0
  52. package/components/ErrorSummary/fieldErrors.d.ts +36 -0
  53. package/components/ErrorSummary/fieldErrors.js +19 -0
  54. package/components/Field/Field.css +12 -0
  55. package/components/Field/Field.d.ts +10 -2
  56. package/components/Field/Field.js +12 -5
  57. package/components/Heading/Heading.css +129 -0
  58. package/components/Heading/Heading.d.ts +31 -0
  59. package/components/Heading/Heading.js +39 -0
  60. package/components/Input/Input.css +120 -0
  61. package/components/Input/Input.d.ts +20 -1
  62. package/components/Input/Input.js +70 -5
  63. package/components/Link/Link.css +84 -0
  64. package/components/Link/Link.d.ts +43 -0
  65. package/components/Link/Link.js +74 -0
  66. package/components/List/List.css +173 -0
  67. package/components/List/List.d.ts +44 -0
  68. package/components/List/List.js +60 -0
  69. package/components/MaskedInput/MaskedInput.css +16 -0
  70. package/components/MaskedInput/MaskedInput.d.ts +57 -0
  71. package/components/MaskedInput/MaskedInput.js +142 -0
  72. package/components/MaskedInput/mask.d.ts +58 -0
  73. package/components/MaskedInput/mask.js +106 -0
  74. package/components/ShaderScene/ShaderScene.css +19 -0
  75. package/components/ShaderScene/ShaderScene.d.ts +82 -0
  76. package/components/ShaderScene/ShaderScene.js +144 -0
  77. package/components/ShaderScene/assemble.d.ts +5 -0
  78. package/components/ShaderScene/assemble.js +74 -0
  79. package/components/ShaderScene/common.glsl.d.ts +6 -0
  80. package/components/ShaderScene/common.glsl.js +49 -0
  81. package/components/ShaderScene/passes.d.ts +2 -0
  82. package/components/ShaderScene/passes.js +93 -0
  83. package/components/ShaderScene/renderer.d.ts +35 -0
  84. package/components/ShaderScene/renderer.js +125 -0
  85. package/components/ShaderScene/scenes.d.ts +20 -0
  86. package/components/ShaderScene/scenes.js +184 -0
  87. package/components/ShaderScene/types.d.ts +70 -0
  88. package/components/ShaderScene/types.js +8 -0
  89. package/components/SignaturePad/SignaturePad.css +141 -0
  90. package/components/SignaturePad/SignaturePad.d.ts +68 -0
  91. package/components/SignaturePad/SignaturePad.js +287 -0
  92. package/components/SignaturePad/signature.d.ts +32 -0
  93. package/components/SignaturePad/signature.js +46 -0
  94. package/components/Text/Text.css +129 -0
  95. package/components/Text/Text.d.ts +36 -0
  96. package/components/Text/Text.js +36 -0
  97. package/components/ThemePicker/ThemePicker.css +6 -0
  98. package/components/ThemePicker/ThemePicker.js +20 -11
  99. package/components/ThreadPanel/ThreadPanel.css +65 -36
  100. package/components/ThreadPanel/ThreadPanel.d.ts +5 -5
  101. package/components/ThreadPanel/ThreadPanel.js +1 -1
  102. package/components/Widget/Widget.css +111 -0
  103. package/components/Widget/Widget.d.ts +15 -1
  104. package/components/Widget/Widget.js +63 -11
  105. package/components/Widget/WidgetDisclosure.d.ts +30 -0
  106. package/components/Widget/WidgetDisclosure.js +52 -0
  107. package/components/registry.json +112 -3
  108. package/components/registry.json.d.ts +112 -3
  109. package/components/registry.json.js +2 -2
  110. package/format/index.d.ts +15 -0
  111. package/format/index.js +17 -0
  112. package/format/money.d.ts +89 -0
  113. package/format/money.js +187 -0
  114. package/format/relative.d.ts +49 -0
  115. package/format/relative.js +50 -0
  116. package/index.d.ts +13 -0
  117. package/index.js +46 -0
  118. package/package.json +9 -2
  119. package/tokens/motion.d.ts +4 -0
  120. package/tokens/motion.js +4 -0
  121. package/tokens/presets/plum.css +234 -240
  122. package/tokens/tokens-dark.css +2 -2
  123. package/tokens/tokens-light.css +2 -2
  124. package/tokens/values.json.js +1 -1
package/README.md CHANGED
@@ -13,7 +13,7 @@ An open source React design system built for AI products and coding agents: comp
13
13
 
14
14
  ## Why Rift DS
15
15
 
16
- - **<!-- component-count -->165<!-- /component-count --> components.** Buttons, forms and tables through to charts, navigation and overlays, each typed and documented with live examples. Every one forwards a ref and your own attributes to its element, state you can own works controlled or uncontrolled (a modal opens when your app says so, by design), and every word a component writes has a prop you can localise. The build checks the first two on every component, and the words wherever they sit in markup. React and React DOM are the only required peer dependencies.
16
+ - **<!-- component-count -->178<!-- /component-count --> components.** Buttons, forms and tables through to charts, navigation and overlays, each typed and documented with live examples. Every one forwards a ref and your own attributes to its element, state you can own works controlled or uncontrolled (a modal opens when your app says so, by design), and every word a component writes has a prop you can localise. The build checks the first two on every component, and the words wherever they sit in markup. React and React DOM are the only required peer dependencies.
17
17
  - **AI patterns, the whole chat and templates, ready to use.** Composer, streaming chat thread, tool calls, reasoning and thread panel are in the box, the complete AI chat ships assembled as one widget that one command scaffolds, and the docs site has complete template screens built from them.
18
18
  - **Fully themeable.** The shipped themes are complete looks to start from, each in light and dark. One `data-brand` attribute applies a theme, and a few CSS overrides make your own.
19
19
  - **Ready for coding agents.** One command installs the agent skills, and a public MCP endpoint serves every component's props, so your agent builds with the library as it actually is. No key, no account.
@@ -107,13 +107,13 @@ import 'rift-ds/tokens/presets/presets.css';
107
107
 
108
108
  ## Components
109
109
 
110
- <!-- component-count -->165<!-- /component-count --> components, including a chat set for AI products (Chat thread, Composer, Tool call, Reasoning, Thread panel) and Shader field, a WebGL2 ambient background whose light sources read your colour tokens at runtime, so it re-themes with everything else. Details and live examples are on the [docs site](https://rift-ds.com/components).
110
+ <!-- component-count -->178<!-- /component-count --> components, including a chat set for AI products (Chat thread, Composer, Tool call, Reasoning, Thread panel) and Shader field, a WebGL2 ambient background whose light sources read your colour tokens at runtime, so it re-themes with everything else. Details and live examples are on the [docs site](https://rift-ds.com/components).
111
111
 
112
112
  <details>
113
113
  <summary>The full list</summary>
114
114
 
115
115
  <!-- component-list:start -->
116
- Accordion · Action card · Action readout · Agent plan · Agent rail · Agent status · AI button · Alert · Alert dialog · Anchor nav · Animated number · App layout · App sidebar · Area chart · Artifact card · Artifact panel · Attachment drop zone · Attachment group · Attachment tile · Attachment viewer · Avatar · Avatar group · Badge · Banner · Bar chart · Bento tile · Bento tile art · Bottom nav · Breadcrumb · Button · Button group · Card · Card stack · Carousel · Chat header · Chat marker · Chat message · Chat thread · Checkbox · Chip · Circular button · Code block · Code diff · Colour picker · Combo chart · Combobox · Command palette · Command palette trigger · Composer · Contact card · Context menu · Contribution graph · Data table · Date input · Date picker · Dialog · Divider · Document chip · Drawer · Dropdown · Dropdown menu · Empty state · Entity card · Entity switcher · Event calendar · Field · Figure · File input · Filter bar · Funnel chart · Gantt chart · Gauge · Globe · Hover card · Image compare · Input · Inspector colour picker · Inspector dropdown · Inspector input · Inspector section · Inspector segments · Inspector slider · Inspector toggle switch · Instructions · Interrupt card · Kbd · Legend tile · Lightbox · Line chart · Link list · Map callout · Map legend · Mega menu · Mention · Message actions · Message card · Meter · Model picker · Nav · Nav list · Notification centre · Number input · Pagination · Panel · Pie chart · Pin input · Pixel avatar · Popover · Progress bar · Progressive blur · Prompt suggestions · Prose · Question card · Quote · Radar chart · Radial chart · Radio button · Rating · Reasoning · Rich dropdown · Scatter chart · Section title · Segmented control · Selection card · Shader field · Sidebar panel · Site header · Skeleton · Slider · Source chip · Source trail · Sparkline · Spinner · Split button · Split pane · Stacked bar chart · Stat · Status dot · Stepper · Streaming text · Swatch · Table · Table toolbar · Tabs · Tag input · Textarea · Theme picker · Theme toggle · Thread panel · Thread tabs · Time picker · Timeline · Toast · Toggle group · Toggle switch · Tool call · Toolbar · Tooltip · Top app bar · Tree view · Treemap · Usage card · Waveform · Widget · World map
116
+ Accordion · Action card · Action readout · Agent plan · Agent rail · Agent status · AI button · Alert · Alert dialog · Anchor nav · Animated number · App layout · App sidebar · Area chart · Artifact card · Artifact panel · Attachment drop zone · Attachment group · Attachment tile · Attachment viewer · Avatar · Avatar group · Badge · Banner · Bar chart · Bento tile · Bento tile art · Bottom nav · Breadcrumb · Button · Button group · Card · Card stack · Carousel · Chat header · Chat marker · Chat message · Chat thread · Checkbox · Chip · Circular button · Code block · Code diff · Colour picker · Combo chart · Combobox · Command palette · Command palette trigger · Composer · Contact card · Context menu · Contribution graph · Currency input · Data table · Date input · Date picker · Date range picker · Deadline · Description list · Dialog · Divider · Document chip · Document viewer · Drawer · Dropdown · Dropdown menu · Empty state · Entity card · Entity switcher · Error summary · Event calendar · Field · Figure · File input · Filter bar · Funnel chart · Gantt chart · Gauge · Globe · Heading · Hover card · Image compare · Input · Inspector colour picker · Inspector dropdown · Inspector input · Inspector section · Inspector segments · Inspector slider · Inspector toggle switch · Instructions · Interrupt card · Kbd · Legend tile · Lightbox · Line chart · Link · Link list · List · Map callout · Map legend · Masked input · Mega menu · Mention · Message actions · Message card · Meter · Model picker · Nav · Nav list · Notification centre · Number input · Pagination · Panel · Pie chart · Pin input · Pixel avatar · Popover · Progress bar · Progressive blur · Prompt suggestions · Prose · Question card · Quote · Radar chart · Radial chart · Radio button · Rating · Reasoning · Rich dropdown · Scatter chart · Section title · Segmented control · Selection card · Shader field · Shader scene · Sidebar panel · Signature pad · Site header · Skeleton · Slider · Source chip · Source trail · Sparkline · Spinner · Split button · Split pane · Stacked bar chart · Stat · Status dot · Stepper · Streaming text · Swatch · Table · Table toolbar · Tabs · Tag input · Text · Textarea · Theme picker · Theme toggle · Thread panel · Thread tabs · Time picker · Timeline · Toast · Toggle group · Toggle switch · Tool call · Toolbar · Tooltip · Top app bar · Tree view · Treemap · Usage card · Waveform · Widget · World map
117
117
  <!-- component-list:end -->
118
118
 
119
119
  </details>
@@ -124,7 +124,7 @@ Accordion · Action card · Action readout · Agent plan · Agent rail · Agent
124
124
  - **Vite 7**: dev server and library build
125
125
  - **Next.js 16**: the documentation site
126
126
  - **Storybook 10**: component explorer
127
- - **Vitest + Playwright + axe**: every Storybook story runs as a render test in headless Chromium, with an accessibility audit on each
127
+ - **Vitest + Playwright + axe**: every Storybook story runs as a render test in headless Chromium, with an accessibility audit on each, and the pure helpers have unit tests in Node
128
128
  - **TanStack Table + TanStack Virtual**: the headless engine and the windowing under `DataTable`, the package's runtime dependencies
129
129
  - **CSS custom properties**: all theming via semantic tokens, no CSS-in-JS
130
130
 
@@ -0,0 +1,119 @@
1
+ /* ============================================
2
+ THE SHELL RECIPE
3
+ The one home of what each app shell mode is
4
+ made of, so every host draws the same three:
5
+ AppLayout and AppSidebar, ChatWidget when it
6
+ is the page, and the site's TemplateShell.
7
+ Each host imports this file, marks its root
8
+ with data-ds-shell (and, for a chat in
9
+ flush, data-ds-shell-backdrop), and reads
10
+ these properties
11
+ instead of restating a token.
12
+
13
+ A mode decides four things: the plane (what
14
+ the page is), the surface (what the content
15
+ sits on), the rail (how the navigation meets
16
+ the plane) and the edge. The edge belongs to
17
+ the mode, never a choice of its own:
18
+
19
+ - flush: no gap and nothing raised. The rail
20
+ sits on the shell plane behind a hairline
21
+ divider; the content is crisp on the app
22
+ surface. A chat seated as a page has one
23
+ lever more, the backdrop: solid, or blur
24
+ (the site chat's takeover: the glass token
25
+ and a 40px blur over whatever lies behind,
26
+ with the rail and the conversation clear
27
+ on it). Blur says the chat rests above
28
+ something, so it is the chat's alone: an
29
+ app layout or a template is always the
30
+ floor of its page and stays solid.
31
+ - floating: the rail is a glass card held off
32
+ the edges by the float gap, hairline and
33
+ floating shadow; the content sits on the
34
+ page.
35
+ - inset: the rail runs flush on the shell
36
+ plane and the content is a raised surface,
37
+ hairline and floating shadow, held off the
38
+ other edges by the inset gap.
39
+
40
+ Declared on the marked root, not on :root, so
41
+ a theme scoped to part of a page reaches it.
42
+ design.md's "App shells" section owns the
43
+ rules these encode.
44
+ ============================================ */
45
+
46
+ :where([data-ds-shell]) {
47
+ /* The two gaps. The inset gap's value lives with AppSidebar's root rule
48
+ (--ds-shell-inset) and the float gap's with the floating rail
49
+ (--ds-sidebar-float-inset); both are read here. */
50
+ --ds-shell-gap: var(--ds-shell-inset, 10px);
51
+ --ds-shell-float-gap: var(--ds-sidebar-float-inset, 20px);
52
+
53
+ /* The raised edge and the glass card, shared by floating and inset. */
54
+ --ds-shell-radius: var(--radius-600);
55
+ --ds-shell-edge-border: var(--color-bg-container-border);
56
+ --ds-shell-edge-shadow: var(--shadow-floating);
57
+ --ds-shell-glass: var(--color-bg-glass);
58
+ --ds-shell-glass-blur: blur(24px);
59
+ }
60
+
61
+ :where([data-ds-shell='flush']) {
62
+ --ds-shell-plane: var(--color-bg-app-shell);
63
+ --ds-shell-surface: var(--color-bg-app-surface);
64
+ --ds-shell-rail-bg: var(--color-bg-app-shell);
65
+ --ds-shell-rail-divider: var(--color-bg-container-border);
66
+ --ds-shell-surface-border: transparent;
67
+ --ds-shell-surface-shadow: none;
68
+ --ds-shell-surface-radius: 0;
69
+ }
70
+
71
+ /* Blur, a chat's alone: the plane is the glass over what lies behind, so
72
+ the rail and the conversation clear their own fills and the divider
73
+ stays. */
74
+ :where([data-ds-shell='flush'][data-ds-shell-backdrop='blur']) {
75
+ --ds-shell-plane: transparent;
76
+ --ds-shell-surface: transparent;
77
+ --ds-shell-rail-bg: transparent;
78
+ --ds-shell-backdrop-fill: var(--color-bg-glass);
79
+ --ds-shell-backdrop-filter: blur(40px);
80
+ }
81
+
82
+ :where([data-ds-shell='floating']) {
83
+ --ds-shell-plane: var(--color-bg-page-primary);
84
+ --ds-shell-surface: var(--color-bg-page-primary);
85
+ --ds-shell-rail-bg: var(--ds-shell-glass);
86
+ --ds-shell-rail-divider: transparent;
87
+ --ds-shell-surface-border: transparent;
88
+ --ds-shell-surface-shadow: none;
89
+ --ds-shell-surface-radius: 0;
90
+ }
91
+
92
+ :where([data-ds-shell='inset']) {
93
+ --ds-shell-plane: var(--color-bg-app-shell);
94
+ --ds-shell-surface: var(--color-bg-app-surface);
95
+ --ds-shell-rail-bg: var(--color-bg-app-shell);
96
+ --ds-shell-rail-divider: transparent;
97
+ --ds-shell-surface-border: var(--ds-shell-edge-border);
98
+ --ds-shell-surface-shadow: var(--ds-shell-edge-shadow);
99
+ --ds-shell-surface-radius: var(--ds-shell-radius);
100
+ }
101
+
102
+ /* The blur backdrop, drawn once for any host: a fixed layer behind the
103
+ host's content rather than a filter on the host itself, which would
104
+ become the containing block of every fixed descendant (AppSidebar, the
105
+ chat's sheets) and carry them off when the page scrolls. */
106
+ :where([data-ds-shell='flush'][data-ds-shell-backdrop='blur']) {
107
+ position: relative;
108
+ isolation: isolate;
109
+ }
110
+
111
+ :where([data-ds-shell='flush'][data-ds-shell-backdrop='blur'])::before {
112
+ content: '';
113
+ position: fixed;
114
+ inset: 0;
115
+ z-index: -1;
116
+ pointer-events: none;
117
+ background-color: var(--ds-shell-backdrop-fill);
118
+ backdrop-filter: var(--ds-shell-backdrop-filter);
119
+ }
@@ -1,31 +1,72 @@
1
- /* The app shell's layout. Every value is a rift-ds token except the
2
- sidebar's own widths (64px collapsed, 280px expanded) and its mobile
3
- menu button (40px), which are the AppSidebar component's geometry. */
1
+ /* The app shell's layout, in one of the three app shell modes (flush,
2
+ floating or inset; AppShell.tsx's SHELL_LAYOUT picks it). Every value is
3
+ a rift-ds token or a property of its shell recipe, except the sidebar's
4
+ own widths (64px collapsed, 280px expanded) and its mobile menu button
5
+ (40px), which are the AppSidebar component's geometry. */
4
6
 
5
7
  .shell {
6
- /* One inset for the floating sidebar and the gap it leaves. */
8
+ /* One inset for the floating sidebar and the gap it leaves, and the
9
+ content's top inset. */
7
10
  --shell-inset: var(--padding-500);
8
11
  --ds-sidebar-float-inset: var(--shell-inset);
12
+ /* The rail's width, which the main column clears. */
13
+ --shell-rail: 64px;
9
14
 
10
15
  display: flex;
11
16
  min-width: 0;
12
17
  min-height: 100dvh;
13
- background-color: var(--color-bg-page-primary);
18
+ /* The plane, from rift-ds's shell recipe: the root's data-ds-shell
19
+ marker (AppShell.tsx's SHELL_LAYOUT) picks the mode, and AppSidebar
20
+ brings the recipe's stylesheet with it. */
21
+ background-color: var(--ds-shell-plane);
14
22
  }
15
23
 
16
- /* The sidebar is fixed, so the main column reserves its width: the rail
17
- plus the inset on either side of it. */
24
+ .shell:has(:global(.ds-app-sidebar--expanded)) {
25
+ --shell-rail: 280px;
26
+ }
27
+
28
+ /* The sidebar is fixed, so the main column reserves its width: the rail,
29
+ plus the float gap either side of it in the floating layout. */
18
30
  .main {
19
31
  flex: 1;
20
32
  min-width: 0;
21
33
  display: flex;
22
34
  justify-content: center;
23
- padding-left: calc(64px + var(--shell-inset) * 2);
24
- transition: padding-left var(--motion-duration-slow) var(--motion-ease-emphasized);
35
+ padding-left: var(--shell-rail);
36
+ transition: padding var(--motion-duration-slow) var(--motion-ease-emphasized);
37
+ }
38
+
39
+ .shell[data-ds-shell='floating'] .main {
40
+ padding-left: calc(var(--shell-rail) + var(--shell-inset) * 2);
41
+ }
42
+
43
+ /* The content's ground: the crisp surface beside the flush rail, the page
44
+ itself when floating, and a raised surface
45
+ held off the edges in the inset layout, scrolling inside itself. */
46
+ .surface {
47
+ display: flex;
48
+ justify-content: center;
49
+ flex: 1;
50
+ min-width: 0;
51
+ background-color: var(--ds-shell-surface);
52
+ }
53
+
54
+ .shell[data-ds-shell='inset'] {
55
+ height: 100dvh;
56
+ min-height: 0;
57
+ }
58
+
59
+ .shell[data-ds-shell='inset'] .main {
60
+ min-height: 0;
61
+ padding: var(--ds-shell-gap);
62
+ padding-left: var(--shell-rail);
25
63
  }
26
64
 
27
- .mainExpanded {
28
- padding-left: calc(280px + var(--shell-inset) * 2);
65
+ .shell[data-ds-shell='inset'] .surface {
66
+ overflow-y: auto;
67
+ border: var(--border-025) solid var(--ds-shell-surface-border);
68
+ border-radius: var(--ds-shell-surface-radius);
69
+ box-shadow: var(--ds-shell-surface-shadow);
29
70
  }
30
71
 
31
72
  .content {
@@ -65,7 +106,7 @@
65
106
  bottom: 0;
66
107
  inset-inline: calc(-1 * var(--padding-400));
67
108
  z-index: -1;
68
- background: linear-gradient(to bottom, var(--color-bg-page-primary) var(--shell-inset), transparent);
109
+ background: linear-gradient(to bottom, var(--ds-shell-surface) var(--shell-inset), transparent);
69
110
  pointer-events: none;
70
111
  opacity: 0;
71
112
  transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
@@ -172,9 +213,22 @@
172
213
  --shell-inset: var(--padding-400);
173
214
  }
174
215
 
175
- .main,
176
- .mainExpanded {
177
- padding-left: 0;
216
+ .shell .main,
217
+ .shell[data-ds-shell] .main {
218
+ padding: 0;
219
+ }
220
+
221
+ /* The inset surface gives way: the page scrolls, edge to edge. */
222
+ .shell[data-ds-shell='inset'] {
223
+ height: auto;
224
+ min-height: 100dvh;
225
+ }
226
+
227
+ .shell[data-ds-shell='inset'] .surface {
228
+ overflow: visible;
229
+ border: none;
230
+ border-radius: 0;
231
+ box-shadow: none;
178
232
  }
179
233
 
180
234
  .content {
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  /**
4
- * The app shell every rift-ds block page sits in: the floating sidebar, a
5
- * top bar (search, the AI entry and the colour mode), a page header
4
+ * The app shell every rift-ds block page sits in: the sidebar in one of
5
+ * rift-ds's three app shell modes (SHELL_LAYOUT below), a top bar (search, the AI entry and the colour mode), a page header
6
6
  * (breadcrumb, title, actions) and the content column, with the spacing
7
7
  * set. This file is yours: rename the product, change the navigation, and
8
8
  * grow it with your app.
@@ -11,7 +11,7 @@
11
11
  * it: bare while the page is at the top, then a fill above it and the
12
12
  * library's ProgressiveBlur behind it fade in once the page scrolls.
13
13
  *
14
- * Responsive by construction: above 768px the sidebar floats beside the
14
+ * Responsive by construction: above 768px the sidebar sits beside the
15
15
  * page and the content moves over by its width; below it the sidebar
16
16
  * becomes a drawer behind its own menu button, the search field folds to
17
17
  * its icon, and the content runs edge to edge at a tighter gutter.
@@ -21,6 +21,7 @@ import { useEffect, useRef, useState, type ReactNode } from 'react';
21
21
  import { AiButton } from 'rift-ds/components/AiButton/AiButton';
22
22
  import {
23
23
  AppSidebar,
24
+ type AppSidebarLayout,
24
25
  type AppSidebarProfile,
25
26
  type AppSidebarSection,
26
27
  } from 'rift-ds/components/AppSidebar/AppSidebar';
@@ -30,6 +31,15 @@ import { ProgressiveBlur } from 'rift-ds/components/ProgressiveBlur/ProgressiveB
30
31
  import { ThemeToggle } from 'rift-ds/components/ThemeToggle/ThemeToggle';
31
32
  import styles from './AppShell.module.css';
32
33
 
34
+ /**
35
+ * How the sidebar and the content meet the page, one of the three app shell
36
+ * modes: `flush` runs the sidebar edge to edge on the shell colour behind a
37
+ * hairline, the content crisp beside it; `floating` lifts the sidebar into a
38
+ * glass card off the edges; `inset` runs it flush and sets the content in a
39
+ * raised surface held off the other edges, scrolling inside itself.
40
+ */
41
+ const SHELL_LAYOUT: AppSidebarLayout = 'floating';
42
+
33
43
  /** The product's name, shown beside the logo in the sidebar. */
34
44
  const PRODUCT_NAME = 'Acme';
35
45
 
@@ -87,7 +97,10 @@ export function AppShell({ activeKey, breadcrumb, title, actions, children }: Ap
87
97
  }, []);
88
98
 
89
99
  return (
90
- <div className={styles.shell}>
100
+ <div
101
+ className={styles.shell}
102
+ data-ds-shell={SHELL_LAYOUT}
103
+ >
91
104
  <AppSidebar
92
105
  sections={NAV_SECTIONS}
93
106
  profile={PROFILE}
@@ -95,36 +108,38 @@ export function AppShell({ activeKey, breadcrumb, title, actions, children }: Ap
95
108
  expanded={expanded}
96
109
  onExpandedChange={setExpanded}
97
110
  logoText={PRODUCT_NAME}
98
- layout="floating"
111
+ layout={SHELL_LAYOUT}
99
112
  />
100
113
 
101
- <div className={`${styles.main} ${expanded ? styles.mainExpanded : ''}`}>
102
- <div className={styles.content}>
103
- <div ref={markerRef} className={styles.topBarMarker} aria-hidden="true" />
104
- <header className={styles.topBar} data-stuck={stuck ? '' : undefined}>
105
- <ProgressiveBlur className={styles.topBarBlur} tinted={stuck} />
106
- {/* Wire both to your command palette: CommandPalette from
107
- rift-ds, opened from here and from Cmd+K. */}
108
- <CommandPaletteTrigger className={styles.search} />
109
- <div className={styles.topBarActions}>
110
- <CommandPaletteTrigger iconOnly className={styles.searchIcon} />
111
- {/* The AI entry. Point it at your chat: `npx rift-ds init chat`
112
- scaffolds one, and ChatLauncher opens it. */}
113
- <AiButton />
114
- <ThemeToggle showLabels={false} />
115
- </div>
116
- </header>
114
+ <div className={styles.main}>
115
+ <div className={styles.surface}>
116
+ <div className={styles.content}>
117
+ <div ref={markerRef} className={styles.topBarMarker} aria-hidden="true" />
118
+ <header className={styles.topBar} data-stuck={stuck ? '' : undefined}>
119
+ <ProgressiveBlur className={styles.topBarBlur} tinted={stuck} />
120
+ {/* Wire both to your command palette: CommandPalette from
121
+ rift-ds, opened from here and from Cmd+K. */}
122
+ <CommandPaletteTrigger className={styles.search} />
123
+ <div className={styles.topBarActions}>
124
+ <CommandPaletteTrigger iconOnly className={styles.searchIcon} />
125
+ {/* The AI entry. Point it at your chat: `npx rift-ds init chat`
126
+ scaffolds one, and ChatLauncher opens it. */}
127
+ <AiButton />
128
+ <ThemeToggle showLabels={false} />
129
+ </div>
130
+ </header>
117
131
 
118
- <main className={styles.page}>
119
- <div className={styles.pageHead}>
120
- <div className={styles.pageHeadText}>
121
- {breadcrumb && <Breadcrumb items={breadcrumb} />}
122
- <h1 className={styles.title}>{title}</h1>
132
+ <main className={styles.page}>
133
+ <div className={styles.pageHead}>
134
+ <div className={styles.pageHeadText}>
135
+ {breadcrumb && <Breadcrumb items={breadcrumb} />}
136
+ <h1 className={styles.title}>{title}</h1>
137
+ </div>
138
+ {actions && <div className={styles.pageActions}>{actions}</div>}
123
139
  </div>
124
- {actions && <div className={styles.pageActions}>{actions}</div>}
125
- </div>
126
- {children}
127
- </main>
140
+ {children}
141
+ </main>
142
+ </div>
128
143
  </div>
129
144
  </div>
130
145
  </div>
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "name": "app-shell",
6
6
  "label": "App shell",
7
- "description": "The floating sidebar, a top bar with search, the AI entry and the colour mode, a page header, and an empty page with the spacing set.",
7
+ "description": "A sidebar in your pick of the three shell modes, a top bar with search, AI and colour mode, a page header, and an empty page with the spacing set.",
8
8
  "route": "/starter",
9
9
  "files": [
10
10
  "components/blocks/AppShell.tsx",
@@ -19,13 +19,13 @@
19
19
  margin-top: var(--gap-400);
20
20
  }
21
21
 
22
+ /* The rails' one group heading (design.md's App shells): paragraph small
23
+ in the tertiary text, mixed case, as the history rail beside it. */
22
24
  .ds-chat-agent-pane__heading {
23
- font-family: var(--font-overline-family);
24
- font-size: var(--font-overline-size);
25
- font-weight: var(--font-overline-weight);
26
- line-height: var(--font-overline-line-height);
27
- letter-spacing: var(--font-overline-letter-spacing);
28
- text-transform: uppercase;
25
+ font-family: var(--font-paragraph-sm-family);
26
+ font-size: var(--font-paragraph-sm-size);
27
+ font-weight: var(--font-paragraph-sm-weight);
28
+ line-height: var(--font-paragraph-sm-line-height);
29
29
  color: var(--color-text-tertiary);
30
30
  padding: var(--padding-100) var(--padding-200);
31
31
  margin: 0;
@@ -47,9 +47,9 @@ export interface ChatLauncherProps {
47
47
  /**
48
48
  * How the docked panel sits on the page. `raised` (the default) is a glass
49
49
  * card with the floating shadow, inset by `--ds-chat-inset`. `inset` is
50
- * flat: the app surface colour, no shadow, border or blur, and the
51
- * `--ds-shell-inset` gap, so it matches AppLayout's `inset` content
52
- * surface beside it. The overlay below the dock threshold takes the same
50
+ * AppLayout's `inset` content surface beside it, solid on the app surface
51
+ * colour with the same raised edge (the hairline and the floating
52
+ * shadow), no blur, and the `--ds-shell-inset` gap. The overlay below the dock threshold takes the same
53
53
  * gap but keeps its shadow, since it still covers the page; the floating
54
54
  * card and the takeover keep their own look.
55
55
  */