@burdenoff/microfe-security 2026.624.1 → 2026.625.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/security/components/ConfirmDialog.js +28 -37
  2. package/dist/security/components/ConfirmDialog.js.map +1 -1
  3. package/dist/security/components/ImportWizard.js +81 -88
  4. package/dist/security/components/ImportWizard.js.map +1 -1
  5. package/dist/security/components/SecretShareDialog.js +75 -86
  6. package/dist/security/components/SecretShareDialog.js.map +1 -1
  7. package/dist/security/components/SecurityScoreCard.js +21 -20
  8. package/dist/security/components/SecurityScoreCard.js.map +1 -1
  9. package/dist/security/components/VaultShareDialog.js +26 -40
  10. package/dist/security/components/VaultShareDialog.js.map +1 -1
  11. package/dist/security/components/ui.js +2 -2
  12. package/dist/security/components/ui.js.map +1 -1
  13. package/dist/security/pages/AccessReviewPage.js +52 -67
  14. package/dist/security/pages/AccessReviewPage.js.map +1 -1
  15. package/dist/security/pages/ProviderDetailPage.js +122 -142
  16. package/dist/security/pages/ProviderDetailPage.js.map +1 -1
  17. package/dist/security/pages/ProvidersPage.js +118 -113
  18. package/dist/security/pages/ProvidersPage.js.map +1 -1
  19. package/dist/security/pages/SecretCreatePage.js +73 -68
  20. package/dist/security/pages/SecretCreatePage.js.map +1 -1
  21. package/dist/security/pages/SecretDetailPage.js +240 -253
  22. package/dist/security/pages/SecretDetailPage.js.map +1 -1
  23. package/dist/security/pages/SecurityDashboardPage.js +89 -85
  24. package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
  25. package/dist/security/pages/VaultDetailPage.js +137 -183
  26. package/dist/security/pages/VaultDetailPage.js.map +1 -1
  27. package/dist/security/pages/VaultShareViewer.js +61 -59
  28. package/dist/security/pages/VaultShareViewer.js.map +1 -1
  29. package/dist/security/pages/VaultsDashboardPage.js +66 -64
  30. package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
  31. package/package.json +2 -2
@@ -3,277 +3,269 @@ import { SECURITY_FEATURE_FLAGS as t } from "../constants/featureFlags.js";
3
3
  import { cn as n } from "../utils/cn.js";
4
4
  import { PageLayout as r } from "../components/PageLayout.js";
5
5
  import { Badge as i, Button as a, Card as o } from "../components/ui.js";
6
- import { translateWithFallback as s } from "../utils/i18n.js";
7
- import { ConfirmDialog as c } from "../components/ConfirmDialog.js";
8
- import { useGetSecretVersionsQuery as ee } from "../../generated/wspace-operations.js";
9
- import { useSecurityEventEmitter as te } from "../hooks/useSecurityEventEmitter.js";
10
- import { useDeleteSecret as ne, useGetSecret as re, useRollbackSecret as ie, useRotateSecret as ae } from "../hooks/useSecretQueries.js";
11
- import { nativeConfirm as oe, nativeImpact as se, nativeNotify as l } from "../../utils/nativeBridge.js";
12
- import { SecurityPermissionGuard as u } from "../components/SecurityPermissionGuard.js";
13
- import { SecretValueDisplay as d } from "../components/SecretValueDisplay.js";
14
- import { SecretTypeBadge as f } from "../components/SecretTypeBadge.js";
15
- import { RotationStatusBadge as p } from "../components/RotationStatusBadge.js";
16
- import { SecretShareDialog as m } from "../components/SecretShareDialog.js";
17
- import { useSecretValue as h } from "../hooks/useSecretValue.js";
18
- import { useRef as ce, useState as g } from "react";
19
- import { usePermission as _ } from "@burdenoff/fe-libs/shared/providers/shell";
20
- import { useNavigate as le, useParams as ue } from "react-router-dom";
21
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
22
- import { AlertTriangle as de, ArrowLeft as b, Calendar as fe, Clock as pe, History as x, KeyRound as me, Loader2 as S, RefreshCw as C, Share2 as he, Shield as ge, Trash2 as w, X as T } from "lucide-react";
23
- import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
+ import { translateWithFallback as ee } from "../utils/i18n.js";
7
+ import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
8
+ import { useGetSecretVersionsQuery as ne } from "../../generated/wspace-operations.js";
9
+ import { useSecurityEventEmitter as re } from "../hooks/useSecurityEventEmitter.js";
10
+ import { useDeleteSecret as ie, useGetSecret as ae, useRollbackSecret as s, useRotateSecret as c } from "../hooks/useSecretQueries.js";
11
+ import { nativeConfirm as l, nativeImpact as u, nativeNotify as d } from "../../utils/nativeBridge.js";
12
+ import { SecurityPermissionGuard as oe } from "../components/SecurityPermissionGuard.js";
13
+ import { SecretValueDisplay as se } from "../components/SecretValueDisplay.js";
14
+ import { SecretTypeBadge as ce } from "../components/SecretTypeBadge.js";
15
+ import { RotationStatusBadge as le } from "../components/RotationStatusBadge.js";
16
+ import { SecretShareDialog as ue } from "../components/SecretShareDialog.js";
17
+ import { useSecretValue as de } from "../hooks/useSecretValue.js";
18
+ import { useRef as fe, useState as f } from "react";
19
+ import { useFeatureFlag as pe, usePermission as p } from "@burdenoff/fe-libs/shared/providers/shell";
20
+ import { useNavigate as me, useParams as m } from "react-router-dom";
21
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
22
+ import { AlertTriangle as he, ArrowLeft as _, Calendar as v, Clock as y, History as b, KeyRound as ge, Loader2 as x, RefreshCw as S, Share2 as _e, Shield as ve, Trash2 as ye } from "lucide-react";
23
+ import { CTAOverflowMenu as be, Dialog as C, DialogContent as w, DialogHeader as T, DialogTitle as E, GlassCard as D } from "@burdenoff/fe-libs/ui";
24
+ import { useI18n as O } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
25
  //#region src/security/pages/SecretDetailPage.tsx
25
- function D() {
26
- let { vaultId: D, secretId: O } = ue(), { basePath: k = "/", navigate: A } = e(), { t: j } = E(), M = le(), { data: N, loading: P, error: F, refetch: I } = re(O ?? null), L = N?.getSecret, { data: _e, loading: ve } = ee({
26
+ function k() {
27
+ let { vaultId: k, secretId: A } = m(), { basePath: j = "/", navigate: M } = e(), { t: N } = O(), xe = me(), { data: Se, loading: Ce, error: P, refetch: F } = ae(A ?? null), I = Se?.getSecret, { data: we, loading: Te } = ne({
27
28
  variables: {
28
- secretId: O ?? "",
29
+ secretId: A ?? "",
29
30
  pagination: { limit: 50 }
30
31
  },
31
- skip: !O,
32
+ skip: !A,
32
33
  fetchPolicy: "network-only"
33
- }), ye = _e?.getSecretVersionsPaginated?.items ?? [], { value: be, reveal: xe, hide: Se, loading: Ce, isRevealed: R } = h(O ?? ""), [we, { loading: Te }] = ne(), [Ee, { loading: z }] = ae(), [De, { loading: Oe }] = ie(), { emit: B } = te(), ke = _("secret:delete"), Ae = _("secret:update"), je = _("secret:decrypt"), [Me, V] = g(!1), [Ne, H] = g(!1), [Pe, U] = g(!1), W = ce(null), Fe = () => {
34
- U(!0), requestAnimationFrame(() => W.current?.focus());
35
- }, [G, K] = g(!1), [q, J] = g(""), Y = (e, t, n) => s(j, e, t, n), Ie = (e) => {
36
- A ? A(e) : M(e);
34
+ }), Ee = we?.getSecretVersionsPaginated?.items ?? [], { value: De, reveal: Oe, hide: ke, loading: L, isRevealed: R } = de(A ?? ""), [Ae, { loading: je }] = ie(), [Me, { loading: z }] = c(), [Ne, { loading: Pe }] = s(), { emit: B } = re(), Fe = p("secret:delete"), V = p("secret:update"), Ie = p("secret:decrypt"), Le = pe(t.SECRET_ROTATE, !1), [Re, H] = f(!1), [ze, U] = f(!1), [Be, W] = f(!1), G = fe(null), Ve = () => {
35
+ W(!0), requestAnimationFrame(() => G.current?.focus());
36
+ }, [He, K] = f(!1), [q, J] = f(""), Y = (e, t, n) => ee(N, e, t, n), Ue = (e) => {
37
+ M ? M(e) : xe(e);
37
38
  }, X = () => {
38
- Ie(`${k}/vaults/${D}`);
39
+ Ue(`${j}/vaults/${k}`);
39
40
  }, Z = async () => {
40
- if (O) try {
41
- await we({ variables: { id: O } }), B("secret.deleted", {
42
- secretId: O,
43
- vaultId: D
44
- }), V(!1), l("success"), X();
41
+ if (A) try {
42
+ await Ae({ variables: { id: A } }), B("secret.deleted", {
43
+ secretId: A,
44
+ vaultId: k
45
+ }), H(!1), d("success"), X();
45
46
  } catch (e) {
46
- console.error("Failed to delete secret:", e), l("error");
47
+ console.error("Failed to delete secret:", e), d("error");
47
48
  }
48
- }, Le = async () => {
49
- se("medium");
50
- let e = await oe({
49
+ }, We = async () => {
50
+ u("medium");
51
+ let e = await l({
51
52
  title: "Delete Secret",
52
53
  message: "Delete this secret? This cannot be undone.",
53
54
  okButtonTitle: "Delete",
54
55
  cancelButtonTitle: "Cancel"
55
56
  });
56
57
  if (e === null) {
57
- V(!0);
58
+ H(!0);
58
59
  return;
59
60
  }
60
61
  e && await Z();
61
- }, Re = async () => {
62
- if (!(!O || !q.trim())) try {
63
- await Ee({ variables: {
64
- id: O,
62
+ }, Ge = async () => {
63
+ if (!(!A || !q.trim())) try {
64
+ await Me({ variables: {
65
+ id: A,
65
66
  newValue: q.trim()
66
67
  } }), B("secret.rotated", {
67
- secretId: O,
68
- vaultId: D
69
- }), U(!1), J(""), I();
68
+ secretId: A,
69
+ vaultId: k
70
+ }), W(!1), J(""), F();
70
71
  } catch (e) {
71
72
  console.error("Failed to rotate secret:", e);
72
73
  }
73
- }, ze = async (e) => {
74
- if (O) try {
75
- await De({ variables: {
76
- id: O,
74
+ }, Ke = async (e) => {
75
+ if (A) try {
76
+ await Ne({ variables: {
77
+ id: A,
77
78
  version: e
78
79
  } }), B("secret.rollback", {
79
- secretId: O,
80
- vaultId: D
81
- }), I(), K(!1);
80
+ secretId: A,
81
+ vaultId: k
82
+ }), F(), K(!1);
82
83
  } catch (e) {
83
84
  console.error("Failed to rollback secret:", e);
84
85
  }
85
86
  };
86
- if (P && !L) return /* @__PURE__ */ v(r, {
87
+ if (Ce && !I) return /* @__PURE__ */ h(r, {
87
88
  title: Y("security.secretDetail.loading.title", "Loading Secret..."),
88
89
  breadcrumbs: [{
89
90
  label: Y("security.common.breadcrumbs.security", "Security"),
90
- path: k
91
+ path: j
91
92
  }, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
92
- children: /* @__PURE__ */ v("div", {
93
+ children: /* @__PURE__ */ h("div", {
93
94
  className: "flex items-center justify-center py-20",
94
- children: /* @__PURE__ */ v(S, { className: "size-10 animate-spin text-primary/60" })
95
+ children: /* @__PURE__ */ h(x, { className: "size-10 animate-spin text-primary/60" })
95
96
  })
96
97
  });
97
- if (F || !L) return /* @__PURE__ */ v(r, {
98
+ if (P || !I) return /* @__PURE__ */ h(r, {
98
99
  title: Y("security.common.errorPage.title", "Error"),
99
100
  breadcrumbs: [{
100
101
  label: Y("security.common.breadcrumbs.security", "Security"),
101
- path: k
102
+ path: j
102
103
  }, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
103
- children: /* @__PURE__ */ v(o, {
104
+ children: /* @__PURE__ */ h(o, {
104
105
  className: "p-8 text-center max-w-lg mx-auto mt-10",
105
- children: /* @__PURE__ */ y("div", {
106
+ children: /* @__PURE__ */ g("div", {
106
107
  className: "flex flex-col items-center gap-4",
107
108
  children: [
108
- /* @__PURE__ */ v("div", {
109
+ /* @__PURE__ */ h("div", {
109
110
  className: "p-3 rounded-full bg-status-error-bg/10",
110
- children: /* @__PURE__ */ v(de, { className: "size-8 text-status-error-text" })
111
+ children: /* @__PURE__ */ h(he, { className: "size-8 text-status-error-text" })
111
112
  }),
112
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h3", {
113
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
113
114
  className: "text-lg font-bold text-text-primary",
114
115
  children: Y("security.secretDetail.error.title", "Failed to load secret")
115
- }), /* @__PURE__ */ v("p", {
116
+ }), /* @__PURE__ */ h("p", {
116
117
  className: "text-sm text-text-secondary mt-2",
117
- children: F?.message ?? Y("security.secretDetail.error.description", "Secret not found or access denied.")
118
+ children: P?.message ?? Y("security.secretDetail.error.description", "Secret not found or access denied.")
118
119
  })] }),
119
- /* @__PURE__ */ y(a, {
120
+ /* @__PURE__ */ g(a, {
120
121
  variant: "outline",
121
122
  onClick: X,
122
123
  className: "mt-4",
123
- children: [/* @__PURE__ */ v(b, { className: "size-4" }), Y("security.secretDetail.actions.backToVault", "Go Back to Vault")]
124
+ children: [/* @__PURE__ */ h(_, { className: "size-4" }), Y("security.secretDetail.actions.backToVault", "Go Back to Vault")]
124
125
  })
125
126
  ]
126
127
  })
127
128
  })
128
129
  });
129
- let Q = L.versionCount ?? 0, $ = L.lastRotatedAt ? "healthy" : void 0;
130
- return /* @__PURE__ */ y(r, {
131
- title: L.name,
132
- description: L.description ?? Y("security.secretDetail.description", "View and manage this secret."),
130
+ let Q = I.versionCount ?? 0, $ = I.lastRotatedAt ? "healthy" : void 0;
131
+ return /* @__PURE__ */ g(r, {
132
+ title: I.name,
133
+ description: I.description ?? Y("security.secretDetail.description", "View and manage this secret."),
133
134
  breadcrumbs: [
134
135
  {
135
136
  label: Y("security.common.breadcrumbs.security", "Security"),
136
- path: k
137
+ path: j
137
138
  },
138
139
  {
139
140
  label: Y("security.common.breadcrumbs.vault", "Vault"),
140
- path: `${k}/vaults/${D}`
141
+ path: `${j}/vaults/${k}`
141
142
  },
142
- { label: L.name }
143
+ { label: I.name }
143
144
  ],
144
- actions: /* @__PURE__ */ y("div", {
145
- className: "flex flex-wrap items-center gap-2",
146
- children: [
147
- /* @__PURE__ */ y(a, {
145
+ actions: (() => {
146
+ let e = [];
147
+ return V && e.push({
148
+ label: Y("security.common.actions.share", "Share"),
149
+ icon: /* @__PURE__ */ h(_e, { className: "size-4" }),
150
+ onSelect: () => U(!0)
151
+ }), V && Le && e.push({
152
+ label: Y("security.secretDetail.actions.rotate", "Rotate"),
153
+ icon: /* @__PURE__ */ h(S, { className: "size-4" }),
154
+ onSelect: Ve
155
+ }), Fe && e.push({
156
+ label: Y("security.common.actions.delete", "Delete"),
157
+ icon: /* @__PURE__ */ h(ye, { className: "size-4" }),
158
+ intent: "destructive",
159
+ onSelect: () => void We()
160
+ }), /* @__PURE__ */ g("div", {
161
+ className: "flex flex-wrap items-center gap-2",
162
+ children: [/* @__PURE__ */ g(a, {
148
163
  variant: "outline",
149
164
  size: "sm",
150
165
  onClick: X,
151
166
  children: [
152
- /* @__PURE__ */ v(b, { className: "size-4" }),
153
- /* @__PURE__ */ v("span", {
167
+ /* @__PURE__ */ h(_, { className: "size-4" }),
168
+ /* @__PURE__ */ h("span", {
154
169
  className: "hidden sm:inline",
155
170
  children: Y("security.secretDetail.actions.backToVault", "Back to Vault")
156
171
  }),
157
- /* @__PURE__ */ v("span", {
172
+ /* @__PURE__ */ h("span", {
158
173
  className: "sm:hidden",
159
174
  children: Y("security.common.actions.back", "Back")
160
175
  })
161
176
  ]
162
- }),
163
- Ae && /* @__PURE__ */ y(a, {
164
- variant: "outline",
165
- size: "sm",
166
- onClick: () => H(!0),
167
- children: [/* @__PURE__ */ v(he, { className: "size-4" }), Y("security.common.actions.share", "Share")]
168
- }),
169
- /* @__PURE__ */ v(u, {
170
- permission: "secret:update",
171
- featureFlagKey: t.SECRET_ROTATE,
172
- featureFlagDefault: !1,
173
- children: /* @__PURE__ */ y(a, {
174
- variant: "outline",
175
- size: "sm",
176
- onClick: Fe,
177
- children: [/* @__PURE__ */ v(C, { className: "size-4" }), Y("security.secretDetail.actions.rotate", "Rotate")]
178
- })
179
- }),
180
- ke && /* @__PURE__ */ y(a, {
181
- variant: "outline",
182
- size: "sm",
183
- className: "text-status-error-text hover:bg-status-error-bg/10 border-status-error-border/20",
184
- onClick: () => void Le(),
185
- children: [/* @__PURE__ */ v(w, { className: "size-4" }), Y("security.common.actions.delete", "Delete")]
186
- })
187
- ]
188
- }),
177
+ }), /* @__PURE__ */ h(be, { actions: e })]
178
+ });
179
+ })(),
189
180
  children: [
190
- /* @__PURE__ */ y("div", {
181
+ /* @__PURE__ */ g("div", {
191
182
  className: "space-y-6",
192
- children: [/* @__PURE__ */ y("div", {
183
+ children: [/* @__PURE__ */ g("div", {
193
184
  className: "flex flex-wrap items-center gap-3",
194
185
  children: [
195
- /* @__PURE__ */ v(f, { type: L.type }),
196
- $ && /* @__PURE__ */ v(p, { status: $ }),
197
- /* @__PURE__ */ v(i, {
186
+ /* @__PURE__ */ h(ce, { type: I.type }),
187
+ $ && /* @__PURE__ */ h(le, { status: $ }),
188
+ /* @__PURE__ */ h(i, {
198
189
  variant: "outline",
199
190
  className: "bg-bg-surface/50",
200
- children: Y("security.secretDetail.status.label", "Status: {status}", { status: L.status })
191
+ children: Y("security.secretDetail.status.label", "Status: {status}", { status: I.status })
201
192
  }),
202
- L.labels?.map((e) => /* @__PURE__ */ v(i, {
193
+ I.labels?.map((e) => /* @__PURE__ */ h(i, {
203
194
  variant: "outline",
204
195
  className: "border-primary/20 text-primary",
205
196
  children: e.label
206
197
  }, e.id))
207
198
  ]
208
- }), /* @__PURE__ */ y("div", {
199
+ }), /* @__PURE__ */ g("div", {
209
200
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
210
- children: [/* @__PURE__ */ y("div", {
201
+ children: [/* @__PURE__ */ g("div", {
211
202
  className: "md:col-span-2 space-y-6",
212
- children: [/* @__PURE__ */ y(o, {
213
- className: "p-6 shadow-sm border-border-subtle/60",
203
+ children: [/* @__PURE__ */ g(D, {
204
+ treatment: "glass",
205
+ className: "p-6",
214
206
  children: [
215
- /* @__PURE__ */ y("div", {
207
+ /* @__PURE__ */ g("div", {
216
208
  className: "flex items-center justify-between mb-4",
217
- children: [/* @__PURE__ */ y("h2", {
209
+ children: [/* @__PURE__ */ g("h2", {
218
210
  className: "text-lg font-bold text-text-primary flex items-center gap-2",
219
- children: [/* @__PURE__ */ v(me, { className: "size-5 text-primary" }), Y("security.secretDetail.value.title", "Secret Value")]
220
- }), L.expiresAt && /* @__PURE__ */ y("div", {
211
+ children: [/* @__PURE__ */ h(ge, { className: "size-5 text-primary" }), Y("security.secretDetail.value.title", "Secret Value")]
212
+ }), I.expiresAt && /* @__PURE__ */ g("div", {
221
213
  className: "flex items-center gap-1.5 text-xs text-warning",
222
- children: [/* @__PURE__ */ v(fe, { className: "size-3.5" }), Y("security.secretDetail.value.expires", "Expires: {date}", { date: new Date(L.expiresAt).toLocaleDateString() })]
214
+ children: [/* @__PURE__ */ h(v, { className: "size-3.5" }), Y("security.secretDetail.value.expires", "Expires: {date}", { date: new Date(I.expiresAt).toLocaleDateString() })]
223
215
  })]
224
216
  }),
225
- /* @__PURE__ */ v(d, {
226
- value: be ?? "",
217
+ /* @__PURE__ */ h(se, {
218
+ value: De ?? "",
227
219
  isRevealed: R,
228
- onToggleReveal: je ? () => {
229
- R ? Se() : xe();
220
+ onToggleReveal: Ie ? () => {
221
+ R ? ke() : Oe();
230
222
  } : void 0,
231
- isLoading: Ce
223
+ isLoading: L
232
224
  }),
233
- /* @__PURE__ */ v("p", {
225
+ /* @__PURE__ */ h("p", {
234
226
  className: "text-xs text-text-secondary mt-4 italic",
235
227
  children: Y("security.secretDetail.value.note", "Secret values are decrypted on-demand and never stored in plain text.")
236
228
  })
237
229
  ]
238
- }), /* @__PURE__ */ y(o, {
230
+ }), /* @__PURE__ */ g(o, {
239
231
  className: "p-6 shadow-sm border-border-subtle/60",
240
- children: [/* @__PURE__ */ y("div", {
232
+ children: [/* @__PURE__ */ g("div", {
241
233
  className: "flex items-center justify-between mb-6",
242
- children: [/* @__PURE__ */ y("h2", {
234
+ children: [/* @__PURE__ */ g("h2", {
243
235
  className: "text-lg font-bold text-text-primary flex items-center gap-2",
244
- children: [/* @__PURE__ */ v(x, { className: "size-5 text-primary" }), Y("security.secretDetail.history.title", "Version History")]
245
- }), /* @__PURE__ */ v(i, {
236
+ children: [/* @__PURE__ */ h(b, { className: "size-5 text-primary" }), Y("security.secretDetail.history.title", "Version History")]
237
+ }), /* @__PURE__ */ h(i, {
246
238
  variant: "outline",
247
239
  className: "bg-bg-sunken font-mono",
248
240
  children: Y("security.secretDetail.history.totalVersions", "{count} total versions", { count: Q })
249
241
  })]
250
- }), /* @__PURE__ */ y("div", {
242
+ }), /* @__PURE__ */ g("div", {
251
243
  className: "space-y-4",
252
- children: [/* @__PURE__ */ y("div", {
244
+ children: [/* @__PURE__ */ g("div", {
253
245
  className: "flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10",
254
- children: [/* @__PURE__ */ y("div", {
246
+ children: [/* @__PURE__ */ g("div", {
255
247
  className: "flex items-center gap-3",
256
- children: [/* @__PURE__ */ y("div", {
257
- className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold",
258
- children: ["v", L.version ?? Q]
259
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
248
+ children: [/* @__PURE__ */ g("div", {
249
+ className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums",
250
+ children: ["v", I.version ?? Q]
251
+ }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
260
252
  className: "text-sm font-semibold",
261
253
  children: Y("security.secretDetail.history.currentVersion", "Current Active Version")
262
- }), /* @__PURE__ */ v("p", {
254
+ }), /* @__PURE__ */ h("p", {
263
255
  className: "text-xs text-text-secondary",
264
- children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(L.updatedAt).toLocaleString() })
256
+ children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(I.updatedAt).toLocaleString() })
265
257
  })] })]
266
- }), /* @__PURE__ */ v(i, {
258
+ }), /* @__PURE__ */ h(i, {
267
259
  variant: "success",
268
260
  className: "text-[10px] uppercase",
269
261
  children: Y("security.common.status.active", "Active")
270
262
  })]
271
- }), Q > 1 && /* @__PURE__ */ y("div", {
263
+ }), Q > 1 && /* @__PURE__ */ g("div", {
272
264
  className: "text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20",
273
- children: [/* @__PURE__ */ v("p", {
265
+ children: [/* @__PURE__ */ h("p", {
274
266
  className: "text-sm text-text-secondary",
275
267
  children: Y("security.secretDetail.history.available", "Historical versions are available. You can rollback to a previous state if needed.")
276
- }), /* @__PURE__ */ v(a, {
268
+ }), /* @__PURE__ */ h(a, {
277
269
  variant: "outline",
278
270
  size: "sm",
279
271
  className: "mt-3",
@@ -283,52 +275,53 @@ function D() {
283
275
  })]
284
276
  })]
285
277
  })]
286
- }), /* @__PURE__ */ y("div", {
278
+ }), /* @__PURE__ */ g("div", {
287
279
  className: "space-y-6",
288
- children: [/* @__PURE__ */ y(o, {
280
+ children: [/* @__PURE__ */ g(o, {
289
281
  className: "p-6 shadow-sm border-border-subtle/60 space-y-4",
290
- children: [/* @__PURE__ */ v("h3", {
282
+ children: [/* @__PURE__ */ h("h3", {
291
283
  className: "font-bold text-sm uppercase tracking-wider text-text-secondary",
292
284
  children: Y("security.secretDetail.details.title", "Details")
293
- }), /* @__PURE__ */ y("div", {
285
+ }), /* @__PURE__ */ g("div", {
294
286
  className: "space-y-3",
295
287
  children: [
296
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
288
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
297
289
  className: "text-xs text-text-secondary",
298
290
  children: Y("security.secretDetail.details.keyIdentifier", "Key Identifier")
299
- }), /* @__PURE__ */ v("code", {
291
+ }), /* @__PURE__ */ h("code", {
300
292
  className: "text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap",
301
- children: L.key
293
+ children: I.key
302
294
  })] }),
303
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
295
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
304
296
  className: "text-xs text-text-secondary",
305
297
  children: Y("security.secretDetail.details.createdBy", "Created By")
306
- }), /* @__PURE__ */ v("p", {
298
+ }), /* @__PURE__ */ h("p", {
307
299
  className: "text-sm font-medium mt-1",
308
- children: L.createdBy
300
+ children: I.createdBy
309
301
  })] }),
310
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
302
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
311
303
  className: "text-xs text-text-secondary",
312
304
  children: Y("security.secretDetail.details.createdAt", "Created At")
313
- }), /* @__PURE__ */ y("div", {
305
+ }), /* @__PURE__ */ g("div", {
314
306
  className: "flex items-center gap-1.5 text-sm mt-1",
315
- children: [/* @__PURE__ */ v(pe, { className: "size-3.5" }), new Date(L.createdAt).toLocaleDateString()]
307
+ children: [/* @__PURE__ */ h(y, { className: "size-3.5" }), new Date(I.createdAt).toLocaleDateString()]
316
308
  })] }),
317
- L.lastRotatedAt && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
309
+ I.lastRotatedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
318
310
  className: "text-xs text-text-secondary",
319
311
  children: Y("security.secretDetail.details.lastRotation", "Last Rotation")
320
- }), /* @__PURE__ */ v("p", {
312
+ }), /* @__PURE__ */ h("p", {
321
313
  className: "text-sm mt-1",
322
- children: new Date(L.lastRotatedAt).toLocaleString()
314
+ children: new Date(I.lastRotatedAt).toLocaleString()
323
315
  })] })
324
316
  ]
325
317
  })]
326
- }), /* @__PURE__ */ y(o, {
327
- className: "p-6 shadow-sm border-border-subtle/60 space-y-4 bg-action-primary-bg/5 border-primary/10",
328
- children: [/* @__PURE__ */ y("h3", {
318
+ }), /* @__PURE__ */ g(D, {
319
+ treatment: "insight",
320
+ className: "p-6 space-y-4",
321
+ children: [/* @__PURE__ */ g("h3", {
329
322
  className: "font-bold text-sm text-primary flex items-center gap-2",
330
- children: [/* @__PURE__ */ v(ge, { className: "size-4" }), Y("security.secretDetail.security.title", "Security")]
331
- }), /* @__PURE__ */ v("p", {
323
+ children: [/* @__PURE__ */ h(ve, { className: "size-4" }), Y("security.secretDetail.security.title", "Security")]
324
+ }), /* @__PURE__ */ h("p", {
332
325
  className: "text-xs text-text-secondary leading-relaxed",
333
326
  children: Y("security.secretDetail.security.description", "This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.")
334
327
  })]
@@ -336,75 +329,68 @@ function D() {
336
329
  })]
337
330
  })]
338
331
  }),
339
- G && /* @__PURE__ */ y("div", {
340
- className: "fixed inset-0 z-50 flex items-center justify-center p-4",
341
- children: [/* @__PURE__ */ v("button", {
342
- type: "button",
343
- "aria-label": "Close version history",
344
- className: "absolute inset-0 bg-bg-surface/80 backdrop-blur-sm animate-in fade-in duration-200 cursor-default",
345
- onClick: () => K(!1)
346
- }), /* @__PURE__ */ y(o, {
347
- className: "relative z-10 w-full max-w-2xl shadow-2xl animate-in zoom-in-95 duration-200 border-primary/20 max-h-[80vh] flex flex-col",
348
- children: [/* @__PURE__ */ y("div", {
349
- className: "flex items-center justify-between p-6 border-b border-border-subtle",
350
- children: [/* @__PURE__ */ y("div", {
332
+ /* @__PURE__ */ h(C, {
333
+ open: He,
334
+ onOpenChange: (e) => {
335
+ e || K(!1);
336
+ },
337
+ children: /* @__PURE__ */ g(w, {
338
+ className: "max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0",
339
+ children: [/* @__PURE__ */ h(T, {
340
+ className: "p-6 border-b border-border-subtle text-left",
341
+ children: /* @__PURE__ */ g("div", {
351
342
  className: "flex items-center gap-3",
352
- children: [/* @__PURE__ */ v("div", {
343
+ children: [/* @__PURE__ */ h("div", {
353
344
  className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
354
- children: /* @__PURE__ */ v(x, { className: "size-5" })
355
- }), /* @__PURE__ */ v("h2", {
356
- className: "text-xl font-bold text-text-primary",
345
+ children: /* @__PURE__ */ h(b, { className: "size-5" })
346
+ }), /* @__PURE__ */ h(E, {
347
+ className: "text-xl font-bold",
357
348
  children: Y("security.secretDetail.history.modalTitle", "Version History")
358
349
  })]
359
- }), /* @__PURE__ */ v("button", {
360
- type: "button",
361
- onClick: () => K(!1),
362
- className: "p-2 rounded-md hover:bg-bg-sunken text-text-secondary transition-colors",
363
- children: /* @__PURE__ */ v(T, { className: "size-5" })
364
- })]
365
- }), /* @__PURE__ */ v("div", {
350
+ })
351
+ }), /* @__PURE__ */ h("div", {
366
352
  className: "p-6 overflow-y-auto flex-1",
367
- children: ve ? /* @__PURE__ */ v("div", {
353
+ children: Te ? /* @__PURE__ */ h("div", {
368
354
  className: "flex justify-center py-8",
369
- children: /* @__PURE__ */ v(S, { className: "size-8 animate-spin text-primary/60" })
370
- }) : /* @__PURE__ */ v("div", {
355
+ children: /* @__PURE__ */ h(x, { className: "size-8 animate-spin text-primary/60" })
356
+ }) : /* @__PURE__ */ h("div", {
371
357
  className: "space-y-4",
372
- children: ye.map((e) => /* @__PURE__ */ v("div", {
373
- className: n("p-4 rounded-lg border", e.version === L.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
374
- children: /* @__PURE__ */ y("div", {
358
+ children: Ee.map((e) => /* @__PURE__ */ h("div", {
359
+ className: n("p-4 rounded-lg border", e.version === I.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
360
+ children: /* @__PURE__ */ g("div", {
375
361
  className: "flex items-center justify-between",
376
- children: [/* @__PURE__ */ y("div", { children: [
377
- /* @__PURE__ */ y("div", {
362
+ children: [/* @__PURE__ */ g("div", { children: [
363
+ /* @__PURE__ */ g("div", {
378
364
  className: "flex items-center gap-2",
379
- children: [/* @__PURE__ */ v("span", {
365
+ children: [/* @__PURE__ */ h("span", {
380
366
  className: "font-semibold",
381
367
  children: Y("security.secretDetail.history.versionLabel", "Version {version}", { version: e.version })
382
- }), e.version === L.version && /* @__PURE__ */ v(i, {
368
+ }), e.version === I.version && /* @__PURE__ */ h(i, {
383
369
  variant: "success",
384
370
  className: "text-[10px] uppercase",
385
371
  children: Y("security.common.status.active", "Active")
386
372
  })]
387
373
  }),
388
- /* @__PURE__ */ v("p", {
374
+ /* @__PURE__ */ h("p", {
389
375
  className: "text-xs text-text-secondary mt-1",
390
376
  children: Y("security.secretDetail.history.versionMeta", "{date} by {createdBy}", {
391
377
  date: new Date(e.createdAt).toLocaleString(),
392
378
  createdBy: e.createdBy
393
379
  })
394
380
  }),
395
- e.changeReason && /* @__PURE__ */ v("p", {
381
+ e.changeReason && /* @__PURE__ */ h("p", {
396
382
  className: "text-sm mt-2",
397
383
  children: e.changeReason
398
384
  })
399
- ] }), e.version !== L.version && /* @__PURE__ */ v(u, {
385
+ ] }), e.version !== I.version && /* @__PURE__ */ h(oe, {
400
386
  permission: "secret:update",
401
387
  featureFlagKey: t.SECRET_ROLLBACK,
402
388
  featureFlagDefault: !1,
403
- children: /* @__PURE__ */ v(a, {
389
+ children: /* @__PURE__ */ h(a, {
404
390
  variant: "outline",
405
391
  size: "sm",
406
- onClick: () => ze(e.version),
407
- disabled: Oe,
392
+ onClick: () => Ke(e.version),
393
+ disabled: Pe,
408
394
  children: Y("security.secretDetail.actions.rollback", "Rollback")
409
395
  })
410
396
  })]
@@ -412,53 +398,54 @@ function D() {
412
398
  }, e.id))
413
399
  })
414
400
  })]
415
- })]
401
+ })
416
402
  }),
417
- /* @__PURE__ */ v(c, {
418
- isOpen: Me,
419
- onClose: () => V(!1),
403
+ /* @__PURE__ */ h(te, {
404
+ isOpen: Re,
405
+ onClose: () => H(!1),
420
406
  onConfirm: Z,
421
407
  title: Y("security.secretDetail.delete.title", "Delete Secret"),
422
- description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name: L.name }),
423
- confirmLabel: Te ? Y("security.secretDetail.delete.deleting", "Deleting...") : Y("security.secretDetail.delete.confirm", "Delete Secret"),
408
+ description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name: I.name }),
409
+ confirmLabel: je ? Y("security.secretDetail.delete.deleting", "Deleting...") : Y("security.secretDetail.delete.confirm", "Delete Secret"),
424
410
  variant: "destructive"
425
411
  }),
426
- Pe && /* @__PURE__ */ y("div", {
427
- className: "fixed inset-0 z-50 flex items-center justify-center p-4",
428
- children: [/* @__PURE__ */ v("button", {
429
- type: "button",
430
- "aria-label": "Close rotate dialog",
431
- className: "absolute inset-0 bg-bg-surface/80 backdrop-blur-sm animate-in fade-in duration-200 cursor-default",
432
- onClick: () => U(!1)
433
- }), /* @__PURE__ */ v(o, {
434
- className: "relative z-10 w-full max-w-md shadow-2xl animate-in zoom-in-95 duration-200 border-primary/20",
435
- children: /* @__PURE__ */ y("div", {
436
- className: "p-6 space-y-4",
412
+ /* @__PURE__ */ h(C, {
413
+ open: Be,
414
+ onOpenChange: (e) => {
415
+ e || W(!1);
416
+ },
417
+ children: /* @__PURE__ */ h(w, {
418
+ className: "max-w-md border-primary/20",
419
+ children: /* @__PURE__ */ g("div", {
420
+ className: "space-y-4",
437
421
  children: [
438
- /* @__PURE__ */ y("div", {
439
- className: "flex items-center gap-3",
440
- children: [/* @__PURE__ */ v("div", {
441
- className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
442
- children: /* @__PURE__ */ v(C, { className: "size-5" })
443
- }), /* @__PURE__ */ v("h2", {
444
- className: "text-xl font-bold text-text-primary",
445
- children: Y("security.secretDetail.rotate.title", "Rotate Secret")
446
- })]
422
+ /* @__PURE__ */ h(T, {
423
+ className: "text-left",
424
+ children: /* @__PURE__ */ g("div", {
425
+ className: "flex items-center gap-3",
426
+ children: [/* @__PURE__ */ h("div", {
427
+ className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
428
+ children: /* @__PURE__ */ h(S, { className: "size-5" })
429
+ }), /* @__PURE__ */ h(E, {
430
+ className: "text-xl font-bold",
431
+ children: Y("security.secretDetail.rotate.title", "Rotate Secret")
432
+ })]
433
+ })
447
434
  }),
448
- /* @__PURE__ */ v("p", {
435
+ /* @__PURE__ */ h("p", {
449
436
  className: "text-sm text-text-secondary",
450
- children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name: L.name })
437
+ children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name: I.name })
451
438
  }),
452
- /* @__PURE__ */ y("div", {
439
+ /* @__PURE__ */ g("div", {
453
440
  className: "space-y-2",
454
- children: [/* @__PURE__ */ v("label", {
441
+ children: [/* @__PURE__ */ h("label", {
455
442
  htmlFor: "new-secret-value",
456
443
  className: "text-sm font-medium",
457
444
  children: Y("security.secretDetail.rotate.newValue", "New Secret Value")
458
- }), /* @__PURE__ */ v("textarea", {
445
+ }), /* @__PURE__ */ h("textarea", {
459
446
  id: "new-secret-value",
460
447
  "aria-label": Y("security.secretDetail.rotate.newValue", "New Secret Value"),
461
- ref: W,
448
+ ref: G,
462
449
  value: q,
463
450
  onChange: (e) => J(e.target.value),
464
451
  placeholder: Y("security.secretDetail.rotate.placeholder", "Enter new secret value..."),
@@ -466,34 +453,34 @@ function D() {
466
453
  className: n("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary", "placeholder:text-text-secondary/50")
467
454
  })]
468
455
  }),
469
- /* @__PURE__ */ y("div", {
456
+ /* @__PURE__ */ g("div", {
470
457
  className: "flex justify-end gap-3 pt-2",
471
- children: [/* @__PURE__ */ v(a, {
458
+ children: [/* @__PURE__ */ h(a, {
472
459
  variant: "outline",
473
- onClick: () => U(!1),
460
+ onClick: () => W(!1),
474
461
  disabled: z,
475
462
  children: Y("security.common.actions.cancel", "Cancel")
476
- }), /* @__PURE__ */ y(a, {
477
- onClick: Re,
463
+ }), /* @__PURE__ */ g(a, {
464
+ onClick: Ge,
478
465
  disabled: z || !q.trim(),
479
- children: [z ? /* @__PURE__ */ v(S, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(C, { className: "size-4" }), z ? Y("security.secretDetail.rotate.loading", "Rotating...") : Y("security.secretDetail.rotate.confirm", "Rotate Secret")]
466
+ children: [z ? /* @__PURE__ */ h(x, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(S, { className: "size-4" }), z ? Y("security.secretDetail.rotate.loading", "Rotating...") : Y("security.secretDetail.rotate.confirm", "Rotate Secret")]
480
467
  })]
481
468
  })
482
469
  ]
483
470
  })
484
- })]
471
+ })
485
472
  }),
486
- D && O && /* @__PURE__ */ v(m, {
487
- isOpen: Ne,
488
- onClose: () => H(!1),
489
- vaultId: D,
490
- secretId: O,
491
- name: L.name
473
+ k && A && /* @__PURE__ */ h(ue, {
474
+ isOpen: ze,
475
+ onClose: () => U(!1),
476
+ vaultId: k,
477
+ secretId: A,
478
+ name: I.name
492
479
  })
493
480
  ]
494
481
  });
495
482
  }
496
483
  //#endregion
497
- export { D as SecretDetailPage };
484
+ export { k as SecretDetailPage };
498
485
 
499
486
  //# sourceMappingURL=SecretDetailPage.js.map