rift-ds 1.40.0 → 1.42.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 +6 -2
- package/behaviors/LoadingImage.d.ts +2 -0
- package/behaviors/LoadingImage.js +34 -0
- package/behaviors/ScrollRegion.js +15 -2
- package/behaviors/VisuallyHidden.d.ts +30 -0
- package/behaviors/VisuallyHidden.js +17 -0
- package/behaviors/loading-image.css +30 -0
- package/behaviors/quietFocus.d.ts +4 -0
- package/behaviors/quietFocus.js +14 -0
- package/behaviors/shell.css +9 -11
- package/behaviors/useFocusScope.d.ts +3 -1
- package/behaviors/useFocusScope.js +4 -6
- package/bin/rift-ds.mjs +1 -0
- package/bin/templates/app/components/rift/ColorModeScript.tsx +3 -1
- package/bin/templates/app/components/rift/RiftRoot.tsx +40 -1
- package/bin/templates/blocks/app/dashboard/page.tsx +7 -5
- package/bin/templates/blocks/app/landing/page.tsx +1 -1
- package/bin/templates/blocks/app/pricing/page.module.css +15 -1
- package/bin/templates/blocks/app/pricing/page.tsx +8 -1
- package/bin/templates/blocks/app/sign-in/page.tsx +10 -2
- package/bin/templates/blocks/app/sign-up/page.module.css +83 -0
- package/bin/templates/blocks/app/sign-up/page.tsx +126 -0
- package/bin/templates/blocks/app/starter/page.tsx +1 -1
- package/bin/templates/blocks/components/blocks/AppShell.module.css +0 -10
- package/bin/templates/blocks/components/blocks/AppShell.tsx +41 -116
- package/bin/templates/blocks/components/blocks/DocsShell.tsx +5 -1
- package/bin/templates/blocks/registry.json +44 -6
- package/chat/ChatLauncher.d.ts +2 -2
- package/chat/ChatWidget.css +7 -7
- package/chat/ChatWidget.d.ts +1 -1
- package/components/AgentPlan/AgentPlan.css +1 -1
- package/components/AlertDialog/AlertDialog.css +14 -0
- package/components/AlertDialog/AlertDialog.d.ts +35 -3
- package/components/AlertDialog/AlertDialog.js +16 -5
- package/components/AppLayout/AppLayout.css +1 -1
- package/components/AppLayout/AppLayout.d.ts +2 -2
- package/components/AppSidebar/AppSidebar.css +25 -17
- package/components/AppSidebar/AppSidebar.d.ts +4 -4
- package/components/AppSidebar/AppSidebar.js +14 -5
- package/components/Attachment/AttachmentGroup.js +2 -1
- package/components/Attachment/AttachmentTile.js +2 -1
- package/components/Avatar/Avatar.css +18 -5
- package/components/Avatar/Avatar.d.ts +2 -0
- package/components/Avatar/Avatar.js +2 -1
- package/components/AvatarGroup/AvatarGroup.css +8 -1
- package/components/AvatarGroup/AvatarGroup.d.ts +6 -0
- package/components/AvatarGroup/AvatarGroup.js +2 -2
- package/components/Badge/Badge.css +6 -0
- package/components/Breadcrumb/Breadcrumb.css +4 -1
- package/components/Button/Button.css +20 -1
- package/components/Button/Button.js +6 -1
- package/components/Card/Card.css +11 -0
- package/components/Card/Card.d.ts +9 -3
- package/components/Card/Card.js +21 -2
- package/components/Chart/AreaChart.d.ts +7 -0
- package/components/Chart/AreaChart.js +51 -45
- package/components/Chart/BarChart.d.ts +7 -0
- package/components/Chart/BarChart.js +52 -46
- package/components/Chart/Chart.css +122 -1
- package/components/Chart/ChartSkeleton.d.ts +32 -0
- package/components/Chart/ChartSkeleton.js +149 -0
- package/components/Chart/ComboChart.d.ts +7 -0
- package/components/Chart/ComboChart.js +80 -74
- package/components/Chart/LineChart.d.ts +17 -3
- package/components/Chart/LineChart.js +61 -39
- package/components/Chart/PieChart.d.ts +7 -0
- package/components/Chart/PieChart.js +41 -34
- package/components/Chart/RadarChart.d.ts +7 -0
- package/components/Chart/RadarChart.js +38 -32
- package/components/Chart/RadialChart.d.ts +7 -0
- package/components/Chart/RadialChart.js +5 -1
- package/components/Chart/ScatterChart.d.ts +7 -0
- package/components/Chart/ScatterChart.js +46 -40
- package/components/Chart/StackedBarChart.d.ts +10 -1
- package/components/Chart/StackedBarChart.js +51 -43
- package/components/Chart/Treemap.d.ts +7 -0
- package/components/Chart/Treemap.js +17 -11
- package/components/Checkbox/Checkbox.css +25 -1
- package/components/Checkbox/Checkbox.d.ts +8 -4
- package/components/Checkbox/Checkbox.js +17 -8
- package/components/Chip/Chip.css +5 -3
- package/components/ContactCard/ContactCard.css +4 -3
- package/components/ContributionGraph/ContributionGraph.css +20 -0
- package/components/ContributionGraph/ContributionGraph.d.ts +4 -0
- package/components/ContributionGraph/ContributionGraph.js +11 -6
- package/components/DataTable/DataTable.css +91 -4
- package/components/DataTable/DataTable.d.ts +42 -4
- package/components/DataTable/DataTable.js +121 -90
- package/components/DateInput/DateInput.css +3 -1
- package/components/DatePicker/DatePicker.css +16 -0
- package/components/DatePicker/DatePicker.d.ts +13 -0
- package/components/DatePicker/DatePicker.js +21 -27
- package/components/DatePicker/MonthGrid.d.ts +2 -2
- package/components/DatePicker/MonthGrid.js +1 -1
- package/components/DatePicker/today.d.ts +15 -0
- package/components/DatePicker/today.js +17 -0
- package/components/DateRangePicker/DateRangePicker.d.ts +14 -1
- package/components/DateRangePicker/DateRangePicker.js +18 -7
- package/components/DescriptionList/DescriptionList.css +11 -0
- package/components/DescriptionList/DescriptionList.d.ts +5 -1
- package/components/DescriptionList/DescriptionList.js +21 -6
- package/components/Dialog/Dialog.css +9 -0
- package/components/Dialog/Dialog.d.ts +9 -0
- package/components/Dialog/Dialog.js +32 -19
- package/components/DocumentChip/DocumentChip.css +1 -1
- package/components/Drawer/Drawer.d.ts +9 -0
- package/components/Drawer/Drawer.js +8 -0
- package/components/DrillMenu/DrillMenu.d.ts +2 -1
- package/components/DrillMenu/DrillMenu.js +14 -3
- package/components/Dropdown/Dropdown.css +3 -1
- package/components/EmptyState/EmptyState.css +8 -1
- package/components/EntitySwitcher/EntitySwitcher.css +2 -1
- package/components/Field/Field.css +2 -2
- package/components/FileInput/FileInput.css +1 -1
- package/components/FilterBar/FilterBar.d.ts +6 -1
- package/components/FunnelChart/FunnelChart.d.ts +7 -0
- package/components/FunnelChart/FunnelChart.js +44 -30
- package/components/GanttChart/GanttChart.css +10 -0
- package/components/GanttChart/GanttChart.d.ts +4 -0
- package/components/GanttChart/GanttChart.js +66 -33
- package/components/Gauge/Gauge.css +23 -0
- package/components/Gauge/Gauge.d.ts +4 -0
- package/components/Gauge/Gauge.js +14 -8
- package/components/Icon/Icon.css +6 -1
- package/components/Icon/Icon.d.ts +3 -1
- package/components/Icon/Icon.js +2 -0
- package/components/ImageCompare/ImageCompare.js +2 -1
- package/components/Input/Input.css +3 -1
- package/components/List/List.css +1 -1
- package/components/NotificationCenter/NotificationCenter.css +16 -0
- package/components/NotificationCenter/NotificationCenter.d.ts +4 -0
- package/components/NotificationCenter/NotificationCenter.js +23 -1
- package/components/NumberInput/NumberInput.css +2 -0
- package/components/PageHeader/PageHeader.css +12 -4
- package/components/Panel/Panel.d.ts +1 -1
- package/components/PixelAvatar/PixelAvatar.css +7 -1
- package/components/PixelAvatar/PixelAvatar.d.ts +2 -0
- package/components/PixelAvatar/PixelAvatar.js +2 -1
- package/components/Prose/Prose.css +1 -1
- package/components/RadioButton/RadioButton.css +1 -1
- package/components/RadioButton/RadioButton.d.ts +4 -2
- package/components/RadioButton/RadioButton.js +5 -2
- package/components/ResourceTimeline/ResourceTimeline.css +12 -0
- package/components/ResourceTimeline/ResourceTimeline.d.ts +5 -1
- package/components/ResourceTimeline/ResourceTimeline.js +94 -52
- package/components/RichDropdown/RichDropdown.css +3 -1
- package/components/SelectionCard/SelectionCard.css +29 -0
- package/components/SelectionCard/SelectionCard.d.ts +7 -0
- package/components/SelectionCard/SelectionCard.js +25 -2
- package/components/ShaderField/useShaderField.js +2 -2
- package/components/ShaderScene/ShaderScene.js +2 -2
- package/components/SiteHeader/SiteHeader.css +0 -9
- package/components/SourceChip/SourceChip.css +2 -1
- package/components/Sparkline/Sparkline.css +20 -0
- package/components/Sparkline/Sparkline.d.ts +4 -0
- package/components/Sparkline/Sparkline.js +14 -8
- package/components/Stat/Stat.css +31 -0
- package/components/Stat/Stat.d.ts +23 -2
- package/components/Stat/Stat.js +21 -6
- package/components/SubNavPanel/SubNavPanel.css +10 -9
- package/components/Table/Table.css +409 -14
- package/components/Table/Table.d.ts +32 -2
- package/components/Table/Table.js +66 -34
- package/components/Textarea/Textarea.css +4 -2
- package/components/ThemeToggle/colorMode.d.ts +10 -2
- package/components/ThemeToggle/colorMode.js +4 -2
- package/components/ThreadHistory/ThreadHistory.css +11 -0
- package/components/ThreadHistory/ThreadHistory.d.ts +5 -1
- package/components/ThreadHistory/ThreadHistory.js +6 -1
- package/components/ThreadPanel/ThreadPanel.d.ts +4 -0
- package/components/ThreadPanel/ThreadPanel.js +5 -1
- package/components/TimePicker/TimePicker.css +3 -1
- package/components/TimePicker/TimePicker.d.ts +4 -2
- package/components/TimePicker/TimePicker.js +11 -3
- package/components/Timeline/Timeline.css +15 -0
- package/components/Timeline/Timeline.d.ts +8 -0
- package/components/Timeline/Timeline.js +21 -0
- package/components/Toast/Toast.css +16 -0
- package/components/Toast/Toast.d.ts +7 -2
- package/components/ToggleGroup/ToggleGroup.css +28 -2
- package/components/ToggleSwitch/ToggleSwitch.css +1 -1
- package/components/Tooltip/Tooltip.d.ts +9 -0
- package/components/Tooltip/Tooltip.js +34 -8
- package/components/TreeView/TreeView.css +12 -0
- package/components/TreeView/TreeView.d.ts +4 -0
- package/components/TreeView/TreeView.js +20 -0
- package/components/UsageCard/UsageCard.css +11 -0
- package/components/UsageCard/UsageCard.d.ts +4 -0
- package/components/UsageCard/UsageCard.js +25 -16
- package/components/Widget/Widget.css +7 -0
- package/components/Widget/Widget.d.ts +4 -0
- package/components/Widget/Widget.js +14 -2
- package/components/registry.json +5 -2
- package/components/registry.json.d.ts +5 -2
- package/components/registry.json.js +1 -1
- package/package.json +9 -3
- package/tokens/motion.d.ts +2 -0
- package/tokens/motion.js +2 -0
- package/tokens/presets/contrast.css +36 -3
- package/tokens/presets/coral.css +39 -3
- package/tokens/presets/forest.css +55 -3
- package/tokens/presets/gold.css +39 -4
- package/tokens/presets/marquee.css +42 -4
- package/tokens/presets/mono.css +107 -29
- package/tokens/presets/pink.css +41 -3
- package/tokens/presets/plum.css +41 -1
- package/tokens/presets/terminal.css +40 -4
- package/tokens/presets/violet.css +42 -3
- package/tokens/presets/warm.css +49 -5
- package/tokens/presets/zest.css +47 -3
- package/tokens/registry.json +2 -0
- package/tokens/registry.json.d.ts +2 -0
- package/tokens/registry.json.js +1 -1
- package/tokens/tokens-dark.css +5 -0
- package/tokens/tokens-light.css +9 -0
- package/tokens/values.d.ts +14 -1
- package/tokens/values.js +14 -1
- package/tokens/values.json.js +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The sign-up block: the sign-in block's card with a name, an email and a
|
|
5
|
+
* new password, an agreement to the terms and a single sign-on route. It
|
|
6
|
+
* checks the fields in the browser and goes no further; connect `signUp`
|
|
7
|
+
* to your auth provider. It links back to the sign-in block's page, which
|
|
8
|
+
* `init block sign-up` writes beside it.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { useState, type FormEvent } from 'react';
|
|
12
|
+
import { Button } from 'rift-ds/components/Button/Button';
|
|
13
|
+
import { Checkbox } from 'rift-ds/components/Checkbox/Checkbox';
|
|
14
|
+
import { Divider } from 'rift-ds/components/Divider/Divider';
|
|
15
|
+
import { Input } from 'rift-ds/components/Input/Input';
|
|
16
|
+
import styles from './page.module.css';
|
|
17
|
+
|
|
18
|
+
const PRODUCT_NAME = 'Acme';
|
|
19
|
+
const EMAIL_SHAPE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
20
|
+
/** The shortest password the form takes. Match your auth provider's rule. */
|
|
21
|
+
const PASSWORD_MIN = 8;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Where "Sign in" goes: the sign-in block's page. Relative, so it resolves
|
|
25
|
+
* beside this page (`sign-in` from /sign-up is /sign-in). Make it absolute
|
|
26
|
+
* ('/sign-in') if your pages nest.
|
|
27
|
+
*/
|
|
28
|
+
const SIGN_IN_ROUTE = 'sign-in';
|
|
29
|
+
|
|
30
|
+
export default function SignUpPage() {
|
|
31
|
+
const [name, setName] = useState('');
|
|
32
|
+
const [email, setEmail] = useState('');
|
|
33
|
+
const [password, setPassword] = useState('');
|
|
34
|
+
const [agreed, setAgreed] = useState(false);
|
|
35
|
+
const [nameError, setNameError] = useState<string>();
|
|
36
|
+
const [emailError, setEmailError] = useState<string>();
|
|
37
|
+
const [passwordError, setPasswordError] = useState<string>();
|
|
38
|
+
const [agreedError, setAgreedError] = useState<string>();
|
|
39
|
+
|
|
40
|
+
const signUp = () => {
|
|
41
|
+
const nextNameError = name.trim() ? undefined : 'Enter your name.';
|
|
42
|
+
const nextEmailError = EMAIL_SHAPE.test(email.trim()) ? undefined : 'Enter an email we can reach you at.';
|
|
43
|
+
const nextPasswordError =
|
|
44
|
+
password.length >= PASSWORD_MIN ? undefined : `Use at least ${PASSWORD_MIN} characters.`;
|
|
45
|
+
const nextAgreedError = agreed ? undefined : 'Agree to the terms to continue.';
|
|
46
|
+
setNameError(nextNameError);
|
|
47
|
+
setEmailError(nextEmailError);
|
|
48
|
+
setPasswordError(nextPasswordError);
|
|
49
|
+
setAgreedError(nextAgreedError);
|
|
50
|
+
if (nextNameError || nextEmailError || nextPasswordError || nextAgreedError) return;
|
|
51
|
+
// Hand { name, email, password } to your auth provider here.
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/* The Create account button is the form's submit button, so a click and
|
|
55
|
+
Enter in a field both arrive here. */
|
|
56
|
+
const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
signUp();
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className={styles.page}>
|
|
63
|
+
<main className={styles.card}>
|
|
64
|
+
<div className={styles.intro}>
|
|
65
|
+
<span className={styles.product}>{PRODUCT_NAME}</span>
|
|
66
|
+
<h1 className={styles.title}>Create your account</h1>
|
|
67
|
+
<p className={styles.subhead}>Free for your first five people. No card needed.</p>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<form className={styles.form} onSubmit={handleSubmit} noValidate>
|
|
71
|
+
<Input
|
|
72
|
+
label="Name"
|
|
73
|
+
name="name"
|
|
74
|
+
autoComplete="name"
|
|
75
|
+
value={name}
|
|
76
|
+
onValueChange={setName}
|
|
77
|
+
error={Boolean(nameError)}
|
|
78
|
+
helperText={nameError}
|
|
79
|
+
/>
|
|
80
|
+
<Input
|
|
81
|
+
label="Work email"
|
|
82
|
+
type="email"
|
|
83
|
+
name="email"
|
|
84
|
+
autoComplete="email"
|
|
85
|
+
value={email}
|
|
86
|
+
onValueChange={setEmail}
|
|
87
|
+
error={Boolean(emailError)}
|
|
88
|
+
helperText={emailError}
|
|
89
|
+
/>
|
|
90
|
+
<Input
|
|
91
|
+
label="Password"
|
|
92
|
+
type="password"
|
|
93
|
+
name="password"
|
|
94
|
+
autoComplete="new-password"
|
|
95
|
+
value={password}
|
|
96
|
+
onValueChange={setPassword}
|
|
97
|
+
error={Boolean(passwordError)}
|
|
98
|
+
helperText={passwordError ?? `At least ${PASSWORD_MIN} characters.`}
|
|
99
|
+
/>
|
|
100
|
+
<Checkbox
|
|
101
|
+
label="I agree to the terms and the privacy policy"
|
|
102
|
+
checked={agreed}
|
|
103
|
+
onCheckedChange={setAgreed}
|
|
104
|
+
error={Boolean(agreedError)}
|
|
105
|
+
helperText={agreedError}
|
|
106
|
+
/>
|
|
107
|
+
<Button type="submit" variant="primary" label="Create account" className={styles.full} />
|
|
108
|
+
</form>
|
|
109
|
+
|
|
110
|
+
<Divider label="or" labelPosition="center" spacing="none" />
|
|
111
|
+
|
|
112
|
+
<Button
|
|
113
|
+
variant="secondary"
|
|
114
|
+
tone="neutral"
|
|
115
|
+
label="Continue with single sign-on"
|
|
116
|
+
iconLeft="key"
|
|
117
|
+
className={styles.full}
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<p className={styles.footer}>
|
|
121
|
+
Have an account? <Button variant="tertiary" size="compact" label="Sign in" href={SIGN_IN_ROUTE} />
|
|
122
|
+
</p>
|
|
123
|
+
</main>
|
|
124
|
+
</div>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
@@ -18,7 +18,7 @@ export default function StarterPage() {
|
|
|
18
18
|
title="Home"
|
|
19
19
|
actions={<Button variant="primary" size="compact" label="New project" iconLeft="add" />}
|
|
20
20
|
>
|
|
21
|
-
<Panel className={styles.empty}>
|
|
21
|
+
<Panel bordered className={styles.empty}>
|
|
22
22
|
<EmptyState
|
|
23
23
|
icon="dashboard_customize"
|
|
24
24
|
title="Your page starts here"
|
|
@@ -11,13 +11,3 @@
|
|
|
11
11
|
.shell[data-width='narrow'] {
|
|
12
12
|
--ds-shell-contained-width: 960px; /* a slim centred column */
|
|
13
13
|
}
|
|
14
|
-
|
|
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);
|
|
23
|
-
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* The app shell every rift-ds app block page sits in, composed from the
|
|
5
5
|
* library's own shell pieces: AppLayout (its AppSidebar in one of the three
|
|
6
|
-
* app shell modes, SHELL_LAYOUT below, the
|
|
7
|
-
*
|
|
6
|
+
* app shell modes, SHELL_LAYOUT below, at the width CONTENT_WIDTH sets), an
|
|
7
|
+
* AppToolbar in AppLayout's toolbar slot (the search,
|
|
8
8
|
* the notifications, help, settings and the AI entry), and a PageHeader
|
|
9
9
|
* (breadcrumb, title, actions) over the page. This file is yours: rename the
|
|
10
10
|
* product, change the navigation, and grow it with your app.
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* controls after the first into a More menu.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { useState,
|
|
21
|
+
import { useState, type ReactNode } from 'react';
|
|
22
22
|
import { AppLayout } from 'rift-ds/components/AppLayout/AppLayout';
|
|
23
23
|
import type { AppSidebarLayout, AppSidebarProfile, AppSidebarSection } from 'rift-ds/components/AppSidebar/AppSidebar';
|
|
24
24
|
import { AppToolbar } from 'rift-ds/components/AppToolbar/AppToolbar';
|
|
@@ -26,66 +26,28 @@ import type { BreadcrumbItem } from 'rift-ds/components/Breadcrumb/Breadcrumb';
|
|
|
26
26
|
import { NotificationCenter, NotificationItem } from 'rift-ds/components/NotificationCenter/NotificationCenter';
|
|
27
27
|
import { PageHeader } from 'rift-ds/components/PageHeader/PageHeader';
|
|
28
28
|
import { useColorMode } from 'rift-ds/components/ThemeToggle/useColorMode';
|
|
29
|
-
import {
|
|
30
|
-
import { SHIPPED_THEMES, shippedThemeOptions } from 'rift-ds/tokens/values';
|
|
31
|
-
// Every shipped theme, so a Theme pick applies; keep only yours once you choose.
|
|
32
|
-
import 'rift-ds/tokens/presets/presets.css';
|
|
29
|
+
import { useLinkComponent } from 'rift-ds/behaviors/LinkProvider';
|
|
33
30
|
import styles from './AppShell.module.css';
|
|
34
31
|
|
|
35
32
|
/**
|
|
36
33
|
* How the sidebar and the content meet the page, one of the three app shell
|
|
37
34
|
* modes: `flush` runs the sidebar edge to edge on the shell colour behind a
|
|
38
35
|
* hairline, the content crisp beside it; `floating` lifts the sidebar into a
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
* card on the shell colour off the edges, the content crisp on the app
|
|
37
|
+
* surface; `inset` runs it flush and sets the content in a
|
|
38
|
+
* raised surface held off the other edges, scrolling inside itself. Pick
|
|
39
|
+
* one here: the shell carries no layout picker, since a product ships one
|
|
40
|
+
* shell, not a choice of three.
|
|
41
41
|
*/
|
|
42
42
|
const SHELL_LAYOUT: AppSidebarLayout = 'floating';
|
|
43
43
|
|
|
44
|
-
/** The sidebar's
|
|
44
|
+
/** The sidebar's Mode row: what each choice is called and shows. */
|
|
45
45
|
const MODES = [
|
|
46
46
|
{ value: 'system', label: 'System', icon: 'routine', description: 'Follows your device' },
|
|
47
47
|
{ value: 'light', label: 'Light', icon: 'light_mode', description: 'Light surfaces, dark text' },
|
|
48
48
|
{ value: 'dark', label: 'Dark', icon: 'dark_mode', description: 'Dark surfaces, light text' },
|
|
49
49
|
] as const;
|
|
50
50
|
|
|
51
|
-
const LAYOUTS: { value: AppSidebarLayout; label: string; icon: string; description: string }[] = [
|
|
52
|
-
{ value: 'flush', label: 'Flush', icon: 'vertical_split', description: 'Edge to edge behind a hairline' },
|
|
53
|
-
{ value: 'floating', label: 'Floating', icon: 'view_sidebar', description: 'The sidebar as a card beside the page' },
|
|
54
|
-
{ value: 'inset', label: 'Inset', icon: 'space_dashboard', description: 'The page in a raised surface' },
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
const WIDTHS: { value: ContentWidth; label: string; icon: string; description: string }[] = [
|
|
58
|
-
{ value: 'narrow', label: 'Narrow', icon: 'width_normal', description: 'A slim centred column' },
|
|
59
|
-
{ value: 'contained', label: 'Contained', icon: 'width_wide', description: 'Centred at a comfortable width' },
|
|
60
|
-
{ value: 'full', label: 'Full width', icon: 'width_full', description: 'The whole column, edge to edge' },
|
|
61
|
-
];
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The theme is the `data-brand` attribute on <html> (none for the base
|
|
65
|
-
* look). Watched, so a pick made anywhere shows here; store it where you
|
|
66
|
-
* keep the reader's other preferences to make it last.
|
|
67
|
-
*/
|
|
68
|
-
const subscribeRoot = (callback: () => void) => {
|
|
69
|
-
const observer = new MutationObserver(callback);
|
|
70
|
-
observer.observe(document.documentElement, { attributes: true, attributeFilter: ['data-brand', 'data-theme'] });
|
|
71
|
-
return () => observer.disconnect();
|
|
72
|
-
};
|
|
73
|
-
const readBrand = () => document.documentElement.getAttribute('data-brand');
|
|
74
|
-
const readDark = () => document.documentElement.getAttribute('data-theme') === 'dark';
|
|
75
|
-
const applyBrand = (brand: string | null) => {
|
|
76
|
-
if (brand) document.documentElement.setAttribute('data-brand', brand);
|
|
77
|
-
else document.documentElement.removeAttribute('data-brand');
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/** Below the mobile step every mode gives way to the plain page, so Layout and Width leave the sidebar. */
|
|
81
|
-
const PHONE_QUERY = mediaBelow(BREAKPOINT_MOBILE_PX);
|
|
82
|
-
const subscribePhone = (callback: () => void) => {
|
|
83
|
-
const query = window.matchMedia(PHONE_QUERY);
|
|
84
|
-
query.addEventListener('change', callback);
|
|
85
|
-
return () => query.removeEventListener('change', callback);
|
|
86
|
-
};
|
|
87
|
-
const readPhone = () => window.matchMedia(PHONE_QUERY).matches;
|
|
88
|
-
|
|
89
51
|
/** How wide the page runs, apart from the mode. */
|
|
90
52
|
type ContentWidth = 'narrow' | 'contained' | 'full';
|
|
91
53
|
|
|
@@ -93,7 +55,7 @@ type ContentWidth = 'narrow' | 'contained' | 'full';
|
|
|
93
55
|
* How wide the page runs, apart from the mode: `narrow` centres a slim
|
|
94
56
|
* column (960px), `contained` centres the content column (1440px), both set
|
|
95
57
|
* in AppShell.module.css, and `full` runs it the whole width the mode
|
|
96
|
-
* leaves. Any mode takes any of them.
|
|
58
|
+
* leaves. Any mode takes any of them. Set it here, as with the mode.
|
|
97
59
|
*/
|
|
98
60
|
const CONTENT_WIDTH: ContentWidth = 'contained';
|
|
99
61
|
|
|
@@ -133,6 +95,12 @@ export const SETTINGS_SECTIONS = [
|
|
|
133
95
|
{ id: 'security', label: 'Security', group: 'Account', description: 'How you sign in, and where you are signed in now.' },
|
|
134
96
|
] as const;
|
|
135
97
|
|
|
98
|
+
/** Moves the page to a settings section's hash and tells whoever follows it. */
|
|
99
|
+
function openSection(id: string) {
|
|
100
|
+
window.history.pushState(null, '', `#${id}`);
|
|
101
|
+
window.dispatchEvent(new HashChangeEvent('hashchange'));
|
|
102
|
+
}
|
|
103
|
+
|
|
136
104
|
/** The navigation, with the settings sections linked from wherever the reader is. */
|
|
137
105
|
function navFor(activeKey: string): AppSidebarSection[] {
|
|
138
106
|
// On the settings page a section is a jump within it; anywhere else it
|
|
@@ -151,8 +119,8 @@ function navFor(activeKey: string): AppSidebarSection[] {
|
|
|
151
119
|
href: `${base}#${entry.id}`,
|
|
152
120
|
// A router's link (Next.js's) moves a hash without the
|
|
153
121
|
// hashchange event the settings page follows, so on that page
|
|
154
|
-
// the link
|
|
155
|
-
...(base === '' ? { onClick: () =>
|
|
122
|
+
// the link moves the hash and says so itself.
|
|
123
|
+
...(base === '' ? { onClick: () => openSection(entry.id) } : {}),
|
|
156
124
|
})),
|
|
157
125
|
}
|
|
158
126
|
: item,
|
|
@@ -162,7 +130,8 @@ function navFor(activeKey: string): AppSidebarSection[] {
|
|
|
162
130
|
|
|
163
131
|
/**
|
|
164
132
|
* Where the toolbar's links go: the notifications and settings blocks'
|
|
165
|
-
* pages
|
|
133
|
+
* pages, which every block that writes this shell writes too, so both
|
|
134
|
+
* resolve from the first one you add. Relative, so they resolve beside the page they are on: every block
|
|
166
135
|
* is a top-level route in your app (`notifications` from /dashboard is
|
|
167
136
|
* /notifications), and the rift-ds docs preview finds its own copies the
|
|
168
137
|
* same way. Make them absolute ('/notifications') if your pages nest.
|
|
@@ -202,41 +171,23 @@ export interface AppShellProps {
|
|
|
202
171
|
}
|
|
203
172
|
|
|
204
173
|
export function AppShell({ activeKey, activeSubKey, breadcrumb, title, description, actions, children }: AppShellProps) {
|
|
205
|
-
const [layout, setLayout] = useState<AppSidebarLayout>(SHELL_LAYOUT);
|
|
206
|
-
const [width, setWidth] = useState<ContentWidth>(CONTENT_WIDTH);
|
|
207
174
|
const [mode, setMode] = useColorMode();
|
|
208
|
-
const phone = useSyncExternalStore(subscribePhone, readPhone, () => false);
|
|
209
|
-
const brand = useSyncExternalStore(subscribeRoot, readBrand, () => null);
|
|
210
|
-
const dark = useSyncExternalStore(subscribeRoot, readDark, () => false);
|
|
211
175
|
const [unread, setUnread] = useState<string[]>(['payment', 'approval']);
|
|
176
|
+
// PageHeader renders on the server too, so it takes its link as a prop
|
|
177
|
+
// rather than reading the provider: hand it the app's router link here,
|
|
178
|
+
// or every breadcrumb click reloads the page.
|
|
179
|
+
const linkComponent = useLinkComponent();
|
|
212
180
|
|
|
213
|
-
// The
|
|
214
|
-
//
|
|
215
|
-
//
|
|
216
|
-
//
|
|
217
|
-
//
|
|
181
|
+
// The reader's one appearance choice: the colour mode, stored like
|
|
182
|
+
// ThemeToggle's. The row shows the current choice and opens the three in
|
|
183
|
+
// the sidebar's panel, where a pick applies at once. The theme, the shell
|
|
184
|
+
// mode and the width are the product's decisions, made in code (the theme
|
|
185
|
+
// in the root layout, the other two above), so the shell offers no picker
|
|
186
|
+
// for them.
|
|
218
187
|
const modeNow = MODES.find((option) => option.value === mode) ?? MODES[0];
|
|
219
|
-
const themes = shippedThemeOptions(dark ? 'dark' : 'light');
|
|
220
|
-
const themeNow = SHIPPED_THEMES.find((theme) => theme.brand === brand) ?? SHIPPED_THEMES[0];
|
|
221
|
-
const swatch = (color?: string) => <span className={styles.swatch} style={{ backgroundColor: color }} />;
|
|
222
|
-
const layoutNow = LAYOUTS.find((option) => option.value === layout) ?? LAYOUTS[0];
|
|
223
|
-
const widthNow = WIDTHS.find((option) => option.value === width) ?? WIDTHS[0];
|
|
224
188
|
const appearance: AppSidebarSection = {
|
|
225
189
|
category: 'Appearance',
|
|
226
190
|
items: [
|
|
227
|
-
{
|
|
228
|
-
key: 'appearance-theme',
|
|
229
|
-
label: 'Theme',
|
|
230
|
-
icon: swatch(themes.find((theme) => theme.value === themeNow.id)?.color),
|
|
231
|
-
value: themeNow.label,
|
|
232
|
-
children: SHIPPED_THEMES.map((theme) => ({
|
|
233
|
-
key: `theme-${theme.id}`,
|
|
234
|
-
label: theme.label,
|
|
235
|
-
icon: swatch(themes.find((option) => option.value === theme.id)?.color),
|
|
236
|
-
selected: theme.id === themeNow.id,
|
|
237
|
-
onClick: () => applyBrand(theme.brand),
|
|
238
|
-
})),
|
|
239
|
-
},
|
|
240
191
|
{
|
|
241
192
|
key: 'appearance-mode',
|
|
242
193
|
label: 'Mode',
|
|
@@ -251,38 +202,6 @@ export function AppShell({ activeKey, activeSubKey, breadcrumb, title, descripti
|
|
|
251
202
|
onClick: () => setMode(option.value),
|
|
252
203
|
})),
|
|
253
204
|
},
|
|
254
|
-
...(phone
|
|
255
|
-
? []
|
|
256
|
-
: [
|
|
257
|
-
{
|
|
258
|
-
key: 'appearance-layout',
|
|
259
|
-
label: 'Layout',
|
|
260
|
-
icon: layoutNow.icon,
|
|
261
|
-
value: layoutNow.label,
|
|
262
|
-
children: LAYOUTS.map((option) => ({
|
|
263
|
-
key: `layout-${option.value}`,
|
|
264
|
-
label: option.label,
|
|
265
|
-
description: option.description,
|
|
266
|
-
icon: option.icon,
|
|
267
|
-
selected: option.value === layout,
|
|
268
|
-
onClick: () => setLayout(option.value),
|
|
269
|
-
})),
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
key: 'appearance-width',
|
|
273
|
-
label: 'Width',
|
|
274
|
-
icon: widthNow.icon,
|
|
275
|
-
value: widthNow.label,
|
|
276
|
-
children: WIDTHS.map((option) => ({
|
|
277
|
-
key: `width-${option.value}`,
|
|
278
|
-
label: option.label,
|
|
279
|
-
description: option.description,
|
|
280
|
-
icon: option.icon,
|
|
281
|
-
selected: option.value === width,
|
|
282
|
-
onClick: () => setWidth(option.value),
|
|
283
|
-
})),
|
|
284
|
-
},
|
|
285
|
-
]),
|
|
286
205
|
],
|
|
287
206
|
};
|
|
288
207
|
|
|
@@ -295,11 +214,11 @@ export function AppShell({ activeKey, activeSubKey, breadcrumb, title, descripti
|
|
|
295
214
|
activeKey={activeKey}
|
|
296
215
|
activeSubKey={activeSubKey}
|
|
297
216
|
logoText={PRODUCT_NAME}
|
|
298
|
-
layout={
|
|
217
|
+
layout={SHELL_LAYOUT}
|
|
299
218
|
// AppLayout's width axis is contained or full; narrow is a contained
|
|
300
219
|
// column held slimmer, through data-width and AppShell.module.css.
|
|
301
|
-
width={
|
|
302
|
-
data-width={
|
|
220
|
+
width={CONTENT_WIDTH === 'full' ? 'full' : 'contained'}
|
|
221
|
+
data-width={CONTENT_WIDTH}
|
|
303
222
|
toolbar={
|
|
304
223
|
<AppToolbar
|
|
305
224
|
onSearch={() => {}}
|
|
@@ -337,7 +256,13 @@ export function AppShell({ activeKey, activeSubKey, breadcrumb, title, descripti
|
|
|
337
256
|
/>
|
|
338
257
|
}
|
|
339
258
|
>
|
|
340
|
-
<PageHeader
|
|
259
|
+
<PageHeader
|
|
260
|
+
breadcrumb={breadcrumb}
|
|
261
|
+
title={title}
|
|
262
|
+
description={description}
|
|
263
|
+
actions={actions}
|
|
264
|
+
linkComponent={linkComponent}
|
|
265
|
+
/>
|
|
341
266
|
{children}
|
|
342
267
|
</AppLayout>
|
|
343
268
|
);
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import type { ReactNode } from 'react';
|
|
23
|
+
import { useLinkComponent } from 'rift-ds/behaviors/LinkProvider';
|
|
23
24
|
import { AnchorNav } from 'rift-ds/components/AnchorNav/AnchorNav';
|
|
24
25
|
import { BackToTop } from 'rift-ds/components/BackToTop/BackToTop';
|
|
25
26
|
import { Breadcrumb, type BreadcrumbItem } from 'rift-ds/components/Breadcrumb/Breadcrumb';
|
|
@@ -123,6 +124,9 @@ export interface DocsShellProps {
|
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
export function DocsShell({ currentHref, breadcrumb, children }: DocsShellProps) {
|
|
127
|
+
// Breadcrumb renders on the server too, so it takes its link as a prop:
|
|
128
|
+
// hand it the app's router link, or a crumb reloads the page.
|
|
129
|
+
const linkComponent = useLinkComponent();
|
|
126
130
|
return (
|
|
127
131
|
<SiteLayout
|
|
128
132
|
width={PAGE_WIDTH}
|
|
@@ -171,7 +175,7 @@ export function DocsShell({ currentHref, breadcrumb, children }: DocsShellProps)
|
|
|
171
175
|
/>
|
|
172
176
|
}
|
|
173
177
|
>
|
|
174
|
-
<Breadcrumb items={breadcrumb} />
|
|
178
|
+
<Breadcrumb items={breadcrumb} linkComponent={linkComponent} />
|
|
175
179
|
<div className={styles.article}>{children}</div>
|
|
176
180
|
<BackToTop focusTarget="docs-article" />
|
|
177
181
|
</SiteLayout>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "The blocks: whole starting pages the init bin copies into a consumer's app, composed from the library alone. Each lists every file it writes, at its target path (app/** lands in the app router folder, components/** beside it). A file may belong to more than one block; init never overwrites, so the shared shell is written once. scripts/validate-blocks.mjs holds this file to the tree and the site's previews.",
|
|
2
|
+
"$comment": "The blocks: whole starting pages the init bin copies into a consumer's app, composed from the library alone. Each lists every file it writes, at its target path (app/** lands in the app router folder, components/** beside it). A file may belong to more than one block; init never overwrites, so the shared shell is written once. A block lists every page its own links reach, so nothing it writes points at a page that is not there: each app shell block carries the settings and notifications pages the shell's toolbar opens, and sign-in and sign-up carry each other. scripts/validate-blocks.mjs holds this file to the tree and the site's previews.",
|
|
3
3
|
"blocks": [
|
|
4
4
|
{
|
|
5
5
|
"name": "app-shell",
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
"components/blocks/AppShell.tsx",
|
|
11
11
|
"components/blocks/AppShell.module.css",
|
|
12
12
|
"app/starter/page.tsx",
|
|
13
|
-
"app/starter/page.module.css"
|
|
13
|
+
"app/starter/page.module.css",
|
|
14
|
+
"app/settings/page.tsx",
|
|
15
|
+
"app/settings/page.module.css",
|
|
16
|
+
"app/settings/Settings.tsx",
|
|
17
|
+
"app/notifications/page.tsx",
|
|
18
|
+
"app/notifications/page.module.css",
|
|
19
|
+
"app/notifications/Inbox.tsx"
|
|
14
20
|
]
|
|
15
21
|
},
|
|
16
22
|
{
|
|
@@ -22,7 +28,13 @@
|
|
|
22
28
|
"components/blocks/AppShell.tsx",
|
|
23
29
|
"components/blocks/AppShell.module.css",
|
|
24
30
|
"app/dashboard/page.tsx",
|
|
25
|
-
"app/dashboard/page.module.css"
|
|
31
|
+
"app/dashboard/page.module.css",
|
|
32
|
+
"app/settings/page.tsx",
|
|
33
|
+
"app/settings/page.module.css",
|
|
34
|
+
"app/settings/Settings.tsx",
|
|
35
|
+
"app/notifications/page.tsx",
|
|
36
|
+
"app/notifications/page.module.css",
|
|
37
|
+
"app/notifications/Inbox.tsx"
|
|
26
38
|
]
|
|
27
39
|
},
|
|
28
40
|
{
|
|
@@ -35,7 +47,10 @@
|
|
|
35
47
|
"components/blocks/AppShell.module.css",
|
|
36
48
|
"app/settings/page.tsx",
|
|
37
49
|
"app/settings/page.module.css",
|
|
38
|
-
"app/settings/Settings.tsx"
|
|
50
|
+
"app/settings/Settings.tsx",
|
|
51
|
+
"app/notifications/page.tsx",
|
|
52
|
+
"app/notifications/page.module.css",
|
|
53
|
+
"app/notifications/Inbox.tsx"
|
|
39
54
|
]
|
|
40
55
|
},
|
|
41
56
|
{
|
|
@@ -48,7 +63,10 @@
|
|
|
48
63
|
"components/blocks/AppShell.module.css",
|
|
49
64
|
"app/notifications/page.tsx",
|
|
50
65
|
"app/notifications/page.module.css",
|
|
51
|
-
"app/notifications/Inbox.tsx"
|
|
66
|
+
"app/notifications/Inbox.tsx",
|
|
67
|
+
"app/settings/page.tsx",
|
|
68
|
+
"app/settings/page.module.css",
|
|
69
|
+
"app/settings/Settings.tsx"
|
|
52
70
|
]
|
|
53
71
|
},
|
|
54
72
|
{
|
|
@@ -62,7 +80,13 @@
|
|
|
62
80
|
"app/planner/page.tsx",
|
|
63
81
|
"app/planner/page.module.css",
|
|
64
82
|
"app/planner/PlannerGrid.tsx",
|
|
65
|
-
"app/planner/Requests.tsx"
|
|
83
|
+
"app/planner/Requests.tsx",
|
|
84
|
+
"app/settings/page.tsx",
|
|
85
|
+
"app/settings/page.module.css",
|
|
86
|
+
"app/settings/Settings.tsx",
|
|
87
|
+
"app/notifications/page.tsx",
|
|
88
|
+
"app/notifications/page.module.css",
|
|
89
|
+
"app/notifications/Inbox.tsx"
|
|
66
90
|
]
|
|
67
91
|
},
|
|
68
92
|
{
|
|
@@ -71,6 +95,20 @@
|
|
|
71
95
|
"description": "A centred sign-in card with email and password, remember me and a single sign-on route.",
|
|
72
96
|
"route": "/sign-in",
|
|
73
97
|
"files": [
|
|
98
|
+
"app/sign-in/page.tsx",
|
|
99
|
+
"app/sign-in/page.module.css",
|
|
100
|
+
"app/sign-up/page.tsx",
|
|
101
|
+
"app/sign-up/page.module.css"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "sign-up",
|
|
106
|
+
"label": "Sign up",
|
|
107
|
+
"description": "The sign-in card for a new account: name, email and a new password, agreement to the terms and a single sign-on route.",
|
|
108
|
+
"route": "/sign-up",
|
|
109
|
+
"files": [
|
|
110
|
+
"app/sign-up/page.tsx",
|
|
111
|
+
"app/sign-up/page.module.css",
|
|
74
112
|
"app/sign-in/page.tsx",
|
|
75
113
|
"app/sign-in/page.module.css"
|
|
76
114
|
]
|
package/chat/ChatLauncher.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare const CHAT_PANEL_ID = "ds-chat-panel";
|
|
|
6
6
|
export interface ChatLauncherProps {
|
|
7
7
|
/** The floating button's text. */
|
|
8
8
|
label?: string;
|
|
9
|
-
/** The button's icon. */
|
|
10
|
-
icon?: string;
|
|
9
|
+
/** The button's icon: a Material Symbol name, or a custom element (a brand mark) drawn in the icon slot. */
|
|
10
|
+
icon?: string | ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* A TLDR panel the button summons on hover: a pre-written summary and
|
|
13
13
|
* prompt chips. A tapped chip opens the chat and sends the chip's
|
package/chat/ChatWidget.css
CHANGED
|
@@ -792,7 +792,7 @@
|
|
|
792
792
|
width: 100%;
|
|
793
793
|
min-width: 0;
|
|
794
794
|
min-height: 0;
|
|
795
|
-
border: var(--border-025) solid var(--color-bg-
|
|
795
|
+
border: var(--border-025) solid var(--ds-shell-edge-border, var(--color-bg-app-shell-border));
|
|
796
796
|
border-radius: var(--radius-600);
|
|
797
797
|
background-color: var(--color-bg-page-primary);
|
|
798
798
|
overflow: hidden;
|
|
@@ -857,7 +857,7 @@
|
|
|
857
857
|
flex: 1;
|
|
858
858
|
min-width: 0;
|
|
859
859
|
min-height: 0;
|
|
860
|
-
border: var(--border-025) solid var(--color-bg-
|
|
860
|
+
border: var(--border-025) solid var(--ds-shell-edge-border, var(--color-bg-app-shell-border));
|
|
861
861
|
border-radius: var(--radius-600);
|
|
862
862
|
/* Solid, the agent pane's ground: see the aside rail's card. */
|
|
863
863
|
background-color: var(--color-bg-page-primary);
|
|
@@ -1160,7 +1160,7 @@ html[data-chat-resizing] .ds-chat-launcher__panel {
|
|
|
1160
1160
|
|
|
1161
1161
|
.ds-chat-launcher__panel--flat {
|
|
1162
1162
|
background: var(--color-bg-app-surface);
|
|
1163
|
-
border-color: var(--color-bg-
|
|
1163
|
+
border-color: var(--ds-shell-edge-border, var(--color-bg-app-shell-border));
|
|
1164
1164
|
box-shadow: var(--shadow-floating);
|
|
1165
1165
|
backdrop-filter: none;
|
|
1166
1166
|
}
|
|
@@ -1527,17 +1527,17 @@ html[data-chat-resizing] .ds-chat-launcher__panel--floating .ds-chat-header {
|
|
|
1527
1527
|
border-inline-end-color: var(--ds-shell-rail-divider);
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
|
-
/* Floating: the history rail lifts off the plane as a
|
|
1531
|
-
floating rail's; the trailing panels wear the same raised
|
|
1530
|
+
/* Floating: the history rail lifts off the plane as a card on the shell
|
|
1531
|
+
colour, the floating rail's; the trailing panels wear the same raised
|
|
1532
|
+
edge. */
|
|
1532
1533
|
.ds-chat-widget__rails[data-ds-shell='floating'] > .ds-chat-widget__threads-rail {
|
|
1533
1534
|
margin: var(--ds-shell-float-gap);
|
|
1534
1535
|
margin-inline-end: 0;
|
|
1535
1536
|
overflow: hidden;
|
|
1536
|
-
background-color: var(--ds-shell-
|
|
1537
|
+
background-color: var(--ds-shell-rail-bg);
|
|
1537
1538
|
border: var(--border-025) solid var(--ds-shell-edge-border);
|
|
1538
1539
|
border-radius: var(--ds-shell-radius);
|
|
1539
1540
|
box-shadow: var(--ds-shell-edge-shadow);
|
|
1540
|
-
backdrop-filter: var(--ds-shell-glass-blur);
|
|
1541
1541
|
}
|
|
1542
1542
|
|
|
1543
1543
|
/* Raised trailing panels (floating and inset): the card keeps its
|
package/chat/ChatWidget.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export interface ChatWidgetProps {
|
|
|
66
66
|
* Seat the widget as a page in one of AppLayout's three shell modes, for a
|
|
67
67
|
* host where the chat is the page (a chat home), not a panel over one.
|
|
68
68
|
* `flush` runs the history rail on the shell colour behind a hairline
|
|
69
|
-
* beside the conversation; `floating` lifts the rail into a
|
|
69
|
+
* beside the conversation; `floating` lifts the rail into a card on the shell colour;
|
|
70
70
|
* `inset` runs the rail flush and seats the conversation
|
|
71
71
|
* and each trailing panel in raised surfaces. Left out, the widget draws
|
|
72
72
|
* no shell and takes its host's ground, as a docked or floating panel
|
|
@@ -114,6 +114,20 @@
|
|
|
114
114
|
margin: 0;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
/* ============================================
|
|
118
|
+
BODY
|
|
119
|
+
What the decision needs between the words and
|
|
120
|
+
the actions: a confirm field, a checkbox. It
|
|
121
|
+
only stacks; the content brings its own type.
|
|
122
|
+
============================================ */
|
|
123
|
+
|
|
124
|
+
.ds-alert-dialog__body {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: var(--gap-300); /* 12px */
|
|
128
|
+
min-width: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
117
131
|
/* ============================================
|
|
118
132
|
ACTIONS
|
|
119
133
|
============================================ */
|