@burdenoff/microfe-security 2026.1109.1 → 2026.1113.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 (83) hide show
  1. package/dist/security/components/ActivityTimeline.js +42 -41
  2. package/dist/security/components/ActivityTimeline.js.map +1 -1
  3. package/dist/security/components/BulkActionBar.d.ts +2 -0
  4. package/dist/security/components/BulkActionBar.js +93 -81
  5. package/dist/security/components/BulkActionBar.js.map +1 -1
  6. package/dist/security/components/BulkPickerDialogs.d.ts +30 -0
  7. package/dist/security/components/BulkPickerDialogs.js +136 -0
  8. package/dist/security/components/BulkPickerDialogs.js.map +1 -0
  9. package/dist/security/components/ExternalSecretProviders.js +150 -134
  10. package/dist/security/components/ExternalSecretProviders.js.map +1 -1
  11. package/dist/security/components/SavedValuesMoreMenu.d.ts +12 -0
  12. package/dist/security/components/SavedValuesMoreMenu.js +63 -0
  13. package/dist/security/components/SavedValuesMoreMenu.js.map +1 -0
  14. package/dist/security/components/SecretFormFields.js +162 -114
  15. package/dist/security/components/SecretFormFields.js.map +1 -1
  16. package/dist/security/components/SecretRow.d.ts +2 -0
  17. package/dist/security/components/SecretRow.js +41 -40
  18. package/dist/security/components/SecretRow.js.map +1 -1
  19. package/dist/security/components/SecretShareDialog.js +1 -1
  20. package/dist/security/components/SecretShareDialog.js.map +1 -1
  21. package/dist/security/components/VaultFormFields.js +100 -55
  22. package/dist/security/components/VaultFormFields.js.map +1 -1
  23. package/dist/security/components/ui.d.ts +8 -1
  24. package/dist/security/components/ui.js +15 -3
  25. package/dist/security/components/ui.js.map +1 -1
  26. package/dist/security/constants/externalSecretProviders.d.ts +8 -1
  27. package/dist/security/constants/externalSecretProviders.js +48 -0
  28. package/dist/security/constants/externalSecretProviders.js.map +1 -1
  29. package/dist/security/hooks/useActorLabel.d.ts +9 -0
  30. package/dist/security/hooks/useActorLabel.js +18 -0
  31. package/dist/security/hooks/useActorLabel.js.map +1 -0
  32. package/dist/security/hooks/useDebouncedValue.d.ts +2 -0
  33. package/dist/security/hooks/useDebouncedValue.js +12 -0
  34. package/dist/security/hooks/useDebouncedValue.js.map +1 -0
  35. package/dist/security/hooks/useSecurityVariant.d.ts +7 -0
  36. package/dist/security/hooks/useSecurityVariant.js +9 -0
  37. package/dist/security/hooks/useSecurityVariant.js.map +1 -0
  38. package/dist/security/index.d.ts +1 -1
  39. package/dist/security/pages/AccessReviewPage.js +77 -76
  40. package/dist/security/pages/AccessReviewPage.js.map +1 -1
  41. package/dist/security/pages/AuditLogPage.js +58 -44
  42. package/dist/security/pages/AuditLogPage.js.map +1 -1
  43. package/dist/security/pages/ImportExportPage.js +1 -1
  44. package/dist/security/pages/ImportExportPage.js.map +1 -1
  45. package/dist/security/pages/SecretCreatePage.js +85 -85
  46. package/dist/security/pages/SecretCreatePage.js.map +1 -1
  47. package/dist/security/pages/SecretDetailPage.js +339 -273
  48. package/dist/security/pages/SecretDetailPage.js.map +1 -1
  49. package/dist/security/pages/VaultCreatePage.js +59 -56
  50. package/dist/security/pages/VaultCreatePage.js.map +1 -1
  51. package/dist/security/pages/VaultDetailPage.js +218 -162
  52. package/dist/security/pages/VaultDetailPage.js.map +1 -1
  53. package/dist/security/pages/VaultLandingPage.js +48 -35
  54. package/dist/security/pages/VaultLandingPage.js.map +1 -1
  55. package/dist/security/pages/VaultSettingsPage.js +331 -266
  56. package/dist/security/pages/VaultSettingsPage.js.map +1 -1
  57. package/dist/security/pages/VaultsDashboardPage.js +231 -161
  58. package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
  59. package/dist/security/providers/SecurityProvider.js +24 -20
  60. package/dist/security/providers/SecurityProvider.js.map +1 -1
  61. package/dist/security/providers/securityContext.d.ts +3 -0
  62. package/dist/security/providers/securityContext.js +6 -0
  63. package/dist/security/providers/securityContext.js.map +1 -0
  64. package/dist/security/routes/SecurityAdminRoutes.js +3 -3
  65. package/dist/security/routes/SecurityAdminRoutes.js.map +1 -1
  66. package/dist/security/routes/SecurityRoutes.js +3 -3
  67. package/dist/security/routes/SecurityRoutes.js.map +1 -1
  68. package/dist/security/routes/SecurityUserRoutes.js +1 -1
  69. package/dist/security/routes/SecurityUserRoutes.js.map +1 -1
  70. package/dist/security/translations/en.d.ts +65 -0
  71. package/dist/security/translations/en.js +80 -13
  72. package/dist/security/translations/en.js.map +1 -1
  73. package/dist/security/types/index.d.ts +13 -0
  74. package/dist/security/utils/formInputs.d.ts +49 -0
  75. package/dist/security/utils/formInputs.js +27 -0
  76. package/dist/security/utils/formInputs.js.map +1 -0
  77. package/dist/security/utils/landingTabs.d.ts +9 -0
  78. package/dist/security/utils/landingTabs.js +16 -0
  79. package/dist/security/utils/landingTabs.js.map +1 -0
  80. package/dist/security/utils/rotationStatus.d.ts +12 -0
  81. package/dist/security/utils/rotationStatus.js +8 -0
  82. package/dist/security/utils/rotationStatus.js.map +1 -0
  83. package/package.json +2 -2
@@ -1,394 +1,459 @@
1
1
  import { PageLayout as e } from "../components/PageLayout.js";
2
2
  import { VaultShareDialog as t } from "../components/VaultShareDialog.js";
3
3
  import { ConfirmDialog as n } from "../components/ConfirmDialog.js";
4
- import { Badge as r, Button as i, Card as a, Input as ee } from "../components/ui.js";
5
- import { useDeleteVault as o, useGetVault as s, useShareVault as c, useUnshareVault as te, useUpdateVault as ne, useUpdateVaultMemberRole as re } from "../hooks/useVaultQueries.js";
6
- import { useSecurityEventEmitter as ie } from "../hooks/useSecurityEventEmitter.js";
7
- import { useSecurity as ae } from "../providers/SecurityProvider.js";
8
- import { getVaultRoleInfo as oe } from "../constants/permissions.js";
9
- import { SecurityPermissionGuard as l } from "../components/SecurityPermissionGuard.js";
10
- import { cn as u } from "../utils/cn.js";
11
- import { useTr as d } from "../hooks/useTr.js";
12
- import { nativeConfirm as f, nativeImpact as p, nativeNotify as m } from "../../utils/nativeBridge.js";
13
- import { useEffect as h, useState as g } from "react";
14
- import { usePermission as _ } from "@burdenoff/fe-libs/shared/providers/shell";
15
- import { useNavigate as se, useParams as ce } from "react-router";
16
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
17
- import { AlertTriangle as le, Loader2 as b, Save as ue, Shield as x, Trash2 as de, UserPlus as S, Users as C, X as fe } from "lucide-react";
18
- import { GlassCard as pe, IllustratedEmptyState as me, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
4
+ import { Badge as r, Button as i, Card as a, Input as ee, Select as te } from "../components/ui.js";
5
+ import { useDeleteVault as ne, useGetVault as re, useShareVault as ie, useUnshareVault as o, useUpdateVault as s, useUpdateVaultMemberRole as c } from "../hooks/useVaultQueries.js";
6
+ import { useSecurityEventEmitter as l } from "../hooks/useSecurityEventEmitter.js";
7
+ import { useSecurity as u } from "../providers/SecurityProvider.js";
8
+ import { VAULT_ROLES as d, getVaultRoleInfo as ae } from "../constants/permissions.js";
9
+ import { SecurityPermissionGuard as f } from "../components/SecurityPermissionGuard.js";
10
+ import { cn as p } from "../utils/cn.js";
11
+ import { useTr as oe } from "../hooks/useTr.js";
12
+ import { useIsFluidgridsVariant as se } from "../hooks/useSecurityVariant.js";
13
+ import { useActorLabel as ce } from "../hooks/useActorLabel.js";
14
+ import { nativeConfirm as le, nativeImpact as ue, nativeNotify as m } from "../../utils/nativeBridge.js";
15
+ import { useEffect as de, useState as h } from "react";
16
+ import { usePermission as g } from "@burdenoff/fe-libs/shared/providers/shell";
17
+ import { useNavigate as fe, useParams as pe } from "react-router";
18
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
19
+ import { AlertTriangle as y, Loader2 as b, Save as me, Shield as x, Trash2 as he, UserPlus as S, Users as C, X as ge } from "lucide-react";
20
+ import { GlassCard as _e, IllustratedEmptyState as ve, NextSteps as ye, OptionalFields as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
19
21
  // src/security/pages/VaultSettingsPage.tsx
20
22
  function E() {
21
- let { vaultId: E } = ce(), { basePath: D = "/", navigate: O } = ae(), k = d(), A = se(), { data: j, loading: M, refetch: N } = s(E ?? null), P = j?.getVault, [F, { loading: I }] = ne(), [L, { loading: R }] = o(), [z, { loading: he }] = c(), [ge, { loading: _e }] = te(), [ve, { loading: ye }] = re(), { emit: B } = ie(), V = _("vault:update");
22
- _("vault:delete");
23
- let H = _("member:add"), be = _("member:remove");
24
- _("member:update_role");
25
- let [xe, U] = g({
23
+ let { vaultId: E } = pe(), { basePath: D = "/", navigate: O } = u(), k = ce(), A = oe(), j = se(), M = fe(), { data: N, loading: P, refetch: F } = re(E ?? null), I = N?.getVault, [be, { loading: L }] = s(), [xe, { loading: R }] = ne(), [Se, { loading: Ce }] = ie(), [we, { loading: Te }] = o(), [Ee, { loading: De }] = c(), { emit: z } = l(), B = g("vault:update"), Oe = g("vault:delete"), V = g("member:add"), ke = g("member:remove"), Ae = g("member:update_role"), [je, H] = h({
26
24
  name: "",
27
25
  description: "",
28
26
  lockAfterMinutes: 30
29
- }), { name: W, description: G, lockAfterMinutes: K } = xe, Se = (e) => U((t) => ({
27
+ }), { name: U, description: W, lockAfterMinutes: G } = je, Me = (e) => H((t) => ({
30
28
  ...t,
31
29
  name: e
32
- })), Ce = (e) => U((t) => ({
30
+ })), Ne = (e) => H((t) => ({
33
31
  ...t,
34
32
  description: e
35
- })), we = (e) => U((t) => ({
33
+ })), Pe = (e) => H((t) => ({
36
34
  ...t,
37
35
  lockAfterMinutes: e
38
- })), [Te, q] = g(!1), [J, Y] = g(!1), [X, Z] = g(null);
39
- h(() => {
40
- P && U({
41
- name: P.name ?? "",
42
- description: P.description ?? "",
43
- lockAfterMinutes: P.lockAfterMinutes ?? 30
36
+ })), [Fe, K] = h(!1), [Ie, q] = h(!1), [J, Y] = h(null), [X, Z] = h(null);
37
+ de(() => {
38
+ I && H({
39
+ name: I.name ?? "",
40
+ description: I.description ?? "",
41
+ lockAfterMinutes: I.lockAfterMinutes ?? 30
44
42
  });
45
- }, [P]);
46
- let Ee = (e) => {
47
- O ? O(e) : A(e);
48
- }, De = async () => {
43
+ }, [I]);
44
+ let Le = (e) => {
45
+ O ? O(e) : M(e);
46
+ }, Re = async () => {
49
47
  if (E) {
50
48
  Z(null);
51
49
  try {
52
- await F({ variables: {
50
+ await be({ variables: {
53
51
  id: E,
54
52
  input: {
55
- name: W,
56
- description: G,
57
- lockAfterMinutes: K
53
+ name: U,
54
+ description: W,
55
+ lockAfterMinutes: G
58
56
  }
59
- } }), B("vault.updated", { vaultId: E });
57
+ } }), z("vault.updated", { vaultId: E });
60
58
  } catch (e) {
61
- Z(e instanceof Error ? e.message : k("security.vaultSettings.error.updateVault", "Failed to update vault"));
59
+ Z(e instanceof Error ? e.message : A("security.vaultSettings.error.updateVault", "Failed to update vault"));
62
60
  }
63
61
  }
64
62
  }, Q = async () => {
65
63
  if (E) try {
66
- await L({ variables: { id: E } }), B("vault.deleted", { vaultId: E }), m("success"), Ee(D);
64
+ await xe({ variables: { id: E } }), z("vault.deleted", { vaultId: E }), m("success"), Le(D);
67
65
  } catch (e) {
68
- Z(e instanceof Error ? e.message : k("security.vaultSettings.error.deleteVault", "Failed to delete vault")), m("error");
66
+ Z(e instanceof Error ? e.message : A("security.vaultSettings.error.deleteVault", "Failed to delete vault")), m("error");
69
67
  }
70
- }, Oe = async () => {
71
- p("medium");
72
- let e = await f({
73
- title: k("security.vaultSettings.deleteVault.title", "Delete Vault"),
74
- message: k("security.vaultSettings.deleteVault.message", "Delete this vault? This cannot be undone."),
75
- okButtonTitle: k("security.vaultSettings.deleteVault.confirm", "Delete"),
76
- cancelButtonTitle: k("security.vaultSettings.deleteVault.cancel", "Cancel")
68
+ }, ze = async () => {
69
+ ue("medium");
70
+ let e = await le({
71
+ title: A("security.vaultSettings.deleteVault.title", "Delete Vault"),
72
+ message: A("security.vaultSettings.deleteVault.message", "Delete this vault? This cannot be undone."),
73
+ okButtonTitle: A("security.vaultSettings.deleteVault.confirm", "Delete"),
74
+ cancelButtonTitle: A("security.vaultSettings.deleteVault.cancel", "Cancel")
77
75
  });
78
- e === null ? Y(!0) : e && await Q();
79
- }, ke = async (e, t) => {
76
+ e === null ? q(!0) : e && await Q();
77
+ }, Be = async (e, t) => {
80
78
  if (E) {
81
79
  Z(null);
82
80
  try {
83
- let n = await z({ variables: { input: {
81
+ let n = await Se({ variables: { input: {
84
82
  vaultId: E,
85
83
  actorId: e,
86
84
  actorType: "user",
87
85
  role: t.toUpperCase()
88
86
  } } });
89
- n.data?.shareVault?.id && B("member.added", {
87
+ n.data?.shareVault?.id && z("member.added", {
90
88
  vaultId: E,
91
89
  memberId: n.data.shareVault.id,
92
90
  role: t
93
- }), q(!1), N();
91
+ }), K(!1), F();
94
92
  } catch (e) {
95
- Z(e instanceof Error ? e.message : k("security.vaultSettings.error.shareVault", "Failed to share vault"));
93
+ Z(e instanceof Error ? e.message : A("security.vaultSettings.error.shareVault", "Failed to share vault"));
96
94
  }
97
95
  }
98
- }, Ae = async (e, t) => {
96
+ }, Ve = async (e, t) => {
99
97
  if (E) try {
100
- await ge({ variables: {
98
+ await we({ variables: {
101
99
  vaultId: E,
102
100
  actorId: e,
103
101
  actorType: t
104
- } }), B("member.removed", {
102
+ } }), z("member.removed", {
105
103
  vaultId: E,
106
104
  memberId: e
107
- }), N();
105
+ }), F();
108
106
  } catch (e) {
109
- Z(e instanceof Error ? e.message : k("security.vaultSettings.error.removeMember", "Failed to remove member"));
107
+ Z(e instanceof Error ? e.message : A("security.vaultSettings.error.removeMember", "Failed to remove member"));
110
108
  }
111
- }, $ = P?.membersList?.items ?? [];
112
- return M && !P ? /* @__PURE__ */ v(e, {
113
- title: k("security.vaultSettings.title", "Vault Settings"),
109
+ }, He = async (e, t, n) => {
110
+ if (E) try {
111
+ await Ee({ variables: {
112
+ vaultId: E,
113
+ actorId: e,
114
+ actorType: t,
115
+ role: n
116
+ } }), z("member.role_changed", {
117
+ vaultId: E,
118
+ memberId: e,
119
+ role: n
120
+ }), F();
121
+ } catch (e) {
122
+ Z(e instanceof Error ? e.message : A("security.vaultSettings.error.updateRole", "Failed to update role"));
123
+ }
124
+ }, $ = I?.membersList?.items ?? [], Ue = d.filter((e) => e.value !== "owner").map((e) => ({
125
+ value: e.value.toUpperCase(),
126
+ label: A(`security.roles.${e.value}`, e.label)
127
+ }));
128
+ return P && !I ? /* @__PURE__ */ _(e, {
129
+ title: A("security.vaultSettings.title", "Vault Settings"),
114
130
  breadcrumbs: [
115
131
  {
116
- label: k("security.common.breadcrumbs.security", "Security"),
132
+ label: A("security.common.breadcrumbs.security", "Security"),
117
133
  path: D
118
134
  },
119
135
  {
120
- label: k("security.common.breadcrumbs.vault", "Vault"),
136
+ label: A("security.common.breadcrumbs.vault", "Vault"),
121
137
  path: `${D}/vaults/${E}`
122
138
  },
123
- { label: k("security.common.actions.settings", "Settings") }
139
+ { label: A("security.common.actions.settings", "Settings") }
124
140
  ],
125
- children: /* @__PURE__ */ v("div", {
141
+ children: /* @__PURE__ */ _("div", {
126
142
  className: "flex items-center justify-center py-20",
127
- children: /* @__PURE__ */ v(b, { className: "size-10 animate-spin text-primary/60" })
143
+ children: /* @__PURE__ */ _(b, { className: "size-10 animate-spin text-primary/60" })
128
144
  })
129
- }) : /* @__PURE__ */ y(e, {
130
- title: k("security.vaultSettings.title", "Vault Settings"),
131
- description: k("security.vaultSettings.description", "Configure {name} settings and access.", { name: P?.name ?? k("security.common.breadcrumbs.vaultLowercase", "vault") }),
145
+ }) : /* @__PURE__ */ v(e, {
146
+ title: A("security.vaultSettings.title", "Vault Settings"),
147
+ description: A("security.vaultSettings.description", "Configure {{name}} settings and access.", { name: I?.name ?? A("security.common.breadcrumbs.vaultLowercase", "vault") }),
132
148
  breadcrumbs: [
133
149
  {
134
- label: k("security.common.breadcrumbs.security", "Security"),
150
+ label: A("security.common.breadcrumbs.security", "Security"),
135
151
  path: D
136
152
  },
137
153
  {
138
- label: P?.name ?? k("security.common.breadcrumbs.vault", "Vault"),
154
+ label: I?.name ?? A("security.common.breadcrumbs.vault", "Vault"),
139
155
  path: `${D}/vaults/${E}`
140
156
  },
141
- { label: k("security.common.actions.settings", "Settings") }
157
+ { label: A("security.common.actions.settings", "Settings") }
142
158
  ],
143
159
  children: [
144
- /* @__PURE__ */ y("div", {
160
+ /* @__PURE__ */ v("div", {
145
161
  className: "space-y-8 max-w-4xl mx-auto",
146
162
  children: [
147
- /* @__PURE__ */ v(T, {
148
- icon: /* @__PURE__ */ v(x, { className: "size-4" }),
149
- children: k("security.vaultSettings.purpose", "Configure how this vault behaves and who can use it. Rename it, set an auto-lock timeout so it seals itself after a period of inactivity, manage which teammates have access and at what role, and — if you ever need to — permanently delete the vault and everything inside it.")
163
+ /* @__PURE__ */ _(T, {
164
+ icon: /* @__PURE__ */ _(x, { className: "size-4" }),
165
+ children: A("security.vaultSettings.purpose", "Configure how this vault behaves and who can use it. Rename it, set an auto-lock timeout so it seals itself after a period of inactivity, manage which teammates have access and at what role, and — if you ever need to — permanently delete the vault and everything inside it.")
150
166
  }),
151
- (H || V) && /* @__PURE__ */ v(w, {
167
+ (V || B && !j) && /* @__PURE__ */ _(ye, {
152
168
  storageKey: "security-vault-settings",
153
- steps: [...V ? [{
169
+ steps: [...B && !j ? [{
154
170
  id: "auto-lock",
155
- label: k("security.vaultSettings.next.autoLock", "Set an auto-lock timeout"),
156
- description: k("security.vaultSettings.next.autoLockDesc", "Seal the vault automatically after inactivity."),
157
- icon: /* @__PURE__ */ v(x, { className: "size-4" }),
171
+ label: A("security.vaultSettings.next.autoLock", "Set an auto-lock timeout"),
172
+ description: A("security.vaultSettings.next.autoLockDesc", "Seal the vault automatically after inactivity."),
173
+ icon: /* @__PURE__ */ _(x, { className: "size-4" }),
158
174
  href: "#general-settings"
159
- }] : [], ...H ? [{
175
+ }] : [], ...V ? [{
160
176
  id: "add-member",
161
- label: k("security.vaultSettings.next.addMember", "Invite a teammate"),
162
- description: k("security.vaultSettings.next.addMemberDesc", "Grant access at the role they need."),
163
- icon: /* @__PURE__ */ v(S, { className: "size-4" }),
164
- onClick: () => q(!0),
177
+ label: A("security.vaultSettings.next.addMember", "Invite a teammate"),
178
+ description: A("security.vaultSettings.next.addMemberDesc", "Grant access at the role they need."),
179
+ icon: /* @__PURE__ */ _(S, { className: "size-4" }),
180
+ onClick: () => K(!0),
165
181
  done: $.length > 0
166
182
  }] : []]
167
183
  }),
168
- X && /* @__PURE__ */ y("div", {
184
+ X && /* @__PURE__ */ v("div", {
169
185
  className: "p-4 rounded-lg bg-status-error-bg/10 text-status-error-text border border-status-error-border/20 flex items-start gap-3",
170
- children: [/* @__PURE__ */ v(le, { className: "size-5 shrink-0 mt-0.5" }), /* @__PURE__ */ v("p", {
186
+ children: [/* @__PURE__ */ _(y, { className: "size-5 shrink-0 mt-0.5" }), /* @__PURE__ */ _("p", {
171
187
  className: "text-sm font-medium",
172
188
  children: X
173
189
  })]
174
190
  }),
175
- /* @__PURE__ */ y(pe, {
191
+ /* @__PURE__ */ v(_e, {
176
192
  id: "general-settings",
177
193
  treatment: "glass",
178
194
  glow: !0,
179
195
  className: "p-6",
180
- children: [/* @__PURE__ */ y("div", {
196
+ children: [/* @__PURE__ */ v("div", {
181
197
  className: "flex items-center gap-3 mb-6",
182
- children: [/* @__PURE__ */ v("div", {
198
+ children: [/* @__PURE__ */ _("div", {
183
199
  className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
184
- children: /* @__PURE__ */ v(x, { className: "size-5" })
185
- }), /* @__PURE__ */ v("h2", {
200
+ children: /* @__PURE__ */ _(x, { className: "size-5" })
201
+ }), /* @__PURE__ */ _("h2", {
186
202
  className: "text-xl font-bold text-text-primary",
187
- children: k("security.vaultSettings.general.title", "General Settings")
203
+ children: A("security.vaultSettings.general.title", "General Settings")
188
204
  })]
189
- }), /* @__PURE__ */ y("div", {
205
+ }), /* @__PURE__ */ v("div", {
190
206
  className: "space-y-6",
191
207
  children: [
192
- /* @__PURE__ */ v(ee, {
208
+ /* @__PURE__ */ _(ee, {
193
209
  id: "vault-name",
194
- label: k("security.vaultSettings.general.vaultName", "Vault Name"),
195
- value: W,
196
- onChange: (e) => Se(e.target.value),
197
- placeholder: k("security.vaultSettings.general.vaultNamePlaceholder", "e.g. Production Credentials"),
210
+ label: A("security.vaultSettings.general.vaultName", "Vault Name"),
211
+ value: U,
212
+ onChange: (e) => Me(e.target.value),
213
+ placeholder: A("security.vaultSettings.general.vaultNamePlaceholder", "e.g. Production Credentials"),
198
214
  className: "max-w-md"
199
215
  }),
200
- /* @__PURE__ */ y("div", {
216
+ /* @__PURE__ */ v("div", {
201
217
  className: "space-y-2",
202
- children: [/* @__PURE__ */ v("label", {
218
+ children: [/* @__PURE__ */ _("label", {
203
219
  htmlFor: "vault-desc",
204
220
  className: "text-sm font-medium text-text-primary",
205
- children: k("security.vaultSettings.general.descriptionLabel", "Description")
206
- }), /* @__PURE__ */ v("textarea", {
221
+ children: A("security.vaultSettings.general.descriptionLabel", "Description")
222
+ }), /* @__PURE__ */ _("textarea", {
207
223
  id: "vault-desc",
208
- "aria-label": k("security.vaultSettings.general.descriptionLabel", "Description"),
209
- value: G,
210
- onChange: (e) => Ce(e.target.value),
211
- placeholder: k("security.vaultSettings.general.descriptionPlaceholder", "What is this vault for?"),
224
+ "aria-label": A("security.vaultSettings.general.descriptionLabel", "Description"),
225
+ value: W,
226
+ onChange: (e) => Ne(e.target.value),
227
+ placeholder: A("security.vaultSettings.general.descriptionPlaceholder", "What is this vault for?"),
212
228
  rows: 3,
213
- className: u("flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary", "placeholder:text-text-secondary/50 resize-y")
229
+ className: p("flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary", "placeholder:text-text-secondary/50 resize-y")
214
230
  })]
215
231
  }),
216
- /* @__PURE__ */ y("div", {
217
- className: "space-y-2",
218
- children: [
219
- /* @__PURE__ */ y("label", {
220
- htmlFor: "auto-lock",
221
- className: "text-sm font-medium text-text-primary flex items-center gap-2",
222
- children: [k("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"), /* @__PURE__ */ v(r, {
223
- variant: "outline",
224
- className: "font-normal text-[10px]",
225
- children: k("security.common.breadcrumbs.security", "Security")
226
- })]
227
- }),
228
- /* @__PURE__ */ y("div", {
229
- className: "flex items-center gap-3",
230
- children: [/* @__PURE__ */ v("input", {
231
- id: "auto-lock",
232
- "aria-label": k("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"),
233
- type: "number",
234
- min: 0,
235
- max: 1440,
236
- value: K,
237
- onChange: (e) => we(parseInt(e.target.value, 10) || 0),
238
- className: u("flex h-9 w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary")
239
- }), /* @__PURE__ */ v("span", {
240
- className: "text-sm text-text-secondary",
241
- children: k("security.vaultSettings.general.autoLock.minutes", "minutes")
242
- })]
243
- }),
244
- /* @__PURE__ */ v("p", {
245
- className: "text-xs text-text-secondary italic mt-1",
246
- children: k("security.vaultSettings.general.autoLock.help", "The vault will automatically lock after this many minutes of inactivity. Set to 0 to disable.")
247
- })
248
- ]
249
- }),
250
- /* @__PURE__ */ v("div", {
232
+ (() => {
233
+ let e = /* @__PURE__ */ v("div", {
234
+ className: "space-y-2",
235
+ children: [
236
+ /* @__PURE__ */ v("label", {
237
+ htmlFor: "auto-lock",
238
+ className: "text-sm font-medium text-text-primary flex items-center gap-2",
239
+ children: [A("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"), !j && /* @__PURE__ */ _(r, {
240
+ variant: "outline",
241
+ className: "font-normal text-[10px]",
242
+ children: A("security.common.breadcrumbs.security", "Security")
243
+ })]
244
+ }),
245
+ /* @__PURE__ */ v("div", {
246
+ className: "flex items-center gap-3",
247
+ children: [/* @__PURE__ */ _("input", {
248
+ id: "auto-lock",
249
+ "aria-label": A("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"),
250
+ type: "number",
251
+ min: 0,
252
+ max: 1440,
253
+ value: G,
254
+ onChange: (e) => Pe(parseInt(e.target.value, 10) || 0),
255
+ className: p("flex h-9 w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary")
256
+ }), /* @__PURE__ */ _("span", {
257
+ className: "text-sm text-text-secondary",
258
+ children: A("security.vaultSettings.general.autoLock.minutes", "minutes")
259
+ })]
260
+ }),
261
+ /* @__PURE__ */ _("p", {
262
+ className: "text-xs text-text-secondary italic mt-1",
263
+ children: A("security.vaultSettings.general.autoLock.help", "The vault will automatically lock after this many minutes of inactivity. Set to 0 to disable.")
264
+ })
265
+ ]
266
+ });
267
+ return j ? /* @__PURE__ */ _(w, {
268
+ storageKey: "security.vaultSettings.moreOptions",
269
+ children: e
270
+ }) : e;
271
+ })(),
272
+ /* @__PURE__ */ _("div", {
251
273
  className: "flex justify-end pt-4 border-t border-border-subtle/40",
252
- children: /* @__PURE__ */ v(l, {
274
+ children: /* @__PURE__ */ _(f, {
253
275
  permission: "vault:update",
254
- children: /* @__PURE__ */ y(i, {
255
- onClick: De,
256
- disabled: I || !W.trim(),
276
+ children: /* @__PURE__ */ v(i, {
277
+ onClick: Re,
278
+ disabled: L || !U.trim(),
257
279
  className: "shadow-sm",
258
- children: [I ? /* @__PURE__ */ v(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(ue, { className: "size-4" }), k("security.vaultSettings.general.save", "Save General Settings")]
280
+ children: [L ? /* @__PURE__ */ _(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ _(me, { className: "size-4" }), A("security.vaultSettings.general.save", "Save General Settings")]
259
281
  })
260
282
  })
261
283
  })
262
284
  ]
263
285
  })]
264
286
  }),
265
- /* @__PURE__ */ y(a, {
266
- className: "p-6 shadow-sm border-border-subtle/60",
267
- children: [/* @__PURE__ */ y("div", {
268
- className: "flex items-center justify-between mb-6",
269
- children: [/* @__PURE__ */ y("div", {
270
- className: "flex items-center gap-3",
271
- children: [
272
- /* @__PURE__ */ v("div", {
273
- className: "p-2 rounded-lg bg-secondary/10 text-secondary-foreground",
274
- children: /* @__PURE__ */ v(C, { className: "size-5" })
275
- }),
276
- /* @__PURE__ */ v("h2", {
277
- className: "text-xl font-bold text-text-primary",
278
- children: k("security.vaultSettings.members.title", "Access & Members")
279
- }),
280
- /* @__PURE__ */ v(r, {
287
+ (() => {
288
+ let e = /* @__PURE__ */ v(a, {
289
+ className: "p-6 shadow-sm border-border-subtle/60",
290
+ children: [/* @__PURE__ */ v("div", {
291
+ className: "flex items-center justify-between mb-6",
292
+ children: [/* @__PURE__ */ v("div", {
293
+ className: "flex items-center gap-3",
294
+ children: [
295
+ /* @__PURE__ */ _("div", {
296
+ className: "p-2 rounded-lg bg-secondary/10 text-secondary-foreground",
297
+ children: /* @__PURE__ */ _(C, { className: "size-5" })
298
+ }),
299
+ /* @__PURE__ */ _("h2", {
300
+ className: "text-xl font-bold text-text-primary",
301
+ children: A("security.vaultSettings.members.title", "Access & Members")
302
+ }),
303
+ /* @__PURE__ */ _(r, {
304
+ variant: "outline",
305
+ className: "bg-bg-sunken",
306
+ children: $.length
307
+ })
308
+ ]
309
+ }), /* @__PURE__ */ _(f, {
310
+ permission: "member:add",
311
+ children: /* @__PURE__ */ v(i, {
281
312
  variant: "outline",
282
- className: "bg-bg-sunken",
283
- children: $.length
313
+ size: "sm",
314
+ onClick: () => K(!0),
315
+ children: [/* @__PURE__ */ _(S, { className: "size-4" }), A("security.vaultSettings.members.add", "Add Member")]
284
316
  })
285
- ]
286
- }), /* @__PURE__ */ v(l, {
287
- permission: "member:add",
288
- children: /* @__PURE__ */ y(i, {
289
- variant: "outline",
290
- size: "sm",
291
- onClick: () => q(!0),
292
- children: [/* @__PURE__ */ v(S, { className: "size-4" }), k("security.vaultSettings.members.add", "Add Member")]
293
- })
294
- })]
295
- }), $.length > 0 ? /* @__PURE__ */ v("div", {
296
- className: "border border-border-subtle/60 rounded-lg overflow-hidden divide-y divide-border/40 bg-bg-surface/30",
297
- children: $.map((e) => {
298
- let t = oe(e.role.toLowerCase());
299
- return /* @__PURE__ */ y("div", {
300
- className: "flex items-center justify-between p-4 hover:bg-bg-sunken/30 transition-colors",
301
- children: [/* @__PURE__ */ y("div", {
302
- className: "flex items-center gap-3",
303
- children: [/* @__PURE__ */ v("div", {
304
- className: "size-10 rounded-full bg-action-primary-bg/5 border border-primary/10 flex items-center justify-center text-primary",
305
- children: e.actorType === "user" ? /* @__PURE__ */ v(C, { className: "size-5" }) : /* @__PURE__ */ v(x, { className: "size-5" })
306
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
307
- className: "text-sm font-bold text-text-primary",
308
- children: e.actorId
309
- }), /* @__PURE__ */ v("p", {
310
- className: "text-xs text-text-secondary capitalize",
311
- children: e.actorType
312
- })] })]
313
- }), /* @__PURE__ */ y("div", {
314
- className: "flex items-center gap-4",
317
+ })]
318
+ }), $.length > 0 ? /* @__PURE__ */ _("div", {
319
+ className: "border border-border-subtle/60 rounded-lg overflow-hidden divide-y divide-border/40 bg-bg-surface/30",
320
+ children: $.map((e) => {
321
+ let t = ae(e.role.toLowerCase());
322
+ return /* @__PURE__ */ v("div", {
323
+ className: "flex items-center justify-between p-4 hover:bg-bg-sunken/30 transition-colors",
315
324
  children: [/* @__PURE__ */ v("div", {
316
- className: "hidden sm:block",
317
- children: /* @__PURE__ */ v(r, {
318
- variant: "outline",
319
- className: "font-medium text-[10px] uppercase tracking-tighter",
320
- children: t.label
321
- })
322
- }), e.role !== "OWNER" && be && /* @__PURE__ */ v("button", {
323
- type: "button",
324
- onClick: () => Ae(e.actorId, e.actorType),
325
- className: "p-1.5 rounded-md text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-all",
326
- title: k("security.vaultSettings.members.revoke", "Revoke Access"),
327
- "aria-label": k("security.vaultSettings.members.revoke", "Revoke Access"),
328
- children: /* @__PURE__ */ v(fe, { className: "size-4" })
325
+ className: "flex items-center gap-3",
326
+ children: [/* @__PURE__ */ _("div", {
327
+ className: "size-10 rounded-full bg-action-primary-bg/5 border border-primary/10 flex items-center justify-center text-primary",
328
+ children: e.actorType === "user" ? /* @__PURE__ */ _(C, { className: "size-5" }) : /* @__PURE__ */ _(x, { className: "size-5" })
329
+ }), /* @__PURE__ */ v("div", {
330
+ className: "min-w-0",
331
+ children: [/* @__PURE__ */ _("p", {
332
+ className: "text-sm font-bold text-text-primary break-all",
333
+ children: k(e.actorId)
334
+ }), /* @__PURE__ */ _("p", {
335
+ className: "text-xs text-text-secondary capitalize",
336
+ children: e.actorType
337
+ })]
338
+ })]
339
+ }), /* @__PURE__ */ v("div", {
340
+ className: "flex items-center gap-4",
341
+ children: [j && e.role !== "OWNER" && Ae ? /* @__PURE__ */ _(te, {
342
+ value: e.role,
343
+ onChange: (t) => void He(e.actorId, e.actorType, t),
344
+ options: Ue,
345
+ disabled: De,
346
+ "aria-label": A("security.vaultSettings.members.roleAria", "Role for {{name}}", { name: k(e.actorId) }),
347
+ className: "w-32"
348
+ }) : /* @__PURE__ */ _("div", {
349
+ className: "hidden sm:block",
350
+ children: /* @__PURE__ */ _(r, {
351
+ variant: "outline",
352
+ className: "font-medium text-[10px] uppercase tracking-tighter",
353
+ children: A(`security.roles.${t.value}`, t.label)
354
+ })
355
+ }), e.role !== "OWNER" && ke && /* @__PURE__ */ _("button", {
356
+ type: "button",
357
+ onClick: () => Y({
358
+ actorId: e.actorId,
359
+ actorType: e.actorType,
360
+ label: k(e.actorId)
361
+ }),
362
+ className: "p-1.5 rounded-md text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-colors",
363
+ title: A("security.vaultSettings.members.revoke", "Revoke Access"),
364
+ "aria-label": A("security.vaultSettings.members.revoke", "Revoke Access"),
365
+ children: /* @__PURE__ */ _(ge, { className: "size-4" })
366
+ })]
329
367
  })]
330
- })]
331
- }, e.id);
332
- })
333
- }) : /* @__PURE__ */ v(me, {
334
- illustration: "empty-people",
335
- title: k("security.vaultSettings.members.empty.title", "No additional members"),
336
- description: k("security.vaultSettings.members.empty.description", "No additional members have access to this vault."),
337
- action: /* @__PURE__ */ v(i, {
338
- variant: "link",
339
- onClick: () => q(!0),
340
- children: k("security.vaultSettings.members.empty.action", "Invite your first colleague")
341
- })
342
- })]
343
- }),
344
- /* @__PURE__ */ y(a, {
345
- className: "p-6 border-status-error-border/20 bg-status-error-bg/5 shadow-sm",
346
- children: [/* @__PURE__ */ y("div", {
347
- className: "flex items-center gap-3 mb-4",
348
- children: [/* @__PURE__ */ v("div", {
349
- className: "p-2 rounded-lg bg-status-error-bg/10 text-status-error-text",
350
- children: /* @__PURE__ */ v(de, { className: "size-5" })
351
- }), /* @__PURE__ */ v("h2", {
352
- className: "text-xl font-bold text-status-error-text",
353
- children: k("security.vaultSettings.danger.title", "Danger Zone")
368
+ }, e.id);
369
+ })
370
+ }) : /* @__PURE__ */ _(ve, {
371
+ illustration: "empty-people",
372
+ title: A("security.vaultSettings.members.empty.title", "No additional members"),
373
+ description: A("security.vaultSettings.members.empty.description", "No additional members have access to this vault."),
374
+ action: /* @__PURE__ */ _(i, {
375
+ variant: "link",
376
+ onClick: () => K(!0),
377
+ children: A("security.vaultSettings.members.empty.action", "Invite your first colleague")
378
+ })
354
379
  })]
355
- }), /* @__PURE__ */ y("div", {
356
- className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4",
357
- children: [/* @__PURE__ */ y("div", {
358
- className: "flex-1",
359
- children: [/* @__PURE__ */ v("p", {
360
- className: "text-sm font-semibold text-text-primary mb-1",
361
- children: k("security.vaultSettings.danger.deleteTitle", "Delete this vault")
362
- }), /* @__PURE__ */ v("p", {
363
- className: "text-xs text-text-secondary max-w-lg",
364
- children: k("security.vaultSettings.danger.deleteDescription", "Once you delete a vault, there is no going back. All secrets, version history, and access configurations will be permanently removed.")
380
+ });
381
+ return j ? /* @__PURE__ */ _(w, {
382
+ storageKey: "security.vaultSettings.members",
383
+ label: A("security.vaultSettings.members.title", "Access & Members"),
384
+ children: e
385
+ }) : e;
386
+ })(),
387
+ (() => {
388
+ let e = /* @__PURE__ */ v(a, {
389
+ className: "p-6 border-status-error-border/20 bg-status-error-bg/5 shadow-sm",
390
+ children: [/* @__PURE__ */ v("div", {
391
+ className: "flex items-center gap-3 mb-4",
392
+ children: [/* @__PURE__ */ _("div", {
393
+ className: "p-2 rounded-lg bg-status-error-bg/10 text-status-error-text",
394
+ children: /* @__PURE__ */ _(he, { className: "size-5" })
395
+ }), /* @__PURE__ */ _("h2", {
396
+ className: "text-xl font-bold text-status-error-text",
397
+ children: A("security.vaultSettings.danger.title", "Danger Zone")
398
+ })]
399
+ }), /* @__PURE__ */ v("div", {
400
+ className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4",
401
+ children: [/* @__PURE__ */ v("div", {
402
+ className: "flex-1",
403
+ children: [/* @__PURE__ */ _("p", {
404
+ className: "text-sm font-semibold text-text-primary mb-1",
405
+ children: A("security.vaultSettings.danger.deleteTitle", "Delete this vault")
406
+ }), /* @__PURE__ */ _("p", {
407
+ className: "text-xs text-text-secondary max-w-lg",
408
+ children: A("security.vaultSettings.danger.deleteDescription", "Once you delete a vault, there is no going back. All secrets, version history, and access configurations will be permanently removed.")
409
+ })]
410
+ }), /* @__PURE__ */ _(f, {
411
+ permission: "vault:delete",
412
+ children: /* @__PURE__ */ _(i, {
413
+ variant: "destructive",
414
+ onClick: () => void ze(),
415
+ className: "shrink-0",
416
+ children: A("security.vaultSettings.danger.deleteAction", "Delete Vault")
417
+ })
365
418
  })]
366
- }), /* @__PURE__ */ v(l, {
367
- permission: "vault:delete",
368
- children: /* @__PURE__ */ v(i, {
369
- variant: "destructive",
370
- onClick: () => void Oe(),
371
- className: "shrink-0",
372
- children: k("security.vaultSettings.danger.deleteAction", "Delete Vault")
373
- })
374
419
  })]
375
- })]
376
- })
420
+ });
421
+ return j ? Oe ? /* @__PURE__ */ _(w, {
422
+ storageKey: "security.vaultSettings.danger",
423
+ label: A("security.vaultSettings.danger.deleteTitle", "Delete this vault"),
424
+ children: e
425
+ }) : null : e;
426
+ })()
377
427
  ]
378
428
  }),
379
- /* @__PURE__ */ v(t, {
380
- isOpen: Te,
381
- onClose: () => q(!1),
382
- onInvite: ke,
383
- vaultName: P?.name ?? k("security.common.breadcrumbs.vault", "Vault")
429
+ /* @__PURE__ */ _(t, {
430
+ isOpen: Fe,
431
+ onClose: () => K(!1),
432
+ onInvite: Be,
433
+ vaultName: I?.name ?? A("security.common.breadcrumbs.vault", "Vault")
384
434
  }),
385
- /* @__PURE__ */ v(n, {
386
- isOpen: J,
387
- onClose: () => Y(!1),
435
+ /* @__PURE__ */ _(n, {
436
+ isOpen: Ie,
437
+ onClose: () => q(!1),
388
438
  onConfirm: Q,
389
- title: k("security.vaultSettings.delete.title", "Delete Vault"),
390
- description: k("security.vaultSettings.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will result in permanent data loss.", { name: P?.name ?? "" }),
391
- confirmLabel: R ? k("security.vaultSettings.delete.deleting", "Deleting...") : k("security.vaultSettings.delete.confirm", "Delete Permanently"),
439
+ title: A("security.vaultSettings.delete.title", "Delete Vault"),
440
+ description: A("security.vaultSettings.delete.description", "Are you sure you want to delete \"{{name}}\"? This action cannot be undone and will result in permanent data loss.", { name: I?.name ?? "" }),
441
+ confirmLabel: R ? A("security.vaultSettings.delete.deleting", "Deleting...") : A("security.vaultSettings.delete.confirm", "Delete Permanently"),
442
+ variant: "destructive"
443
+ }),
444
+ /* @__PURE__ */ _(n, {
445
+ isOpen: J !== null,
446
+ onClose: () => Y(null),
447
+ onConfirm: () => {
448
+ let e = J;
449
+ Y(null), e && Ve(e.actorId, e.actorType);
450
+ },
451
+ title: A("security.vaultSettings.removeMember.title", "Remove access?"),
452
+ description: A("security.vaultSettings.removeMember.description", "{{name}} will no longer be able to open \"{{vault}}\" or the items in it.", {
453
+ name: J?.label ?? "",
454
+ vault: I?.name ?? A("security.common.breadcrumbs.vaultLowercase", "vault")
455
+ }),
456
+ confirmLabel: A("security.vaultSettings.removeMember.confirm", "Remove access"),
392
457
  variant: "destructive"
393
458
  })
394
459
  ]