@burdenoff/microfe-security 2026.510.115

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 (299) hide show
  1. package/README.md +223 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +21069 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +1461 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-operations.js +695 -0
  11. package/dist/generated/wspace-operations.js.map +1 -0
  12. package/dist/generated/wspace-types.d.ts +55148 -0
  13. package/dist/generated/wspace-types.d.ts.map +1 -0
  14. package/dist/generated/wspace-types.js +8 -0
  15. package/dist/generated/wspace-types.js.map +1 -0
  16. package/dist/index.d.ts +6 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +7 -0
  19. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  20. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  21. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  22. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  23. package/dist/security/SecurityAdminRoot.d.ts +19 -0
  24. package/dist/security/SecurityAdminRoot.d.ts.map +1 -0
  25. package/dist/security/SecurityAdminRoot.js +14 -0
  26. package/dist/security/SecurityAdminRoot.js.map +1 -0
  27. package/dist/security/SecurityRoot.d.ts +18 -0
  28. package/dist/security/SecurityRoot.d.ts.map +1 -0
  29. package/dist/security/SecurityRoot.js +14 -0
  30. package/dist/security/SecurityRoot.js.map +1 -0
  31. package/dist/security/SecurityRootBase.d.ts +19 -0
  32. package/dist/security/SecurityRootBase.d.ts.map +1 -0
  33. package/dist/security/SecurityRootBase.js +56 -0
  34. package/dist/security/SecurityRootBase.js.map +1 -0
  35. package/dist/security/SecurityUserRoot.d.ts +18 -0
  36. package/dist/security/SecurityUserRoot.d.ts.map +1 -0
  37. package/dist/security/SecurityUserRoot.js +14 -0
  38. package/dist/security/SecurityUserRoot.js.map +1 -0
  39. package/dist/security/components/ActivityTimeline.d.ts +12 -0
  40. package/dist/security/components/ActivityTimeline.d.ts.map +1 -0
  41. package/dist/security/components/ActivityTimeline.js +109 -0
  42. package/dist/security/components/ActivityTimeline.js.map +1 -0
  43. package/dist/security/components/AuditLogTable.d.ts +12 -0
  44. package/dist/security/components/AuditLogTable.d.ts.map +1 -0
  45. package/dist/security/components/BulkActionBar.d.ts +9 -0
  46. package/dist/security/components/BulkActionBar.d.ts.map +1 -0
  47. package/dist/security/components/BulkActionBar.js +94 -0
  48. package/dist/security/components/BulkActionBar.js.map +1 -0
  49. package/dist/security/components/ConfirmDialog.d.ts +19 -0
  50. package/dist/security/components/ConfirmDialog.d.ts.map +1 -0
  51. package/dist/security/components/ConfirmDialog.js +45 -0
  52. package/dist/security/components/ConfirmDialog.js.map +1 -0
  53. package/dist/security/components/CopyButton.d.ts +20 -0
  54. package/dist/security/components/CopyButton.d.ts.map +1 -0
  55. package/dist/security/components/CopyButton.js +48 -0
  56. package/dist/security/components/CopyButton.js.map +1 -0
  57. package/dist/security/components/ExportDialog.d.ts +7 -0
  58. package/dist/security/components/ExportDialog.d.ts.map +1 -0
  59. package/dist/security/components/ExportDialog.js +146 -0
  60. package/dist/security/components/ExportDialog.js.map +1 -0
  61. package/dist/security/components/ImportWizard.d.ts +7 -0
  62. package/dist/security/components/ImportWizard.d.ts.map +1 -0
  63. package/dist/security/components/ImportWizard.js +276 -0
  64. package/dist/security/components/ImportWizard.js.map +1 -0
  65. package/dist/security/components/PageLayout.d.ts +23 -0
  66. package/dist/security/components/PageLayout.d.ts.map +1 -0
  67. package/dist/security/components/PageLayout.js +26 -0
  68. package/dist/security/components/PageLayout.js.map +1 -0
  69. package/dist/security/components/PasswordGenerator.d.ts +17 -0
  70. package/dist/security/components/PasswordGenerator.d.ts.map +1 -0
  71. package/dist/security/components/PasswordGenerator.js +128 -0
  72. package/dist/security/components/PasswordGenerator.js.map +1 -0
  73. package/dist/security/components/ProviderSetupWizard.d.ts +13 -0
  74. package/dist/security/components/ProviderSetupWizard.d.ts.map +1 -0
  75. package/dist/security/components/RotationStatusBadge.d.ts +13 -0
  76. package/dist/security/components/RotationStatusBadge.d.ts.map +1 -0
  77. package/dist/security/components/RotationStatusBadge.js +32 -0
  78. package/dist/security/components/RotationStatusBadge.js.map +1 -0
  79. package/dist/security/components/SecretFormFields.d.ts +23 -0
  80. package/dist/security/components/SecretFormFields.d.ts.map +1 -0
  81. package/dist/security/components/SecretFormFields.js +156 -0
  82. package/dist/security/components/SecretFormFields.js.map +1 -0
  83. package/dist/security/components/SecretRow.d.ts +13 -0
  84. package/dist/security/components/SecretRow.d.ts.map +1 -0
  85. package/dist/security/components/SecretRow.js +88 -0
  86. package/dist/security/components/SecretRow.js.map +1 -0
  87. package/dist/security/components/SecretTypeBadge.d.ts +13 -0
  88. package/dist/security/components/SecretTypeBadge.d.ts.map +1 -0
  89. package/dist/security/components/SecretTypeBadge.js +19 -0
  90. package/dist/security/components/SecretTypeBadge.js.map +1 -0
  91. package/dist/security/components/SecretTypeIcon.d.ts +14 -0
  92. package/dist/security/components/SecretTypeIcon.d.ts.map +1 -0
  93. package/dist/security/components/SecretTypeIcon.js +28 -0
  94. package/dist/security/components/SecretTypeIcon.js.map +1 -0
  95. package/dist/security/components/SecretValueDisplay.d.ts +26 -0
  96. package/dist/security/components/SecretValueDisplay.d.ts.map +1 -0
  97. package/dist/security/components/SecretValueDisplay.js +66 -0
  98. package/dist/security/components/SecretValueDisplay.js.map +1 -0
  99. package/dist/security/components/SecurityPermissionGuard.d.ts +16 -0
  100. package/dist/security/components/SecurityPermissionGuard.d.ts.map +1 -0
  101. package/dist/security/components/SecurityPermissionGuard.js +21 -0
  102. package/dist/security/components/SecurityPermissionGuard.js.map +1 -0
  103. package/dist/security/components/SecurityScoreCard.d.ts +12 -0
  104. package/dist/security/components/SecurityScoreCard.d.ts.map +1 -0
  105. package/dist/security/components/SecurityScoreCard.js +82 -0
  106. package/dist/security/components/SecurityScoreCard.js.map +1 -0
  107. package/dist/security/components/VaultCard.d.ts +13 -0
  108. package/dist/security/components/VaultCard.d.ts.map +1 -0
  109. package/dist/security/components/VaultCard.js +94 -0
  110. package/dist/security/components/VaultCard.js.map +1 -0
  111. package/dist/security/components/VaultFormFields.d.ts +17 -0
  112. package/dist/security/components/VaultFormFields.d.ts.map +1 -0
  113. package/dist/security/components/VaultFormFields.js +110 -0
  114. package/dist/security/components/VaultFormFields.js.map +1 -0
  115. package/dist/security/components/VaultShareDialog.d.ts +16 -0
  116. package/dist/security/components/VaultShareDialog.d.ts.map +1 -0
  117. package/dist/security/components/VaultShareDialog.js +84 -0
  118. package/dist/security/components/VaultShareDialog.js.map +1 -0
  119. package/dist/security/components/ui.d.ts +55 -0
  120. package/dist/security/components/ui.d.ts.map +1 -0
  121. package/dist/security/components/ui.js +87 -0
  122. package/dist/security/components/ui.js.map +1 -0
  123. package/dist/security/config/navigation.d.ts +10 -0
  124. package/dist/security/config/navigation.d.ts.map +1 -0
  125. package/dist/security/config/navigation.js +97 -0
  126. package/dist/security/config/navigation.js.map +1 -0
  127. package/dist/security/constants/featureFlags.d.ts +36 -0
  128. package/dist/security/constants/featureFlags.d.ts.map +1 -0
  129. package/dist/security/constants/featureFlags.js +18 -0
  130. package/dist/security/constants/featureFlags.js.map +1 -0
  131. package/dist/security/constants/permissions.d.ts +11 -0
  132. package/dist/security/constants/permissions.d.ts.map +1 -0
  133. package/dist/security/constants/permissions.js +72 -0
  134. package/dist/security/constants/permissions.js.map +1 -0
  135. package/dist/security/constants/providers.d.ts +12 -0
  136. package/dist/security/constants/providers.d.ts.map +1 -0
  137. package/dist/security/constants/providers.js +45 -0
  138. package/dist/security/constants/providers.js.map +1 -0
  139. package/dist/security/constants/secretTypes.d.ts +16 -0
  140. package/dist/security/constants/secretTypes.d.ts.map +1 -0
  141. package/dist/security/constants/secretTypes.js +66 -0
  142. package/dist/security/constants/secretTypes.js.map +1 -0
  143. package/dist/security/hooks/useAuditLog.d.ts +4 -0
  144. package/dist/security/hooks/useAuditLog.d.ts.map +1 -0
  145. package/dist/security/hooks/useAuditLog.js +20 -0
  146. package/dist/security/hooks/useAuditLog.js.map +1 -0
  147. package/dist/security/hooks/useBulkSecretOperations.d.ts +7 -0
  148. package/dist/security/hooks/useBulkSecretOperations.d.ts.map +1 -0
  149. package/dist/security/hooks/useBulkSecretOperations.js +22 -0
  150. package/dist/security/hooks/useBulkSecretOperations.js.map +1 -0
  151. package/dist/security/hooks/useClipboardAutoClear.d.ts +10 -0
  152. package/dist/security/hooks/useClipboardAutoClear.d.ts.map +1 -0
  153. package/dist/security/hooks/useImportExport.d.ts +55 -0
  154. package/dist/security/hooks/useImportExport.d.ts.map +1 -0
  155. package/dist/security/hooks/useImportExport.js +201 -0
  156. package/dist/security/hooks/useImportExport.js.map +1 -0
  157. package/dist/security/hooks/usePasswordGenerator.d.ts +18 -0
  158. package/dist/security/hooks/usePasswordGenerator.d.ts.map +1 -0
  159. package/dist/security/hooks/useProviderQueries.d.ts +8 -0
  160. package/dist/security/hooks/useProviderQueries.d.ts.map +1 -0
  161. package/dist/security/hooks/useProviderQueries.js +30 -0
  162. package/dist/security/hooks/useProviderQueries.js.map +1 -0
  163. package/dist/security/hooks/useSecretQueries.d.ts +10 -0
  164. package/dist/security/hooks/useSecretQueries.d.ts.map +1 -0
  165. package/dist/security/hooks/useSecretQueries.js +36 -0
  166. package/dist/security/hooks/useSecretQueries.js.map +1 -0
  167. package/dist/security/hooks/useSecretValue.d.ts +12 -0
  168. package/dist/security/hooks/useSecretValue.d.ts.map +1 -0
  169. package/dist/security/hooks/useSecretValue.js +29 -0
  170. package/dist/security/hooks/useSecretValue.js.map +1 -0
  171. package/dist/security/hooks/useSecurityCacheInvalidation.d.ts +2 -0
  172. package/dist/security/hooks/useSecurityCacheInvalidation.d.ts.map +1 -0
  173. package/dist/security/hooks/useSecurityCacheInvalidation.js +52 -0
  174. package/dist/security/hooks/useSecurityCacheInvalidation.js.map +1 -0
  175. package/dist/security/hooks/useSecurityDashboard.d.ts +21 -0
  176. package/dist/security/hooks/useSecurityDashboard.d.ts.map +1 -0
  177. package/dist/security/hooks/useSecurityDashboard.js +34 -0
  178. package/dist/security/hooks/useSecurityDashboard.js.map +1 -0
  179. package/dist/security/hooks/useSecurityEventEmitter.d.ts +14 -0
  180. package/dist/security/hooks/useSecurityEventEmitter.d.ts.map +1 -0
  181. package/dist/security/hooks/useSecurityEventEmitter.js +14 -0
  182. package/dist/security/hooks/useSecurityEventEmitter.js.map +1 -0
  183. package/dist/security/hooks/useSecuritySubscriptions.d.ts +21 -0
  184. package/dist/security/hooks/useSecuritySubscriptions.d.ts.map +1 -0
  185. package/dist/security/hooks/useSecuritySubscriptions.js +44 -0
  186. package/dist/security/hooks/useSecuritySubscriptions.js.map +1 -0
  187. package/dist/security/hooks/useVaultQueries.d.ts +14 -0
  188. package/dist/security/hooks/useVaultQueries.d.ts.map +1 -0
  189. package/dist/security/hooks/useVaultQueries.js +57 -0
  190. package/dist/security/hooks/useVaultQueries.js.map +1 -0
  191. package/dist/security/index.d.ts +31 -0
  192. package/dist/security/index.d.ts.map +1 -0
  193. package/dist/security/index.js +5 -0
  194. package/dist/security/pages/AccessReviewPage.d.ts +2 -0
  195. package/dist/security/pages/AccessReviewPage.d.ts.map +1 -0
  196. package/dist/security/pages/AccessReviewPage.js +154 -0
  197. package/dist/security/pages/AccessReviewPage.js.map +1 -0
  198. package/dist/security/pages/AuditLogPage.d.ts +2 -0
  199. package/dist/security/pages/AuditLogPage.d.ts.map +1 -0
  200. package/dist/security/pages/AuditLogPage.js +186 -0
  201. package/dist/security/pages/AuditLogPage.js.map +1 -0
  202. package/dist/security/pages/ImportExportPage.d.ts +2 -0
  203. package/dist/security/pages/ImportExportPage.d.ts.map +1 -0
  204. package/dist/security/pages/ImportExportPage.js +47 -0
  205. package/dist/security/pages/ImportExportPage.js.map +1 -0
  206. package/dist/security/pages/ProviderDetailPage.d.ts +2 -0
  207. package/dist/security/pages/ProviderDetailPage.d.ts.map +1 -0
  208. package/dist/security/pages/ProviderDetailPage.js +314 -0
  209. package/dist/security/pages/ProviderDetailPage.js.map +1 -0
  210. package/dist/security/pages/ProvidersPage.d.ts +2 -0
  211. package/dist/security/pages/ProvidersPage.d.ts.map +1 -0
  212. package/dist/security/pages/ProvidersPage.js +162 -0
  213. package/dist/security/pages/ProvidersPage.js.map +1 -0
  214. package/dist/security/pages/SecretCreatePage.d.ts +2 -0
  215. package/dist/security/pages/SecretCreatePage.d.ts.map +1 -0
  216. package/dist/security/pages/SecretCreatePage.js +144 -0
  217. package/dist/security/pages/SecretCreatePage.js.map +1 -0
  218. package/dist/security/pages/SecretDetailPage.d.ts +2 -0
  219. package/dist/security/pages/SecretDetailPage.d.ts.map +1 -0
  220. package/dist/security/pages/SecretDetailPage.js +479 -0
  221. package/dist/security/pages/SecretDetailPage.js.map +1 -0
  222. package/dist/security/pages/SecurityDashboardPage.d.ts +2 -0
  223. package/dist/security/pages/SecurityDashboardPage.d.ts.map +1 -0
  224. package/dist/security/pages/SecurityDashboardPage.js +145 -0
  225. package/dist/security/pages/SecurityDashboardPage.js.map +1 -0
  226. package/dist/security/pages/VaultCreatePage.d.ts +2 -0
  227. package/dist/security/pages/VaultCreatePage.d.ts.map +1 -0
  228. package/dist/security/pages/VaultCreatePage.js +87 -0
  229. package/dist/security/pages/VaultCreatePage.js.map +1 -0
  230. package/dist/security/pages/VaultDetailPage.d.ts +2 -0
  231. package/dist/security/pages/VaultDetailPage.d.ts.map +1 -0
  232. package/dist/security/pages/VaultDetailPage.js +292 -0
  233. package/dist/security/pages/VaultDetailPage.js.map +1 -0
  234. package/dist/security/pages/VaultLandingPage.d.ts +10 -0
  235. package/dist/security/pages/VaultLandingPage.d.ts.map +1 -0
  236. package/dist/security/pages/VaultLandingPage.js +81 -0
  237. package/dist/security/pages/VaultLandingPage.js.map +1 -0
  238. package/dist/security/pages/VaultSettingsPage.d.ts +2 -0
  239. package/dist/security/pages/VaultSettingsPage.d.ts.map +1 -0
  240. package/dist/security/pages/VaultSettingsPage.js +366 -0
  241. package/dist/security/pages/VaultSettingsPage.js.map +1 -0
  242. package/dist/security/pages/VaultsDashboardPage.d.ts +2 -0
  243. package/dist/security/pages/VaultsDashboardPage.d.ts.map +1 -0
  244. package/dist/security/pages/VaultsDashboardPage.js +280 -0
  245. package/dist/security/pages/VaultsDashboardPage.js.map +1 -0
  246. package/dist/security/providers/SecurityProvider.d.ts +13 -0
  247. package/dist/security/providers/SecurityProvider.d.ts.map +1 -0
  248. package/dist/security/providers/SecurityProvider.js +103 -0
  249. package/dist/security/providers/SecurityProvider.js.map +1 -0
  250. package/dist/security/routes/SecurityAdminRoutes.d.ts +7 -0
  251. package/dist/security/routes/SecurityAdminRoutes.d.ts.map +1 -0
  252. package/dist/security/routes/SecurityAdminRoutes.js +91 -0
  253. package/dist/security/routes/SecurityAdminRoutes.js.map +1 -0
  254. package/dist/security/routes/SecurityRoutes.d.ts +19 -0
  255. package/dist/security/routes/SecurityRoutes.d.ts.map +1 -0
  256. package/dist/security/routes/SecurityRoutes.js +91 -0
  257. package/dist/security/routes/SecurityRoutes.js.map +1 -0
  258. package/dist/security/routes/SecurityUserRoutes.d.ts +11 -0
  259. package/dist/security/routes/SecurityUserRoutes.d.ts.map +1 -0
  260. package/dist/security/routes/SecurityUserRoutes.js +53 -0
  261. package/dist/security/routes/SecurityUserRoutes.js.map +1 -0
  262. package/dist/security/routes/routeUtils.d.ts +28 -0
  263. package/dist/security/routes/routeUtils.d.ts.map +1 -0
  264. package/dist/security/routes/routeUtils.js +60 -0
  265. package/dist/security/routes/routeUtils.js.map +1 -0
  266. package/dist/security/store/securityStore.d.ts +35 -0
  267. package/dist/security/store/securityStore.d.ts.map +1 -0
  268. package/dist/security/store/securityStore.js +62 -0
  269. package/dist/security/store/securityStore.js.map +1 -0
  270. package/dist/security/types/index.d.ts +283 -0
  271. package/dist/security/types/index.d.ts.map +1 -0
  272. package/dist/security/utils/clipboard.d.ts +20 -0
  273. package/dist/security/utils/clipboard.d.ts.map +1 -0
  274. package/dist/security/utils/clipboard.js +23 -0
  275. package/dist/security/utils/clipboard.js.map +1 -0
  276. package/dist/security/utils/cn.d.ts +7 -0
  277. package/dist/security/utils/cn.d.ts.map +1 -0
  278. package/dist/security/utils/cn.js +10 -0
  279. package/dist/security/utils/cn.js.map +1 -0
  280. package/dist/security/utils/fileParser.d.ts +18 -0
  281. package/dist/security/utils/fileParser.d.ts.map +1 -0
  282. package/dist/security/utils/fileParser.js +108 -0
  283. package/dist/security/utils/fileParser.js.map +1 -0
  284. package/dist/security/utils/i18n.d.ts +5 -0
  285. package/dist/security/utils/i18n.d.ts.map +1 -0
  286. package/dist/security/utils/i18n.js +9 -0
  287. package/dist/security/utils/i18n.js.map +1 -0
  288. package/dist/security/utils/importParsers.d.ts +30 -0
  289. package/dist/security/utils/importParsers.d.ts.map +1 -0
  290. package/dist/security/utils/mappers.d.ts +35 -0
  291. package/dist/security/utils/mappers.d.ts.map +1 -0
  292. package/dist/security/utils/passwordGenerator.d.ts +22 -0
  293. package/dist/security/utils/passwordGenerator.d.ts.map +1 -0
  294. package/dist/security/utils/passwordGenerator.js +61 -0
  295. package/dist/security/utils/passwordGenerator.js.map +1 -0
  296. package/dist/utils/nativeBridge.d.ts +3 -0
  297. package/dist/utils/nativeBridge.d.ts.map +1 -0
  298. package/dist/utils/nativeBridge.js +2 -0
  299. package/package.json +106 -0
@@ -0,0 +1,32 @@
1
+ import { Badge as e } from "./ui.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { AlertCircle as r, AlertTriangle as i, CheckCircle as a } from "lucide-react";
4
+ //#region src/security/components/RotationStatusBadge.tsx
5
+ var o = ({ status: o, className: s }) => {
6
+ let { label: c, variant: l, Icon: u } = {
7
+ healthy: {
8
+ label: "Healthy",
9
+ variant: "success",
10
+ Icon: a
11
+ },
12
+ due: {
13
+ label: "Due",
14
+ variant: "warning",
15
+ Icon: r
16
+ },
17
+ overdue: {
18
+ label: "Overdue",
19
+ variant: "destructive",
20
+ Icon: i
21
+ }
22
+ }[o];
23
+ return /* @__PURE__ */ n(e, {
24
+ variant: l,
25
+ className: s,
26
+ children: [/* @__PURE__ */ t(u, { className: "h-3 w-3" }), c]
27
+ });
28
+ };
29
+ //#endregion
30
+ export { o as RotationStatusBadge };
31
+
32
+ //# sourceMappingURL=RotationStatusBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RotationStatusBadge.js","names":[],"sources":["../../../src/security/components/RotationStatusBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { CheckCircle, AlertCircle, AlertTriangle } from 'lucide-react';\nimport type { RotationStatus } from '../types';\nimport { Badge } from './ui';\n\ninterface RotationStatusBadgeProps {\n status: RotationStatus;\n className?: string;\n}\n\n/**\n * Badge showing rotation status: healthy, due, or overdue.\n */\nexport const RotationStatusBadge: FC<RotationStatusBadgeProps> = ({ status, className }) => {\n const config = {\n healthy: {\n label: 'Healthy',\n variant: 'success' as const,\n Icon: CheckCircle,\n },\n due: {\n label: 'Due',\n variant: 'warning' as const,\n Icon: AlertCircle,\n },\n overdue: {\n label: 'Overdue',\n variant: 'destructive' as const,\n Icon: AlertTriangle,\n },\n };\n\n const { label, variant, Icon } = config[status];\n\n return (\n <Badge variant={variant} className={className}>\n <Icon className=\"h-3 w-3\" />\n {label}\n </Badge>\n );\n};\n"],"mappings":";;;;AAaA,IAAa,KAAqD,EAAE,WAAQ,mBAAgB;CAmB1F,IAAM,EAAE,UAAO,YAAS,YAlBT;EACb,SAAS;GACP,OAAO;GACP,SAAS;GACT,MAAM;GACP;EACD,KAAK;GACH,OAAO;GACP,SAAS;GACT,MAAM;GACP;EACD,SAAS;GACP,OAAO;GACP,SAAS;GACT,MAAM;GACP;EACF,CAEuC;AAExC,QACE,kBAAC,GAAD;EAAgB;EAAoB;YAApC,CACE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAC3B,EACK"}
@@ -0,0 +1,23 @@
1
+ import { FC } from 'react';
2
+ import { SecretType } from '../types';
3
+
4
+ interface SecretFormFieldsProps {
5
+ type: SecretType;
6
+ onTypeChange: (type: SecretType) => void;
7
+ name: string;
8
+ onNameChange: (name: string) => void;
9
+ value: string;
10
+ onValueChange: (value: string) => void;
11
+ description: string;
12
+ onDescriptionChange: (description: string) => void;
13
+ labels: string[];
14
+ onLabelsChange: (labels: string[]) => void;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * Type-specific form fields for creating or editing secrets.
19
+ * Renders appropriate input fields based on the selected secret type.
20
+ */
21
+ export declare const SecretFormFields: FC<SecretFormFieldsProps>;
22
+ export {};
23
+ //# sourceMappingURL=SecretFormFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretFormFields.d.ts","sourceRoot":"","sources":["../../../src/security/components/SecretFormFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAM1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,qBAAqB;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0MtD,CAAC"}
@@ -0,0 +1,156 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { Button as t, Input as n, Select as r } from "./ui.js";
3
+ import { SECRET_TYPES as i } from "../constants/secretTypes.js";
4
+ import { PasswordGenerator as a } from "./PasswordGenerator.js";
5
+ import { useState as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { Minus as l, Plus as u } from "lucide-react";
8
+ //#region src/security/components/SecretFormFields.tsx
9
+ var d = ({ type: d, onTypeChange: f, name: p, onNameChange: m, value: h, onValueChange: g, description: _, onDescriptionChange: v, labels: y, onLabelsChange: b, className: x }) => {
10
+ let [S, C] = o(""), [w, T] = o(!1), E = i.map((e) => ({
11
+ value: e.value,
12
+ label: e.label
13
+ })), D = () => {
14
+ let e = S.trim();
15
+ e && !y.includes(e) && (b([...y, e]), C(""));
16
+ }, O = (e) => {
17
+ b(y.filter((t) => t !== e));
18
+ };
19
+ return /* @__PURE__ */ c("div", {
20
+ className: e("space-y-4", x),
21
+ children: [
22
+ /* @__PURE__ */ s(r, {
23
+ label: "Secret Type",
24
+ value: d,
25
+ onChange: (e) => f(e),
26
+ options: E
27
+ }),
28
+ /* @__PURE__ */ s(n, {
29
+ id: "secret-name",
30
+ label: "Name",
31
+ value: p,
32
+ onChange: (e) => m(e.target.value),
33
+ placeholder: "e.g., production-database-password",
34
+ required: !0
35
+ }),
36
+ /* @__PURE__ */ s(n, {
37
+ id: "secret-description",
38
+ label: "Description (optional)",
39
+ value: _,
40
+ onChange: (e) => v(e.target.value),
41
+ placeholder: "Brief description of this secret"
42
+ }),
43
+ (() => {
44
+ switch (d) {
45
+ case "CREDENTIAL": return /* @__PURE__ */ c("div", {
46
+ className: "space-y-2",
47
+ children: [
48
+ /* @__PURE__ */ s("label", {
49
+ className: "text-sm font-medium text-foreground",
50
+ children: "Password"
51
+ }),
52
+ /* @__PURE__ */ s("input", {
53
+ type: "password",
54
+ value: h,
55
+ onChange: (e) => g(e.target.value),
56
+ placeholder: "Enter password",
57
+ 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")
58
+ }),
59
+ /* @__PURE__ */ s(t, {
60
+ variant: "outline",
61
+ size: "sm",
62
+ type: "button",
63
+ onClick: () => T(!w),
64
+ children: w ? "Hide Generator" : "Generate Password"
65
+ }),
66
+ w && /* @__PURE__ */ s(a, { onAccept: (e) => {
67
+ g(e), T(!1);
68
+ } })
69
+ ]
70
+ });
71
+ case "CERTIFICATE":
72
+ case "PRIVATE_KEY": return /* @__PURE__ */ c("div", {
73
+ className: "space-y-1.5",
74
+ children: [/* @__PURE__ */ s("label", {
75
+ className: "text-sm font-medium text-foreground",
76
+ children: d === "CERTIFICATE" ? "Certificate (PEM)" : "Private Key"
77
+ }), /* @__PURE__ */ s("textarea", {
78
+ value: h,
79
+ onChange: (e) => g(e.target.value),
80
+ placeholder: d === "CERTIFICATE" ? "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----" : "-----BEGIN OPENSSH PRIVATE KEY-----\n...\n-----END OPENSSH PRIVATE KEY-----",
81
+ rows: 8,
82
+ 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]")
83
+ })]
84
+ });
85
+ case "STRUCTURED_DATA": return /* @__PURE__ */ c("div", {
86
+ className: "space-y-3",
87
+ children: [/* @__PURE__ */ s("label", {
88
+ className: "text-sm font-medium text-foreground",
89
+ children: "Structured Data (JSON format)"
90
+ }), /* @__PURE__ */ s("textarea", {
91
+ value: h,
92
+ onChange: (e) => g(e.target.value),
93
+ placeholder: "{\n \"key\": \"value\",\n \"connection\": \"...\"\n}",
94
+ rows: 5,
95
+ 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")
96
+ })]
97
+ });
98
+ default: return /* @__PURE__ */ c("div", {
99
+ className: "space-y-1.5",
100
+ children: [/* @__PURE__ */ s("label", {
101
+ className: "text-sm font-medium text-foreground",
102
+ children: "Value"
103
+ }), /* @__PURE__ */ s("textarea", {
104
+ value: h,
105
+ onChange: (e) => g(e.target.value),
106
+ placeholder: "Enter secret value",
107
+ rows: 3,
108
+ 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")
109
+ })]
110
+ });
111
+ }
112
+ })(),
113
+ /* @__PURE__ */ c("div", {
114
+ className: "space-y-2",
115
+ children: [
116
+ /* @__PURE__ */ s("label", {
117
+ className: "text-sm font-medium text-foreground",
118
+ children: "Labels"
119
+ }),
120
+ /* @__PURE__ */ c("div", {
121
+ className: "flex items-center gap-2",
122
+ children: [/* @__PURE__ */ s("input", {
123
+ value: S,
124
+ onChange: (e) => C(e.target.value),
125
+ onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), D()),
126
+ placeholder: "Add label",
127
+ 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")
128
+ }), /* @__PURE__ */ s(t, {
129
+ variant: "outline",
130
+ size: "sm",
131
+ type: "button",
132
+ onClick: D,
133
+ children: /* @__PURE__ */ s(u, { className: "h-3 w-3" })
134
+ })]
135
+ }),
136
+ y.length > 0 && /* @__PURE__ */ s("div", {
137
+ className: "flex flex-wrap gap-1.5",
138
+ children: y.map((e) => /* @__PURE__ */ c("span", {
139
+ className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-muted border border-border",
140
+ children: [e, /* @__PURE__ */ s("button", {
141
+ type: "button",
142
+ onClick: () => O(e),
143
+ className: "p-0.5 rounded-full hover:bg-destructive/10 hover:text-destructive",
144
+ children: /* @__PURE__ */ s(l, { className: "h-2.5 w-2.5" })
145
+ })]
146
+ }, e))
147
+ })
148
+ ]
149
+ })
150
+ ]
151
+ });
152
+ };
153
+ //#endregion
154
+ export { d as SecretFormFields };
155
+
156
+ //# sourceMappingURL=SecretFormFields.js.map
@@ -0,0 +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 { 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 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 const renderValueField = () => {\n switch (type) {\n case 'CREDENTIAL':\n return (\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">Password</label>\n <input\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 case 'CERTIFICATE':\n case 'PRIVATE_KEY':\n return (\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium text-foreground\">\n {type === 'CERTIFICATE' ? 'Certificate (PEM)' : 'Private Key'}\n </label>\n <textarea\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 case 'STRUCTURED_DATA':\n return (\n <div className=\"space-y-3\">\n <label className=\"text-sm font-medium text-foreground\">\n Structured Data (JSON format)\n </label>\n <textarea\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 default:\n return (\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium text-foreground\">Value</label>\n <textarea\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 };\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 {renderValueField()}\n\n {/* Labels */}\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">Labels</label>\n <div className=\"flex items-center gap-2\">\n <input\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=\"h-3 w-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=\"h-2.5 w-2.5\" />\n </button>\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AA0BA,IAAa,KAA+C,EAC1D,SACA,iBACA,SACA,iBACA,UACA,kBACA,gBACA,wBACA,WACA,mBACA,mBACI;CACJ,IAAM,CAAC,GAAU,KAAe,EAAS,GAAG,EACtC,CAAC,GAAiB,KAAsB,EAAS,GAAM,EAEvD,IAAc,EAAa,KAAK,OAAO;EAAE,OAAO,EAAE;EAAO,OAAO,EAAE;EAAO,EAAE,EAE3E,UAAiB;EACrB,IAAM,IAAU,EAAS,MAAM;AAC/B,EAAI,KAAW,CAAC,EAAO,SAAS,EAAQ,KACtC,EAAe,CAAC,GAAG,GAAQ,EAAQ,CAAC,EACpC,EAAY,GAAG;IAIb,KAAe,MAAkB;AACrC,IAAe,EAAO,QAAQ,MAAM,MAAM,EAAM,CAAC;;AAuGnD,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,aAAa,EAAU;YAA1C;GAEE,kBAAC,GAAD;IACE,OAAM;IACN,OAAO;IACP,WAAW,MAAM,EAAa,EAAgB;IAC9C,SAAS;IACT,CAAA;GAGF,kBAAC,GAAD;IACE,IAAG;IACH,OAAM;IACN,OAAO;IACP,WAAW,MAAM,EAAa,EAAE,OAAO,MAAM;IAC7C,aAAY;IACZ,UAAA;IACA,CAAA;GAGF,kBAAC,GAAD;IACE,IAAG;IACH,OAAM;IACN,OAAO;IACP,WAAW,MAAM,EAAoB,EAAE,OAAO,MAAM;IACpD,aAAY;IACZ,CAAA;UA/HyB;AAC7B,YAAQ,GAAR;KACE,KAAK,aACH,QACE,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,SAAD;QAAO,WAAU;kBAAsC;QAAgB,CAAA;OACvE,kBAAC,SAAD;QACE,MAAK;QACE;QACP,WAAW,MAAM,EAAc,EAAE,OAAO,MAAM;QAC9C,aAAY;QACZ,WAAW,EACT,6FACA,0EACD;QACD,CAAA;OACF,kBAAC,GAAD;QACE,SAAQ;QACR,MAAK;QACL,MAAK;QACL,eAAe,EAAmB,CAAC,EAAgB;kBAElD,IAAkB,mBAAmB;QAC/B,CAAA;OACR,KACC,kBAAC,GAAD,EACE,WAAW,MAAO;AAEhB,QADA,EAAc,EAAG,EACjB,EAAmB,GAAM;UAE3B,CAAA;OAEA;;KAGV,KAAK;KACL,KAAK,cACH,QACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,SAAD;OAAO,WAAU;iBACd,MAAS,gBAAgB,sBAAsB;OAC1C,CAAA,EACR,kBAAC,YAAD;OACS;OACP,WAAW,MAAM,EAAc,EAAE,OAAO,MAAM;OAC9C,aACE,MAAS,gBACL,gEACA;OAEN,MAAM;OACN,WAAW,EACT,yFACA,2EACA,yBACD;OACD,CAAA,CACE;;KAGV,KAAK,kBACH,QACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,SAAD;OAAO,WAAU;iBAAsC;OAE/C,CAAA,EACR,kBAAC,YAAD;OACS;OACP,WAAW,MAAM,EAAc,EAAE,OAAO,MAAM;OAC9C,aAAa;OACb,MAAM;OACN,WAAW,EACT,yFACA,2EACA,WACD;OACD,CAAA,CACE;;KAGV,QACE,QACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,SAAD;OAAO,WAAU;iBAAsC;OAAa,CAAA,EACpE,kBAAC,YAAD;OACS;OACP,WAAW,MAAM,EAAc,EAAE,OAAO,MAAM;OAC9C,aAAY;OACZ,MAAM;OACN,WAAW,EACT,yFACA,2EACA,WACD;OACD,CAAA,CACE;;;OAmCS;GAGnB,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,SAAD;MAAO,WAAU;gBAAsC;MAAc,CAAA;KACrE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,SAAD;OACE,OAAO;OACP,WAAW,MAAM,EAAY,EAAE,OAAO,MAAM;OAC5C,YAAY,MAAM,EAAE,QAAQ,YAAY,EAAE,gBAAgB,EAAE,GAAU;OACtE,aAAY;OACZ,WAAW,EACT,mFACA,0EACD;OACD,CAAA,EACF,kBAAC,GAAD;OAAQ,SAAQ;OAAU,MAAK;OAAK,MAAK;OAAS,SAAS;iBACzD,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA;OACrB,CAAA,CACL;;KACL,EAAO,SAAS,KACf,kBAAC,OAAD;MAAK,WAAU;gBACZ,EAAO,KAAK,MACX,kBAAC,QAAD;OAEE,WAAU;iBAFZ,CAIG,GACD,kBAAC,UAAD;QACE,MAAK;QACL,eAAe,EAAY,EAAM;QACjC,WAAU;kBAEV,kBAAC,GAAD,EAAO,WAAU,eAAgB,CAAA;QAC1B,CAAA,CACJ;SAXA,EAWA,CACP;MACE,CAAA;KAEJ;;GACF"}
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { Secret } from '../types';
3
+
4
+ interface SecretRowProps {
5
+ secret: Secret;
6
+ isSelected?: boolean;
7
+ onSelect?: (secretId: string) => void;
8
+ onClick?: () => void;
9
+ className?: string;
10
+ }
11
+ export declare const SecretRow: FC<SecretRowProps>;
12
+ export {};
13
+ //# sourceMappingURL=SecretRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretRow.d.ts","sourceRoot":"","sources":["../../../src/security/components/SecretRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAShC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAiGxC,CAAC"}
@@ -0,0 +1,88 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { Badge as t } from "./ui.js";
3
+ import { translateWithFallback as n } from "../utils/i18n.js";
4
+ import { SecretTypeIcon as r } from "./SecretTypeIcon.js";
5
+ import { SecretTypeBadge as i } from "./SecretTypeBadge.js";
6
+ import { RotationStatusBadge as a } from "./RotationStatusBadge.js";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
+ import { Clock as c } from "lucide-react";
9
+ import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ //#region src/security/components/SecretRow.tsx
11
+ var u = ({ secret: u, isSelected: d = !1, onSelect: f, onClick: p, className: m }) => {
12
+ let { t: h } = l(), g = (e, t, r) => n(h, e, t, r);
13
+ return /* @__PURE__ */ s("div", {
14
+ 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", p && "cursor-pointer", m),
15
+ onClick: p,
16
+ onKeyDown: (e) => {
17
+ p && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p());
18
+ },
19
+ role: p ? "button" : void 0,
20
+ tabIndex: p ? 0 : void 0,
21
+ "aria-selected": d,
22
+ children: [
23
+ f && /* @__PURE__ */ o("input", {
24
+ type: "checkbox",
25
+ checked: d,
26
+ onChange: (e) => {
27
+ e.stopPropagation(), f(u.id);
28
+ },
29
+ className: "rounded accent-primary shrink-0",
30
+ onClick: (e) => e.stopPropagation(),
31
+ "aria-label": g("security.secretRow.checkbox.aria", "Select secret {name}", { name: u.name })
32
+ }),
33
+ /* @__PURE__ */ o("div", {
34
+ className: "shrink-0",
35
+ children: /* @__PURE__ */ o(r, {
36
+ type: u.type,
37
+ size: 18
38
+ })
39
+ }),
40
+ /* @__PURE__ */ s("div", {
41
+ className: "flex-1 min-w-0",
42
+ children: [/* @__PURE__ */ s("div", {
43
+ className: "flex items-center gap-2",
44
+ children: [/* @__PURE__ */ o("span", {
45
+ className: "font-medium text-sm text-foreground truncate",
46
+ children: u.name
47
+ }), /* @__PURE__ */ o(i, { type: u.type })]
48
+ }), u.description && /* @__PURE__ */ o("p", {
49
+ className: "text-xs text-muted-foreground truncate mt-0.5",
50
+ children: u.description
51
+ })]
52
+ }),
53
+ u.labels && u.labels.length > 0 && /* @__PURE__ */ s("div", {
54
+ className: "flex items-center gap-1 shrink-0",
55
+ children: [u.labels.slice(0, 2).map((e) => /* @__PURE__ */ o(t, {
56
+ variant: "outline",
57
+ children: e.label
58
+ }, e.id)), u.labels.length > 2 && /* @__PURE__ */ s(t, {
59
+ variant: "outline",
60
+ children: ["+", u.labels.length - 2]
61
+ })]
62
+ }),
63
+ u.lastRotatedAt && /* @__PURE__ */ o("div", {
64
+ className: "shrink-0",
65
+ children: /* @__PURE__ */ o(a, { status: "healthy" })
66
+ }),
67
+ /* @__PURE__ */ s("div", {
68
+ className: "flex items-center gap-1 text-xs text-muted-foreground shrink-0",
69
+ "aria-label": g("security.secretRow.lastUpdated.aria", "Last updated {date}", { date: new Date(u.updatedAt).toLocaleDateString() }),
70
+ children: [
71
+ /* @__PURE__ */ o(c, { className: "h-3 w-3" }),
72
+ /* @__PURE__ */ o("span", {
73
+ className: "sr-only",
74
+ children: g("security.secretRow.lastUpdated.srOnly", "Last updated {date}", { date: new Date(u.updatedAt).toLocaleDateString() })
75
+ }),
76
+ /* @__PURE__ */ o("span", {
77
+ "aria-hidden": "true",
78
+ children: new Date(u.updatedAt).toLocaleDateString()
79
+ })
80
+ ]
81
+ })
82
+ ]
83
+ });
84
+ };
85
+ //#endregion
86
+ export { u as SecretRow };
87
+
88
+ //# sourceMappingURL=SecretRow.js.map
@@ -0,0 +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 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 onClick && 'cursor-pointer',\n className\n )}\n onClick={onClick}\n onKeyDown={handleKeyDown}\n role={onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n aria-selected={isSelected}\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=\"h-3 w-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;AASjD,QACE,kBAAC,OAAD;EACE,WAAW,EACT,4EACA,uCACA,sDACA,KAAc,gBACd,KAAW,kBACX,EACD;EACQ;EACT,YAlBmB,MAA2B;AAChD,GAAI,MAAY,EAAE,QAAQ,WAAW,EAAE,QAAQ,SAC7C,EAAE,gBAAgB,EAClB,GAAS;;EAgBT,MAAM,IAAU,WAAW,KAAA;EAC3B,UAAU,IAAU,IAAI,KAAA;EACxB,iBAAe;YAbjB;GAeG,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,WAAY,CAAA;KAC7B,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"}
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { SecretType } from '../types';
3
+
4
+ interface SecretTypeBadgeProps {
5
+ type: SecretType;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * Colored badge showing the secret type with its icon.
10
+ */
11
+ export declare const SecretTypeBadge: FC<SecretTypeBadgeProps>;
12
+ export {};
13
+ //# sourceMappingURL=SecretTypeBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretTypeBadge.d.ts","sourceRoot":"","sources":["../../../src/security/components/SecretTypeBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,UAAU,oBAAoB;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAepD,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { getSecretTypeInfo as t } from "../constants/secretTypes.js";
3
+ import { SecretTypeIcon as n } from "./SecretTypeIcon.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/security/components/SecretTypeBadge.tsx
6
+ var a = ({ type: a, className: o }) => {
7
+ let s = t(a);
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),
10
+ children: [/* @__PURE__ */ r(n, {
11
+ type: a,
12
+ size: 12
13
+ }), s.label]
14
+ });
15
+ };
16
+ //#endregion
17
+ export { a as SecretTypeBadge };
18
+
19
+ //# sourceMappingURL=SecretTypeBadge.js.map
@@ -0,0 +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"}
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { SecretType } from '../types';
3
+
4
+ interface SecretTypeIconProps {
5
+ type: SecretType;
6
+ size?: number;
7
+ className?: string;
8
+ }
9
+ /**
10
+ * Renders the appropriate icon for a given secret type.
11
+ */
12
+ export declare const SecretTypeIcon: FC<SecretTypeIconProps>;
13
+ export {};
14
+ //# sourceMappingURL=SecretTypeIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretTypeIcon.d.ts","sourceRoot":"","sources":["../../../src/security/components/SecretTypeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAchC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,UAAU,mBAAmB;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgBD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAKlD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { getSecretTypeInfo as t } from "../constants/secretTypes.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { Award as r, Database as i, FileCode as a, Key as o, KeyRound as s, Lock as c, Settings as l, Shield as u, Terminal as d, Ticket as f, Webhook as p } from "lucide-react";
5
+ //#region src/security/components/SecretTypeIcon.tsx
6
+ var m = {
7
+ KeyRound: s,
8
+ Key: o,
9
+ Ticket: f,
10
+ Award: r,
11
+ Terminal: d,
12
+ Database: i,
13
+ Lock: c,
14
+ Shield: u,
15
+ Webhook: p,
16
+ FileCode: a,
17
+ Settings: l
18
+ }, h = ({ type: r, size: i = 16, className: a }) => {
19
+ let o = t(r);
20
+ return /* @__PURE__ */ n(m[o.icon] ?? l, {
21
+ size: i,
22
+ className: e(o.color, a)
23
+ });
24
+ };
25
+ //#endregion
26
+ export { h as SecretTypeIcon };
27
+
28
+ //# sourceMappingURL=SecretTypeIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretTypeIcon.js","names":[],"sources":["../../../src/security/components/SecretTypeIcon.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {\n KeyRound,\n Key,\n Ticket,\n Award,\n Terminal,\n Database,\n Lock,\n Shield,\n Webhook,\n FileCode,\n Settings,\n} from 'lucide-react';\nimport type { SecretType } from '../types';\nimport { getSecretTypeInfo } from '../constants/secretTypes';\nimport { cn } from '../utils/cn';\n\ninterface SecretTypeIconProps {\n type: SecretType;\n size?: number;\n className?: string;\n}\n\nconst iconMap: Record<string, FC<{ className?: string; size?: number }>> = {\n KeyRound,\n Key,\n Ticket,\n Award,\n Terminal,\n Database,\n Lock,\n Shield,\n Webhook,\n FileCode,\n Settings,\n};\n\n/**\n * Renders the appropriate icon for a given secret type.\n */\nexport const SecretTypeIcon: FC<SecretTypeIconProps> = ({ type, size = 16, className }) => {\n const info = getSecretTypeInfo(type);\n const IconComponent = iconMap[info.icon] ?? Settings;\n\n return <IconComponent size={size} className={cn(info.color, className)} />;\n};\n"],"mappings":";;;;;AAwBA,IAAM,IAAqE;CACzE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAKY,KAA2C,EAAE,SAAM,UAAO,IAAI,mBAAgB;CACzF,IAAM,IAAO,EAAkB,EAAK;AAGpC,QAAO,kBAFe,EAAQ,EAAK,SAAS,GAErC;EAAqB;EAAM,WAAW,EAAG,EAAK,OAAO,EAAU;EAAI,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { FC } from 'react';
2
+
3
+ interface SecretValueDisplayProps {
4
+ /** The actual secret value */
5
+ value: string;
6
+ /** Whether the value is currently revealed */
7
+ isRevealed: boolean;
8
+ /** Callback to toggle reveal state; if undefined the reveal button is disabled */
9
+ onToggleReveal?: () => void;
10
+ /** Auto-hide timer in milliseconds (0 = no auto-hide, default 30000) */
11
+ autoHideMs?: number;
12
+ /** Clipboard auto-clear time in ms */
13
+ clipboardAutoClearMs?: number;
14
+ /** Whether loading the decrypted value */
15
+ isLoading?: boolean;
16
+ /** Additional CSS classes */
17
+ className?: string;
18
+ }
19
+ /**
20
+ * Displays a secret value with masking, reveal toggle, and auto-hide.
21
+ * When hidden, shows masked dots. When revealed, shows the actual value
22
+ * with a monospaced font and auto-hides after the configured timeout.
23
+ */
24
+ export declare const SecretValueDisplay: FC<SecretValueDisplayProps>;
25
+ export {};
26
+ //# sourceMappingURL=SecretValueDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretValueDisplay.d.ts","sourceRoot":"","sources":["../../../src/security/components/SecretValueDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAA4C,MAAM,OAAO,CAAC;AAK1E,UAAU,uBAAuB;IAC/B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAmG1D,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { CopyButton as t } from "./CopyButton.js";
3
+ import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
4
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ import { Eye as c, EyeOff as l } from "lucide-react";
6
+ //#region src/security/components/SecretValueDisplay.tsx
7
+ var u = ({ value: u, isRevealed: d, onToggleReveal: f, autoHideMs: p = 3e4, clipboardAutoClearMs: m = 3e4, isLoading: h = !1, className: g }) => {
8
+ let [_, v] = a(0), y = i(null), b = i(null), x = n(() => {
9
+ y.current &&= (clearInterval(y.current), null), b.current &&= (clearTimeout(b.current), null), v(0);
10
+ }, []);
11
+ r(() => (d && p > 0 ? (v(p), y.current = setInterval(() => {
12
+ v((e) => {
13
+ let t = e - 1e3;
14
+ return t <= 0 ? 0 : t;
15
+ });
16
+ }, 1e3), b.current = setTimeout(() => {
17
+ f?.();
18
+ }, p)) : x(), x), [
19
+ d,
20
+ p,
21
+ f,
22
+ x
23
+ ]);
24
+ let S = "•".repeat(Math.min(24, u.length || 16));
25
+ return /* @__PURE__ */ s("div", {
26
+ className: e("flex items-center gap-2", g),
27
+ children: [
28
+ /* @__PURE__ */ o("div", {
29
+ className: e("flex-1 px-3 py-2 rounded-md border border-border bg-muted/50", "font-mono text-sm select-all", !d && "tracking-wider"),
30
+ children: h ? /* @__PURE__ */ o("span", {
31
+ className: "text-muted-foreground animate-pulse",
32
+ children: "Decrypting..."
33
+ }) : d ? /* @__PURE__ */ o("span", {
34
+ className: "break-all",
35
+ children: u
36
+ }) : /* @__PURE__ */ o("span", {
37
+ className: "text-muted-foreground",
38
+ children: S
39
+ })
40
+ }),
41
+ /* @__PURE__ */ s("div", {
42
+ className: "flex items-center gap-1 shrink-0",
43
+ children: [/* @__PURE__ */ o("button", {
44
+ onClick: f,
45
+ disabled: h || !f,
46
+ 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
+ "aria-label": d ? "Hide value" : "Reveal value",
48
+ title: d ? "Hide value" : "Reveal value",
49
+ children: o(d ? l : c, { className: "h-4 w-4" })
50
+ }), /* @__PURE__ */ o(t, {
51
+ value: u,
52
+ autoClearMs: m,
53
+ disabled: h || !u
54
+ })]
55
+ }),
56
+ d && p > 0 && _ > 0 && /* @__PURE__ */ s("span", {
57
+ className: "text-xs text-muted-foreground tabular-nums shrink-0",
58
+ children: [Math.ceil(_ / 1e3), "s"]
59
+ })
60
+ ]
61
+ });
62
+ };
63
+ //#endregion
64
+ export { u as SecretValueDisplay };
65
+
66
+ //# sourceMappingURL=SecretValueDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecretValueDisplay.js","names":[],"sources":["../../../src/security/components/SecretValueDisplay.tsx"],"sourcesContent":["import { type FC, useState, useEffect, useCallback, useRef } 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 const [autoHideCountdown, setAutoHideCountdown] = useState<number>(0);\n const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);\n const hideTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const clearTimers = useCallback(() => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n timerRef.current = null;\n }\n if (hideTimeoutRef.current) {\n clearTimeout(hideTimeoutRef.current);\n hideTimeoutRef.current = null;\n }\n setAutoHideCountdown(0);\n }, []);\n\n // Start auto-hide countdown when revealed\n useEffect(() => {\n if (isRevealed && autoHideMs > 0) {\n setAutoHideCountdown(autoHideMs);\n\n timerRef.current = setInterval(() => {\n setAutoHideCountdown((prev) => {\n const next = prev - 1000;\n return next <= 0 ? 0 : next;\n });\n }, 1000);\n\n hideTimeoutRef.current = setTimeout(() => {\n onToggleReveal?.();\n }, autoHideMs);\n } else {\n clearTimers();\n }\n\n return clearTimers;\n }, [isRevealed, autoHideMs, onToggleReveal, clearTimers]);\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 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=\"h-4 w-4\" /> : <Eye className=\"h-4 w-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;CACJ,IAAM,CAAC,GAAmB,KAAwB,EAAiB,EAAE,EAC/D,IAAW,EAA8C,KAAK,EAC9D,IAAiB,EAA6C,KAAK,EAEnE,IAAc,QAAkB;AASpC,EARA,AAEE,EAAS,aADT,cAAc,EAAS,QAAQ,EACZ,OAErB,AAEE,EAAe,aADf,aAAa,EAAe,QAAQ,EACX,OAE3B,EAAqB,EAAE;IACtB,EAAE,CAAC;AAGN,UACM,KAAc,IAAa,KAC7B,EAAqB,EAAW,EAEhC,EAAS,UAAU,kBAAkB;AACnC,KAAsB,MAAS;GAC7B,IAAM,IAAO,IAAO;AACpB,UAAO,KAAQ,IAAI,IAAI;IACvB;IACD,IAAK,EAER,EAAe,UAAU,iBAAiB;AACxC,OAAkB;IACjB,EAAW,IAEd,GAAa,EAGR,IACN;EAAC;EAAY;EAAY;EAAgB;EAAY,CAAC;CAEzD,IAAM,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;KAAoB,CAAA,GACxE,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,SAAS;KACT,UAAU,KAAa,CAAC;KACxB,WAAW,EACT,8DACA,qCACA,kDACD;KACD,cAAY,IAAa,eAAe;KACxC,OAAO,IAAa,eAAe;eAErB,EAAb,IAAc,IAAiC,GAAlC,EAAQ,WAAU,WAAY,CAA8B;KACnE,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"}
@@ -0,0 +1,16 @@
1
+ import { FC, ReactNode } from 'react';
2
+
3
+ export type SecurityPermission = 'vault:read' | 'vault:create' | 'vault:update' | 'vault:delete' | 'vault:lock' | 'secret:read' | 'secret:create' | 'secret:update' | 'secret:delete' | 'secret:decrypt' | 'member:read' | 'member:add' | 'member:remove' | 'member:update_role';
4
+ interface SecurityPermissionGuardProps {
5
+ permission: SecurityPermission;
6
+ /**
7
+ * Optional feature flag key. When provided, BOTH the RBAC permission check
8
+ * AND the feature flag must pass for children to be rendered.
9
+ */
10
+ featureFlagKey?: string;
11
+ featureFlagDefault?: boolean;
12
+ children: ReactNode;
13
+ }
14
+ export declare const SecurityPermissionGuard: FC<SecurityPermissionGuardProps>;
15
+ export {};
16
+ //# sourceMappingURL=SecurityPermissionGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecurityPermissionGuard.d.ts","sourceRoot":"","sources":["../../../src/security/components/SecurityPermissionGuard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO3C,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,cAAc,GACd,cAAc,GACd,cAAc,GACd,YAAY,GACZ,aAAa,GACb,eAAe,GACf,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,eAAe,GACf,oBAAoB,CAAC;AAEzB,UAAU,4BAA4B;IACpC,UAAU,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAqCpE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { translateWithFallback as e } from "../utils/i18n.js";
2
+ import { AccessDenied as t } from "@burdenoff/fe-libs/shared/components";
3
+ import { useFeatureFlag as n, usePermissions as r } from "@burdenoff/fe-libs/shared/providers/shell";
4
+ import { Fragment as i, jsx as a } from "react/jsx-runtime";
5
+ import { Loader2 as o } from "lucide-react";
6
+ import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ //#region src/security/components/SecurityPermissionGuard.tsx
8
+ var c = ({ permission: c, featureFlagKey: l, featureFlagDefault: u = !0, children: d }) => {
9
+ let { hasPermission: f, isLoading: p } = r(), { t: m } = s(), h = (t, n) => e(m, t, n), g = n(l ?? "__none__", u);
10
+ return p ? /* @__PURE__ */ a("div", {
11
+ className: "flex min-h-[200px] items-center justify-center",
12
+ children: /* @__PURE__ */ a(o, { className: "h-8 w-8 animate-spin text-primary" })
13
+ }) : f(c) ? l && !g ? null : /* @__PURE__ */ a(i, { children: d }) : /* @__PURE__ */ a(t, {
14
+ title: h("security.accessDenied.title", "Access Denied"),
15
+ description: h("security.accessDenied.description", "You don't have permission to perform this action.")
16
+ });
17
+ };
18
+ //#endregion
19
+ export { c as SecurityPermissionGuard };
20
+
21
+ //# sourceMappingURL=SecurityPermissionGuard.js.map