@neo4j-ndl/react 4.16.7 → 4.16.9

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 (109) hide show
  1. package/lib/cjs/color-picker/ColorPicker.js +3 -1
  2. package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
  3. package/lib/cjs/color-picker/stories/color-picker-dialog.story.js +40 -0
  4. package/lib/cjs/color-picker/stories/color-picker-dialog.story.js.map +1 -0
  5. package/lib/cjs/color-picker/stories/color-picker-popover.story.js +32 -0
  6. package/lib/cjs/color-picker/stories/color-picker-popover.story.js.map +1 -0
  7. package/lib/cjs/color-picker/stories/index.js +9 -1
  8. package/lib/cjs/color-picker/stories/index.js.map +1 -1
  9. package/lib/cjs/popover/use-popover.js +1 -1
  10. package/lib/cjs/popover/use-popover.js.map +1 -1
  11. package/lib/cjs/select/Select.js +2 -0
  12. package/lib/cjs/select/Select.js.map +1 -1
  13. package/lib/esm/color-picker/ColorPicker.js +3 -1
  14. package/lib/esm/color-picker/ColorPicker.js.map +1 -1
  15. package/lib/esm/color-picker/stories/color-picker-dialog.story.js +38 -0
  16. package/lib/esm/color-picker/stories/color-picker-dialog.story.js.map +1 -0
  17. package/lib/esm/color-picker/stories/color-picker-popover.story.js +30 -0
  18. package/lib/esm/color-picker/stories/color-picker-popover.story.js.map +1 -0
  19. package/lib/esm/color-picker/stories/index.js +6 -0
  20. package/lib/esm/color-picker/stories/index.js.map +1 -1
  21. package/lib/esm/popover/use-popover.js +1 -1
  22. package/lib/esm/popover/use-popover.js.map +1 -1
  23. package/lib/esm/select/Select.js +2 -0
  24. package/lib/esm/select/Select.js.map +1 -1
  25. package/lib/types/color-picker/ColorPicker.d.ts +4 -0
  26. package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
  27. package/lib/types/color-picker/stories/color-picker-dialog.story.d.ts +24 -0
  28. package/lib/types/color-picker/stories/color-picker-dialog.story.d.ts.map +1 -0
  29. package/lib/types/color-picker/stories/color-picker-popover.story.d.ts +24 -0
  30. package/lib/types/color-picker/stories/color-picker-popover.story.d.ts.map +1 -0
  31. package/lib/types/color-picker/stories/index.d.ts +4 -0
  32. package/lib/types/color-picker/stories/index.d.ts.map +1 -1
  33. package/lib/types/select/Select.d.ts.map +1 -1
  34. package/package.json +5 -2
  35. package/skills/ndl-react/SKILL.md +152 -0
  36. package/skills/ndl-react/components/accordion.md +386 -0
  37. package/skills/ndl-react/components/ai/code-preview.md +128 -0
  38. package/skills/ndl-react/components/ai/file-tag.md +90 -0
  39. package/skills/ndl-react/components/ai/image-tag.md +91 -0
  40. package/skills/ndl-react/components/ai/more-files.md +73 -0
  41. package/skills/ndl-react/components/ai/presence.md +54 -0
  42. package/skills/ndl-react/components/ai/preview.md +498 -0
  43. package/skills/ndl-react/components/ai/prompt.md +362 -0
  44. package/skills/ndl-react/components/ai/reasoning.md +95 -0
  45. package/skills/ndl-react/components/ai/response.md +1109 -0
  46. package/skills/ndl-react/components/ai/suggestion.md +84 -0
  47. package/skills/ndl-react/components/ai/thinking.md +43 -0
  48. package/skills/ndl-react/components/ai/tool-call.md +43 -0
  49. package/skills/ndl-react/components/ai/user-bubble.md +187 -0
  50. package/skills/ndl-react/components/avatar.md +169 -0
  51. package/skills/ndl-react/components/banner.md +225 -0
  52. package/skills/ndl-react/components/box.md +39 -0
  53. package/skills/ndl-react/components/breadcrumbs.md +245 -0
  54. package/skills/ndl-react/components/checkbox.md +269 -0
  55. package/skills/ndl-react/components/clean-icon-button.md +294 -0
  56. package/skills/ndl-react/components/clipboard-button.md +154 -0
  57. package/skills/ndl-react/components/code-block.md +276 -0
  58. package/skills/ndl-react/components/code.md +68 -0
  59. package/skills/ndl-react/components/color-picker.md +131 -0
  60. package/skills/ndl-react/components/conditional-wrap.md +46 -0
  61. package/skills/ndl-react/components/data-grid.md +3121 -0
  62. package/skills/ndl-react/components/date-picker.md +652 -0
  63. package/skills/ndl-react/components/dialog.md +485 -0
  64. package/skills/ndl-react/components/dismissible-tag.md +136 -0
  65. package/skills/ndl-react/components/divider.md +96 -0
  66. package/skills/ndl-react/components/drawer.md +543 -0
  67. package/skills/ndl-react/components/dropdown-button.md +161 -0
  68. package/skills/ndl-react/components/dropzone.md +371 -0
  69. package/skills/ndl-react/components/filled-button.md +26 -0
  70. package/skills/ndl-react/components/flex.md +82 -0
  71. package/skills/ndl-react/components/graph-label.md +167 -0
  72. package/skills/ndl-react/components/icon-button-array.md +187 -0
  73. package/skills/ndl-react/components/icon-button.md +193 -0
  74. package/skills/ndl-react/components/inline-edit.md +209 -0
  75. package/skills/ndl-react/components/kbd.md +63 -0
  76. package/skills/ndl-react/components/loading-bar.md +43 -0
  77. package/skills/ndl-react/components/loading-spinner.md +57 -0
  78. package/skills/ndl-react/components/logo.md +57 -0
  79. package/skills/ndl-react/components/menu.md +993 -0
  80. package/skills/ndl-react/components/modal.md +27 -0
  81. package/skills/ndl-react/components/next/tree-view.md +966 -0
  82. package/skills/ndl-react/components/outlined-button.md +26 -0
  83. package/skills/ndl-react/components/popover.md +283 -0
  84. package/skills/ndl-react/components/progress-bar.md +70 -0
  85. package/skills/ndl-react/components/radio.md +150 -0
  86. package/skills/ndl-react/components/read-only-tag.md +96 -0
  87. package/skills/ndl-react/components/segmented-control.md +200 -0
  88. package/skills/ndl-react/components/select-icon-button.md +183 -0
  89. package/skills/ndl-react/components/select.md +530 -0
  90. package/skills/ndl-react/components/selectable-tag.md +203 -0
  91. package/skills/ndl-react/components/side-navigation.md +652 -0
  92. package/skills/ndl-react/components/skeleton.md +274 -0
  93. package/skills/ndl-react/components/slider.md +308 -0
  94. package/skills/ndl-react/components/spotlight.md +796 -0
  95. package/skills/ndl-react/components/status-indicator.md +57 -0
  96. package/skills/ndl-react/components/status-label.md +132 -0
  97. package/skills/ndl-react/components/switch.md +167 -0
  98. package/skills/ndl-react/components/tabs.md +433 -0
  99. package/skills/ndl-react/components/tag.md +91 -0
  100. package/skills/ndl-react/components/text-area.md +178 -0
  101. package/skills/ndl-react/components/text-button.md +25 -0
  102. package/skills/ndl-react/components/text-input.md +475 -0
  103. package/skills/ndl-react/components/text-link.md +119 -0
  104. package/skills/ndl-react/components/time-picker.md +137 -0
  105. package/skills/ndl-react/components/timezone-picker.md +496 -0
  106. package/skills/ndl-react/components/tooltip.md +478 -0
  107. package/skills/ndl-react/components/tree-view.md +545 -0
  108. package/skills/ndl-react/components/typography.md +72 -0
  109. package/skills/ndl-react/components/wizard.md +152 -0
@@ -0,0 +1,73 @@
1
+ # MoreFilesComponent
2
+
3
+ Import: `import { MoreFilesComponent } from '@neo4j-ndl/react/ai'`
4
+
5
+ ## Props
6
+
7
+ ### MoreFilesComponent
8
+
9
+ | Prop | Type | Required | Default | Description |
10
+ |------|------|----------|---------|-------------|
11
+ | `count` | `number` | ✅ | | The number of files to show |
12
+ | `isActive` | `boolean` | | | Whether the more files button is active. Should be true when it opens the menu of files. |
13
+ | `onClick` | `(() => void)` | | | Callback function triggered when the more files button is clicked |
14
+ | `ref` | `Ref<HTMLButtonElement>` | | | A ref to apply to the root element. |
15
+
16
+ ## Examples
17
+
18
+ ### Default
19
+
20
+ ```tsx
21
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
22
+
23
+ import { Menu } from '@neo4j-ndl/react';
24
+ import { MoreFiles } from '@neo4j-ndl/react/ai';
25
+ import {
26
+ DocumentIconOutline,
27
+ PhotoIconOutline,
28
+ TableCellsIconOutline,
29
+ } from '@neo4j-ndl/react/icons';
30
+ import { useRef, useState } from 'react';
31
+
32
+ const Component = () => {
33
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
34
+ const anchorRef = useRef<HTMLButtonElement | null>(null);
35
+
36
+ return (
37
+ <>
38
+ <MoreFiles
39
+ count={3}
40
+ isActive={isMenuOpen}
41
+ onClick={() => setIsMenuOpen(!isMenuOpen)}
42
+ ref={anchorRef}
43
+ />
44
+ <Menu
45
+ isOpen={isMenuOpen}
46
+ anchorRef={anchorRef}
47
+ onClose={() => setIsMenuOpen(false)}
48
+ >
49
+ <Menu.Item
50
+ leadingVisual={<DocumentIconOutline />}
51
+ title="Science fiction bestseller"
52
+ description="PDF"
53
+ onClick={() => alert('Science fiction bestseller')}
54
+ />
55
+ <Menu.Item
56
+ leadingVisual={<TableCellsIconOutline />}
57
+ title="MoviesDecade"
58
+ description="CSV"
59
+ onClick={() => alert('MoviesDecade')}
60
+ />
61
+ <Menu.Item
62
+ leadingVisual={<PhotoIconOutline />}
63
+ title="Family photo"
64
+ description="JPG"
65
+ onClick={() => alert('Family photos')}
66
+ />
67
+ </Menu>
68
+ </>
69
+ );
70
+ };
71
+
72
+ export default Component;
73
+ ```
@@ -0,0 +1,54 @@
1
+ # Presence
2
+
3
+ Import: `import { Presence } from '@neo4j-ndl/react/ai'`
4
+
5
+ ## Props
6
+
7
+ ### Presence
8
+
9
+ | Prop | Type | Required | Default | Description |
10
+ |------|------|----------|---------|-------------|
11
+ | `isThinking` | `boolean` | | `false` | Whether the AI is thinking. Animates the underlying SVG |
12
+ | `ref` | `Ref<SVGSVGElement>` | | | A ref to apply to the root element. |
13
+
14
+ ## Examples
15
+
16
+ ### Ai Presence Default
17
+
18
+ ```tsx
19
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
20
+
21
+ import { FilledButton } from '@neo4j-ndl/react';
22
+ import { Presence } from '@neo4j-ndl/react/ai';
23
+ import { useState } from 'react';
24
+
25
+ const Component = () => {
26
+ const [isThinking, setIsThinking] = useState(false);
27
+
28
+ return (
29
+ <div className="n-flex n-gap-token-8">
30
+ <Presence className="n-size-token-32" isThinking={isThinking} />
31
+ <FilledButton onClick={() => setIsThinking(!isThinking)}>
32
+ Toggle Thinking
33
+ </FilledButton>
34
+ </div>
35
+ );
36
+ };
37
+
38
+ export default Component;
39
+ ```
40
+
41
+ ### Ai Presence Thinking
42
+
43
+ ```tsx
44
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
45
+
46
+ import { Presence } from '@neo4j-ndl/react/ai';
47
+
48
+ // TODO: consider this story when happo is ready
49
+ const Component = () => {
50
+ return <Presence isThinking className="n-size-token-32" />;
51
+ };
52
+
53
+ export default Component;
54
+ ```
@@ -0,0 +1,498 @@
1
+ # Preview
2
+
3
+ Import: `import { Preview } from '@neo4j-ndl/react/ai'`
4
+
5
+ ## Props
6
+
7
+ ### Preview
8
+
9
+ | Prop | Type | Required | Default | Description |
10
+ |------|------|----------|---------|-------------|
11
+ | `children` | `ReactNode` | ✅ | | |
12
+ | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
13
+
14
+ ### Preview.Code
15
+
16
+ | Prop | Type | Required | Default | Description |
17
+ |------|------|----------|---------|-------------|
18
+ | `code` | `string` | ✅ | | The code content to display |
19
+ | `headerActions` | `ReactNode` | | | The actions to display in the header. Should be small buttons or icon buttons only. |
20
+ | `isLoading` | `boolean` | | `false` | Whether the code block is loading |
21
+ | `label` | `'read' \| 'write'` | | | The current state of the code block |
22
+ | `language` | `any` | ✅ | | The language of the code (e.g., 'cypher', 'python', 'javascript') |
23
+ | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
24
+ | `theme` | `'ndl-code-dark' \| 'ndl-code-light'` | | | The theme of the code block |
25
+
26
+ ### Preview.Confirmation
27
+
28
+ | Prop | Type | Required | Default | Description |
29
+ |------|------|----------|---------|-------------|
30
+ | `actions` | `ReactNode` | ✅ | | The actions to display in the confirmation, usually two buttons; one for confirming and one for rejecting. |
31
+ | `children` | `ReactNode` | | | The content to display in the confirmation |
32
+ | `confirmedActionText` | `string` | | `Action confirmed` | The text to display for the confirmed status |
33
+ | `isFooter` | `boolean` | | `false` | Whether the confirmation is used as a footer |
34
+ | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
35
+ | `rejectedActionText` | `string` | | `Action rejected` | The text to display for the rejected status |
36
+ | `status` | `'confirmed' \| 'pending' \| 'rejected'` | | `pending` | The status of the confirmation |
37
+
38
+ ### Preview.Content
39
+
40
+ | Prop | Type | Required | Default | Description |
41
+ |------|------|----------|---------|-------------|
42
+ | `children` | `ReactNode` | | | |
43
+ | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
44
+
45
+ ### Preview.Header
46
+
47
+ | Prop | Type | Required | Default | Description |
48
+ |------|------|----------|---------|-------------|
49
+ | `actions` | `ReactNode` | | | |
50
+ | `children` | `ReactNode` | | | |
51
+ | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
52
+
53
+ ## Examples
54
+
55
+ ### Code Confirmation
56
+
57
+ ```tsx
58
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
59
+
60
+ import { FilledButton, OutlinedButton } from '@neo4j-ndl/react';
61
+ import { Preview } from '@neo4j-ndl/react/ai';
62
+ import { useState } from 'react';
63
+
64
+ const cypherCode = `SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S] EXECUTABLE BY
65
+ username
66
+ [YIELD { * | field[, ...] } [ORDER BY field ...`;
67
+
68
+ const Component = () => {
69
+ const [status, setStatus] =
70
+ useState<React.ComponentProps<typeof Preview.Confirmation>['status']>(
71
+ 'pending',
72
+ );
73
+
74
+ return (
75
+ <Preview>
76
+ <Preview.Code
77
+ code={cypherCode}
78
+ language="cypher"
79
+ label="write"
80
+ isLoading={false}
81
+ headerActions={null}
82
+ />
83
+ <Preview.Confirmation
84
+ status={status}
85
+ isFooter={true}
86
+ confirmedActionText="Action confirmed"
87
+ rejectedActionText="Action rejected"
88
+ actions={
89
+ <>
90
+ <OutlinedButton
91
+ variant="neutral"
92
+ size="small"
93
+ onClick={() => setStatus('rejected')}
94
+ >
95
+ Skip
96
+ </OutlinedButton>
97
+ <FilledButton
98
+ variant="primary"
99
+ size="small"
100
+ onClick={() => setStatus('confirmed')}
101
+ >
102
+ Run query
103
+ </FilledButton>
104
+ </>
105
+ }
106
+ >
107
+ Assistant wants to run this query
108
+ </Preview.Confirmation>
109
+ </Preview>
110
+ );
111
+ };
112
+
113
+ export default Component;
114
+ ```
115
+
116
+ ### Code Languages
117
+
118
+ ```tsx
119
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
120
+
121
+ import { Preview } from '@neo4j-ndl/react/ai';
122
+
123
+ const pythonCode = `def show_functions(username, function_type='ALL'):
124
+ """
125
+ Show functions executable by user
126
+ """
127
+ query = f"SHOW {function_type} FUNCTIONS EXECUTABLE BY {username}"
128
+ return query`;
129
+
130
+ const Component = () => {
131
+ return (
132
+ <Preview>
133
+ <Preview.Code code={pythonCode} language="python" />
134
+ </Preview>
135
+ );
136
+ };
137
+
138
+ export default Component;
139
+ ```
140
+
141
+ ### Code Loading
142
+
143
+ ```tsx
144
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
145
+
146
+ import { Preview } from '@neo4j-ndl/react/ai';
147
+
148
+ const Component = () => {
149
+ return (
150
+ <Preview>
151
+ <Preview.Code code="" language="cypher" isLoading={true} />
152
+ </Preview>
153
+ );
154
+ };
155
+
156
+ export default Component;
157
+ ```
158
+
159
+ ### Code Read
160
+
161
+ ```tsx
162
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
163
+
164
+ import { OutlinedButton } from '@neo4j-ndl/react';
165
+ import { Preview } from '@neo4j-ndl/react/ai';
166
+ import { PencilSquareIconOutline } from '@neo4j-ndl/react/icons';
167
+
168
+ const cypherCode = `SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S] EXECUTABLE BY
169
+ username
170
+ [YIELD { * | field[, ...] } [ORDER BY field ...`;
171
+
172
+ const Component = () => {
173
+ return (
174
+ <Preview>
175
+ <Preview.Code
176
+ code={cypherCode}
177
+ language="cypher"
178
+ label="read"
179
+ headerActions={
180
+ <OutlinedButton
181
+ leadingVisual={<PencilSquareIconOutline />}
182
+ variant="neutral"
183
+ size="small"
184
+ >
185
+ Send to Query
186
+ </OutlinedButton>
187
+ }
188
+ />
189
+ </Preview>
190
+ );
191
+ };
192
+
193
+ export default Component;
194
+ ```
195
+
196
+ ### Code Write
197
+
198
+ ```tsx
199
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
200
+
201
+ import { CleanIconButton } from '@neo4j-ndl/react';
202
+ import { Preview } from '@neo4j-ndl/react/ai';
203
+ import {
204
+ PencilSquareIconOutline,
205
+ PlayCircleIconOutline,
206
+ } from '@neo4j-ndl/react/icons';
207
+
208
+ const cypherCode = `SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S] EXECUTABLE BY
209
+ username
210
+ [YIELD { * | field[, ...] } [ORDER BY field ...`;
211
+
212
+ const Component = () => {
213
+ return (
214
+ <Preview>
215
+ <Preview.Code
216
+ code={cypherCode}
217
+ language="cypher"
218
+ label="write"
219
+ headerActions={
220
+ <>
221
+ <CleanIconButton
222
+ variant="neutral"
223
+ description="Send to Query"
224
+ size="small"
225
+ >
226
+ <PencilSquareIconOutline />
227
+ </CleanIconButton>
228
+ <CleanIconButton
229
+ variant="neutral"
230
+ description="Run in Query"
231
+ size="small"
232
+ >
233
+ <PlayCircleIconOutline />
234
+ </CleanIconButton>
235
+ </>
236
+ }
237
+ />
238
+ </Preview>
239
+ );
240
+ };
241
+
242
+ export default Component;
243
+ ```
244
+
245
+ ### Confirmation Standalone
246
+
247
+ ```tsx
248
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
249
+
250
+ import { FilledButton, OutlinedButton } from '@neo4j-ndl/react';
251
+ import { Preview } from '@neo4j-ndl/react/ai';
252
+ import { useState } from 'react';
253
+
254
+ const Component = () => {
255
+ const [status, setStatus] =
256
+ useState<React.ComponentProps<typeof Preview.Confirmation>['status']>(
257
+ 'pending',
258
+ );
259
+
260
+ return (
261
+ <Preview>
262
+ <Preview.Confirmation
263
+ status={status}
264
+ isFooter={false}
265
+ confirmedActionText="Action confirmed"
266
+ rejectedActionText="Action rejected"
267
+ actions={
268
+ <>
269
+ <OutlinedButton
270
+ variant="neutral"
271
+ size="small"
272
+ onClick={() => setStatus('rejected')}
273
+ >
274
+ Reject
275
+ </OutlinedButton>
276
+ <FilledButton
277
+ variant="primary"
278
+ size="small"
279
+ onClick={() => setStatus('confirmed')}
280
+ >
281
+ Confirm
282
+ </FilledButton>
283
+ </>
284
+ }
285
+ >
286
+ This confirmation is used when the assistant does not have a preview,
287
+ but asks about doing something in plain text on top of the canvas in the
288
+ chat. Do you approve this action?
289
+ </Preview.Confirmation>
290
+ </Preview>
291
+ );
292
+ };
293
+
294
+ export default Component;
295
+ ```
296
+
297
+ ### Data Grid
298
+
299
+ ```tsx
300
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
301
+
302
+ import { DataGrid, FilledButton, OutlinedButton } from '@neo4j-ndl/react';
303
+ import { Preview } from '@neo4j-ndl/react/ai';
304
+ import {
305
+ getCoreRowModel,
306
+ getSortedRowModel,
307
+ useReactTable,
308
+ } from '@tanstack/react-table';
309
+ import { useState } from 'react';
310
+
311
+ const DATA = [
312
+ {
313
+ project_role: 'Viewer',
314
+ user: 'John Doe',
315
+ },
316
+ {
317
+ project_role: 'Viewer',
318
+ user: 'Alice Appleton',
319
+ },
320
+ {
321
+ project_role: 'Editor',
322
+ user: 'Bob Blueburr',
323
+ },
324
+ ];
325
+
326
+ const Component = () => {
327
+ const [status, setStatus] =
328
+ useState<React.ComponentProps<typeof Preview.Confirmation>['status']>(
329
+ 'pending',
330
+ );
331
+
332
+ const table = useReactTable({
333
+ columns: [
334
+ {
335
+ accessorKey: 'user',
336
+ header: 'User',
337
+ },
338
+ {
339
+ accessorKey: 'project_role',
340
+ header: 'Project Role',
341
+ },
342
+ ],
343
+ data: DATA,
344
+ defaultColumn: {
345
+ minSize: 100,
346
+ },
347
+ enableSorting: true,
348
+ getCoreRowModel: getCoreRowModel(),
349
+ getSortedRowModel: getSortedRowModel(),
350
+ });
351
+
352
+ return (
353
+ <Preview>
354
+ <DataGrid
355
+ isResizable={false}
356
+ tableInstance={table}
357
+ isKeyboardNavigable={false}
358
+ styling={{
359
+ borderStyle: 'all-sides',
360
+ }}
361
+ components={{
362
+ Navigation: null,
363
+ }}
364
+ />
365
+ <Preview.Confirmation
366
+ isFooter={true}
367
+ status={status}
368
+ actions={
369
+ <>
370
+ <OutlinedButton
371
+ variant="neutral"
372
+ size="small"
373
+ onClick={() => setStatus('rejected')}
374
+ >
375
+ Skip
376
+ </OutlinedButton>
377
+ <FilledButton
378
+ variant="primary"
379
+ size="small"
380
+ onClick={() => setStatus('confirmed')}
381
+ >
382
+ Invite users
383
+ </FilledButton>
384
+ </>
385
+ }
386
+ >
387
+ Assistant wants to perform an action
388
+ </Preview.Confirmation>
389
+ </Preview>
390
+ );
391
+ };
392
+
393
+ export default Component;
394
+ ```
395
+
396
+ ### Simple
397
+
398
+ ```tsx
399
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
400
+
401
+ import { FilledButton, OutlinedButton } from '@neo4j-ndl/react';
402
+ import { Preview } from '@neo4j-ndl/react/ai';
403
+ import { useState } from 'react';
404
+
405
+ const Component = () => {
406
+ const [status, setStatus] =
407
+ useState<React.ComponentProps<typeof Preview.Confirmation>['status']>(
408
+ 'pending',
409
+ );
410
+
411
+ return (
412
+ <Preview>
413
+ <Preview.Header>CONNECT TO INSTANCE</Preview.Header>
414
+ <Preview.Confirmation
415
+ status={status}
416
+ isFooter={true}
417
+ confirmedActionText="Instance selected"
418
+ rejectedActionText="Skipped"
419
+ actions={
420
+ <>
421
+ <OutlinedButton
422
+ variant="neutral"
423
+ size="small"
424
+ onClick={() => setStatus('rejected')}
425
+ >
426
+ Skip
427
+ </OutlinedButton>
428
+ <FilledButton
429
+ variant="primary"
430
+ size="small"
431
+ onClick={() => setStatus('confirmed')}
432
+ >
433
+ Select instance
434
+ </FilledButton>
435
+ </>
436
+ }
437
+ ></Preview.Confirmation>
438
+ </Preview>
439
+ );
440
+ };
441
+
442
+ export default Component;
443
+ ```
444
+
445
+ ### Simple With Content
446
+
447
+ ```tsx
448
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
449
+
450
+ import { FilledButton, OutlinedButton, ReadOnlyTag } from '@neo4j-ndl/react';
451
+ import { Preview } from '@neo4j-ndl/react/ai';
452
+ import { DeploymentsIcon } from '@neo4j-ndl/react/icons';
453
+ import { useState } from 'react';
454
+
455
+ const Component = () => {
456
+ const [status, setStatus] =
457
+ useState<React.ComponentProps<typeof Preview.Confirmation>['status']>(
458
+ 'pending',
459
+ );
460
+
461
+ return (
462
+ <Preview>
463
+ <Preview.Header>CONNECT TO INSTANCE</Preview.Header>
464
+ <Preview.Content>
465
+ <ReadOnlyTag size="small" leadingVisual={<DeploymentsIcon />}>
466
+ Instance 1
467
+ </ReadOnlyTag>
468
+ </Preview.Content>
469
+ <Preview.Confirmation
470
+ status={status}
471
+ isFooter={true}
472
+ confirmedActionText="Allowed action"
473
+ rejectedActionText="Skipped action"
474
+ actions={
475
+ <>
476
+ <OutlinedButton
477
+ variant="neutral"
478
+ size="small"
479
+ onClick={() => setStatus('rejected')}
480
+ >
481
+ Skip
482
+ </OutlinedButton>
483
+ <FilledButton
484
+ variant="primary"
485
+ size="small"
486
+ onClick={() => setStatus('confirmed')}
487
+ >
488
+ Allow
489
+ </FilledButton>
490
+ </>
491
+ }
492
+ ></Preview.Confirmation>
493
+ </Preview>
494
+ );
495
+ };
496
+
497
+ export default Component;
498
+ ```