@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.
- package/dist/security/components/ActivityTimeline.js +42 -41
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.d.ts +2 -0
- package/dist/security/components/BulkActionBar.js +93 -81
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/BulkPickerDialogs.d.ts +30 -0
- package/dist/security/components/BulkPickerDialogs.js +136 -0
- package/dist/security/components/BulkPickerDialogs.js.map +1 -0
- package/dist/security/components/ExternalSecretProviders.js +150 -134
- package/dist/security/components/ExternalSecretProviders.js.map +1 -1
- package/dist/security/components/SavedValuesMoreMenu.d.ts +12 -0
- package/dist/security/components/SavedValuesMoreMenu.js +63 -0
- package/dist/security/components/SavedValuesMoreMenu.js.map +1 -0
- package/dist/security/components/SecretFormFields.js +162 -114
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.d.ts +2 -0
- package/dist/security/components/SecretRow.js +41 -40
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +1 -1
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/VaultFormFields.js +100 -55
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/ui.d.ts +8 -1
- package/dist/security/components/ui.js +15 -3
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/constants/externalSecretProviders.d.ts +8 -1
- package/dist/security/constants/externalSecretProviders.js +48 -0
- package/dist/security/constants/externalSecretProviders.js.map +1 -1
- package/dist/security/hooks/useActorLabel.d.ts +9 -0
- package/dist/security/hooks/useActorLabel.js +18 -0
- package/dist/security/hooks/useActorLabel.js.map +1 -0
- package/dist/security/hooks/useDebouncedValue.d.ts +2 -0
- package/dist/security/hooks/useDebouncedValue.js +12 -0
- package/dist/security/hooks/useDebouncedValue.js.map +1 -0
- package/dist/security/hooks/useSecurityVariant.d.ts +7 -0
- package/dist/security/hooks/useSecurityVariant.js +9 -0
- package/dist/security/hooks/useSecurityVariant.js.map +1 -0
- package/dist/security/index.d.ts +1 -1
- package/dist/security/pages/AccessReviewPage.js +77 -76
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +58 -44
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +1 -1
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +85 -85
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +339 -273
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +59 -56
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +218 -162
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultLandingPage.js +48 -35
- package/dist/security/pages/VaultLandingPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +331 -266
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +231 -161
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/providers/SecurityProvider.js +24 -20
- package/dist/security/providers/SecurityProvider.js.map +1 -1
- package/dist/security/providers/securityContext.d.ts +3 -0
- package/dist/security/providers/securityContext.js +6 -0
- package/dist/security/providers/securityContext.js.map +1 -0
- package/dist/security/routes/SecurityAdminRoutes.js +3 -3
- package/dist/security/routes/SecurityAdminRoutes.js.map +1 -1
- package/dist/security/routes/SecurityRoutes.js +3 -3
- package/dist/security/routes/SecurityRoutes.js.map +1 -1
- package/dist/security/routes/SecurityUserRoutes.js +1 -1
- package/dist/security/routes/SecurityUserRoutes.js.map +1 -1
- package/dist/security/translations/en.d.ts +65 -0
- package/dist/security/translations/en.js +80 -13
- package/dist/security/translations/en.js.map +1 -1
- package/dist/security/types/index.d.ts +13 -0
- package/dist/security/utils/formInputs.d.ts +49 -0
- package/dist/security/utils/formInputs.js +27 -0
- package/dist/security/utils/formInputs.js.map +1 -0
- package/dist/security/utils/landingTabs.d.ts +9 -0
- package/dist/security/utils/landingTabs.js +16 -0
- package/dist/security/utils/landingTabs.js.map +1 -0
- package/dist/security/utils/rotationStatus.d.ts +12 -0
- package/dist/security/utils/rotationStatus.js +8 -0
- package/dist/security/utils/rotationStatus.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SECURITY_FEATURE_FLAGS as e } from "../constants/featureFlags.js";
|
|
2
|
+
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
+
import { cn as n } from "../utils/cn.js";
|
|
4
|
+
import { useFeatureFlag as r } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { Activity as o, ChevronDown as s, FileUp as c, HeartPulse as l, Plug as u, UserCheck as d, Users as f } from "lucide-react";
|
|
7
|
+
import { DropdownMenu as p, DropdownMenuContent as m, DropdownMenuItem as h, DropdownMenuTrigger as g } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
// src/security/components/SavedValuesMoreMenu.tsx
|
|
9
|
+
var _ = ({ onOpen: _ }) => {
|
|
10
|
+
let v = t(), y = r(e.VAULT_INTEGRATIONS, !1), b = [
|
|
11
|
+
{
|
|
12
|
+
route: "shared-with-me",
|
|
13
|
+
label: v("security.savedValues.more.sharedWithMe", "Shared with me"),
|
|
14
|
+
Icon: f
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
route: "import",
|
|
18
|
+
label: v("security.vaultLanding.importExport", "Import / Export"),
|
|
19
|
+
Icon: c
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
route: "dashboard",
|
|
23
|
+
label: v("security.vaultLanding.securityHealth", "Security Health"),
|
|
24
|
+
Icon: l
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
route: "access-review",
|
|
28
|
+
label: v("security.vaultLanding.accessReview", "Access Review"),
|
|
29
|
+
Icon: d
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
route: "audit",
|
|
33
|
+
label: v("security.vaultLanding.auditLog", "Audit Log"),
|
|
34
|
+
Icon: o
|
|
35
|
+
},
|
|
36
|
+
...y ? [{
|
|
37
|
+
route: "providers",
|
|
38
|
+
label: v("security.vaultLanding.providers", "Providers"),
|
|
39
|
+
Icon: u
|
|
40
|
+
}] : []
|
|
41
|
+
];
|
|
42
|
+
return /* @__PURE__ */ a(p, { children: [/* @__PURE__ */ a(g, {
|
|
43
|
+
className: n("inline-flex h-9 items-center gap-1.5 rounded-md border border-border-subtle bg-transparent px-3 text-sm font-medium", "text-text-primary hover:bg-accent", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"),
|
|
44
|
+
"data-tour": "saved-values-more",
|
|
45
|
+
children: [v("security.savedValues.more.label", "More"), /* @__PURE__ */ i(s, {
|
|
46
|
+
className: "size-4",
|
|
47
|
+
"aria-hidden": "true"
|
|
48
|
+
})]
|
|
49
|
+
}), /* @__PURE__ */ i(m, {
|
|
50
|
+
align: "end",
|
|
51
|
+
className: "min-w-52",
|
|
52
|
+
children: b.map(({ route: e, label: t, Icon: n }) => /* @__PURE__ */ a(h, {
|
|
53
|
+
onSelect: () => _(e),
|
|
54
|
+
children: [/* @__PURE__ */ i(n, {
|
|
55
|
+
className: "size-4",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}), t]
|
|
58
|
+
}, e))
|
|
59
|
+
})] });
|
|
60
|
+
};
|
|
61
|
+
export { _ as SavedValuesMoreMenu };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=SavedValuesMoreMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SavedValuesMoreMenu.js","names":["SavedValuesMoreMenu","tr","useTr","providersEnabled","useFeatureFlag","SECURITY_FEATURE_FLAGS","items","Users","FileUp","HeartPulse","UserCheck","Activity","Plug","DropdownMenu","DropdownMenuTrigger","cn","ChevronDown","DropdownMenuContent","DropdownMenuItem","onOpen","route","Icon","label"],"sources":["../../../src/security/components/SavedValuesMoreMenu.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Activity, ChevronDown, FileUp, HeartPulse, Plug, UserCheck, Users } from 'lucide-react';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { SECURITY_FEATURE_FLAGS } from '../constants/featureFlags';\nimport { useTr } from '../hooks/useTr';\nimport { cn } from '../utils/cn';\n\ninterface SavedValuesMoreMenuProps {\n /** Opens a page by its path under the module's base path, e.g. `audit`. */\n onOpen: (route: string) => void;\n}\n\n/**\n * FluidGrids' \"More ▾\" on Saved values (BOFF-11871): the pages that used to be\n * landing tabs, plus Shared with me, one click away from the vault list.\n * Providers is listed only with its preview flag on, as the old tab was.\n */\nexport const SavedValuesMoreMenu: FC<SavedValuesMoreMenuProps> = ({ onOpen }) => {\n const tr = useTr();\n const providersEnabled = useFeatureFlag(SECURITY_FEATURE_FLAGS.VAULT_INTEGRATIONS, false);\n\n const items = [\n {\n route: 'shared-with-me',\n label: tr('security.savedValues.more.sharedWithMe', 'Shared with me'),\n Icon: Users,\n },\n {\n route: 'import',\n label: tr('security.vaultLanding.importExport', 'Import / Export'),\n Icon: FileUp,\n },\n {\n route: 'dashboard',\n label: tr('security.vaultLanding.securityHealth', 'Security Health'),\n Icon: HeartPulse,\n },\n {\n route: 'access-review',\n label: tr('security.vaultLanding.accessReview', 'Access Review'),\n Icon: UserCheck,\n },\n {\n route: 'audit',\n label: tr('security.vaultLanding.auditLog', 'Audit Log'),\n Icon: Activity,\n },\n ...(providersEnabled\n ? [\n {\n route: 'providers',\n label: tr('security.vaultLanding.providers', 'Providers'),\n Icon: Plug,\n },\n ]\n : []),\n ];\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className={cn(\n 'inline-flex h-9 items-center gap-1.5 rounded-md border border-border-subtle bg-transparent px-3 text-sm font-medium',\n 'text-text-primary hover:bg-accent',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]'\n )}\n data-tour=\"saved-values-more\"\n >\n {tr('security.savedValues.more.label', 'More')}\n <ChevronDown className=\"size-4\" aria-hidden=\"true\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"min-w-52\">\n {items.map(({ route, label, Icon }) => (\n <DropdownMenuItem key={route} onSelect={() => onOpen(route)}>\n <Icon className=\"size-4\" aria-hidden=\"true\" />\n {label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"],"mappings":";;;;;;;;AAuBA,IAAaA,KAAqD,EAAE,gBAAa;CAC/E,IAAMC,IAAKC,EAAM,GACXC,IAAmBC,EAAeC,EAAuB,oBAAoB,EAAK,GAElFC,IAAQ;EACZ;GACE,OAAO;GACP,OAAOL,EAAG,0CAA0C,gBAAgB;GACpE,MAAMM;EACR;EACA;GACE,OAAO;GACP,OAAON,EAAG,sCAAsC,iBAAiB;GACjE,MAAMO;EACR;EACA;GACE,OAAO;GACP,OAAOP,EAAG,wCAAwC,iBAAiB;GACnE,MAAMQ;EACR;EACA;GACE,OAAO;GACP,OAAOR,EAAG,sCAAsC,eAAe;GAC/D,MAAMS;EACR;EACA;GACE,OAAO;GACP,OAAOT,EAAG,kCAAkC,WAAW;GACvD,MAAMU;EACR;EACA,GAAIR,IACA,CACE;GACE,OAAO;GACP,OAAOF,EAAG,mCAAmC,WAAW;GACxD,MAAMW;EACR,CACF,IACA,CAAC;CACP;CAEA,OACE,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD;EACE,WAAWC,EACT,uHACA,qCACA,8FACF;EACA,aAAU;EANZ,UAAA,CAQGd,EAAG,mCAAmC,MAAM,GAC7C,kBAACe,GAAD;GAAa,WAAU;GAAS,eAAY;EAAQ,CAAA,CACjC;CACrB,CAAA,GAAA,kBAACC,GAAD;EAAqB,OAAM;EAAM,WAAU;EACxC,UAAAX,EAAM,KAAK,EAAE,UAAO,UAAO,cAC1B,kBAACY,GAAD;GAA8B,gBAAgBC,EAAOC,CAAK;GAA1D,UAAA,CACE,kBAACC,GAAD;IAAM,WAAU;IAAS,eAAY;GAAQ,CAAA,GAC5CC,CACe;EAHK,GAAAF,CAGL,CACnB;CACkB,CAAA,CACT,EAAA,CAAA;AAElB"}
|
|
@@ -3,51 +3,90 @@ import { Button as t, Input as n, Select as r } from "./ui.js";
|
|
|
3
3
|
import { SECRET_TYPES as i } from "../constants/secretTypes.js";
|
|
4
4
|
import { PasswordGenerator as a } from "./PasswordGenerator.js";
|
|
5
5
|
import { useTr as o } from "../hooks/useTr.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useIsFluidgridsVariant as s } from "../hooks/useSecurityVariant.js";
|
|
7
|
+
import { useId as c, useState as l } from "react";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import { Minus as f, Plus as p } from "lucide-react";
|
|
10
|
+
import { OptionalFields as m } from "@burdenoff/fe-libs/ui";
|
|
10
11
|
// src/security/components/SecretFormFields.tsx
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var h = [
|
|
13
|
+
"CREDENTIAL",
|
|
14
|
+
"API_KEY",
|
|
15
|
+
"TEXT"
|
|
16
|
+
], g = ({ type: t, onTypeChange: n, options: r }) => {
|
|
17
|
+
let i = o(), a = c(), s = (r) => /* @__PURE__ */ d("label", {
|
|
18
|
+
className: e("flex min-h-11 cursor-pointer items-center gap-3 rounded-md border px-3 py-2 text-sm transition-colors", t === r.value ? "border-action-primary-bg bg-action-primary-bg/5 text-text-primary" : "border-border-subtle text-text-primary hover:bg-bg-sunken/50"),
|
|
19
|
+
children: [/* @__PURE__ */ u("input", {
|
|
20
|
+
type: "radio",
|
|
21
|
+
name: a,
|
|
22
|
+
value: r.value,
|
|
23
|
+
checked: t === r.value,
|
|
24
|
+
onChange: () => n(r.value),
|
|
25
|
+
className: "accent-primary"
|
|
26
|
+
}), r.label]
|
|
27
|
+
}, r.value), l = r.filter((e) => h.includes(e.value)), f = r.filter((e) => !h.includes(e.value));
|
|
28
|
+
return /* @__PURE__ */ d("fieldset", {
|
|
14
29
|
className: "space-y-2",
|
|
15
30
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ u("legend", {
|
|
32
|
+
className: "text-sm font-medium text-text-primary",
|
|
33
|
+
children: i("security.secretForm.type", "Secret Type")
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ u("div", {
|
|
36
|
+
className: "grid gap-2 sm:grid-cols-3",
|
|
37
|
+
children: l.map(s)
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ u(m, {
|
|
40
|
+
storageKey: "security.secretCreate.type",
|
|
41
|
+
label: i("security.secretForm.moreTypes", "More kinds"),
|
|
42
|
+
defaultOpen: !h.includes(t),
|
|
43
|
+
children: /* @__PURE__ */ u("div", {
|
|
44
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
45
|
+
children: f.map(s)
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
}, _ = ({ type: n, value: r, onValueChange: i, showPasswordGen: s, setShowPasswordGen: c }) => {
|
|
51
|
+
let l = o();
|
|
52
|
+
if (n === "CREDENTIAL") return /* @__PURE__ */ d("div", {
|
|
53
|
+
className: "space-y-2",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ u("label", {
|
|
17
56
|
htmlFor: "secret-value-password",
|
|
18
57
|
className: "text-sm font-medium text-text-primary",
|
|
19
|
-
children:
|
|
58
|
+
children: l("security.secretForm.password", "Password")
|
|
20
59
|
}),
|
|
21
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ u("input", {
|
|
22
61
|
id: "secret-value-password",
|
|
23
|
-
"aria-label":
|
|
62
|
+
"aria-label": l("security.secretForm.password", "Password"),
|
|
24
63
|
type: "password",
|
|
25
64
|
value: r,
|
|
26
65
|
onChange: (e) => i(e.target.value),
|
|
27
|
-
placeholder:
|
|
66
|
+
placeholder: l("security.secretForm.passwordPlaceholder", "Enter password"),
|
|
28
67
|
className: e("flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]")
|
|
29
68
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ u(t, {
|
|
31
70
|
variant: "outline",
|
|
32
71
|
size: "sm",
|
|
33
72
|
type: "button",
|
|
34
|
-
onClick: () =>
|
|
35
|
-
children: s ?
|
|
73
|
+
onClick: () => c(!s),
|
|
74
|
+
children: s ? l("security.secretForm.hideGenerator", "Hide Generator") : l("security.secretForm.generatePassword", "Generate Password")
|
|
36
75
|
}),
|
|
37
|
-
s && /* @__PURE__ */
|
|
38
|
-
i(e),
|
|
76
|
+
s && /* @__PURE__ */ u(a, { onAccept: (e) => {
|
|
77
|
+
i(e), c(!1);
|
|
39
78
|
} })
|
|
40
79
|
]
|
|
41
80
|
});
|
|
42
81
|
if (n === "CERTIFICATE" || n === "PRIVATE_KEY") {
|
|
43
|
-
let t = n === "CERTIFICATE", a = t ?
|
|
44
|
-
return /* @__PURE__ */
|
|
82
|
+
let t = n === "CERTIFICATE", a = t ? l("security.secretForm.certificatePem", "Certificate (PEM)") : l("security.secretForm.privateKey", "Private Key");
|
|
83
|
+
return /* @__PURE__ */ d("div", {
|
|
45
84
|
className: "space-y-1.5",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ u("label", {
|
|
47
86
|
htmlFor: "secret-value-pem",
|
|
48
87
|
className: "text-sm font-medium text-text-primary",
|
|
49
88
|
children: a
|
|
50
|
-
}), /* @__PURE__ */
|
|
89
|
+
}), /* @__PURE__ */ u("textarea", {
|
|
51
90
|
id: "secret-value-pem",
|
|
52
91
|
"aria-label": a,
|
|
53
92
|
value: r,
|
|
@@ -58,125 +97,134 @@ var p = ({ type: n, value: r, onValueChange: i, showPasswordGen: s, setShowPassw
|
|
|
58
97
|
})]
|
|
59
98
|
});
|
|
60
99
|
}
|
|
61
|
-
return n === "STRUCTURED_DATA" ? /* @__PURE__ */
|
|
100
|
+
return n === "STRUCTURED_DATA" ? /* @__PURE__ */ d("div", {
|
|
62
101
|
className: "space-y-3",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ u("label", {
|
|
64
103
|
htmlFor: "secret-value-json",
|
|
65
104
|
className: "text-sm font-medium text-text-primary",
|
|
66
|
-
children:
|
|
67
|
-
}), /* @__PURE__ */
|
|
105
|
+
children: l("security.secretForm.structuredData", "Structured Data (JSON format)")
|
|
106
|
+
}), /* @__PURE__ */ u("textarea", {
|
|
68
107
|
id: "secret-value-json",
|
|
69
|
-
"aria-label":
|
|
108
|
+
"aria-label": l("security.secretForm.structuredData", "Structured Data JSON"),
|
|
70
109
|
value: r,
|
|
71
110
|
onChange: (e) => i(e.target.value),
|
|
72
111
|
placeholder: "{\n \"key\": \"value\",\n \"connection\": \"...\"\n}",
|
|
73
112
|
rows: 5,
|
|
74
113
|
className: e("flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "resize-y")
|
|
75
114
|
})]
|
|
76
|
-
}) : /* @__PURE__ */
|
|
115
|
+
}) : /* @__PURE__ */ d("div", {
|
|
77
116
|
className: "space-y-1.5",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ u("label", {
|
|
79
118
|
htmlFor: "secret-value-text",
|
|
80
119
|
className: "text-sm font-medium text-text-primary",
|
|
81
|
-
children:
|
|
82
|
-
}), /* @__PURE__ */
|
|
120
|
+
children: l("security.secretForm.value", "Value")
|
|
121
|
+
}), /* @__PURE__ */ u("textarea", {
|
|
83
122
|
id: "secret-value-text",
|
|
84
|
-
"aria-label":
|
|
123
|
+
"aria-label": l("security.secretForm.value", "Value"),
|
|
85
124
|
value: r,
|
|
86
125
|
onChange: (e) => i(e.target.value),
|
|
87
|
-
placeholder:
|
|
126
|
+
placeholder: l("security.secretForm.valuePlaceholder", "Enter secret value"),
|
|
88
127
|
rows: 3,
|
|
89
128
|
className: e("flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "resize-y")
|
|
90
129
|
})]
|
|
91
130
|
});
|
|
92
|
-
},
|
|
93
|
-
let
|
|
131
|
+
}, v = ({ type: a, onTypeChange: c, name: h, onNameChange: v, value: y, onValueChange: b, description: x, onDescriptionChange: S, labels: C, onLabelsChange: w, className: T }) => {
|
|
132
|
+
let E = o(), D = s(), [O, k] = l(""), [A, j] = l(!1), M = i.map((e) => ({
|
|
94
133
|
value: e.value,
|
|
95
|
-
label:
|
|
96
|
-
})),
|
|
97
|
-
let e =
|
|
98
|
-
e && !
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
134
|
+
label: E(`security.${e.translationKey}`, e.label)
|
|
135
|
+
})), N = () => {
|
|
136
|
+
let e = O.trim();
|
|
137
|
+
e && !C.includes(e) && (w([...C, e]), k(""));
|
|
138
|
+
}, P = (e) => {
|
|
139
|
+
w(C.filter((t) => t !== e));
|
|
140
|
+
}, F = D ? /* @__PURE__ */ u(g, {
|
|
141
|
+
type: a,
|
|
142
|
+
onTypeChange: c,
|
|
143
|
+
options: M
|
|
144
|
+
}) : /* @__PURE__ */ u(r, {
|
|
145
|
+
label: E("security.secretForm.type", "Secret Type"),
|
|
146
|
+
value: a,
|
|
147
|
+
onChange: (e) => c(e),
|
|
148
|
+
options: M
|
|
149
|
+
}), I = /* @__PURE__ */ u(n, {
|
|
150
|
+
id: "secret-name",
|
|
151
|
+
label: E("security.secretForm.name", "Name"),
|
|
152
|
+
value: h,
|
|
153
|
+
onChange: (e) => v(e.target.value),
|
|
154
|
+
placeholder: E("security.secretForm.namePlaceholder", "e.g., production-database-password"),
|
|
155
|
+
required: !0
|
|
156
|
+
}), L = /* @__PURE__ */ u(n, {
|
|
157
|
+
id: "secret-description",
|
|
158
|
+
label: E("security.secretForm.description", "Description (optional)"),
|
|
159
|
+
value: x,
|
|
160
|
+
onChange: (e) => S(e.target.value),
|
|
161
|
+
placeholder: E("security.secretForm.descriptionPlaceholder", "Brief description of this secret")
|
|
162
|
+
}), R = /* @__PURE__ */ u(_, {
|
|
163
|
+
type: a,
|
|
164
|
+
value: y,
|
|
165
|
+
onValueChange: b,
|
|
166
|
+
showPasswordGen: A,
|
|
167
|
+
setShowPasswordGen: j
|
|
168
|
+
});
|
|
169
|
+
return /* @__PURE__ */ d("div", {
|
|
170
|
+
className: e("space-y-4", T),
|
|
104
171
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"aria-label": w("security.secretForm.addLabel", "Add label"),
|
|
149
|
-
value: T,
|
|
150
|
-
onChange: (e) => E(e.target.value),
|
|
151
|
-
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), A()),
|
|
152
|
-
placeholder: w("security.secretForm.addLabelPlaceholder", "Add label"),
|
|
153
|
-
className: e("flex h-8 flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]")
|
|
154
|
-
}), /* @__PURE__ */ c(t, {
|
|
155
|
-
variant: "outline",
|
|
156
|
-
size: "sm",
|
|
172
|
+
F,
|
|
173
|
+
I,
|
|
174
|
+
D ? R : L,
|
|
175
|
+
D ? L : R,
|
|
176
|
+
((e) => D ? /* @__PURE__ */ u(m, {
|
|
177
|
+
storageKey: "security.secretCreate.moreOptions",
|
|
178
|
+
description: E("security.secretForm.labelsDescription", "Custom labels for filtering and grouping secrets."),
|
|
179
|
+
children: e
|
|
180
|
+
}) : /* @__PURE__ */ u(m, {
|
|
181
|
+
title: E("security.secretForm.advancedMetadata", "Advanced metadata"),
|
|
182
|
+
description: E("security.secretForm.labelsDescription", "Custom labels for filtering and grouping secrets."),
|
|
183
|
+
children: e
|
|
184
|
+
}))(/* @__PURE__ */ d("div", {
|
|
185
|
+
className: "space-y-2",
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ u("label", {
|
|
188
|
+
htmlFor: "secret-new-label",
|
|
189
|
+
className: "text-sm font-medium text-text-primary",
|
|
190
|
+
children: E("security.secretForm.labels", "Labels")
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ d("div", {
|
|
193
|
+
className: "flex items-center gap-2",
|
|
194
|
+
children: [/* @__PURE__ */ u("input", {
|
|
195
|
+
id: "secret-new-label",
|
|
196
|
+
"aria-label": E("security.secretForm.addLabel", "Add label"),
|
|
197
|
+
value: O,
|
|
198
|
+
onChange: (e) => k(e.target.value),
|
|
199
|
+
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), N()),
|
|
200
|
+
placeholder: E("security.secretForm.addLabelPlaceholder", "Add label"),
|
|
201
|
+
className: e("flex h-8 flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]")
|
|
202
|
+
}), /* @__PURE__ */ u(t, {
|
|
203
|
+
variant: "outline",
|
|
204
|
+
size: "sm",
|
|
205
|
+
type: "button",
|
|
206
|
+
onClick: N,
|
|
207
|
+
children: /* @__PURE__ */ u(p, { className: "size-3" })
|
|
208
|
+
})]
|
|
209
|
+
}),
|
|
210
|
+
C.length > 0 && /* @__PURE__ */ u("div", {
|
|
211
|
+
className: "flex flex-wrap gap-1.5",
|
|
212
|
+
children: C.map((e) => /* @__PURE__ */ d("span", {
|
|
213
|
+
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-bg-sunken border border-border-subtle",
|
|
214
|
+
children: [e, /* @__PURE__ */ u("button", {
|
|
157
215
|
type: "button",
|
|
158
|
-
onClick:
|
|
159
|
-
|
|
216
|
+
onClick: () => P(e),
|
|
217
|
+
"aria-label": E("security.secretForm.removeLabel", "Remove label {{label}}", { label: e }),
|
|
218
|
+
className: "p-0.5 rounded-full hover:bg-status-error-bg/10 hover:text-status-error-text",
|
|
219
|
+
children: /* @__PURE__ */ u(f, { className: "size-2.5" })
|
|
160
220
|
})]
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-bg-sunken border border-border-subtle",
|
|
166
|
-
children: [e, /* @__PURE__ */ c("button", {
|
|
167
|
-
type: "button",
|
|
168
|
-
onClick: () => j(e),
|
|
169
|
-
className: "p-0.5 rounded-full hover:bg-status-error-bg/10 hover:text-status-error-text",
|
|
170
|
-
children: /* @__PURE__ */ c(u, { className: "size-2.5" })
|
|
171
|
-
})]
|
|
172
|
-
}, e))
|
|
173
|
-
})
|
|
174
|
-
]
|
|
175
|
-
})
|
|
176
|
-
})
|
|
221
|
+
}, e))
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
}))
|
|
177
225
|
]
|
|
178
226
|
});
|
|
179
227
|
};
|
|
180
|
-
export {
|
|
228
|
+
export { v as SecretFormFields };
|
|
181
229
|
|
|
182
230
|
//# sourceMappingURL=SecretFormFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecretFormFields.js","names":["SecretValueField","tr","useTr","type","onValueChange","cn","Button","setShowPasswordGen","showPasswordGen","PasswordGenerator","pw","isCertificate","label","SecretFormFields","newLabel","setNewLabel","useState","typeOptions","SECRET_TYPES","t","addLabel","trimmed","labels","onLabelsChange","removeLabel","l","className","Select","onTypeChange","v","Input","name","onNameChange","description","onDescriptionChange","OptionalFields","Plus","Minus"],"sources":["../../../src/security/components/SecretFormFields.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport { Plus, Minus } from 'lucide-react';\nimport { OptionalFields } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { Input, Select, Button } from './ui';\nimport { SECRET_TYPES } from '../constants/secretTypes';\nimport { PasswordGenerator } from './PasswordGenerator';\nimport { useTr } from '../hooks/useTr';\nimport type { SecretType } from '../types';\n\ninterface SecretValueFieldProps {\n type: SecretType;\n value: string;\n onValueChange: (value: string) => void;\n showPasswordGen: boolean;\n setShowPasswordGen: (show: boolean) => void;\n}\n\nconst SecretValueField: FC<SecretValueFieldProps> = ({\n type,\n value,\n onValueChange,\n showPasswordGen,\n setShowPasswordGen,\n}) => {\n const tr = useTr();\n\n if (type === 'CREDENTIAL') {\n return (\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-value-password\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.password', 'Password')}\n </label>\n <input\n id=\"secret-value-password\"\n aria-label={tr('security.secretForm.password', 'Password')}\n type=\"password\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={tr('security.secretForm.passwordPlaceholder', 'Enter password')}\n className={cn(\n 'flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]'\n )}\n />\n <Button\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n onClick={() => setShowPasswordGen(!showPasswordGen)}\n >\n {showPasswordGen\n ? tr('security.secretForm.hideGenerator', 'Hide Generator')\n : tr('security.secretForm.generatePassword', 'Generate Password')}\n </Button>\n {showPasswordGen && (\n <PasswordGenerator\n onAccept={(pw) => {\n onValueChange(pw);\n setShowPasswordGen(false);\n }}\n />\n )}\n </div>\n );\n }\n\n if (type === 'CERTIFICATE' || type === 'PRIVATE_KEY') {\n const isCertificate = type === 'CERTIFICATE';\n const label = isCertificate\n ? tr('security.secretForm.certificatePem', 'Certificate (PEM)')\n : tr('security.secretForm.privateKey', 'Private Key');\n return (\n <div className=\"space-y-1.5\">\n <label htmlFor=\"secret-value-pem\" className=\"text-sm font-medium text-text-primary\">\n {label}\n </label>\n <textarea\n id=\"secret-value-pem\"\n aria-label={label}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={\n isCertificate\n ? '-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----'\n : '-----BEGIN OPENSSH PRIVATE KEY-----\\n...\\n-----END OPENSSH PRIVATE KEY-----'\n }\n rows={8}\n className={cn(\n 'flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'resize-y min-h-[120px]'\n )}\n />\n </div>\n );\n }\n\n if (type === 'STRUCTURED_DATA') {\n return (\n <div className=\"space-y-3\">\n <label htmlFor=\"secret-value-json\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.structuredData', 'Structured Data (JSON format)')}\n </label>\n <textarea\n id=\"secret-value-json\"\n aria-label={tr('security.secretForm.structuredData', 'Structured Data JSON')}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={'{\\n \"key\": \"value\",\\n \"connection\": \"...\"\\n}'}\n rows={5}\n className={cn(\n 'flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'resize-y'\n )}\n />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-1.5\">\n <label htmlFor=\"secret-value-text\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.value', 'Value')}\n </label>\n <textarea\n id=\"secret-value-text\"\n aria-label={tr('security.secretForm.value', 'Value')}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={tr('security.secretForm.valuePlaceholder', 'Enter secret value')}\n rows={3}\n className={cn(\n 'flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'resize-y'\n )}\n />\n </div>\n );\n};\n\ninterface SecretFormFieldsProps {\n type: SecretType;\n onTypeChange: (type: SecretType) => void;\n name: string;\n onNameChange: (name: string) => void;\n value: string;\n onValueChange: (value: string) => void;\n description: string;\n onDescriptionChange: (description: string) => void;\n labels: string[];\n onLabelsChange: (labels: string[]) => void;\n className?: string;\n}\n\n/**\n * Type-specific form fields for creating or editing secrets.\n * Renders appropriate input fields based on the selected secret type.\n */\nexport const SecretFormFields: FC<SecretFormFieldsProps> = ({\n type,\n onTypeChange,\n name,\n onNameChange,\n value,\n onValueChange,\n description,\n onDescriptionChange,\n labels,\n onLabelsChange,\n className,\n}) => {\n const tr = useTr();\n const [newLabel, setNewLabel] = useState('');\n const [showPasswordGen, setShowPasswordGen] = useState(false);\n\n const typeOptions = SECRET_TYPES.map((t) => ({\n value: t.value,\n label: tr(`security.${t.translationKey}`, t.label),\n }));\n\n const addLabel = () => {\n const trimmed = newLabel.trim();\n if (trimmed && !labels.includes(trimmed)) {\n onLabelsChange([...labels, trimmed]);\n setNewLabel('');\n }\n };\n\n const removeLabel = (label: string) => {\n onLabelsChange(labels.filter((l) => l !== label));\n };\n\n return (\n <div className={cn('space-y-4', className)}>\n {/* Secret type */}\n <Select\n label={tr('security.secretForm.type', 'Secret Type')}\n value={type}\n onChange={(v) => onTypeChange(v as SecretType)}\n options={typeOptions}\n />\n\n {/* Name */}\n <Input\n id=\"secret-name\"\n label={tr('security.secretForm.name', 'Name')}\n value={name}\n onChange={(e) => onNameChange(e.target.value)}\n placeholder={tr(\n 'security.secretForm.namePlaceholder',\n 'e.g., production-database-password'\n )}\n required\n />\n\n {/* Description */}\n <Input\n id=\"secret-description\"\n label={tr('security.secretForm.description', 'Description (optional)')}\n value={description}\n onChange={(e) => onDescriptionChange(e.target.value)}\n placeholder={tr(\n 'security.secretForm.descriptionPlaceholder',\n 'Brief description of this secret'\n )}\n />\n\n {/* Type-specific value field */}\n <SecretValueField\n type={type}\n value={value}\n onValueChange={onValueChange}\n showPasswordGen={showPasswordGen}\n setShowPasswordGen={setShowPasswordGen}\n />\n\n {/* Labels — advanced classification, hidden by default */}\n <OptionalFields\n title={tr('security.secretForm.advancedMetadata', 'Advanced metadata')}\n description={tr(\n 'security.secretForm.labelsDescription',\n 'Custom labels for filtering and grouping secrets.'\n )}\n >\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-new-label\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.labels', 'Labels')}\n </label>\n <div className=\"flex items-center gap-2\">\n <input\n id=\"secret-new-label\"\n aria-label={tr('security.secretForm.addLabel', 'Add label')}\n value={newLabel}\n onChange={(e) => setNewLabel(e.target.value)}\n onKeyDown={(e) => e.key === 'Enter' && (e.preventDefault(), addLabel())}\n placeholder={tr('security.secretForm.addLabelPlaceholder', 'Add label')}\n className={cn(\n 'flex h-8 flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]'\n )}\n />\n <Button variant=\"outline\" size=\"sm\" type=\"button\" onClick={addLabel}>\n <Plus className=\"size-3\" />\n </Button>\n </div>\n {labels.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {labels.map((label) => (\n <span\n key={label}\n className=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-bg-sunken border border-border-subtle\"\n >\n {label}\n <button\n type=\"button\"\n onClick={() => removeLabel(label)}\n className=\"p-0.5 rounded-full hover:bg-status-error-bg/10 hover:text-status-error-text\"\n >\n <Minus className=\"size-2.5\" />\n </button>\n </span>\n ))}\n </div>\n )}\n </div>\n </OptionalFields>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;AAkBA,IAAMA,KAA+C,EACnD,SACA,UACA,kBACA,oBACA,4BACI;CACJ,IAAMC,IAAKC,EAAM;CAEjB,IAAIC,MAAS,cACX,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAAC,SAAD;IAAO,SAAQ;IAAwB,WAAU;IAC9C,UAAAF,EAAG,gCAAgC,UAAU;GACzC,CAAA;GACP,kBAAC,SAAD;IACE,IAAG;IACH,cAAYA,EAAG,gCAAgC,UAAU;IACzD,MAAK;IACE;IACP,WAAW,MAAMG,EAAc,EAAE,OAAO,KAAK;IAC7C,aAAaH,EAAG,2CAA2C,gBAAgB;IAC3E,WAAWI,EACT,oGACA,8FACF;GACD,CAAA;GACD,kBAACC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,MAAK;IACL,eAAeC,EAAmB,CAACC,CAAe;IAEjD,UAAAA,IACGP,EAAG,qCAA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kBAACmC,GAAD;IACE,OAAOlC,EAAG,wCAAwC,mBAAmB;IACrE,aAAaA,EACX,yCACA,mDACF;IAEA,UAAA,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACE,kBAAC,SAAD;OAAO,SAAQ;OAAmB,WAAU;OACzC,UAAAA,EAAG,8BAA8B,QAAQ;MACrC,CAAA;MACP,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,CACE,kBAAC,SAAD;QACE,IAAG;QACH,cAAYA,EAAG,gCAAgC,WAAW;QAC1D,OAAOa;QACP,WAAW,MAAMC,EAAY,EAAE,OAAO,KAAK;QAC3C,YAAY,MAAM,EAAE,QAAQ,YAAY,EAAE,eAAe,GAAGK,EAAS;QACrE,aAAanB,EAAG,2CAA2C,WAAW;QACtE,WAAWI,EACT,0FACA,8FACF;OACD,CAAA,GACD,kBAACC,GAAD;QAAQ,SAAQ;QAAU,MAAK;QAAK,MAAK;QAAS,SAASc;QACzD,UAAA,kBAACgB,GAAD,EAAM,WAAU,SAAU,CAAA;OACpB,CAAA,CACL;;MACJd,EAAO,SAAS,KACf,kBAAC,OAAD;OAAK,WAAU;OACZ,UAAAA,EAAO,KAAK,MACX,kBAAC,QAAD;QAEE,WAAU;QAFZ,UAAA,CAIGV,GACD,kBAAC,UAAD;SACE,MAAK;SACL,eAAeY,EAAYZ,CAAK;SAChC,WAAU;SAEV,UAAA,kBAACyB,GAAD,EAAO,WAAU,WAAY,CAAA;QACvB,CAAA,CACJ;OAXC,GAAAzB,CAWD,CACP;MACE,CAAA;KAEJ;;GACS,CAAA;EACb;;AAET"}
|
|
1
|
+
{"version":3,"file":"SecretFormFields.js","names":["EVERYDAY_TYPES","SecretTypeChoice","tr","useTr","groupId","useId","option","cn","type","o","onTypeChange","everyday","options","more","OptionalFields","SecretValueField","onValueChange","Button","setShowPasswordGen","showPasswordGen","PasswordGenerator","pw","isCertificate","label","SecretFormFields","isFluidgrids","useIsFluidgridsVariant","newLabel","setNewLabel","useState","typeOptions","SECRET_TYPES","t","addLabel","trimmed","labels","onLabelsChange","removeLabel","l","typeField","Select","v","nameField","Input","name","onNameChange","descriptionField","description","onDescriptionChange","valueField","className","Plus","Minus"],"sources":["../../../src/security/components/SecretFormFields.tsx"],"sourcesContent":["import { type FC, type ReactNode, useId, useState } from 'react';\nimport { Plus, Minus } from 'lucide-react';\nimport { OptionalFields } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { Input, Select, Button } from './ui';\nimport { SECRET_TYPES } from '../constants/secretTypes';\nimport { PasswordGenerator } from './PasswordGenerator';\nimport { useTr } from '../hooks/useTr';\nimport { useIsFluidgridsVariant } from '../hooks/useSecurityVariant';\nimport type { SecretType } from '../types';\n\n/** FluidGrids' three everyday kinds (BOFF-11871); the rest sit under \"More options\". */\nconst EVERYDAY_TYPES: readonly SecretType[] = ['CREDENTIAL', 'API_KEY', 'TEXT'];\n\n/**\n * \"What kind of item is this?\" as radio cards: Password / API key or token /\n * Note first, every other type one click away. The fold stays mounted and\n * opens on its own when the current type lives in it, so a chosen\n * Certificate is never hidden behind a closed section.\n */\nconst SecretTypeChoice: FC<{\n type: SecretType;\n onTypeChange: (type: SecretType) => void;\n options: Array<{ value: SecretType; label: string }>;\n}> = ({ type, onTypeChange, options }) => {\n const tr = useTr();\n const groupId = useId();\n const option = (o: { value: SecretType; label: string }) => (\n <label\n key={o.value}\n className={cn(\n 'flex min-h-11 cursor-pointer items-center gap-3 rounded-md border px-3 py-2 text-sm transition-colors',\n type === o.value\n ? 'border-action-primary-bg bg-action-primary-bg/5 text-text-primary'\n : 'border-border-subtle text-text-primary hover:bg-bg-sunken/50'\n )}\n >\n <input\n type=\"radio\"\n name={groupId}\n value={o.value}\n checked={type === o.value}\n onChange={() => onTypeChange(o.value)}\n className=\"accent-primary\"\n />\n {o.label}\n </label>\n );\n const everyday = options.filter((o) => EVERYDAY_TYPES.includes(o.value));\n const more = options.filter((o) => !EVERYDAY_TYPES.includes(o.value));\n return (\n <fieldset className=\"space-y-2\">\n <legend className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.type', 'Secret Type')}\n </legend>\n <div className=\"grid gap-2 sm:grid-cols-3\">{everyday.map(option)}</div>\n <OptionalFields\n storageKey=\"security.secretCreate.type\"\n label={tr('security.secretForm.moreTypes', 'More kinds')}\n defaultOpen={!EVERYDAY_TYPES.includes(type)}\n >\n <div className=\"grid gap-2 sm:grid-cols-2\">{more.map(option)}</div>\n </OptionalFields>\n </fieldset>\n );\n};\n\ninterface SecretValueFieldProps {\n type: SecretType;\n value: string;\n onValueChange: (value: string) => void;\n showPasswordGen: boolean;\n setShowPasswordGen: (show: boolean) => void;\n}\n\nconst SecretValueField: FC<SecretValueFieldProps> = ({\n type,\n value,\n onValueChange,\n showPasswordGen,\n setShowPasswordGen,\n}) => {\n const tr = useTr();\n\n if (type === 'CREDENTIAL') {\n return (\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-value-password\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.password', 'Password')}\n </label>\n <input\n id=\"secret-value-password\"\n aria-label={tr('security.secretForm.password', 'Password')}\n type=\"password\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={tr('security.secretForm.passwordPlaceholder', 'Enter password')}\n className={cn(\n 'flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]'\n )}\n />\n <Button\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n onClick={() => setShowPasswordGen(!showPasswordGen)}\n >\n {showPasswordGen\n ? tr('security.secretForm.hideGenerator', 'Hide Generator')\n : tr('security.secretForm.generatePassword', 'Generate Password')}\n </Button>\n {showPasswordGen && (\n <PasswordGenerator\n onAccept={(pw) => {\n onValueChange(pw);\n setShowPasswordGen(false);\n }}\n />\n )}\n </div>\n );\n }\n\n if (type === 'CERTIFICATE' || type === 'PRIVATE_KEY') {\n const isCertificate = type === 'CERTIFICATE';\n const label = isCertificate\n ? tr('security.secretForm.certificatePem', 'Certificate (PEM)')\n : tr('security.secretForm.privateKey', 'Private Key');\n return (\n <div className=\"space-y-1.5\">\n <label htmlFor=\"secret-value-pem\" className=\"text-sm font-medium text-text-primary\">\n {label}\n </label>\n <textarea\n id=\"secret-value-pem\"\n aria-label={label}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={\n isCertificate\n ? '-----BEGIN CERTIFICATE-----\\n...\\n-----END CERTIFICATE-----'\n : '-----BEGIN OPENSSH PRIVATE KEY-----\\n...\\n-----END OPENSSH PRIVATE KEY-----'\n }\n rows={8}\n className={cn(\n 'flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'resize-y min-h-[120px]'\n )}\n />\n </div>\n );\n }\n\n if (type === 'STRUCTURED_DATA') {\n return (\n <div className=\"space-y-3\">\n <label htmlFor=\"secret-value-json\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.structuredData', 'Structured Data (JSON format)')}\n </label>\n <textarea\n id=\"secret-value-json\"\n aria-label={tr('security.secretForm.structuredData', 'Structured Data JSON')}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={'{\\n \"key\": \"value\",\\n \"connection\": \"...\"\\n}'}\n rows={5}\n className={cn(\n 'flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'resize-y'\n )}\n />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-1.5\">\n <label htmlFor=\"secret-value-text\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.value', 'Value')}\n </label>\n <textarea\n id=\"secret-value-text\"\n aria-label={tr('security.secretForm.value', 'Value')}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={tr('security.secretForm.valuePlaceholder', 'Enter secret value')}\n rows={3}\n className={cn(\n 'flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'resize-y'\n )}\n />\n </div>\n );\n};\n\ninterface SecretFormFieldsProps {\n type: SecretType;\n onTypeChange: (type: SecretType) => void;\n name: string;\n onNameChange: (name: string) => void;\n value: string;\n onValueChange: (value: string) => void;\n description: string;\n onDescriptionChange: (description: string) => void;\n labels: string[];\n onLabelsChange: (labels: string[]) => void;\n className?: string;\n}\n\n/**\n * Type-specific form fields for creating or editing secrets.\n * Renders appropriate input fields based on the selected secret type.\n */\nexport const SecretFormFields: FC<SecretFormFieldsProps> = ({\n type,\n onTypeChange,\n name,\n onNameChange,\n value,\n onValueChange,\n description,\n onDescriptionChange,\n labels,\n onLabelsChange,\n className,\n}) => {\n const tr = useTr();\n const isFluidgrids = useIsFluidgridsVariant();\n const [newLabel, setNewLabel] = useState('');\n const [showPasswordGen, setShowPasswordGen] = useState(false);\n\n const typeOptions = SECRET_TYPES.map((t) => ({\n value: t.value,\n label: tr(`security.${t.translationKey}`, t.label),\n }));\n\n const addLabel = () => {\n const trimmed = newLabel.trim();\n if (trimmed && !labels.includes(trimmed)) {\n onLabelsChange([...labels, trimmed]);\n setNewLabel('');\n }\n };\n\n const removeLabel = (label: string) => {\n onLabelsChange(labels.filter((l) => l !== label));\n };\n\n const typeField = isFluidgrids ? (\n <SecretTypeChoice type={type} onTypeChange={onTypeChange} options={typeOptions} />\n ) : (\n <Select\n label={tr('security.secretForm.type', 'Secret Type')}\n value={type}\n onChange={(v) => onTypeChange(v as SecretType)}\n options={typeOptions}\n />\n );\n\n const nameField = (\n <Input\n id=\"secret-name\"\n label={tr('security.secretForm.name', 'Name')}\n value={name}\n onChange={(e) => onNameChange(e.target.value)}\n placeholder={tr('security.secretForm.namePlaceholder', 'e.g., production-database-password')}\n required\n />\n );\n\n const descriptionField = (\n <Input\n id=\"secret-description\"\n label={tr('security.secretForm.description', 'Description (optional)')}\n value={description}\n onChange={(e) => onDescriptionChange(e.target.value)}\n placeholder={tr(\n 'security.secretForm.descriptionPlaceholder',\n 'Brief description of this secret'\n )}\n />\n );\n\n const valueField = (\n <SecretValueField\n type={type}\n value={value}\n onValueChange={onValueChange}\n showPasswordGen={showPasswordGen}\n setShowPasswordGen={setShowPasswordGen}\n />\n );\n\n // FluidGrids: labels sit under the shared \"More options\" fold; elsewhere\n // under the existing \"Advanced metadata\" section.\n const labelsFold = (children: ReactNode) =>\n isFluidgrids ? (\n <OptionalFields\n storageKey=\"security.secretCreate.moreOptions\"\n description={tr(\n 'security.secretForm.labelsDescription',\n 'Custom labels for filtering and grouping secrets.'\n )}\n >\n {children}\n </OptionalFields>\n ) : (\n <OptionalFields\n title={tr('security.secretForm.advancedMetadata', 'Advanced metadata')}\n description={tr(\n 'security.secretForm.labelsDescription',\n 'Custom labels for filtering and grouping secrets.'\n )}\n >\n {children}\n </OptionalFields>\n );\n\n return (\n <div className={cn('space-y-4', className)}>\n {/* FluidGrids order: type, name, value, description. Others: type, name, description, value. */}\n {typeField}\n {nameField}\n {isFluidgrids ? valueField : descriptionField}\n {isFluidgrids ? descriptionField : valueField}\n\n {/* Labels — advanced classification, hidden by default */}\n {labelsFold(\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-new-label\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.secretForm.labels', 'Labels')}\n </label>\n <div className=\"flex items-center gap-2\">\n <input\n id=\"secret-new-label\"\n aria-label={tr('security.secretForm.addLabel', 'Add label')}\n value={newLabel}\n onChange={(e) => setNewLabel(e.target.value)}\n onKeyDown={(e) => e.key === 'Enter' && (e.preventDefault(), addLabel())}\n placeholder={tr('security.secretForm.addLabelPlaceholder', 'Add label')}\n className={cn(\n 'flex h-8 flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]'\n )}\n />\n <Button variant=\"outline\" size=\"sm\" type=\"button\" onClick={addLabel}>\n <Plus className=\"size-3\" />\n </Button>\n </div>\n {labels.length > 0 && (\n <div className=\"flex flex-wrap gap-1.5\">\n {labels.map((label) => (\n <span\n key={label}\n className=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-bg-sunken border border-border-subtle\"\n >\n {label}\n <button\n type=\"button\"\n onClick={() => removeLabel(label)}\n aria-label={tr('security.secretForm.removeLabel', 'Remove label {{label}}', {\n label,\n })}\n className=\"p-0.5 rounded-full hover:bg-status-error-bg/10 hover:text-status-error-text\"\n >\n <Minus className=\"size-2.5\" />\n </button>\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAYA,IAAMA,IAAwC;CAAC;CAAc;CAAW;AAAM,GAQxEC,KAIA,EAAE,SAAM,iBAAc,iBAAc;CACxC,IAAMC,IAAKC,EAAM,GACXC,IAAUC,EAAM,GAChBC,KAAU,MACd,kBAAC,SAAD;EAEE,WAAWC,EACT,yGACAC,MAASC,EAAE,QACP,sEACA,8DACN;EAPF,UAAA,CASE,kBAAC,SAAD;GACE,MAAK;GACL,MAAML;GACN,OAAOK,EAAE;GACT,SAASD,MAASC,EAAE;GACpB,gBAAgBC,EAAaD,EAAE,KAAK;GACpC,WAAU;EACX,CAAA,GACAA,EAAE,KACE;CAjBA,GAAAA,EAAE,KAiBF,GAEHE,IAAWC,EAAQ,QAAQ,MAAMZ,EAAe,SAASS,EAAE,KAAK,CAAC,GACjEI,IAAOD,EAAQ,QAAQ,MAAM,CAACZ,EAAe,SAASS,EAAE,KAAK,CAAC;CACpE,OACE,kBAAC,YAAD;EAAU,WAAU;EAApB,UAAA;GACE,kBAAC,UAAD;IAAQ,WAAU;IACf,UAAAP,EAAG,4BAA4B,aAAa;GACvC,CAAA;GACR,kBAAC,OAAD;IAAK,WAAU;IAA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KACE,kBAAC,SAAD;MAAO,SAAQ;MAAmB,WAAU;MACzC,UAAAA,EAAG,8BAA8B,QAAQ;KACrC,CAAA;KACP,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,SAAD;OACE,IAAG;OACH,cAAYA,EAAG,gCAAgC,WAAW;OAC1D,OAAOyB;OACP,WAAW,MAAMC,EAAY,EAAE,OAAO,KAAK;OAC3C,YAAY,MAAM,EAAE,QAAQ,YAAY,EAAE,eAAe,GAAGK,EAAS;OACrE,aAAa/B,EAAG,2CAA2C,WAAW;OACtE,WAAWK,EACT,0FACA,8FACF;MACD,CAAA,GACD,kBAACU,GAAD;OAAQ,SAAQ;OAAU,MAAK;OAAK,MAAK;OAAS,SAASgB;OACzD,UAAA,kBAACkB,GAAD,EAAM,WAAU,SAAU,CAAA;MACpB,CAAA,CACL;;KACJhB,EAAO,SAAS,KACf,kBAAC,OAAD;MAAK,WAAU;MACZ,UAAAA,EAAO,KAAK,MACX,kBAAC,QAAD;OAEE,WAAU;OAFZ,UAAA,CAIGZ,GACD,kBAAC,UAAD;QACE,MAAK;QACL,eAAec,EAAYd,CAAK;QAChC,cAAYrB,EAAG,mCAAmC,0BAA0B,EAC1E,SACF,CAAC;QACD,WAAU;QAEV,UAAA,kBAACkD,GAAD,EAAO,WAAU,WAAY,CAAA;OACvB,CAAA,CACJ;MAdC,GAAA7B,CAcD,CACP;KACE,CAAA;IAEJ;GACP,CAAA,CAAA;EACG;;AAET"}
|
|
@@ -6,6 +6,8 @@ interface SecretRowProps {
|
|
|
6
6
|
onSelect?: (secretId: string) => void;
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
className?: string;
|
|
9
|
+
/** Labels and the rotation badge. Default true; FluidGrids folds them to level 2. */
|
|
10
|
+
showMeta?: boolean;
|
|
9
11
|
}
|
|
10
12
|
export declare const SecretRow: FC<SecretRowProps>;
|
|
11
13
|
export {};
|