@burdenoff/microfe-security 2026.608.1 → 2026.624.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 (67) hide show
  1. package/dist/security/components/ActivityTimeline.js +4 -4
  2. package/dist/security/components/ActivityTimeline.js.map +1 -1
  3. package/dist/security/components/BulkActionBar.js +3 -3
  4. package/dist/security/components/BulkActionBar.js.map +1 -1
  5. package/dist/security/components/ConfirmDialog.js +29 -38
  6. package/dist/security/components/ConfirmDialog.js.map +1 -1
  7. package/dist/security/components/CopyButton.js +2 -2
  8. package/dist/security/components/CopyButton.js.map +1 -1
  9. package/dist/security/components/ExportDialog.js +13 -13
  10. package/dist/security/components/ExportDialog.js.map +1 -1
  11. package/dist/security/components/ImportWizard.js +98 -105
  12. package/dist/security/components/ImportWizard.js.map +1 -1
  13. package/dist/security/components/PageLayout.js +2 -2
  14. package/dist/security/components/PageLayout.js.map +1 -1
  15. package/dist/security/components/PasswordGenerator.js +6 -6
  16. package/dist/security/components/PasswordGenerator.js.map +1 -1
  17. package/dist/security/components/SecretFormFields.js +12 -12
  18. package/dist/security/components/SecretFormFields.js.map +1 -1
  19. package/dist/security/components/SecretRow.js +4 -4
  20. package/dist/security/components/SecretRow.js.map +1 -1
  21. package/dist/security/components/SecretShareDialog.js +94 -105
  22. package/dist/security/components/SecretShareDialog.js.map +1 -1
  23. package/dist/security/components/SecretTypeBadge.js +1 -1
  24. package/dist/security/components/SecretTypeBadge.js.map +1 -1
  25. package/dist/security/components/SecretValueDisplay.js +5 -5
  26. package/dist/security/components/SecretValueDisplay.js.map +1 -1
  27. package/dist/security/components/SecurityScoreCard.js +2 -2
  28. package/dist/security/components/SecurityScoreCard.js.map +1 -1
  29. package/dist/security/components/VaultCard.js +5 -5
  30. package/dist/security/components/VaultCard.js.map +1 -1
  31. package/dist/security/components/VaultFormFields.js +6 -6
  32. package/dist/security/components/VaultFormFields.js.map +1 -1
  33. package/dist/security/components/VaultShareDialog.js +27 -41
  34. package/dist/security/components/VaultShareDialog.js.map +1 -1
  35. package/dist/security/components/ui.js +13 -13
  36. package/dist/security/components/ui.js.map +1 -1
  37. package/dist/security/pages/AccessReviewPage.js +59 -74
  38. package/dist/security/pages/AccessReviewPage.js.map +1 -1
  39. package/dist/security/pages/AuditLogPage.js +13 -13
  40. package/dist/security/pages/AuditLogPage.js.map +1 -1
  41. package/dist/security/pages/ImportExportPage.js +3 -3
  42. package/dist/security/pages/ImportExportPage.js.map +1 -1
  43. package/dist/security/pages/ProviderDetailPage.js +141 -156
  44. package/dist/security/pages/ProviderDetailPage.js.map +1 -1
  45. package/dist/security/pages/ProvidersPage.js +12 -12
  46. package/dist/security/pages/ProvidersPage.js.map +1 -1
  47. package/dist/security/pages/SecretCreatePage.js +9 -9
  48. package/dist/security/pages/SecretCreatePage.js.map +1 -1
  49. package/dist/security/pages/SecretDetailPage.js +222 -227
  50. package/dist/security/pages/SecretDetailPage.js.map +1 -1
  51. package/dist/security/pages/SecurityDashboardPage.js +14 -14
  52. package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
  53. package/dist/security/pages/SharedWithMePage.js +10 -10
  54. package/dist/security/pages/SharedWithMePage.js.map +1 -1
  55. package/dist/security/pages/VaultCreatePage.js +2 -2
  56. package/dist/security/pages/VaultCreatePage.js.map +1 -1
  57. package/dist/security/pages/VaultDetailPage.js +9 -9
  58. package/dist/security/pages/VaultDetailPage.js.map +1 -1
  59. package/dist/security/pages/VaultSettingsPage.js +28 -28
  60. package/dist/security/pages/VaultSettingsPage.js.map +1 -1
  61. package/dist/security/pages/VaultShareViewer.js +21 -21
  62. package/dist/security/pages/VaultShareViewer.js.map +1 -1
  63. package/dist/security/pages/VaultsDashboardPage.js +17 -17
  64. package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
  65. package/dist/security/routes/routeUtils.js +5 -5
  66. package/dist/security/routes/routeUtils.js.map +1 -1
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SecretShareDialog.js","names":[],"sources":["../../../src/security/components/SecretShareDialog.tsx"],"sourcesContent":["import { type FC, useMemo, useState } from 'react';\nimport {\n X,\n UserPlus,\n Link2,\n Copy,\n Check,\n Trash2,\n Loader2,\n Clock,\n Eye,\n KeyRound,\n Users,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Button, Input, Select, Badge } from './ui';\nimport {\n useSecretShares,\n useShareSecretWithAccount,\n useCreateSecretShareLink,\n useRevokeSecretShare,\n} from '../hooks/useShareQueries';\n\ninterface SecretShareDialogProps {\n isOpen: boolean;\n onClose: () => void;\n /** Vault the credential lives in. */\n vaultId: string;\n /** When set, the share targets this single credential; otherwise the whole vault. */\n secretId?: string | null;\n /** Display name of the credential or vault being shared. */\n name: string;\n className?: string;\n}\n\ntype Tab = 'people' | 'link';\n\ninterface ShareRow {\n id: string;\n kind: string;\n role: string;\n status: string;\n scope: string;\n actorId?: string | null;\n actorType?: string | null;\n label?: string | null;\n requiresPassword: boolean;\n maxViews?: number | null;\n viewCount: number;\n expiresAt?: string | null;\n createdAt: string;\n}\n\nconst ROLE_OPTIONS = [\n { value: 'VIEWER', label: 'Viewer — can view the credential' },\n { value: 'EDITOR', label: 'Editor — can view and edit' },\n];\n\nconst EXPIRY_OPTIONS = [\n { value: '', label: 'Never expires' },\n { value: '3600000', label: '1 hour' },\n { value: '86400000', label: '24 hours' },\n { value: '604800000', label: '7 days' },\n { value: '2592000000', label: '30 days' },\n];\n\nfunction expiryToIso(value: string): string | null {\n if (!value) return null;\n const ms = Number(value);\n if (!Number.isFinite(ms) || ms <= 0) return null;\n return new Date(Date.now() + ms).toISOString();\n}\n\nfunction shareUrlFor(token: string): string {\n const origin = typeof window !== 'undefined' ? window.location.origin : '';\n return `${origin}/vault/share/${token}`;\n}\n\n/**\n * Selective credential sharing dialog. \"People\" grants a specific account\n * in-app access; \"Get link\" mints a confidential signed URL an external person\n * can open without an account.\n */\nexport const SecretShareDialog: FC<SecretShareDialogProps> = ({\n isOpen,\n onClose,\n vaultId,\n secretId,\n name,\n className,\n}) => {\n const [tab, setTab] = useState<Tab>('people');\n\n // People tab state\n const [account, setAccount] = useState('');\n const [accountRole, setAccountRole] = useState('VIEWER');\n const [accountExpiry, setAccountExpiry] = useState('');\n\n // Link tab state\n const [linkExpiry, setLinkExpiry] = useState('604800000'); // default 7 days\n const [linkPassword, setLinkPassword] = useState('');\n const [linkMaxViews, setLinkMaxViews] = useState('');\n const [createdUrl, setCreatedUrl] = useState<string | null>(null);\n const [copied, setCopied] = useState(false);\n const [errorMsg, setErrorMsg] = useState<string | null>(null);\n\n const {\n data,\n loading: loadingShares,\n refetch,\n } = useSecretShares(isOpen ? vaultId : null, secretId);\n const [shareWithAccount, { loading: sharing }] = useShareSecretWithAccount();\n const [createLink, { loading: creatingLink }] = useCreateSecretShareLink();\n const [revokeShare] = useRevokeSecretShare();\n\n const shares = useMemo<ShareRow[]>(() => (data?.secretShares?.items ?? []) as ShareRow[], [data]);\n const accountShares = useMemo(() => shares.filter((s) => s.kind === 'ACCOUNT'), [shares]);\n const linkShares = useMemo(() => shares.filter((s) => s.kind === 'LINK'), [shares]);\n\n if (!isOpen) return null;\n\n const isEmail = account.includes('@');\n\n const handleShareAccount = async (e: React.FormEvent) => {\n e.preventDefault();\n setErrorMsg(null);\n const trimmed = account.trim();\n if (!trimmed) return;\n try {\n await shareWithAccount({\n variables: {\n input: {\n vaultId,\n secretId: secretId ?? null,\n accountId: isEmail ? null : trimmed,\n email: isEmail ? trimmed : null,\n role: accountRole,\n // Keep the human-entered identifier for the access list (actorId is opaque).\n label: trimmed,\n expiresAt: expiryToIso(accountExpiry),\n },\n },\n });\n setAccount('');\n setAccountExpiry('');\n await refetch();\n } catch (err) {\n setErrorMsg(err instanceof Error ? err.message : 'Failed to share');\n }\n };\n\n const handleCreateLink = async (e: React.FormEvent) => {\n e.preventDefault();\n setErrorMsg(null);\n setCreatedUrl(null);\n try {\n const maxViews = linkMaxViews.trim() ? Number(linkMaxViews.trim()) : null;\n const result = await createLink({\n variables: {\n input: {\n vaultId,\n secretId: secretId ?? null,\n role: 'VIEWER',\n expiresAt: expiryToIso(linkExpiry),\n password: linkPassword.trim() || null,\n maxViews: maxViews && maxViews > 0 ? Math.floor(maxViews) : null,\n },\n },\n });\n const token = result.data?.createSecretShareLink?.token;\n if (token) {\n setCreatedUrl(shareUrlFor(token));\n setLinkPassword('');\n setLinkMaxViews('');\n }\n await refetch();\n } catch (err) {\n setErrorMsg(err instanceof Error ? err.message : 'Failed to create link');\n }\n };\n\n const handleRevoke = async (id: string) => {\n try {\n await revokeShare({ variables: { id } });\n await refetch();\n } catch (err) {\n setErrorMsg(err instanceof Error ? err.message : 'Failed to revoke');\n }\n };\n\n const handleCopy = async () => {\n if (!createdUrl) return;\n try {\n await navigator.clipboard.writeText(createdUrl);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n } catch {\n /* clipboard unavailable — the input remains selectable */\n }\n };\n\n const scopeLabel = secretId ? 'credential' : 'vault';\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center p-4\">\n <button\n type=\"button\"\n aria-label=\"Close dialog\"\n className=\"absolute inset-0 bg-black/50 cursor-default\"\n onClick={onClose}\n />\n <div\n className={cn(\n 'relative z-10 w-full max-w-lg rounded-lg bg-card border border-border shadow-lg flex flex-col max-h-[90vh]',\n className\n )}\n >\n {/* Header */}\n <div className=\"flex items-center justify-between p-6 pb-4 border-b border-border/60\">\n <div>\n <h2 className=\"text-lg font-semibold text-foreground\">Share {scopeLabel}</h2>\n <p className=\"text-sm text-muted-foreground mt-0.5\">\n Share <span className=\"font-medium text-foreground\">{name}</span> selectively\n </p>\n </div>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded hover:bg-accent text-muted-foreground\"\n >\n <X className=\"size-4\" />\n </button>\n </div>\n\n {/* Tabs */}\n <div className=\"flex gap-1 px-6 pt-4\">\n <button\n type=\"button\"\n onClick={() => setTab('people')}\n className={cn(\n 'flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors',\n tab === 'people'\n ? 'bg-primary/10 text-primary'\n : 'text-muted-foreground hover:bg-accent'\n )}\n >\n <Users className=\"size-4\" /> People\n </button>\n <button\n type=\"button\"\n onClick={() => setTab('link')}\n className={cn(\n 'flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors',\n tab === 'link'\n ? 'bg-primary/10 text-primary'\n : 'text-muted-foreground hover:bg-accent'\n )}\n >\n <Link2 className=\"size-4\" /> Get link\n </button>\n </div>\n\n <div className=\"overflow-y-auto p-6 pt-4 space-y-5\">\n {errorMsg && (\n <div className=\"rounded-md border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text\">\n {errorMsg}\n </div>\n )}\n\n {tab === 'people' ? (\n <>\n <form onSubmit={handleShareAccount} className=\"space-y-3\">\n <Input\n id=\"share-account\"\n label=\"Account email or VibeControls account id\"\n type=\"text\"\n value={account}\n onChange={(e) => setAccount(e.target.value)}\n placeholder=\"colleague@example.com or account id\"\n required\n />\n <div className=\"grid grid-cols-2 gap-3\">\n <Select\n label=\"Access\"\n value={accountRole}\n onChange={setAccountRole}\n options={ROLE_OPTIONS}\n />\n <Select\n label=\"Expires\"\n value={accountExpiry}\n onChange={setAccountExpiry}\n options={EXPIRY_OPTIONS}\n />\n </div>\n <div className=\"flex justify-end\">\n <Button type=\"submit\" disabled={!account.trim() || sharing}>\n {sharing ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <UserPlus className=\"size-4\" />\n )}\n Share\n </Button>\n </div>\n </form>\n\n <div className=\"space-y-2\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n People with access\n </h3>\n {loadingShares ? (\n <div className=\"flex justify-center py-4\">\n <Loader2 className=\"size-5 animate-spin text-muted-foreground\" />\n </div>\n ) : accountShares.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-2\">Not shared with anyone yet.</p>\n ) : (\n <ul className=\"space-y-2\">\n {accountShares.map((s) => (\n <li\n key={s.id}\n className=\"flex items-center justify-between gap-2 rounded-md border border-border/60 px-3 py-2\"\n >\n <div className=\"min-w-0\">\n <p className=\"text-sm text-foreground truncate\">{s.label || s.actorId}</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Badge variant=\"outline\">{s.role}</Badge>\n {s.expiresAt && (\n <span className=\"text-xs text-muted-foreground inline-flex items-center gap-1\">\n <Clock className=\"size-3\" />\n {new Date(s.expiresAt).toLocaleDateString()}\n </span>\n )}\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => void handleRevoke(s.id)}\n className=\"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive\"\n aria-label=\"Revoke access\"\n >\n <Trash2 className=\"size-4\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n </>\n ) : (\n <>\n {!secretId && (\n <div className=\"rounded-md border border-status-warning-border bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text\">\n Anyone with this link can view <strong>all current and future</strong> credentials\n in this vault until it expires or you revoke it.\n </div>\n )}\n <form onSubmit={handleCreateLink} className=\"space-y-3\">\n <div className=\"grid grid-cols-2 gap-3\">\n <Select\n label=\"Expires\"\n value={linkExpiry}\n onChange={setLinkExpiry}\n options={EXPIRY_OPTIONS}\n />\n <Input\n id=\"link-max-views\"\n label=\"Max views (optional)\"\n type=\"number\"\n min={1}\n value={linkMaxViews}\n onChange={(e) => setLinkMaxViews(e.target.value)}\n placeholder=\"Unlimited\"\n />\n </div>\n <Input\n id=\"link-password\"\n label=\"Password (optional)\"\n type=\"password\"\n value={linkPassword}\n onChange={(e) => setLinkPassword(e.target.value)}\n placeholder=\"Extra protection for the link\"\n />\n <div className=\"flex justify-end\">\n <Button type=\"submit\" disabled={creatingLink}>\n {creatingLink ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <Link2 className=\"size-4\" />\n )}\n Create link\n </Button>\n </div>\n </form>\n\n {createdUrl && (\n <div className=\"rounded-md border border-status-success-border bg-status-success-bg-subtle p-3 space-y-2\">\n <p className=\"text-xs font-medium text-status-success-text\">\n Link created — copy it now, it won&apos;t be shown again.\n </p>\n <div className=\"flex items-center gap-2\">\n <input\n readOnly\n value={createdUrl}\n onFocus={(e) => e.currentTarget.select()}\n className=\"flex h-9 w-full rounded-md border border-border bg-background px-3 text-sm font-mono\"\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void handleCopy()}\n >\n {copied ? <Check className=\"size-4\" /> : <Copy className=\"size-4\" />}\n </Button>\n </div>\n </div>\n )}\n\n <div className=\"space-y-2\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n Active links\n </h3>\n {loadingShares ? (\n <div className=\"flex justify-center py-4\">\n <Loader2 className=\"size-5 animate-spin text-muted-foreground\" />\n </div>\n ) : linkShares.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-2\">No active links.</p>\n ) : (\n <ul className=\"space-y-2\">\n {linkShares.map((s) => (\n <li\n key={s.id}\n className=\"flex items-center justify-between gap-2 rounded-md border border-border/60 px-3 py-2\"\n >\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <Badge variant={s.status === 'ACTIVE' ? 'success' : 'destructive'}>\n {s.status === 'ACTIVE' ? 'Active' : 'Revoked'}\n </Badge>\n {s.requiresPassword && (\n <span className=\"text-xs text-muted-foreground inline-flex items-center gap-1\">\n <KeyRound className=\"size-3\" /> Password\n </span>\n )}\n <span className=\"text-xs text-muted-foreground inline-flex items-center gap-1\">\n <Eye className=\"size-3\" />\n {s.viewCount}\n {s.maxViews ? `/${s.maxViews}` : ''} views\n </span>\n {s.expiresAt && (\n <span className=\"text-xs text-muted-foreground inline-flex items-center gap-1\">\n <Clock className=\"size-3\" />\n {new Date(s.expiresAt).toLocaleDateString()}\n </span>\n )}\n </div>\n <p className=\"text-xs text-muted-foreground mt-0.5\">\n Created {new Date(s.createdAt).toLocaleString()}\n </p>\n </div>\n {s.status === 'ACTIVE' && (\n <button\n type=\"button\"\n onClick={() => void handleRevoke(s.id)}\n className=\"p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive\"\n aria-label=\"Revoke link\"\n >\n <Trash2 className=\"size-4\" />\n </button>\n )}\n </li>\n ))}\n </ul>\n )}\n </div>\n </>\n )}\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAqDA,IAAM,KAAe,CACnB;CAAE,OAAO;CAAU,OAAO;CAAoC,EAC9D;CAAE,OAAO;CAAU,OAAO;CAA8B,CACzD,EAEK,IAAiB;CACrB;EAAE,OAAO;EAAI,OAAO;EAAiB;CACrC;EAAE,OAAO;EAAW,OAAO;EAAU;CACrC;EAAE,OAAO;EAAY,OAAO;EAAY;CACxC;EAAE,OAAO;EAAa,OAAO;EAAU;CACvC;EAAE,OAAO;EAAc,OAAO;EAAW;CAC1C;AAED,SAAS,EAAY,GAA8B;AACjD,KAAI,CAAC,EAAO,QAAO;CACnB,IAAM,IAAK,OAAO,EAAM;AAExB,QADI,CAAC,OAAO,SAAS,EAAG,IAAI,KAAM,IAAU,OACrC,IAAI,KAAK,KAAK,KAAK,GAAG,EAAG,CAAC,aAAa;;AAGhD,SAAS,EAAY,GAAuB;AAE1C,QAAO,GADQ,OAAO,SAAW,MAAc,OAAO,SAAS,SAAS,GACvD,eAAe;;AAQlC,IAAa,KAAiD,EAC5D,WACA,YACA,YACA,aACA,UACA,oBACI;CACJ,IAAM,CAAC,GAAK,KAAU,EAAc,SAAS,EAGvC,CAAC,GAAS,KAAc,EAAS,GAAG,EACpC,CAAC,GAAa,MAAkB,EAAS,SAAS,EAClD,CAAC,GAAe,KAAoB,EAAS,GAAG,EAGhD,CAAC,GAAY,MAAiB,EAAS,YAAY,EACnD,CAAC,GAAc,KAAmB,EAAS,GAAG,EAC9C,CAAC,GAAc,KAAmB,EAAS,GAAG,EAC9C,CAAC,GAAY,KAAiB,EAAwB,KAAK,EAC3D,C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AAhB,CACE,kBAAC,IAAD,EAAU,WAAU,UAAW,CAAA,EAAA,YAC1B;;YAET,kBAAC,QAAD;aAAM,WAAU;uBAAhB;cACE,kBAAC,GAAD,EAAK,WAAU,UAAW,CAAA;cACzB,EAAE;cACF,EAAE,WAAW,IAAI,EAAE,aAAa;cAAG;cAC/B;;YACN,EAAE,aACD,kBAAC,QAAD;aAAM,WAAU;uBAAhB,CACE,kBAAC,GAAD,EAAO,WAAU,UAAW,CAAA,EAC3B,IAAI,KAAK,EAAE,UAAU,CAAC,oBAAoB,CACtC;;YAEL;cACN,kBAAC,KAAD;WAAG,WAAU;qBAAb,CAAoD,YACzC,IAAI,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAC7C;aACA;aACL,EAAE,WAAW,YACZ,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,KAAK,EAAa,EAAE,GAAG;UACtC,WAAU;UACV,cAAW;oBAEX,kBAAC,GAAD,EAAQ,WAAU,UAAW,CAAA;UACtB,CAAA,CAER;WAvCE,EAAE,GAuCJ,CACL;QACC,CAAA,CAEH;;MACL,EAAA,CAAA,CAED;;IACF;KACF"}
1
+ {"version":3,"file":"SecretShareDialog.js","names":[],"sources":["../../../src/security/components/SecretShareDialog.tsx"],"sourcesContent":["import { type FC, useMemo, useState } from 'react';\nimport {\n UserPlus,\n Link2,\n Copy,\n Check,\n Trash2,\n Loader2,\n Clock,\n Eye,\n KeyRound,\n Users,\n} from 'lucide-react';\nimport { Dialog, DialogContent, DialogHeader, DialogTitle } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { Button, Input, Select, Badge } from './ui';\nimport {\n useSecretShares,\n useShareSecretWithAccount,\n useCreateSecretShareLink,\n useRevokeSecretShare,\n} from '../hooks/useShareQueries';\n\ninterface SecretShareDialogProps {\n isOpen: boolean;\n onClose: () => void;\n /** Vault the credential lives in. */\n vaultId: string;\n /** When set, the share targets this single credential; otherwise the whole vault. */\n secretId?: string | null;\n /** Display name of the credential or vault being shared. */\n name: string;\n className?: string;\n}\n\ntype Tab = 'people' | 'link';\n\ninterface ShareRow {\n id: string;\n kind: string;\n role: string;\n status: string;\n scope: string;\n actorId?: string | null;\n actorType?: string | null;\n label?: string | null;\n requiresPassword: boolean;\n maxViews?: number | null;\n viewCount: number;\n expiresAt?: string | null;\n createdAt: string;\n}\n\nconst ROLE_OPTIONS = [\n { value: 'VIEWER', label: 'Viewer — can view the credential' },\n { value: 'EDITOR', label: 'Editor — can view and edit' },\n];\n\nconst EXPIRY_OPTIONS = [\n { value: '', label: 'Never expires' },\n { value: '3600000', label: '1 hour' },\n { value: '86400000', label: '24 hours' },\n { value: '604800000', label: '7 days' },\n { value: '2592000000', label: '30 days' },\n];\n\nfunction expiryToIso(value: string): string | null {\n if (!value) return null;\n const ms = Number(value);\n if (!Number.isFinite(ms) || ms <= 0) return null;\n return new Date(Date.now() + ms).toISOString();\n}\n\nfunction shareUrlFor(token: string): string {\n const origin = typeof window !== 'undefined' ? window.location.origin : '';\n return `${origin}/vault/share/${token}`;\n}\n\n/**\n * Selective credential sharing dialog. \"People\" grants a specific account\n * in-app access; \"Get link\" mints a confidential signed URL an external person\n * can open without an account.\n */\nexport const SecretShareDialog: FC<SecretShareDialogProps> = ({\n isOpen,\n onClose,\n vaultId,\n secretId,\n name,\n className,\n}) => {\n const [tab, setTab] = useState<Tab>('people');\n\n // People tab state\n const [account, setAccount] = useState('');\n const [accountRole, setAccountRole] = useState('VIEWER');\n const [accountExpiry, setAccountExpiry] = useState('');\n\n // Link tab state\n const [linkExpiry, setLinkExpiry] = useState('604800000'); // default 7 days\n const [linkPassword, setLinkPassword] = useState('');\n const [linkMaxViews, setLinkMaxViews] = useState('');\n const [createdUrl, setCreatedUrl] = useState<string | null>(null);\n const [copied, setCopied] = useState(false);\n const [errorMsg, setErrorMsg] = useState<string | null>(null);\n\n const {\n data,\n loading: loadingShares,\n refetch,\n } = useSecretShares(isOpen ? vaultId : null, secretId);\n const [shareWithAccount, { loading: sharing }] = useShareSecretWithAccount();\n const [createLink, { loading: creatingLink }] = useCreateSecretShareLink();\n const [revokeShare] = useRevokeSecretShare();\n\n const shares = useMemo<ShareRow[]>(() => (data?.secretShares?.items ?? []) as ShareRow[], [data]);\n const accountShares = useMemo(() => shares.filter((s) => s.kind === 'ACCOUNT'), [shares]);\n const linkShares = useMemo(() => shares.filter((s) => s.kind === 'LINK'), [shares]);\n\n const isEmail = account.includes('@');\n\n const handleShareAccount = async (e: React.FormEvent) => {\n e.preventDefault();\n setErrorMsg(null);\n const trimmed = account.trim();\n if (!trimmed) return;\n try {\n await shareWithAccount({\n variables: {\n input: {\n vaultId,\n secretId: secretId ?? null,\n accountId: isEmail ? null : trimmed,\n email: isEmail ? trimmed : null,\n role: accountRole,\n // Keep the human-entered identifier for the access list (actorId is opaque).\n label: trimmed,\n expiresAt: expiryToIso(accountExpiry),\n },\n },\n });\n setAccount('');\n setAccountExpiry('');\n await refetch();\n } catch (err) {\n setErrorMsg(err instanceof Error ? err.message : 'Failed to share');\n }\n };\n\n const handleCreateLink = async (e: React.FormEvent) => {\n e.preventDefault();\n setErrorMsg(null);\n setCreatedUrl(null);\n try {\n const maxViews = linkMaxViews.trim() ? Number(linkMaxViews.trim()) : null;\n const result = await createLink({\n variables: {\n input: {\n vaultId,\n secretId: secretId ?? null,\n role: 'VIEWER',\n expiresAt: expiryToIso(linkExpiry),\n password: linkPassword.trim() || null,\n maxViews: maxViews && maxViews > 0 ? Math.floor(maxViews) : null,\n },\n },\n });\n const token = result.data?.createSecretShareLink?.token;\n if (token) {\n setCreatedUrl(shareUrlFor(token));\n setLinkPassword('');\n setLinkMaxViews('');\n }\n await refetch();\n } catch (err) {\n setErrorMsg(err instanceof Error ? err.message : 'Failed to create link');\n }\n };\n\n const handleRevoke = async (id: string) => {\n try {\n await revokeShare({ variables: { id } });\n await refetch();\n } catch (err) {\n setErrorMsg(err instanceof Error ? err.message : 'Failed to revoke');\n }\n };\n\n const handleCopy = async () => {\n if (!createdUrl) return;\n try {\n await navigator.clipboard.writeText(createdUrl);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n } catch {\n /* clipboard unavailable — the input remains selectable */\n }\n };\n\n const scopeLabel = secretId ? 'credential' : 'vault';\n\n return (\n <Dialog\n open={isOpen}\n onOpenChange={(open) => {\n if (!open) onClose();\n }}\n >\n <DialogContent className={cn('max-w-lg flex flex-col max-h-[90vh] gap-0 p-0', className)}>\n {/* Header */}\n <DialogHeader className=\"p-6 pb-4 border-b border-border-subtle/60 text-left\">\n <DialogTitle>Share {scopeLabel}</DialogTitle>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n Share <span className=\"font-medium text-text-primary\">{name}</span> selectively\n </p>\n </DialogHeader>\n\n {/* Tabs */}\n <div className=\"flex gap-1 px-6 pt-4\">\n <button\n type=\"button\"\n onClick={() => setTab('people')}\n className={cn(\n 'flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors',\n tab === 'people'\n ? 'bg-action-primary-bg/10 text-primary'\n : 'text-text-secondary hover:bg-accent'\n )}\n >\n <Users className=\"size-4\" /> People\n </button>\n <button\n type=\"button\"\n onClick={() => setTab('link')}\n className={cn(\n 'flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors',\n tab === 'link'\n ? 'bg-action-primary-bg/10 text-primary'\n : 'text-text-secondary hover:bg-accent'\n )}\n >\n <Link2 className=\"size-4\" /> Get link\n </button>\n </div>\n\n <div className=\"overflow-y-auto p-6 pt-4 space-y-5\">\n {errorMsg && (\n <div className=\"rounded-md border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text\">\n {errorMsg}\n </div>\n )}\n\n {tab === 'people' ? (\n <>\n <form onSubmit={handleShareAccount} className=\"space-y-3\">\n <Input\n id=\"share-account\"\n label=\"Account email or VibeControls account id\"\n type=\"text\"\n value={account}\n onChange={(e) => setAccount(e.target.value)}\n placeholder=\"colleague@example.com or account id\"\n required\n />\n <div className=\"grid grid-cols-2 gap-3\">\n <Select\n label=\"Access\"\n value={accountRole}\n onChange={setAccountRole}\n options={ROLE_OPTIONS}\n />\n <Select\n label=\"Expires\"\n value={accountExpiry}\n onChange={setAccountExpiry}\n options={EXPIRY_OPTIONS}\n />\n </div>\n <div className=\"flex justify-end\">\n <Button type=\"submit\" disabled={!account.trim() || sharing}>\n {sharing ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <UserPlus className=\"size-4\" />\n )}\n Share\n </Button>\n </div>\n </form>\n\n <div className=\"space-y-2\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n People with access\n </h3>\n {loadingShares ? (\n <div className=\"flex justify-center py-4\">\n <Loader2 className=\"size-5 animate-spin text-text-secondary\" />\n </div>\n ) : accountShares.length === 0 ? (\n <p className=\"text-sm text-text-secondary py-2\">Not shared with anyone yet.</p>\n ) : (\n <ul className=\"space-y-2\">\n {accountShares.map((s) => (\n <li\n key={s.id}\n className=\"flex items-center justify-between gap-2 rounded-md border border-border-subtle/60 px-3 py-2\"\n >\n <div className=\"min-w-0\">\n <p className=\"text-sm text-text-primary truncate\">{s.label || s.actorId}</p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Badge variant=\"outline\">{s.role}</Badge>\n {s.expiresAt && (\n <span className=\"text-xs text-text-secondary inline-flex items-center gap-1\">\n <Clock className=\"size-3\" />\n {new Date(s.expiresAt).toLocaleDateString()}\n </span>\n )}\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => void handleRevoke(s.id)}\n className=\"p-1.5 rounded hover:bg-status-error-bg/10 text-text-secondary hover:text-status-error-text\"\n aria-label=\"Revoke access\"\n >\n <Trash2 className=\"size-4\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n </>\n ) : (\n <>\n {!secretId && (\n <div className=\"rounded-md border border-status-warning-border bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text\">\n Anyone with this link can view <strong>all current and future</strong> credentials\n in this vault until it expires or you revoke it.\n </div>\n )}\n <form onSubmit={handleCreateLink} className=\"space-y-3\">\n <div className=\"grid grid-cols-2 gap-3\">\n <Select\n label=\"Expires\"\n value={linkExpiry}\n onChange={setLinkExpiry}\n options={EXPIRY_OPTIONS}\n />\n <Input\n id=\"link-max-views\"\n label=\"Max views (optional)\"\n type=\"number\"\n min={1}\n value={linkMaxViews}\n onChange={(e) => setLinkMaxViews(e.target.value)}\n placeholder=\"Unlimited\"\n />\n </div>\n <Input\n id=\"link-password\"\n label=\"Password (optional)\"\n type=\"password\"\n value={linkPassword}\n onChange={(e) => setLinkPassword(e.target.value)}\n placeholder=\"Extra protection for the link\"\n />\n <div className=\"flex justify-end\">\n <Button type=\"submit\" disabled={creatingLink}>\n {creatingLink ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <Link2 className=\"size-4\" />\n )}\n Create link\n </Button>\n </div>\n </form>\n\n {createdUrl && (\n <div className=\"rounded-md border border-status-success-border bg-status-success-bg-subtle p-3 space-y-2\">\n <p className=\"text-xs font-medium text-status-success-text\">\n Link created — copy it now, it won&apos;t be shown again.\n </p>\n <div className=\"flex items-center gap-2\">\n <input\n readOnly\n value={createdUrl}\n onFocus={(e) => e.currentTarget.select()}\n className=\"flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm font-mono\"\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void handleCopy()}\n >\n {copied ? <Check className=\"size-4\" /> : <Copy className=\"size-4\" />}\n </Button>\n </div>\n </div>\n )}\n\n <div className=\"space-y-2\">\n <h3 className=\"text-xs font-semibold uppercase tracking-wide text-text-secondary\">\n Active links\n </h3>\n {loadingShares ? (\n <div className=\"flex justify-center py-4\">\n <Loader2 className=\"size-5 animate-spin text-text-secondary\" />\n </div>\n ) : linkShares.length === 0 ? (\n <p className=\"text-sm text-text-secondary py-2\">No active links.</p>\n ) : (\n <ul className=\"space-y-2\">\n {linkShares.map((s) => (\n <li\n key={s.id}\n className=\"flex items-center justify-between gap-2 rounded-md border border-border-subtle/60 px-3 py-2\"\n >\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <Badge variant={s.status === 'ACTIVE' ? 'success' : 'destructive'}>\n {s.status === 'ACTIVE' ? 'Active' : 'Revoked'}\n </Badge>\n {s.requiresPassword && (\n <span className=\"text-xs text-text-secondary inline-flex items-center gap-1\">\n <KeyRound className=\"size-3\" /> Password\n </span>\n )}\n <span className=\"text-xs text-text-secondary inline-flex items-center gap-1\">\n <Eye className=\"size-3\" />\n {s.viewCount}\n {s.maxViews ? `/${s.maxViews}` : ''} views\n </span>\n {s.expiresAt && (\n <span className=\"text-xs text-text-secondary inline-flex items-center gap-1\">\n <Clock className=\"size-3\" />\n {new Date(s.expiresAt).toLocaleDateString()}\n </span>\n )}\n </div>\n <p className=\"text-xs text-text-secondary mt-0.5\">\n Created {new Date(s.createdAt).toLocaleString()}\n </p>\n </div>\n {s.status === 'ACTIVE' && (\n <button\n type=\"button\"\n onClick={() => void handleRevoke(s.id)}\n className=\"p-1.5 rounded hover:bg-status-error-bg/10 text-text-secondary hover:text-status-error-text\"\n aria-label=\"Revoke link\"\n >\n <Trash2 className=\"size-4\" />\n </button>\n )}\n </li>\n ))}\n </ul>\n )}\n </div>\n </>\n )}\n </div>\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":";;;;;;;;AAqDA,IAAM,IAAe,CACnB;CAAE,OAAO;CAAU,OAAO;CAAoC,EAC9D;CAAE,OAAO;CAAU,OAAO;CAA8B,CACzD,EAEK,IAAiB;CACrB;EAAE,OAAO;EAAI,OAAO;EAAiB;CACrC;EAAE,OAAO;EAAW,OAAO;EAAU;CACrC;EAAE,OAAO;EAAY,OAAO;EAAY;CACxC;EAAE,OAAO;EAAa,OAAO;EAAU;CACvC;EAAE,OAAO;EAAc,OAAO;EAAW;CAC1C;AAED,SAAS,EAAY,GAA8B;AACjD,KAAI,CAAC,EAAO,QAAO;CACnB,IAAM,IAAK,OAAO,EA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AW,IACxB,kBAAC,KAAD;QAAG,WAAU;kBAAmC;QAAoB,CAAA,GAEpE,kBAAC,MAAD;QAAI,WAAU;kBACX,EAAW,KAAK,MACf,kBAAC,MAAD;SAEE,WAAU;mBAFZ,CAIE,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,OAAD;WAAK,WAAU;qBAAf;YACE,kBAAC,GAAD;aAAO,SAAS,EAAE,WAAW,WAAW,YAAY;uBACjD,EAAE,WAAW,WAAW,WAAW;aAC9B,CAAA;YACP,EAAE,oBACD,kBAAC,QAAD;aAAM,WAAU;uBAAhB,CACE,kBAAC,IAAD,EAAU,WAAU,UAAW,CAAA,EAAA,YAC1B;;YAET,kBAAC,QAAD;aAAM,WAAU;uBAAhB;cACE,kBAAC,IAAD,EAAK,WAAU,UAAW,CAAA;cACzB,EAAE;cACF,EAAE,WAAW,IAAI,EAAE,aAAa;cAAG;cAC/B;;YACN,EAAE,aACD,kBAAC,QAAD;aAAM,WAAU;uBAAhB,CACE,kBAAC,GAAD,EAAO,WAAU,UAAW,CAAA,EAC3B,IAAI,KAAK,EAAE,UAAU,CAAC,oBAAoB,CACtC;;YAEL;cACN,kBAAC,KAAD;WAAG,WAAU;qBAAb,CAAkD,YACvC,IAAI,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAC7C;aACA;aACL,EAAE,WAAW,YACZ,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,KAAK,EAAa,EAAE,GAAG;UACtC,WAAU;UACV,cAAW;oBAEX,kBAAC,GAAD,EAAQ,WAAU,UAAW,CAAA;UACtB,CAAA,CAER;WAvCE,EAAE,GAuCJ,CACL;QACC,CAAA,CAEH;;MACL,EAAA,CAAA,CAED;;IACQ;;EACT,CAAA"}
@@ -6,7 +6,7 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  var a = ({ type: a, className: o }) => {
7
7
  let s = t(a);
8
8
  return /* @__PURE__ */ i("span", {
9
- className: e("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium", "bg-muted border border-border", o),
9
+ className: e("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium", "bg-bg-sunken border border-border-subtle", o),
10
10
  children: [/* @__PURE__ */ r(n, {
11
11
  type: a,
12
12
  size: 12
@@ -1 +1 @@
1
- {"version":3,"file":"SecretTypeBadge.js","names":[],"sources":["../../../src/security/components/SecretTypeBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { SecretType } from '../types';\nimport { getSecretTypeInfo } from '../constants/secretTypes';\nimport { SecretTypeIcon } from './SecretTypeIcon';\nimport { cn } from '../utils/cn';\n\ninterface SecretTypeBadgeProps {\n type: SecretType;\n className?: string;\n}\n\n/**\n * Colored badge showing the secret type with its icon.\n */\nexport const SecretTypeBadge: FC<SecretTypeBadgeProps> = ({ type, className }) => {\n const info = getSecretTypeInfo(type);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n 'bg-muted border border-border',\n className\n )}\n >\n <SecretTypeIcon type={type} size={12} />\n {info.label}\n </span>\n );\n};\n"],"mappings":";;;;;AAcA,IAAa,KAA6C,EAAE,SAAM,mBAAgB;CAChF,IAAM,IAAO,EAAkB,EAAK;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,iCACA,EACD;YALH,CAOE,kBAAC,GAAD;GAAsB;GAAM,MAAM;GAAM,CAAA,EACvC,EAAK,MACD"}
1
+ {"version":3,"file":"SecretTypeBadge.js","names":[],"sources":["../../../src/security/components/SecretTypeBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { SecretType } from '../types';\nimport { getSecretTypeInfo } from '../constants/secretTypes';\nimport { SecretTypeIcon } from './SecretTypeIcon';\nimport { cn } from '../utils/cn';\n\ninterface SecretTypeBadgeProps {\n type: SecretType;\n className?: string;\n}\n\n/**\n * Colored badge showing the secret type with its icon.\n */\nexport const SecretTypeBadge: FC<SecretTypeBadgeProps> = ({ type, className }) => {\n const info = getSecretTypeInfo(type);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n 'bg-bg-sunken border border-border-subtle',\n className\n )}\n >\n <SecretTypeIcon type={type} size={12} />\n {info.label}\n </span>\n );\n};\n"],"mappings":";;;;;AAcA,IAAa,KAA6C,EAAE,SAAM,mBAAgB;CAChF,IAAM,IAAO,EAAkB,EAAK;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,4CACA,EACD;YALH,CAOE,kBAAC,GAAD;GAAsB;GAAM,MAAM;GAAM,CAAA,EACvC,EAAK,MACD"}
@@ -26,15 +26,15 @@ var l = ({ value: l, isRevealed: u, onToggleReveal: d, autoHideMs: f = 3e4, clip
26
26
  className: e("flex items-center gap-2", h),
27
27
  children: [
28
28
  /* @__PURE__ */ a("div", {
29
- className: e("flex-1 px-3 py-2 rounded-md border border-border bg-muted/50", "font-mono text-sm select-all", !u && "tracking-wider"),
29
+ className: e("flex-1 px-3 py-2 rounded-md border border-border-subtle bg-bg-sunken/50", "font-mono text-sm select-all", !u && "tracking-wider"),
30
30
  children: m ? /* @__PURE__ */ a("span", {
31
- className: "text-muted-foreground animate-pulse",
31
+ className: "text-text-secondary animate-pulse",
32
32
  children: "Decrypting…"
33
33
  }) : u ? /* @__PURE__ */ a("span", {
34
34
  className: "break-all",
35
35
  children: l
36
36
  }) : /* @__PURE__ */ a("span", {
37
- className: "text-muted-foreground",
37
+ className: "text-text-secondary",
38
38
  children: S
39
39
  })
40
40
  }),
@@ -44,7 +44,7 @@ var l = ({ value: l, isRevealed: u, onToggleReveal: d, autoHideMs: f = 3e4, clip
44
44
  type: "button",
45
45
  onClick: d,
46
46
  disabled: m || !d,
47
- className: e("p-2 rounded-md text-muted-foreground hover:text-foreground", "hover:bg-accent transition-colors", "disabled:opacity-50 disabled:cursor-not-allowed"),
47
+ className: e("p-2 rounded-md text-text-secondary hover:text-text-primary", "hover:bg-accent transition-colors", "disabled:opacity-50 disabled:cursor-not-allowed"),
48
48
  "aria-label": u ? "Hide value" : "Reveal value",
49
49
  title: u ? "Hide value" : "Reveal value",
50
50
  children: a(u ? c : s, { className: "size-4" })
@@ -55,7 +55,7 @@ var l = ({ value: l, isRevealed: u, onToggleReveal: d, autoHideMs: f = 3e4, clip
55
55
  })]
56
56
  }),
57
57
  u && f > 0 && x > 0 && /* @__PURE__ */ o("span", {
58
- className: "text-xs text-muted-foreground tabular-nums shrink-0",
58
+ className: "text-xs text-text-secondary tabular-nums shrink-0",
59
59
  children: [Math.ceil(x / 1e3), "s"]
60
60
  })
61
61
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"SecretValueDisplay.js","names":[],"sources":["../../../src/security/components/SecretValueDisplay.tsx"],"sourcesContent":["import { type FC, useEffect, useRef, useState } from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { CopyButton } from './CopyButton';\n\ninterface SecretValueDisplayProps {\n /** The actual secret value */\n value: string;\n /** Whether the value is currently revealed */\n isRevealed: boolean;\n /** Callback to toggle reveal state; if undefined the reveal button is disabled */\n onToggleReveal?: () => void;\n /** Auto-hide timer in milliseconds (0 = no auto-hide, default 30000) */\n autoHideMs?: number;\n /** Clipboard auto-clear time in ms */\n clipboardAutoClearMs?: number;\n /** Whether loading the decrypted value */\n isLoading?: boolean;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Displays a secret value with masking, reveal toggle, and auto-hide.\n * When hidden, shows masked dots. When revealed, shows the actual value\n * with a monospaced font and auto-hides after the configured timeout.\n */\nexport const SecretValueDisplay: FC<SecretValueDisplayProps> = ({\n value,\n isRevealed,\n onToggleReveal,\n autoHideMs = 30000,\n clipboardAutoClearMs = 30000,\n isLoading = false,\n className,\n}) => {\n // When the current reveal window started (ms epoch). Held in a ref so prop\n // sync doesn't trigger a render; ticks come from a single state update below.\n const revealedAtRef = useRef<number | null>(null);\n // Bump on each tick to re-render the countdown. Single setState in effect.\n const [, setTick] = useState(0);\n\n // Latest onToggleReveal — accessed inside timeout without becoming a dep.\n const onToggleRevealRef = useRef(onToggleReveal);\n useEffect(() => {\n onToggleRevealRef.current = onToggleReveal;\n });\n\n // Reset the reveal window timestamp directly during render when isRevealed\n // changes — avoids adjusting state in an effect on prop change.\n const prevRevealedRef = useRef<boolean | null>(null);\n if (prevRevealedRef.current !== isRevealed) {\n prevRevealedRef.current = isRevealed;\n revealedAtRef.current = isRevealed && autoHideMs > 0 ? Date.now() : null;\n }\n\n // Tick every second while revealed so the countdown re-renders.\n useEffect(() => {\n if (!isRevealed || autoHideMs <= 0) return;\n const interval = setInterval(() => setTick((t) => t + 1), 1000);\n return () => clearInterval(interval);\n }, [isRevealed, autoHideMs]);\n\n // Auto-hide after the configured timeout.\n useEffect(() => {\n if (!isRevealed || autoHideMs <= 0) return;\n const hideTimeout = setTimeout(() => {\n onToggleRevealRef.current?.();\n }, autoHideMs);\n return () => clearTimeout(hideTimeout);\n }, [isRevealed, autoHideMs]);\n\n const revealedAt = revealedAtRef.current;\n const autoHideCountdown =\n isRevealed && autoHideMs > 0 && revealedAt !== null\n ? Math.max(0, autoHideMs - (Date.now() - revealedAt))\n : 0;\n\n const maskedValue = '\\u2022'.repeat(Math.min(24, value.length || 16));\n\n return (\n <div className={cn('flex items-center gap-2', className)}>\n <div\n className={cn(\n 'flex-1 px-3 py-2 rounded-md border border-border bg-muted/50',\n 'font-mono text-sm select-all',\n !isRevealed && 'tracking-wider'\n )}\n >\n {isLoading ? (\n <span className=\"text-muted-foreground animate-pulse\">Decrypting…</span>\n ) : isRevealed ? (\n <span className=\"break-all\">{value}</span>\n ) : (\n <span className=\"text-muted-foreground\">{maskedValue}</span>\n )}\n </div>\n\n <div className=\"flex items-center gap-1 shrink-0\">\n {/* Reveal/Hide toggle */}\n <button\n type=\"button\"\n onClick={onToggleReveal}\n disabled={isLoading || !onToggleReveal}\n className={cn(\n 'p-2 rounded-md text-muted-foreground hover:text-foreground',\n 'hover:bg-accent transition-colors',\n 'disabled:opacity-50 disabled:cursor-not-allowed'\n )}\n aria-label={isRevealed ? 'Hide value' : 'Reveal value'}\n title={isRevealed ? 'Hide value' : 'Reveal value'}\n >\n {isRevealed ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </button>\n\n {/* Copy button */}\n <CopyButton\n value={value}\n autoClearMs={clipboardAutoClearMs}\n disabled={isLoading || !value}\n />\n </div>\n\n {/* Auto-hide countdown */}\n {isRevealed && autoHideMs > 0 && autoHideCountdown > 0 && (\n <span className=\"text-xs text-muted-foreground tabular-nums shrink-0\">\n {Math.ceil(autoHideCountdown / 1000)}s\n </span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AA2BA,IAAa,KAAmD,EAC9D,UACA,eACA,mBACA,gBAAa,KACb,0BAAuB,KACvB,eAAY,IACZ,mBACI;CAGJ,IAAM,IAAgB,EAAsB,KAAK,EAE3C,GAAG,KAAW,EAAS,EAAE,EAGzB,IAAoB,EAAO,EAAe;AAChD,SAAgB;AACd,IAAkB,UAAU;GAC5B;CAIF,IAAM,IAAkB,EAAuB,KAAK;AAcpD,CAbI,EAAgB,YAAY,MAC9B,EAAgB,UAAU,GAC1B,EAAc,UAAU,KAAc,IAAa,IAAI,KAAK,KAAK,GAAG,OAItE,QAAgB;AACd,MAAI,CAAC,KAAc,KAAc,EAAG;EACpC,IAAM,IAAW,kBAAkB,GAAS,MAAM,IAAI,EAAE,EAAE,IAAK;AAC/D,eAAa,cAAc,EAAS;IACnC,CAAC,GAAY,EAAW,CAAC,EAG5B,QAAgB;AACd,MAAI,CAAC,KAAc,KAAc,EAAG;EACpC,IAAM,IAAc,iBAAiB;AACnC,KAAkB,WAAW;KAC5B,EAAW;AACd,eAAa,aAAa,EAAY;IACrC,CAAC,GAAY,EAAW,CAAC;CAE5B,IAAM,IAAa,EAAc,SAC3B,IACJ,KAAc,IAAa,KAAK,MAAe,OAC3C,KAAK,IAAI,GAAG,KAAc,KAAK,KAAK,GAAG,GAAY,GACnD,GAEA,IAAc,IAAS,OAAO,KAAK,IAAI,IAAI,EAAM,UAAU,GAAG,CAAC;AAErE,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,2BAA2B,EAAU;YAAxD;GACE,kBAAC,OAAD;IACE,WAAW,EACT,gEACA,gCACA,CAAC,KAAc,iBAChB;cAEA,IACC,kBAAC,QAAD;KAAM,WAAU;eAAsC;KAAkB,CAAA,GACtE,IACF,kBAAC,QAAD;KAAM,WAAU;eAAa;KAAa,CAAA,GAE1C,kBAAC,QAAD;KAAM,WAAU;eAAyB;KAAmB,CAAA;IAE1D,CAAA;GAEN,kBAAC,OAAD;IAAK,WAAU;cAAf,CAEE,kBAAC,UAAD;KACE,MAAK;KACL,SAAS;KACT,UAAU,KAAa,CAAC;KACxB,WAAW,EACT,8DACA,qCACA,kDACD;KACD,cAAY,IAAa,eAAe;KACxC,OAAO,IAAa,eAAe;eAErB,EAAb,IAAc,IAAgC,GAAjC,EAAQ,WAAU,UAAW,CAA6B;KACjE,CAAA,EAGT,kBAAC,GAAD;KACS;KACP,aAAa;KACb,UAAU,KAAa,CAAC;KACxB,CAAA,CACE;;GAGL,KAAc,IAAa,KAAK,IAAoB,KACnD,kBAAC,QAAD;IAAM,WAAU;cAAhB,CACG,KAAK,KAAK,IAAoB,IAAK,EAAC,IAChC;;GAEL"}
1
+ {"version":3,"file":"SecretValueDisplay.js","names":[],"sources":["../../../src/security/components/SecretValueDisplay.tsx"],"sourcesContent":["import { type FC, useEffect, useRef, useState } from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { CopyButton } from './CopyButton';\n\ninterface SecretValueDisplayProps {\n /** The actual secret value */\n value: string;\n /** Whether the value is currently revealed */\n isRevealed: boolean;\n /** Callback to toggle reveal state; if undefined the reveal button is disabled */\n onToggleReveal?: () => void;\n /** Auto-hide timer in milliseconds (0 = no auto-hide, default 30000) */\n autoHideMs?: number;\n /** Clipboard auto-clear time in ms */\n clipboardAutoClearMs?: number;\n /** Whether loading the decrypted value */\n isLoading?: boolean;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Displays a secret value with masking, reveal toggle, and auto-hide.\n * When hidden, shows masked dots. When revealed, shows the actual value\n * with a monospaced font and auto-hides after the configured timeout.\n */\nexport const SecretValueDisplay: FC<SecretValueDisplayProps> = ({\n value,\n isRevealed,\n onToggleReveal,\n autoHideMs = 30000,\n clipboardAutoClearMs = 30000,\n isLoading = false,\n className,\n}) => {\n // When the current reveal window started (ms epoch). Held in a ref so prop\n // sync doesn't trigger a render; ticks come from a single state update below.\n const revealedAtRef = useRef<number | null>(null);\n // Bump on each tick to re-render the countdown. Single setState in effect.\n const [, setTick] = useState(0);\n\n // Latest onToggleReveal — accessed inside timeout without becoming a dep.\n const onToggleRevealRef = useRef(onToggleReveal);\n useEffect(() => {\n onToggleRevealRef.current = onToggleReveal;\n });\n\n // Reset the reveal window timestamp directly during render when isRevealed\n // changes — avoids adjusting state in an effect on prop change.\n const prevRevealedRef = useRef<boolean | null>(null);\n if (prevRevealedRef.current !== isRevealed) {\n prevRevealedRef.current = isRevealed;\n revealedAtRef.current = isRevealed && autoHideMs > 0 ? Date.now() : null;\n }\n\n // Tick every second while revealed so the countdown re-renders.\n useEffect(() => {\n if (!isRevealed || autoHideMs <= 0) return;\n const interval = setInterval(() => setTick((t) => t + 1), 1000);\n return () => clearInterval(interval);\n }, [isRevealed, autoHideMs]);\n\n // Auto-hide after the configured timeout.\n useEffect(() => {\n if (!isRevealed || autoHideMs <= 0) return;\n const hideTimeout = setTimeout(() => {\n onToggleRevealRef.current?.();\n }, autoHideMs);\n return () => clearTimeout(hideTimeout);\n }, [isRevealed, autoHideMs]);\n\n const revealedAt = revealedAtRef.current;\n const autoHideCountdown =\n isRevealed && autoHideMs > 0 && revealedAt !== null\n ? Math.max(0, autoHideMs - (Date.now() - revealedAt))\n : 0;\n\n const maskedValue = '\\u2022'.repeat(Math.min(24, value.length || 16));\n\n return (\n <div className={cn('flex items-center gap-2', className)}>\n <div\n className={cn(\n 'flex-1 px-3 py-2 rounded-md border border-border-subtle bg-bg-sunken/50',\n 'font-mono text-sm select-all',\n !isRevealed && 'tracking-wider'\n )}\n >\n {isLoading ? (\n <span className=\"text-text-secondary animate-pulse\">Decrypting…</span>\n ) : isRevealed ? (\n <span className=\"break-all\">{value}</span>\n ) : (\n <span className=\"text-text-secondary\">{maskedValue}</span>\n )}\n </div>\n\n <div className=\"flex items-center gap-1 shrink-0\">\n {/* Reveal/Hide toggle */}\n <button\n type=\"button\"\n onClick={onToggleReveal}\n disabled={isLoading || !onToggleReveal}\n className={cn(\n 'p-2 rounded-md text-text-secondary hover:text-text-primary',\n 'hover:bg-accent transition-colors',\n 'disabled:opacity-50 disabled:cursor-not-allowed'\n )}\n aria-label={isRevealed ? 'Hide value' : 'Reveal value'}\n title={isRevealed ? 'Hide value' : 'Reveal value'}\n >\n {isRevealed ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </button>\n\n {/* Copy button */}\n <CopyButton\n value={value}\n autoClearMs={clipboardAutoClearMs}\n disabled={isLoading || !value}\n />\n </div>\n\n {/* Auto-hide countdown */}\n {isRevealed && autoHideMs > 0 && autoHideCountdown > 0 && (\n <span className=\"text-xs text-text-secondary tabular-nums shrink-0\">\n {Math.ceil(autoHideCountdown / 1000)}s\n </span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AA2BA,IAAa,KAAmD,EAC9D,UACA,eACA,mBACA,gBAAa,KACb,0BAAuB,KACvB,eAAY,IACZ,mBACI;CAGJ,IAAM,IAAgB,EAAsB,KAAK,EAE3C,GAAG,KAAW,EAAS,EAAE,EAGzB,IAAoB,EAAO,EAAe;AAChD,SAAgB;AACd,IAAkB,UAAU;GAC5B;CAIF,IAAM,IAAkB,EAAuB,KAAK;AAcpD,CAbI,EAAgB,YAAY,MAC9B,EAAgB,UAAU,GAC1B,EAAc,UAAU,KAAc,IAAa,I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AAU;cAAhB,CACG,KAAK,KAAK,IAAoB,IAAK,EAAC,IAChC;;GAEL"}
@@ -51,7 +51,7 @@ var c = ({ score: c, className: l }) => {
51
51
  strokeDasharray: f,
52
52
  strokeDashoffset: p,
53
53
  strokeLinecap: "round",
54
- className: e(u.color, "transition-all duration-700"),
54
+ className: e(u.color, "transition-all duration-200"),
55
55
  transform: `rotate(-90 ${80 / 2} ${80 / 2})`
56
56
  })]
57
57
  }), /* @__PURE__ */ n("div", {
@@ -70,7 +70,7 @@ var c = ({ score: c, className: l }) => {
70
70
  children: u.label
71
71
  })]
72
72
  }), /* @__PURE__ */ n("p", {
73
- className: "text-xs text-muted-foreground mt-0.5",
73
+ className: "text-xs text-text-secondary mt-0.5",
74
74
  children: "Health Score"
75
75
  })]
76
76
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityScoreCard.js","names":[],"sources":["../../../src/security/components/SecurityScoreCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Shield, CheckCircle, AlertTriangle, XCircle } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Card } from './ui';\n\ninterface SecurityScoreCardProps {\n score: number;\n className?: string;\n}\n\n/**\n * Visual card displaying the security health score as a circular gauge.\n */\nexport const SecurityScoreCard: FC<SecurityScoreCardProps> = ({ score, className }) => {\n const getScoreConfig = (s: number) => {\n if (s >= 80)\n return {\n label: 'Excellent',\n color: 'text-status-success-text',\n bg: 'bg-status-success-bg',\n Icon: CheckCircle,\n };\n if (s >= 60)\n return { label: 'Good', color: 'text-status-info-text', bg: 'bg-accent-blue', Icon: Shield };\n if (s >= 40)\n return {\n label: 'Fair',\n color: 'text-status-warning-text',\n bg: 'bg-status-warning-bg',\n Icon: AlertTriangle,\n };\n return {\n label: 'Needs Attention',\n color: 'text-status-error-text',\n bg: 'bg-status-error-bg',\n Icon: XCircle,\n };\n };\n\n const config = getScoreConfig(score);\n const Icon = config.Icon;\n\n // SVG circle properties\n const size = 80;\n const strokeWidth = 6;\n const radius = (size - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const offset = circumference - (score / 100) * circumference;\n\n return (\n <Card className={cn('p-5 flex flex-col items-center gap-2', className)}>\n <div className=\"relative\">\n <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>\n {/* Background circle */}\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n className=\"text-muted/30\"\n />\n {/* Score circle */}\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n className={cn(config.color, 'transition-all duration-700')}\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n />\n </svg>\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <span className={cn('text-xl font-bold', config.color)}>{score}</span>\n </div>\n </div>\n <div className=\"text-center\">\n <div className=\"flex items-center gap-1\">\n <Icon className={cn('h-4 w-4', config.color)} />\n <span className={cn('text-sm font-semibold', config.color)}>{config.label}</span>\n </div>\n <p className=\"text-xs text-muted-foreground mt-0.5\">Health Score</p>\n </div>\n </Card>\n );\n};\n"],"mappings":";;;;;AAaA,IAAa,KAAiD,EAAE,UAAO,mBAAgB;CA0BrF,IAAM,MAzBkB,MAClB,KAAK,KACA;EACL,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP,GACC,KAAK,KACA;EAAE,OAAO;EAAQ,OAAO;EAAyB,IAAI;EAAkB,MAAM;EAAQ,GAC1F,KAAK,KACA;EACL,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP,GACI;EACL,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP,EAG2B,EAAM,EAC9B,IAAO,EAAO,MAMd,IAAgB,IAAI,KAAK,KAAK,IAC9B,IAAS,IAAiB,IAAQ,MAAO;AAE/C,QACE,kBAAC,GAAD;EAAM,WAAW,EAAG,wCAAwC,EAAU;YAAtE,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,OAAO;IAAM,QAAQ;IAAM,SAAS;cAAzC,CAEE,kBAAC,UAAD;KACE,IAAI,KAAO;KACX,IAAI,KAAO;KACX,GAAG;KACH,MAAK;KACL,QAAO;KACM;KACb,WAAU;KACV,CAAA,EAEF,kBAAC,UAAD;KACE,IAAI,KAAO;KACX,IAAI,KAAO;KACX,GAAG;KACH,MAAK;KACL,QAAO;KACM;KACb,iBAAiB;KACjB,kBAAkB;KAClB,eAAc;KACd,WAAW,EAAG,EAAO,OAAO,8BAA8B;KAC1D,WAAW,cAAc,KAAO,EAAE,GAAG,KAAO,EAAE;KAC9C,CAAA,CACE;OACN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,QAAD;KAAM,WAAW,EAAG,qBAAqB,EAAO,MAAM;eAAG;KAAa,CAAA;IAClE,CAAA,CACF;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAM,WAAW,EAAG,WAAW,EAAO,MAAM,EAAI,CAAA,EAChD,kBAAC,QAAD;KAAM,WAAW,EAAG,yBAAyB,EAAO,MAAM;eAAG,EAAO;KAAa,CAAA,CAC7E;OACN,kBAAC,KAAD;IAAG,WAAU;cAAuC;IAAgB,CAAA,CAChE;KACD"}
1
+ {"version":3,"file":"SecurityScoreCard.js","names":[],"sources":["../../../src/security/components/SecurityScoreCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Shield, CheckCircle, AlertTriangle, XCircle } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Card } from './ui';\n\ninterface SecurityScoreCardProps {\n score: number;\n className?: string;\n}\n\n/**\n * Visual card displaying the security health score as a circular gauge.\n */\nexport const SecurityScoreCard: FC<SecurityScoreCardProps> = ({ score, className }) => {\n const getScoreConfig = (s: number) => {\n if (s >= 80)\n return {\n label: 'Excellent',\n color: 'text-status-success-text',\n bg: 'bg-status-success-bg',\n Icon: CheckCircle,\n };\n if (s >= 60)\n return { label: 'Good', color: 'text-status-info-text', bg: 'bg-accent-blue', Icon: Shield };\n if (s >= 40)\n return {\n label: 'Fair',\n color: 'text-status-warning-text',\n bg: 'bg-status-warning-bg',\n Icon: AlertTriangle,\n };\n return {\n label: 'Needs Attention',\n color: 'text-status-error-text',\n bg: 'bg-status-error-bg',\n Icon: XCircle,\n };\n };\n\n const config = getScoreConfig(score);\n const Icon = config.Icon;\n\n // SVG circle properties\n const size = 80;\n const strokeWidth = 6;\n const radius = (size - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const offset = circumference - (score / 100) * circumference;\n\n return (\n <Card className={cn('p-5 flex flex-col items-center gap-2', className)}>\n <div className=\"relative\">\n <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>\n {/* Background circle */}\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n className=\"text-muted/30\"\n />\n {/* Score circle */}\n <circle\n cx={size / 2}\n cy={size / 2}\n r={radius}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={strokeWidth}\n strokeDasharray={circumference}\n strokeDashoffset={offset}\n strokeLinecap=\"round\"\n className={cn(config.color, 'transition-all duration-200')}\n transform={`rotate(-90 ${size / 2} ${size / 2})`}\n />\n </svg>\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <span className={cn('text-xl font-bold', config.color)}>{score}</span>\n </div>\n </div>\n <div className=\"text-center\">\n <div className=\"flex items-center gap-1\">\n <Icon className={cn('h-4 w-4', config.color)} />\n <span className={cn('text-sm font-semibold', config.color)}>{config.label}</span>\n </div>\n <p className=\"text-xs text-text-secondary mt-0.5\">Health Score</p>\n </div>\n </Card>\n );\n};\n"],"mappings":";;;;;AAaA,IAAa,KAAiD,EAAE,UAAO,mBAAgB;CA0B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C7E;OACN,kBAAC,KAAD;IAAG,WAAU;cAAqC;IAAgB,CAAA,CAC9D;KACD"}
@@ -50,18 +50,18 @@ var d = ({ vault: d, onClick: f, isSelected: p, onSelect: m, className: h }) =>
50
50
  e.stopPropagation(), m(d.id);
51
51
  },
52
52
  onClick: (e) => e.stopPropagation(),
53
- className: "size-4 rounded border-border text-primary focus:ring-primary shrink-0",
53
+ className: "size-4 rounded border-border-subtle text-primary focus:ring-primary shrink-0",
54
54
  "aria-label": _("security.vaultCard.checkbox.aria", "Select vault {name}", { name: d.name })
55
55
  }),
56
56
  /* @__PURE__ */ i("div", {
57
- className: "p-2 rounded-lg bg-primary/10 text-primary",
57
+ className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
58
58
  children: /* @__PURE__ */ i(s, { className: "size-5" })
59
59
  }),
60
60
  /* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("h3", {
61
- className: "font-semibold text-foreground leading-tight",
61
+ className: "font-semibold text-text-primary leading-tight",
62
62
  children: d.name
63
63
  }), d.description && /* @__PURE__ */ i("p", {
64
- className: "text-xs text-muted-foreground mt-0.5 line-clamp-1",
64
+ className: "text-xs text-text-secondary mt-0.5 line-clamp-1",
65
65
  children: d.description
66
66
  })] })
67
67
  ]
@@ -70,7 +70,7 @@ var d = ({ vault: d, onClick: f, isSelected: p, onSelect: m, className: h }) =>
70
70
  children: [b && /* @__PURE__ */ i(b, { className: "size-3" }), y.label]
71
71
  })]
72
72
  }), /* @__PURE__ */ a("div", {
73
- className: "flex items-center gap-4 text-sm text-muted-foreground",
73
+ className: "flex items-center gap-4 text-sm text-text-secondary",
74
74
  children: [/* @__PURE__ */ a("div", {
75
75
  className: "flex items-center gap-1.5",
76
76
  "aria-label": x,
@@ -1 +1 @@
1
- {"version":3,"file":"VaultCard.js","names":[],"sources":["../../../src/security/components/VaultCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { KeyRound, Users, Lock, Archive } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Card, Badge } from './ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\nimport type { Vault } from '../types';\n\ninterface VaultCardProps {\n vault: Vault;\n onClick?: () => void;\n isSelected?: boolean;\n onSelect?: (vaultId: string) => void;\n className?: string;\n}\n\nexport const VaultCard: FC<VaultCardProps> = ({\n vault,\n onClick,\n isSelected,\n onSelect,\n className,\n}) => {\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const statusConfig: Record<\n string,\n { label: string; variant: 'success' | 'warning' | 'outline'; icon: typeof Lock | null }\n > = {\n ACTIVE: {\n label: tx('security.vaultCard.status.active', 'Active'),\n variant: 'success',\n icon: null,\n },\n LOCKED: {\n label: tx('security.vaultCard.status.locked', 'Locked'),\n variant: 'warning',\n icon: Lock,\n },\n ARCHIVED: {\n label: tx('security.vaultCard.status.archived', 'Archived'),\n variant: 'outline',\n icon: Archive,\n },\n SUSPENDED: {\n label: tx('security.vaultCard.status.suspended', 'Suspended'),\n variant: 'outline',\n icon: Archive,\n },\n DELETED: {\n label: tx('security.vaultCard.status.deleted', 'Deleted'),\n variant: 'outline',\n icon: Archive,\n },\n };\n\n const status = statusConfig[vault.status] ?? statusConfig.ACTIVE;\n const StatusIcon = status.icon;\n\n const secretLabel =\n vault.secretCount === 1\n ? tx('security.vaultCard.secretCount.singular', '{count} secret', {\n count: vault.secretCount,\n })\n : tx('security.vaultCard.secretCount.plural', '{count} secrets', {\n count: vault.secretCount,\n });\n\n const memberLabel =\n vault.memberCount === 1\n ? tx('security.vaultCard.memberCount.singular', '{count} member', {\n count: vault.memberCount,\n })\n : tx('security.vaultCard.memberCount.plural', '{count} members', {\n count: vault.memberCount,\n });\n\n return (\n <Card\n onClick={onClick}\n className={cn(\n 'p-5',\n 'focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none',\n isSelected && 'ring-2 ring-primary/50',\n className\n )}\n aria-selected={isSelected}\n data-tour=\"vaults-card-item\"\n >\n <div className=\"flex items-start justify-between mb-3\">\n <div className=\"flex items-center gap-2.5\">\n {onSelect && (\n <input\n type=\"checkbox\"\n checked={isSelected ?? false}\n onChange={(e) => {\n e.stopPropagation();\n onSelect(vault.id);\n }}\n onClick={(e) => e.stopPropagation()}\n className=\"size-4 rounded border-border text-primary focus:ring-primary shrink-0\"\n aria-label={tx('security.vaultCard.checkbox.aria', 'Select vault {name}', {\n name: vault.name,\n })}\n />\n )}\n <div className=\"p-2 rounded-lg bg-primary/10 text-primary\">\n <KeyRound className=\"size-5\" />\n </div>\n <div>\n <h3 className=\"font-semibold text-foreground leading-tight\">{vault.name}</h3>\n {vault.description && (\n <p className=\"text-xs text-muted-foreground mt-0.5 line-clamp-1\">\n {vault.description}\n </p>\n )}\n </div>\n </div>\n <Badge variant={status.variant}>\n {StatusIcon && <StatusIcon className=\"size-3\" />}\n {status.label}\n </Badge>\n </div>\n\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n <div className=\"flex items-center gap-1.5\" aria-label={secretLabel}>\n <KeyRound className=\"size-3.5\" />\n <span aria-hidden=\"true\">{secretLabel}</span>\n </div>\n <div className=\"flex items-center gap-1.5\" aria-label={memberLabel}>\n <Users className=\"size-3.5\" />\n <span aria-hidden=\"true\">{memberLabel}</span>\n </div>\n </div>\n </Card>\n );\n};\n"],"mappings":";;;;;;;AAgBA,IAAa,KAAiC,EAC5C,UACA,YACA,eACA,aACA,mBACI;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MACzC,EAAsB,GAAG,GAAK,GAAU,EAAO,EAE3C,IAGF;EACF,QAAQ;GACN,OAAO,EAAG,oCAAoC,SAAS;GACvD,SAAS;GACT,MAAM;GACP;EACD,QAAQ;GACN,OAAO,EAAG,oCAAoC,SAAS;GACvD,SAAS;GACT,MAAM;GACP;EACD,UAAU;GACR,OAAO,EAAG,sCAAsC,WAA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AAvB,CACG,KAAc,kBAAC,GAAD,EAAY,WAAU,UAAW,CAAA,EAC/C,EAAO,MACF;MACJ;MAEN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;IAA4B,cAAY;cAAvD,CACE,kBAAC,GAAD,EAAU,WAAU,YAAa,CAAA,EACjC,kBAAC,QAAD;KAAM,eAAY;eAAQ;KAAmB,CAAA,CACzC;OACN,kBAAC,OAAD;IAAK,WAAU;IAA4B,cAAY;cAAvD,CACE,kBAAC,GAAD,EAAO,WAAU,YAAa,CAAA,EAC9B,kBAAC,QAAD;KAAM,eAAY;eAAQ;KAAmB,CAAA,CACzC;MACF;KACD"}
1
+ {"version":3,"file":"VaultCard.js","names":[],"sources":["../../../src/security/components/VaultCard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { KeyRound, Users, Lock, Archive } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Card, Badge } from './ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\nimport type { Vault } from '../types';\n\ninterface VaultCardProps {\n vault: Vault;\n onClick?: () => void;\n isSelected?: boolean;\n onSelect?: (vaultId: string) => void;\n className?: string;\n}\n\nexport const VaultCard: FC<VaultCardProps> = ({\n vault,\n onClick,\n isSelected,\n onSelect,\n className,\n}) => {\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const statusConfig: Record<\n string,\n { label: string; variant: 'success' | 'warning' | 'outline'; icon: typeof Lock | null }\n > = {\n ACTIVE: {\n label: tx('security.vaultCard.status.active', 'Active'),\n variant: 'success',\n icon: null,\n },\n LOCKED: {\n label: tx('security.vaultCard.status.locked', 'Locked'),\n variant: 'warning',\n icon: Lock,\n },\n ARCHIVED: {\n label: tx('security.vaultCard.status.archived', 'Archived'),\n variant: 'outline',\n icon: Archive,\n },\n SUSPENDED: {\n label: tx('security.vaultCard.status.suspended', 'Suspended'),\n variant: 'outline',\n icon: Archive,\n },\n DELETED: {\n label: tx('security.vaultCard.status.deleted', 'Deleted'),\n variant: 'outline',\n icon: Archive,\n },\n };\n\n const status = statusConfig[vault.status] ?? statusConfig.ACTIVE;\n const StatusIcon = status.icon;\n\n const secretLabel =\n vault.secretCount === 1\n ? tx('security.vaultCard.secretCount.singular', '{count} secret', {\n count: vault.secretCount,\n })\n : tx('security.vaultCard.secretCount.plural', '{count} secrets', {\n count: vault.secretCount,\n });\n\n const memberLabel =\n vault.memberCount === 1\n ? tx('security.vaultCard.memberCount.singular', '{count} member', {\n count: vault.memberCount,\n })\n : tx('security.vaultCard.memberCount.plural', '{count} members', {\n count: vault.memberCount,\n });\n\n return (\n <Card\n onClick={onClick}\n className={cn(\n 'p-5',\n 'focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none',\n isSelected && 'ring-2 ring-primary/50',\n className\n )}\n aria-selected={isSelected}\n data-tour=\"vaults-card-item\"\n >\n <div className=\"flex items-start justify-between mb-3\">\n <div className=\"flex items-center gap-2.5\">\n {onSelect && (\n <input\n type=\"checkbox\"\n checked={isSelected ?? false}\n onChange={(e) => {\n e.stopPropagation();\n onSelect(vault.id);\n }}\n onClick={(e) => e.stopPropagation()}\n className=\"size-4 rounded border-border-subtle text-primary focus:ring-primary shrink-0\"\n aria-label={tx('security.vaultCard.checkbox.aria', 'Select vault {name}', {\n name: vault.name,\n })}\n />\n )}\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10 text-primary\">\n <KeyRound className=\"size-5\" />\n </div>\n <div>\n <h3 className=\"font-semibold text-text-primary leading-tight\">{vault.name}</h3>\n {vault.description && (\n <p className=\"text-xs text-text-secondary mt-0.5 line-clamp-1\">\n {vault.description}\n </p>\n )}\n </div>\n </div>\n <Badge variant={status.variant}>\n {StatusIcon && <StatusIcon className=\"size-3\" />}\n {status.label}\n </Badge>\n </div>\n\n <div className=\"flex items-center gap-4 text-sm text-text-secondary\">\n <div className=\"flex items-center gap-1.5\" aria-label={secretLabel}>\n <KeyRound className=\"size-3.5\" />\n <span aria-hidden=\"true\">{secretLabel}</span>\n </div>\n <div className=\"flex items-center gap-1.5\" aria-label={memberLabel}>\n <Users className=\"size-3.5\" />\n <span aria-hidden=\"true\">{memberLabel}</span>\n </div>\n </div>\n </Card>\n );\n};\n"],"mappings":";;;;;;;AAgBA,IAAa,KAAiC,EAC5C,UACA,YACA,eACA,aACA,mBACI;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MACzC,EAAsB,GAAG,GAAK,GAAU,EAAO,EAE3C,IAGF;EACF,QAAQ;GACN,OAAO,EAAG,oCAAoC,SAAS;GACvD,SAAS;GACT,MAAM;GACP;EACD,QAAQ;GACN,OAAO,EAAG,oCAAoC,SAAS;GACvD,SAAS;GACT,MAAM;GACP;EACD,UAAU;GACR,OAAO,EAAG,sCAAsC,WAAW;GAC3D,SAAS;GACT,MAAM;GACP;EACD,WAAW;GACT,OAAO,EAAG,uCAAuC,YAAY;GAC7D,SAAS;GACT,MAAM;GACP;EACD,SAAS;GACP,OAAO,EAAG,qCAAqC,UAAU;GACzD,SAAS;GACT,MAAM;GACP;EACF,EAEK,IAAS,EAAa,EAAM,WAAW,EAAa,QACpD,IAAa,EAAO,MAEpB,IACJ,EAAM,gBAAgB,IAClB,EAAG,2CAA2C,kBAAkB,EAC9D,OAAO,EAAM,aACd,CAAC,GACF,EAAG,yCAAyC,mBAAmB,EAC7D,OAAO,EAAM,aACd,CAAC,EAEF,IACJ,EAAM,gBAAgB,IAClB,EAAG,2CAA2C,kBAAkB,EAC9D,OAAO,EAAM,aACd,CAAC,GACF,EAAG,yCAAyC,mBAAmB,EAC7D,OAAO,EAAM,aACd,CAAC;AAER,QACE,kBAAC,GAAD;EACW;EACT,WAAW,EACT,OACA,8EACA,KAAc,0BACd,EACD;EACD,iBAAe;EACf,aAAU;YATZ,CAWE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf;KACG,KACC,kBAAC,SAAD;MACE,MAAK;MACL,SAAS,KAAc;MACvB,WAAW,MAAM;AAEf,OADA,EAAE,iBAAiB,EACnB,EAAS,EAAM,GAAG;;MAEpB,UAAU,MAAM,EAAE,iBAAiB;MACnC,WAAU;MACV,cAAY,EAAG,oCAAoC,uBAAuB,EACxE,MAAM,EAAM,MACb,CAAC;MACF,CAAA;KAEJ,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA;MAC3B,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;MAAI,WAAU;gBAAiD,EAAM;MAAU,CAAA,EAC9E,EAAM,eACL,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAM;MACL,CAAA,CAEF,EAAA,CAAA;KACF;OACN,kBAAC,GAAD;IAAO,SAAS,EAAO;cAAvB,CACG,KAAc,kBAAC,GAAD,EAAY,WAAU,UAAW,CAAA,EAC/C,EAAO,MACF;MACJ;MAEN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;IAA4B,cAAY;cAAvD,CACE,kBAAC,GAAD,EAAU,WAAU,YAAa,CAAA,EACjC,kBAAC,QAAD;KAAM,eAAY;eAAQ;KAAmB,CAAA,CACzC;OACN,kBAAC,OAAD;IAAK,WAAU;IAA4B,cAAY;cAAvD,CACE,kBAAC,GAAD,EAAO,WAAU,YAAa,CAAA,EAC9B,kBAAC,QAAD;KAAM,eAAY;eAAQ;KAAmB,CAAA,CACzC;MACF;KACD"}
@@ -9,7 +9,7 @@ var i = ({ name: i, onNameChange: a, description: o, onDescriptionChange: s, sco
9
9
  children: [
10
10
  /* @__PURE__ */ n("label", {
11
11
  htmlFor: "vault-name",
12
- className: "text-sm font-medium text-foreground",
12
+ className: "text-sm font-medium text-text-primary",
13
13
  children: "Vault Name"
14
14
  }),
15
15
  /* @__PURE__ */ n(e, {
@@ -20,7 +20,7 @@ var i = ({ name: i, onNameChange: a, description: o, onDescriptionChange: s, sco
20
20
  required: !0
21
21
  }),
22
22
  /* @__PURE__ */ n("p", {
23
- className: "text-xs text-muted-foreground",
23
+ className: "text-xs text-text-secondary",
24
24
  children: "A descriptive name for your vault."
25
25
  })
26
26
  ]
@@ -29,7 +29,7 @@ var i = ({ name: i, onNameChange: a, description: o, onDescriptionChange: s, sco
29
29
  className: "space-y-2",
30
30
  children: [/* @__PURE__ */ n("label", {
31
31
  htmlFor: "vault-description",
32
- className: "text-sm font-medium text-foreground",
32
+ className: "text-sm font-medium text-text-primary",
33
33
  children: "Description"
34
34
  }), /* @__PURE__ */ n(e, {
35
35
  id: "vault-description",
@@ -43,7 +43,7 @@ var i = ({ name: i, onNameChange: a, description: o, onDescriptionChange: s, sco
43
43
  children: [
44
44
  /* @__PURE__ */ n("label", {
45
45
  htmlFor: "vault-scope",
46
- className: "text-sm font-medium text-foreground",
46
+ className: "text-sm font-medium text-text-primary",
47
47
  children: "Scope"
48
48
  }),
49
49
  /* @__PURE__ */ n(t, {
@@ -71,7 +71,7 @@ var i = ({ name: i, onNameChange: a, description: o, onDescriptionChange: s, sco
71
71
  disabled: f
72
72
  }),
73
73
  /* @__PURE__ */ n("p", {
74
- className: "text-xs text-muted-foreground",
74
+ className: "text-xs text-text-secondary",
75
75
  children: f ? "Scope cannot be changed after creation." : "Who can access this vault by default."
76
76
  })
77
77
  ]
@@ -80,7 +80,7 @@ var i = ({ name: i, onNameChange: a, description: o, onDescriptionChange: s, sco
80
80
  className: "space-y-2",
81
81
  children: [/* @__PURE__ */ n("label", {
82
82
  htmlFor: "vault-status",
83
- className: "text-sm font-medium text-foreground",
83
+ className: "text-sm font-medium text-text-primary",
84
84
  children: "Status"
85
85
  }), /* @__PURE__ */ n(t, {
86
86
  id: "vault-status",
@@ -1 +1 @@
1
- {"version":3,"file":"VaultFormFields.js","names":[],"sources":["../../../src/security/components/VaultFormFields.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Input, Select } from './ui';\nimport type { VaultStatus } from '../types';\n\ninterface VaultFormFieldsProps {\n name: string;\n onNameChange: (value: string) => void;\n description: string;\n onDescriptionChange: (value: string) => void;\n scope: string;\n onScopeChange: (value: string) => void;\n status?: VaultStatus;\n onStatusChange?: (value: VaultStatus) => void;\n isEdit?: boolean;\n}\n\nexport const VaultFormFields: FC<VaultFormFieldsProps> = ({\n name,\n onNameChange,\n description,\n onDescriptionChange,\n scope,\n onScopeChange,\n status,\n onStatusChange,\n isEdit = false,\n}) => {\n return (\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-name\" className=\"text-sm font-medium text-foreground\">\n Vault Name\n </label>\n <Input\n id=\"vault-name\"\n placeholder=\"e.g. Production Credentials\"\n value={name}\n onChange={(e) => onNameChange(e.target.value)}\n required\n />\n <p className=\"text-xs text-muted-foreground\">A descriptive name for your vault.</p>\n </div>\n\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-description\" className=\"text-sm font-medium text-foreground\">\n Description\n </label>\n <Input\n id=\"vault-description\"\n placeholder=\"e.g. API keys and database credentials for production\"\n value={description}\n onChange={(e) => onDescriptionChange(e.target.value)}\n />\n </div>\n\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-scope\" className=\"text-sm font-medium text-foreground\">\n Scope\n </label>\n <Select\n id=\"vault-scope\"\n value={scope}\n onChange={onScopeChange}\n options={[\n { value: 'WORKSPACE', label: 'Workspace (All members)' },\n { value: 'PERSONAL', label: 'Personal (Only me)' },\n { value: 'PRODUCT', label: 'Product' },\n { value: 'TENANT', label: 'Tenant' },\n ]}\n disabled={isEdit}\n />\n <p className=\"text-xs text-muted-foreground\">\n {isEdit\n ? 'Scope cannot be changed after creation.'\n : 'Who can access this vault by default.'}\n </p>\n </div>\n\n {isEdit && onStatusChange && (\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-status\" className=\"text-sm font-medium text-foreground\">\n Status\n </label>\n <Select\n id=\"vault-status\"\n value={status || 'ACTIVE'}\n onChange={(v) => onStatusChange(v as VaultStatus)}\n options={[\n { value: 'ACTIVE', label: 'Active' },\n { value: 'LOCKED', label: 'Locked' },\n { value: 'ARCHIVED', label: 'Archived' },\n ]}\n />\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;AAgBA,IAAa,KAA6C,EACxD,SACA,iBACA,gBACA,wBACA,UACA,kBACA,WACA,mBACA,YAAS,SAGP,kBAAC,OAAD;CAAK,WAAU;WAAf;EACE,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,SAAD;KAAO,SAAQ;KAAa,WAAU;eAAsC;KAEpE,CAAA;IACR,kBAAC,GAAD;KACE,IAAG;KACH,aAAY;KACZ,OAAO;KACP,WAAW,MAAM,EAAa,EAAE,OAAO,MAAM;KAC7C,UAAA;KACA,CAAA;IACF,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAAsC,CAAA;IAC/E;;EAEN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,SAAD;IAAO,SAAQ;IAAoB,WAAU;cAAsC;IAE3E,CAAA,EACR,kBAAC,GAAD;IACE,IAAG;IACH,aAAY;IACZ,OAAO;IACP,WAAW,MAAM,EAAoB,EAAE,OAAO,MAAM;IACpD,CAAA,CACE;;EAEN,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,SAAD;KAAO,SAAQ;KAAc,WAAU;eAAsC;KAErE,CAAA;IACR,kBAAC,GAAD;KACE,IAAG;KACH,OAAO;KACP,UAAU;KACV,SAAS;MACP;OAAE,OAAO;OAAa,OAAO;OAA2B;MACxD;OAAE,OAAO;OAAY,OAAO;OAAsB;MAClD;OAAE,OAAO;OAAW,OAAO;OAAW;MACtC;OAAE,OAAO;OAAU,OAAO;OAAU;MACrC;KACD,UAAU;KACV,CAAA;IACF,kBAAC,KAAD;KAAG,WAAU;eACV,IACG,4CACA;KACF,CAAA;IACA;;EAEL,KAAU,KACT,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,SAAD;IAAO,SAAQ;IAAe,WAAU;cAAsC;IAEtE,CAAA,EACR,kBAAC,GAAD;IACE,IAAG;IACH,OAAO,KAAU;IACjB,WAAW,MAAM,EAAe,EAAiB;IACjD,SAAS;KACP;MAAE,OAAO;MAAU,OAAO;MAAU;KACpC;MAAE,OAAO;MAAU,OAAO;MAAU;KACpC;MAAE,OAAO;MAAY,OAAO;MAAY;KACzC;IACD,CAAA,CACE;;EAEJ"}
1
+ {"version":3,"file":"VaultFormFields.js","names":[],"sources":["../../../src/security/components/VaultFormFields.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Input, Select } from './ui';\nimport type { VaultStatus } from '../types';\n\ninterface VaultFormFieldsProps {\n name: string;\n onNameChange: (value: string) => void;\n description: string;\n onDescriptionChange: (value: string) => void;\n scope: string;\n onScopeChange: (value: string) => void;\n status?: VaultStatus;\n onStatusChange?: (value: VaultStatus) => void;\n isEdit?: boolean;\n}\n\nexport const VaultFormFields: FC<VaultFormFieldsProps> = ({\n name,\n onNameChange,\n description,\n onDescriptionChange,\n scope,\n onScopeChange,\n status,\n onStatusChange,\n isEdit = false,\n}) => {\n return (\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-name\" className=\"text-sm font-medium text-text-primary\">\n Vault Name\n </label>\n <Input\n id=\"vault-name\"\n placeholder=\"e.g. Production Credentials\"\n value={name}\n onChange={(e) => onNameChange(e.target.value)}\n required\n />\n <p className=\"text-xs text-text-secondary\">A descriptive name for your vault.</p>\n </div>\n\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-description\" className=\"text-sm font-medium text-text-primary\">\n Description\n </label>\n <Input\n id=\"vault-description\"\n placeholder=\"e.g. API keys and database credentials for production\"\n value={description}\n onChange={(e) => onDescriptionChange(e.target.value)}\n />\n </div>\n\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-scope\" className=\"text-sm font-medium text-text-primary\">\n Scope\n </label>\n <Select\n id=\"vault-scope\"\n value={scope}\n onChange={onScopeChange}\n options={[\n { value: 'WORKSPACE', label: 'Workspace (All members)' },\n { value: 'PERSONAL', label: 'Personal (Only me)' },\n { value: 'PRODUCT', label: 'Product' },\n { value: 'TENANT', label: 'Tenant' },\n ]}\n disabled={isEdit}\n />\n <p className=\"text-xs text-text-secondary\">\n {isEdit\n ? 'Scope cannot be changed after creation.'\n : 'Who can access this vault by default.'}\n </p>\n </div>\n\n {isEdit && onStatusChange && (\n <div className=\"space-y-2\">\n <label htmlFor=\"vault-status\" className=\"text-sm font-medium text-text-primary\">\n Status\n </label>\n <Select\n id=\"vault-status\"\n value={status || 'ACTIVE'}\n onChange={(v) => onStatusChange(v as VaultStatus)}\n options={[\n { value: 'ACTIVE', label: 'Active' },\n { value: 'LOCKED', label: 'Locked' },\n { value: 'ARCHIVED', label: 'Archived' },\n ]}\n />\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;AAgBA,IAAa,KAA6C,EACxD,SACA,iBACA,gBACA,wBACA,UACA,kBACA,WACA,mBACA,YAAS,SAGP,kBAAC,OAAD;CAAK,WAAU;WAAf;EACE,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,SAAD;KAAO,SAAQ;KAAa,WAAU;eAAwC;KAEtE,CAAA;IACR,kBAAC,GAAD;KACE,IAAG;KACH,aAAY;KACZ,OAAO;KACP,WAAW,MAAM,EAAa,EAAE,OAAO,MAAM;KAC7C,UAAA;KACA,CAAA;IACF,kBAAC,KAAD;KAAG,WAAU;eAA8B;KAAsC,CAAA;IAC7E;;EAEN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,SAAD;IAAO,SAAQ;IAAoB,WAAU;cAAwC;IAE7E,CAAA,EACR,kBAAC,GAAD;IACE,IAAG;IACH,aAAY;IACZ,OAAO;IACP,WAAW,MAAM,EAAoB,EAAE,OAAO,MAAM;IACpD,CAAA,CACE;;EAEN,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,SAAD;KAAO,SAAQ;KAAc,WAAU;eAAwC;KAEvE,CAAA;IACR,kBAAC,GAAD;KACE,IAAG;KACH,OAAO;KACP,UAAU;KACV,SAAS;MACP;OAAE,OAAO;OAAa,OAAO;OAA2B;MACxD;OAAE,OAAO;OAAY,OAAO;OAAsB;MAClD;OAAE,OAAO;OAAW,OAAO;OAAW;MACtC;OAAE,OAAO;OAAU,OAAO;OAAU;MACrC;KACD,UAAU;KACV,CAAA;IACF,kBAAC,KAAD;KAAG,WAAU;eACV,IACG,4CACA;KACF,CAAA;IACA;;EAEL,KAAU,KACT,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,SAAD;IAAO,SAAQ;IAAe,WAAU;cAAwC;IAExE,CAAA,EACR,kBAAC,GAAD;IACE,IAAG;IACH,OAAO,KAAU;IACjB,WAAW,MAAM,EAAe,EAAiB;IACjD,SAAS;KACP;MAAE,OAAO;MAAU,OAAO;MAAU;KACpC;MAAE,OAAO;MAAU,OAAO;MAAU;KACpC;MAAE,OAAO;MAAY,OAAO;MAAY;KACzC;IACD,CAAA,CACE;;EAEJ"}
@@ -3,85 +3,71 @@ import { Button as t, Input as n, Select as r } from "./ui.js";
3
3
  import { VAULT_ROLES as i } from "../constants/permissions.js";
4
4
  import { useState as a } from "react";
5
5
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { UserPlus as c, X as l } from "lucide-react";
6
+ import { UserPlus as c } from "lucide-react";
7
+ import { Dialog as l, DialogContent as u, DialogHeader as d, DialogTitle as f } from "@burdenoff/fe-libs/ui";
7
8
  //#region src/security/components/VaultShareDialog.tsx
8
- var u = ({ isOpen: u, onClose: d, onInvite: f, vaultName: p, className: m }) => {
9
- let [h, g] = a(""), [_, v] = a("viewer");
10
- if (!u) return null;
11
- let y = (e) => {
12
- e.preventDefault(), h.trim() && (f(h.trim(), _), g(""), v("viewer"));
13
- }, b = i.flatMap((e) => e.value === "owner" ? [] : [{
9
+ var p = ({ isOpen: p, onClose: m, onInvite: h, vaultName: g, className: _ }) => {
10
+ let [v, y] = a(""), [b, x] = a("viewer"), S = (e) => {
11
+ e.preventDefault(), v.trim() && (h(v.trim(), b), y(""), x("viewer"));
12
+ }, C = i.flatMap((e) => e.value === "owner" ? [] : [{
14
13
  value: e.value,
15
14
  label: `${e.label} - ${e.description}`
16
15
  }]);
17
- return /* @__PURE__ */ s("div", {
18
- className: "fixed inset-0 z-50 flex items-center justify-center",
19
- children: [/* @__PURE__ */ o("button", {
20
- type: "button",
21
- "aria-label": "Close dialog",
22
- className: "absolute inset-0 bg-black/50 cursor-default",
23
- onClick: d
24
- }), /* @__PURE__ */ s("div", {
25
- className: e("relative z-10 w-full max-w-md rounded-lg bg-card border border-border shadow-lg p-6", m),
16
+ return /* @__PURE__ */ o(l, {
17
+ open: p,
18
+ onOpenChange: (e) => {
19
+ e || m();
20
+ },
21
+ children: /* @__PURE__ */ s(u, {
22
+ className: e("max-w-md", _),
26
23
  children: [
27
- /* @__PURE__ */ s("div", {
28
- className: "flex items-center justify-between mb-4",
29
- children: [/* @__PURE__ */ o("h2", {
30
- className: "text-lg font-semibold text-foreground",
31
- children: "Share Vault"
32
- }), /* @__PURE__ */ o("button", {
33
- type: "button",
34
- onClick: d,
35
- className: "p-1 rounded hover:bg-accent text-muted-foreground",
36
- children: /* @__PURE__ */ o(l, { className: "size-4" })
37
- })]
38
- }),
24
+ /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(f, { children: "Share Vault" }) }),
39
25
  /* @__PURE__ */ s("p", {
40
- className: "text-sm text-muted-foreground mb-4",
26
+ className: "text-sm text-text-secondary",
41
27
  children: ["Invite a member to ", /* @__PURE__ */ o("span", {
42
- className: "font-medium text-foreground",
43
- children: p
28
+ className: "font-medium text-text-primary",
29
+ children: g
44
30
  })]
45
31
  }),
46
32
  /* @__PURE__ */ s("form", {
47
- onSubmit: y,
33
+ onSubmit: S,
48
34
  className: "space-y-4",
49
35
  children: [
50
36
  /* @__PURE__ */ o(n, {
51
37
  id: "invite-email",
52
38
  label: "User email or actor ID",
53
39
  type: "text",
54
- value: h,
55
- onChange: (e) => g(e.target.value),
40
+ value: v,
41
+ onChange: (e) => y(e.target.value),
56
42
  placeholder: "colleague@example.com",
57
43
  required: !0
58
44
  }),
59
45
  /* @__PURE__ */ o(r, {
60
46
  label: "Role",
61
- value: _,
62
- onChange: (e) => v(e),
63
- options: b
47
+ value: b,
48
+ onChange: (e) => x(e),
49
+ options: C
64
50
  }),
65
51
  /* @__PURE__ */ s("div", {
66
52
  className: "flex justify-end gap-2 pt-2",
67
53
  children: [/* @__PURE__ */ o(t, {
68
54
  variant: "outline",
69
- onClick: d,
55
+ onClick: m,
70
56
  type: "button",
71
57
  children: "Cancel"
72
58
  }), /* @__PURE__ */ s(t, {
73
59
  type: "submit",
74
- disabled: !h.trim(),
60
+ disabled: !v.trim(),
75
61
  children: [/* @__PURE__ */ o(c, { className: "size-4" }), "Invite"]
76
62
  })]
77
63
  })
78
64
  ]
79
65
  })
80
66
  ]
81
- })]
67
+ })
82
68
  });
83
69
  };
84
70
  //#endregion
85
- export { u as VaultShareDialog };
71
+ export { p as VaultShareDialog };
86
72
 
87
73
  //# sourceMappingURL=VaultShareDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VaultShareDialog.js","names":[],"sources":["../../../src/security/components/VaultShareDialog.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport { X, UserPlus } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Button, Input, Select } from './ui';\nimport { VAULT_ROLES } from '../constants/permissions';\nimport type { VaultRole } from '../types';\n\ninterface VaultShareDialogProps {\n isOpen: boolean;\n onClose: () => void;\n onInvite: (email: string, role: VaultRole) => void;\n vaultName: string;\n className?: string;\n}\n\n/**\n * Dialog for inviting members to a vault with a role dropdown.\n */\nexport const VaultShareDialog: FC<VaultShareDialogProps> = ({\n isOpen,\n onClose,\n onInvite,\n vaultName,\n className,\n}) => {\n const [email, setEmail] = useState('');\n const [role, setRole] = useState<VaultRole>('viewer');\n\n if (!isOpen) return null;\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (!email.trim()) return;\n onInvite(email.trim(), role);\n setEmail('');\n setRole('viewer');\n };\n\n const roleOptions = VAULT_ROLES.flatMap((r) =>\n r.value === 'owner' ? [] : [{ value: r.value, label: `${r.label} - ${r.description}` }]\n );\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n {/* Backdrop */}\n <button\n type=\"button\"\n aria-label=\"Close dialog\"\n className=\"absolute inset-0 bg-black/50 cursor-default\"\n onClick={onClose}\n />\n\n {/* Dialog */}\n <div\n className={cn(\n 'relative z-10 w-full max-w-md rounded-lg bg-card border border-border shadow-lg p-6',\n className\n )}\n >\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-foreground\">Share Vault</h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 rounded hover:bg-accent text-muted-foreground\"\n >\n <X className=\"size-4\" />\n </button>\n </div>\n\n <p className=\"text-sm text-muted-foreground mb-4\">\n Invite a member to <span className=\"font-medium text-foreground\">{vaultName}</span>\n </p>\n\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <Input\n id=\"invite-email\"\n label=\"User email or actor ID\"\n type=\"text\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n placeholder=\"colleague@example.com\"\n required\n />\n\n <Select\n label=\"Role\"\n value={role}\n onChange={(v) => setRole(v as VaultRole)}\n options={roleOptions}\n />\n\n <div className=\"flex justify-end gap-2 pt-2\">\n <Button variant=\"outline\" onClick={onClose} type=\"button\">\n Cancel\n </Button>\n <Button type=\"submit\" disabled={!email.trim()}>\n <UserPlus className=\"size-4\" />\n Invite\n </Button>\n </div>\n </form>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAkBA,IAAa,KAA+C,EAC1D,WACA,YACA,aACA,cACA,mBACI;CACJ,IAAM,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,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,GAAD;QAAQ,MAAK;QAAS,UAAU,CAAC,EAAM,MAAM;kBAA7C,CACE,kBAAC,GAAD,EAAU,WAAU,UAAW,CAAA,EAAA,SAExB;UACL;;MACD;;IACH;KACF"}
1
+ {"version":3,"file":"VaultShareDialog.js","names":[],"sources":["../../../src/security/components/VaultShareDialog.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport { UserPlus } from 'lucide-react';\nimport { Dialog, DialogContent, DialogHeader, DialogTitle } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { Button, Input, Select } from './ui';\nimport { VAULT_ROLES } from '../constants/permissions';\nimport type { VaultRole } from '../types';\n\ninterface VaultShareDialogProps {\n isOpen: boolean;\n onClose: () => void;\n onInvite: (email: string, role: VaultRole) => void;\n vaultName: string;\n className?: string;\n}\n\n/**\n * Dialog for inviting members to a vault with a role dropdown.\n */\nexport const VaultShareDialog: FC<VaultShareDialogProps> = ({\n isOpen,\n onClose,\n onInvite,\n vaultName,\n className,\n}) => {\n const [email, setEmail] = useState('');\n const [role, setRole] = useState<VaultRole>('viewer');\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (!email.trim()) return;\n onInvite(email.trim(), role);\n setEmail('');\n setRole('viewer');\n };\n\n const roleOptions = VAULT_ROLES.flatMap((r) =>\n r.value === 'owner' ? [] : [{ value: r.value, label: `${r.label} - ${r.description}` }]\n );\n\n return (\n <Dialog\n open={isOpen}\n onOpenChange={(open) => {\n if (!open) onClose();\n }}\n >\n <DialogContent className={cn('max-w-md', className)}>\n <DialogHeader>\n <DialogTitle>Share Vault</DialogTitle>\n </DialogHeader>\n\n <p className=\"text-sm text-text-secondary\">\n Invite a member to <span className=\"font-medium text-text-primary\">{vaultName}</span>\n </p>\n\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <Input\n id=\"invite-email\"\n label=\"User email or actor ID\"\n type=\"text\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n placeholder=\"colleague@example.com\"\n required\n />\n\n <Select\n label=\"Role\"\n value={role}\n onChange={(v) => setRole(v as VaultRole)}\n options={roleOptions}\n />\n\n <div className=\"flex justify-end gap-2 pt-2\">\n <Button variant=\"outline\" onClick={onClose} type=\"button\">\n Cancel\n </Button>\n <Button type=\"submit\" disabled={!email.trim()}>\n <UserPlus className=\"size-4\" />\n Invite\n </Button>\n </div>\n </form>\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":";;;;;;;;AAmBA,IAAa,KAA+C,EAC1D,WACA,YACA,aACA,cACA,mBACI;CACJ,IAAM,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,CAAC,GAAM,KAAW,EAAoB,SAAS,EAE/C,KAAgB,MAAuB;AAC3C,IAAE,gBAAgB,EACb,EAAM,MAAM,KACjB,EAAS,EAAM,MAAM,EAAE,EAAK,EAC5B,EAAS,GAAG,EACZ,EAAQ,SAAS;IAGb,IAAc,EAAY,SAAS,MACvC,EAAE,UAAU,UAAU,EAAE,GAAG,CAAC;EAAE,OAAO,EAAE;EAAO,OAAO,GAAG,EAAE,MAAM,KAAK,EAAE;EAAe,CAAC,CACxF;AAED,QACE,kBAAC,GAAD;EACE,MAAM;EACN,eAAe,MAAS;AACtB,GAAK,KAAM,GAAS;;YAGtB,kBAAC,GAAD;GAAe,WAAW,EAAG,YAAY,EAAU;aAAnD;IACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAa,eAAyB,CAAA,EACzB,CAAA;IAEf,kBAAC,KAAD;KAAG,WAAU;eAAb,CAA2C,uBACtB,kBAAC,QAAD;MAAM,WAAU;gBAAiC;MAAiB,CAAA,CACnF;;IAEJ,kBAAC,QAAD;KAAM,UAAU;KAAc,WAAU;eAAxC;MACE,kBAAC,GAAD;OACE,IAAG;OACH,OAAM;OACN,MAAK;OACL,OAAO;OACP,WAAW,MAAM,EAAS,EAAE,OAAO,MAAM;OACzC,aAAY;OACZ,UAAA;OACA,CAAA;MAEF,kBAAC,GAAD;OACE,OAAM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