@burdenoff/microfe-security 2026.602.2 → 2026.624.1

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 +5 -5
  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 +27 -27
  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 +25 -25
  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 +1 -1
  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 +5 -5
  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 +17 -17
  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 +34 -34
  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 +38 -38
  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":"ImportWizard.js","names":[],"sources":["../../../src/security/components/ImportWizard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useRef, useState } from 'react';\nimport {\n Upload,\n FileText,\n CheckCircle,\n XCircle,\n AlertTriangle,\n Loader2,\n KeyRound,\n ArchiveRestore,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Button, Card, Badge, Select, Input } from './ui';\nimport { useImportExport } from '../hooks/useImportExport';\nimport { useGetVaults } from '../hooks/useVaultQueries';\n\n/**\n * Multi-step import wizard supporting plain secret imports and encrypted backup restores.\n */\nexport const ImportWizard: FC = () => {\n const fileInputRef = useRef<HTMLInputElement>(null);\n const { importState, importing, handleFileSelect, executeImport, resetImport } =\n useImportExport();\n const { data: vaultsData } = useGetVaults(undefined, { limit: 100 });\n const vaults = vaultsData?.getVaults?.items ?? [];\n const [selectedVaultId, setSelectedVaultId] = useState('');\n const [backupPassword, setBackupPassword] = useState('');\n\n const vaultOptions = [\n { value: '', label: 'Select a vault...' },\n ...vaults.map((vault: Record<string, unknown>) => ({\n value: vault.id as string,\n label: vault.name as string,\n })),\n ];\n\n const handleFileDrop = (event: React.DragEvent) => {\n event.preventDefault();\n const file = event.dataTransfer.files[0];\n if (file) handleFileSelect(file);\n };\n\n const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file) handleFileSelect(file);\n };\n\n if (importState.status === 'idle') {\n return (\n <Card\n className={cn(\n 'p-8 border-2 border-dashed border-border',\n 'flex flex-col items-center justify-center text-center cursor-pointer',\n 'hover:border-primary/50 transition-colors'\n )}\n onClick={() => fileInputRef.current?.click()}\n >\n <div\n onDragOver={(event) => event.preventDefault()}\n onDrop={handleFileDrop}\n className=\"flex flex-col items-center gap-3\"\n >\n <div className=\"p-3 rounded-full bg-primary/10\">\n <Upload className=\"size-8 text-primary\" />\n </div>\n <div>\n <h3 className=\"font-semibold text-foreground\">Upload import file</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">\n Supported: .json, .csv, .env, .zip.enc, .boffbackup\n </p>\n </div>\n <Button\n variant=\"outline\"\n onClick={(event) => {\n event.stopPropagation();\n fileInputRef.current?.click();\n }}\n >\n Browse Files\n </Button>\n </div>\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\".json,.csv,.env,.zip.enc,.boffbackup,.backup.enc\"\n onChange={handleFileChange}\n className=\"hidden\"\n aria-label=\"Choose secrets file to import\"\n />\n </Card>\n );\n }\n\n if (importState.status === 'error') {\n return (\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <div className=\"p-2 rounded-lg bg-destructive/10\">\n <XCircle className=\"size-6 text-destructive\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-destructive\">Import failed</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">{importState.error}</p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-3\" onClick={resetImport}>\n Try Again\n </Button>\n </div>\n </div>\n </Card>\n );\n }\n\n if (importState.status === 'ready') {\n const isBackup = importState.sourceType === 'backup';\n\n return (\n <div className=\"space-y-4\">\n <Card className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-4\">\n {isBackup ? (\n <ArchiveRestore className=\"size-5 text-primary\" />\n ) : (\n <FileText className=\"size-5 text-primary\" />\n )}\n <div>\n <h3 className=\"font-semibold text-foreground\">{importState.fileName}</h3>\n <p className=\"text-sm text-muted-foreground\">\n {isBackup\n ? 'Encrypted backup archive detected. Provide the emailed password to restore it.'\n : `${importState.parsedSecrets.length} secrets found`}\n </p>\n </div>\n </div>\n\n {!isBackup && (\n <div className=\"overflow-x-auto border rounded-md border-border\">\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"border-b border-border bg-muted/50\">\n <th className=\"text-left py-2 px-3 font-medium text-muted-foreground\">Name</th>\n <th className=\"text-left py-2 px-3 font-medium text-muted-foreground\">Key</th>\n <th className=\"text-left py-2 px-3 font-medium text-muted-foreground\">Type</th>\n <th className=\"text-left py-2 px-3 font-medium text-muted-foreground\">Value</th>\n </tr>\n </thead>\n <tbody>\n {importState.parsedSecrets.slice(0, 20).map((secret) => (\n <tr\n key={`${secret.name}:${secret.key ?? ''}`}\n className=\"border-b border-border last:border-b-0\"\n >\n <td className=\"py-2 px-3 font-medium\">{secret.name}</td>\n <td className=\"py-2 px-3 font-mono text-muted-foreground\">{secret.key}</td>\n <td className=\"py-2 px-3\">\n <Badge variant=\"outline\">{secret.type}</Badge>\n </td>\n <td className=\"py-2 px-3 font-mono text-muted-foreground\">\n {'*'.repeat(Math.min(16, secret.value.length))}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n {importState.parsedSecrets.length > 20 && (\n <p className=\"text-xs text-muted-foreground text-center py-2\">\n ...and {importState.parsedSecrets.length - 20} more\n </p>\n )}\n </div>\n )}\n </Card>\n\n <Card className=\"p-6 space-y-3\">\n <h3 className=\"font-semibold text-foreground\">Import destination</h3>\n <Select\n label=\"Target Vault\"\n value={selectedVaultId}\n onChange={setSelectedVaultId}\n options={vaultOptions}\n />\n\n {isBackup && (\n <Input\n id=\"backup-password\"\n label=\"Backup Password\"\n type=\"password\"\n value={backupPassword}\n onChange={(event) => setBackupPassword(event.target.value)}\n placeholder=\"Paste the password from your email\"\n required\n />\n )}\n\n <div className=\"flex justify-end gap-2 pt-2\">\n <Button variant=\"outline\" onClick={resetImport}>\n Cancel\n </Button>\n <Button\n onClick={() => executeImport(selectedVaultId, backupPassword)}\n disabled={!selectedVaultId || importing || (isBackup && !backupPassword.trim())}\n >\n {importing ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : isBackup ? (\n <KeyRound className=\"size-4\" />\n ) : (\n <Upload className=\"size-4\" />\n )}\n {importing\n ? 'Importing...'\n : isBackup\n ? 'Restore Backup'\n : `Import ${importState.parsedSecrets.length} Secrets`}\n </Button>\n </div>\n </Card>\n </div>\n );\n }\n\n if (importState.status === 'importing') {\n return (\n <Card className=\"p-8\">\n <div className=\"flex flex-col items-center gap-3 text-center\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n <h3 className=\"font-semibold text-foreground\">Importing secrets…</h3>\n <p className=\"text-sm text-muted-foreground\">This may take a moment.</p>\n </div>\n </Card>\n );\n }\n\n if (\n (importState.status === 'completed' ||\n importState.status === 'partial' ||\n importState.status === 'skipped') &&\n importState.results\n ) {\n const isPartial = importState.status === 'partial';\n const isSkipped = importState.status === 'skipped';\n\n const headerCopy = isPartial\n ? 'Import partially completed'\n : isSkipped\n ? 'Nothing imported'\n : 'Import complete';\n\n const headerIconClass = isPartial\n ? 'bg-status-warning-bg-subtle'\n : isSkipped\n ? 'bg-muted'\n : 'bg-status-success-bg-subtle';\n const headerIconColor = isPartial\n ? 'text-status-warning-text'\n : isSkipped\n ? 'text-muted-foreground'\n : 'text-status-success-text';\n\n return (\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <div className={cn('p-2 rounded-lg', headerIconClass)}>\n {isPartial ? (\n <AlertTriangle className={cn('size-6', headerIconColor)} />\n ) : isSkipped ? (\n <FileText className={cn('size-6', headerIconColor)} />\n ) : (\n <CheckCircle className={cn('size-6', headerIconColor)} />\n )}\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-foreground\">{headerCopy}</h3>\n {/*\n The summary message is only rendered for the partial /\n skipped statuses by design — `completed` should always have\n `error: null` per the state machine contract. Gating\n explicitly on the status here (rather than just\n `importState.error && ...`) means a future caller that\n forgets to clear `error` when transitioning to `completed`\n cannot accidentally show a muted message under the green\n success header.\n */}\n {(isPartial || isSkipped) && importState.error && (\n <p className=\"text-sm text-muted-foreground mt-1\">{importState.error}</p>\n )}\n <div className=\"flex items-center gap-3 mt-2\">\n <Badge variant=\"success\">{importState.results.imported} imported</Badge>\n {importState.results.skipped > 0 && (\n <Badge variant=\"warning\">{importState.results.skipped} skipped</Badge>\n )}\n {importState.results.errors.length > 0 && (\n <Badge variant=\"destructive\">{importState.results.errors.length} errors</Badge>\n )}\n </div>\n {importState.results.errors.length > 0 && (\n <ul className=\"mt-3 space-y-1\">\n {importState.results.errors.map((error) => (\n <li key={error} className=\"text-sm text-destructive flex items-center gap-1\">\n <AlertTriangle className=\"size-3 shrink-0\" />\n {error}\n </li>\n ))}\n </ul>\n )}\n <Button variant=\"outline\" size=\"sm\" className=\"mt-4\" onClick={resetImport}>\n Import More\n </Button>\n </div>\n </div>\n </Card>\n );\n }\n\n return null;\n};\n"],"mappings":";;;;;;;;AAoBA,IAAa,UAAyB;CACpC,IAAM,IAAe,EAAyB,KAAK,EAC7C,EAAE,gBAAa,cAAW,qBAAkB,kBAAe,mBAC/D,GAAiB,EACb,EAAE,MAAM,MAAe,EAAa,KAAA,GAAW,EAAE,OAAO,KAAK,CAAC,EAC9D,IAAS,GAAY,WAAW,SAAS,EAAE,EAC3C,CAAC,GAAiB,KAAsB,EAAS,GAAG,EACpD,CAAC,GAAgB,KAAqB,EAAS,GAAG,EAElD,IAAe,CACnB;EAAE,OAAO;EAAI,OAAO;EAAqB,EACzC,GAAG,EAAO,KAAK,OAAoC;EACjD,OAAO,EAAM;EACb,OAAO,EAAM;EACd,EAAE,CACJ,EAEK,KAAkB,MAA2B;AACjD,IAAM,gBAAgB;EACtB,IAAM,IAAO,EAAM,aAAa,MAAM;AACtC,EAAI,KAAM,EAAiB,EAAK;IAG5B,KAAoB,MAA+C;EACvE,IAAM,IAAO,EAAM,OAAO,QAAQ;AAClC,EAAI,KAAM,EAAiB,EAAK;;AAGlC,KAAI,EAAY,WAAW,OACzB,QACE,kBAAC,GAAD;EACE,WAAW,EACT,4CACA,wEACA,4CACD;EACD,eAAe,EAAa,SAAS,OAAO;YAN9C,CAQE,kBAAC,OAAD;GACE,aAAa,MAAU,EAAM,gBAAgB;GAC7C,QAAQ;GACR,WAAU;aAHZ;IAKE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAQ,WAAU,uBAAwB,CAAA;KACtC,CAAA;IACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAA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AA;OAW7D,KAAa,MAAc,EAAY,SACvC,kBAAC,KAAD;OAAG,WAAU;iBAAsC,EAAY;OAAU,CAAA;MAE3E,kBAAC,OAAD;OAAK,WAAU;iBAAf;QACE,kBAAC,GAAD;SAAO,SAAQ;mBAAf,CAA0B,EAAY,QAAQ,UAAS,YAAiB;;QACvE,EAAY,QAAQ,UAAU,KAC7B,kBAAC,GAAD;SAAO,SAAQ;mBAAf,CAA0B,EAAY,QAAQ,SAAQ,WAAgB;;QAEvE,EAAY,QAAQ,OAAO,SAAS,KACnC,kBAAC,GAAD;SAAO,SAAQ;mBAAf,CAA8B,EAAY,QAAQ,OAAO,QAAO,UAAe;;QAE7E;;MACL,EAAY,QAAQ,OAAO,SAAS,KACnC,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAY,QAAQ,OAAO,KAAK,MAC/B,kBAAC,MAAD;QAAgB,WAAU;kBAA1B,CACE,kBAAC,GAAD,EAAe,WAAU,mBAAoB,CAAA,EAC5C,EACE;UAHI,EAGJ,CACL;OACC,CAAA;MAEP,kBAAC,GAAD;OAAQ,SAAQ;OAAU,MAAK;OAAK,WAAU;OAAO,SAAS;iBAAa;OAElE,CAAA;MACL;OACF;;GACD,CAAA;;AAIX,QAAO"}
1
+ {"version":3,"file":"ImportWizard.js","names":[],"sources":["../../../src/security/components/ImportWizard.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useRef, useState } from 'react';\nimport {\n Upload,\n FileText,\n CheckCircle,\n XCircle,\n AlertTriangle,\n Loader2,\n KeyRound,\n ArchiveRestore,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { Button, Card, Badge, Select, Input } from './ui';\nimport { useImportExport } from '../hooks/useImportExport';\nimport { useGetVaults } from '../hooks/useVaultQueries';\n\n/**\n * Multi-step import wizard supporting plain secret imports and encrypted backup restores.\n */\nexport const ImportWizard: FC = () => {\n const fileInputRef = useRef<HTMLInputElement>(null);\n const { importState, importing, handleFileSelect, executeImport, resetImport } =\n useImportExport();\n const { data: vaultsData } = useGetVaults(undefined, { limit: 100 });\n const vaults = vaultsData?.getVaults?.items ?? [];\n const [selectedVaultId, setSelectedVaultId] = useState('');\n const [backupPassword, setBackupPassword] = useState('');\n\n const vaultOptions = [\n { value: '', label: 'Select a vault...' },\n ...vaults.map((vault: Record<string, unknown>) => ({\n value: vault.id as string,\n label: vault.name as string,\n })),\n ];\n\n const handleFileDrop = (event: React.DragEvent) => {\n event.preventDefault();\n const file = event.dataTransfer.files[0];\n if (file) handleFileSelect(file);\n };\n\n const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file) handleFileSelect(file);\n };\n\n if (importState.status === 'idle') {\n return (\n <Card\n className={cn(\n 'p-8 border-2 border-dashed border-border-subtle',\n 'flex flex-col items-center justify-center text-center cursor-pointer',\n 'hover:border-primary/50 transition-colors'\n )}\n onClick={() => fileInputRef.current?.click()}\n >\n <div\n onDragOver={(event) => event.preventDefault()}\n onDrop={handleFileDrop}\n className=\"flex flex-col items-center gap-3\"\n >\n <div className=\"p-3 rounded-full bg-action-primary-bg/10\">\n <Upload className=\"size-8 text-primary\" />\n </div>\n <div>\n <h3 className=\"font-semibold text-text-primary\">Upload import file</h3>\n <p className=\"text-sm text-text-secondary mt-1\">\n Supported: .json, .csv, .env, .zip.enc, .boffbackup\n </p>\n </div>\n <Button\n variant=\"outline\"\n onClick={(event) => {\n event.stopPropagation();\n fileInputRef.current?.click();\n }}\n >\n Browse Files\n </Button>\n </div>\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\".json,.csv,.env,.zip.enc,.boffbackup,.backup.enc\"\n onChange={handleFileChange}\n className=\"hidden\"\n aria-label=\"Choose secrets file to import\"\n />\n </Card>\n );\n }\n\n if (importState.status === 'error') {\n return (\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <div className=\"p-2 rounded-lg bg-status-error-bg/10\">\n <XCircle className=\"size-6 text-status-error-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text\">Import failed</h3>\n <p className=\"text-sm text-text-secondary mt-1\">{importState.error}</p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-3\" onClick={resetImport}>\n Try Again\n </Button>\n </div>\n </div>\n </Card>\n );\n }\n\n if (importState.status === 'ready') {\n const isBackup = importState.sourceType === 'backup';\n\n return (\n <div className=\"space-y-4\">\n <Card className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-4\">\n {isBackup ? (\n <ArchiveRestore className=\"size-5 text-primary\" />\n ) : (\n <FileText className=\"size-5 text-primary\" />\n )}\n <div>\n <h3 className=\"font-semibold text-text-primary\">{importState.fileName}</h3>\n <p className=\"text-sm text-text-secondary\">\n {isBackup\n ? 'Encrypted backup archive detected. Provide the emailed password to restore it.'\n : `${importState.parsedSecrets.length} secrets found`}\n </p>\n </div>\n </div>\n\n {!isBackup && (\n <div className=\"overflow-x-auto border rounded-md border-border-subtle\">\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"border-b border-border-subtle bg-bg-sunken/50\">\n <th className=\"text-left py-2 px-3 font-medium text-text-secondary\">Name</th>\n <th className=\"text-left py-2 px-3 font-medium text-text-secondary\">Key</th>\n <th className=\"text-left py-2 px-3 font-medium text-text-secondary\">Type</th>\n <th className=\"text-left py-2 px-3 font-medium text-text-secondary\">Value</th>\n </tr>\n </thead>\n <tbody>\n {importState.parsedSecrets.slice(0, 20).map((secret) => (\n <tr\n key={`${secret.name}:${secret.key ?? ''}`}\n className=\"border-b border-border-subtle last:border-b-0\"\n >\n <td className=\"py-2 px-3 font-medium\">{secret.name}</td>\n <td className=\"py-2 px-3 font-mono text-text-secondary\">{secret.key}</td>\n <td className=\"py-2 px-3\">\n <Badge variant=\"outline\">{secret.type}</Badge>\n </td>\n <td className=\"py-2 px-3 font-mono text-text-secondary\">\n {'*'.repeat(Math.min(16, secret.value.length))}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n {importState.parsedSecrets.length > 20 && (\n <p className=\"text-xs text-text-secondary text-center py-2\">\n ...and {importState.parsedSecrets.length - 20} more\n </p>\n )}\n </div>\n )}\n </Card>\n\n <Card className=\"p-6 space-y-3\">\n <h3 className=\"font-semibold text-text-primary\">Import destination</h3>\n <Select\n label=\"Target Vault\"\n value={selectedVaultId}\n onChange={setSelectedVaultId}\n options={vaultOptions}\n />\n\n {isBackup && (\n <Input\n id=\"backup-password\"\n label=\"Backup Password\"\n type=\"password\"\n value={backupPassword}\n onChange={(event) => setBackupPassword(event.target.value)}\n placeholder=\"Paste the password from your email\"\n required\n />\n )}\n\n <div className=\"flex justify-end gap-2 pt-2\">\n <Button variant=\"outline\" onClick={resetImport}>\n Cancel\n </Button>\n <Button\n onClick={() => executeImport(selectedVaultId, backupPassword)}\n disabled={!selectedVaultId || importing || (isBackup && !backupPassword.trim())}\n >\n {importing ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : isBackup ? (\n <KeyRound className=\"size-4\" />\n ) : (\n <Upload className=\"size-4\" />\n )}\n {importing\n ? 'Importing...'\n : isBackup\n ? 'Restore Backup'\n : `Import ${importState.parsedSecrets.length} Secrets`}\n </Button>\n </div>\n </Card>\n </div>\n );\n }\n\n if (importState.status === 'importing') {\n return (\n <Card className=\"p-8\">\n <div className=\"flex flex-col items-center gap-3 text-center\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n <h3 className=\"font-semibold text-text-primary\">Importing secrets…</h3>\n <p className=\"text-sm text-text-secondary\">This may take a moment.</p>\n </div>\n </Card>\n );\n }\n\n if (\n (importState.status === 'completed' ||\n importState.status === 'partial' ||\n importState.status === 'skipped') &&\n importState.results\n ) {\n const isPartial = importState.status === 'partial';\n const isSkipped = importState.status === 'skipped';\n\n const headerCopy = isPartial\n ? 'Import partially completed'\n : isSkipped\n ? 'Nothing imported'\n : 'Import complete';\n\n const headerIconClass = isPartial\n ? 'bg-status-warning-bg-subtle'\n : isSkipped\n ? 'bg-bg-sunken'\n : 'bg-status-success-bg-subtle';\n const headerIconColor = isPartial\n ? 'text-status-warning-text'\n : isSkipped\n ? 'text-text-secondary'\n : 'text-status-success-text';\n\n return (\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <div className={cn('p-2 rounded-lg', headerIconClass)}>\n {isPartial ? (\n <AlertTriangle className={cn('size-6', headerIconColor)} />\n ) : isSkipped ? (\n <FileText className={cn('size-6', headerIconColor)} />\n ) : (\n <CheckCircle className={cn('size-6', headerIconColor)} />\n )}\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary\">{headerCopy}</h3>\n {/*\n The summary message is only rendered for the partial /\n skipped statuses by design — `completed` should always have\n `error: null` per the state machine contract. Gating\n explicitly on the status here (rather than just\n `importState.error && ...`) means a future caller that\n forgets to clear `error` when transitioning to `completed`\n cannot accidentally show a muted message under the green\n success header.\n */}\n {(isPartial || isSkipped) && importState.error && (\n <p className=\"text-sm text-text-secondary mt-1\">{importState.error}</p>\n )}\n <div className=\"flex items-center gap-3 mt-2\">\n <Badge variant=\"success\">{importState.results.imported} imported</Badge>\n {importState.results.skipped > 0 && (\n <Badge variant=\"warning\">{importState.results.skipped} skipped</Badge>\n )}\n {importState.results.errors.length > 0 && (\n <Badge variant=\"destructive\">{importState.results.errors.length} errors</Badge>\n )}\n </div>\n {importState.results.errors.length > 0 && (\n <ul className=\"mt-3 space-y-1\">\n {importState.results.errors.map((error) => (\n <li key={error} className=\"text-sm text-status-error-text flex items-center gap-1\">\n <AlertTriangle className=\"size-3 shrink-0\" />\n {error}\n </li>\n ))}\n </ul>\n )}\n <Button variant=\"outline\" size=\"sm\" className=\"mt-4\" onClick={resetImport}>\n Import More\n </Button>\n </div>\n </div>\n </Card>\n );\n }\n\n return null;\n};\n"],"mappings":";;;;;;;;AAoBA,IAAa,UAAyB;CACpC,IAAM,IAAe,EAAyB,KAAK,EAC7C,EAAE,gBAAa,cAAW,qBAAkB,kBAAe,mBAC/D,GAAiB,EACb,EAAE,MAAM,MAAe,EAAa,KAAA,GAAW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e;;QAE7E;;MACL,EAAY,QAAQ,OAAO,SAAS,KACnC,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAY,QAAQ,OAAO,KAAK,MAC/B,kBAAC,MAAD;QAAgB,WAAU;kBAA1B,CACE,kBAAC,GAAD,EAAe,WAAU,mBAAoB,CAAA,EAC5C,EACE;UAHI,EAGJ,CACL;OACC,CAAA;MAEP,kBAAC,GAAD;OAAQ,SAAQ;OAAU,MAAK;OAAK,WAAU;OAAO,SAAS;iBAAa;OAElE,CAAA;MACL;OACF;;GACD,CAAA;;AAIX,QAAO"}
@@ -6,10 +6,10 @@ var r = ({ title: r, description: i, actions: a, children: o, className: s }) =>
6
6
  children: [/* @__PURE__ */ n("div", {
7
7
  className: "flex items-start justify-between gap-4",
8
8
  children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("h1", {
9
- className: "text-2xl font-bold text-foreground",
9
+ className: "text-2xl font-bold text-text-primary",
10
10
  children: r
11
11
  }), i && /* @__PURE__ */ t("p", {
12
- className: "mt-1 text-sm text-muted-foreground",
12
+ className: "mt-1 text-sm text-text-secondary",
13
13
  children: i
14
14
  })] }), a && /* @__PURE__ */ t("div", {
15
15
  className: "flex items-center gap-2 shrink-0",
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/security/components/PageLayout.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\nexport interface Breadcrumb {\n label: string;\n path?: string;\n}\n\ninterface PageLayoutProps {\n title: string;\n description?: string;\n /**\n * Accepted for API compatibility with callers, but intentionally ignored:\n * the host shell (AppShellLayout → AutoBreadcrumbs) already renders\n * breadcrumbs for every page. Rendering them again here caused duplicate\n * breadcrumbs on pages like /security/*.\n */\n breadcrumbs?: Breadcrumb[];\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n}) => {\n return (\n <div className={cn('flex flex-col gap-6 p-6', className)}>\n {/* Header */}\n <div className=\"flex items-start justify-between gap-4\">\n <div>\n <h1 className=\"text-2xl font-bold text-foreground\">{title}</h1>\n {description && <p className=\"mt-1 text-sm text-muted-foreground\">{description}</p>}\n </div>\n {actions && <div className=\"flex items-center gap-2 shrink-0\">{actions}</div>}\n </div>\n\n {/* Content */}\n <div className=\"flex-1\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;AAuBA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,mBAGE,kBAAC,OAAD;CAAK,WAAW,EAAG,2BAA2B,EAAU;WAAxD,CAEE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAAsC;GAAW,CAAA,EAC9D,KAAe,kBAAC,KAAD;GAAG,WAAU;aAAsC;GAAgB,CAAA,CAC/E,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAAoC;GAAc,CAAA,CACzE;KAGN,kBAAC,OAAD;EAAK,WAAU;EAAU;EAAe,CAAA,CACpC"}
1
+ {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/security/components/PageLayout.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { cn } from '../utils/cn';\n\nexport interface Breadcrumb {\n label: string;\n path?: string;\n}\n\ninterface PageLayoutProps {\n title: string;\n description?: string;\n /**\n * Accepted for API compatibility with callers, but intentionally ignored:\n * the host shell (AppShellLayout → AutoBreadcrumbs) already renders\n * breadcrumbs for every page. Rendering them again here caused duplicate\n * breadcrumbs on pages like /security/*.\n */\n breadcrumbs?: Breadcrumb[];\n actions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const PageLayout: FC<PageLayoutProps> = ({\n title,\n description,\n actions,\n children,\n className,\n}) => {\n return (\n <div className={cn('flex flex-col gap-6 p-6', className)}>\n {/* Header */}\n <div className=\"flex items-start justify-between gap-4\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">{title}</h1>\n {description && <p className=\"mt-1 text-sm text-text-secondary\">{description}</p>}\n </div>\n {actions && <div className=\"flex items-center gap-2 shrink-0\">{actions}</div>}\n </div>\n\n {/* Content */}\n <div className=\"flex-1\">{children}</div>\n </div>\n );\n};\n"],"mappings":";;;AAuBA,IAAa,KAAmC,EAC9C,UACA,gBACA,YACA,aACA,mBAGE,kBAAC,OAAD;CAAK,WAAW,EAAG,2BAA2B,EAAU;WAAxD,CAEE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GAAI,WAAU;aAAwC;GAAW,CAAA,EAChE,KAAe,kBAAC,KAAD;GAAG,WAAU;aAAoC;GAAgB,CAAA,CAC7E,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;GAAK,WAAU;aAAoC;GAAc,CAAA,CACzE;KAGN,kBAAC,OAAD;EAAK,WAAU;EAAU;EAAe,CAAA,CACpC"}
@@ -17,19 +17,19 @@ var d = ({ onAccept: d, clipboardAutoClearMs: f = 3e4, className: p }) => {
17
17
  h(n), _(i(n));
18
18
  }, [m]), b = r(g);
19
19
  return /* @__PURE__ */ l("div", {
20
- className: e("space-y-4 rounded-lg border border-border p-4", p),
20
+ className: e("space-y-4 rounded-lg border border-border-subtle p-4", p),
21
21
  children: [
22
22
  /* @__PURE__ */ l("div", {
23
23
  className: "flex items-center gap-2",
24
24
  children: [
25
25
  /* @__PURE__ */ c("div", {
26
- className: "flex-1 px-3 py-2 rounded-md border border-border bg-muted/50 font-mono text-sm break-all select-all",
26
+ className: "flex-1 px-3 py-2 rounded-md border border-border-subtle bg-bg-sunken/50 font-mono text-sm break-all select-all",
27
27
  children: g
28
28
  }),
29
29
  /* @__PURE__ */ c("button", {
30
30
  type: "button",
31
31
  onClick: v,
32
- className: "p-2 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",
32
+ className: "p-2 rounded-md text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
33
33
  title: "Generate new password",
34
34
  children: /* @__PURE__ */ c(u, { className: "size-4" })
35
35
  }),
@@ -44,14 +44,14 @@ var d = ({ onAccept: d, clipboardAutoClearMs: f = 3e4, className: p }) => {
44
44
  children: [/* @__PURE__ */ l("div", {
45
45
  className: "flex justify-between text-xs",
46
46
  children: [/* @__PURE__ */ c("span", {
47
- className: "text-muted-foreground",
47
+ className: "text-text-secondary",
48
48
  children: "Strength"
49
49
  }), /* @__PURE__ */ c("span", {
50
50
  className: "font-medium capitalize",
51
51
  children: b.label
52
52
  })]
53
53
  }), /* @__PURE__ */ c("div", {
54
- className: "h-1.5 rounded-full bg-muted overflow-hidden",
54
+ className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden",
55
55
  children: /* @__PURE__ */ c("div", {
56
56
  className: e("h-full rounded-full transition-all duration-300", b.color),
57
57
  style: { width: `${b.score}%` }
@@ -63,7 +63,7 @@ var d = ({ onAccept: d, clipboardAutoClearMs: f = 3e4, className: p }) => {
63
63
  children: [/* @__PURE__ */ l("div", {
64
64
  className: "flex justify-between text-xs",
65
65
  children: [/* @__PURE__ */ c("span", {
66
- className: "text-muted-foreground",
66
+ className: "text-text-secondary",
67
67
  children: "Length"
68
68
  }), /* @__PURE__ */ c("span", {
69
69
  className: "font-medium tabular-nums",
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordGenerator.js","names":[],"sources":["../../../src/security/components/PasswordGenerator.tsx"],"sourcesContent":["import { type FC, useState, useCallback } from 'react';\nimport { RefreshCw } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport {\n generatePassword,\n calculatePasswordStrength,\n DEFAULT_PASSWORD_OPTIONS,\n type PasswordOptions,\n} from '../utils/passwordGenerator';\nimport { CopyButton } from './CopyButton';\nimport { Button } from './ui';\n\ninterface PasswordGeneratorProps {\n /** Called when user accepts the generated password */\n onAccept: (password: string) => void;\n /** Auto-clear clipboard timer */\n clipboardAutoClearMs?: number;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Password generator with configurable length, character sets, and strength meter.\n * Uses crypto.getRandomValues for cryptographically secure generation.\n */\nexport const PasswordGenerator: FC<PasswordGeneratorProps> = ({\n onAccept,\n clipboardAutoClearMs = 30000,\n className,\n}) => {\n const [options, setOptions] = useState<PasswordOptions>(DEFAULT_PASSWORD_OPTIONS);\n const [password, setPassword] = useState(() => generatePassword(DEFAULT_PASSWORD_OPTIONS));\n\n const regenerate = useCallback(() => {\n setPassword(generatePassword(options));\n }, [options]);\n\n const handleOptionChange = useCallback(\n (key: keyof PasswordOptions, value: boolean | number) => {\n const newOptions = { ...options, [key]: value };\n setOptions(newOptions);\n setPassword(generatePassword(newOptions));\n },\n [options]\n );\n\n const strength = calculatePasswordStrength(password);\n\n return (\n <div className={cn('space-y-4 rounded-lg border border-border p-4', className)}>\n {/* Generated password display */}\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 px-3 py-2 rounded-md border border-border bg-muted/50 font-mono text-sm break-all select-all\">\n {password}\n </div>\n <button\n type=\"button\"\n onClick={regenerate}\n className=\"p-2 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent transition-colors\"\n title=\"Generate new password\"\n >\n <RefreshCw className=\"size-4\" />\n </button>\n <CopyButton value={password} autoClearMs={clipboardAutoClearMs} />\n </div>\n\n {/* Strength meter */}\n <div className=\"space-y-1\">\n <div className=\"flex justify-between text-xs\">\n <span className=\"text-muted-foreground\">Strength</span>\n <span className=\"font-medium capitalize\">{strength.label}</span>\n </div>\n <div className=\"h-1.5 rounded-full bg-muted overflow-hidden\">\n <div\n className={cn('h-full rounded-full transition-all duration-300', strength.color)}\n style={{ width: `${strength.score}%` }}\n />\n </div>\n </div>\n\n {/* Length slider */}\n <div className=\"space-y-1\">\n <div className=\"flex justify-between text-xs\">\n <span className=\"text-muted-foreground\">Length</span>\n <span className=\"font-medium tabular-nums\">{options.length}</span>\n </div>\n <input\n type=\"range\"\n min={8}\n max={128}\n value={options.length}\n onChange={(e) => handleOptionChange('length', parseInt(e.target.value, 10))}\n className=\"w-full accent-primary\"\n aria-label=\"Password length\"\n />\n </div>\n\n {/* Character set toggles */}\n <div className=\"grid grid-cols-2 gap-2\">\n {[\n { key: 'uppercase' as const, label: 'Uppercase (A-Z)' },\n { key: 'lowercase' as const, label: 'Lowercase (a-z)' },\n { key: 'numbers' as const, label: 'Numbers (0-9)' },\n { key: 'symbols' as const, label: 'Symbols (!@#...)' },\n ].map(({ key, label }) => (\n <label key={key} className=\"flex items-center gap-2 text-sm cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={options[key]}\n onChange={(e) => handleOptionChange(key, e.target.checked)}\n className=\"rounded accent-primary\"\n aria-label={label}\n />\n {label}\n </label>\n ))}\n <label className=\"flex items-center gap-2 text-sm cursor-pointer col-span-2\">\n <input\n type=\"checkbox\"\n checked={options.excludeAmbiguous}\n onChange={(e) => handleOptionChange('excludeAmbiguous', e.target.checked)}\n className=\"rounded accent-primary\"\n aria-label=\"Exclude ambiguous characters\"\n />\n Exclude ambiguous (0, O, l, 1, I)\n </label>\n </div>\n\n {/* Accept button */}\n <Button onClick={() => onAccept(password)} className=\"w-full\">\n Use This Password\n </Button>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAyBA,IAAa,KAAiD,EAC5D,aACA,0BAAuB,KACvB,mBACI;CACJ,IAAM,CAAC,GAAS,KAAc,EAA0B,EAAyB,EAC3E,CAAC,GAAU,KAAe,QAAe,EAAiB,EAAyB,CAAC,EAEpF,IAAa,QAAkB;AACnC,IAAY,EAAiB,EAAQ,CAAC;IACrC,CAAC,EAAQ,CAAC,EAEP,IAAqB,GACxB,GAA4B,MAA4B;EACvD,IAAM,IAAa;GAAE,GAAG;IAAU,IAAM;GAAO;AAE/C,EADA,EAAW,EAAW,EACtB,EAAY,EAAiB,EAAW,CAAC;IAE3C,CAAC,EAAQ,CACV,EAEK,IAAW,EAA0B,EAAS;AAEpD,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,iDA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,kBAAC,SAAD;KAAiB,WAAU;eAA3B,CACE,kBAAC,SAAD;MACE,MAAK;MACL,SAAS,EAAQ;MACjB,WAAW,MAAM,EAAmB,GAAK,EAAE,OAAO,QAAQ;MAC1D,WAAU;MACV,cAAY;MACZ,CAAA,EACD,EACK;OATI,EASJ,CACR,EACF,kBAAC,SAAD;KAAO,WAAU;eAAjB,CACE,kBAAC,SAAD;MACE,MAAK;MACL,SAAS,EAAQ;MACjB,WAAW,MAAM,EAAmB,oBAAoB,EAAE,OAAO,QAAQ;MACzE,WAAU;MACV,cAAW;MACX,CAAA,EAAA,oCAEI;OACJ;;GAGN,kBAAC,GAAD;IAAQ,eAAe,EAAS,EAAS;IAAE,WAAU;cAAS;IAErD,CAAA;GACL"}
1
+ {"version":3,"file":"PasswordGenerator.js","names":[],"sources":["../../../src/security/components/PasswordGenerator.tsx"],"sourcesContent":["import { type FC, useState, useCallback } from 'react';\nimport { RefreshCw } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport {\n generatePassword,\n calculatePasswordStrength,\n DEFAULT_PASSWORD_OPTIONS,\n type PasswordOptions,\n} from '../utils/passwordGenerator';\nimport { CopyButton } from './CopyButton';\nimport { Button } from './ui';\n\ninterface PasswordGeneratorProps {\n /** Called when user accepts the generated password */\n onAccept: (password: string) => void;\n /** Auto-clear clipboard timer */\n clipboardAutoClearMs?: number;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * Password generator with configurable length, character sets, and strength meter.\n * Uses crypto.getRandomValues for cryptographically secure generation.\n */\nexport const PasswordGenerator: FC<PasswordGeneratorProps> = ({\n onAccept,\n clipboardAutoClearMs = 30000,\n className,\n}) => {\n const [options, setOptions] = useState<PasswordOptions>(DEFAULT_PASSWORD_OPTIONS);\n const [password, setPassword] = useState(() => generatePassword(DEFAULT_PASSWORD_OPTIONS));\n\n const regenerate = useCallback(() => {\n setPassword(generatePassword(options));\n }, [options]);\n\n const handleOptionChange = useCallback(\n (key: keyof PasswordOptions, value: boolean | number) => {\n const newOptions = { ...options, [key]: value };\n setOptions(newOptions);\n setPassword(generatePassword(newOptions));\n },\n [options]\n );\n\n const strength = calculatePasswordStrength(password);\n\n return (\n <div className={cn('space-y-4 rounded-lg border border-border-subtle p-4', className)}>\n {/* Generated password display */}\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 px-3 py-2 rounded-md border border-border-subtle bg-bg-sunken/50 font-mono text-sm break-all select-all\">\n {password}\n </div>\n <button\n type=\"button\"\n onClick={regenerate}\n className=\"p-2 rounded-md text-text-secondary hover:text-text-primary hover:bg-accent transition-colors\"\n title=\"Generate new password\"\n >\n <RefreshCw className=\"size-4\" />\n </button>\n <CopyButton value={password} autoClearMs={clipboardAutoClearMs} />\n </div>\n\n {/* Strength meter */}\n <div className=\"space-y-1\">\n <div className=\"flex justify-between text-xs\">\n <span className=\"text-text-secondary\">Strength</span>\n <span className=\"font-medium capitalize\">{strength.label}</span>\n </div>\n <div className=\"h-1.5 rounded-full bg-bg-sunken overflow-hidden\">\n <div\n className={cn('h-full rounded-full transition-all duration-300', strength.color)}\n style={{ width: `${strength.score}%` }}\n />\n </div>\n </div>\n\n {/* Length slider */}\n <div className=\"space-y-1\">\n <div className=\"flex justify-between text-xs\">\n <span className=\"text-text-secondary\">Length</span>\n <span className=\"font-medium tabular-nums\">{options.length}</span>\n </div>\n <input\n type=\"range\"\n min={8}\n max={128}\n value={options.length}\n onChange={(e) => handleOptionChange('length', parseInt(e.target.value, 10))}\n className=\"w-full accent-primary\"\n aria-label=\"Password length\"\n />\n </div>\n\n {/* Character set toggles */}\n <div className=\"grid grid-cols-2 gap-2\">\n {[\n { key: 'uppercase' as const, label: 'Uppercase (A-Z)' },\n { key: 'lowercase' as const, label: 'Lowercase (a-z)' },\n { key: 'numbers' as const, label: 'Numbers (0-9)' },\n { key: 'symbols' as const, label: 'Symbols (!@#...)' },\n ].map(({ key, label }) => (\n <label key={key} className=\"flex items-center gap-2 text-sm cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={options[key]}\n onChange={(e) => handleOptionChange(key, e.target.checked)}\n className=\"rounded accent-primary\"\n aria-label={label}\n />\n {label}\n </label>\n ))}\n <label className=\"flex items-center gap-2 text-sm cursor-pointer col-span-2\">\n <input\n type=\"checkbox\"\n checked={options.excludeAmbiguous}\n onChange={(e) => handleOptionChange('excludeAmbiguous', e.target.checked)}\n className=\"rounded accent-primary\"\n aria-label=\"Exclude ambiguous characters\"\n />\n Exclude ambiguous (0, O, l, 1, I)\n </label>\n </div>\n\n {/* Accept button */}\n <Button onClick={() => onAccept(password)} className=\"w-full\">\n Use This Password\n </Button>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAyBA,IAAa,KAAiD,EAC5D,aACA,0BAAuB,KACvB,mBACI;CACJ,IAAM,CAAC,GAAS,KAAc,EAA0B,EAAyB,EAC3E,CAAC,GAAU,KAAe,QAAe,EAAiB,EAAyB,CAAC,EAEpF,IAAa,QAAkB;AACnC,IAAY,EAAiB,EAAQ,CAAC;IACrC,CAAC,EAAQ,CAAC,EAEP,IAAqB,GACxB,GAA4B,MAA4B;EACvD,IAAM,IAAa;GAAE,GAAG;IAAU,IAAM;GAAO;AAE/C,EADA,EAAW,EAAW,EACtB,EAAY,EAAiB,EAAW,CAAC;IAE3C,CAAC,EAAQ,CACV,EAEK,IAAW,EAA0B,EAAS;AAEpD,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,wDAAwD,EAAU;YAArF;GAEE,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,OAAD;MAAK,WAAU;gBACZ;MACG,CAAA;KACN,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,WAAU;MACV,OAAM;gBAEN,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA;MACzB,CAAA;KACT,kBAAC,GAAD;MAAY,OAAO;MAAU,aAAa;MAAwB,CAAA;KAC9D;;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,C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AAA,EAAA,oCAEI;OACJ;;GAGN,kBAAC,GAAD;IAAQ,eAAe,EAAS,EAAS;IAAE,WAAU;cAAS;IAErD,CAAA;GACL"}
@@ -12,7 +12,7 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
12
12
  children: [
13
13
  /* @__PURE__ */ s("label", {
14
14
  htmlFor: "secret-value-password",
15
- className: "text-sm font-medium text-foreground",
15
+ className: "text-sm font-medium text-text-primary",
16
16
  children: "Password"
17
17
  }),
18
18
  /* @__PURE__ */ s("input", {
@@ -22,7 +22,7 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
22
22
  value: r,
23
23
  onChange: (e) => i(e.target.value),
24
24
  placeholder: "Enter password",
25
- className: e("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")
25
+ 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)]")
26
26
  }),
27
27
  /* @__PURE__ */ s(t, {
28
28
  variant: "outline",
@@ -39,7 +39,7 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
39
39
  className: "space-y-1.5",
40
40
  children: [/* @__PURE__ */ s("label", {
41
41
  htmlFor: "secret-value-pem",
42
- className: "text-sm font-medium text-foreground",
42
+ className: "text-sm font-medium text-text-primary",
43
43
  children: n === "CERTIFICATE" ? "Certificate (PEM)" : "Private Key"
44
44
  }), /* @__PURE__ */ s("textarea", {
45
45
  id: "secret-value-pem",
@@ -48,13 +48,13 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
48
48
  onChange: (e) => i(e.target.value),
49
49
  placeholder: n === "CERTIFICATE" ? "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----" : "-----BEGIN OPENSSH PRIVATE KEY-----\n...\n-----END OPENSSH PRIVATE KEY-----",
50
50
  rows: 8,
51
- className: e("flex w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "resize-y min-h-[120px]")
51
+ 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 min-h-[120px]")
52
52
  })]
53
53
  }) : n === "STRUCTURED_DATA" ? /* @__PURE__ */ c("div", {
54
54
  className: "space-y-3",
55
55
  children: [/* @__PURE__ */ s("label", {
56
56
  htmlFor: "secret-value-json",
57
- className: "text-sm font-medium text-foreground",
57
+ className: "text-sm font-medium text-text-primary",
58
58
  children: "Structured Data (JSON format)"
59
59
  }), /* @__PURE__ */ s("textarea", {
60
60
  id: "secret-value-json",
@@ -63,13 +63,13 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
63
63
  onChange: (e) => i(e.target.value),
64
64
  placeholder: "{\n \"key\": \"value\",\n \"connection\": \"...\"\n}",
65
65
  rows: 5,
66
- className: e("flex w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "resize-y")
66
+ 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")
67
67
  })]
68
68
  }) : /* @__PURE__ */ c("div", {
69
69
  className: "space-y-1.5",
70
70
  children: [/* @__PURE__ */ s("label", {
71
71
  htmlFor: "secret-value-text",
72
- className: "text-sm font-medium text-foreground",
72
+ className: "text-sm font-medium text-text-primary",
73
73
  children: "Value"
74
74
  }), /* @__PURE__ */ s("textarea", {
75
75
  id: "secret-value-text",
@@ -78,7 +78,7 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
78
78
  onChange: (e) => i(e.target.value),
79
79
  placeholder: "Enter secret value",
80
80
  rows: 3,
81
- className: e("flex w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "resize-y")
81
+ 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")
82
82
  })]
83
83
  }), p = ({ type: a, onTypeChange: p, name: m, onNameChange: h, value: g, onValueChange: _, description: v, onDescriptionChange: y, labels: b, onLabelsChange: x, className: S }) => {
84
84
  let [C, w] = o(""), [T, E] = o(!1), D = i.map((e) => ({
@@ -129,7 +129,7 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
129
129
  children: [
130
130
  /* @__PURE__ */ s("label", {
131
131
  htmlFor: "secret-new-label",
132
- className: "text-sm font-medium text-foreground",
132
+ className: "text-sm font-medium text-text-primary",
133
133
  children: "Labels"
134
134
  }),
135
135
  /* @__PURE__ */ c("div", {
@@ -141,7 +141,7 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
141
141
  onChange: (e) => w(e.target.value),
142
142
  onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), O()),
143
143
  placeholder: "Add label",
144
- className: e("flex h-8 flex-1 rounded-md border border-border bg-background px-3 py-1 text-sm", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")
144
+ 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)]")
145
145
  }), /* @__PURE__ */ s(t, {
146
146
  variant: "outline",
147
147
  size: "sm",
@@ -153,11 +153,11 @@ var f = ({ type: n, value: r, onValueChange: i, showPasswordGen: o, setShowPassw
153
153
  b.length > 0 && /* @__PURE__ */ s("div", {
154
154
  className: "flex flex-wrap gap-1.5",
155
155
  children: b.map((e) => /* @__PURE__ */ c("span", {
156
- className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-muted border border-border",
156
+ className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-bg-sunken border border-border-subtle",
157
157
  children: [e, /* @__PURE__ */ s("button", {
158
158
  type: "button",
159
159
  onClick: () => k(e),
160
- className: "p-0.5 rounded-full hover:bg-destructive/10 hover:text-destructive",
160
+ className: "p-0.5 rounded-full hover:bg-status-error-bg/10 hover:text-status-error-text",
161
161
  children: /* @__PURE__ */ s(l, { className: "size-2.5" })
162
162
  })]
163
163
  }, e))
@@ -1 +1 @@
1
- {"version":3,"file":"SecretFormFields.js","names":[],"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 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 if (type === 'CREDENTIAL') {\n return (\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-value-password\" className=\"text-sm font-medium text-foreground\">\n Password\n </label>\n <input\n id=\"secret-value-password\"\n aria-label=\"Password\"\n type=\"password\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder=\"Enter password\"\n className={cn(\n 'flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring'\n )}\n />\n <Button\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n onClick={() => setShowPasswordGen(!showPasswordGen)}\n >\n {showPasswordGen ? 'Hide Generator' : '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 return (\n <div className=\"space-y-1.5\">\n <label htmlFor=\"secret-value-pem\" className=\"text-sm font-medium text-foreground\">\n {type === 'CERTIFICATE' ? 'Certificate (PEM)' : 'Private Key'}\n </label>\n <textarea\n id=\"secret-value-pem\"\n aria-label={type === 'CERTIFICATE' ? 'Certificate (PEM)' : 'Private Key'}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={\n type === 'CERTIFICATE'\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 bg-background px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-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-foreground\">\n Structured Data (JSON format)\n </label>\n <textarea\n id=\"secret-value-json\"\n aria-label=\"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 bg-background px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-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-foreground\">\n Value\n </label>\n <textarea\n id=\"secret-value-text\"\n aria-label=\"Value\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder=\"Enter secret value\"\n rows={3}\n className={cn(\n 'flex w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-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 [newLabel, setNewLabel] = useState('');\n const [showPasswordGen, setShowPasswordGen] = useState(false);\n\n const typeOptions = SECRET_TYPES.map((t) => ({ value: t.value, label: t.label }));\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=\"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=\"Name\"\n value={name}\n onChange={(e) => onNameChange(e.target.value)}\n placeholder=\"e.g., production-database-password\"\n required\n />\n\n {/* Description */}\n <Input\n id=\"secret-description\"\n label=\"Description (optional)\"\n value={description}\n onChange={(e) => onDescriptionChange(e.target.value)}\n placeholder=\"Brief description of this secret\"\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=\"Advanced metadata\"\n description=\"Custom labels for filtering and grouping secrets.\"\n >\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-new-label\" className=\"text-sm font-medium text-foreground\">\n Labels\n </label>\n <div className=\"flex items-center gap-2\">\n <input\n id=\"secret-new-label\"\n aria-label=\"Add label\"\n value={newLabel}\n onChange={(e) => setNewLabel(e.target.value)}\n onKeyDown={(e) => e.key === 'Enter' && (e.preventDefault(), addLabel())}\n placeholder=\"Add label\"\n className={cn(\n 'flex h-8 flex-1 rounded-md border border-border bg-background px-3 py-1 text-sm',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-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-muted border border-border\"\n >\n {label}\n <button\n type=\"button\"\n onClick={() => removeLabel(label)}\n className=\"p-0.5 rounded-full hover:bg-destructive/10 hover:text-destructive\"\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":";;;;;;;;;AAiBA,IAAM,KAA+C,EACnD,SACA,UACA,kBACA,oBACA,4BAEI,MAAS,eAET,kBAAC,OAAD;CAAK,WAAU;WAAf;EACE,kBAAC,SAAD;GAAO,SAAQ;GAAwB,WAAU;aAAsC;GAE/E,CAAA;EACR,kBAAC,SAAD;GACE,IAAG;GACH,cAAW;GACX,MAAK;GACE;GACP,WAAW,MAAM,EAAc,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WAAW,EACT,mFACA,0EACD;QACD,CAAA,EACF,kBAAC,GAAD;QAAQ,SAAQ;QAAU,MAAK;QAAK,MAAK;QAAS,SAAS;kBACzD,kBAAC,GAAD,EAAM,WAAU,UAAW,CAAA;QACpB,CAAA,CACL;;MACL,EAAO,SAAS,KACf,kBAAC,OAAD;OAAK,WAAU;iBACZ,EAAO,KAAK,MACX,kBAAC,QAAD;QAEE,WAAU;kBAFZ,CAIG,GACD,kBAAC,UAAD;SACE,MAAK;SACL,eAAe,EAAY,EAAM;SACjC,WAAU;mBAEV,kBAAC,GAAD,EAAO,WAAU,YAAa,CAAA;SACvB,CAAA,CACJ;UAXA,EAWA,CACP;OACE,CAAA;MAEJ;;IACS,CAAA;GACb"}
1
+ {"version":3,"file":"SecretFormFields.js","names":[],"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 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 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 Password\n </label>\n <input\n id=\"secret-value-password\"\n aria-label=\"Password\"\n type=\"password\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder=\"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 ? 'Hide Generator' : '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 return (\n <div className=\"space-y-1.5\">\n <label htmlFor=\"secret-value-pem\" className=\"text-sm font-medium text-text-primary\">\n {type === 'CERTIFICATE' ? 'Certificate (PEM)' : 'Private Key'}\n </label>\n <textarea\n id=\"secret-value-pem\"\n aria-label={type === 'CERTIFICATE' ? 'Certificate (PEM)' : 'Private Key'}\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder={\n type === 'CERTIFICATE'\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 Structured Data (JSON format)\n </label>\n <textarea\n id=\"secret-value-json\"\n aria-label=\"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 Value\n </label>\n <textarea\n id=\"secret-value-text\"\n aria-label=\"Value\"\n value={value}\n onChange={(e) => onValueChange(e.target.value)}\n placeholder=\"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 [newLabel, setNewLabel] = useState('');\n const [showPasswordGen, setShowPasswordGen] = useState(false);\n\n const typeOptions = SECRET_TYPES.map((t) => ({ value: t.value, label: t.label }));\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=\"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=\"Name\"\n value={name}\n onChange={(e) => onNameChange(e.target.value)}\n placeholder=\"e.g., production-database-password\"\n required\n />\n\n {/* Description */}\n <Input\n id=\"secret-description\"\n label=\"Description (optional)\"\n value={description}\n onChange={(e) => onDescriptionChange(e.target.value)}\n placeholder=\"Brief description of this secret\"\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=\"Advanced metadata\"\n description=\"Custom labels for filtering and grouping secrets.\"\n >\n <div className=\"space-y-2\">\n <label htmlFor=\"secret-new-label\" className=\"text-sm font-medium text-text-primary\">\n Labels\n </label>\n <div className=\"flex items-center gap-2\">\n <input\n id=\"secret-new-label\"\n aria-label=\"Add label\"\n value={newLabel}\n onChange={(e) => setNewLabel(e.target.value)}\n onKeyDown={(e) => e.key === 'Enter' && (e.preventDefault(), addLabel())}\n placeholder=\"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":";;;;;;;;;AAiBA,IAAM,KAA+C,EACnD,SACA,UACA,kBACA,oBACA,4BAEI,MAAS,e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Af,CACE,kBAAC,SAAD;QACE,IAAG;QACH,cAAW;QACX,OAAO;QACP,WAAW,MAAM,EAAY,EAAE,OAAO,MAAM;QAC5C,YAAY,MAAM,EAAE,QAAQ,YAAY,EAAE,gBAAgB,EAAE,GAAU;QACtE,aAAY;QACZ,WAAW,EACT,0FACA,+FACD;QACD,CAAA,EACF,kBAAC,GAAD;QAAQ,SAAQ;QAAU,MAAK;QAAK,MAAK;QAAS,SAAS;kBACzD,kBAAC,GAAD,EAAM,WAAU,UAAW,CAAA;QACpB,CAAA,CACL;;MACL,EAAO,SAAS,KACf,kBAAC,OAAD;OAAK,WAAU;iBACZ,EAAO,KAAK,MACX,kBAAC,QAAD;QAEE,WAAU;kBAFZ,CAIG,GACD,kBAAC,UAAD;SACE,MAAK;SACL,eAAe,EAAY,EAAM;SACjC,WAAU;mBAEV,kBAAC,GAAD,EAAO,WAAU,YAAa,CAAA;SACvB,CAAA,CACJ;UAXA,EAWA,CACP;OACE,CAAA;MAEJ;;IACS,CAAA;GACb"}
@@ -18,7 +18,7 @@ var u = ({ secret: u, isSelected: d = !1, onSelect: f, onClick: p, className: m
18
18
  tabIndex: 0
19
19
  } : { role: "listitem" };
20
20
  return /* @__PURE__ */ s("div", {
21
- className: e("flex items-center gap-3 px-4 py-3 border-b border-border last:border-b-0", "hover:bg-muted/50 transition-colors", "focus-visible:bg-accent focus-visible:outline-none", d && "bg-primary/5", v && "cursor-pointer", m),
21
+ className: e("flex items-center gap-3 px-4 py-3 border-b border-border-subtle last:border-b-0", "hover:bg-bg-sunken/50 transition-colors", "focus-visible:bg-accent focus-visible:outline-none", d && "bg-action-primary-bg/5", v && "cursor-pointer", m),
22
22
  "aria-selected": d,
23
23
  ...y,
24
24
  children: [
@@ -44,11 +44,11 @@ var u = ({ secret: u, isSelected: d = !1, onSelect: f, onClick: p, className: m
44
44
  children: [/* @__PURE__ */ s("div", {
45
45
  className: "flex items-center gap-2",
46
46
  children: [/* @__PURE__ */ o("span", {
47
- className: "font-medium text-sm text-foreground truncate",
47
+ className: "font-medium text-sm text-text-primary truncate",
48
48
  children: u.name
49
49
  }), /* @__PURE__ */ o(i, { type: u.type })]
50
50
  }), u.description && /* @__PURE__ */ o("p", {
51
- className: "text-xs text-muted-foreground truncate mt-0.5",
51
+ className: "text-xs text-text-secondary truncate mt-0.5",
52
52
  children: u.description
53
53
  })]
54
54
  }),
@@ -67,7 +67,7 @@ var u = ({ secret: u, isSelected: d = !1, onSelect: f, onClick: p, className: m
67
67
  children: /* @__PURE__ */ o(a, { status: "healthy" })
68
68
  }),
69
69
  /* @__PURE__ */ s("div", {
70
- className: "flex items-center gap-1 text-xs text-muted-foreground shrink-0",
70
+ className: "flex items-center gap-1 text-xs text-text-secondary shrink-0",
71
71
  "aria-label": g("security.secretRow.lastUpdated.aria", "Last updated {date}", { date: new Date(u.updatedAt).toLocaleDateString() }),
72
72
  children: [
73
73
  /* @__PURE__ */ o(c, { className: "size-3" }),
@@ -1 +1 @@
1
- {"version":3,"file":"SecretRow.js","names":[],"sources":["../../../src/security/components/SecretRow.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Clock } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { SecretTypeIcon } from './SecretTypeIcon';\nimport { SecretTypeBadge } from './SecretTypeBadge';\nimport { RotationStatusBadge } from './RotationStatusBadge';\nimport { Badge } from './ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\nimport type { Secret } from '../types';\n\ninterface SecretRowProps {\n secret: Secret;\n isSelected?: boolean;\n onSelect?: (secretId: string) => void;\n onClick?: () => void;\n className?: string;\n}\n\nexport const SecretRow: FC<SecretRowProps> = ({\n secret,\n isSelected = false,\n onSelect,\n onClick,\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 handleKeyDown = (e: React.KeyboardEvent) => {\n if (onClick && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault();\n onClick();\n }\n };\n\n const interactive = Boolean(onClick);\n const interactiveProps = interactive\n ? {\n onClick,\n onKeyDown: handleKeyDown,\n role: 'button' as const,\n tabIndex: 0,\n }\n : { role: 'listitem' as const };\n return (\n <div\n className={cn(\n 'flex items-center gap-3 px-4 py-3 border-b border-border last:border-b-0',\n 'hover:bg-muted/50 transition-colors',\n 'focus-visible:bg-accent focus-visible:outline-none',\n isSelected && 'bg-primary/5',\n interactive && 'cursor-pointer',\n className\n )}\n aria-selected={isSelected}\n {...interactiveProps}\n >\n {onSelect && (\n <input\n type=\"checkbox\"\n checked={isSelected}\n onChange={(e) => {\n e.stopPropagation();\n onSelect(secret.id);\n }}\n className=\"rounded accent-primary shrink-0\"\n onClick={(e) => e.stopPropagation()}\n aria-label={tx('security.secretRow.checkbox.aria', 'Select secret {name}', {\n name: secret.name,\n })}\n />\n )}\n\n <div className=\"shrink-0\">\n <SecretTypeIcon type={secret.type} size={18} />\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium text-sm text-foreground truncate\">{secret.name}</span>\n <SecretTypeBadge type={secret.type} />\n </div>\n {secret.description && (\n <p className=\"text-xs text-muted-foreground truncate mt-0.5\">{secret.description}</p>\n )}\n </div>\n\n {secret.labels && secret.labels.length > 0 && (\n <div className=\"flex items-center gap-1 shrink-0\">\n {secret.labels.slice(0, 2).map((l) => (\n <Badge key={l.id} variant=\"outline\">\n {l.label}\n </Badge>\n ))}\n {secret.labels.length > 2 && <Badge variant=\"outline\">+{secret.labels.length - 2}</Badge>}\n </div>\n )}\n\n {secret.lastRotatedAt && (\n <div className=\"shrink-0\">\n <RotationStatusBadge status=\"healthy\" />\n </div>\n )}\n\n <div\n className=\"flex items-center gap-1 text-xs text-muted-foreground shrink-0\"\n aria-label={tx('security.secretRow.lastUpdated.aria', 'Last updated {date}', {\n date: new Date(secret.updatedAt).toLocaleDateString(),\n })}\n >\n <Clock className=\"size-3\" />\n <span className=\"sr-only\">\n {tx('security.secretRow.lastUpdated.srOnly', 'Last updated {date}', {\n date: new Date(secret.updatedAt).toLocaleDateString(),\n })}\n </span>\n <span aria-hidden=\"true\">{new Date(secret.updatedAt).toLocaleDateString()}</span>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,KAAiC,EAC5C,WACA,gBAAa,IACb,aACA,YACA,mBACI;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MACzC,EAAsB,GAAG,GAAK,GAAU,EAAO,EAE3C,KAAiB,MAA2B;AAChD,EAAI,MAAY,EAAE,QAAQ,WAAW,EAAE,QAAQ,SAC7C,EAAE,gBAAgB,EAClB,GAAS;IAIP,IAAc,EAAQ,GACtB,IAAmB,IACrB;EACE;EACA,WAAW;EACX,MAAM;EACN,UAAU;EACX,GACD,EAAE,MAAM,YAAqB;AACjC,QACE,kBAAC,OAAD;EACE,WAAW,EACT,4EACA,uCACA,sDACA,KAAc,gBACd,KAAe,kBACf,EACD;EACD,iBAAe;EACf,GAAI;YAVN;GAYG,KACC,kBAAC,SAAD;IACE,MAAK;IACL,SAAS;IACT,WAAW,MAAM;AAEf,KADA,EAAE,iBAAiB,EACnB,EAAS,EAAO,GAAG;;IAErB,WAAU;IACV,UAAU,MAAM,EAAE,iBAAiB;IACnC,cAAY,EAAG,oCAAoC,wBAAwB,EACzE,MAAM,EAAO,MACd,CAAC;IACF,CAAA;GAGJ,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD;KAAgB,MAAM,EAAO;KAAM,MAAM;KAAM,CAAA;IAC3C,CAAA;GAEN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD;MAAM,WAAU;gBAAgD,EAAO;MAAY,CAAA,EACnF,kBAAC,GAAD,EAAiB,MAAM,EAAO,MAAQ,CAAA,CAClC;QACL,EAAO,eACN,kBAAC,KAAD;KAAG,WAAU;eAAiD,EAAO;KAAgB,CAAA,CAEnF;;GAEL,EAAO,UAAU,EAAO,OAAO,SAAS,KACvC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,EAAO,OAAO,MAAM,GAAG,EAAE,CAAC,KAAK,MAC9B,kBAAC,GAAD;KAAkB,SAAQ;eACvB,EAAE;KACG,EAFI,EAAE,GAEN,CACR,EACD,EAAO,OAAO,SAAS,KAAK,kBAAC,GAAD;KAAO,SAAQ;eAAf,CAAyB,KAAE,EAAO,OAAO,SAAS,EAAU;OACrF;;GAGP,EAAO,iBACN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD,EAAqB,QAAO,WAAY,CAAA;IACpC,CAAA;GAGR,kBAAC,OAAD;IACE,WAAU;IACV,cAAY,EAAG,uCAAuC,uBAAuB,EAC3E,MAAM,IAAI,KAAK,EAAO,UAAU,CAAC,oBAAoB,EACtD,CAAC;cAJJ;KAME,kBAAC,GAAD,EAAO,WAAU,UAAW,CAAA;KAC5B,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAG,yCAAyC,uBAAuB,EAClE,MAAM,IAAI,KAAK,EAAO,UAAU,CAAC,oBAAoB,EACtD,CAAC;MACG,CAAA;KACP,kBAAC,QAAD;MAAM,eAAY;gBAAQ,IAAI,KAAK,EAAO,UAAU,CAAC,oBAAoB;MAAQ,CAAA;KAC7E;;GACF"}
1
+ {"version":3,"file":"SecretRow.js","names":[],"sources":["../../../src/security/components/SecretRow.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Clock } from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { SecretTypeIcon } from './SecretTypeIcon';\nimport { SecretTypeBadge } from './SecretTypeBadge';\nimport { RotationStatusBadge } from './RotationStatusBadge';\nimport { Badge } from './ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\nimport type { Secret } from '../types';\n\ninterface SecretRowProps {\n secret: Secret;\n isSelected?: boolean;\n onSelect?: (secretId: string) => void;\n onClick?: () => void;\n className?: string;\n}\n\nexport const SecretRow: FC<SecretRowProps> = ({\n secret,\n isSelected = false,\n onSelect,\n onClick,\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 handleKeyDown = (e: React.KeyboardEvent) => {\n if (onClick && (e.key === 'Enter' || e.key === ' ')) {\n e.preventDefault();\n onClick();\n }\n };\n\n const interactive = Boolean(onClick);\n const interactiveProps = interactive\n ? {\n onClick,\n onKeyDown: handleKeyDown,\n role: 'button' as const,\n tabIndex: 0,\n }\n : { role: 'listitem' as const };\n return (\n <div\n className={cn(\n 'flex items-center gap-3 px-4 py-3 border-b border-border-subtle last:border-b-0',\n 'hover:bg-bg-sunken/50 transition-colors',\n 'focus-visible:bg-accent focus-visible:outline-none',\n isSelected && 'bg-action-primary-bg/5',\n interactive && 'cursor-pointer',\n className\n )}\n aria-selected={isSelected}\n {...interactiveProps}\n >\n {onSelect && (\n <input\n type=\"checkbox\"\n checked={isSelected}\n onChange={(e) => {\n e.stopPropagation();\n onSelect(secret.id);\n }}\n className=\"rounded accent-primary shrink-0\"\n onClick={(e) => e.stopPropagation()}\n aria-label={tx('security.secretRow.checkbox.aria', 'Select secret {name}', {\n name: secret.name,\n })}\n />\n )}\n\n <div className=\"shrink-0\">\n <SecretTypeIcon type={secret.type} size={18} />\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium text-sm text-text-primary truncate\">{secret.name}</span>\n <SecretTypeBadge type={secret.type} />\n </div>\n {secret.description && (\n <p className=\"text-xs text-text-secondary truncate mt-0.5\">{secret.description}</p>\n )}\n </div>\n\n {secret.labels && secret.labels.length > 0 && (\n <div className=\"flex items-center gap-1 shrink-0\">\n {secret.labels.slice(0, 2).map((l) => (\n <Badge key={l.id} variant=\"outline\">\n {l.label}\n </Badge>\n ))}\n {secret.labels.length > 2 && <Badge variant=\"outline\">+{secret.labels.length - 2}</Badge>}\n </div>\n )}\n\n {secret.lastRotatedAt && (\n <div className=\"shrink-0\">\n <RotationStatusBadge status=\"healthy\" />\n </div>\n )}\n\n <div\n className=\"flex items-center gap-1 text-xs text-text-secondary shrink-0\"\n aria-label={tx('security.secretRow.lastUpdated.aria', 'Last updated {date}', {\n date: new Date(secret.updatedAt).toLocaleDateString(),\n })}\n >\n <Clock className=\"size-3\" />\n <span className=\"sr-only\">\n {tx('security.secretRow.lastUpdated.srOnly', 'Last updated {date}', {\n date: new Date(secret.updatedAt).toLocaleDateString(),\n })}\n </span>\n <span aria-hidden=\"true\">{new Date(secret.updatedAt).toLocaleDateString()}</span>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,KAAiC,EAC5C,WACA,gBAAa,IACb,aACA,YACA,mBACI;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MACzC,EAAsB,GAAG,GAAK,GAAU,EAAO,EAE3C,KAAiB,MAA2B;AAChD,EAAI,MAAY,EAAE,QAAQ,WAAW,EAAE,QAAQ,SAC7C,EAAE,gBAAgB,EAClB,GAAS;IAIP,IAAc,EAAQ,GACtB,IAAmB,IACrB;EACE;EACA,WAAW;EACX,MAAM;EACN,UAAU;EACX,GACD,EAAE,MAAM,YAAqB;AACjC,QACE,kBAAC,OAAD;EACE,WAAW,EACT,mFACA,2CACA,sDACA,KAAc,0BACd,KAAe,kBACf,EACD;EACD,iBAAe;EACf,GAAI;YAVN;GAYG,KACC,kBAAC,SAAD;IACE,MAAK;IACL,SAAS;IACT,WAAW,MAAM;AAEf,KADA,EAAE,iBAAiB,EACnB,EAAS,EAAO,GAAG;;IAErB,WAAU;IACV,UAAU,MAAM,EAAE,iBAAiB;IACnC,cAAY,EAAG,oCAAoC,wBAAwB,EACzE,MAAM,EAAO,MACd,CAAC;IACF,CAAA;GAGJ,kBA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T, name: se, className:
94
94
  className: "absolute inset-0 bg-black/50 cursor-default",
95
95
  onClick: C
96
96
  }), /* @__PURE__ */ u("div", {
97
- className: e("relative z-10 w-full max-w-lg rounded-lg bg-card border border-border shadow-lg flex flex-col max-h-[90vh]", ce),
97
+ className: e("relative z-10 w-full max-w-lg rounded-lg bg-bg-surface border border-border-subtle shadow-lg flex flex-col max-h-[90vh]", ce),
98
98
  children: [
99
99
  /* @__PURE__ */ u("div", {
100
- className: "flex items-center justify-between p-6 pb-4 border-b border-border/60",
100
+ className: "flex items-center justify-between p-6 pb-4 border-b border-border-subtle/60",
101
101
  children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("h2", {
102
- className: "text-lg font-semibold text-foreground",
102
+ className: "text-lg font-semibold text-text-primary",
103
103
  children: ["Share ", _e]
104
104
  }), /* @__PURE__ */ u("p", {
105
- className: "text-sm text-muted-foreground mt-0.5",
105
+ className: "text-sm text-text-secondary mt-0.5",
106
106
  children: [
107
107
  "Share ",
108
108
  /* @__PURE__ */ l("span", {
109
- className: "font-medium text-foreground",
109
+ className: "font-medium text-text-primary",
110
110
  children: se
111
111
  }),
112
112
  " selectively"
@@ -114,7 +114,7 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
114
114
  })] }), /* @__PURE__ */ l("button", {
115
115
  type: "button",
116
116
  onClick: C,
117
- className: "p-1 rounded hover:bg-accent text-muted-foreground",
117
+ className: "p-1 rounded hover:bg-accent text-text-secondary",
118
118
  children: /* @__PURE__ */ l(v, { className: "size-4" })
119
119
  })]
120
120
  }),
@@ -123,12 +123,12 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
123
123
  children: [/* @__PURE__ */ u("button", {
124
124
  type: "button",
125
125
  onClick: () => D("people"),
126
- className: e("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", E === "people" ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent"),
126
+ className: e("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", E === "people" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"),
127
127
  children: [/* @__PURE__ */ l(ae, { className: "size-4" }), " People"]
128
128
  }), /* @__PURE__ */ u("button", {
129
129
  type: "button",
130
130
  onClick: () => D("link"),
131
- className: e("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", E === "link" ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent"),
131
+ className: e("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-colors", E === "link" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"),
132
132
  children: [/* @__PURE__ */ l(m, { className: "size-4" }), " Get link"]
133
133
  })]
134
134
  }),
@@ -176,22 +176,22 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
176
176
  }), /* @__PURE__ */ u("div", {
177
177
  className: "space-y-2",
178
178
  children: [/* @__PURE__ */ l("h3", {
179
- className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground",
179
+ className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
180
180
  children: "People with access"
181
181
  }), G ? /* @__PURE__ */ l("div", {
182
182
  className: "flex justify-center py-4",
183
- children: /* @__PURE__ */ l(h, { className: "size-5 animate-spin text-muted-foreground" })
183
+ children: /* @__PURE__ */ l(h, { className: "size-5 animate-spin text-text-secondary" })
184
184
  }) : X.length === 0 ? /* @__PURE__ */ l("p", {
185
- className: "text-sm text-muted-foreground py-2",
185
+ className: "text-sm text-text-secondary py-2",
186
186
  children: "Not shared with anyone yet."
187
187
  }) : /* @__PURE__ */ l("ul", {
188
188
  className: "space-y-2",
189
189
  children: X.map((e) => /* @__PURE__ */ u("li", {
190
- className: "flex items-center justify-between gap-2 rounded-md border border-border/60 px-3 py-2",
190
+ className: "flex items-center justify-between gap-2 rounded-md border border-border-subtle/60 px-3 py-2",
191
191
  children: [/* @__PURE__ */ u("div", {
192
192
  className: "min-w-0",
193
193
  children: [/* @__PURE__ */ l("p", {
194
- className: "text-sm text-foreground truncate",
194
+ className: "text-sm text-text-primary truncate",
195
195
  children: e.label || e.actorId
196
196
  }), /* @__PURE__ */ u("div", {
197
197
  className: "flex items-center gap-2 mt-0.5",
@@ -199,14 +199,14 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
199
199
  variant: "outline",
200
200
  children: e.role
201
201
  }), e.expiresAt && /* @__PURE__ */ u("span", {
202
- className: "text-xs text-muted-foreground inline-flex items-center gap-1",
202
+ className: "text-xs text-text-secondary inline-flex items-center gap-1",
203
203
  children: [/* @__PURE__ */ l(f, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
204
204
  })]
205
205
  })]
206
206
  }), /* @__PURE__ */ l("button", {
207
207
  type: "button",
208
208
  onClick: () => void $(e.id),
209
- className: "p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
209
+ className: "p-1.5 rounded hover:bg-status-error-bg/10 text-text-secondary hover:text-status-error-text",
210
210
  "aria-label": "Revoke access",
211
211
  children: /* @__PURE__ */ l(g, { className: "size-4" })
212
212
  })]
@@ -271,7 +271,7 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
271
271
  readOnly: !0,
272
272
  value: R,
273
273
  onFocus: (e) => e.currentTarget.select(),
274
- className: "flex h-9 w-full rounded-md border border-border bg-background px-3 text-sm font-mono"
274
+ className: "flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm font-mono"
275
275
  }), /* @__PURE__ */ l(n, {
276
276
  type: "button",
277
277
  variant: "outline",
@@ -284,18 +284,18 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
284
284
  /* @__PURE__ */ u("div", {
285
285
  className: "space-y-2",
286
286
  children: [/* @__PURE__ */ l("h3", {
287
- className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground",
287
+ className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
288
288
  children: "Active links"
289
289
  }), G ? /* @__PURE__ */ l("div", {
290
290
  className: "flex justify-center py-4",
291
- children: /* @__PURE__ */ l(h, { className: "size-5 animate-spin text-muted-foreground" })
291
+ children: /* @__PURE__ */ l(h, { className: "size-5 animate-spin text-text-secondary" })
292
292
  }) : Z.length === 0 ? /* @__PURE__ */ l("p", {
293
- className: "text-sm text-muted-foreground py-2",
293
+ className: "text-sm text-text-secondary py-2",
294
294
  children: "No active links."
295
295
  }) : /* @__PURE__ */ l("ul", {
296
296
  className: "space-y-2",
297
297
  children: Z.map((e) => /* @__PURE__ */ u("li", {
298
- className: "flex items-center justify-between gap-2 rounded-md border border-border/60 px-3 py-2",
298
+ className: "flex items-center justify-between gap-2 rounded-md border border-border-subtle/60 px-3 py-2",
299
299
  children: [/* @__PURE__ */ u("div", {
300
300
  className: "min-w-0",
301
301
  children: [/* @__PURE__ */ u("div", {
@@ -306,11 +306,11 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
306
306
  children: e.status === "ACTIVE" ? "Active" : "Revoked"
307
307
  }),
308
308
  e.requiresPassword && /* @__PURE__ */ u("span", {
309
- className: "text-xs text-muted-foreground inline-flex items-center gap-1",
309
+ className: "text-xs text-text-secondary inline-flex items-center gap-1",
310
310
  children: [/* @__PURE__ */ l(ie, { className: "size-3" }), " Password"]
311
311
  }),
312
312
  /* @__PURE__ */ u("span", {
313
- className: "text-xs text-muted-foreground inline-flex items-center gap-1",
313
+ className: "text-xs text-text-secondary inline-flex items-center gap-1",
314
314
  children: [
315
315
  /* @__PURE__ */ l(p, { className: "size-3" }),
316
316
  e.viewCount,
@@ -319,18 +319,18 @@ var S = ({ isOpen: S, onClose: C, vaultId: w, secretId: T, name: se, className:
319
319
  ]
320
320
  }),
321
321
  e.expiresAt && /* @__PURE__ */ u("span", {
322
- className: "text-xs text-muted-foreground inline-flex items-center gap-1",
322
+ className: "text-xs text-text-secondary inline-flex items-center gap-1",
323
323
  children: [/* @__PURE__ */ l(f, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
324
324
  })
325
325
  ]
326
326
  }), /* @__PURE__ */ u("p", {
327
- className: "text-xs text-muted-foreground mt-0.5",
327
+ className: "text-xs text-text-secondary mt-0.5",
328
328
  children: ["Created ", new Date(e.createdAt).toLocaleString()]
329
329
  })]
330
330
  }), e.status === "ACTIVE" && /* @__PURE__ */ l("button", {
331
331
  type: "button",
332
332
  onClick: () => void $(e.id),
333
- className: "p-1.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
333
+ className: "p-1.5 rounded hover:bg-status-error-bg/10 text-text-secondary hover:text-status-error-text",
334
334
  "aria-label": "Revoke link",
335
335
  children: /* @__PURE__ */ l(g, { className: "size-4" })
336
336
  })]