@burdenoff/microfe-security 2026.828.1 → 2026.830.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 (87) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/security/SecurityAdminRoot.js +9 -8
  3. package/dist/security/SecurityAdminRoot.js.map +1 -1
  4. package/dist/security/SecurityRoot.js +9 -8
  5. package/dist/security/SecurityRoot.js.map +1 -1
  6. package/dist/security/SecurityRootBase.js +35 -33
  7. package/dist/security/SecurityRootBase.js.map +1 -1
  8. package/dist/security/SecurityUserRoot.js +9 -8
  9. package/dist/security/SecurityUserRoot.js.map +1 -1
  10. package/dist/security/components/ActivityTimeline.js +83 -66
  11. package/dist/security/components/ActivityTimeline.js.map +1 -1
  12. package/dist/security/components/BulkActionBar.js +40 -41
  13. package/dist/security/components/BulkActionBar.js.map +1 -1
  14. package/dist/security/components/ConfirmDialog.js +37 -33
  15. package/dist/security/components/ConfirmDialog.js.map +1 -1
  16. package/dist/security/components/CopyButton.js +29 -28
  17. package/dist/security/components/CopyButton.js.map +1 -1
  18. package/dist/security/components/ExportDialog.js +81 -80
  19. package/dist/security/components/ExportDialog.js.map +1 -1
  20. package/dist/security/components/ImportWizard.js +122 -125
  21. package/dist/security/components/ImportWizard.js.map +1 -1
  22. package/dist/security/components/PasswordGenerator.js +71 -66
  23. package/dist/security/components/PasswordGenerator.js.map +1 -1
  24. package/dist/security/components/RotationStatusBadge.js +18 -17
  25. package/dist/security/components/RotationStatusBadge.js.map +1 -1
  26. package/dist/security/components/SecretFormFields.js +143 -134
  27. package/dist/security/components/SecretFormFields.js.map +1 -1
  28. package/dist/security/components/SecretRow.js +30 -31
  29. package/dist/security/components/SecretRow.js.map +1 -1
  30. package/dist/security/components/SecretShareDialog.js +208 -195
  31. package/dist/security/components/SecretShareDialog.js.map +1 -1
  32. package/dist/security/components/SecretValueDisplay.js +45 -44
  33. package/dist/security/components/SecretValueDisplay.js.map +1 -1
  34. package/dist/security/components/SecurityPermissionGuard.js +8 -9
  35. package/dist/security/components/SecurityPermissionGuard.js.map +1 -1
  36. package/dist/security/components/SecurityScoreCard.js +42 -37
  37. package/dist/security/components/SecurityScoreCard.js.map +1 -1
  38. package/dist/security/components/VaultCard.js +32 -33
  39. package/dist/security/components/VaultCard.js.map +1 -1
  40. package/dist/security/components/VaultFormFields.js +101 -97
  41. package/dist/security/components/VaultFormFields.js.map +1 -1
  42. package/dist/security/components/VaultShareDialog.js +40 -42
  43. package/dist/security/components/VaultShareDialog.js.map +1 -1
  44. package/dist/security/config/navigation.js +20 -20
  45. package/dist/security/config/navigation.js.map +1 -1
  46. package/dist/security/constants/providers.js +10 -5
  47. package/dist/security/constants/providers.js.map +1 -1
  48. package/dist/security/constants/secretTypes.js +16 -8
  49. package/dist/security/constants/secretTypes.js.map +1 -1
  50. package/dist/security/hooks/useTr.js +14 -0
  51. package/dist/security/hooks/useTr.js.map +1 -0
  52. package/dist/security/index.js +1 -0
  53. package/dist/security/pages/AccessReviewPage.js +85 -84
  54. package/dist/security/pages/AccessReviewPage.js.map +1 -1
  55. package/dist/security/pages/AuditLogPage.js +98 -97
  56. package/dist/security/pages/AuditLogPage.js.map +1 -1
  57. package/dist/security/pages/ImportExportPage.js +21 -22
  58. package/dist/security/pages/ImportExportPage.js.map +1 -1
  59. package/dist/security/pages/ProviderDetailPage.js +164 -155
  60. package/dist/security/pages/ProviderDetailPage.js.map +1 -1
  61. package/dist/security/pages/ProvidersPage.js +89 -92
  62. package/dist/security/pages/ProvidersPage.js.map +1 -1
  63. package/dist/security/pages/SecretCreatePage.js +70 -71
  64. package/dist/security/pages/SecretCreatePage.js.map +1 -1
  65. package/dist/security/pages/SecretDetailPage.js +250 -251
  66. package/dist/security/pages/SecretDetailPage.js.map +1 -1
  67. package/dist/security/pages/SecurityDashboardPage.js +53 -54
  68. package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
  69. package/dist/security/pages/SharedWithMePage.js +27 -28
  70. package/dist/security/pages/SharedWithMePage.js.map +1 -1
  71. package/dist/security/pages/VaultCreatePage.js +49 -50
  72. package/dist/security/pages/VaultCreatePage.js.map +1 -1
  73. package/dist/security/pages/VaultDetailPage.js +130 -131
  74. package/dist/security/pages/VaultDetailPage.js.map +1 -1
  75. package/dist/security/pages/VaultLandingPage.js +39 -38
  76. package/dist/security/pages/VaultLandingPage.js.map +1 -1
  77. package/dist/security/pages/VaultSettingsPage.js +198 -199
  78. package/dist/security/pages/VaultSettingsPage.js.map +1 -1
  79. package/dist/security/pages/VaultShareViewer.js +78 -80
  80. package/dist/security/pages/VaultShareViewer.js.map +1 -1
  81. package/dist/security/pages/VaultsDashboardPage.js +97 -98
  82. package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
  83. package/dist/security/translations/en.js +756 -0
  84. package/dist/security/translations/en.js.map +1 -0
  85. package/package.json +1 -1
  86. package/dist/security/utils/i18n.js +0 -9
  87. package/dist/security/utils/i18n.js.map +0 -1
@@ -1,327 +1,340 @@
1
- import { cn as e } from "../utils/cn.js";
2
- import { Badge as t, Button as n, Input as r, Select as i } from "./ui.js";
3
- import { useCreateSecretShareLink as ee, useRevokeSecretShare as a, useSecretShares as te, useShareSecretWithAccount as ne } from "../hooks/useShareQueries.js";
4
- import { useMemo as o, useState as s } from "react";
5
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
6
- import { Check as d, Clock as f, Copy as p, Eye as re, KeyRound as ie, Link2 as m, Loader2 as h, Trash2 as g, UserPlus as ae, Users as oe } from "lucide-react";
7
- import { Dialog as se, DialogContent as ce, DialogHeader as le, DialogTitle as _ } from "@burdenoff/fe-libs/ui";
1
+ import { useTr as e } from "../hooks/useTr.js";
2
+ import { cn as t } from "../utils/cn.js";
3
+ import { Badge as n, Button as r, Input as i, Select as a } from "./ui.js";
4
+ import { useCreateSecretShareLink as o, useRevokeSecretShare as ee, useSecretShares as te, useShareSecretWithAccount as ne } from "../hooks/useShareQueries.js";
5
+ import { useMemo as s, useState as c } from "react";
6
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { Check as re, Clock as f, Copy as ie, Eye as ae, KeyRound as oe, Link2 as p, Loader2 as m, Trash2 as h, UserPlus as g, Users as se } from "lucide-react";
8
+ import { Dialog as ce, DialogContent as _, DialogHeader as le, DialogTitle as ue } from "@burdenoff/fe-libs/ui";
8
9
  //#region src/security/components/SecretShareDialog.tsx
9
- var v = [{
10
- value: "VIEWER",
11
- label: "Viewer — can view the credential"
12
- }, {
13
- value: "EDITOR",
14
- label: "Editor — can view and edit"
15
- }], y = [
16
- {
17
- value: "",
18
- label: "Never expires"
19
- },
20
- {
21
- value: "3600000",
22
- label: "1 hour"
23
- },
24
- {
25
- value: "86400000",
26
- label: "24 hours"
27
- },
28
- {
29
- value: "604800000",
30
- label: "7 days"
31
- },
32
- {
33
- value: "2592000000",
34
- label: "30 days"
35
- }
36
- ];
37
- function b(e) {
10
+ function de() {
11
+ let t = e();
12
+ return {
13
+ roleOptions: [{
14
+ value: "VIEWER",
15
+ label: t("security.secretShareDialog.roleViewer", "Viewer — can view the credential")
16
+ }, {
17
+ value: "EDITOR",
18
+ label: t("security.secretShareDialog.roleEditor", "Editor — can view and edit")
19
+ }],
20
+ expiryOptions: [
21
+ {
22
+ value: "",
23
+ label: t("security.secretShareDialog.neverExpires", "Never expires")
24
+ },
25
+ {
26
+ value: "3600000",
27
+ label: t("security.secretShareDialog.oneHour", "1 hour")
28
+ },
29
+ {
30
+ value: "86400000",
31
+ label: t("security.secretShareDialog.oneDay", "24 hours")
32
+ },
33
+ {
34
+ value: "604800000",
35
+ label: t("security.secretShareDialog.sevenDays", "7 days")
36
+ },
37
+ {
38
+ value: "2592000000",
39
+ label: t("security.secretShareDialog.thirtyDays", "30 days")
40
+ }
41
+ ]
42
+ };
43
+ }
44
+ function v(e) {
38
45
  if (!e) return null;
39
46
  let t = Number(e);
40
47
  return !Number.isFinite(t) || t <= 0 ? null : new Date(Date.now() + t).toISOString();
41
48
  }
42
- function x(e) {
49
+ function fe(e) {
43
50
  return `${typeof window < "u" ? window.location.origin : ""}/vault/share/${e}`;
44
51
  }
45
- var S = ({ isOpen: S, onClose: ue, vaultId: C, secretId: w, name: de, className: fe }) => {
46
- let [T, E] = s("people"), [D, O] = s(""), [k, pe] = s("VIEWER"), [A, j] = s(""), [M, N] = s("604800000"), [P, F] = s(""), [I, L] = s(""), [R, z] = s(null), [me, B] = s(!1), [V, H] = s(null), { data: U, loading: W, refetch: G } = te(S ? C : null, w), [he, { loading: K }] = ne(), [ge, { loading: q }] = ee(), [_e] = a(), J = o(() => U?.secretShares?.items ?? [], [U]), Y = o(() => J.filter((e) => e.kind === "ACCOUNT"), [J]), X = o(() => J.filter((e) => e.kind === "LINK"), [J]), Z = D.includes("@"), Q = async (e) => {
47
- e.preventDefault(), H(null);
48
- let t = D.trim();
52
+ var y = ({ isOpen: y, onClose: b, vaultId: x, secretId: S, name: C, className: pe }) => {
53
+ let w = e(), { roleOptions: me, expiryOptions: T } = de(), [E, D] = c("people"), [O, k] = c(""), [A, he] = c("VIEWER"), [j, M] = c(""), [N, P] = c("604800000"), [F, I] = c(""), [L, R] = c(""), [z, B] = c(null), [ge, V] = c(!1), [H, U] = c(null), { data: W, loading: G, refetch: K } = te(y ? x : null, S), [_e, { loading: q }] = ne(), [ve, { loading: J }] = o(), [ye] = ee(), Y = s(() => W?.secretShares?.items ?? [], [W]), X = s(() => Y.filter((e) => e.kind === "ACCOUNT"), [Y]), Z = s(() => Y.filter((e) => e.kind === "LINK"), [Y]), Q = O.includes("@"), be = async (e) => {
54
+ e.preventDefault(), U(null);
55
+ let t = O.trim();
49
56
  if (t) try {
50
- await he({ variables: { input: {
51
- vaultId: C,
52
- secretId: w ?? null,
53
- accountId: Z ? null : t,
54
- email: Z ? t : null,
55
- role: k,
57
+ await _e({ variables: { input: {
58
+ vaultId: x,
59
+ secretId: S ?? null,
60
+ accountId: Q ? null : t,
61
+ email: Q ? t : null,
62
+ role: A,
56
63
  label: t,
57
- expiresAt: b(A)
58
- } } }), O(""), j(""), await G();
64
+ expiresAt: v(j)
65
+ } } }), k(""), M(""), await K();
59
66
  } catch (e) {
60
- H(e instanceof Error ? e.message : "Failed to share");
67
+ U(e instanceof Error ? e.message : w("security.secretShareDialog.shareFailed", "Failed to share"));
61
68
  }
62
- }, ve = async (e) => {
63
- e.preventDefault(), H(null), z(null);
69
+ }, xe = async (e) => {
70
+ e.preventDefault(), U(null), B(null);
64
71
  try {
65
- let e = I.trim() ? Number(I.trim()) : null, t = (await ge({ variables: { input: {
66
- vaultId: C,
67
- secretId: w ?? null,
72
+ let e = L.trim() ? Number(L.trim()) : null, t = (await ve({ variables: { input: {
73
+ vaultId: x,
74
+ secretId: S ?? null,
68
75
  role: "VIEWER",
69
- expiresAt: b(M),
70
- password: P.trim() || null,
76
+ expiresAt: v(N),
77
+ password: F.trim() || null,
71
78
  maxViews: e && e > 0 ? Math.floor(e) : null
72
79
  } } })).data?.createSecretShareLink?.token;
73
- t && (z(x(t)), F(""), L("")), await G();
80
+ t && (B(fe(t)), I(""), R("")), await K();
74
81
  } catch (e) {
75
- H(e instanceof Error ? e.message : "Failed to create link");
82
+ U(e instanceof Error ? e.message : w("security.secretShareDialog.createLinkFailed", "Failed to create link"));
76
83
  }
77
84
  }, $ = async (e) => {
78
85
  try {
79
- await _e({ variables: { id: e } }), await G();
86
+ await ye({ variables: { id: e } }), await K();
80
87
  } catch (e) {
81
- H(e instanceof Error ? e.message : "Failed to revoke");
88
+ U(e instanceof Error ? e.message : w("security.secretShareDialog.revokeFailed", "Failed to revoke"));
82
89
  }
83
- }, ye = async () => {
84
- if (R) try {
85
- await navigator.clipboard.writeText(R), B(!0), setTimeout(() => B(!1), 1500);
90
+ }, Se = async () => {
91
+ if (z) try {
92
+ await navigator.clipboard.writeText(z), V(!0), setTimeout(() => V(!1), 1500);
86
93
  } catch {}
87
- }, be = w ? "credential" : "vault";
88
- return /* @__PURE__ */ l(se, {
89
- open: S,
94
+ }, Ce = S ? w("security.secretShareDialog.scopeCredential", "credential") : w("security.secretShareDialog.scopeVault", "vault");
95
+ return /* @__PURE__ */ u(ce, {
96
+ open: y,
90
97
  onOpenChange: (e) => {
91
- e || ue();
98
+ e || b();
92
99
  },
93
- children: /* @__PURE__ */ u(ce, {
94
- className: e("max-w-lg flex flex-col max-h-[90vh] gap-0 p-0", fe),
100
+ children: /* @__PURE__ */ d(_, {
101
+ className: t("max-w-lg flex flex-col max-h-[90vh] gap-0 p-0", pe),
95
102
  children: [
96
- /* @__PURE__ */ u(le, {
103
+ /* @__PURE__ */ d(le, {
97
104
  className: "p-6 pb-4 border-b border-border-subtle/60 text-left",
98
- children: [/* @__PURE__ */ u(_, { children: ["Share ", be] }), /* @__PURE__ */ u("p", {
105
+ children: [/* @__PURE__ */ u(ue, { children: w("security.secretShareDialog.title", "Share {{scope}}", { scope: Ce }) }), /* @__PURE__ */ u("p", {
99
106
  className: "text-sm text-text-secondary mt-0.5",
100
- children: [
101
- "Share ",
102
- /* @__PURE__ */ l("span", {
103
- className: "font-medium text-text-primary",
104
- children: de
105
- }),
106
- " selectively"
107
- ]
107
+ children: w("security.secretShareDialog.description", "Share {{name}} selectively", { name: C })
108
108
  })]
109
109
  }),
110
- /* @__PURE__ */ u("div", {
110
+ /* @__PURE__ */ d("div", {
111
111
  className: "flex gap-1 px-6 pt-4",
112
- children: [/* @__PURE__ */ u("button", {
112
+ children: [/* @__PURE__ */ d("button", {
113
113
  type: "button",
114
- onClick: () => E("people"),
115
- className: e("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", T === "people" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"),
116
- children: [/* @__PURE__ */ l(oe, { className: "size-4" }), " People"]
117
- }), /* @__PURE__ */ u("button", {
114
+ onClick: () => D("people"),
115
+ className: t("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", E === "people" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"),
116
+ children: [
117
+ /* @__PURE__ */ u(se, { className: "size-4" }),
118
+ " ",
119
+ w("security.secretShareDialog.peopleTab", "People")
120
+ ]
121
+ }), /* @__PURE__ */ d("button", {
118
122
  type: "button",
119
- onClick: () => E("link"),
120
- className: e("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", T === "link" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"),
121
- children: [/* @__PURE__ */ l(m, { className: "size-4" }), " Get link"]
123
+ onClick: () => D("link"),
124
+ className: t("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", E === "link" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"),
125
+ children: [
126
+ /* @__PURE__ */ u(p, { className: "size-4" }),
127
+ " ",
128
+ w("security.secretShareDialog.linkTab", "Get link")
129
+ ]
122
130
  })]
123
131
  }),
124
- /* @__PURE__ */ u("div", {
132
+ /* @__PURE__ */ d("div", {
125
133
  className: "overflow-y-auto p-6 pt-4 space-y-5",
126
- children: [V && /* @__PURE__ */ l("div", {
134
+ children: [H && /* @__PURE__ */ u("div", {
127
135
  className: "rounded-md border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
128
- children: V
129
- }), T === "people" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("form", {
130
- onSubmit: Q,
136
+ children: H
137
+ }), E === "people" ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("form", {
138
+ onSubmit: be,
131
139
  className: "space-y-3",
132
140
  children: [
133
- /* @__PURE__ */ l(r, {
141
+ /* @__PURE__ */ u(i, {
134
142
  id: "share-account",
135
- label: "Account email or VibeControls account id",
143
+ label: w("security.secretShareDialog.accountLabel", "Account email or VibeControls account id"),
136
144
  type: "text",
137
- value: D,
138
- onChange: (e) => O(e.target.value),
139
- placeholder: "colleague@example.com or account id",
145
+ value: O,
146
+ onChange: (e) => k(e.target.value),
147
+ placeholder: w("security.secretShareDialog.accountPlaceholder", "colleague@example.com or account id"),
140
148
  required: !0
141
149
  }),
142
- /* @__PURE__ */ u("div", {
150
+ /* @__PURE__ */ d("div", {
143
151
  className: "grid grid-cols-2 gap-3",
144
- children: [/* @__PURE__ */ l(i, {
145
- label: "Access",
146
- value: k,
147
- onChange: pe,
148
- options: v
149
- }), /* @__PURE__ */ l(i, {
150
- label: "Expires",
152
+ children: [/* @__PURE__ */ u(a, {
153
+ label: w("security.secretShareDialog.accessLabel", "Access"),
151
154
  value: A,
152
- onChange: j,
153
- options: y
155
+ onChange: he,
156
+ options: me
157
+ }), /* @__PURE__ */ u(a, {
158
+ label: w("security.secretShareDialog.expiresLabel", "Expires"),
159
+ value: j,
160
+ onChange: M,
161
+ options: T
154
162
  })]
155
163
  }),
156
- /* @__PURE__ */ l("div", {
164
+ /* @__PURE__ */ u("div", {
157
165
  className: "flex justify-end",
158
- children: /* @__PURE__ */ u(n, {
166
+ children: /* @__PURE__ */ d(r, {
159
167
  type: "submit",
160
- disabled: !D.trim() || K,
161
- children: [K ? /* @__PURE__ */ l(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l(ae, { className: "size-4" }), "Share"]
168
+ disabled: !O.trim() || q,
169
+ children: [q ? /* @__PURE__ */ u(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(g, { className: "size-4" }), w("security.secretShareDialog.share", "Share")]
162
170
  })
163
171
  })
164
172
  ]
165
- }), /* @__PURE__ */ u("div", {
173
+ }), /* @__PURE__ */ d("div", {
166
174
  className: "space-y-2",
167
- children: [/* @__PURE__ */ l("h3", {
175
+ children: [/* @__PURE__ */ u("h3", {
168
176
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
169
- children: "People with access"
170
- }), W ? /* @__PURE__ */ l("div", {
177
+ children: w("security.secretShareDialog.peopleWithAccess", "People with access")
178
+ }), G ? /* @__PURE__ */ u("div", {
171
179
  className: "flex justify-center py-4",
172
- children: /* @__PURE__ */ l(h, { className: "size-5 animate-spin text-text-secondary" })
173
- }) : Y.length === 0 ? /* @__PURE__ */ l("p", {
180
+ children: /* @__PURE__ */ u(m, { className: "size-5 animate-spin text-text-secondary" })
181
+ }) : X.length === 0 ? /* @__PURE__ */ u("p", {
174
182
  className: "text-sm text-text-secondary py-2",
175
- children: "Not shared with anyone yet."
176
- }) : /* @__PURE__ */ l("ul", {
183
+ children: w("security.secretShareDialog.notShared", "Not shared with anyone yet.")
184
+ }) : /* @__PURE__ */ u("ul", {
177
185
  className: "space-y-2",
178
- children: Y.map((e) => /* @__PURE__ */ u("li", {
186
+ children: X.map((e) => /* @__PURE__ */ d("li", {
179
187
  className: "flex items-center justify-between gap-2 rounded-md border border-border-subtle/60 px-3 py-2",
180
- children: [/* @__PURE__ */ u("div", {
188
+ children: [/* @__PURE__ */ d("div", {
181
189
  className: "min-w-0",
182
- children: [/* @__PURE__ */ l("p", {
190
+ children: [/* @__PURE__ */ u("p", {
183
191
  className: "text-sm text-text-primary truncate",
184
192
  children: e.label || e.actorId
185
- }), /* @__PURE__ */ u("div", {
193
+ }), /* @__PURE__ */ d("div", {
186
194
  className: "flex items-center gap-2 mt-0.5",
187
- children: [/* @__PURE__ */ l(t, {
195
+ children: [/* @__PURE__ */ u(n, {
188
196
  variant: "outline",
189
197
  children: e.role
190
- }), e.expiresAt && /* @__PURE__ */ u("span", {
198
+ }), e.expiresAt && /* @__PURE__ */ d("span", {
191
199
  className: "text-xs text-text-secondary inline-flex items-center gap-1",
192
- children: [/* @__PURE__ */ l(f, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
200
+ children: [/* @__PURE__ */ u(f, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
193
201
  })]
194
202
  })]
195
- }), /* @__PURE__ */ l("button", {
203
+ }), /* @__PURE__ */ u("button", {
196
204
  type: "button",
197
205
  onClick: () => void $(e.id),
198
206
  className: "p-1.5 rounded hover:bg-status-error-bg/10 text-text-secondary hover:text-status-error-text",
199
- "aria-label": "Revoke access",
200
- children: /* @__PURE__ */ l(g, { className: "size-4" })
207
+ "aria-label": w("security.secretShareDialog.revokeAccess", "Revoke access"),
208
+ children: /* @__PURE__ */ u(h, { className: "size-4" })
201
209
  })]
202
210
  }, e.id))
203
211
  })]
204
- })] }) : /* @__PURE__ */ u(c, { children: [
205
- !w && /* @__PURE__ */ u("div", {
212
+ })] }) : /* @__PURE__ */ d(l, { children: [
213
+ !S && /* @__PURE__ */ u("div", {
206
214
  className: "rounded-md border border-status-warning-border bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text",
207
- children: [
208
- "Anyone with this link can view ",
209
- /* @__PURE__ */ l("strong", { children: "all current and future" }),
210
- " credentials in this vault until it expires or you revoke it."
211
- ]
215
+ children: w("security.secretShareDialog.linkWarning", "Anyone with this link can view all current and future credentials in this vault until it expires or you revoke it.")
212
216
  }),
213
- /* @__PURE__ */ u("form", {
214
- onSubmit: ve,
217
+ /* @__PURE__ */ d("form", {
218
+ onSubmit: xe,
215
219
  className: "space-y-3",
216
220
  children: [
217
- /* @__PURE__ */ u("div", {
221
+ /* @__PURE__ */ d("div", {
218
222
  className: "grid grid-cols-2 gap-3",
219
- children: [/* @__PURE__ */ l(i, {
220
- label: "Expires",
221
- value: M,
222
- onChange: N,
223
- options: y
224
- }), /* @__PURE__ */ l(r, {
223
+ children: [/* @__PURE__ */ u(a, {
224
+ label: w("security.secretShareDialog.expiresLabel", "Expires"),
225
+ value: N,
226
+ onChange: P,
227
+ options: T
228
+ }), /* @__PURE__ */ u(i, {
225
229
  id: "link-max-views",
226
- label: "Max views (optional)",
230
+ label: w("security.secretShareDialog.maxViews", "Max views (optional)"),
227
231
  type: "number",
228
232
  min: 1,
229
- value: I,
230
- onChange: (e) => L(e.target.value),
231
- placeholder: "Unlimited"
233
+ value: L,
234
+ onChange: (e) => R(e.target.value),
235
+ placeholder: w("security.secretShareDialog.maxViewsPlaceholder", "Unlimited")
232
236
  })]
233
237
  }),
234
- /* @__PURE__ */ l(r, {
238
+ /* @__PURE__ */ u(i, {
235
239
  id: "link-password",
236
- label: "Password (optional)",
240
+ label: w("security.secretShareDialog.password", "Password (optional)"),
237
241
  type: "password",
238
- value: P,
239
- onChange: (e) => F(e.target.value),
240
- placeholder: "Extra protection for the link"
242
+ value: F,
243
+ onChange: (e) => I(e.target.value),
244
+ placeholder: w("security.secretShareDialog.passwordPlaceholder", "Extra protection for the link")
241
245
  }),
242
- /* @__PURE__ */ l("div", {
246
+ /* @__PURE__ */ u("div", {
243
247
  className: "flex justify-end",
244
- children: /* @__PURE__ */ u(n, {
248
+ children: /* @__PURE__ */ d(r, {
245
249
  type: "submit",
246
- disabled: q,
247
- children: [q ? /* @__PURE__ */ l(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l(m, { className: "size-4" }), "Create link"]
250
+ disabled: J,
251
+ children: [J ? /* @__PURE__ */ u(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(p, { className: "size-4" }), w("security.secretShareDialog.createLink", "Create link")]
248
252
  })
249
253
  })
250
254
  ]
251
255
  }),
252
- R && /* @__PURE__ */ u("div", {
256
+ z && /* @__PURE__ */ d("div", {
253
257
  className: "rounded-md border border-status-success-border bg-status-success-bg-subtle p-3 space-y-2",
254
- children: [/* @__PURE__ */ l("p", {
258
+ children: [/* @__PURE__ */ u("p", {
255
259
  className: "text-xs font-medium text-status-success-text",
256
- children: "Link created — copy it now, it won't be shown again."
257
- }), /* @__PURE__ */ u("div", {
260
+ children: w("security.secretShareDialog.linkCreated", "Link created — copy it now, it won't be shown again.")
261
+ }), /* @__PURE__ */ d("div", {
258
262
  className: "flex items-center gap-2",
259
- children: [/* @__PURE__ */ l("input", {
263
+ children: [/* @__PURE__ */ u("input", {
260
264
  readOnly: !0,
261
- value: R,
265
+ value: z,
262
266
  onFocus: (e) => e.currentTarget.select(),
263
267
  className: "flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm font-mono"
264
- }), /* @__PURE__ */ l(n, {
268
+ }), /* @__PURE__ */ u(r, {
265
269
  type: "button",
266
270
  variant: "outline",
267
271
  size: "sm",
268
- onClick: () => void ye(),
269
- children: l(me ? d : p, { className: "size-4" })
272
+ onClick: () => void Se(),
273
+ children: u(ge ? re : ie, { className: "size-4" })
270
274
  })]
271
275
  })]
272
276
  }),
273
- /* @__PURE__ */ u("div", {
277
+ /* @__PURE__ */ d("div", {
274
278
  className: "space-y-2",
275
- children: [/* @__PURE__ */ l("h3", {
279
+ children: [/* @__PURE__ */ u("h3", {
276
280
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
277
- children: "Active links"
278
- }), W ? /* @__PURE__ */ l("div", {
281
+ children: w("security.secretShareDialog.activeLinks", "Active links")
282
+ }), G ? /* @__PURE__ */ u("div", {
279
283
  className: "flex justify-center py-4",
280
- children: /* @__PURE__ */ l(h, { className: "size-5 animate-spin text-text-secondary" })
281
- }) : X.length === 0 ? /* @__PURE__ */ l("p", {
284
+ children: /* @__PURE__ */ u(m, { className: "size-5 animate-spin text-text-secondary" })
285
+ }) : Z.length === 0 ? /* @__PURE__ */ u("p", {
282
286
  className: "text-sm text-text-secondary py-2",
283
- children: "No active links."
284
- }) : /* @__PURE__ */ l("ul", {
287
+ children: w("security.secretShareDialog.noActiveLinks", "No active links.")
288
+ }) : /* @__PURE__ */ u("ul", {
285
289
  className: "space-y-2",
286
- children: X.map((e) => /* @__PURE__ */ u("li", {
290
+ children: Z.map((e) => /* @__PURE__ */ d("li", {
287
291
  className: "flex items-center justify-between gap-2 rounded-md border border-border-subtle/60 px-3 py-2",
288
- children: [/* @__PURE__ */ u("div", {
292
+ children: [/* @__PURE__ */ d("div", {
289
293
  className: "min-w-0",
290
- children: [/* @__PURE__ */ u("div", {
294
+ children: [/* @__PURE__ */ d("div", {
291
295
  className: "flex items-center gap-2 flex-wrap",
292
296
  children: [
293
- /* @__PURE__ */ l(t, {
297
+ /* @__PURE__ */ u(n, {
294
298
  variant: e.status === "ACTIVE" ? "success" : "destructive",
295
- children: e.status === "ACTIVE" ? "Active" : "Revoked"
299
+ children: e.status === "ACTIVE" ? w("security.secretShareDialog.statusActive", "Active") : w("security.secretShareDialog.statusRevoked", "Revoked")
296
300
  }),
297
- e.requiresPassword && /* @__PURE__ */ u("span", {
301
+ e.requiresPassword && /* @__PURE__ */ d("span", {
298
302
  className: "text-xs text-text-secondary inline-flex items-center gap-1",
299
- children: [/* @__PURE__ */ l(ie, { className: "size-3" }), " Password"]
303
+ children: [
304
+ /* @__PURE__ */ u(oe, { className: "size-3" }),
305
+ " ",
306
+ w("security.secretShareDialog.passwordProtected", "Password")
307
+ ]
300
308
  }),
301
- /* @__PURE__ */ u("span", {
309
+ /* @__PURE__ */ d("span", {
302
310
  className: "text-xs text-text-secondary inline-flex items-center gap-1",
303
311
  children: [
304
- /* @__PURE__ */ l(re, { className: "size-3" }),
312
+ /* @__PURE__ */ u(ae, { className: "size-3" }),
305
313
  e.viewCount,
306
314
  e.maxViews ? `/${e.maxViews}` : "",
307
- " views"
315
+ " ",
316
+ w("security.secretShareDialog.views", "views")
308
317
  ]
309
318
  }),
310
- e.expiresAt && /* @__PURE__ */ u("span", {
319
+ e.expiresAt && /* @__PURE__ */ d("span", {
311
320
  className: "text-xs text-text-secondary inline-flex items-center gap-1",
312
- children: [/* @__PURE__ */ l(f, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
321
+ children: [/* @__PURE__ */ u(f, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
313
322
  })
314
323
  ]
315
- }), /* @__PURE__ */ u("p", {
324
+ }), /* @__PURE__ */ d("p", {
316
325
  className: "text-xs text-text-secondary mt-0.5",
317
- children: ["Created ", new Date(e.createdAt).toLocaleString()]
326
+ children: [
327
+ w("security.secretShareDialog.created", "Created"),
328
+ " ",
329
+ new Date(e.createdAt).toLocaleString()
330
+ ]
318
331
  })]
319
- }), e.status === "ACTIVE" && /* @__PURE__ */ l("button", {
332
+ }), e.status === "ACTIVE" && /* @__PURE__ */ u("button", {
320
333
  type: "button",
321
334
  onClick: () => void $(e.id),
322
335
  className: "p-1.5 rounded hover:bg-status-error-bg/10 text-text-secondary hover:text-status-error-text",
323
- "aria-label": "Revoke link",
324
- children: /* @__PURE__ */ l(g, { className: "size-4" })
336
+ "aria-label": w("security.secretShareDialog.revokeLink", "Revoke link"),
337
+ children: /* @__PURE__ */ u(h, { className: "size-4" })
325
338
  })]
326
339
  }, e.id))
327
340
  })]
@@ -333,6 +346,6 @@ var S = ({ isOpen: S, onClose: ue, vaultId: C, secretId: w, name: de, className:
333
346
  });
334
347
  };
335
348
  //#endregion
336
- export { S as SecretShareDialog };
349
+ export { y as SecretShareDialog };
337
350
 
338
351
  //# sourceMappingURL=SecretShareDialog.js.map