@coffre/ui 0.2.0 → 0.4.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.
Files changed (177) hide show
  1. package/dist/chunks/audit-sentence-BhHmvQX_.js +660 -0
  2. package/dist/chunks/audit-sentence-BhHmvQX_.js.map +1 -0
  3. package/dist/chunks/delete-place-CRX7ntE8.js +206 -0
  4. package/dist/chunks/delete-place-CRX7ntE8.js.map +1 -0
  5. package/dist/chunks/{directory-CSjWWUQ1.js → directory-zr3ek7Mc.js} +175 -60
  6. package/dist/chunks/directory-zr3ek7Mc.js.map +1 -0
  7. package/dist/chunks/folders-DoBmCwOi.js +207 -0
  8. package/dist/chunks/folders-DoBmCwOi.js.map +1 -0
  9. package/dist/chunks/grants-Cw1FyGID.js +669 -0
  10. package/dist/chunks/grants-Cw1FyGID.js.map +1 -0
  11. package/dist/chunks/offboarding-CE6d7um1.js +305 -0
  12. package/dist/chunks/offboarding-CE6d7um1.js.map +1 -0
  13. package/dist/chunks/one-time-DXEl9hbg.js +35 -0
  14. package/dist/chunks/one-time-DXEl9hbg.js.map +1 -0
  15. package/dist/chunks/page-DvsgZ2Hd.js +391 -0
  16. package/dist/chunks/page-DvsgZ2Hd.js.map +1 -0
  17. package/dist/chunks/principal-BIN-xwZw.js +42 -0
  18. package/dist/chunks/principal-BIN-xwZw.js.map +1 -0
  19. package/dist/chunks/{principal-page-D_91OA0l.js → principal-page-DhjO76GH.js} +245 -251
  20. package/dist/chunks/principal-page-DhjO76GH.js.map +1 -0
  21. package/dist/chunks/project-page-SRCtRe2g.js +17 -0
  22. package/dist/chunks/project-page-SRCtRe2g.js.map +1 -0
  23. package/dist/chunks/{queries-CQ81o4so.js → queries-DVR_i3rA.js} +132 -30
  24. package/dist/chunks/queries-DVR_i3rA.js.map +1 -0
  25. package/dist/chunks/references-B6pLT1uQ.js +343 -0
  26. package/dist/chunks/references-B6pLT1uQ.js.map +1 -0
  27. package/dist/chunks/{row-state-0PsrEzOL.js → row-state-DOPUsjQK.js} +3 -3
  28. package/dist/chunks/{row-state-0PsrEzOL.js.map → row-state-DOPUsjQK.js.map} +1 -1
  29. package/dist/chunks/signin-errors--ykMFuqN.js +57 -0
  30. package/dist/chunks/signin-errors--ykMFuqN.js.map +1 -0
  31. package/dist/chunks/tabs-BmwKfUeK.js +22 -0
  32. package/dist/chunks/tabs-BmwKfUeK.js.map +1 -0
  33. package/dist/chunks/{theme-B2vQolVR.js → theme-DJuz-xLM.js} +3 -3
  34. package/dist/chunks/{theme-B2vQolVR.js.map → theme-DJuz-xLM.js.map} +1 -1
  35. package/dist/chunks/{ui-DixXLQvQ.js → ui-DJje3gST.js} +6 -3
  36. package/dist/chunks/ui-DJje3gST.js.map +1 -0
  37. package/dist/chunks/{use-change-c6CeLRin.js → use-change-DUiGO19U.js} +52 -21
  38. package/dist/chunks/use-change-DUiGO19U.js.map +1 -0
  39. package/dist/chunks/{use-shell-jxd7Tzd-.js → use-shell-rNKfGjdj.js} +3 -3
  40. package/dist/chunks/{use-shell-jxd7Tzd-.js.map → use-shell-rNKfGjdj.js.map} +1 -1
  41. package/dist/chunks/validation-D312_NLf.js +87 -0
  42. package/dist/chunks/validation-D312_NLf.js.map +1 -0
  43. package/dist/index.d.ts +361 -27
  44. package/dist/index.js +188 -98
  45. package/dist/index.js.map +1 -1
  46. package/dist/pages/account.d.ts +2 -2
  47. package/dist/pages/account.js +297 -135
  48. package/dist/pages/account.js.map +1 -1
  49. package/dist/pages/approval.d.ts +9 -0
  50. package/dist/pages/approval.js +207 -0
  51. package/dist/pages/approval.js.map +1 -0
  52. package/dist/pages/audit.js +17 -542
  53. package/dist/pages/audit.js.map +1 -1
  54. package/dist/pages/device-login.js +2 -3
  55. package/dist/pages/device-login.js.map +1 -1
  56. package/dist/pages/environment.js +647 -257
  57. package/dist/pages/environment.js.map +1 -1
  58. package/dist/pages/login.js +18 -7
  59. package/dist/pages/login.js.map +1 -1
  60. package/dist/pages/oauth-authorize.d.ts +10 -0
  61. package/dist/pages/oauth-authorize.js +249 -0
  62. package/dist/pages/oauth-authorize.js.map +1 -0
  63. package/dist/pages/project-access.d.ts +6 -0
  64. package/dist/pages/project-access.js +370 -0
  65. package/dist/pages/project-access.js.map +1 -0
  66. package/dist/pages/project-environments.d.ts +4 -0
  67. package/dist/pages/project-environments.js +593 -0
  68. package/dist/pages/project-environments.js.map +1 -0
  69. package/dist/pages/project-settings.d.ts +4 -0
  70. package/dist/pages/project-settings.js +242 -0
  71. package/dist/pages/project-settings.js.map +1 -0
  72. package/dist/pages/project.d.ts +10 -2
  73. package/dist/pages/project.js +57 -934
  74. package/dist/pages/project.js.map +1 -1
  75. package/dist/pages/projects.js +53 -21
  76. package/dist/pages/projects.js.map +1 -1
  77. package/dist/pages/service-account.d.ts +10 -0
  78. package/dist/pages/{token.js → service-account.js} +115 -56
  79. package/dist/pages/service-account.js.map +1 -0
  80. package/dist/pages/service-accounts.d.ts +3 -0
  81. package/dist/pages/service-accounts.js +38 -0
  82. package/dist/pages/service-accounts.js.map +1 -0
  83. package/dist/pages/settings.d.ts +1 -0
  84. package/dist/pages/settings.js +104 -42
  85. package/dist/pages/settings.js.map +1 -1
  86. package/dist/pages/unregistered.js +2 -3
  87. package/dist/pages/unregistered.js.map +1 -1
  88. package/dist/pages/user.d.ts +6 -1
  89. package/dist/pages/user.js +18 -6
  90. package/dist/pages/user.js.map +1 -1
  91. package/dist/pages/users.js +6 -10
  92. package/dist/pages/users.js.map +1 -1
  93. package/package.json +3 -3
  94. package/src/components/actions-log.tsx +117 -0
  95. package/src/components/audit-sentence.tsx +55 -0
  96. package/src/components/command-palette.tsx +4 -4
  97. package/src/components/delete-place.tsx +180 -0
  98. package/src/components/directory.tsx +259 -110
  99. package/src/components/every-project.tsx +287 -0
  100. package/src/components/expiry-field.tsx +42 -0
  101. package/src/components/folders.tsx +219 -0
  102. package/src/components/grants.tsx +11 -4
  103. package/src/components/icons.tsx +2 -0
  104. package/src/components/missing.tsx +110 -0
  105. package/src/components/offboarding.tsx +61 -33
  106. package/src/components/page.tsx +4 -1
  107. package/src/components/principal-page.tsx +136 -106
  108. package/src/components/principal-picker.tsx +5 -5
  109. package/src/components/principal.tsx +4 -4
  110. package/src/components/references.tsx +323 -0
  111. package/src/components/service-tokens.tsx +115 -95
  112. package/src/components/shell.tsx +11 -32
  113. package/src/components/tabs.tsx +18 -0
  114. package/src/components/trusted-workloads.tsx +97 -79
  115. package/src/components/ui.tsx +8 -1
  116. package/src/index.ts +13 -2
  117. package/src/layout.tsx +2 -2
  118. package/src/lib/access-plan.ts +2 -2
  119. package/src/lib/audit-sentences.ts +161 -77
  120. package/src/lib/changes.ts +56 -5
  121. package/src/lib/coffre.ts +3 -2
  122. package/src/lib/one-time.ts +32 -0
  123. package/src/lib/project-access.ts +11 -23
  124. package/src/lib/project-page.ts +14 -0
  125. package/src/lib/queries.ts +126 -32
  126. package/src/lib/search.ts +25 -0
  127. package/src/lib/signin-errors.ts +45 -1
  128. package/src/lib/validation.ts +14 -0
  129. package/src/options.ts +187 -35
  130. package/src/pages/account.tsx +274 -129
  131. package/src/pages/approval.tsx +197 -0
  132. package/src/pages/audit.tsx +9 -61
  133. package/src/pages/environment.tsx +585 -286
  134. package/src/pages/login.tsx +8 -2
  135. package/src/pages/oauth-authorize.tsx +233 -0
  136. package/src/pages/project-access.tsx +219 -0
  137. package/src/pages/project-environments.tsx +582 -0
  138. package/src/pages/project-settings.tsx +259 -0
  139. package/src/pages/project.tsx +52 -879
  140. package/src/pages/projects.tsx +55 -18
  141. package/src/pages/service-account.tsx +50 -0
  142. package/src/pages/{tokens.tsx → service-accounts.tsx} +9 -6
  143. package/src/pages/settings.tsx +62 -8
  144. package/src/pages/user.tsx +16 -4
  145. package/src/pages/users.tsx +2 -2
  146. package/src/parity.ts +160 -0
  147. package/src/register.ts +58 -9
  148. package/src/router.tsx +4 -0
  149. package/src/shared/models.ts +6 -2
  150. package/src/styles/globals.css +536 -31
  151. package/dist/chunks/directory-CSjWWUQ1.js.map +0 -1
  152. package/dist/chunks/grants-saMQagmG.js +0 -160
  153. package/dist/chunks/grants-saMQagmG.js.map +0 -1
  154. package/dist/chunks/icons-D-PfAfnH.js +0 -203
  155. package/dist/chunks/icons-D-PfAfnH.js.map +0 -1
  156. package/dist/chunks/offboarding-C6l30DZR.js +0 -263
  157. package/dist/chunks/offboarding-C6l30DZR.js.map +0 -1
  158. package/dist/chunks/page-C5HcNqf2.js +0 -190
  159. package/dist/chunks/page-C5HcNqf2.js.map +0 -1
  160. package/dist/chunks/principal-page-D_91OA0l.js.map +0 -1
  161. package/dist/chunks/queries-CQ81o4so.js.map +0 -1
  162. package/dist/chunks/signin-errors-BEFlVDbQ.js +0 -30
  163. package/dist/chunks/signin-errors-BEFlVDbQ.js.map +0 -1
  164. package/dist/chunks/ui-DixXLQvQ.js.map +0 -1
  165. package/dist/chunks/use-action-CWsg_YWU.js +0 -49
  166. package/dist/chunks/use-action-CWsg_YWU.js.map +0 -1
  167. package/dist/chunks/use-change-c6CeLRin.js.map +0 -1
  168. package/dist/chunks/validation-BQtqPe2V.js +0 -29
  169. package/dist/chunks/validation-BQtqPe2V.js.map +0 -1
  170. package/dist/pages/token.d.ts +0 -3
  171. package/dist/pages/token.js.map +0 -1
  172. package/dist/pages/tokens.d.ts +0 -3
  173. package/dist/pages/tokens.js +0 -39
  174. package/dist/pages/tokens.js.map +0 -1
  175. package/dist/project-BqIy8gYR.d.ts +0 -5
  176. package/src/lib/instance.ts +0 -13
  177. package/src/pages/token.tsx +0 -34
@@ -0,0 +1,110 @@
1
+ import { useState } from 'react';
2
+ import { useQuery } from '@tanstack/react-query';
3
+
4
+ import { useCoffre } from '../lib/coffre';
5
+ import { affects, queries } from '../lib/queries';
6
+ import { useAction } from '../lib/use-action';
7
+ import { Card } from './page';
8
+ import { ErrorLine, Timestamp } from './ui';
9
+
10
+ /**
11
+ * Keys the environment's siblings have and it lacks, of those you read
12
+ * (docs/design/environments.md): each with Add, which opens a new row with
13
+ * its name, and Dismiss, which the whole team then sees, and below them
14
+ * Dismiss all and what was dismissed, each with Restore. Nothing shows when
15
+ * nothing is missing or dismissed.
16
+ */
17
+ export function MissingKeys({
18
+ project,
19
+ environment,
20
+ canWrite,
21
+ onAdd,
22
+ }: {
23
+ project: string;
24
+ environment: string;
25
+ canWrite: boolean;
26
+ /** Open a new row with this name, empty: its value is yours to give. */
27
+ onAdd: (key: string) => void;
28
+ }) {
29
+ const coffre = useCoffre();
30
+ const place = { project, environment };
31
+ const { data } = useQuery(queries.missing(coffre, place));
32
+ const { run, pending, error } = useAction();
33
+ const [showDismissed, setShowDismissed] = useState(false);
34
+ if (data?.ok !== true || (data.missing.length === 0 && data.dismissed.length === 0)) return null;
35
+ const { missing, dismissed } = data;
36
+ const path = `${project}/${environment}`;
37
+ const dismiss = (patch: Record<string, true | null>) => void run(() => coffre.environments.dismiss(path, patch), { affects: affects.secrets(place) });
38
+
39
+ return (
40
+ <>
41
+ <Card
42
+ wide
43
+ labelledBy="missing-keys"
44
+ title={missing.length === 0 ? 'Nothing missing' : `${missing.length} ${missing.length === 1 ? 'key' : 'keys'} from other environments ${missing.length === 1 ? "isn't" : "aren't"} here`}
45
+ description="Compared with the environments you can read."
46
+ >
47
+ <div className="dt-wrap">
48
+ <table className="dt stacks missing-keys">
49
+ <tbody>
50
+ {missing.map((entry) => (
51
+ <tr key={entry.key}>
52
+ <td className="mono" data-label="Key">{entry.key}</td>
53
+ <td className="cell-muted" data-label="In">
54
+ In {entry.in.join(', ')}
55
+ {entry.folder !== null && <>, in {entry.folder}/</>}
56
+ </td>
57
+ {canWrite && (
58
+ <td className="col-actions">
59
+ <div className="acts">
60
+ <button type="button" className="btn btn-sm" onClick={() => onAdd(entry.key)}>
61
+ Add
62
+ </button>
63
+ <button type="button" className="btn btn-sm btn-quiet" disabled={pending} onClick={() => dismiss({ [entry.key]: true })}>
64
+ Dismiss
65
+ </button>
66
+ </div>
67
+ </td>
68
+ )}
69
+ </tr>
70
+ ))}
71
+ {showDismissed && dismissed.length > 0 && (
72
+ <tr className="folder-row">
73
+ <th colSpan={canWrite ? 3 : 2} scope="rowgroup">Dismissed</th>
74
+ </tr>
75
+ )}
76
+ {showDismissed && dismissed.map((entry) => (
77
+ <tr key={`dismissed:${entry.key}`}>
78
+ <td className="mono" data-label="Key">{entry.key}</td>
79
+ <td className="cell-muted" data-label="Dismissed">
80
+ By {entry.dismissedBy} <Timestamp iso={entry.dismissedAt} display="relative" />; in {entry.in.join(', ')}
81
+ </td>
82
+ {canWrite && (
83
+ <td className="col-actions">
84
+ <button type="button" className="btn btn-sm" disabled={pending} onClick={() => dismiss({ [entry.key]: null })}>
85
+ Restore
86
+ </button>
87
+ </td>
88
+ )}
89
+ </tr>
90
+ ))}
91
+ </tbody>
92
+ </table>
93
+ </div>
94
+ {error !== null && <ErrorLine error={error} />}
95
+ </Card>
96
+ <div className="table-actions">
97
+ {canWrite && missing.length > 1 && (
98
+ <button type="button" className="btn" disabled={pending} onClick={() => dismiss(Object.fromEntries(missing.map((entry) => [entry.key, true])))}>
99
+ Dismiss all
100
+ </button>
101
+ )}
102
+ {dismissed.length > 0 && (
103
+ <button type="button" className="btn btn-quiet" aria-expanded={showDismissed} onClick={() => setShowDismissed((open) => !open)}>
104
+ {showDismissed ? 'Hide dismissed' : `Dismissed (${dismissed.length})`}
105
+ </button>
106
+ )}
107
+ </div>
108
+ </>
109
+ );
110
+ }
@@ -3,20 +3,22 @@ import type { PrincipalReport, RemovedPrincipal } from '../shared/models';
3
3
  import { Card } from './page';
4
4
  import { EmptyState, Notice, Timestamp } from './ui';
5
5
  import { PrincipalLink } from './principal';
6
+ import { referenceProblem } from './references';
6
7
  import { ChevronRight, Key, User } from './icons';
8
+ import { serviceName } from '@coffre/client';
7
9
 
8
10
  /**
9
- * The part of a user's or token's page that answers "if they left, what would
10
- * we have to change?". Owners only, and most useful once someone is removed:
11
- * everything that let them in is gone by then, but what they saw is not.
11
+ * The part of a user's or token's page that answers "what do we change now
12
+ * they have left?". Owners only. Once someone is removed everything that let
13
+ * them in is gone, but what they saw is not, nor tokens they issued.
12
14
  */
13
15
  export function PrincipalReportCards({ report }: { report: PrincipalReport }) {
14
- const removed = report.status === 'removed';
15
16
  const person = report.principalType === 'user';
16
17
  return (
17
18
  <>
18
- <SeenValues report={report} removed={removed} person={person} />
19
+ {report.status === 'removed' && <ConsiderRotating report={report} person={person} />}
19
20
  {report.issuedTokens.length > 0 && <IssuedTokens report={report} />}
21
+ {report.references.length > 0 && <MadeReferences report={report} />}
20
22
  </>
21
23
  );
22
24
  }
@@ -47,7 +49,7 @@ export function RemovedNotice({ report }: { report: PrincipalReport }) {
47
49
  }
48
50
 
49
51
  /**
50
- * The people or tokens removed from the directory, under the live ones.
52
+ * The people or service accounts removed from the directory, under the live ones.
51
53
  * Removal ends their access but not the work it leaves, so they stay one click
52
54
  * away until every value they saw has been rotated.
53
55
  */
@@ -64,7 +66,7 @@ export function RemovedList({
64
66
  return (
65
67
  <>
66
68
  <h2 className="section-title">Removed</h2>
67
- <section className="card" aria-label={users ? 'Removed users' : 'Removed tokens'}>
69
+ <section className="card" aria-label={users ? 'Removed users' : 'Removed service accounts'}>
68
70
  <div className="dt-wrap">
69
71
  <table className="dt directory stacks">
70
72
  <thead>
@@ -76,7 +78,7 @@ export function RemovedList({
76
78
  {users ? 'Email' : 'Name'}
77
79
  </span>
78
80
  </th>
79
- <th className="col-role">Still to rotate</th>
81
+ <th className="col-role">Consider rotating</th>
80
82
  <th className="col-actions">
81
83
  <span className="visually-hidden">Report</span>
82
84
  </th>
@@ -89,7 +91,7 @@ export function RemovedList({
89
91
  <td className="col-lead" data-label={users ? 'Email' : 'Name'}>
90
92
  <PrincipalLink type={principal.principalType} id={principal.principalId} stretch />
91
93
  </td>
92
- <td className="col-role" data-label="Still to rotate">
94
+ <td className="col-role" data-label="Consider rotating">
93
95
  {principal.toRotate === 0 ? (
94
96
  <span className="cell-muted">Nothing</span>
95
97
  ) : (
@@ -106,33 +108,18 @@ export function RemovedList({
106
108
  </table>
107
109
  </div>
108
110
  </section>
109
- <p className="hint section-foot">
110
- {users ? 'They' : 'These'} can no longer sign in. Each page lists the values{' '}
111
- {users ? 'they' : 'it'} saw that nobody has changed since.
112
- </p>
113
111
  </>
114
112
  );
115
113
  }
116
114
 
117
- function SeenValues({
118
- report,
119
- removed,
120
- person,
121
- }: {
122
- report: PrincipalReport;
123
- removed: boolean;
124
- person: boolean;
125
- }) {
115
+ /** Values a removed member saw that nobody has changed since. */
116
+ function ConsiderRotating({ report, person }: { report: PrincipalReport; person: boolean }) {
126
117
  const they = person ? 'they' : 'it';
127
- const description = removed
128
- ? `Values ${they} read or wrote that nobody has changed since, so ${they} may still hold them. Rotate each where it comes from, such as a new API key or database password, then save the new value here and it leaves this list.`
129
- : `Current values ${they} ${person ? 'have' : 'has'} read or written: the ones to rotate if ${they} ${person ? 'leave' : 'is retired'}. Saving a new version takes a value off.`;
130
-
131
118
  return (
132
119
  <Card
133
120
  labelledBy="seen-values"
134
- title={removed ? 'Still to rotate' : 'Values seen'}
135
- description={description}
121
+ title="Consider rotating"
122
+ description={`Values ${they} read or wrote that nobody has changed since, so ${they} may still hold them. Rotate each where it comes from, such as a new API key or database password, then save the new value here and it leaves this list.`}
136
123
  actions={
137
124
  report.rotated > 0 && (
138
125
  <span className="card-aside">{report.rotated} already rotated</span>
@@ -140,7 +127,7 @@ function SeenValues({
140
127
  }
141
128
  >
142
129
  {report.exposed.length === 0 ? (
143
- <EmptyState title={removed ? 'Nothing left to rotate' : 'No current values seen'}>
130
+ <EmptyState title="Nothing left to rotate">
144
131
  {report.rotated > 0
145
132
  ? `Every value ${they} saw has had a new version since.`
146
133
  : `${person ? 'They have' : 'It has'} not read or written a value that is still current.`}
@@ -186,12 +173,53 @@ function SeenValues({
186
173
  );
187
174
  }
188
175
 
176
+ /**
177
+ * References they made, as the log names them: each belongs to the
178
+ * environment that holds it, like a value, not to them (D46), so their
179
+ * leaving ends none. Listed to review.
180
+ */
181
+ function MadeReferences({ report }: { report: PrincipalReport }) {
182
+ return (
183
+ <Card
184
+ labelledBy="made-references"
185
+ title="References they made"
186
+ description="Each belongs to the environment that holds it, like a value, and stays when they leave: whoever reads that environment reads another secret through it. Review them; the source's access managers, or whoever writes where one is held, can break it."
187
+ >
188
+ <div className="dt-wrap">
189
+ <table className="dt stacks">
190
+ <thead>
191
+ <tr>
192
+ <th>Reference</th>
193
+ <th>Reads</th>
194
+ <th className="col-shrink">Made</th>
195
+ </tr>
196
+ </thead>
197
+ <tbody>
198
+ {report.references.map((reference) => (
199
+ <tr key={reference.id}>
200
+ <td className="mono" data-label="Reference">{reference.holder}</td>
201
+ <td data-label="Reads">
202
+ <span className="mono">{reference.source}</span>
203
+ {reference.state !== 'live' && <span className="cell-muted"> · {referenceProblem(reference.state)}</span>}
204
+ </td>
205
+ <td className="col-shrink nowrap" data-label="Made">
206
+ <Timestamp iso={reference.createdAt} display="relative" />
207
+ </td>
208
+ </tr>
209
+ ))}
210
+ </tbody>
211
+ </table>
212
+ </div>
213
+ </Card>
214
+ );
215
+ }
216
+
189
217
  function IssuedTokens({ report }: { report: PrincipalReport }) {
190
218
  return (
191
219
  <Card
192
220
  labelledBy="issued-tokens"
193
- title="Tokens they issued"
194
- description="Service tokens they created that still work. Each was shown to them once, when it was made; revoke any they may have kept a copy of."
221
+ title="Bearer tokens they issued"
222
+ description="Bearer tokens they issued to service accounts that still work. Each was shown to them once, when it was made; revoke any they may have kept a copy of."
195
223
  >
196
224
  <div className="dt-wrap">
197
225
  <table className="dt report-tokens">
@@ -207,8 +235,8 @@ function IssuedTokens({ report }: { report: PrincipalReport }) {
207
235
  <tr key={token.id}>
208
236
  <td>
209
237
  <span className="cell-stack">
210
- <Link className="cell-link mono" to="/tokens/$token" params={{ token: token.service }}>
211
- {token.service}
238
+ <Link className="cell-link mono" to="/service-accounts/$account" params={{ account: serviceName(token.service) }}>
239
+ service:{serviceName(token.service)}
212
240
  </Link>
213
241
  <small>
214
242
  {token.label ?? 'No label'} · <span className="mono">{token.hint}</span>
@@ -57,6 +57,7 @@ export function Card({
57
57
  children,
58
58
  labelledBy,
59
59
  tone,
60
+ wide = false,
60
61
  }: {
61
62
  title: ReactNode;
62
63
  description?: ReactNode;
@@ -64,10 +65,12 @@ export function Card({
64
65
  children: ReactNode;
65
66
  labelledBy: string;
66
67
  tone?: 'danger';
68
+ /** Takes the content column whole, for a table of many or long columns. */
69
+ wide?: boolean;
67
70
  }) {
68
71
  return (
69
72
  <section
70
- className={`card${tone === 'danger' ? ' card-danger' : ''}`}
73
+ className={`card${tone === 'danger' ? ' card-danger' : ''}${wide ? ' card-wide' : ''}`}
71
74
  aria-labelledby={labelledBy}
72
75
  >
73
76
  <div className="card-head">