@flamingo-stack/openframe-frontend-core 0.0.383-snapshot.20260708154433 → 0.0.383
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/dist/{chunk-FBUTS5UQ.js → chunk-6SR7HXGW.js} +4 -4
- package/dist/{chunk-FV2FQQYF.cjs → chunk-7TU6MLIQ.cjs} +12 -12
- package/dist/{chunk-FV2FQQYF.cjs.map → chunk-7TU6MLIQ.cjs.map} +1 -1
- package/dist/{chunk-Q6EGRFVE.cjs → chunk-AHCBZ6TC.cjs} +62 -62
- package/dist/{chunk-Q6EGRFVE.cjs.map → chunk-AHCBZ6TC.cjs.map} +1 -1
- package/dist/{chunk-UOLDL3U3.js → chunk-AJJF43ZL.js} +2 -2
- package/dist/{chunk-FQR2CNKB.js → chunk-B45U4FY5.js} +2 -2
- package/dist/{chunk-Q2OBKYTK.cjs → chunk-BALSUWWU.cjs} +37 -37
- package/dist/{chunk-Q2OBKYTK.cjs.map → chunk-BALSUWWU.cjs.map} +1 -1
- package/dist/{chunk-VZ4NJBQT.js → chunk-CNDLMBFN.js} +283 -345
- package/dist/chunk-CNDLMBFN.js.map +1 -0
- package/dist/{chunk-MVLWQ6OZ.js → chunk-EBOK7SG7.js} +2 -2
- package/dist/{chunk-KJ3O7A65.js → chunk-EGFLSQEJ.js} +4 -4
- package/dist/{chunk-MMYAOMD4.cjs → chunk-FL6YJLPC.cjs} +7 -7
- package/dist/{chunk-MMYAOMD4.cjs.map → chunk-FL6YJLPC.cjs.map} +1 -1
- package/dist/{chunk-XGE53EOX.js → chunk-KBG3PLKS.js} +2 -2
- package/dist/{chunk-KJTGCH3I.cjs → chunk-KFTCNBSJ.cjs} +5 -5
- package/dist/{chunk-KJTGCH3I.cjs.map → chunk-KFTCNBSJ.cjs.map} +1 -1
- package/dist/{chunk-FSN3GIUJ.cjs → chunk-KGSOMSHT.cjs} +25 -25
- package/dist/{chunk-FSN3GIUJ.cjs.map → chunk-KGSOMSHT.cjs.map} +1 -1
- package/dist/{chunk-K7YBWMJ6.js → chunk-KQQ6U4UW.js} +4 -4
- package/dist/{chunk-JEADRVBL.js → chunk-LI7OAUSA.js} +4 -4
- package/dist/{chunk-LMIN2CWQ.js → chunk-MY7TV47R.js} +2 -2
- package/dist/{chunk-KI5QS5C2.cjs → chunk-S2V4EPKL.cjs} +15 -15
- package/dist/{chunk-KI5QS5C2.cjs.map → chunk-S2V4EPKL.cjs.map} +1 -1
- package/dist/{chunk-EEUUTWFQ.js → chunk-SGMZQTP6.js} +2 -2
- package/dist/{chunk-NGWYDTZZ.cjs → chunk-VQCV3GGI.cjs} +120 -182
- package/dist/chunk-VQCV3GGI.cjs.map +1 -0
- package/dist/{chunk-AZOME5YC.cjs → chunk-W456FUZG.cjs} +57 -57
- package/dist/{chunk-AZOME5YC.cjs.map → chunk-W456FUZG.cjs.map} +1 -1
- package/dist/{chunk-H7PRWFAQ.cjs → chunk-WVJFSCXR.cjs} +26 -26
- package/dist/{chunk-H7PRWFAQ.cjs.map → chunk-WVJFSCXR.cjs.map} +1 -1
- package/dist/{chunk-FG4J67VX.cjs → chunk-YW6K7IYF.cjs} +31 -31
- package/dist/{chunk-FG4J67VX.cjs.map → chunk-YW6K7IYF.cjs.map} +1 -1
- package/dist/{chunk-U22GJXOD.js → chunk-ZD6GZX7E.js} +2 -2
- package/dist/{chunk-WRAECAST.cjs → chunk-ZFIDR55N.cjs} +9 -9
- package/dist/{chunk-WRAECAST.cjs.map → chunk-ZFIDR55N.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/approval-batch-message.d.ts +0 -20
- package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -4
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +1 -3
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-tile.d.ts +2 -8
- package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
- package/dist/components/features/notifications/types.d.ts +1 -11
- package/dist/components/features/notifications/types.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +120 -122
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +9 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -4
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +1 -3
- package/dist/index.cjs +2 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -3
- package/package.json +1 -1
- package/src/components/chat/approval-batch-message.tsx +15 -28
- package/src/components/features/notifications/approval-request-notification-tile.tsx +46 -70
- package/src/components/features/notifications/notification-tile.tsx +41 -125
- package/src/components/features/notifications/types.ts +1 -11
- package/src/stories/NotificationDrawer.stories.tsx +31 -220
- package/dist/chunk-NGWYDTZZ.cjs.map +0 -1
- package/dist/chunk-VZ4NJBQT.js.map +0 -1
- /package/dist/{chunk-FBUTS5UQ.js.map → chunk-6SR7HXGW.js.map} +0 -0
- /package/dist/{chunk-UOLDL3U3.js.map → chunk-AJJF43ZL.js.map} +0 -0
- /package/dist/{chunk-FQR2CNKB.js.map → chunk-B45U4FY5.js.map} +0 -0
- /package/dist/{chunk-MVLWQ6OZ.js.map → chunk-EBOK7SG7.js.map} +0 -0
- /package/dist/{chunk-KJ3O7A65.js.map → chunk-EGFLSQEJ.js.map} +0 -0
- /package/dist/{chunk-XGE53EOX.js.map → chunk-KBG3PLKS.js.map} +0 -0
- /package/dist/{chunk-K7YBWMJ6.js.map → chunk-KQQ6U4UW.js.map} +0 -0
- /package/dist/{chunk-JEADRVBL.js.map → chunk-LI7OAUSA.js.map} +0 -0
- /package/dist/{chunk-LMIN2CWQ.js.map → chunk-MY7TV47R.js.map} +0 -0
- /package/dist/{chunk-EEUUTWFQ.js.map → chunk-SGMZQTP6.js.map} +0 -0
- /package/dist/{chunk-U22GJXOD.js.map → chunk-ZD6GZX7E.js.map} +0 -0
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Button } from '../components/ui/button';
|
|
4
|
-
import { BracketCurlyIcon } from '../components/icons-v2-generated/coding/bracket-curly-icon';
|
|
5
|
-
import { MonitorIcon } from '../components/icons-v2-generated/devices/monitor-icon';
|
|
6
|
-
import { AlertTriangleIcon } from '../components/icons-v2-generated/interface/alert-triangle-icon';
|
|
7
|
-
import { BannedIcon } from '../components/icons-v2-generated/security/banned-icon';
|
|
8
|
-
import { UserPlusIcon } from '../components/icons-v2-generated/users/user-plus-icon';
|
|
9
4
|
import {
|
|
10
5
|
ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE,
|
|
11
6
|
ApprovalRequestNotificationTile,
|
|
@@ -49,100 +44,47 @@ const meta = {
|
|
|
49
44
|
export default meta;
|
|
50
45
|
type Story = StoryObj<typeof meta>;
|
|
51
46
|
|
|
52
|
-
/** Inline avatar stand-in so the image slot renders without network access. */
|
|
53
|
-
const CUSTOMER_AVATAR =
|
|
54
|
-
'data:image/svg+xml;utf8,' +
|
|
55
|
-
encodeURIComponent(
|
|
56
|
-
'<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><rect width="32" height="32" fill="#5EFC8D"/><circle cx="16" cy="12" r="6" fill="#212121"/><path d="M4 32c0-6.6 5.4-12 12-12s12 5.4 12 12" fill="#212121"/></svg>',
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
/** Seed an approval-request notification in a given resolution state. */
|
|
60
|
-
const approvalSeed = (
|
|
61
|
-
n: number,
|
|
62
|
-
resolution: string | null,
|
|
63
|
-
resolvedByName: string | null,
|
|
64
|
-
minutesAgo: number,
|
|
65
|
-
): Notification => ({
|
|
66
|
-
id: `seed-approval-${n}`,
|
|
67
|
-
variant: 'warning',
|
|
68
|
-
title: 'Clear stuck print queue',
|
|
69
|
-
description: 'Mingo wants to restart the Spooler service on SRV-PRINT01.',
|
|
70
|
-
createdAt: Date.now() - 1_000 * 60 * minutesAgo,
|
|
71
|
-
read: false,
|
|
72
|
-
meta: {
|
|
73
|
-
contextType: ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE,
|
|
74
|
-
approvalRequestId: `seed-req-${n}`,
|
|
75
|
-
approvalType: 'ADMIN',
|
|
76
|
-
resolution,
|
|
77
|
-
resolvedByName,
|
|
78
|
-
toolCalls: [
|
|
79
|
-
{
|
|
80
|
-
toolExecutionRequestId: `seed-ter-${n}`,
|
|
81
|
-
toolName: 'run_command',
|
|
82
|
-
toolTitle: 'Restart print spooler',
|
|
83
|
-
toolType: 'OPENFRAME_RMM',
|
|
84
|
-
toolExplanation: 'Restarts the Spooler service to clear a stuck print queue.',
|
|
85
|
-
requiresApproval: true,
|
|
86
|
-
toolCallArguments: { command: 'Restart-Service -Name Spooler -Force' },
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
|
|
92
47
|
const SEED: Notification[] = [
|
|
93
48
|
{
|
|
94
49
|
id: 'seed-1',
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
title: 'Acme Corp',
|
|
99
|
-
description: 'Added by John Smith',
|
|
50
|
+
variant: 'success',
|
|
51
|
+
title: 'Device Deployment Complete',
|
|
52
|
+
description: 'HP EliteBook deployed to Marketing Dept',
|
|
100
53
|
createdAt: Date.now() - 1_000 * 30,
|
|
101
54
|
read: false,
|
|
102
55
|
},
|
|
103
|
-
approvalSeed(1, null, null, 2),
|
|
104
56
|
{
|
|
105
57
|
id: 'seed-2',
|
|
106
58
|
variant: 'success',
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
title: 'HP EliteBook',
|
|
110
|
-
description: 'Deployed to Marketing Dept',
|
|
59
|
+
title: 'Device Deployment Complete',
|
|
60
|
+
description: 'HP EliteBook deployed to Marketing Dept',
|
|
111
61
|
createdAt: Date.now() - 1_000 * 60 * 5,
|
|
112
62
|
read: false,
|
|
113
63
|
},
|
|
114
64
|
{
|
|
115
65
|
id: 'seed-3',
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
title: 'ACME-WS01',
|
|
120
|
-
description: 'USB storage device connected',
|
|
66
|
+
variant: 'error',
|
|
67
|
+
title: 'Policy Violation Detected',
|
|
68
|
+
description: 'USB storage device connected to ACME-WS01',
|
|
121
69
|
createdAt: Date.now() - 1_000 * 60 * 12,
|
|
122
70
|
read: false,
|
|
123
71
|
},
|
|
124
72
|
{
|
|
125
73
|
id: 'seed-4',
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
title: 'SRV-DB01',
|
|
130
|
-
description: 'C: drive at 95% capacity',
|
|
74
|
+
variant: 'error',
|
|
75
|
+
title: 'Disk Space Check Failed',
|
|
76
|
+
description: 'C: drive at 95% capacity on SRV-DB01',
|
|
131
77
|
createdAt: Date.now() - 1_000 * 60 * 35,
|
|
132
78
|
read: false,
|
|
133
79
|
},
|
|
134
|
-
approvalSeed(2, 'APPROVED', 'John Smith', 45),
|
|
135
80
|
{
|
|
136
81
|
id: 'seed-5',
|
|
137
82
|
variant: 'success',
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
title: 'Windows Update',
|
|
141
|
-
description: 'Script finished on 45 devices',
|
|
83
|
+
title: 'Script Execution Complete',
|
|
84
|
+
description: 'Windows Update script finished on 45 devices',
|
|
142
85
|
createdAt: Date.now() - 1_000 * 60 * 60,
|
|
143
86
|
read: false,
|
|
144
87
|
},
|
|
145
|
-
approvalSeed(3, 'REJECTED', 'Jane Doe', 90),
|
|
146
88
|
{
|
|
147
89
|
id: 'seed-6',
|
|
148
90
|
variant: 'warning',
|
|
@@ -151,7 +93,6 @@ const SEED: Notification[] = [
|
|
|
151
93
|
createdAt: Date.now() - 1_000 * 60 * 60 * 2,
|
|
152
94
|
read: false,
|
|
153
95
|
},
|
|
154
|
-
approvalSeed(4, 'CANCELLED', null, 180),
|
|
155
96
|
];
|
|
156
97
|
|
|
157
98
|
function AutoOpen() {
|
|
@@ -163,9 +104,7 @@ function AutoOpen() {
|
|
|
163
104
|
}
|
|
164
105
|
|
|
165
106
|
/**
|
|
166
|
-
* Static preview of every tile variant — settled (non-live) state.
|
|
167
|
-
* header label picks up the variant color; tiles without an icon/image fall
|
|
168
|
-
* back to the severity dot in the header slot.
|
|
107
|
+
* Static preview of every tile variant — settled (non-live) state.
|
|
169
108
|
*/
|
|
170
109
|
export const AllTileVariants: Story = {
|
|
171
110
|
render: () => {
|
|
@@ -176,7 +115,6 @@ export const AllTileVariants: Story = {
|
|
|
176
115
|
notification={{
|
|
177
116
|
id: 't-default',
|
|
178
117
|
variant: 'default',
|
|
179
|
-
type: 'System Notice',
|
|
180
118
|
title: 'Heads up',
|
|
181
119
|
description: 'Neutral notification, no specific status.',
|
|
182
120
|
...base,
|
|
@@ -187,9 +125,8 @@ export const AllTileVariants: Story = {
|
|
|
187
125
|
notification={{
|
|
188
126
|
id: 't-success',
|
|
189
127
|
variant: 'success',
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
description: 'Deployed to Marketing Dept',
|
|
128
|
+
title: 'Device Deployment Complete',
|
|
129
|
+
description: 'HP EliteBook deployed to Marketing Dept',
|
|
193
130
|
...base,
|
|
194
131
|
}}
|
|
195
132
|
onComplete={() => {}}
|
|
@@ -198,9 +135,8 @@ export const AllTileVariants: Story = {
|
|
|
198
135
|
notification={{
|
|
199
136
|
id: 't-error',
|
|
200
137
|
variant: 'error',
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
description: 'USB storage device connected',
|
|
138
|
+
title: 'Policy Violation Detected',
|
|
139
|
+
description: 'USB storage device connected to ACME-WS01',
|
|
204
140
|
...base,
|
|
205
141
|
}}
|
|
206
142
|
onComplete={() => {}}
|
|
@@ -209,7 +145,6 @@ export const AllTileVariants: Story = {
|
|
|
209
145
|
notification={{
|
|
210
146
|
id: 't-warning',
|
|
211
147
|
variant: 'warning',
|
|
212
|
-
type: 'Approval Required',
|
|
213
148
|
title: 'Tech Required',
|
|
214
149
|
description: 'Approval is required to execute the command.',
|
|
215
150
|
...base,
|
|
@@ -220,97 +155,12 @@ export const AllTileVariants: Story = {
|
|
|
220
155
|
notification={{
|
|
221
156
|
id: 't-info',
|
|
222
157
|
variant: 'info',
|
|
223
|
-
type: 'Agent Update',
|
|
224
158
|
title: 'Update available',
|
|
225
159
|
description: 'A new agent version is ready to install.',
|
|
226
160
|
...base,
|
|
227
161
|
}}
|
|
228
162
|
onComplete={() => {}}
|
|
229
163
|
/>
|
|
230
|
-
<NotificationTile
|
|
231
|
-
notification={{
|
|
232
|
-
id: 't-legacy',
|
|
233
|
-
variant: 'default',
|
|
234
|
-
title: 'Legacy notification',
|
|
235
|
-
description: 'No type, icon or image — header shows the dot fallback.',
|
|
236
|
-
...base,
|
|
237
|
-
}}
|
|
238
|
-
onComplete={() => {}}
|
|
239
|
-
/>
|
|
240
|
-
</div>
|
|
241
|
-
);
|
|
242
|
-
},
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* The new header fields: `severity` colors the type label and icon slot
|
|
247
|
-
* (INFO grey, WARNING amber, DANGER red) and overrides `variant`; `imageUrl`
|
|
248
|
-
* wins over `icon`, which wins over the dot fallback.
|
|
249
|
-
*/
|
|
250
|
-
export const SeverityIconAndImage: Story = {
|
|
251
|
-
render: () => {
|
|
252
|
-
const base = { createdAt: Date.now() - 60_000, read: true } as const;
|
|
253
|
-
return (
|
|
254
|
-
<div className="flex max-w-md flex-col gap-2">
|
|
255
|
-
<NotificationTile
|
|
256
|
-
notification={{
|
|
257
|
-
id: 's-image',
|
|
258
|
-
severity: 'INFO',
|
|
259
|
-
type: 'New Customer Created',
|
|
260
|
-
imageUrl: CUSTOMER_AVATAR,
|
|
261
|
-
title: 'Acme Corp',
|
|
262
|
-
description: 'Added by John Smith',
|
|
263
|
-
...base,
|
|
264
|
-
}}
|
|
265
|
-
onComplete={() => {}}
|
|
266
|
-
/>
|
|
267
|
-
<NotificationTile
|
|
268
|
-
notification={{
|
|
269
|
-
id: 's-icon-info',
|
|
270
|
-
severity: 'INFO',
|
|
271
|
-
type: 'New User Invited',
|
|
272
|
-
icon: <UserPlusIcon size={16} />,
|
|
273
|
-
title: 'jane.doe@acme.com',
|
|
274
|
-
description: 'Invited by John Smith',
|
|
275
|
-
...base,
|
|
276
|
-
}}
|
|
277
|
-
onComplete={() => {}}
|
|
278
|
-
/>
|
|
279
|
-
<NotificationTile
|
|
280
|
-
notification={{
|
|
281
|
-
id: 's-icon-warning',
|
|
282
|
-
severity: 'WARNING',
|
|
283
|
-
type: 'Disk Space Warning',
|
|
284
|
-
icon: <AlertTriangleIcon size={16} />,
|
|
285
|
-
title: 'SRV-DB01',
|
|
286
|
-
description: 'C: drive at 85% capacity',
|
|
287
|
-
...base,
|
|
288
|
-
}}
|
|
289
|
-
onComplete={() => {}}
|
|
290
|
-
/>
|
|
291
|
-
<NotificationTile
|
|
292
|
-
notification={{
|
|
293
|
-
id: 's-icon-danger',
|
|
294
|
-
severity: 'DANGER',
|
|
295
|
-
type: 'Policy Violation Detected',
|
|
296
|
-
icon: <BannedIcon size={16} />,
|
|
297
|
-
title: 'ACME-WS01',
|
|
298
|
-
description: 'USB storage device connected',
|
|
299
|
-
...base,
|
|
300
|
-
}}
|
|
301
|
-
onComplete={() => {}}
|
|
302
|
-
/>
|
|
303
|
-
<NotificationTile
|
|
304
|
-
notification={{
|
|
305
|
-
id: 's-dot-danger',
|
|
306
|
-
severity: 'DANGER',
|
|
307
|
-
type: 'Agent Offline',
|
|
308
|
-
title: 'ACME-WS07',
|
|
309
|
-
description: 'No icon configured — severity dot fallback.',
|
|
310
|
-
...base,
|
|
311
|
-
}}
|
|
312
|
-
onComplete={() => {}}
|
|
313
|
-
/>
|
|
314
164
|
</div>
|
|
315
165
|
);
|
|
316
166
|
},
|
|
@@ -329,11 +179,9 @@ export const LiveTile: Story = {
|
|
|
329
179
|
key={tick}
|
|
330
180
|
notification={{
|
|
331
181
|
id: 'live-tile',
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
title: 'Acme Corp',
|
|
336
|
-
description: 'Added by John Smith',
|
|
182
|
+
variant: 'success',
|
|
183
|
+
title: 'Device Deployment Complete',
|
|
184
|
+
description: 'HP EliteBook deployed to Marketing Dept',
|
|
337
185
|
createdAt: Date.now(),
|
|
338
186
|
read: false,
|
|
339
187
|
}}
|
|
@@ -364,9 +212,7 @@ export const DrawerEmpty: Story = {
|
|
|
364
212
|
|
|
365
213
|
/**
|
|
366
214
|
* Drawer pre-seeded to mirror the Figma reference, with the toggle row and the
|
|
367
|
-
* history button wired.
|
|
368
|
-
* resolution state: pending (buttons), approved, rejected and cancelled
|
|
369
|
-
* (status tag + resolver name in place of the buttons).
|
|
215
|
+
* history button wired.
|
|
370
216
|
*/
|
|
371
217
|
export const DrawerWithSeedData: Story = {
|
|
372
218
|
render: function DrawerWithSeedDataRender() {
|
|
@@ -376,13 +222,11 @@ export const DrawerWithSeedData: Story = {
|
|
|
376
222
|
onHistoryClick={() => alert('Navigate to /notifications')}
|
|
377
223
|
historyHref="/notifications"
|
|
378
224
|
onShowPopupsChange={(v) => console.log('showPopups →', v)}
|
|
379
|
-
renderTile={renderApprovalTile}
|
|
380
225
|
>
|
|
381
226
|
<AutoOpen />
|
|
382
227
|
<NotificationDrawer />
|
|
383
228
|
<p className="text-h6 text-ods-text-secondary">
|
|
384
|
-
|
|
385
|
-
in all four resolution states.
|
|
229
|
+
Six seeded notifications matching the Figma reference.
|
|
386
230
|
</p>
|
|
387
231
|
</NotificationsProvider>
|
|
388
232
|
);
|
|
@@ -468,13 +312,8 @@ function PlaygroundControls() {
|
|
|
468
312
|
useNotifications();
|
|
469
313
|
const approvalSeq = React.useRef(0);
|
|
470
314
|
|
|
471
|
-
const fire = (
|
|
472
|
-
variant
|
|
473
|
-
title: string,
|
|
474
|
-
description: string,
|
|
475
|
-
extra?: Partial<Pick<Notification, 'type' | 'icon' | 'imageUrl' | 'severity'>>,
|
|
476
|
-
) => {
|
|
477
|
-
addNotification({ variant, title, description, ...extra });
|
|
315
|
+
const fire = (variant: NotificationVariant, title: string, description: string) => {
|
|
316
|
+
addNotification({ variant, title, description });
|
|
478
317
|
};
|
|
479
318
|
|
|
480
319
|
const fireWithDeepLink = () => {
|
|
@@ -578,9 +417,7 @@ function PlaygroundControls() {
|
|
|
578
417
|
<Button
|
|
579
418
|
variant="accent"
|
|
580
419
|
onClick={() =>
|
|
581
|
-
fire('success', '
|
|
582
|
-
type: 'Device Deployment Complete',
|
|
583
|
-
})
|
|
420
|
+
fire('success', 'Device Deployment Complete', 'HP EliteBook deployed to Marketing Dept')
|
|
584
421
|
}
|
|
585
422
|
>
|
|
586
423
|
Fire success
|
|
@@ -588,49 +425,23 @@ function PlaygroundControls() {
|
|
|
588
425
|
<Button
|
|
589
426
|
variant="destructive"
|
|
590
427
|
onClick={() =>
|
|
591
|
-
fire('error', '
|
|
592
|
-
type: 'Policy Violation Detected',
|
|
593
|
-
severity: 'DANGER',
|
|
594
|
-
icon: <BannedIcon size={16} />,
|
|
595
|
-
})
|
|
428
|
+
fire('error', 'Policy Violation Detected', 'USB storage device connected to ACME-WS01')
|
|
596
429
|
}
|
|
597
430
|
>
|
|
598
|
-
Fire
|
|
431
|
+
Fire error
|
|
599
432
|
</Button>
|
|
600
433
|
<Button
|
|
601
434
|
variant="outline"
|
|
602
|
-
onClick={() =>
|
|
603
|
-
fire('warning', 'Tech Required', 'Approval is required to execute the command.', {
|
|
604
|
-
type: 'Approval Required',
|
|
605
|
-
severity: 'WARNING',
|
|
606
|
-
icon: <AlertTriangleIcon size={16} />,
|
|
607
|
-
})
|
|
608
|
-
}
|
|
435
|
+
onClick={() => fire('warning', 'Tech Required', 'Approval is required to execute the command.')}
|
|
609
436
|
>
|
|
610
|
-
Fire warning
|
|
437
|
+
Fire warning
|
|
611
438
|
</Button>
|
|
612
439
|
<Button
|
|
613
440
|
variant="transparent"
|
|
614
|
-
onClick={() =>
|
|
615
|
-
fire('info', 'Update available', 'A new agent version is ready to install.', {
|
|
616
|
-
type: 'Agent Update',
|
|
617
|
-
})
|
|
618
|
-
}
|
|
441
|
+
onClick={() => fire('info', 'Update available', 'A new agent version is ready to install.')}
|
|
619
442
|
>
|
|
620
443
|
Fire info
|
|
621
444
|
</Button>
|
|
622
|
-
<Button
|
|
623
|
-
variant="outline"
|
|
624
|
-
onClick={() =>
|
|
625
|
-
fire('info', 'Acme Corp', 'Added by John Smith', {
|
|
626
|
-
type: 'New Customer Created',
|
|
627
|
-
severity: 'INFO',
|
|
628
|
-
imageUrl: CUSTOMER_AVATAR,
|
|
629
|
-
})
|
|
630
|
-
}
|
|
631
|
-
>
|
|
632
|
-
Fire with image
|
|
633
|
-
</Button>
|
|
634
445
|
<Button
|
|
635
446
|
variant="outline"
|
|
636
447
|
onClick={() => fire('default', 'Heads up', 'Neutral notification without a specific status.')}
|