@coinbase/cds-mcp-server 8.21.0 → 8.21.1

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/CHANGELOG.md CHANGED
@@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 8.21.1 ((11/13/2025, 12:21 PM PST))
12
+
13
+ This is an artificial version bump with no new change.
14
+
11
15
  ## 8.21.0 ((11/12/2025, 11:45 AM PST))
12
16
 
13
17
  This is an artificial version bump with no new change.
@@ -50,15 +50,24 @@ function DefaultModal() {
50
50
  const onClickConsole = () => void console.log;
51
51
 
52
52
  const SelectComponent = () => {
53
- const [value, setValue] = useState();
54
- const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4', 'Option 5', 'Option 6'];
53
+ const [value, setValue] = useState('1');
54
+ const options = [
55
+ { value: '1', label: 'Option 1' },
56
+ { value: '2', label: 'Option 2' },
57
+ { value: '3', label: 'Option 3' },
58
+ { value: '4', label: 'Option 4' },
59
+ { value: '5', label: 'Option 5' },
60
+ { value: '6', label: 'Option 6' },
61
+ ];
55
62
 
56
63
  return (
57
- <Select value={value} placeholder="Choose something..." onChange={setValue}>
58
- {options.map((option) => (
59
- <SelectOption value={option} key={option} title={option} description="Description" />
60
- ))}
61
- </Select>
64
+ <Select
65
+ label="Select an option"
66
+ value={value}
67
+ onChange={setValue}
68
+ options={options}
69
+ placeholder="Choose something..."
70
+ />
62
71
  );
63
72
  };
64
73
 
@@ -115,6 +124,10 @@ function DefaultModal() {
115
124
  }
116
125
  ```
117
126
 
127
+ ### Advanced layouts
128
+
129
+ For more complex layouts, including three-column structures with custom headers and footers, see the [FullscreenModalLayout](/components/overlay/FullscreenModalLayout#three-column-layout-with-fullscreenmodalheader-and-pagefooter) component examples. `FullscreenModalLayout` provides more flexibility for building custom modal layouts while `FullscreenModal` offers a simpler API for common two-column use cases.
130
+
118
131
  ## Props
119
132
 
120
133
  | Prop | Type | Required | Default | Description |
@@ -10,20 +10,6 @@ import { FullscreenModalLayout } from '@coinbase/cds-web/overlays/modal/Fullscre
10
10
 
11
11
  ## Examples
12
12
 
13
- import {
14
- Box,
15
- Text,
16
- PortalProvider,
17
- Button,
18
- FullscreenModalLayout,
19
- VStack,
20
- HStack,
21
- LogoMark,
22
- IconButton,
23
- } from '@coinbase/cds-web';
24
- import { loremIpsum } from '@coinbase/cds-common/internal/data/loremIpsum';
25
- import React, { useCallback, useRef, useState } from 'react';
26
-
27
13
  ### Basic usage
28
14
 
29
15
  This component is primarily used internally by the `Modal` component to provide the animated layout for fullscreen modals. It wraps your modal content and manages the overlay, animations, and focus trapping.
@@ -65,102 +51,314 @@ function Example() {
65
51
  <Button onClick={toggleOn} ref={triggerRef}>
66
52
  Open Fullscreen Modal
67
53
  </Button>
68
- {visible && (
69
- <FullscreenModalLayout
70
- visible={visible}
71
- onRequestClose={toggleOff}
72
- accessibilityLabel="Example Fullscreen Modal"
73
- >
74
- <VStack background="bg" height="100%" width="100%">
75
- {headerContent}
76
- {mainContent}
77
- </VStack>
78
- </FullscreenModalLayout>
79
- )}
54
+
55
+ <FullscreenModalLayout
56
+ visible={visible}
57
+ onRequestClose={toggleOff}
58
+ accessibilityLabel="Example Fullscreen Modal"
59
+ >
60
+ <VStack background="bg" height="100%" width="100%">
61
+ {headerContent}
62
+ {mainContent}
63
+ </VStack>
64
+ </FullscreenModalLayout>
80
65
  </PortalProvider>
81
66
  );
82
67
  }
83
68
  ```
84
69
 
85
- ### Example composing content
70
+ ### Three-column layout with FullscreenModalHeader and PageFooter
86
71
 
87
- This example showcases how `FullscreenModalLayout` can be used to structure content across multiple distinct areas. It demonstrates the arrangement of a custom header, a top panel, a central area with left, center, and right panels, and a bottom panel.
72
+ This example demonstrates a three-column layout structure with a FullscreenModalHeader at the top and PageFooter at the bottom, matching the tertiary + secondary + primary column pattern. The layout includes vertical dividers between columns and demonstrates how to structure complex modal content.
88
73
 
89
74
  ```tsx live
90
- function AllPanelsExample() {
75
+ function ThreeColumnExample() {
91
76
  const [visible, setVisible] = useState(false);
92
77
  const triggerRef = useRef(null);
93
78
 
94
79
  const toggleOn = useCallback(() => setVisible(true), []);
95
80
  const toggleOff = useCallback(() => setVisible(false), []);
96
81
 
97
- const headerContent = (
98
- <HStack borderedBottom alignItems="center" paddingX={4} paddingY={2}>
99
- <Box paddingEnd={3} width={80}>
100
- <LogoMark size={32} />
101
- </Box>
102
- <Box flexGrow={1}>
103
- <Text as="h1" display="block" font="title1">
104
- Modal - All Panels
105
- </Text>
106
- </Box>
107
- <Box>
108
- <IconButton transparent aria-label="Close modal" name="close" onClick={toggleOff} />
109
- </Box>
110
- </HStack>
111
- );
82
+ const listCellProps = {
83
+ spacingVariant: 'compact' as const,
84
+ outerSpacing: { paddingX: 0, paddingY: 0 },
85
+ innerSpacing: { paddingX: 0, paddingY: 0 },
86
+ };
112
87
 
113
- const mainModalContent = (
114
- <VStack flexGrow={1} overflow="hidden">
115
- <VStack background="bgAlternate" padding={2}>
116
- <Text as="p" color="fg" display="block" font="body">
117
- Top Panel (e.g., Breadcrumbs, Progress)
118
- </Text>
119
- </VStack>
120
- <HStack flexGrow={1} overflow="hidden">
121
- <VStack background="bgAlternate" height="100%" overflow="auto" padding={4} width={360}>
122
- <Text as="p" display="block" font="body">
123
- Left Panel
124
- </Text>
125
- </VStack>
126
- <VStack flexGrow={1} overflow="auto" padding={4}>
127
- <Text as="p" display="block" font="body">
128
- Center Panel
129
- <br />
130
- {loremIpsum}
131
- </Text>
132
- </VStack>
133
- <VStack background="bgAlternate" height="100%" overflow="auto" padding={4} width={360}>
134
- <Text as="p" display="block" font="body">
135
- Right Panel
136
- </Text>
137
- </VStack>
138
- </HStack>
139
- <HStack borderedTop background="bgAlternate" padding={2}>
140
- <Text as="p" display="block" font="body">
141
- Bottom Panel (e.g., Footer, Actions)
142
- </Text>
143
- </HStack>
144
- </VStack>
145
- );
88
+ const smallButtonProps = {
89
+ size: 'small' as const,
90
+ compact: true,
91
+ };
146
92
 
147
93
  return (
148
94
  <PortalProvider>
149
- <Button ref={triggerRef} onClick={toggleOn}>
150
- Open Modal (All Panels)
95
+ <Button onClick={toggleOn} ref={triggerRef}>
96
+ Open Three-Column Modal
151
97
  </Button>
152
- {visible && (
153
- <FullscreenModalLayout
154
- onRequestClose={toggleOff}
155
- visible={visible}
156
- accessibilityLabel="All Panels Fullscreen Modal"
157
- >
158
- <VStack background="bg" height="100%" width="100%">
159
- {headerContent}
160
- {mainModalContent}
161
- </VStack>
162
- </FullscreenModalLayout>
163
- )}
98
+
99
+ <FullscreenModalLayout
100
+ visible={visible}
101
+ onRequestClose={toggleOff}
102
+ accessibilityLabel="Three-Column Fullscreen Modal"
103
+ >
104
+ <VStack background="bg" height="100%" width="100%">
105
+ <PageHeader
106
+ start={<LogoMark size={32} />}
107
+ title="Account Settings"
108
+ borderedBottom
109
+ flexShrink={0}
110
+ end={
111
+ <HStack alignItems="center" gap={2}>
112
+ <Link font="headline" color="fgPrimary">
113
+ Help
114
+ </Link>
115
+ <HStack gap={1}>
116
+ <IconButton
117
+ transparent
118
+ accessibilityLabel="Share"
119
+ name="externalLink"
120
+ testID="header-external-link-button"
121
+ />
122
+ <IconButton
123
+ transparent
124
+ accessibilityLabel="Close"
125
+ name="close"
126
+ onClick={toggleOff}
127
+ testID="header-close-button"
128
+ />
129
+ </HStack>
130
+ </HStack>
131
+ }
132
+ />
133
+ <HStack flexGrow={1} overflow="hidden" alignItems="stretch">
134
+ <Sidebar height="100%" variant="default" borderedEnd={false}>
135
+ <SidebarItem icon="account" title="Profile" onClick={() => {}} />
136
+ <SidebarItem icon="lock" title="Security" active onClick={() => {}} />
137
+ <SidebarItem icon="bell" title="Notifications" onClick={() => {}} />
138
+ <SidebarItem icon="eye" title="Privacy" onClick={() => {}} />
139
+ </Sidebar>
140
+ <Divider direction="vertical" />
141
+ <VStack flexGrow={1} height="100%" overflow="auto" padding={4} gap={3}>
142
+ <VStack gap={2}>
143
+ <Text as="h2" font="title2">
144
+ Security Settings
145
+ </Text>
146
+ <Text as="p" font="body" color="fgSecondary">
147
+ Manage your account security preferences and authentication methods.
148
+ </Text>
149
+ </VStack>
150
+ <VStack gap={2}>
151
+ <Text as="h3" font="title3">
152
+ Email and Password
153
+ </Text>
154
+ <ListCell
155
+ {...listCellProps}
156
+ title="Email address"
157
+ description="user@example.com"
158
+ action={
159
+ <Button variant="tertiary" {...smallButtonProps} disabled>
160
+ Change
161
+ </Button>
162
+ }
163
+ />
164
+ <ListCell
165
+ {...listCellProps}
166
+ title="Password"
167
+ description="Last changed 3 months ago"
168
+ media={<Icon name="lock" />}
169
+ action={
170
+ <Button variant="tertiary" {...smallButtonProps}>
171
+ Change
172
+ </Button>
173
+ }
174
+ />
175
+ </VStack>
176
+ <VStack gap={2}>
177
+ <Text as="h3" font="title3">
178
+ Two-Factor Authentication
179
+ </Text>
180
+ <ListCell
181
+ {...listCellProps}
182
+ title="SMS Authentication"
183
+ description="Receive codes via text message"
184
+ end={
185
+ <Button variant="secondary" {...smallButtonProps}>
186
+ Enable
187
+ </Button>
188
+ }
189
+ />
190
+ <ListCell
191
+ {...listCellProps}
192
+ title="Authenticator App"
193
+ description="Use an app like Google Authenticator"
194
+ end={
195
+ <Button variant="secondary" {...smallButtonProps}>
196
+ Enable
197
+ </Button>
198
+ }
199
+ />
200
+ </VStack>
201
+ <VStack gap={2}>
202
+ <Text as="h3" font="title3">
203
+ Active Sessions
204
+ </Text>
205
+ <ListCell
206
+ {...listCellProps}
207
+ title="Chrome on Mac"
208
+ description="San Francisco, CA • Last active 2 hours ago"
209
+ end={
210
+ <Button variant="tertiary" {...smallButtonProps}>
211
+ Revoke
212
+ </Button>
213
+ }
214
+ />
215
+ <ListCell
216
+ {...listCellProps}
217
+ title="Safari on iPhone"
218
+ description="San Francisco, CA • Last active 1 day ago"
219
+ end={
220
+ <Button variant="tertiary" {...smallButtonProps}>
221
+ Revoke
222
+ </Button>
223
+ }
224
+ />
225
+ <ListCell
226
+ {...listCellProps}
227
+ title="Firefox on Windows"
228
+ description="New York, NY • Last active 5 days ago"
229
+ end={
230
+ <Button variant="tertiary" {...smallButtonProps}>
231
+ Revoke
232
+ </Button>
233
+ }
234
+ />
235
+ </VStack>
236
+ <VStack gap={2}>
237
+ <Text as="h3" font="title3">
238
+ Security Alerts
239
+ </Text>
240
+ <ListCell
241
+ {...listCellProps}
242
+ title="Email notifications"
243
+ description="Get notified when there's suspicious activity"
244
+ end={
245
+ <Button variant="secondary" {...smallButtonProps}>
246
+ Configure
247
+ </Button>
248
+ }
249
+ />
250
+ <ListCell
251
+ {...listCellProps}
252
+ title="SMS alerts"
253
+ description="Receive text messages for critical security events"
254
+ end={
255
+ <Button variant="secondary" {...smallButtonProps}>
256
+ Configure
257
+ </Button>
258
+ }
259
+ />
260
+ </VStack>
261
+ <VStack gap={2}>
262
+ <Text as="h3" font="title3">
263
+ Backup Codes
264
+ </Text>
265
+ <Text as="p" font="body" color="fgSecondary">
266
+ Save these codes in a safe place. You can use them to access your account if you
267
+ lose access to your two-factor authentication device.
268
+ </Text>
269
+ <Button variant="secondary" block>
270
+ Generate New Backup Codes
271
+ </Button>
272
+ </VStack>
273
+ <VStack gap={2}>
274
+ <Text as="h3" font="title3">
275
+ API Keys
276
+ </Text>
277
+ <Text as="p" font="body" color="fgSecondary">
278
+ Manage API keys for programmatic access to your account. Keep them secure and
279
+ never share them publicly.
280
+ </Text>
281
+ <Button variant="secondary" block>
282
+ Manage API Keys
283
+ </Button>
284
+ </VStack>
285
+ <VStack gap={2}>
286
+ <Text as="h3" font="title3">
287
+ Account Recovery
288
+ </Text>
289
+ <Text as="p" font="body" color="fgSecondary">
290
+ Set up recovery options to help you regain access to your account if you're locked
291
+ out.
292
+ </Text>
293
+ <ListCell
294
+ {...listCellProps}
295
+ title="Recovery email"
296
+ description="user@example.com"
297
+ end={
298
+ <Button variant="tertiary" {...smallButtonProps}>
299
+ Change
300
+ </Button>
301
+ }
302
+ />
303
+ <ListCell
304
+ {...listCellProps}
305
+ title="Recovery phone"
306
+ description="+1 (555) 123-4567"
307
+ end={
308
+ <Button variant="tertiary" {...smallButtonProps}>
309
+ Change
310
+ </Button>
311
+ }
312
+ />
313
+ </VStack>
314
+ </VStack>
315
+ <Divider direction="vertical" />
316
+ <VStack height="100%" overflow="auto" padding={4} gap={3} width={320}>
317
+ <VStack gap={1}>
318
+ <Text as="h3" font="title3">
319
+ Security Tips
320
+ </Text>
321
+ <Text as="ul" font="body">
322
+ <li>Use a unique password that you don't use elsewhere</li>
323
+ <li>Enable two-factor authentication for added security</li>
324
+ <li>Regularly review your active sessions and devices</li>
325
+ </Text>
326
+ </VStack>
327
+ <VStack gap={2}>
328
+ <VStack gap={1}>
329
+ <Text as="h3" font="title3">
330
+ Need Help?
331
+ </Text>
332
+ <Text as="p" font="body">
333
+ If you're having trouble accessing your account, visit our{' '}
334
+ <Link font="body" color="fgPrimary">
335
+ support center
336
+ </Link>{' '}
337
+ or contact support.
338
+ </Text>
339
+ </VStack>
340
+ <Button variant="secondary" block endIcon="chatBotAgent" compact>
341
+ Chat with Support
342
+ </Button>
343
+ </VStack>
344
+ </VStack>
345
+ </HStack>
346
+ <PageFooter
347
+ borderedTop
348
+ flexShrink={0}
349
+ action={
350
+ <ButtonGroup direction="horizontal">
351
+ <Button variant="secondary" onClick={toggleOff}>
352
+ Cancel
353
+ </Button>
354
+ <Button variant="primary" onClick={toggleOff}>
355
+ Save
356
+ </Button>
357
+ </ButtonGroup>
358
+ }
359
+ />
360
+ </VStack>
361
+ </FullscreenModalLayout>
164
362
  </PortalProvider>
165
363
  );
166
364
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mcp-server",
3
- "version": "8.21.0",
3
+ "version": "8.21.1",
4
4
  "description": "Coinbase Design System - MCP Server",
5
5
  "repository": {
6
6
  "type": "git",