rift-ds 1.38.0 → 1.40.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.
- package/README.md +3 -3
- package/behaviors/shortcuts.js +2 -2
- package/behaviors/top-layer.css +28 -0
- package/behaviors/useAnchoredPosition.d.ts +12 -9
- package/behaviors/useAnchoredPosition.js +3 -0
- package/behaviors/useFoldedSections.d.ts +17 -0
- package/behaviors/useFoldedSections.js +23 -0
- package/behaviors/useLayer.d.ts +9 -0
- package/behaviors/useLayer.js +4 -3
- package/bin/rift-ds.mjs +3 -0
- package/bin/templates/blocks/app/notifications/Inbox.tsx +163 -0
- package/bin/templates/blocks/app/notifications/page.module.css +63 -0
- package/bin/templates/blocks/app/notifications/page.tsx +13 -0
- package/bin/templates/blocks/app/settings/Settings.tsx +483 -0
- package/bin/templates/blocks/app/settings/page.module.css +160 -6
- package/bin/templates/blocks/app/settings/page.tsx +10 -78
- package/bin/templates/blocks/components/blocks/AppShell.module.css +16 -244
- package/bin/templates/blocks/components/blocks/AppShell.tsx +274 -84
- package/bin/templates/blocks/registry.json +16 -3
- package/chat/ChatThreads.d.ts +63 -19
- package/chat/ChatThreads.js +119 -32
- package/chat/ChatWidget.css +15 -3
- package/chat/ChatWidget.d.ts +16 -17
- package/chat/ChatWidget.js +40 -7
- package/chat/DemoWelcome.d.ts +7 -0
- package/chat/DemoWelcome.js +19 -0
- package/chat/demo-fixtures.d.ts +1 -1
- package/chat/demo-fixtures.js +1 -0
- package/chat/rail-seat.d.ts +25 -0
- package/chat/rail-seat.js +8 -0
- package/chat/registry.json.d.ts +4 -1
- package/chat/registry.json.js +1 -1
- package/components/AppLayout/AppLayout.css +64 -0
- package/components/AppLayout/AppLayout.d.ts +21 -1
- package/components/AppLayout/AppLayout.js +9 -2
- package/components/AppSidebar/AppSidebar.css +378 -16
- package/components/AppSidebar/AppSidebar.d.ts +92 -4
- package/components/AppSidebar/AppSidebar.js +321 -155
- package/components/AppToolbar/AppToolbar.css +143 -0
- package/components/AppToolbar/AppToolbar.d.ts +124 -0
- package/components/AppToolbar/AppToolbar.js +119 -0
- package/components/ColourSwatch/ColourSwatch.css +49 -0
- package/components/ColourSwatch/ColourSwatch.d.ts +9 -1
- package/components/ColourSwatch/ColourSwatch.js +12 -1
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +13 -0
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.d.ts +7 -0
- package/components/CommandPaletteTrigger/CommandPaletteTrigger.js +2 -0
- package/components/Composer/Composer.css +20 -0
- package/components/Composer/Composer.d.ts +8 -0
- package/components/Composer/Composer.js +2 -0
- package/components/DrillMenu/DrillMenu.css +7 -0
- package/components/DrillMenu/DrillMenu.d.ts +6 -0
- package/components/DrillMenu/DrillMenu.js +2 -1
- package/components/NotificationCenter/NotificationCenter.css +145 -99
- package/components/NotificationCenter/NotificationCenter.d.ts +58 -4
- package/components/NotificationCenter/NotificationCenter.js +71 -63
- package/components/PaymentCard/PaymentCard.css +182 -0
- package/components/PaymentCard/PaymentCard.d.ts +80 -0
- package/components/PaymentCard/PaymentCard.js +80 -0
- package/components/PromptSuggestions/PromptSuggestions.css +180 -11
- package/components/PromptSuggestions/PromptSuggestions.d.ts +24 -3
- package/components/PromptSuggestions/PromptSuggestions.js +35 -9
- package/components/RadioButton/RadioButton.d.ts +2 -1
- package/components/RadioButton/RadioButton.js +1 -0
- package/components/ShaderScene/scenes.js +6 -5
- package/components/Stat/Stat.css +19 -19
- package/components/SubNavPanel/SubNavPanel.css +21 -0
- package/components/SubNavPanel/SubNavPanel.js +19 -2
- package/components/ThreadHistory/ThreadHistory.css +519 -0
- package/components/ThreadHistory/ThreadHistory.d.ts +90 -0
- package/components/ThreadHistory/ThreadHistory.js +344 -0
- package/components/ThreadPanel/ThreadPanel.css +90 -306
- package/components/ThreadPanel/ThreadPanel.d.ts +16 -0
- package/components/ThreadPanel/ThreadPanel.js +67 -241
- package/components/registry.json +57 -7
- package/components/registry.json.d.ts +57 -7
- package/components/registry.json.js +1 -1
- package/index.d.ts +3 -0
- package/index.js +6 -0
- package/package.json +1 -1
- package/tokens/presets/contrast.css +36 -19
- package/tokens/presets/coral.css +2 -0
- package/tokens/presets/forest.css +8 -0
- package/tokens/presets/pink.css +2 -0
- package/tokens/presets/violet.css +51 -21
- package/tokens/presets/zest.css +4 -0
- package/tokens/values.json.js +1 -1
- package/bin/templates/blocks/app/settings/ProfileForm.tsx +0 -98
|
@@ -1,84 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The settings block: the app shell
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* this server page.
|
|
2
|
+
* The settings block: a standard page in the app shell, one section at a
|
|
3
|
+
* time. The sections open from the Settings row in the sidebar's side panel
|
|
4
|
+
* (SETTINGS_SECTIONS in components/blocks/AppShell.tsx), and the page shows
|
|
5
|
+
* the open one as rows across the content column: what a setting is and
|
|
6
|
+
* why it matters, then its value and an Edit. Edit turns the row into its
|
|
7
|
+
* field with Save and Cancel; a switch saves as it flips. The values are
|
|
8
|
+
* placeholders (Settings.tsx beside this page holds them); read and write
|
|
9
|
+
* your own.
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
|
-
import {
|
|
14
|
-
import { Dropdown } from 'rift-ds/components/Dropdown/Dropdown';
|
|
15
|
-
import { FormSection } from 'rift-ds/components/FormSection/FormSection';
|
|
16
|
-
import { ToggleSwitch } from 'rift-ds/components/ToggleSwitch/ToggleSwitch';
|
|
17
|
-
import { AppShell } from '../../components/blocks/AppShell';
|
|
18
|
-
import { ProfileForm } from './ProfileForm';
|
|
19
|
-
import styles from './page.module.css';
|
|
12
|
+
import { Settings } from './Settings';
|
|
20
13
|
|
|
21
14
|
export default function SettingsPage() {
|
|
22
|
-
return
|
|
23
|
-
<AppShell
|
|
24
|
-
activeKey="settings"
|
|
25
|
-
breadcrumb={[{ label: 'Workspace', href: '#' }, { label: 'Settings' }]}
|
|
26
|
-
title="Settings"
|
|
27
|
-
>
|
|
28
|
-
<div className={styles.column}>
|
|
29
|
-
<ProfileForm />
|
|
30
|
-
|
|
31
|
-
<FormSection
|
|
32
|
-
layout="aside"
|
|
33
|
-
divider
|
|
34
|
-
title="Notifications"
|
|
35
|
-
description="What we email you about. Changes apply from the next message."
|
|
36
|
-
actions={<Button label="Save notifications" />}
|
|
37
|
-
>
|
|
38
|
-
<ToggleSwitch label="A weekly summary" defaultChecked />
|
|
39
|
-
<ToggleSwitch label="When someone mentions you" defaultChecked />
|
|
40
|
-
<ToggleSwitch label="Product news" />
|
|
41
|
-
</FormSection>
|
|
42
|
-
|
|
43
|
-
<FormSection
|
|
44
|
-
layout="aside"
|
|
45
|
-
divider
|
|
46
|
-
columns={2}
|
|
47
|
-
title="Region"
|
|
48
|
-
description="How dates, times and numbers are written for you."
|
|
49
|
-
actions={<Button label="Save region" />}
|
|
50
|
-
>
|
|
51
|
-
<Dropdown
|
|
52
|
-
label="Language"
|
|
53
|
-
defaultValue="en"
|
|
54
|
-
options={[
|
|
55
|
-
{ value: 'en', label: 'English' },
|
|
56
|
-
{ value: 'de', label: 'Deutsch' },
|
|
57
|
-
{ value: 'fr', label: 'Français' },
|
|
58
|
-
]}
|
|
59
|
-
/>
|
|
60
|
-
<Dropdown
|
|
61
|
-
label="Time zone"
|
|
62
|
-
defaultValue="utc"
|
|
63
|
-
options={[
|
|
64
|
-
{ value: 'utc', label: 'UTC' },
|
|
65
|
-
{ value: 'cet', label: 'Central European' },
|
|
66
|
-
{ value: 'pt', label: 'Pacific' },
|
|
67
|
-
]}
|
|
68
|
-
/>
|
|
69
|
-
</FormSection>
|
|
70
|
-
|
|
71
|
-
<FormSection
|
|
72
|
-
layout="aside"
|
|
73
|
-
divider
|
|
74
|
-
title="Delete workspace"
|
|
75
|
-
description="Removes the workspace and everything in it. This cannot be undone."
|
|
76
|
-
>
|
|
77
|
-
<div>
|
|
78
|
-
<Button label="Delete workspace" variant="secondary" tone="destructive" />
|
|
79
|
-
</div>
|
|
80
|
-
</FormSection>
|
|
81
|
-
</div>
|
|
82
|
-
</AppShell>
|
|
83
|
-
);
|
|
15
|
+
return <Settings />;
|
|
84
16
|
}
|
|
@@ -1,251 +1,23 @@
|
|
|
1
|
-
/* The app shell's
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(40px), which are the AppSidebar component's geometry. */
|
|
1
|
+
/* The app shell's one setting of its own: the contained widths. AppLayout
|
|
2
|
+
draws everything else (the sidebar's room, the inset surface, the pinned
|
|
3
|
+
toolbar, the phone drawer) from rift-ds's shell recipe, so nothing here
|
|
4
|
+
restates it. Its own contained width is an app's working column, 1120px;
|
|
5
|
+
the blocks run at 1440px, or 960px when narrow, as the templates do. */
|
|
7
6
|
|
|
8
7
|
.shell {
|
|
9
|
-
|
|
10
|
-
content's top inset. */
|
|
11
|
-
--shell-inset: var(--padding-500);
|
|
12
|
-
--ds-sidebar-float-inset: var(--shell-inset);
|
|
13
|
-
/* The rail's width, which the main column clears. */
|
|
14
|
-
--shell-rail: 64px;
|
|
15
|
-
/* The content's side gutter, which the top bar's fill and blur reach
|
|
16
|
-
across too, so nothing scrolls past them at the surface's corners. */
|
|
17
|
-
--shell-gutter: var(--padding-1000);
|
|
18
|
-
|
|
19
|
-
display: flex;
|
|
20
|
-
min-width: 0;
|
|
21
|
-
min-height: 100dvh;
|
|
22
|
-
/* The plane, from rift-ds's shell recipe: the root's data-ds-shell
|
|
23
|
-
marker (AppShell.tsx's SHELL_LAYOUT) picks the mode, and AppSidebar
|
|
24
|
-
brings the recipe's stylesheet with it. */
|
|
25
|
-
background-color: var(--ds-shell-plane);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.shell:has(:global(.ds-app-sidebar--panel-mode:not(.ds-app-sidebar--expanded))) {
|
|
29
|
-
--shell-rail: 80px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.shell:has(:global(.ds-app-sidebar--expanded)) {
|
|
33
|
-
--shell-rail: 280px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* The sidebar is fixed, so the main column reserves its width: the rail,
|
|
37
|
-
plus the float gap either side of it in the floating layout. */
|
|
38
|
-
.main {
|
|
39
|
-
flex: 1;
|
|
40
|
-
min-width: 0;
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
padding-left: var(--shell-rail);
|
|
44
|
-
transition: padding var(--motion-duration-slow) var(--motion-ease-emphasized);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.shell[data-ds-shell='floating'] .main {
|
|
48
|
-
padding-left: calc(var(--shell-rail) + var(--shell-inset) * 2);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* The content's ground: the crisp surface beside the flush rail, the page
|
|
52
|
-
itself when floating, and a raised surface
|
|
53
|
-
held off the edges in the inset layout, scrolling inside itself. */
|
|
54
|
-
.surface {
|
|
55
|
-
display: flex;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
flex: 1;
|
|
58
|
-
min-width: 0;
|
|
59
|
-
background-color: var(--ds-shell-surface);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.shell[data-ds-shell='inset'] {
|
|
63
|
-
height: 100dvh;
|
|
64
|
-
min-height: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.shell[data-ds-shell='inset'] .main {
|
|
68
|
-
min-height: 0;
|
|
69
|
-
padding: var(--ds-shell-gap);
|
|
70
|
-
padding-left: var(--shell-rail);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.shell[data-ds-shell='inset'] .surface {
|
|
74
|
-
overflow-y: auto;
|
|
75
|
-
border: var(--border-025) solid var(--ds-shell-surface-border);
|
|
76
|
-
border-radius: var(--ds-shell-surface-radius);
|
|
77
|
-
box-shadow: var(--ds-shell-surface-shadow);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.content {
|
|
81
|
-
position: relative;
|
|
82
|
-
width: 100%;
|
|
83
|
-
/* The shell recipe's width axis (CONTENT_WIDTH in AppShell.tsx): 1440px
|
|
84
|
-
contained, or the whole column when full, in any mode. */
|
|
85
|
-
max-width: var(--ds-shell-content-max, var(--ds-shell-contained-width));
|
|
86
|
-
min-width: 0;
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
gap: var(--gap-500);
|
|
90
|
-
padding: var(--shell-inset) var(--shell-gutter) var(--padding-1500);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* ---------------------------------------------------------- top bar */
|
|
94
|
-
|
|
95
|
-
/* The bar holds one inset off the top of the page and the content runs
|
|
96
|
-
under it. Once the page scrolls (data-stuck), the page colour fills the
|
|
97
|
-
strip above it, fading out across the bar, and the blur behind it
|
|
98
|
-
dissolves a few rows below. */
|
|
99
|
-
.topBar {
|
|
100
|
-
position: sticky;
|
|
101
|
-
top: var(--shell-inset);
|
|
102
|
-
z-index: var(--layer-sticky);
|
|
103
|
-
display: flex;
|
|
104
|
-
align-items: center;
|
|
105
|
-
justify-content: space-between;
|
|
106
|
-
gap: var(--gap-200);
|
|
107
|
-
min-height: var(--control-height-default);
|
|
108
|
-
/* Room between the bar and the page header under it. */
|
|
109
|
-
margin-bottom: var(--gap-400);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.topBar::before {
|
|
113
|
-
content: '';
|
|
114
|
-
position: absolute;
|
|
115
|
-
top: calc(-1 * var(--shell-inset));
|
|
116
|
-
bottom: 0;
|
|
117
|
-
inset-inline: calc(-1 * var(--shell-gutter));
|
|
118
|
-
z-index: -1;
|
|
119
|
-
background: linear-gradient(to bottom, var(--ds-shell-surface) var(--shell-inset), transparent);
|
|
120
|
-
pointer-events: none;
|
|
121
|
-
opacity: 0;
|
|
122
|
-
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.topBar[data-stuck]::before {
|
|
126
|
-
opacity: 1;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.topBarBlur:global(.ds-progressive-blur) {
|
|
130
|
-
position: absolute;
|
|
131
|
-
top: calc(-1 * var(--shell-inset));
|
|
132
|
-
bottom: calc(-1 * var(--gap-1000));
|
|
133
|
-
inset-inline: calc(-1 * var(--shell-gutter));
|
|
134
|
-
height: auto;
|
|
135
|
-
z-index: -1;
|
|
136
|
-
opacity: 0;
|
|
137
|
-
transition: opacity var(--motion-duration-base) var(--motion-ease-standard);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.topBarBlur:global(.ds-progressive-blur--tinted) {
|
|
141
|
-
opacity: 1;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* A one-pixel marker at the bar's resting place. Absolute, so the
|
|
145
|
-
column's gap skips it; it keeps its static place at the column's top. */
|
|
146
|
-
.topBarMarker {
|
|
147
|
-
position: absolute;
|
|
148
|
-
width: 1px;
|
|
149
|
-
height: 1px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.search {
|
|
153
|
-
width: 320px;
|
|
154
|
-
max-width: 100%;
|
|
8
|
+
--ds-shell-contained-width: 1440px; /* the blocks' content column */
|
|
155
9
|
}
|
|
156
10
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
.aiIcon {
|
|
160
|
-
display: none;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/* An icon-only control wears a tooltip, which wraps it: the wrapper leaves
|
|
164
|
-
the row with the control, or it would hold a gap open. */
|
|
165
|
-
.topBarActions :global(.ds-tooltip):has(> .searchIcon),
|
|
166
|
-
.topBarActions :global(.ds-tooltip):has(> .aiIcon) {
|
|
167
|
-
display: none;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.topBarActions {
|
|
171
|
-
display: flex;
|
|
172
|
-
align-items: center;
|
|
173
|
-
gap: var(--gap-200);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/* ------------------------------------------------------- page header */
|
|
177
|
-
|
|
178
|
-
.page {
|
|
179
|
-
display: flex;
|
|
180
|
-
flex-direction: column;
|
|
181
|
-
gap: var(--gap-500);
|
|
182
|
-
min-width: 0;
|
|
11
|
+
.shell[data-width='narrow'] {
|
|
12
|
+
--ds-shell-contained-width: 960px; /* a slim centred column */
|
|
183
13
|
}
|
|
184
14
|
|
|
185
|
-
/*
|
|
186
|
-
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
/* Laptop: a tighter side gutter. */
|
|
194
|
-
@media (max-width: 1279px) {
|
|
195
|
-
.shell {
|
|
196
|
-
--shell-gutter: var(--padding-500);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* Phone and small tablet: the sidebar leaves the layout for a drawer,
|
|
201
|
-
opened by its menu button fixed at the top left. */
|
|
202
|
-
@media (max-width: 768px) {
|
|
203
|
-
.shell {
|
|
204
|
-
--shell-inset: var(--padding-400);
|
|
205
|
-
--shell-gutter: var(--shell-inset);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.shell .main,
|
|
209
|
-
.shell[data-ds-shell] .main {
|
|
210
|
-
padding: 0;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* The inset surface gives way: the page scrolls, edge to edge. */
|
|
214
|
-
.shell[data-ds-shell='inset'] {
|
|
215
|
-
height: auto;
|
|
216
|
-
min-height: 100dvh;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.shell[data-ds-shell='inset'] .surface {
|
|
220
|
-
overflow: visible;
|
|
221
|
-
border: none;
|
|
222
|
-
border-radius: 0;
|
|
223
|
-
box-shadow: none;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.content {
|
|
227
|
-
padding: var(--shell-inset) var(--shell-gutter) var(--padding-1000);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/* Clear the menu button (40px) at the bar's left end. */
|
|
231
|
-
.topBar {
|
|
232
|
-
padding-left: calc(40px + var(--gap-200));
|
|
233
|
-
justify-content: flex-end;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.search,
|
|
237
|
-
.ai {
|
|
238
|
-
display: none;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.searchIcon,
|
|
242
|
-
.aiIcon,
|
|
243
|
-
.topBarActions :global(.ds-tooltip):has(> .searchIcon),
|
|
244
|
-
.topBarActions :global(.ds-tooltip):has(> .aiIcon) {
|
|
245
|
-
display: inline-flex;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.pageHead {
|
|
249
|
-
padding-top: 0;
|
|
250
|
-
}
|
|
15
|
+
/* A theme's swatch in the Appearance rows: its action colour in a dot the
|
|
16
|
+
size of the icons beside it. */
|
|
17
|
+
.swatch {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
width: var(--icon-size-500);
|
|
20
|
+
height: var(--icon-size-500);
|
|
21
|
+
border-radius: var(--radius-pill);
|
|
22
|
+
border: var(--border-025) solid var(--color-bg-container-border);
|
|
251
23
|
}
|