@usefragments/ui 1.1.1 → 1.2.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/dist/assets/ui.css +327 -274
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
- package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
- package/dist/components/Chip/Chip.module.scss.cjs +15 -15
- package/dist/components/Chip/Chip.module.scss.js +15 -15
- package/dist/components/Combobox/index.cjs +106 -9
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +106 -9
- package/dist/components/DataTable/DataTable.module.scss.cjs +37 -34
- package/dist/components/DataTable/DataTable.module.scss.js +37 -34
- package/dist/components/Main/Main.module.scss.cjs +26 -0
- package/dist/components/Main/Main.module.scss.js +26 -0
- package/dist/components/Main/index.cjs +128 -0
- package/dist/components/Main/index.d.ts +22 -0
- package/dist/components/Main/index.d.ts.map +1 -0
- package/dist/components/Main/index.js +111 -0
- package/dist/components/Table/Table.module.scss.cjs +19 -19
- package/dist/components/Table/Table.module.scss.js +19 -19
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
- package/dist/components/TableOfContents/index.cjs +22 -42
- package/dist/components/TableOfContents/index.d.ts +3 -3
- package/dist/components/TableOfContents/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/index.js +22 -42
- package/dist/index.cjs +87 -85
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/fragments.json +1 -1
- package/package.json +7 -2
- package/src/components/Checkbox/Checkbox.contract.json +5 -24
- package/src/components/Checkbox/Checkbox.module.scss +4 -2
- package/src/components/Chip/Chip.contract.json +11 -28
- package/src/components/Chip/Chip.module.scss +21 -45
- package/src/components/Combobox/Combobox.contract.json +6 -24
- package/src/components/Combobox/index.tsx +132 -6
- package/src/components/DataTable/DataTable.module.scss +31 -8
- package/src/components/Main/Main.contract.json +79 -0
- package/src/components/Main/Main.module.scss +31 -0
- package/src/components/Main/index.tsx +124 -0
- package/src/components/Table/Table.module.scss +22 -5
- package/src/components/TableOfContents/TableOfContents.contract.json +6 -16
- package/src/components/TableOfContents/TableOfContents.module.scss +10 -13
- package/src/components/TableOfContents/index.tsx +27 -38
- package/src/index.ts +3 -0
- package/src/tokens/_component-properties.scss +1 -0
- package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts +0 -33
- package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts.map +0 -1
- package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts +0 -11
- package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts +0 -5
- package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts +0 -4
- package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts +0 -3
- package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts +0 -86
- package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts +0 -2
- package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts.map +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +0 -106
- package/src/components/Alert/Alert.stories.tsx +0 -119
- package/src/components/AppShell/AppShell.stories.tsx +0 -156
- package/src/components/Avatar/Avatar.stories.tsx +0 -74
- package/src/components/Badge/Badge.stories.tsx +0 -92
- package/src/components/BentoGrid/BentoGrid.stories.tsx +0 -98
- package/src/components/Box/Box.stories.tsx +0 -150
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -87
- package/src/components/Button/Button.stories.tsx +0 -103
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -97
- package/src/components/Card/Card.stories.tsx +0 -144
- package/src/components/Chart/Chart.stories.tsx +0 -119
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -68
- package/src/components/Chip/Chip.stories.tsx +0 -70
- package/src/components/Cloud/CloudGovernanceShell.module.scss +0 -88
- package/src/components/Cloud/CloudGovernanceShell.stories.tsx +0 -446
- package/src/components/Cloud/ControlSizing.module.scss +0 -49
- package/src/components/Cloud/ControlSizing.stories.tsx +0 -238
- package/src/components/Cloud/DashboardLayoutPrototypes.module.scss +0 -462
- package/src/components/Cloud/DashboardLayoutPrototypes.shared.tsx +0 -375
- package/src/components/Cloud/DashboardLayoutPrototypes.shell.tsx +0 -147
- package/src/components/Cloud/DashboardLayoutPrototypes.stories.tsx +0 -328
- package/src/components/Cloud/PullRequestsPrototypes.content.tsx +0 -283
- package/src/components/Cloud/PullRequestsPrototypes.detail-panels.tsx +0 -381
- package/src/components/Cloud/PullRequestsPrototypes.detail.tsx +0 -204
- package/src/components/Cloud/PullRequestsPrototypes.id-data.ts +0 -395
- package/src/components/Cloud/PullRequestsPrototypes.id-page.tsx +0 -349
- package/src/components/Cloud/PullRequestsPrototypes.stories.tsx +0 -81
- package/src/components/CodeBlock/CodeBlock.stories.tsx +0 -147
- package/src/components/Collapsible/Collapsible.stories.tsx +0 -94
- package/src/components/ColorPicker/ColorPicker.stories.tsx +0 -74
- package/src/components/Combobox/Combobox.stories.tsx +0 -133
- package/src/components/Command/Command.stories.tsx +0 -102
- package/src/components/ConversationList/ConversationList.stories.tsx +0 -93
- package/src/components/DataTable/DataTable.stories.tsx +0 -129
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -129
- package/src/components/Dialog/Dialog.stories.tsx +0 -154
- package/src/components/Drawer/Drawer.stories.tsx +0 -144
- package/src/components/Editor/Editor.stories.tsx +0 -99
- package/src/components/EmptyState/EmptyState.stories.tsx +0 -97
- package/src/components/Field/Field.stories.tsx +0 -109
- package/src/components/Fieldset/Fieldset.stories.tsx +0 -116
- package/src/components/Form/Form.stories.tsx +0 -142
- package/src/components/Grid/Grid.stories.tsx +0 -125
- package/src/components/Header/Header.stories.tsx +0 -133
- package/src/components/Icon/Icon.stories.tsx +0 -80
- package/src/components/IconButton/IconButton.stories.tsx +0 -78
- package/src/components/Image/Image.stories.tsx +0 -109
- package/src/components/Input/Input.stories.tsx +0 -104
- package/src/components/Link/Link.stories.tsx +0 -67
- package/src/components/List/List.stories.tsx +0 -95
- package/src/components/Listbox/Listbox.stories.tsx +0 -81
- package/src/components/Loading/Loading.stories.tsx +0 -69
- package/src/components/Markdown/Markdown.stories.tsx +0 -75
- package/src/components/Menu/Menu.stories.tsx +0 -113
- package/src/components/Message/Message.stories.tsx +0 -85
- package/src/components/NavigationMenu/NavigationMenu.stories.tsx +0 -161
- package/src/components/Pagination/Pagination.stories.tsx +0 -81
- package/src/components/Popover/Popover.stories.tsx +0 -152
- package/src/components/Progress/Progress.stories.tsx +0 -64
- package/src/components/Prompt/Prompt.stories.tsx +0 -93
- package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -107
- package/src/components/ScrollArea/ScrollArea.stories.tsx +0 -97
- package/src/components/Select/Select.stories.tsx +0 -127
- package/src/components/Separator/Separator.stories.tsx +0 -84
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -122
- package/src/components/Skeleton/Skeleton.stories.tsx +0 -80
- package/src/components/Slider/Slider.stories.tsx +0 -73
- package/src/components/Stack/Stack.stories.tsx +0 -73
- package/src/components/Switch/Switch.stories.tsx +0 -59
- package/src/components/Table/Table.stories.tsx +0 -219
- package/src/components/TableOfContents/TableOfContents.stories.tsx +0 -120
- package/src/components/Tabs/Tabs.stories.tsx +0 -136
- package/src/components/Text/Text.stories.tsx +0 -133
- package/src/components/Textarea/Textarea.stories.tsx +0 -107
- package/src/components/Theme/Theme.stories.tsx +0 -95
- package/src/components/ThinkingIndicator/ThinkingIndicator.stories.tsx +0 -85
- package/src/components/Toast/Toast.stories.tsx +0 -91
- package/src/components/ToggleGroup/ToggleGroup.stories.tsx +0 -114
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -95
- package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +0 -78
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
import {
|
|
4
|
-
CheckCircle,
|
|
5
|
-
Clock,
|
|
6
|
-
Cube,
|
|
7
|
-
DotsThree,
|
|
8
|
-
Gear,
|
|
9
|
-
GitBranch,
|
|
10
|
-
House,
|
|
11
|
-
MagnifyingGlass,
|
|
12
|
-
Palette,
|
|
13
|
-
ShieldCheck,
|
|
14
|
-
WarningCircle,
|
|
15
|
-
XCircle,
|
|
16
|
-
} from "@phosphor-icons/react";
|
|
17
|
-
import { AppShell } from "../AppShell";
|
|
18
|
-
import { Avatar } from "../Avatar";
|
|
19
|
-
import { Badge } from "../Badge";
|
|
20
|
-
import { Box } from "../Box";
|
|
21
|
-
import { Button } from "../Button";
|
|
22
|
-
import { ButtonGroup } from "../ButtonGroup";
|
|
23
|
-
import { Card } from "../Card";
|
|
24
|
-
import { DataTable, type DataTableColumn } from "../DataTable";
|
|
25
|
-
import { Grid } from "../Grid";
|
|
26
|
-
import { Input } from "../Input";
|
|
27
|
-
import { Progress, type ProgressProps } from "../Progress";
|
|
28
|
-
import { Select } from "../Select";
|
|
29
|
-
import { Separator } from "../Separator";
|
|
30
|
-
import { Sidebar } from "../Sidebar";
|
|
31
|
-
import { Stack } from "../Stack";
|
|
32
|
-
import { Tabs } from "../Tabs";
|
|
33
|
-
import { Text } from "../Text";
|
|
34
|
-
import styles from "./CloudGovernanceShell.module.scss";
|
|
35
|
-
|
|
36
|
-
const meta = {
|
|
37
|
-
title: "Cloud/Governance Shell",
|
|
38
|
-
parameters: {
|
|
39
|
-
layout: "fullscreen",
|
|
40
|
-
backgrounds: { default: "dark" },
|
|
41
|
-
docs: {
|
|
42
|
-
description: {
|
|
43
|
-
component:
|
|
44
|
-
"Cloud-specific product shell for dogfooding Fragments UI across layout, navigation, controls, tables, cards, and semantic states.",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
} satisfies Meta;
|
|
49
|
-
|
|
50
|
-
export default meta;
|
|
51
|
-
|
|
52
|
-
type Story = StoryObj<typeof meta>;
|
|
53
|
-
|
|
54
|
-
type GovernanceRow = {
|
|
55
|
-
token: string;
|
|
56
|
-
surface: string;
|
|
57
|
-
status: "Healthy" | "Watching" | "Blocked" | "Review";
|
|
58
|
-
severity: "success" | "warning" | "error" | "info";
|
|
59
|
-
lastSeen: string;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const rows: GovernanceRow[] = [
|
|
63
|
-
{
|
|
64
|
-
token: "color.background.surface",
|
|
65
|
-
surface: "Cloud dashboard shell",
|
|
66
|
-
status: "Healthy",
|
|
67
|
-
severity: "success",
|
|
68
|
-
lastSeen: "2m ago",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
token: "space.4",
|
|
72
|
-
surface: "Components index cards",
|
|
73
|
-
status: "Watching",
|
|
74
|
-
severity: "warning",
|
|
75
|
-
lastSeen: "14m ago",
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
token: "color.danger.text",
|
|
79
|
-
surface: "Findings table badges",
|
|
80
|
-
status: "Review",
|
|
81
|
-
severity: "info",
|
|
82
|
-
lastSeen: "31m ago",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
token: "radius.card",
|
|
86
|
-
surface: "Governance setup panel",
|
|
87
|
-
status: "Blocked",
|
|
88
|
-
severity: "error",
|
|
89
|
-
lastSeen: "1h ago",
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
|
|
93
|
-
const badgeVariant = {
|
|
94
|
-
success: "success",
|
|
95
|
-
warning: "warning",
|
|
96
|
-
error: "error",
|
|
97
|
-
info: "info",
|
|
98
|
-
} satisfies Record<GovernanceRow["severity"], "success" | "warning" | "error" | "info">;
|
|
99
|
-
|
|
100
|
-
const columns: DataTableColumn<GovernanceRow>[] = [
|
|
101
|
-
{
|
|
102
|
-
accessorKey: "token",
|
|
103
|
-
header: "Token",
|
|
104
|
-
size: 248,
|
|
105
|
-
truncate: true,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
accessorKey: "surface",
|
|
109
|
-
header: "Surface",
|
|
110
|
-
truncate: true,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
accessorKey: "status",
|
|
114
|
-
header: "Status",
|
|
115
|
-
size: 126,
|
|
116
|
-
cell: (context) => {
|
|
117
|
-
const row = context.row.original as GovernanceRow;
|
|
118
|
-
return (
|
|
119
|
-
<Badge variant={badgeVariant[row.severity]} size="sm">
|
|
120
|
-
{row.status}
|
|
121
|
-
</Badge>
|
|
122
|
-
);
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
accessorKey: "lastSeen",
|
|
127
|
-
header: "Seen",
|
|
128
|
-
align: "right",
|
|
129
|
-
size: 92,
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: "actions",
|
|
133
|
-
header: "",
|
|
134
|
-
align: "right",
|
|
135
|
-
size: 48,
|
|
136
|
-
enableSorting: false,
|
|
137
|
-
cell: () => (
|
|
138
|
-
<Button variant="icon" size="xs" aria-label="Open row actions">
|
|
139
|
-
<DotsThree size={16} weight="bold" />
|
|
140
|
-
</Button>
|
|
141
|
-
),
|
|
142
|
-
},
|
|
143
|
-
];
|
|
144
|
-
|
|
145
|
-
function SidebarBrand() {
|
|
146
|
-
return (
|
|
147
|
-
<Stack direction="row" gap="sm" align="center">
|
|
148
|
-
<Box as="span" className={styles.brandMark}>
|
|
149
|
-
<GitBranch size={16} weight="bold" />
|
|
150
|
-
</Box>
|
|
151
|
-
<Stack gap="none" className={styles.brandCopy}>
|
|
152
|
-
<Text variant="section-label" color="tertiary" truncate>
|
|
153
|
-
Active repository
|
|
154
|
-
</Text>
|
|
155
|
-
<Text size="sm" weight="semibold" truncate>
|
|
156
|
-
fragments-sdk/ui
|
|
157
|
-
</Text>
|
|
158
|
-
</Stack>
|
|
159
|
-
</Stack>
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function MetricCard({
|
|
164
|
-
value,
|
|
165
|
-
label,
|
|
166
|
-
progress,
|
|
167
|
-
variant = "default",
|
|
168
|
-
}: {
|
|
169
|
-
value: string;
|
|
170
|
-
label: string;
|
|
171
|
-
progress: number;
|
|
172
|
-
variant?: ProgressProps["variant"];
|
|
173
|
-
}) {
|
|
174
|
-
return (
|
|
175
|
-
<Card variant="panel" padding="none">
|
|
176
|
-
<Card.Header divided>
|
|
177
|
-
<Card.Title>{label}</Card.Title>
|
|
178
|
-
</Card.Header>
|
|
179
|
-
<Card.Body padding="md">
|
|
180
|
-
<Stack gap="sm">
|
|
181
|
-
<Text size="sm" weight="semibold" tabularNums>
|
|
182
|
-
{value}
|
|
183
|
-
</Text>
|
|
184
|
-
<Progress value={progress} variant={variant} size="sm" aria-label={`${label} progress`} />
|
|
185
|
-
</Stack>
|
|
186
|
-
</Card.Body>
|
|
187
|
-
</Card>
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function StateRow({ label, children }: { label: string; children: ReactNode }) {
|
|
192
|
-
return (
|
|
193
|
-
<Box paddingX="md" paddingY="xs">
|
|
194
|
-
<Stack direction="row" align="center" justify="between" gap="sm" className={styles.stateRow}>
|
|
195
|
-
<Text size="sm" color="secondary">
|
|
196
|
-
{label}
|
|
197
|
-
</Text>
|
|
198
|
-
{children}
|
|
199
|
-
</Stack>
|
|
200
|
-
</Box>
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function CloudSidebar() {
|
|
205
|
-
return (
|
|
206
|
-
<>
|
|
207
|
-
<Sidebar.Header>
|
|
208
|
-
<SidebarBrand />
|
|
209
|
-
</Sidebar.Header>
|
|
210
|
-
|
|
211
|
-
<Sidebar.Nav>
|
|
212
|
-
<Sidebar.Section>
|
|
213
|
-
<Sidebar.Item icon={<House size={18} />} active>
|
|
214
|
-
Dashboard
|
|
215
|
-
</Sidebar.Item>
|
|
216
|
-
<Sidebar.Item icon={<Cube size={18} />}>Components</Sidebar.Item>
|
|
217
|
-
<Sidebar.Item icon={<Palette size={18} />}>Tokens</Sidebar.Item>
|
|
218
|
-
<Sidebar.Item icon={<WarningCircle size={18} />} badge={7}>
|
|
219
|
-
Findings
|
|
220
|
-
</Sidebar.Item>
|
|
221
|
-
<Sidebar.Item icon={<ShieldCheck size={18} />}>Governance</Sidebar.Item>
|
|
222
|
-
</Sidebar.Section>
|
|
223
|
-
<Sidebar.Section label="Setup">
|
|
224
|
-
<Sidebar.Item icon={<Clock size={18} />}>Developer setup</Sidebar.Item>
|
|
225
|
-
<Sidebar.Item icon={<Gear size={18} />}>Settings</Sidebar.Item>
|
|
226
|
-
</Sidebar.Section>
|
|
227
|
-
</Sidebar.Nav>
|
|
228
|
-
|
|
229
|
-
<Sidebar.Footer>
|
|
230
|
-
<Stack direction="row" align="center" gap="sm">
|
|
231
|
-
<Avatar initials="T" name="Test User" size="md" />
|
|
232
|
-
<Stack gap="none" className={styles.brandCopy}>
|
|
233
|
-
<Text size="sm" weight="semibold" truncate>
|
|
234
|
-
Test User
|
|
235
|
-
</Text>
|
|
236
|
-
<Text size="2xs" color="tertiary" truncate>
|
|
237
|
-
dev_test@app.usefragments.com
|
|
238
|
-
</Text>
|
|
239
|
-
</Stack>
|
|
240
|
-
</Stack>
|
|
241
|
-
</Sidebar.Footer>
|
|
242
|
-
</>
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function FindingsPanel() {
|
|
247
|
-
return (
|
|
248
|
-
<Card variant="panel" padding="none" className={styles.tableColumn}>
|
|
249
|
-
<Card.Header divided>
|
|
250
|
-
<Stack
|
|
251
|
-
direction="row"
|
|
252
|
-
align="center"
|
|
253
|
-
justify="between"
|
|
254
|
-
gap="sm"
|
|
255
|
-
className={styles.panelHeader}
|
|
256
|
-
>
|
|
257
|
-
<Stack gap="xs">
|
|
258
|
-
<Card.Title>Governance findings</Card.Title>
|
|
259
|
-
<Card.Description>
|
|
260
|
-
Shared state colors across tables, badges, and rows.
|
|
261
|
-
</Card.Description>
|
|
262
|
-
</Stack>
|
|
263
|
-
<Badge variant="info" size="sm">
|
|
264
|
-
Live
|
|
265
|
-
</Badge>
|
|
266
|
-
</Stack>
|
|
267
|
-
</Card.Header>
|
|
268
|
-
<Card.Body>
|
|
269
|
-
<Box padding="sm">
|
|
270
|
-
<Stack gap="sm">
|
|
271
|
-
<Box className={styles.toolbar}>
|
|
272
|
-
<Input
|
|
273
|
-
aria-label="Search findings"
|
|
274
|
-
placeholder="Search findings..."
|
|
275
|
-
size="sm"
|
|
276
|
-
startAdornment={<MagnifyingGlass size={16} />}
|
|
277
|
-
shortcut="⌘K"
|
|
278
|
-
withFieldWrapper={false}
|
|
279
|
-
/>
|
|
280
|
-
<Select aria-label="Date range" defaultValue="15d" size="sm">
|
|
281
|
-
<Select.Trigger />
|
|
282
|
-
<Select.Content>
|
|
283
|
-
<Select.Item value="7d">Last 7 days</Select.Item>
|
|
284
|
-
<Select.Item value="15d">Last 15 days</Select.Item>
|
|
285
|
-
<Select.Item value="30d">Last 30 days</Select.Item>
|
|
286
|
-
</Select.Content>
|
|
287
|
-
</Select>
|
|
288
|
-
<Select aria-label="Status" defaultValue="all" size="sm">
|
|
289
|
-
<Select.Trigger />
|
|
290
|
-
<Select.Content>
|
|
291
|
-
<Select.Item value="all">All statuses</Select.Item>
|
|
292
|
-
<Select.Item value="healthy">Healthy</Select.Item>
|
|
293
|
-
<Select.Item value="blocked">Blocked</Select.Item>
|
|
294
|
-
</Select.Content>
|
|
295
|
-
</Select>
|
|
296
|
-
</Box>
|
|
297
|
-
<DataTable
|
|
298
|
-
columns={columns}
|
|
299
|
-
data={rows}
|
|
300
|
-
getRowId={(row) => row.token}
|
|
301
|
-
density="condensed"
|
|
302
|
-
bordered
|
|
303
|
-
sortable
|
|
304
|
-
caption="Governance findings"
|
|
305
|
-
captionHidden
|
|
306
|
-
/>
|
|
307
|
-
</Stack>
|
|
308
|
-
</Box>
|
|
309
|
-
</Card.Body>
|
|
310
|
-
</Card>
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function StatePanel() {
|
|
315
|
-
return (
|
|
316
|
-
<Card variant="panel" padding="none">
|
|
317
|
-
<Card.Header divided>
|
|
318
|
-
<Card.Title>System states</Card.Title>
|
|
319
|
-
</Card.Header>
|
|
320
|
-
<Card.Body>
|
|
321
|
-
<Stack gap="none" separator={<Separator soft />}>
|
|
322
|
-
<StateRow label="Ready to ship">
|
|
323
|
-
<Badge variant="success" size="sm" icon={<CheckCircle size={14} />}>
|
|
324
|
-
Success
|
|
325
|
-
</Badge>
|
|
326
|
-
</StateRow>
|
|
327
|
-
<StateRow label="Needs attention">
|
|
328
|
-
<Badge variant="warning" size="sm" icon={<WarningCircle size={14} />}>
|
|
329
|
-
Warning
|
|
330
|
-
</Badge>
|
|
331
|
-
</StateRow>
|
|
332
|
-
<StateRow label="Deploy blocked">
|
|
333
|
-
<Badge variant="error" size="sm" icon={<XCircle size={14} />}>
|
|
334
|
-
Danger
|
|
335
|
-
</Badge>
|
|
336
|
-
</StateRow>
|
|
337
|
-
<StateRow label="Informational">
|
|
338
|
-
<Badge variant="info" size="sm">
|
|
339
|
-
Info
|
|
340
|
-
</Badge>
|
|
341
|
-
</StateRow>
|
|
342
|
-
</Stack>
|
|
343
|
-
</Card.Body>
|
|
344
|
-
</Card>
|
|
345
|
-
);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
function ActionsPanel() {
|
|
349
|
-
return (
|
|
350
|
-
<Card variant="panel" padding="md">
|
|
351
|
-
<Stack gap="md">
|
|
352
|
-
<Stack gap="xs">
|
|
353
|
-
<Card.Title>Actions</Card.Title>
|
|
354
|
-
<Card.Description>
|
|
355
|
-
Button states use the same border, hover, and semantic recipes.
|
|
356
|
-
</Card.Description>
|
|
357
|
-
</Stack>
|
|
358
|
-
<ButtonGroup gap="sm" wrap className={styles.actions}>
|
|
359
|
-
<Button variant="primary" size="sm">
|
|
360
|
-
Create setup PR
|
|
361
|
-
</Button>
|
|
362
|
-
<Button variant="outlined" size="sm">
|
|
363
|
-
Copy MCP config
|
|
364
|
-
</Button>
|
|
365
|
-
<Button variant="danger" size="sm">
|
|
366
|
-
Disconnect repository
|
|
367
|
-
</Button>
|
|
368
|
-
</ButtonGroup>
|
|
369
|
-
</Stack>
|
|
370
|
-
</Card>
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
export const GovernanceShell: Story = {
|
|
375
|
-
render: () => (
|
|
376
|
-
<Box className={styles.frame}>
|
|
377
|
-
<AppShell layout="sidebar" bg="var(--fui-app-canvas-bg)" className={styles.shell}>
|
|
378
|
-
<AppShell.Sidebar width="260px" collapsible="offcanvas">
|
|
379
|
-
<CloudSidebar />
|
|
380
|
-
</AppShell.Sidebar>
|
|
381
|
-
|
|
382
|
-
<AppShell.Main padding="none" className={styles.main}>
|
|
383
|
-
<Stack as="main" gap="lg" className={styles.page}>
|
|
384
|
-
<Stack direction="row" align="start" justify="between" gap="md" wrap>
|
|
385
|
-
<Stack gap="xs">
|
|
386
|
-
<Text as="h1" size="2xl" weight="bold">
|
|
387
|
-
Dashboard
|
|
388
|
-
</Text>
|
|
389
|
-
<Text as="p" size="sm" color="secondary">
|
|
390
|
-
Design system health, coverage, and governance status.
|
|
391
|
-
</Text>
|
|
392
|
-
</Stack>
|
|
393
|
-
<Button variant="outlined" size="sm">
|
|
394
|
-
Take a tour
|
|
395
|
-
</Button>
|
|
396
|
-
</Stack>
|
|
397
|
-
|
|
398
|
-
<Grid columns="auto" minChildWidth="220px" gap="md">
|
|
399
|
-
<MetricCard value="94%" label="Component coverage" progress={94} variant="success" />
|
|
400
|
-
<MetricCard value="312" label="Tracked tokens" progress={78} />
|
|
401
|
-
<MetricCard value="7" label="Open findings" progress={38} variant="warning" />
|
|
402
|
-
<MetricCard value="1" label="Blocking drift" progress={14} variant="danger" />
|
|
403
|
-
</Grid>
|
|
404
|
-
|
|
405
|
-
<Box as="section" className={styles.contentGrid}>
|
|
406
|
-
<Box className={styles.tableColumn}>
|
|
407
|
-
<Tabs defaultValue="findings" variant="pills">
|
|
408
|
-
<Tabs.List>
|
|
409
|
-
<Tabs.Tab value="findings">Findings</Tabs.Tab>
|
|
410
|
-
<Tabs.Tab value="activity">Activity</Tabs.Tab>
|
|
411
|
-
<Tabs.Tab value="changes">Changes</Tabs.Tab>
|
|
412
|
-
</Tabs.List>
|
|
413
|
-
|
|
414
|
-
<Tabs.Panel value="findings" flush>
|
|
415
|
-
<FindingsPanel />
|
|
416
|
-
</Tabs.Panel>
|
|
417
|
-
<Tabs.Panel value="activity" flush>
|
|
418
|
-
<Card variant="panel" padding="md">
|
|
419
|
-
<Card.Title>Activity</Card.Title>
|
|
420
|
-
<Card.Description>
|
|
421
|
-
The same panel chrome carries secondary content.
|
|
422
|
-
</Card.Description>
|
|
423
|
-
</Card>
|
|
424
|
-
</Tabs.Panel>
|
|
425
|
-
<Tabs.Panel value="changes" flush>
|
|
426
|
-
<Card variant="panel" padding="md">
|
|
427
|
-
<Card.Title>Changes</Card.Title>
|
|
428
|
-
<Card.Description>
|
|
429
|
-
Token changes inherit the same surface and border model.
|
|
430
|
-
</Card.Description>
|
|
431
|
-
</Card>
|
|
432
|
-
</Tabs.Panel>
|
|
433
|
-
</Tabs>
|
|
434
|
-
</Box>
|
|
435
|
-
|
|
436
|
-
<Stack as="aside" gap="md">
|
|
437
|
-
<StatePanel />
|
|
438
|
-
<ActionsPanel />
|
|
439
|
-
</Stack>
|
|
440
|
-
</Box>
|
|
441
|
-
</Stack>
|
|
442
|
-
</AppShell.Main>
|
|
443
|
-
</AppShell>
|
|
444
|
-
</Box>
|
|
445
|
-
),
|
|
446
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
.frame {
|
|
2
|
-
min-height: 100vh;
|
|
3
|
-
background: var(--fui-app-main-bg, var(--fui-bg-primary));
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.content {
|
|
7
|
-
width: min(1180px, 100%);
|
|
8
|
-
margin-inline: auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.section {
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.sizeRow {
|
|
16
|
-
width: 100%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.samples {
|
|
20
|
-
flex: 1 1 auto;
|
|
21
|
-
min-width: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.sizeMeta {
|
|
25
|
-
flex: 0 0 96px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.sample {
|
|
29
|
-
min-width: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.control {
|
|
33
|
-
width: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.compactControl {
|
|
37
|
-
width: max-content;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.tabsSlot {
|
|
41
|
-
width: max-content;
|
|
42
|
-
max-width: 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (max-width: 720px) {
|
|
46
|
-
.sizeMeta {
|
|
47
|
-
flex-basis: auto;
|
|
48
|
-
}
|
|
49
|
-
}
|