@burdenoff/microfe-security 2026.525.3 → 2026.527.2

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