@jmruthers/pace-core 0.6.10 → 0.6.12

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 (1500) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/audit-tool/00-dependencies.cjs +46 -13
  3. package/audit-tool/audits/01-pace-core-compliance.cjs +96 -21
  4. package/audit-tool/audits/02-project-structure.cjs +13 -3
  5. package/audit-tool/audits/03-architecture.cjs +78 -4
  6. package/audit-tool/audits/04-code-quality.cjs +9 -2
  7. package/audit-tool/audits/05-styling.cjs +19 -7
  8. package/audit-tool/audits/06-security-rbac.cjs +105 -14
  9. package/audit-tool/audits/07-api-tech-stack.cjs +31 -15
  10. package/audit-tool/audits/08-testing-documentation.cjs +11 -3
  11. package/audit-tool/audits/09-operations.cjs +19 -7
  12. package/audit-tool/index.cjs +22 -11
  13. package/audit-tool/utils/report-utils.cjs +4 -0
  14. package/cursor-rules/01-pace-core-compliance.mdc +1 -0
  15. package/cursor-rules/02-project-structure.mdc +1 -0
  16. package/cursor-rules/03-architecture.mdc +3 -1
  17. package/cursor-rules/04-code-quality.mdc +1 -0
  18. package/cursor-rules/05-styling.mdc +41 -7
  19. package/cursor-rules/06-security-rbac.mdc +2 -1
  20. package/cursor-rules/07-api-tech-stack.mdc +1 -0
  21. package/cursor-rules/08-testing-documentation.mdc +1 -0
  22. package/cursor-rules/09-operations.mdc +1 -0
  23. package/dist/DataTable-AQAHSFLM.js +17 -0
  24. package/dist/InactivityServiceProvider-BbxwwDz1.d.ts +308 -0
  25. package/dist/UnifiedAuthProvider-Bkt_tzdS.d.ts +183 -0
  26. package/dist/api-6OQXYT67.js +6 -0
  27. package/dist/api-result-USV1Czr-.d.ts +51 -0
  28. package/dist/audit-HI2DHUVU.js +4 -0
  29. package/dist/auth-JvdRVaud.d.ts +49 -0
  30. package/dist/chunk-2DL2WSOE.js +327 -0
  31. package/dist/chunk-2GBDPPUC.js +61 -0
  32. package/dist/chunk-44CNXN4P.js +15 -0
  33. package/dist/chunk-AP5FG7W4.js +2159 -0
  34. package/dist/chunk-CU2BU2MQ.js +2 -0
  35. package/dist/chunk-D6BMFMQZ.js +200 -0
  36. package/dist/chunk-ENLXB7GP.js +721 -0
  37. package/dist/chunk-GHCUP64P.js +105 -0
  38. package/dist/chunk-H6RTU4DZ.js +1098 -0
  39. package/dist/chunk-HQTYP6BX.js +6468 -0
  40. package/dist/chunk-M7QE7XOA.js +529 -0
  41. package/dist/chunk-MVVWZ7JV.js +1329 -0
  42. package/dist/chunk-NJ7FGQWB.js +811 -0
  43. package/dist/chunk-QRYSEPHB.js +429 -0
  44. package/dist/chunk-QWIG36BZ.js +264 -0
  45. package/dist/chunk-S57OLCLO.js +2946 -0
  46. package/dist/chunk-VFLR5K2H.js +23 -0
  47. package/dist/chunk-XOJME5T7.js +407 -0
  48. package/dist/chunk-XPFVT3GN.js +492 -0
  49. package/dist/chunk-Y2LWSLLB.js +9614 -0
  50. package/dist/chunk-YFGNMB67.js +2390 -0
  51. package/dist/components.d.ts +10 -9
  52. package/dist/components.js +20 -17
  53. package/dist/database.generated-qkdoiVrJ.d.ts +9441 -0
  54. package/dist/eslint-rules/index.cjs +3 -0
  55. package/dist/eslint-rules/rules/03-architecture.cjs +74 -0
  56. package/dist/eslint-rules/rules/06-security-rbac.cjs +74 -0
  57. package/dist/event-BfCox3N2.d.ts +265 -0
  58. package/dist/file-reference-DU1hcawx.d.ts +164 -0
  59. package/dist/functions-hF5ImHCr.d.ts +208 -0
  60. package/dist/hooks.d.ts +22 -9
  61. package/dist/hooks.js +35 -25
  62. package/dist/icons/index.d.ts +1 -0
  63. package/dist/icons/index.js +1 -0
  64. package/dist/index.d.ts +69 -180
  65. package/dist/index.js +319 -342
  66. package/dist/pagination-BW1mqywp.d.ts +201 -0
  67. package/dist/providers.d.ts +6 -5
  68. package/dist/providers.js +6 -3
  69. package/dist/rbac/index.d.ts +133 -148
  70. package/dist/rbac/index.js +12 -9
  71. package/dist/theming/runtime.d.ts +19 -2
  72. package/dist/theming/runtime.js +1 -1
  73. package/dist/timezone-BTWWXKVY.d.ts +696 -0
  74. package/dist/types-Besvoyzb.d.ts +55 -0
  75. package/dist/types-CGHrxfqc.d.ts +114 -0
  76. package/dist/types.d.ts +19 -12
  77. package/dist/types.js +1 -0
  78. package/dist/usePublicPageContext-BQrHf95t.d.ts +4367 -0
  79. package/dist/usePublicRouteParams-BgV6VhMi.d.ts +946 -0
  80. package/dist/utils.d.ts +163 -145
  81. package/dist/utils.js +45 -27
  82. package/docs/api/@jmruthers/namespaces/DialogPortal/README.md +14 -0
  83. package/docs/api/@jmruthers/namespaces/DialogPortal/variables/displayName.md +11 -0
  84. package/docs/api/README.md +6 -2
  85. package/docs/api/_media/README.md +186 -0
  86. package/docs/api/classes/ColumnFactory.md +225 -0
  87. package/docs/api/classes/Logger.md +246 -0
  88. package/docs/api/classes/RBACAuditManager.md +299 -0
  89. package/docs/api/classes/RBACCache.md +389 -0
  90. package/docs/api/classes/RBACEngine.md +181 -0
  91. package/docs/api/classes/SecureSupabaseClient.md +168 -0
  92. package/docs/api/classes/StorageUtils.md +324 -0
  93. package/docs/api/enumerations/FileCategory.md +137 -0
  94. package/docs/api/enumerations/LogLevel.md +43 -0
  95. package/docs/api/enumerations/RBACErrorCode.md +169 -0
  96. package/docs/api/enumerations/RPCFunction.md +89 -0
  97. package/docs/api/functions/AccessDenied.md +30 -0
  98. package/docs/api/functions/AppSwitcher.md +21 -0
  99. package/docs/api/functions/Badge.md +42 -0
  100. package/docs/api/functions/ContextSelector.md +43 -0
  101. package/docs/api/functions/DataTable.md +36 -0
  102. package/docs/api/functions/DatePickerWithTimezone.md +28 -0
  103. package/docs/api/functions/DialogBody.md +24 -0
  104. package/docs/api/functions/DialogFooter.md +24 -0
  105. package/docs/api/functions/DialogHeader.md +24 -0
  106. package/docs/api/functions/ErrorBoundaryProvider.md +28 -0
  107. package/docs/api/functions/EventServiceProvider.md +28 -0
  108. package/docs/api/functions/FileDisplay.md +25 -0
  109. package/docs/api/functions/FileUpload.md +21 -0
  110. package/docs/api/functions/Form.md +50 -0
  111. package/docs/api/functions/FormField.md +102 -0
  112. package/docs/api/functions/Header.md +21 -0
  113. package/docs/api/functions/InactivityServiceProvider.md +28 -0
  114. package/docs/api/functions/InactivityWarningModal.md +21 -0
  115. package/docs/api/functions/Input.md +49 -0
  116. package/docs/api/functions/NavigationGuard.md +31 -0
  117. package/docs/api/functions/OrganisationServiceProvider.md +28 -0
  118. package/docs/api/functions/PaceAppLayout.md +169 -0
  119. package/docs/api/functions/PasswordChangeForm.md +21 -0
  120. package/docs/api/functions/ProtectedRoute.md +37 -0
  121. package/docs/api/functions/PublicPageFooter.md +21 -0
  122. package/docs/api/functions/PublicPageHeader.md +21 -0
  123. package/docs/api/functions/PublicPageLayout.md +33 -0
  124. package/docs/api/functions/PublicPageProvider.md +30 -0
  125. package/docs/api/functions/Textarea.md +49 -0
  126. package/docs/api/functions/Toaster.md +34 -0
  127. package/docs/api/functions/UnifiedAuthProvider.md +28 -0
  128. package/docs/api/functions/applyPalette.md +33 -0
  129. package/docs/api/functions/archiveFile.md +47 -0
  130. package/docs/api/functions/average.md +63 -0
  131. package/docs/api/functions/buildAppUrl.md +46 -0
  132. package/docs/api/functions/clearInFlightRequests.md +17 -0
  133. package/docs/api/functions/clearPalette.md +18 -0
  134. package/docs/api/functions/clearPublicEventCache.md +18 -0
  135. package/docs/api/functions/clearPublicFileDisplayCache.md +18 -0
  136. package/docs/api/functions/clearPublicLogoCache.md +18 -0
  137. package/docs/api/functions/cn.md +21 -0
  138. package/docs/api/functions/count.md +56 -0
  139. package/docs/api/functions/createAuditManager.md +45 -0
  140. package/docs/api/functions/createBaseClient.md +75 -0
  141. package/docs/api/functions/createLogger.md +95 -0
  142. package/docs/api/functions/createRBACConfig.md +21 -0
  143. package/docs/api/functions/createRBACEngine.md +33 -0
  144. package/docs/api/functions/createRBACExpressMiddleware.md +84 -0
  145. package/docs/api/functions/createRBACMiddleware.md +88 -0
  146. package/docs/api/functions/createSecureClient.md +80 -0
  147. package/docs/api/functions/createSecureDataAccess.md +39 -0
  148. package/docs/api/functions/deleteFile.md +33 -0
  149. package/docs/api/functions/disablePerformanceMonitoring.md +17 -0
  150. package/docs/api/functions/downloadFile.md +33 -0
  151. package/docs/api/functions/emitAuditEvent.md +27 -0
  152. package/docs/api/functions/enablePerformanceMonitoring.md +17 -0
  153. package/docs/api/functions/err.md +23 -0
  154. package/docs/api/functions/exportToCSV.md +56 -0
  155. package/docs/api/functions/exportToCSVWithTableRows.md +46 -0
  156. package/docs/api/functions/extractEventCodeFromPath.md +24 -0
  157. package/docs/api/functions/extractFileMetadata.md +33 -0
  158. package/docs/api/functions/formatCompactNumber.md +27 -0
  159. package/docs/api/functions/formatCurrency.md +31 -0
  160. package/docs/api/functions/formatDate.md +23 -0
  161. package/docs/api/functions/formatDateTime.md +24 -0
  162. package/docs/api/functions/formatFileSize.md +23 -0
  163. package/docs/api/functions/formatInTimeZone.md +46 -0
  164. package/docs/api/functions/formatNumber.md +31 -0
  165. package/docs/api/functions/formatPercent.md +64 -0
  166. package/docs/api/functions/formatTime.md +24 -0
  167. package/docs/api/functions/formatTimeInTimeZone.md +40 -0
  168. package/docs/api/functions/fromSupabaseClient.md +49 -0
  169. package/docs/api/functions/fromZonedTime.md +41 -0
  170. package/docs/api/functions/generateCSVContent.md +55 -0
  171. package/docs/api/functions/generateFilePath.md +29 -0
  172. package/docs/api/functions/generateFileUrlsBatch.md +33 -0
  173. package/docs/api/functions/generatePublicRoutePath.md +27 -0
  174. package/docs/api/functions/generateUniqueFileName.md +24 -0
  175. package/docs/api/functions/getAccessLevel.md +48 -0
  176. package/docs/api/functions/getAllAppPorts.md +19 -0
  177. package/docs/api/functions/getAllStylePaths.md +15 -0
  178. package/docs/api/functions/getAppConfig.md +17 -0
  179. package/docs/api/functions/getAppPort.md +34 -0
  180. package/docs/api/functions/getBucketName.md +27 -0
  181. package/docs/api/functions/getCurrentAppId.md +17 -0
  182. package/docs/api/functions/getCurrentAppName.md +17 -0
  183. package/docs/api/functions/getFileSizeLimit.md +23 -0
  184. package/docs/api/functions/getGlobalAuditManager.md +19 -0
  185. package/docs/api/functions/getInFlightRequestCount.md +19 -0
  186. package/docs/api/functions/getPerformanceMetrics.md +17 -0
  187. package/docs/api/functions/getPerformanceSummary.md +17 -0
  188. package/docs/api/functions/getPermissionMap.md +52 -0
  189. package/docs/api/functions/getPublicEventCacheStats.md +25 -0
  190. package/docs/api/functions/getPublicFileDisplayCacheStats.md +25 -0
  191. package/docs/api/functions/getPublicLogoCacheStats.md +25 -0
  192. package/docs/api/functions/getPublicUrl.md +39 -0
  193. package/docs/api/functions/getRBACConfig.md +15 -0
  194. package/docs/api/functions/getRBACLogger.md +15 -0
  195. package/docs/api/functions/getRoleContext.md +31 -0
  196. package/docs/api/functions/getSignedUrl.md +34 -0
  197. package/docs/api/functions/getStylePath.md +21 -0
  198. package/docs/api/functions/getTimeZoneDifference.md +40 -0
  199. package/docs/api/functions/getTimezoneAbbreviation.md +40 -0
  200. package/docs/api/functions/getUserTimeZone.md +26 -0
  201. package/docs/api/functions/hasAllPermissions.md +41 -0
  202. package/docs/api/functions/hasAnyPermission.md +41 -0
  203. package/docs/api/functions/isDebugMode.md +15 -0
  204. package/docs/api/functions/isDevelopmentMode.md +15 -0
  205. package/docs/api/functions/isErr.md +29 -0
  206. package/docs/api/functions/isOk.md +29 -0
  207. package/docs/api/functions/isPerformanceMonitoringEnabled.md +17 -0
  208. package/docs/api/functions/isPermitted.md +58 -0
  209. package/docs/api/functions/isPermittedCached.md +36 -0
  210. package/docs/api/functions/isRBACInitialized.md +19 -0
  211. package/docs/api/functions/isSecureClient.md +38 -0
  212. package/docs/api/functions/isValidPermission.md +27 -0
  213. package/docs/api/functions/listFiles.md +29 -0
  214. package/docs/api/functions/max.md +63 -0
  215. package/docs/api/functions/min.md +63 -0
  216. package/docs/api/functions/ok.md +29 -0
  217. package/docs/api/functions/parseAndNormalizeEventColours.md +105 -0
  218. package/docs/api/functions/recordAuditEvent.md +23 -0
  219. package/docs/api/functions/recordPermissionCheck.md +31 -0
  220. package/docs/api/functions/resetPerformanceMetrics.md +17 -0
  221. package/docs/api/functions/resolveAppContext.md +27 -0
  222. package/docs/api/functions/roundToNearestMinutes.md +41 -0
  223. package/docs/api/functions/sanitizeFormData.md +49 -0
  224. package/docs/api/functions/sanitizeHtml.md +39 -0
  225. package/docs/api/functions/sanitizeUserInput.md +27 -0
  226. package/docs/api/functions/setAppConfig.md +23 -0
  227. package/docs/api/functions/setGlobalAuditManager.md +25 -0
  228. package/docs/api/functions/setupRBAC.md +31 -0
  229. package/docs/api/functions/sum.md +63 -0
  230. package/docs/api/functions/toZonedTime.md +41 -0
  231. package/docs/api/functions/uploadFile.md +32 -0
  232. package/docs/api/functions/useAccessLevel.md +71 -0
  233. package/docs/api/functions/useAccessibleApps.md +55 -0
  234. package/docs/api/functions/useAppConfig.md +20 -0
  235. package/docs/api/functions/useAuthService.md +15 -0
  236. package/docs/api/functions/useCan.md +99 -0
  237. package/docs/api/functions/useEventService.md +15 -0
  238. package/docs/api/functions/useEventTheme.md +26 -0
  239. package/docs/api/functions/useEvents.md +45 -0
  240. package/docs/api/functions/useFileReference.md +264 -0
  241. package/docs/api/functions/useFileReferenceById.md +63 -0
  242. package/docs/api/functions/useFileReferenceForRecord.md +129 -0
  243. package/docs/api/functions/useFilesByCategory.md +80 -0
  244. package/docs/api/functions/useFormDialog.md +62 -0
  245. package/docs/api/functions/useInactivityService.md +15 -0
  246. package/docs/api/functions/useInactivityTracker.md +21 -0
  247. package/docs/api/functions/useIsPublicPage.md +19 -0
  248. package/docs/api/functions/useMultiplePermissions.md +88 -0
  249. package/docs/api/functions/useOptionalEvents.md +31 -0
  250. package/docs/api/functions/useOrganisationPermissions.md +27 -0
  251. package/docs/api/functions/useOrganisationSecurity.md +15 -0
  252. package/docs/api/functions/useOrganisationService.md +15 -0
  253. package/docs/api/functions/useOrganisations.md +48 -0
  254. package/docs/api/functions/usePermissions.md +130 -0
  255. package/docs/api/functions/usePublicEvent.md +36 -0
  256. package/docs/api/functions/usePublicEventCode.md +32 -0
  257. package/docs/api/functions/usePublicEventLogo.md +48 -0
  258. package/docs/api/functions/usePublicFileDisplay.md +54 -0
  259. package/docs/api/functions/usePublicPageContext.md +19 -0
  260. package/docs/api/functions/usePublicRouteParams.md +31 -0
  261. package/docs/api/functions/useRBAC.md +21 -0
  262. package/docs/api/functions/useResolvedScope.md +46 -0
  263. package/docs/api/functions/useResourcePermissions.md +25 -0
  264. package/docs/api/functions/useRoleManagement.md +121 -0
  265. package/docs/api/functions/useSecureSupabase.md +51 -0
  266. package/docs/api/functions/useSessionRestoration.md +15 -0
  267. package/docs/api/functions/useSessionTracking.md +62 -0
  268. package/docs/api/functions/useToast.md +83 -0
  269. package/docs/api/functions/useUnifiedAuth.md +24 -0
  270. package/docs/api/functions/useZodForm.md +27 -0
  271. package/docs/api/functions/validateFileSize.md +31 -0
  272. package/docs/api/functions/warnIfInsecureClient.md +40 -0
  273. package/docs/api/functions/withAccessLevelGuard.md +67 -0
  274. package/docs/api/functions/withPermissionGuard.md +73 -0
  275. package/docs/api/functions/withRoleGuard.md +86 -0
  276. package/docs/api/globals.md +502 -0
  277. package/docs/api/interfaces/AccessDeniedProps.md +87 -0
  278. package/docs/api/interfaces/AccessibleApp.md +41 -0
  279. package/docs/api/interfaces/AddressFieldProps.md +195 -0
  280. package/docs/api/interfaces/AddressFieldRef.md +67 -0
  281. package/docs/api/interfaces/AggregateConfig.md +35 -0
  282. package/docs/api/interfaces/AppSwitcherProps.md +51 -0
  283. package/docs/api/interfaces/AuthSessionData.md +27 -0
  284. package/docs/api/interfaces/AutocompleteOptions.md +61 -0
  285. package/docs/api/interfaces/AvatarProps.md +97 -0
  286. package/docs/api/interfaces/BadgeProps.md +30 -0
  287. package/docs/api/interfaces/BuildAppUrlOptions.md +41 -0
  288. package/docs/api/interfaces/ButtonProps.md +46 -0
  289. package/docs/api/interfaces/CalendarProps.md +60 -0
  290. package/docs/api/interfaces/CardProps.md +56 -0
  291. package/docs/api/interfaces/ColorPalette.md +13 -0
  292. package/docs/api/interfaces/ColorShade.md +58 -0
  293. package/docs/api/interfaces/ContextSelectorProps.md +131 -0
  294. package/docs/api/interfaces/DataRecord.md +16 -0
  295. package/docs/api/interfaces/DataTableAction.md +198 -0
  296. package/docs/api/interfaces/DataTableColumn.md +422 -0
  297. package/docs/api/interfaces/DataTableProps.md +511 -0
  298. package/docs/api/interfaces/DataTableToolbarButton.md +75 -0
  299. package/docs/api/interfaces/DatePickerWithTimezoneProps.md +75 -0
  300. package/docs/api/interfaces/DialogBodyProps.md +55 -0
  301. package/docs/api/interfaces/DialogCloseProps.md +25 -0
  302. package/docs/api/interfaces/DialogContentProps.md +160 -0
  303. package/docs/api/interfaces/DialogFooterProps.md +25 -0
  304. package/docs/api/interfaces/DialogHeaderProps.md +25 -0
  305. package/docs/api/interfaces/DialogPortalProps.md +19 -0
  306. package/docs/api/interfaces/DialogProps.md +53 -0
  307. package/docs/api/interfaces/DialogTriggerProps.md +53 -0
  308. package/docs/api/interfaces/EmptyStateConfig.md +55 -0
  309. package/docs/api/interfaces/ErrorBoundaryProps.md +131 -0
  310. package/docs/api/interfaces/ErrorBoundaryProviderProps.md +31 -0
  311. package/docs/api/interfaces/ErrorBoundaryState.md +61 -0
  312. package/docs/api/interfaces/EventAppRoleData.md +54 -0
  313. package/docs/api/interfaces/ExportColumn.md +69 -0
  314. package/docs/api/interfaces/ExportOptions.md +109 -0
  315. package/docs/api/interfaces/FileDisplayProps.md +192 -0
  316. package/docs/api/interfaces/FileMetadata.md +97 -0
  317. package/docs/api/interfaces/FileReference.md +89 -0
  318. package/docs/api/interfaces/FileSizeLimits.md +13 -0
  319. package/docs/api/interfaces/FileUploadOptions.md +107 -0
  320. package/docs/api/interfaces/FooterProps.md +37 -0
  321. package/docs/api/interfaces/FormFieldProps.md +171 -0
  322. package/docs/api/interfaces/FormProps.md +93 -0
  323. package/docs/api/interfaces/GrantEventAppRoleParams.md +97 -0
  324. package/docs/api/interfaces/ImportSummary.md +49 -0
  325. package/docs/api/interfaces/InactivityWarningModalProps.md +87 -0
  326. package/docs/api/interfaces/InputProps.md +46 -0
  327. package/docs/api/interfaces/InvalidScopeError.md +37 -0
  328. package/docs/api/interfaces/LabelProps.md +85 -0
  329. package/docs/api/interfaces/LoggerConfig.md +51 -0
  330. package/docs/api/interfaces/LoginFormProps.md +146 -0
  331. package/docs/api/interfaces/MissingUserContextError.md +37 -0
  332. package/docs/api/interfaces/NavigationGuardProps.md +109 -0
  333. package/docs/api/interfaces/NavigationItem.md +91 -0
  334. package/docs/api/interfaces/NavigationMenuProps.md +169 -0
  335. package/docs/api/interfaces/Organisation.md +105 -0
  336. package/docs/api/interfaces/OrganisationContextRequiredError.md +37 -0
  337. package/docs/api/interfaces/OrganisationMembership.md +105 -0
  338. package/docs/api/interfaces/OrganisationSecurityError.md +49 -0
  339. package/docs/api/interfaces/PaceAppLayoutPermissionConfig.md +127 -0
  340. package/docs/api/interfaces/PaceAppLayoutRouteConfigItem.md +91 -0
  341. package/docs/api/interfaces/PaceAppLayoutRoutingConfig.md +79 -0
  342. package/docs/api/interfaces/PaceLoginPageProps.md +41 -0
  343. package/docs/api/interfaces/PagePermissionGuardProps.md +143 -0
  344. package/docs/api/interfaces/PaletteData.md +33 -0
  345. package/docs/api/interfaces/ParsedAddress.md +91 -0
  346. package/docs/api/interfaces/PermissionDeniedError.md +37 -0
  347. package/docs/api/interfaces/ProgressProps.md +35 -0
  348. package/docs/api/interfaces/ProtectedRouteProps.md +67 -0
  349. package/docs/api/interfaces/PublicPageFooterProps.md +97 -0
  350. package/docs/api/interfaces/PublicPageHeaderProps.md +99 -0
  351. package/docs/api/interfaces/PublicPageLayoutProps.md +153 -0
  352. package/docs/api/interfaces/RBACAccessValidateParams.md +41 -0
  353. package/docs/api/interfaces/RBACAccessValidateResult.md +33 -0
  354. package/docs/api/interfaces/RBACAuditLogParams.md +65 -0
  355. package/docs/api/interfaces/RBACAuditLogResult.md +41 -0
  356. package/docs/api/interfaces/RBACContext.md +41 -0
  357. package/docs/api/interfaces/RBACError.md +37 -0
  358. package/docs/api/interfaces/RBACLogger.md +97 -0
  359. package/docs/api/interfaces/RBACNotInitializedError.md +37 -0
  360. package/docs/api/interfaces/RBACPageAccessCheckParams.md +57 -0
  361. package/docs/api/interfaces/RBACPerformanceMetrics.md +109 -0
  362. package/docs/api/interfaces/RBACPermissionCheckParams.md +57 -0
  363. package/docs/api/interfaces/RBACPermissionCheckResult.md +41 -0
  364. package/docs/api/interfaces/RBACPermissionsGetParams.md +49 -0
  365. package/docs/api/interfaces/RBACPermissionsGetResult.md +49 -0
  366. package/docs/api/interfaces/RBACResult.md +47 -0
  367. package/docs/api/interfaces/RBACRoleGrantParams.md +49 -0
  368. package/docs/api/interfaces/RBACRoleGrantResult.md +41 -0
  369. package/docs/api/interfaces/RBACRoleRevokeParams.md +49 -0
  370. package/docs/api/interfaces/RBACRoleRevokeResult.md +41 -0
  371. package/docs/api/interfaces/RBACRoleValidateParams.md +41 -0
  372. package/docs/api/interfaces/RBACRoleValidateResult.md +49 -0
  373. package/docs/api/interfaces/RBACRolesListParams.md +41 -0
  374. package/docs/api/interfaces/RBACRolesListResult.md +57 -0
  375. package/docs/api/interfaces/RBACSessionTrackParams.md +57 -0
  376. package/docs/api/interfaces/RBACSessionTrackResult.md +41 -0
  377. package/docs/api/interfaces/ResourcePermissions.md +119 -0
  378. package/docs/api/interfaces/RevokeEventAppRoleParams.md +81 -0
  379. package/docs/api/interfaces/RoleManagementResult.md +41 -0
  380. package/docs/api/interfaces/SessionRestorationLoaderProps.md +29 -0
  381. package/docs/api/interfaces/StorageConfig.md +33 -0
  382. package/docs/api/interfaces/StorageFileInfo.md +57 -0
  383. package/docs/api/interfaces/StorageFileMetadata.md +113 -0
  384. package/docs/api/interfaces/StorageListOptions.md +79 -0
  385. package/docs/api/interfaces/StorageListResult.md +33 -0
  386. package/docs/api/interfaces/StorageUploadOptions.md +81 -0
  387. package/docs/api/interfaces/StorageUploadResult.md +49 -0
  388. package/docs/api/interfaces/StorageUploadSuccess.md +35 -0
  389. package/docs/api/interfaces/StorageUrlOptions.md +49 -0
  390. package/docs/api/interfaces/StyleImport.md +17 -0
  391. package/docs/api/interfaces/SwitchProps.md +30 -0
  392. package/docs/api/interfaces/TabsContentProps.md +13 -0
  393. package/docs/api/interfaces/TabsListProps.md +13 -0
  394. package/docs/api/interfaces/TabsProps.md +13 -0
  395. package/docs/api/interfaces/TabsTriggerProps.md +41 -0
  396. package/docs/api/interfaces/TextareaProps.md +43 -0
  397. package/docs/api/interfaces/ToastActionElement.md +16 -0
  398. package/docs/api/interfaces/ToastProps.md +13 -0
  399. package/docs/api/interfaces/UnifiedAuthProviderProps.md +129 -0
  400. package/docs/api/interfaces/UseAccessibleAppsReturn.md +55 -0
  401. package/docs/api/interfaces/UseFormDialogOptions.md +49 -0
  402. package/docs/api/interfaces/UseFormDialogReturn.md +95 -0
  403. package/docs/api/interfaces/UseInactivityTrackerOptions.md +103 -0
  404. package/docs/api/interfaces/UseInactivityTrackerReturn.md +91 -0
  405. package/docs/api/interfaces/UsePublicEventLogoOptions.md +69 -0
  406. package/docs/api/interfaces/UsePublicEventLogoReturn.md +66 -0
  407. package/docs/api/interfaces/UsePublicEventOptions.md +29 -0
  408. package/docs/api/interfaces/UsePublicEventReturn.md +56 -0
  409. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +39 -0
  410. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +96 -0
  411. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +76 -0
  412. package/docs/api/interfaces/UseResolvedScopeOptions.md +49 -0
  413. package/docs/api/interfaces/UseResolvedScopeReturn.md +39 -0
  414. package/docs/api/interfaces/UseResourcePermissionsOptions.md +29 -0
  415. package/docs/api/interfaces/UserEventAccess.md +92 -0
  416. package/docs/api/interfaces/UserMenuProps.md +69 -0
  417. package/docs/api/interfaces/UserProfile.md +49 -0
  418. package/docs/api/type-aliases/AccessLevel.md +11 -0
  419. package/docs/api/type-aliases/AccessLevelContext.md +14 -0
  420. package/docs/api/type-aliases/AllPermissions.md +11 -0
  421. package/docs/api/type-aliases/ApiError.md +37 -0
  422. package/docs/api/type-aliases/ApiResult.md +19 -0
  423. package/docs/api/type-aliases/AuditEventType.md +11 -0
  424. package/docs/api/type-aliases/BadgeVariant.md +18 -0
  425. package/docs/api/type-aliases/DataTableFeatureConfig.md +14 -0
  426. package/docs/api/type-aliases/DialogSize.md +13 -0
  427. package/docs/api/type-aliases/EventAppRole.md +11 -0
  428. package/docs/api/type-aliases/FileUploadProps.md +15 -0
  429. package/docs/api/type-aliases/GetRowId.md +33 -0
  430. package/docs/api/type-aliases/GlobalErrorHandler.md +35 -0
  431. package/docs/api/type-aliases/GlobalRole.md +11 -0
  432. package/docs/api/type-aliases/ImportHandlerResult.md +13 -0
  433. package/docs/api/type-aliases/NavigationMode.md +13 -0
  434. package/docs/api/type-aliases/Operation.md +11 -0
  435. package/docs/api/type-aliases/OrganisationContextType.md +13 -0
  436. package/docs/api/type-aliases/OrganisationRole.md +11 -0
  437. package/docs/api/type-aliases/PaceAppLayoutProps.md +14 -0
  438. package/docs/api/type-aliases/Permission.md +11 -0
  439. package/docs/api/type-aliases/PermissionCheck.md +46 -0
  440. package/docs/api/type-aliases/PermissionMap.md +11 -0
  441. package/docs/api/type-aliases/PermissionSource.md +13 -0
  442. package/docs/api/type-aliases/RBACConfig.md +13 -0
  443. package/docs/api/type-aliases/RBACFunctionResponse.md +57 -0
  444. package/docs/api/type-aliases/Scope.md +41 -0
  445. package/docs/api/type-aliases/SessionType.md +11 -0
  446. package/docs/api/type-aliases/UUID.md +11 -0
  447. package/docs/api/type-aliases/UnifiedAuthContextType.md +13 -0
  448. package/docs/api/type-aliases/UseFileReferenceForRecordReturn.md +161 -0
  449. package/docs/api/type-aliases/UseFileReferenceOptions.md +35 -0
  450. package/docs/api/type-aliases/UseFileReferenceReturn.md +13 -0
  451. package/docs/api/variables/ALL_PERMISSIONS.md +281 -0
  452. package/docs/api/variables/APP_PATH_MAPPING.md +14 -0
  453. package/docs/api/variables/AddressField.md +41 -0
  454. package/docs/api/variables/Alert.md +11 -0
  455. package/docs/api/variables/AlertDescription.md +11 -0
  456. package/docs/api/variables/AlertTitle.md +11 -0
  457. package/docs/api/variables/Avatar.md +13 -0
  458. package/docs/api/variables/Button.md +31 -0
  459. package/docs/api/variables/CACHE_PATTERNS.md +89 -0
  460. package/docs/api/variables/Calendar.md +74 -0
  461. package/docs/api/variables/Card.md +11 -0
  462. package/docs/api/variables/CardActions.md +11 -0
  463. package/docs/api/variables/CardContent.md +11 -0
  464. package/docs/api/variables/CardDescription.md +11 -0
  465. package/docs/api/variables/CardFooter.md +11 -0
  466. package/docs/api/variables/CardHeader.md +11 -0
  467. package/docs/api/variables/CardTitle.md +11 -0
  468. package/docs/api/variables/Checkbox.md +11 -0
  469. package/docs/api/variables/DEFAULT_APP_PORT_MAP.md +14 -0
  470. package/docs/api/variables/DEFAULT_FILE_SIZE_LIMIT.md +13 -0
  471. package/docs/api/variables/Dialog.md +14 -0
  472. package/docs/api/variables/DialogClose.md +14 -0
  473. package/docs/api/variables/DialogContent.md +28 -0
  474. package/docs/api/variables/DialogDescription.md +14 -0
  475. package/docs/api/variables/DialogPortal.md +14 -0
  476. package/docs/api/variables/DialogTitle.md +14 -0
  477. package/docs/api/variables/DialogTrigger.md +14 -0
  478. package/docs/api/variables/EVENT_APP_PERMISSIONS.md +109 -0
  479. package/docs/api/variables/ErrorBoundary.md +15 -0
  480. package/docs/api/variables/FILE_SIZE_LIMITS.md +13 -0
  481. package/docs/api/variables/Footer.md +11 -0
  482. package/docs/api/variables/GLOBAL_PERMISSIONS.md +29 -0
  483. package/docs/api/variables/Label.md +34 -0
  484. package/docs/api/variables/LoadingSpinner.md +28 -0
  485. package/docs/api/variables/LoginForm.md +34 -0
  486. package/docs/api/variables/NavigationMenu.md +203 -0
  487. package/docs/api/variables/ORGANISATION_PERMISSIONS.md +89 -0
  488. package/docs/api/variables/PAGE_PERMISSIONS.md +93 -0
  489. package/docs/api/variables/PaceLoginPage.md +40 -0
  490. package/docs/api/variables/PagePermissionGuard.md +11 -0
  491. package/docs/api/variables/Progress.md +32 -0
  492. package/docs/api/variables/SECURE_CLIENT_SYMBOL.md +14 -0
  493. package/docs/api/variables/STORAGE_CONFIG.md +13 -0
  494. package/docs/api/variables/Select.md +26 -0
  495. package/docs/api/variables/SelectContent.md +26 -0
  496. package/docs/api/variables/SelectGroup.md +26 -0
  497. package/docs/api/variables/SelectItem.md +26 -0
  498. package/docs/api/variables/SelectLabel.md +26 -0
  499. package/docs/api/variables/SelectSeparator.md +26 -0
  500. package/docs/api/variables/SelectTrigger.md +26 -0
  501. package/docs/api/variables/SelectValue.md +26 -0
  502. package/docs/api/variables/SessionRestorationLoader.md +11 -0
  503. package/docs/api/variables/Switch.md +23 -0
  504. package/docs/api/variables/Table.md +35 -0
  505. package/docs/api/variables/TableBody.md +11 -0
  506. package/docs/api/variables/TableCaption.md +11 -0
  507. package/docs/api/variables/TableCell.md +11 -0
  508. package/docs/api/variables/TableFooter.md +11 -0
  509. package/docs/api/variables/TableHead.md +11 -0
  510. package/docs/api/variables/TableHeader.md +11 -0
  511. package/docs/api/variables/TableRow.md +11 -0
  512. package/docs/api/variables/Tabs.md +25 -0
  513. package/docs/api/variables/TabsContent.md +24 -0
  514. package/docs/api/variables/TabsList.md +25 -0
  515. package/docs/api/variables/TabsTrigger.md +34 -0
  516. package/docs/api/variables/Toast.md +36 -0
  517. package/docs/api/variables/ToastAction.md +32 -0
  518. package/docs/api/variables/ToastClose.md +32 -0
  519. package/docs/api/variables/ToastDescription.md +32 -0
  520. package/docs/api/variables/ToastProvider.md +11 -0
  521. package/docs/api/variables/ToastTitle.md +32 -0
  522. package/docs/api/variables/ToastViewport.md +26 -0
  523. package/docs/api/variables/Tooltip.md +34 -0
  524. package/docs/api/variables/TooltipContent.md +34 -0
  525. package/docs/api/variables/TooltipProvider.md +11 -0
  526. package/docs/api/variables/TooltipRoot.md +11 -0
  527. package/docs/api/variables/TooltipTrigger.md +11 -0
  528. package/docs/api/variables/UserMenu.md +11 -0
  529. package/docs/api/variables/emailSchema.md +13 -0
  530. package/docs/api/variables/logger.md +203 -0
  531. package/docs/api/variables/nameSchema.md +13 -0
  532. package/docs/api/variables/passwordSchema.md +13 -0
  533. package/docs/api/variables/phoneSchema.md +13 -0
  534. package/docs/api/variables/rbacCache.md +16 -0
  535. package/docs/api/variables/styleConfig.md +25 -0
  536. package/docs/api/variables/urlSchema.md +13 -0
  537. package/docs/api-reference/hooks.md +2 -0
  538. package/docs/api-reference/rpc-functions.md +12 -3
  539. package/docs/core-concepts/rbac-system.md +8 -0
  540. package/docs/getting-started/cursor-rules.md +17 -20
  541. package/docs/getting-started/dependencies.md +1 -1
  542. package/docs/getting-started/setup.md +235 -0
  543. package/docs/implementation-guides/authentication.md +27 -0
  544. package/docs/implementation-guides/data-tables.md +184 -3
  545. package/docs/migration/ApiResult-migration.md +25 -0
  546. package/docs/rbac/api-reference.md +33 -31
  547. package/docs/rbac/getting-started.md +7 -0
  548. package/docs/rbac/troubleshooting.md +5 -1
  549. package/docs/standards/0-standards-overview.md +50 -15
  550. package/docs/standards/1-pace-core-compliance-standards.md +62 -57
  551. package/docs/standards/2-project-structure-standards.md +33 -16
  552. package/docs/standards/3-architecture-standards.md +41 -1
  553. package/docs/standards/4-code-quality-standards.md +26 -6
  554. package/docs/standards/5-styling-standards.md +35 -1
  555. package/docs/standards/6-security-rbac-standards.md +66 -0
  556. package/docs/standards/7-api-tech-stack-standards.md +25 -14
  557. package/docs/standards/8-testing-documentation-standards.md +31 -0
  558. package/docs/standards/9-operations-standards.md +19 -0
  559. package/docs/standards/README.md +20 -201
  560. package/docs/testing/test-setup-for-consumers.md +2 -0
  561. package/docs/troubleshooting/common-issues.md +17 -1
  562. package/docs/troubleshooting/organisation-context-setup.md +8 -0
  563. package/docs/troubleshooting/print-event-name-css-variable-analysis.md +217 -0
  564. package/eslint-config-pace-core.cjs +20 -0
  565. package/package.json +16 -22
  566. package/scripts/build-docs.js +180 -0
  567. package/scripts/setup.cjs +536 -0
  568. package/scripts/validate.cjs +480 -0
  569. package/src/__tests__/helpers/component-test-utils.test.tsx +260 -0
  570. package/src/__tests__/helpers/optimized-test-setup.test.ts +224 -0
  571. package/src/__tests__/helpers/supabaseMock.test.ts +273 -0
  572. package/src/__tests__/helpers/test-providers.test.tsx +99 -0
  573. package/src/__tests__/helpers/test-providers.tsx +37 -39
  574. package/src/__tests__/helpers/test-utils.test.tsx +447 -0
  575. package/src/__tests__/helpers/timer-utils.test.ts +371 -0
  576. package/src/assets/app-icons/index.test.ts +304 -0
  577. package/src/components/AddressField/AddressField.test.tsx +1 -1
  578. package/src/components/AddressField/AddressField.tsx +238 -212
  579. package/src/components/Button/Button.tsx +1 -1
  580. package/src/components/Card/Card.test.tsx +172 -17
  581. package/src/components/Card/Card.tsx +19 -10
  582. package/src/components/ContextSelector/ContextSelector.internals.tsx +204 -0
  583. package/src/components/ContextSelector/ContextSelector.test.tsx +360 -0
  584. package/src/components/ContextSelector/ContextSelector.tsx +66 -280
  585. package/src/components/ContextSelector/ContextSelector.types.ts +35 -0
  586. package/src/components/ContextSelector/useContextSelectorState.tsx +195 -0
  587. package/src/components/DataTable/AUDIT_REPORT.md +59 -44
  588. package/src/components/DataTable/DataTable.comprehensive.test.tsx +759 -0
  589. package/src/components/DataTable/DataTable.default-state.test.tsx +524 -0
  590. package/src/components/DataTable/DataTable.export.test.tsx +705 -0
  591. package/src/components/DataTable/DataTable.grouping-aggregation.test.tsx +658 -0
  592. package/src/components/DataTable/DataTable.hooks.test.tsx +192 -0
  593. package/src/components/DataTable/DataTable.select-label-display.test.tsx +485 -0
  594. package/src/components/DataTable/DataTable.test.tsx +787 -416
  595. package/src/components/DataTable/DataTable.tsx +12 -12
  596. package/src/components/DataTable/DataTableCore.integration.test.tsx +458 -0
  597. package/src/components/DataTable/DataTableCore.test-setup.ts +221 -0
  598. package/src/components/DataTable/DataTableCore.test.tsx +970 -0
  599. package/src/components/DataTable/README.md +155 -0
  600. package/src/components/DataTable/TESTING.md +101 -0
  601. package/src/components/DataTable/a11y.basic.test.tsx +788 -0
  602. package/src/components/DataTable/components/DataTableCore.tsx +104 -864
  603. package/src/components/DataTable/components/GroupingDropdown.test.tsx +621 -0
  604. package/src/components/DataTable/components/GroupingDropdown.tsx +2 -2
  605. package/src/components/DataTable/components/ImportModal.tsx +61 -559
  606. package/src/components/DataTable/components/ImportModalFileSection.tsx +148 -0
  607. package/src/components/DataTable/context/DataTableContext.test.tsx +328 -0
  608. package/src/components/DataTable/context/DataTableContext.tsx +7 -6
  609. package/src/components/DataTable/core/ColumnFactory.test.ts +403 -0
  610. package/src/components/DataTable/hooks/useColumnOrderPersistence.test.ts +516 -0
  611. package/src/components/DataTable/hooks/useColumnVisibilityPersistence.test.ts +256 -0
  612. package/src/components/DataTable/hooks/useDataTableConfiguration.test.ts +297 -0
  613. package/src/components/DataTable/hooks/useDataTableConfiguration.ts +14 -2
  614. package/src/components/DataTable/hooks/useDataTableDataPipeline.test.ts +270 -0
  615. package/src/components/DataTable/hooks/useDataTableDeletionBatching.test.ts +127 -0
  616. package/src/components/DataTable/hooks/useDataTableDeletionBatching.ts +106 -0
  617. package/src/components/DataTable/hooks/useDataTableEffectiveActions.test.ts +461 -0
  618. package/src/components/DataTable/hooks/useDataTableEffectiveActions.ts +248 -0
  619. package/src/components/DataTable/hooks/useDataTableLayoutHandlers.test.ts +296 -0
  620. package/src/components/DataTable/hooks/useDataTableLayoutHandlers.ts +175 -0
  621. package/src/components/DataTable/hooks/useDataTablePaginationSync.test.ts +203 -0
  622. package/src/components/DataTable/hooks/useDataTablePaginationSync.ts +109 -0
  623. package/src/components/DataTable/hooks/useDataTablePermissions.test.ts +280 -0
  624. package/src/components/DataTable/hooks/useDataTablePermissions.ts +79 -247
  625. package/src/components/DataTable/hooks/useDataTablePipeline.test.tsx +219 -0
  626. package/src/components/DataTable/hooks/useDataTablePipeline.tsx +239 -0
  627. package/src/components/DataTable/hooks/useDataTableRenderGuard.test.tsx +316 -0
  628. package/src/components/DataTable/hooks/useDataTableRenderGuard.tsx +195 -0
  629. package/src/components/DataTable/hooks/useDataTableScope.test.ts +102 -0
  630. package/src/components/DataTable/hooks/useDataTableScope.ts +125 -0
  631. package/src/components/DataTable/hooks/useDataTableState.test.ts +733 -0
  632. package/src/components/DataTable/hooks/useDataTableState.ts +145 -94
  633. package/src/components/DataTable/hooks/useDataTableStateAndPersistence.test.ts +277 -0
  634. package/src/components/DataTable/hooks/useDataTableStateAndPersistence.ts +222 -0
  635. package/src/components/DataTable/hooks/useDataTableSuperAdmin.test.ts +93 -0
  636. package/src/components/DataTable/hooks/useDataTableSuperAdmin.ts +86 -0
  637. package/src/components/DataTable/hooks/useDataTableTableInstance.test.ts +185 -0
  638. package/src/components/DataTable/hooks/useDataTableTableInstance.ts +178 -0
  639. package/src/components/DataTable/hooks/useEffectiveColumnOrder.test.ts +183 -0
  640. package/src/components/DataTable/hooks/useHierarchicalState.test.ts +294 -0
  641. package/src/components/DataTable/hooks/useImportModalFocus.test.ts +184 -0
  642. package/src/components/DataTable/hooks/useImportModalFocus.ts +53 -0
  643. package/src/components/DataTable/hooks/useImportModalState.test.ts +390 -0
  644. package/src/components/DataTable/hooks/useImportModalState.ts +345 -0
  645. package/src/components/DataTable/hooks/useKeyboardNavigation.test.ts +787 -0
  646. package/src/components/DataTable/hooks/useKeyboardNavigation.ts +309 -269
  647. package/src/components/DataTable/hooks/usePermissionTracking.test.ts +381 -0
  648. package/src/components/DataTable/hooks/usePermissionTracking.ts +122 -0
  649. package/src/components/DataTable/hooks/useServerSideDataEffect.test.ts +258 -0
  650. package/src/components/DataTable/hooks/useServerSideDataEffect.ts +14 -3
  651. package/src/components/DataTable/hooks/useTableColumns.test.ts +499 -0
  652. package/src/components/DataTable/hooks/useTableHandlers.test.ts +461 -0
  653. package/src/components/DataTable/hooks/useTableHandlers.ts +5 -2
  654. package/src/components/DataTable/index.ts +18 -17
  655. package/src/components/DataTable/keyboard.test.tsx +734 -0
  656. package/src/components/DataTable/mocks/MockRBACProvider.tsx +66 -0
  657. package/src/components/DataTable/pagination.modes.test.tsx +728 -0
  658. package/src/components/DataTable/ssr.strict-mode.test.tsx +319 -0
  659. package/src/components/DataTable/styles.test.ts +379 -0
  660. package/src/components/DataTable/styles.ts +0 -1
  661. package/src/components/DataTable/test-utils/MockDataTableComponents.tsx +55 -0
  662. package/src/components/DataTable/test-utils/dataFactories.ts +103 -0
  663. package/src/components/DataTable/test-utils/featureConfig.ts +10 -0
  664. package/src/components/DataTable/test-utils/sharedTestUtils.ts +419 -0
  665. package/src/components/DataTable/test-utils.ts +94 -0
  666. package/src/components/DataTable/types/actions.ts +71 -0
  667. package/src/components/DataTable/types/base.ts +39 -0
  668. package/src/components/DataTable/types/columns.ts +125 -0
  669. package/src/components/DataTable/types/export.ts +32 -0
  670. package/src/components/DataTable/types/features.ts +81 -0
  671. package/src/components/DataTable/types/hierarchical.ts +44 -0
  672. package/src/components/DataTable/types/index.ts +43 -0
  673. package/src/components/DataTable/types/pagination.ts +85 -0
  674. package/src/components/DataTable/types/performance.ts +47 -0
  675. package/src/components/DataTable/types/props.ts +62 -0
  676. package/src/components/DataTable/types/rbac.ts +45 -0
  677. package/src/components/DataTable/ui/layout/DataTableCore.test.tsx +1194 -0
  678. package/src/components/DataTable/ui/layout/DataTableCore.tsx +345 -0
  679. package/src/components/DataTable/ui/layout/DataTableErrorBoundary.test.tsx +438 -0
  680. package/src/components/DataTable/ui/layout/DataTableErrorBoundary.tsx +225 -0
  681. package/src/components/DataTable/ui/layout/DataTableLayout.test.tsx +1352 -0
  682. package/src/components/DataTable/ui/layout/DataTableLayout.tsx +661 -0
  683. package/src/components/DataTable/ui/modals/BulkDeleteConfirmDialog.test.tsx +91 -0
  684. package/src/components/DataTable/ui/modals/BulkDeleteConfirmDialog.tsx +43 -0
  685. package/src/components/DataTable/ui/modals/DataTableModals.test.tsx +749 -0
  686. package/src/components/DataTable/ui/modals/DataTableModals.tsx +341 -0
  687. package/src/components/DataTable/ui/modals/ImportModal.test.tsx +1834 -0
  688. package/src/components/DataTable/ui/modals/ImportModal.tsx +197 -0
  689. package/src/components/DataTable/ui/modals/ImportModalFailedRowsSection.tsx +60 -0
  690. package/src/components/DataTable/ui/modals/ImportModalFileSection.tsx +148 -0
  691. package/src/components/DataTable/ui/modals/ImportModalPreviewSection.tsx +60 -0
  692. package/src/components/DataTable/ui/modals/ImportModalSummarySection.tsx +59 -0
  693. package/src/components/DataTable/ui/modals/importModalPersistence.ts +73 -0
  694. package/src/components/DataTable/ui/shared/AccessDeniedPage.test.tsx +245 -0
  695. package/src/components/DataTable/ui/shared/AccessDeniedPage.tsx +159 -0
  696. package/src/components/DataTable/ui/shared/ActionButtons.test.tsx +921 -0
  697. package/src/components/DataTable/ui/shared/ActionButtons.tsx +195 -0
  698. package/src/components/DataTable/ui/shared/ColumnFilter.test.tsx +497 -0
  699. package/src/components/DataTable/ui/shared/ColumnFilter.tsx +113 -0
  700. package/src/components/DataTable/ui/shared/PaginationControls.test.tsx +451 -0
  701. package/src/components/DataTable/ui/shared/PaginationControls.tsx +291 -0
  702. package/src/components/DataTable/ui/shared/SortIndicator.test.tsx +135 -0
  703. package/src/components/DataTable/ui/shared/SortIndicator.tsx +50 -0
  704. package/src/components/DataTable/ui/table/EditFields.test.tsx +526 -0
  705. package/src/components/DataTable/ui/table/EditFields.tsx +355 -0
  706. package/src/components/DataTable/ui/table/EditableRow.test.tsx +1003 -0
  707. package/src/components/DataTable/ui/table/EditableRow.tsx +444 -0
  708. package/src/components/DataTable/ui/table/EmptyState.test.tsx +360 -0
  709. package/src/components/DataTable/ui/table/EmptyState.tsx +74 -0
  710. package/src/components/DataTable/ui/table/FilterRow.test.tsx +416 -0
  711. package/src/components/DataTable/ui/table/FilterRow.tsx +148 -0
  712. package/src/components/DataTable/ui/table/LoadingState.test.tsx +77 -0
  713. package/src/components/DataTable/ui/table/LoadingState.tsx +17 -0
  714. package/src/components/DataTable/ui/table/RowComponent.test.tsx +1024 -0
  715. package/src/components/DataTable/ui/table/RowComponent.tsx +429 -0
  716. package/src/components/DataTable/ui/table/UnifiedTableBody.test.tsx +1273 -0
  717. package/src/components/DataTable/ui/table/UnifiedTableBody.tsx +440 -0
  718. package/src/components/DataTable/ui/table/cellValueUtils.test.ts +453 -0
  719. package/src/components/DataTable/ui/table/cellValueUtils.ts +40 -0
  720. package/src/components/DataTable/ui/toolbar/BulkOperationsDropdown.test.tsx +551 -0
  721. package/src/components/DataTable/ui/toolbar/BulkOperationsDropdown.tsx +160 -0
  722. package/src/components/DataTable/ui/toolbar/ColumnVisibilityDropdown.test.tsx +751 -0
  723. package/src/components/DataTable/ui/toolbar/ColumnVisibilityDropdown.tsx +114 -0
  724. package/src/components/DataTable/ui/toolbar/DataTableToolbar.test.tsx +629 -0
  725. package/src/components/DataTable/ui/toolbar/DataTableToolbar.tsx +271 -0
  726. package/src/components/DataTable/ui/toolbar/GroupingDropdown.test.tsx +621 -0
  727. package/src/components/DataTable/ui/toolbar/GroupingDropdown.tsx +107 -0
  728. package/src/components/DataTable/utils/a11yUtils.test.ts +548 -0
  729. package/src/components/DataTable/utils/aggregationUtils.test.ts +288 -0
  730. package/src/components/DataTable/utils/columnUtils.test.ts +94 -0
  731. package/src/components/DataTable/utils/csvParse.test.ts +74 -0
  732. package/src/components/DataTable/utils/csvParse.ts +65 -0
  733. package/src/components/DataTable/utils/errorHandling.test.ts +209 -0
  734. package/src/components/DataTable/utils/exportUtils.test.ts +954 -0
  735. package/src/components/DataTable/utils/flexibleImport.test.ts +573 -0
  736. package/src/components/DataTable/utils/flexibleImport.ts +3 -186
  737. package/src/components/DataTable/utils/hierarchicalSorting.test.ts +235 -0
  738. package/src/components/DataTable/utils/hierarchicalUtils.test.ts +586 -0
  739. package/src/components/DataTable/utils/importDateParser.test.ts +162 -0
  740. package/src/components/DataTable/utils/importDateParser.ts +114 -0
  741. package/src/components/DataTable/utils/importValueParser.test.ts +138 -0
  742. package/src/components/DataTable/utils/importValueParser.ts +91 -0
  743. package/src/components/DataTable/utils/paginationUtils.test.ts +593 -0
  744. package/src/components/DataTable/utils/paginationUtils.ts +6 -3
  745. package/src/components/DataTable/utils/performanceUtils.test.ts +470 -0
  746. package/src/components/DataTable/utils/rowUtils.test.ts +235 -0
  747. package/src/components/DataTable/utils/selectFieldUtils.test.ts +271 -0
  748. package/src/components/DataTable/utils/selectFieldUtils.ts +97 -60
  749. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +1 -1
  750. package/src/components/DateTimeField/DateTimeField.test.tsx +1 -1
  751. package/src/components/Dialog/Dialog.test-utils.ts +49 -0
  752. package/src/components/Dialog/Dialog.test.tsx +896 -89
  753. package/src/components/Dialog/Dialog.tsx +174 -882
  754. package/src/components/Dialog/dialogLock.test.ts +238 -0
  755. package/src/components/Dialog/dialogLock.ts +98 -0
  756. package/src/components/Dialog/index.ts +2 -0
  757. package/src/components/Dialog/useDialogDimensions.test.ts +163 -0
  758. package/src/components/Dialog/useDialogDimensions.ts +140 -0
  759. package/src/components/Dialog/useDialogLifecycle.test.ts +361 -0
  760. package/src/components/Dialog/useDialogLifecycle.ts +135 -0
  761. package/src/components/Dialog/useDialogPersistence.test.ts +381 -0
  762. package/src/components/Dialog/useDialogPersistence.ts +357 -0
  763. package/src/components/FileDisplay/FileDisplay.test.tsx +40 -40
  764. package/src/components/FileDisplay/FileDisplay.tsx +24 -656
  765. package/src/components/FileDisplay/FileDisplayContent.test.tsx +395 -0
  766. package/src/components/FileDisplay/FileDisplayContent.tsx +242 -0
  767. package/src/components/FileDisplay/FileDisplayDeleteConfirmDialog.test.tsx +74 -0
  768. package/src/components/FileDisplay/FileDisplayDeleteConfirmDialog.tsx +38 -0
  769. package/src/components/FileDisplay/FileDisplayEmptyView.test.tsx +33 -0
  770. package/src/components/FileDisplay/FileDisplayEmptyView.tsx +33 -0
  771. package/src/components/FileDisplay/FileDisplayErrorView.test.tsx +71 -0
  772. package/src/components/FileDisplay/FileDisplayErrorView.tsx +50 -0
  773. package/src/components/FileDisplay/FileDisplayLoadingFallbackView.test.tsx +22 -0
  774. package/src/components/FileDisplay/FileDisplayLoadingFallbackView.tsx +22 -0
  775. package/src/components/FileDisplay/FileDisplayLoadingView.test.tsx +21 -0
  776. package/src/components/FileDisplay/FileDisplayLoadingView.tsx +23 -0
  777. package/src/components/FileDisplay/FileDisplayMultipleFilesView.test.tsx +101 -0
  778. package/src/components/FileDisplay/FileDisplayMultipleFilesView.tsx +109 -0
  779. package/src/components/FileDisplay/FileDisplaySingleDocumentLinkView.test.tsx +58 -0
  780. package/src/components/FileDisplay/FileDisplaySingleDocumentLinkView.tsx +48 -0
  781. package/src/components/FileDisplay/FileDisplaySingleFileWithActionsView.test.tsx +111 -0
  782. package/src/components/FileDisplay/FileDisplaySingleFileWithActionsView.tsx +270 -0
  783. package/src/components/FileDisplay/FileDisplaySingleImageView.test.tsx +78 -0
  784. package/src/components/FileDisplay/FileDisplaySingleImageView.tsx +67 -0
  785. package/src/components/FileDisplay/fallbackUtils.test.ts +50 -0
  786. package/src/components/FileDisplay/fallbackUtils.ts +44 -0
  787. package/src/components/FileDisplay/fetchFileDisplayData.ts +24 -0
  788. package/src/components/FileDisplay/fetchFileDisplayData.unit.test.ts +183 -0
  789. package/src/components/FileDisplay/fileDisplayUtils.test.ts +58 -0
  790. package/src/components/FileDisplay/fileDisplayUtils.ts +24 -0
  791. package/src/components/FileDisplay/useFileDisplay.test.ts +538 -0
  792. package/src/components/FileDisplay/useFileDisplay.ts +515 -0
  793. package/src/components/FileDisplay/useFileDisplay.unit.test.ts +1442 -0
  794. package/src/components/FileDisplay/useFileDisplayData.ts +126 -0
  795. package/src/components/FileDisplay/usePublicFileDisplay.test.ts +729 -0
  796. package/src/components/FileDisplay/usePublicFileDisplay.ts +579 -0
  797. package/src/components/FileUpload/FileUpload.test.tsx +16 -10
  798. package/src/components/FileUpload/FileUpload.tsx +107 -525
  799. package/src/components/FileUpload/FileUploadDropZone.tsx +112 -0
  800. package/src/components/FileUpload/FileUploadProgressItem.tsx +86 -0
  801. package/src/components/FileUpload/FileUploadProgressList.tsx +40 -0
  802. package/src/components/FileUpload/useFileUploadManager.test.ts +308 -0
  803. package/src/components/FileUpload/useFileUploadManager.ts +454 -0
  804. package/src/components/FileUpload/useResolvedAppId.test.ts +102 -0
  805. package/src/components/FileUpload/useResolvedAppId.ts +77 -0
  806. package/src/components/Footer/Footer.test.tsx +6 -292
  807. package/src/components/Footer/Footer.tsx +8 -125
  808. package/src/components/Form/Form.test.tsx +44 -27
  809. package/src/components/Form/Form.tsx +64 -287
  810. package/src/components/Form/useFormPersistence.ts +257 -0
  811. package/src/components/Header/Header.test.tsx +17 -18
  812. package/src/components/Header/Header.tsx +10 -1
  813. package/src/components/Input/Input.tsx +1 -1
  814. package/src/components/Label/Label.test.tsx +1 -1
  815. package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +1 -1
  816. package/src/components/NavigationMenu/HierarchicalNavItem.tsx +104 -0
  817. package/src/components/NavigationMenu/NavigationMenu.test.tsx +1029 -26
  818. package/src/components/NavigationMenu/NavigationMenu.tsx +61 -361
  819. package/src/components/NavigationMenu/index.ts +6 -1
  820. package/src/components/NavigationMenu/navigationPermissionHelper.ts +188 -0
  821. package/src/components/NavigationMenu/useNavigationFiltering.test.ts +1949 -0
  822. package/src/components/NavigationMenu/useNavigationFiltering.ts +197 -296
  823. package/src/components/NavigationMenu/useNavigationScope.ts +125 -0
  824. package/src/components/PaceAppLayout/PaceAppLayout.edge-cases.test.tsx +109 -70
  825. package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +3 -3
  826. package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +16 -19
  827. package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +529 -5
  828. package/src/components/PaceAppLayout/PaceAppLayout.tsx +280 -756
  829. package/src/components/PaceAppLayout/useFilteredNavItems.ts +319 -0
  830. package/src/components/PaceAppLayout/usePaceAppLayoutConfig.ts +163 -0
  831. package/src/components/PaceAppLayout/usePaceAppLayoutGate.tsx +150 -0
  832. package/src/components/PaceAppLayout/usePaceAppLayoutPermissions.ts +162 -0
  833. package/src/components/PaceAppLayout/usePaceAppLayoutScope.ts +81 -0
  834. package/src/components/PaceAppLayout/useRoleBasedRouteAccess.ts +157 -0
  835. package/src/components/PaceAppLayout/useSuperAdminFallback.ts +58 -0
  836. package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +31 -25
  837. package/src/components/PaceLoginPage/PaceLoginPage.tsx +31 -122
  838. package/src/components/PaceLoginPage/useLoginAppAccess.ts +153 -0
  839. package/src/components/Progress/Progress.tsx +1 -2
  840. package/src/components/ProtectedRoute/ProtectedRoute.tsx +29 -235
  841. package/src/components/ProtectedRoute/useProtectedRouteState.ts +128 -0
  842. package/src/components/ProtectedRoute/useVisibilityRedirectGrace.ts +89 -0
  843. package/src/components/PublicLayout/PublicLayout.test.tsx +217 -36
  844. package/src/components/PublicLayout/PublicPageLayout.tsx +132 -73
  845. package/src/components/PublicLayout/PublicPageProvider.tsx +5 -1
  846. package/src/components/Select/Select.test.tsx +1 -1
  847. package/src/components/Select/Select.tsx +28 -18
  848. package/src/components/Select/context.test.tsx +56 -0
  849. package/src/components/Select/text.test.tsx +104 -0
  850. package/src/components/Select/text.ts +26 -0
  851. package/src/components/Select/useSelectEvents.test.ts +279 -0
  852. package/src/components/Select/useSelectEvents.ts +87 -0
  853. package/src/components/Select/useSelectSearch.test.tsx +295 -0
  854. package/src/components/Select/useSelectSearch.ts +91 -0
  855. package/src/components/Select/useSelectState.test.ts +268 -0
  856. package/src/components/Select/useSelectState.ts +104 -0
  857. package/src/components/Table/Table.test.tsx +348 -0
  858. package/src/components/Tabs/Tabs.test.tsx +270 -0
  859. package/src/components/Tabs/Tabs.tsx +1 -1
  860. package/src/components/Toast/Toast.test.tsx +420 -0
  861. package/src/components/index.test.ts +346 -0
  862. package/src/constants/performance.test.ts +91 -0
  863. package/src/hooks/ServiceHooks.test.tsx +725 -0
  864. package/src/hooks/hooks.integration.test.tsx +608 -0
  865. package/src/hooks/index.ts +7 -4
  866. package/src/hooks/index.unit.test.ts +220 -0
  867. package/src/hooks/public/usePublicEvent.test.ts +1 -1
  868. package/src/hooks/public/usePublicEventLogo.test.ts +1 -1
  869. package/src/hooks/public/usePublicRouteParams.test.ts +1 -1
  870. package/src/hooks/services/useAuth.ts +9 -7
  871. package/src/hooks/useAddressAutocomplete.test.ts +22 -22
  872. package/src/hooks/useAddressAutocomplete.ts +90 -75
  873. package/src/hooks/useAppConfig.unit.test.ts +720 -0
  874. package/src/hooks/useComponentPerformance.unit.test.tsx +316 -0
  875. package/src/hooks/useDataTablePerformance.ts +100 -120
  876. package/src/hooks/useDataTablePerformance.unit.test.ts +720 -0
  877. package/src/hooks/useDataTableState.test.ts +170 -0
  878. package/src/hooks/useDebounce.unit.test.ts +157 -0
  879. package/src/hooks/useEventTheme.test.ts +4 -1
  880. package/src/hooks/useEventTheme.ts +49 -21
  881. package/src/hooks/useEvents.ts +41 -1
  882. package/src/hooks/useEvents.unit.test.ts +227 -0
  883. package/src/hooks/useFileReference.test.ts +44 -41
  884. package/src/hooks/useFileReference.ts +182 -173
  885. package/src/hooks/useFileUrl.ts +1 -1
  886. package/src/hooks/useFileUrl.unit.test.ts +684 -0
  887. package/src/hooks/useFileUrlCache.test.ts +319 -0
  888. package/src/hooks/useFileUrlCache.ts +1 -1
  889. package/src/hooks/useFocusManagement.unit.test.ts +604 -0
  890. package/src/hooks/useFocusTrap.unit.test.tsx +613 -0
  891. package/src/hooks/useFormDialog.test.ts +307 -0
  892. package/src/hooks/useInactivityTracker.ts +138 -131
  893. package/src/hooks/useInactivityTracker.unit.test.ts +450 -0
  894. package/src/hooks/useIsMobile.unit.test.ts +317 -0
  895. package/src/hooks/useIsPrint.ts +62 -0
  896. package/src/hooks/useIsPrint.unit.test.ts +545 -0
  897. package/src/hooks/useKeyboardShortcuts.unit.test.ts +907 -0
  898. package/src/hooks/useOrganisationPermissions.unit.test.tsx +293 -0
  899. package/src/hooks/useOrganisationSecurity.test.ts +3 -3
  900. package/src/hooks/useOrganisationSecurity.ts +190 -201
  901. package/src/hooks/useOrganisationSecurity.unit.test.tsx +959 -0
  902. package/src/hooks/useOrganisations.unit.test.ts +369 -0
  903. package/src/hooks/usePerformanceMonitor.unit.test.ts +683 -0
  904. package/src/hooks/usePermissionCache.test.ts +505 -0
  905. package/src/hooks/usePermissionCache.ts +276 -271
  906. package/src/hooks/usePreventTabReload.test.ts +307 -0
  907. package/src/hooks/usePublicEvent.simple.test.ts +779 -0
  908. package/src/hooks/usePublicEvent.test.ts +664 -0
  909. package/src/hooks/usePublicEvent.unit.test.ts +638 -0
  910. package/src/hooks/usePublicFileDisplay.test.ts +948 -0
  911. package/src/hooks/usePublicRouteParams.unit.test.ts +442 -0
  912. package/src/hooks/useQueryCache.test.ts +391 -0
  913. package/src/hooks/useQueryCache.ts +0 -2
  914. package/src/hooks/useRBAC.unit.test.ts +253 -0
  915. package/src/hooks/useSessionDraft.test.ts +556 -0
  916. package/src/hooks/useSessionRestoration.unit.test.tsx +381 -0
  917. package/src/hooks/useStorage.ts +21 -16
  918. package/src/hooks/useStorage.unit.test.ts +684 -0
  919. package/src/hooks/useToast.test.ts +413 -0
  920. package/src/hooks/useToast.unit.test.tsx +481 -0
  921. package/src/hooks/useZodForm.unit.test.tsx +191 -0
  922. package/src/icons/index.test.ts +133 -0
  923. package/src/icons/index.ts +2 -0
  924. package/src/index.test.ts +528 -0
  925. package/src/index.ts +15 -7
  926. package/src/providers/AuthProvider.test.tsx +218 -0
  927. package/src/providers/EventProvider.test.tsx +487 -0
  928. package/src/providers/InactivityProvider.test-helper.tsx +40 -0
  929. package/src/providers/InactivityProvider.test.tsx +421 -0
  930. package/src/providers/ProviderLifecycle.test.tsx +308 -0
  931. package/src/providers/UnifiedAuthProvider.test.tsx +503 -0
  932. package/src/providers/index.test.ts +138 -0
  933. package/src/providers/services/AuthServiceProvider.integration.test.tsx +229 -0
  934. package/src/providers/services/AuthServiceProvider.test.tsx +643 -0
  935. package/src/providers/services/EventServiceProvider.test.tsx +844 -0
  936. package/src/providers/services/InactivityServiceProvider.test.tsx +667 -0
  937. package/src/providers/services/OrganisationServiceProvider.test.tsx +445 -0
  938. package/src/providers/services/UnifiedAuthContext.ts +30 -27
  939. package/src/providers/services/UnifiedAuthProvider.advanced.test.tsx +434 -0
  940. package/src/providers/services/UnifiedAuthProvider.appId.test.tsx +408 -0
  941. package/src/providers/services/UnifiedAuthProvider.integration.test.tsx +304 -0
  942. package/src/providers/services/UnifiedAuthProvider.tsx +115 -360
  943. package/src/providers/services/contexts.test.tsx +281 -0
  944. package/src/providers/services/useUnifiedAuth.test.tsx +251 -0
  945. package/src/providers/services/useUnifiedAuthContextValue.ts +279 -0
  946. package/src/providers/useInactivity.test-helper.ts +27 -0
  947. package/src/rbac/README.md +7 -5
  948. package/src/rbac/adapters.comprehensive.test.tsx +429 -0
  949. package/src/rbac/adapters.test.tsx +22 -22
  950. package/src/rbac/adapters.tsx +29 -29
  951. package/src/rbac/api.test.ts +1075 -87
  952. package/src/rbac/api.ts +300 -255
  953. package/src/rbac/audit-batched.test.ts +550 -0
  954. package/src/rbac/audit.ts +4 -1
  955. package/src/rbac/auth-rbac-security.integration.test.tsx +300 -0
  956. package/src/rbac/auth-rbac.e2e.test.tsx +510 -0
  957. package/src/rbac/cache-invalidation.test.ts +715 -0
  958. package/src/rbac/components/AccessDenied.test.tsx +324 -0
  959. package/src/rbac/components/NavigationGuard.test.tsx +1148 -0
  960. package/src/rbac/components/NavigationGuard.tsx +2 -1
  961. package/src/rbac/components/PagePermissionGuard.guard.test.tsx +236 -0
  962. package/src/rbac/components/PagePermissionGuard.performance.test.tsx +252 -0
  963. package/src/rbac/components/PagePermissionGuard.race-condition.test.tsx +243 -0
  964. package/src/rbac/components/PagePermissionGuard.test.tsx +1443 -0
  965. package/src/rbac/components/PagePermissionGuard.tsx +177 -372
  966. package/src/rbac/components/PagePermissionGuard.verification.test.tsx +185 -0
  967. package/src/rbac/config.ts +58 -18
  968. package/src/rbac/engine.comprehensive.test.ts +808 -0
  969. package/src/rbac/engine.test.ts +494 -0
  970. package/src/rbac/engine.ts +23 -1
  971. package/src/rbac/errors.ts +89 -55
  972. package/src/rbac/hooks/permissions/runPermissionCheck.ts +91 -0
  973. package/src/rbac/hooks/permissions/useAccessLevel.test.ts +622 -0
  974. package/src/rbac/hooks/permissions/useAccessLevel.ts +16 -6
  975. package/src/rbac/hooks/permissions/useCan.test.ts +837 -0
  976. package/src/rbac/hooks/permissions/useCan.ts +177 -255
  977. package/src/rbac/hooks/permissions/useMultiplePermissions.test.ts +843 -0
  978. package/src/rbac/hooks/permissions/useMultiplePermissions.ts +24 -11
  979. package/src/rbac/hooks/permissions/usePermissions.test.ts +543 -0
  980. package/src/rbac/hooks/permissions/usePermissions.ts +36 -65
  981. package/src/rbac/hooks/useCan.test.ts +44 -45
  982. package/src/rbac/hooks/usePageAccessLogging.ts +160 -0
  983. package/src/rbac/hooks/usePageGuardScope.ts +119 -0
  984. package/src/rbac/hooks/usePagePermissionCheck.ts +67 -0
  985. package/src/rbac/hooks/usePermissions.integration.test.ts +427 -0
  986. package/src/rbac/hooks/usePermissions.stability.test.ts +268 -0
  987. package/src/rbac/hooks/usePermissions.test.ts +54 -54
  988. package/src/rbac/hooks/useRBAC.test.ts +313 -217
  989. package/src/rbac/hooks/useRBAC.ts +145 -81
  990. package/src/rbac/hooks/useResolvedScope.ts +16 -10
  991. package/src/rbac/hooks/useResourcePermissions.test.ts +73 -83
  992. package/src/rbac/hooks/useResourcePermissions.ts +77 -152
  993. package/src/rbac/hooks/useResourcePermissionsSuperAdmin.ts +67 -0
  994. package/src/rbac/hooks/useRoleManagement.test.ts +27 -112
  995. package/src/rbac/hooks/useRoleManagement.ts +153 -585
  996. package/src/rbac/hooks/useSecureSupabase.test.ts +1179 -0
  997. package/src/rbac/hooks/useSecureSupabase.ts +10 -2
  998. package/src/rbac/hooks/useSuperAdminCheck.ts +80 -0
  999. package/src/rbac/performance.test.ts +451 -0
  1000. package/src/rbac/rbac-core.test.tsx +276 -0
  1001. package/src/rbac/rbac-engine-core-logic.test.ts +387 -0
  1002. package/src/rbac/rbac-engine-simplified.test.ts +252 -0
  1003. package/src/rbac/rbac-functions.test.ts +703 -0
  1004. package/src/rbac/rbac-role-isolation.test.ts +456 -0
  1005. package/src/rbac/request-deduplication.test.ts +14 -9
  1006. package/src/rbac/request-deduplication.ts +5 -4
  1007. package/src/rbac/scenarios.user-role.test.tsx +271 -0
  1008. package/src/rbac/secureClient.test.ts +514 -83
  1009. package/src/rbac/secureClient.ts +8 -2
  1010. package/src/rbac/security.test.ts +323 -0
  1011. package/src/rbac/types/roleManagement.ts +66 -0
  1012. package/src/rbac/types.ts +3 -0
  1013. package/src/rbac/utils/clientSecurity.test.ts +192 -0
  1014. package/src/rbac/utils/contextValidator.test.ts +126 -0
  1015. package/src/rbac/utils/contextValidator.ts +5 -1
  1016. package/src/rbac/utils/deep-equal.test.ts +76 -0
  1017. package/src/rbac/utils/eventContext.test.ts +401 -0
  1018. package/src/rbac/utils/eventContext.ts +37 -33
  1019. package/src/rbac/utils/fetchPermissionMap.ts +13 -0
  1020. package/src/rbac/utils/permissionMapHelpers.ts +34 -0
  1021. package/src/rbac/utils/roleManagementRpc.ts +303 -0
  1022. package/src/services/AuthService.edge-cases.test.ts +746 -0
  1023. package/src/services/AuthService.restoreSession.test.ts +59 -0
  1024. package/src/services/AuthService.test.ts +1362 -0
  1025. package/src/services/AuthService.ts +184 -205
  1026. package/src/services/BaseService.edge-cases.test.ts +506 -0
  1027. package/src/services/BaseService.test.ts +363 -0
  1028. package/src/services/EventService.edge-cases.test.ts +636 -0
  1029. package/src/services/EventService.eventColours.test.ts +64 -0
  1030. package/src/services/EventService.test.ts +1250 -0
  1031. package/src/services/EventService.ts +251 -316
  1032. package/src/services/InactivityService.edge-cases.test.ts +492 -0
  1033. package/src/services/InactivityService.lifecycle.test.ts +406 -0
  1034. package/src/services/InactivityService.test.ts +829 -0
  1035. package/src/services/InactivityService.ts +172 -213
  1036. package/src/services/OrganisationService.edge-cases.test.ts +633 -0
  1037. package/src/services/OrganisationService.pagination.test.ts +409 -0
  1038. package/src/services/OrganisationService.test.ts +1579 -0
  1039. package/src/services/OrganisationService.ts +184 -238
  1040. package/src/services/base/BaseService.test.ts +1 -1
  1041. package/src/services/interfaces/IAuthService.test.ts +184 -0
  1042. package/src/services/interfaces/IAuthService.ts +10 -9
  1043. package/src/services/interfaces/IEventService.test.ts +176 -0
  1044. package/src/services/interfaces/IInactivityService.test.ts +183 -0
  1045. package/src/services/interfaces/IOrganisationService.test.ts +207 -0
  1046. package/src/styles/core.css +243 -12
  1047. package/src/theming/parseEventColours.test.ts +321 -0
  1048. package/src/theming/runtime.test.ts +495 -0
  1049. package/src/theming/runtime.ts +71 -2
  1050. package/src/types/api-result.ts +53 -0
  1051. package/src/types/core.test.ts +397 -0
  1052. package/src/types/database-generated.test.ts +78 -0
  1053. package/src/types/database.generated.ts +45 -10
  1054. package/src/types/event.ts +38 -18
  1055. package/src/types/file-reference.test.ts +351 -0
  1056. package/src/types/file-reference.ts +37 -12
  1057. package/src/types/guards.test.ts +246 -0
  1058. package/src/types/index.test.ts +265 -0
  1059. package/src/types/index.ts +3 -0
  1060. package/src/types/organisation.roles.test.ts +55 -0
  1061. package/src/types/organisation.test.ts +1105 -0
  1062. package/src/types/organisation.ts +15 -15
  1063. package/src/types/supabase.ts +13 -4
  1064. package/src/types/theme.test.ts +830 -0
  1065. package/src/types/type-validation.test.ts +526 -0
  1066. package/src/types/validation.test.ts +729 -0
  1067. package/src/utils/app/appIdResolver.test.ts +98 -71
  1068. package/src/utils/app/appIdResolver.ts +31 -20
  1069. package/src/utils/appConfig.unit.test.ts +55 -0
  1070. package/src/utils/audit.unit.test.ts +69 -0
  1071. package/src/utils/auth-utils.unit.test.ts +69 -0
  1072. package/src/utils/bundleAnalysis.unit.test.ts +326 -0
  1073. package/src/utils/cn.unit.test.ts +34 -0
  1074. package/src/utils/context/organisationContext.test.ts +105 -91
  1075. package/src/utils/context/organisationContext.ts +29 -40
  1076. package/src/utils/core/cn.test.ts +66 -0
  1077. package/src/utils/core/debugLogger.test.ts +113 -0
  1078. package/src/utils/core/logger.test.ts +217 -0
  1079. package/src/utils/core/mergeRefs.ts +24 -0
  1080. package/src/utils/debugLogger.test.ts +417 -0
  1081. package/src/utils/deviceFingerprint.unit.test.ts +818 -0
  1082. package/src/utils/dynamic/createLazyComponent.tsx +9 -1
  1083. package/src/utils/dynamic/dynamicUtils.test.ts +185 -0
  1084. package/src/utils/dynamic/lazyLoad.test.tsx +156 -0
  1085. package/src/utils/dynamicUtils.unit.test.ts +331 -0
  1086. package/src/utils/file-reference/file-reference.test.ts +1249 -0
  1087. package/src/utils/file-reference/index.ts +330 -347
  1088. package/src/utils/formatDate.unit.test.ts +109 -0
  1089. package/src/utils/formatting/formatDateTimeTimezone.test.ts +1 -1
  1090. package/src/utils/formatting/formatNumber.test.ts +1 -1
  1091. package/src/utils/formatting.unit.test.ts +99 -0
  1092. package/src/utils/google-places/googlePlacesUtils.test.ts +70 -48
  1093. package/src/utils/google-places/googlePlacesUtils.ts +67 -99
  1094. package/src/utils/google-places/loadGoogleMapsScript.test.ts +25 -22
  1095. package/src/utils/google-places/loadGoogleMapsScript.ts +138 -117
  1096. package/src/utils/index.unit.test.ts +251 -0
  1097. package/src/utils/lazyLoad.unit.test.tsx +319 -0
  1098. package/src/utils/location/location.test.ts +1 -1
  1099. package/src/utils/logger.unit.test.ts +398 -0
  1100. package/src/utils/organisationContext.unit.test.ts +180 -0
  1101. package/src/utils/performance/bundleAnalysis.test.ts +148 -0
  1102. package/src/utils/performance/performanceBenchmark.test.ts +251 -0
  1103. package/src/utils/performance/performanceBudgets.test.ts +241 -0
  1104. package/src/utils/performanceBenchmark.test.ts +174 -0
  1105. package/src/utils/performanceBudgets.unit.test.ts +288 -0
  1106. package/src/utils/permissionTypes.unit.test.ts +250 -0
  1107. package/src/utils/permissionUtils.unit.test.ts +362 -0
  1108. package/src/utils/permissions/permissionTypes.test.ts +149 -0
  1109. package/src/utils/persistence/keyDerivation.test.ts +306 -0
  1110. package/src/utils/persistence/sensitiveFieldDetection.test.ts +271 -0
  1111. package/src/utils/request-deduplication.test.ts +349 -0
  1112. package/src/utils/sanitization.unit.test.ts +346 -0
  1113. package/src/utils/schemaUtils.unit.test.ts +441 -0
  1114. package/src/utils/secureDataAccess.unit.test.ts +334 -0
  1115. package/src/utils/secureErrors.unit.test.ts +390 -0
  1116. package/src/utils/secureStorage.unit.test.ts +289 -0
  1117. package/src/utils/security/auth-utils.ts +34 -23
  1118. package/src/utils/security/secureDataAccess.ts +241 -281
  1119. package/src/utils/security/secureErrors.test.ts +1 -1
  1120. package/src/utils/security/secureStorage.test.ts +1 -1
  1121. package/src/utils/security/security.test.ts +25 -17
  1122. package/src/utils/security/security.ts +15 -18
  1123. package/src/utils/security/securityMonitor.test.ts +1 -1
  1124. package/src/utils/security.unit.test.ts +155 -0
  1125. package/src/utils/securityMonitor.unit.test.ts +276 -0
  1126. package/src/utils/sessionTracking.unit.test.ts +218 -0
  1127. package/src/utils/storage/config.unit.test.ts +239 -0
  1128. package/src/utils/storage/helpers.test.ts +88 -102
  1129. package/src/utils/storage/helpers.ts +173 -251
  1130. package/src/utils/storage/index.unit.test.ts +68 -0
  1131. package/src/utils/storage/types.ts +7 -0
  1132. package/src/utils/supabase/createBaseClient.test.ts +31 -14
  1133. package/src/utils/timezone/timezone.test.ts +1 -1
  1134. package/src/utils/timezone.test.ts +345 -0
  1135. package/src/utils/validation/common.test.ts +115 -0
  1136. package/src/utils/validation/csrf.test.ts +198 -0
  1137. package/src/utils/validation/csrf.ts +42 -41
  1138. package/src/utils/validation/htmlSanitization.unit.test.ts +618 -0
  1139. package/src/utils/validation/passwordSchema.test.ts +164 -0
  1140. package/src/utils/validation/schema.test.ts +127 -0
  1141. package/src/utils/validation/sqlInjectionProtection.test.ts +165 -0
  1142. package/src/utils/validation/user.test.ts +173 -0
  1143. package/src/utils/validation/validation.test.ts +197 -0
  1144. package/src/utils/validation/validationUtils.test.ts +294 -0
  1145. package/src/utils/validation.unit.test.ts +307 -0
  1146. package/src/utils/validationUtils.unit.test.ts +558 -0
  1147. package/dist/DataTable-SAXFG4XI.js +0 -13
  1148. package/dist/InactivityServiceProvider-DHryoh6K.d.ts +0 -299
  1149. package/dist/UnifiedAuthProvider-BBD2PS3Q.js +0 -7
  1150. package/dist/UnifiedAuthProvider-CiBAl9-s.d.ts +0 -151
  1151. package/dist/api-F47QJ7FX.js +0 -4
  1152. package/dist/audit-Z6ZZBWLU.js +0 -3
  1153. package/dist/auth-BZOJqrdd.d.ts +0 -49
  1154. package/dist/chunk-3GWSPISD.js +0 -61
  1155. package/dist/chunk-66R6RLUZ.js +0 -529
  1156. package/dist/chunk-7YDC7LMU.js +0 -487
  1157. package/dist/chunk-BCTXBU6U.js +0 -704
  1158. package/dist/chunk-FBZ7U3ID.js +0 -2209
  1159. package/dist/chunk-FN52B75D.js +0 -246
  1160. package/dist/chunk-JJEYZ3DX.js +0 -165
  1161. package/dist/chunk-KPYQWGFQ.js +0 -183
  1162. package/dist/chunk-KSNLMI7N.js +0 -481
  1163. package/dist/chunk-KYURMOQM.js +0 -977
  1164. package/dist/chunk-LNHFAF4X.js +0 -2279
  1165. package/dist/chunk-MPY44PWB.js +0 -8510
  1166. package/dist/chunk-NIU6DPQV.js +0 -427
  1167. package/dist/chunk-TFIPNIPE.js +0 -5379
  1168. package/dist/chunk-UZNAFKGW.js +0 -125
  1169. package/dist/chunk-W46INAVW.js +0 -1216
  1170. package/dist/chunk-X5EAU5G7.js +0 -793
  1171. package/dist/chunk-Y4PF6HIM.js +0 -2862
  1172. package/dist/database.generated-DT8JTZiP.d.ts +0 -9406
  1173. package/dist/event-WTAQuGcq.d.ts +0 -239
  1174. package/dist/file-reference-BavO2eQj.d.ts +0 -148
  1175. package/dist/functions-DH45k8ec.d.ts +0 -208
  1176. package/dist/timezone-K-ptz3HO.d.ts +0 -696
  1177. package/dist/types-BE2sEHKd.d.ts +0 -55
  1178. package/dist/types-CvOPXWWZ.d.ts +0 -111
  1179. package/dist/types-D05dCGma.d.ts +0 -521
  1180. package/dist/usePublicPageContext-vxBlEHO9.d.ts +0 -4290
  1181. package/dist/usePublicRouteParams-G3Ks53mk.d.ts +0 -877
  1182. package/docs/api/modules.md +0 -9889
  1183. package/scripts/build-docs-incremental.js +0 -179
  1184. package/scripts/eslint-audit.cjs +0 -222
  1185. package/scripts/generate-docs.js +0 -157
  1186. package/scripts/install-cursor-rules.cjs +0 -255
  1187. package/scripts/install-eslint-config.cjs +0 -349
  1188. package/scripts/setup-build-cache.js +0 -73
  1189. package/scripts/validate-pre-publish.js +0 -145
  1190. package/src/__tests__/helpers/__tests__/component-test-utils.test.tsx +0 -260
  1191. package/src/__tests__/helpers/__tests__/optimized-test-setup.test.ts +0 -224
  1192. package/src/__tests__/helpers/__tests__/supabaseMock.test.ts +0 -273
  1193. package/src/__tests__/helpers/__tests__/test-providers.test.tsx +0 -99
  1194. package/src/__tests__/helpers/__tests__/test-utils.test.tsx +0 -446
  1195. package/src/__tests__/helpers/__tests__/timer-utils.test.ts +0 -371
  1196. package/src/__tests__/hooks/usePermissions.test.ts +0 -268
  1197. package/src/__tests__/index.test.ts +0 -532
  1198. package/src/__tests__/integration/UserProfile.test.tsx +0 -124
  1199. package/src/__tests__/public-recipe-view.test.ts +0 -228
  1200. package/src/__tests__/rbac/PagePermissionGuard.test.tsx +0 -222
  1201. package/src/__tests__/rls-policies.test.ts +0 -472
  1202. package/src/components/ContextSelector/__tests__/ContextSelector.test.tsx +0 -360
  1203. package/src/components/DataTable/__tests__/DataTable.comprehensive.test.tsx +0 -759
  1204. package/src/components/DataTable/__tests__/DataTable.default-state.test.tsx +0 -524
  1205. package/src/components/DataTable/__tests__/DataTable.export.test.tsx +0 -705
  1206. package/src/components/DataTable/__tests__/DataTable.grouping-aggregation.test.tsx +0 -658
  1207. package/src/components/DataTable/__tests__/DataTable.hooks.test.tsx +0 -192
  1208. package/src/components/DataTable/__tests__/DataTable.select-label-display.test.tsx +0 -485
  1209. package/src/components/DataTable/__tests__/DataTable.test.tsx +0 -876
  1210. package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +0 -220
  1211. package/src/components/DataTable/__tests__/DataTableCore.test.tsx +0 -970
  1212. package/src/components/DataTable/__tests__/README.md +0 -145
  1213. package/src/components/DataTable/__tests__/a11y.basic.test.tsx +0 -788
  1214. package/src/components/DataTable/__tests__/keyboard.test.tsx +0 -756
  1215. package/src/components/DataTable/__tests__/mocks/MockRBACProvider.tsx +0 -66
  1216. package/src/components/DataTable/__tests__/pagination.modes.test.tsx +0 -728
  1217. package/src/components/DataTable/__tests__/ssr.strict-mode.test.tsx +0 -319
  1218. package/src/components/DataTable/__tests__/styles.test.ts +0 -382
  1219. package/src/components/DataTable/__tests__/test-utils/dataFactories.ts +0 -103
  1220. package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +0 -388
  1221. package/src/components/DataTable/__tests__/test-utils.ts +0 -94
  1222. package/src/components/DataTable/components/AccessDeniedPage.tsx +0 -159
  1223. package/src/components/DataTable/components/ActionButtons.tsx +0 -195
  1224. package/src/components/DataTable/components/BulkOperationsDropdown.tsx +0 -160
  1225. package/src/components/DataTable/components/ColumnFilter.tsx +0 -113
  1226. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +0 -114
  1227. package/src/components/DataTable/components/DataTableErrorBoundary.tsx +0 -225
  1228. package/src/components/DataTable/components/DataTableLayout.tsx +0 -584
  1229. package/src/components/DataTable/components/DataTableModals.tsx +0 -333
  1230. package/src/components/DataTable/components/DataTableToolbar.tsx +0 -271
  1231. package/src/components/DataTable/components/EditFields.tsx +0 -286
  1232. package/src/components/DataTable/components/EditableRow.tsx +0 -462
  1233. package/src/components/DataTable/components/EmptyState.tsx +0 -82
  1234. package/src/components/DataTable/components/FilterRow.tsx +0 -148
  1235. package/src/components/DataTable/components/LoadingState.tsx +0 -17
  1236. package/src/components/DataTable/components/PaginationControls.tsx +0 -285
  1237. package/src/components/DataTable/components/RowComponent.tsx +0 -423
  1238. package/src/components/DataTable/components/SortIndicator.tsx +0 -50
  1239. package/src/components/DataTable/components/UnifiedTableBody.tsx +0 -395
  1240. package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +0 -245
  1241. package/src/components/DataTable/components/__tests__/ActionButtons.test.tsx +0 -919
  1242. package/src/components/DataTable/components/__tests__/BulkOperationsDropdown.test.tsx +0 -544
  1243. package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +0 -484
  1244. package/src/components/DataTable/components/__tests__/ColumnVisibilityDropdown.test.tsx +0 -748
  1245. package/src/components/DataTable/components/__tests__/DataTableCore.test.tsx +0 -792
  1246. package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.test.tsx +0 -438
  1247. package/src/components/DataTable/components/__tests__/DataTableLayout.test.tsx +0 -467
  1248. package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +0 -358
  1249. package/src/components/DataTable/components/__tests__/DataTableToolbar.test.tsx +0 -629
  1250. package/src/components/DataTable/components/__tests__/EditFields.test.tsx +0 -526
  1251. package/src/components/DataTable/components/__tests__/EditableRow.test.tsx +0 -994
  1252. package/src/components/DataTable/components/__tests__/EmptyState.test.tsx +0 -420
  1253. package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +0 -415
  1254. package/src/components/DataTable/components/__tests__/GroupingDropdown.test.tsx +0 -612
  1255. package/src/components/DataTable/components/__tests__/ImportModal.test.tsx +0 -957
  1256. package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +0 -81
  1257. package/src/components/DataTable/components/__tests__/PaginationControls.test.tsx +0 -429
  1258. package/src/components/DataTable/components/__tests__/RowComponent.test.tsx +0 -629
  1259. package/src/components/DataTable/components/__tests__/SortIndicator.test.tsx +0 -135
  1260. package/src/components/DataTable/components/__tests__/UnifiedTableBody.test.tsx +0 -864
  1261. package/src/components/DataTable/components/__tests__/cellValueUtils.test.ts +0 -453
  1262. package/src/components/DataTable/components/cellValueUtils.ts +0 -40
  1263. package/src/components/DataTable/components/hooks/useImportModalFocus.test.ts +0 -184
  1264. package/src/components/DataTable/components/hooks/useImportModalFocus.ts +0 -53
  1265. package/src/components/DataTable/components/hooks/usePermissionTracking.test.ts +0 -381
  1266. package/src/components/DataTable/components/hooks/usePermissionTracking.ts +0 -122
  1267. package/src/components/DataTable/context/__tests__/DataTableContext.test.tsx +0 -328
  1268. package/src/components/DataTable/core/ActionManager.ts +0 -235
  1269. package/src/components/DataTable/core/ColumnManager.ts +0 -204
  1270. package/src/components/DataTable/core/DataManager.ts +0 -190
  1271. package/src/components/DataTable/core/LocalDataAdapter.ts +0 -274
  1272. package/src/components/DataTable/core/PluginRegistry.ts +0 -229
  1273. package/src/components/DataTable/core/StateManager.ts +0 -312
  1274. package/src/components/DataTable/core/__tests__/ActionManager.test.ts +0 -235
  1275. package/src/components/DataTable/core/__tests__/ColumnFactory.test.ts +0 -403
  1276. package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +0 -141
  1277. package/src/components/DataTable/core/__tests__/DataManager.test.ts +0 -178
  1278. package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +0 -133
  1279. package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +0 -142
  1280. package/src/components/DataTable/core/__tests__/StateManager.test.ts +0 -158
  1281. package/src/components/DataTable/core/interfaces.ts +0 -338
  1282. package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.test.ts +0 -516
  1283. package/src/components/DataTable/hooks/__tests__/useColumnVisibilityPersistence.test.ts +0 -256
  1284. package/src/components/DataTable/hooks/__tests__/useDataTableConfiguration.test.ts +0 -297
  1285. package/src/components/DataTable/hooks/__tests__/useDataTableDataPipeline.test.ts +0 -270
  1286. package/src/components/DataTable/hooks/__tests__/useDataTablePermissions.test.ts +0 -280
  1287. package/src/components/DataTable/hooks/__tests__/useDataTableState.test.ts +0 -691
  1288. package/src/components/DataTable/hooks/__tests__/useEffectiveColumnOrder.test.ts +0 -183
  1289. package/src/components/DataTable/hooks/__tests__/useHierarchicalState.test.ts +0 -294
  1290. package/src/components/DataTable/hooks/__tests__/useKeyboardNavigation.test.ts +0 -787
  1291. package/src/components/DataTable/hooks/__tests__/useServerSideDataEffect.test.ts +0 -258
  1292. package/src/components/DataTable/hooks/__tests__/useTableColumns.test.ts +0 -499
  1293. package/src/components/DataTable/hooks/__tests__/useTableHandlers.test.ts +0 -440
  1294. package/src/components/DataTable/types.ts +0 -764
  1295. package/src/components/DataTable/utils/__tests__/a11yUtils.test.ts +0 -548
  1296. package/src/components/DataTable/utils/__tests__/aggregationUtils.test.ts +0 -288
  1297. package/src/components/DataTable/utils/__tests__/columnUtils.test.ts +0 -94
  1298. package/src/components/DataTable/utils/__tests__/errorHandling.test.ts +0 -209
  1299. package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +0 -954
  1300. package/src/components/DataTable/utils/__tests__/flexibleImport.test.ts +0 -573
  1301. package/src/components/DataTable/utils/__tests__/hierarchicalSorting.test.ts +0 -235
  1302. package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +0 -586
  1303. package/src/components/DataTable/utils/__tests__/paginationUtils.test.ts +0 -593
  1304. package/src/components/DataTable/utils/__tests__/performanceUtils.test.ts +0 -470
  1305. package/src/components/DataTable/utils/__tests__/rowUtils.test.ts +0 -235
  1306. package/src/components/DataTable/utils/__tests__/selectFieldUtils.test.ts +0 -208
  1307. package/src/components/NavigationMenu/__tests__/useNavigationFiltering.test.ts +0 -1934
  1308. package/src/components/Select/__tests__/context.test.tsx +0 -56
  1309. package/src/components/Select/hooks/__tests__/useSelectEvents.test.ts +0 -279
  1310. package/src/components/Select/hooks/__tests__/useSelectSearch.test.tsx +0 -295
  1311. package/src/components/Select/hooks/__tests__/useSelectState.test.ts +0 -254
  1312. package/src/components/Select/hooks/useSelectEvents.ts +0 -87
  1313. package/src/components/Select/hooks/useSelectSearch.ts +0 -91
  1314. package/src/components/Select/hooks/useSelectState.ts +0 -104
  1315. package/src/components/Select/utils/__tests__/text.test.tsx +0 -104
  1316. package/src/components/Select/utils/text.ts +0 -26
  1317. package/src/components/__tests__/index.test.ts +0 -346
  1318. package/src/constants/__tests__/performance.test.ts +0 -91
  1319. package/src/hooks/__tests__/ServiceHooks.test.tsx +0 -725
  1320. package/src/hooks/__tests__/hooks.integration.test.tsx +0 -608
  1321. package/src/hooks/__tests__/index.unit.test.ts +0 -220
  1322. package/src/hooks/__tests__/useAppConfig.unit.test.ts +0 -406
  1323. package/src/hooks/__tests__/useComponentPerformance.unit.test.tsx +0 -328
  1324. package/src/hooks/__tests__/useDataTablePerformance.unit.test.ts +0 -720
  1325. package/src/hooks/__tests__/useDataTableState.test.ts +0 -170
  1326. package/src/hooks/__tests__/useDebounce.unit.test.ts +0 -157
  1327. package/src/hooks/__tests__/useEvents.unit.test.ts +0 -227
  1328. package/src/hooks/__tests__/useFileDisplay.test.ts +0 -540
  1329. package/src/hooks/__tests__/useFileDisplay.unit.test.ts +0 -1109
  1330. package/src/hooks/__tests__/useFileUrl.unit.test.ts +0 -696
  1331. package/src/hooks/__tests__/useFileUrlCache.test.ts +0 -319
  1332. package/src/hooks/__tests__/useFocusManagement.unit.test.ts +0 -604
  1333. package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +0 -613
  1334. package/src/hooks/__tests__/useFormDialog.test.ts +0 -307
  1335. package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +0 -446
  1336. package/src/hooks/__tests__/useIsMobile.unit.test.ts +0 -317
  1337. package/src/hooks/__tests__/useKeyboardShortcuts.unit.test.ts +0 -907
  1338. package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +0 -293
  1339. package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +0 -961
  1340. package/src/hooks/__tests__/useOrganisations.unit.test.ts +0 -369
  1341. package/src/hooks/__tests__/usePerformanceMonitor.unit.test.ts +0 -694
  1342. package/src/hooks/__tests__/usePermissionCache.test.ts +0 -506
  1343. package/src/hooks/__tests__/usePreventTabReload.test.ts +0 -307
  1344. package/src/hooks/__tests__/usePublicEvent.simple.test.ts +0 -794
  1345. package/src/hooks/__tests__/usePublicEvent.test.ts +0 -670
  1346. package/src/hooks/__tests__/usePublicEvent.unit.test.ts +0 -638
  1347. package/src/hooks/__tests__/usePublicFileDisplay.test.ts +0 -948
  1348. package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +0 -442
  1349. package/src/hooks/__tests__/useQueryCache.test.ts +0 -391
  1350. package/src/hooks/__tests__/useRBAC.unit.test.ts +0 -236
  1351. package/src/hooks/__tests__/useSessionDraft.test.ts +0 -556
  1352. package/src/hooks/__tests__/useSessionRestoration.unit.test.tsx +0 -390
  1353. package/src/hooks/__tests__/useStorage.unit.test.ts +0 -721
  1354. package/src/hooks/__tests__/useToast.test.ts +0 -413
  1355. package/src/hooks/__tests__/useToast.unit.test.tsx +0 -481
  1356. package/src/hooks/__tests__/useZodForm.unit.test.tsx +0 -191
  1357. package/src/hooks/public/usePublicFileDisplay.test.ts +0 -723
  1358. package/src/hooks/public/usePublicFileDisplay.ts +0 -534
  1359. package/src/hooks/useFileDisplay.ts +0 -748
  1360. package/src/icons/__tests__/index.test.ts +0 -133
  1361. package/src/providers/OrganisationProvider.test.tsx +0 -40
  1362. package/src/providers/OrganisationProvider.tsx +0 -92
  1363. package/src/providers/__tests__/AuthProvider.test.tsx +0 -218
  1364. package/src/providers/__tests__/EventProvider.test.tsx +0 -487
  1365. package/src/providers/__tests__/InactivityProvider.test-helper.tsx +0 -65
  1366. package/src/providers/__tests__/InactivityProvider.test.tsx +0 -428
  1367. package/src/providers/__tests__/OrganisationProvider.test.tsx +0 -616
  1368. package/src/providers/__tests__/OrganisationProvider.wrapper.test.tsx +0 -591
  1369. package/src/providers/__tests__/ProviderLifecycle.test.tsx +0 -308
  1370. package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +0 -503
  1371. package/src/providers/__tests__/index.test.ts +0 -138
  1372. package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +0 -229
  1373. package/src/providers/services/__tests__/AuthServiceProvider.test.tsx +0 -638
  1374. package/src/providers/services/__tests__/EventServiceProvider.test.tsx +0 -839
  1375. package/src/providers/services/__tests__/InactivityServiceProvider.test.tsx +0 -662
  1376. package/src/providers/services/__tests__/OrganisationServiceProvider.test.tsx +0 -440
  1377. package/src/providers/services/__tests__/UnifiedAuthProvider.advanced.test.tsx +0 -435
  1378. package/src/providers/services/__tests__/UnifiedAuthProvider.appId.test.tsx +0 -408
  1379. package/src/providers/services/__tests__/UnifiedAuthProvider.integration.test.tsx +0 -301
  1380. package/src/providers/services/__tests__/contexts.test.tsx +0 -281
  1381. package/src/providers/services/__tests__/useUnifiedAuth.test.tsx +0 -251
  1382. package/src/rbac/__tests__/adapters.comprehensive.test.tsx +0 -429
  1383. package/src/rbac/__tests__/audit-batched.test.ts +0 -550
  1384. package/src/rbac/__tests__/auth-rbac-security.integration.test.tsx +0 -300
  1385. package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +0 -517
  1386. package/src/rbac/__tests__/cache-invalidation.test.ts +0 -393
  1387. package/src/rbac/__tests__/engine.comprehensive.test.ts +0 -808
  1388. package/src/rbac/__tests__/performance.test.ts +0 -451
  1389. package/src/rbac/__tests__/rbac-core.test.tsx +0 -276
  1390. package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +0 -387
  1391. package/src/rbac/__tests__/rbac-engine-simplified.test.ts +0 -252
  1392. package/src/rbac/__tests__/rbac-functions.test.ts +0 -646
  1393. package/src/rbac/__tests__/rbac-role-isolation.test.ts +0 -456
  1394. package/src/rbac/__tests__/scenarios.user-role.test.tsx +0 -271
  1395. package/src/rbac/components/__tests__/AccessDenied.test.tsx +0 -324
  1396. package/src/rbac/components/__tests__/NavigationGuard.test.tsx +0 -1146
  1397. package/src/rbac/components/__tests__/PagePermissionGuard.performance.test.tsx +0 -231
  1398. package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +0 -243
  1399. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +0 -1430
  1400. package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +0 -185
  1401. package/src/rbac/hooks/__tests__/usePermissions.integration.test.ts +0 -427
  1402. package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +0 -1179
  1403. package/src/rbac/hooks/permissions/__tests__/useAccessLevel.test.ts +0 -622
  1404. package/src/rbac/hooks/permissions/__tests__/useCan.test.ts +0 -798
  1405. package/src/rbac/hooks/permissions/__tests__/useMultiplePermissions.test.ts +0 -843
  1406. package/src/rbac/hooks/permissions/__tests__/usePermissions.test.ts +0 -545
  1407. package/src/rbac/utils/__tests__/clientSecurity.test.ts +0 -192
  1408. package/src/rbac/utils/__tests__/contextValidator.test.ts +0 -126
  1409. package/src/rbac/utils/__tests__/deep-equal.test.ts +0 -76
  1410. package/src/rbac/utils/__tests__/eventContext.test.ts +0 -386
  1411. package/src/services/__tests__/AuthService.edge-cases.test.ts +0 -746
  1412. package/src/services/__tests__/AuthService.restoreSession.test.ts +0 -59
  1413. package/src/services/__tests__/AuthService.test.ts +0 -1328
  1414. package/src/services/__tests__/BaseService.edge-cases.test.ts +0 -506
  1415. package/src/services/__tests__/BaseService.test.ts +0 -363
  1416. package/src/services/__tests__/EventService.edge-cases.test.ts +0 -633
  1417. package/src/services/__tests__/EventService.eventColours.test.ts +0 -64
  1418. package/src/services/__tests__/EventService.test.ts +0 -1018
  1419. package/src/services/__tests__/InactivityService.edge-cases.test.ts +0 -492
  1420. package/src/services/__tests__/InactivityService.lifecycle.test.ts +0 -406
  1421. package/src/services/__tests__/InactivityService.test.ts +0 -654
  1422. package/src/services/__tests__/OrganisationService.edge-cases.test.ts +0 -633
  1423. package/src/services/__tests__/OrganisationService.pagination.test.ts +0 -409
  1424. package/src/services/__tests__/OrganisationService.test.ts +0 -1176
  1425. package/src/services/interfaces/__tests__/IAuthService.test.ts +0 -190
  1426. package/src/services/interfaces/__tests__/IEventService.test.ts +0 -176
  1427. package/src/services/interfaces/__tests__/IInactivityService.test.ts +0 -183
  1428. package/src/services/interfaces/__tests__/IOrganisationService.test.ts +0 -207
  1429. package/src/theming/__tests__/parseEventColours.test.ts +0 -321
  1430. package/src/theming/__tests__/runtime.test.ts +0 -504
  1431. package/src/types/__tests__/core.test.ts +0 -397
  1432. package/src/types/__tests__/database-generated.test.ts +0 -78
  1433. package/src/types/__tests__/file-reference.test.ts +0 -351
  1434. package/src/types/__tests__/guards.test.ts +0 -246
  1435. package/src/types/__tests__/index.test.ts +0 -265
  1436. package/src/types/__tests__/organisation.roles.test.ts +0 -55
  1437. package/src/types/__tests__/organisation.test.ts +0 -1133
  1438. package/src/types/__tests__/theme.test.ts +0 -830
  1439. package/src/types/__tests__/type-validation.test.ts +0 -526
  1440. package/src/types/__tests__/validation.test.ts +0 -729
  1441. package/src/utils/__tests__/appConfig.unit.test.ts +0 -55
  1442. package/src/utils/__tests__/audit.unit.test.ts +0 -69
  1443. package/src/utils/__tests__/auth-utils.unit.test.ts +0 -70
  1444. package/src/utils/__tests__/bundleAnalysis.unit.test.ts +0 -326
  1445. package/src/utils/__tests__/cn.unit.test.ts +0 -34
  1446. package/src/utils/__tests__/debugLogger.test.ts +0 -417
  1447. package/src/utils/__tests__/deviceFingerprint.unit.test.ts +0 -818
  1448. package/src/utils/__tests__/dynamicUtils.unit.test.ts +0 -331
  1449. package/src/utils/__tests__/formatDate.unit.test.ts +0 -109
  1450. package/src/utils/__tests__/formatting.unit.test.ts +0 -99
  1451. package/src/utils/__tests__/index.unit.test.ts +0 -251
  1452. package/src/utils/__tests__/lazyLoad.unit.test.tsx +0 -320
  1453. package/src/utils/__tests__/logger.unit.test.ts +0 -398
  1454. package/src/utils/__tests__/organisationContext.unit.test.ts +0 -191
  1455. package/src/utils/__tests__/performanceBenchmark.test.ts +0 -174
  1456. package/src/utils/__tests__/performanceBudgets.unit.test.ts +0 -288
  1457. package/src/utils/__tests__/permissionTypes.unit.test.ts +0 -250
  1458. package/src/utils/__tests__/permissionUtils.unit.test.ts +0 -362
  1459. package/src/utils/__tests__/request-deduplication.test.ts +0 -349
  1460. package/src/utils/__tests__/sanitization.unit.test.ts +0 -346
  1461. package/src/utils/__tests__/schemaUtils.unit.test.ts +0 -441
  1462. package/src/utils/__tests__/secureDataAccess.unit.test.ts +0 -334
  1463. package/src/utils/__tests__/secureErrors.unit.test.ts +0 -390
  1464. package/src/utils/__tests__/secureStorage.unit.test.ts +0 -289
  1465. package/src/utils/__tests__/security.unit.test.ts +0 -149
  1466. package/src/utils/__tests__/securityMonitor.unit.test.ts +0 -276
  1467. package/src/utils/__tests__/sessionTracking.unit.test.ts +0 -218
  1468. package/src/utils/__tests__/timezone.test.ts +0 -345
  1469. package/src/utils/__tests__/validation.unit.test.ts +0 -307
  1470. package/src/utils/__tests__/validationUtils.unit.test.ts +0 -555
  1471. package/src/utils/core/__tests__/cn.test.ts +0 -66
  1472. package/src/utils/core/__tests__/debugLogger.test.ts +0 -113
  1473. package/src/utils/core/__tests__/logger.test.ts +0 -217
  1474. package/src/utils/dynamic/__tests__/dynamicUtils.test.ts +0 -185
  1475. package/src/utils/dynamic/__tests__/lazyLoad.test.tsx +0 -156
  1476. package/src/utils/file-reference/__tests__/file-reference.test.ts +0 -1313
  1477. package/src/utils/performance/__tests__/bundleAnalysis.test.ts +0 -148
  1478. package/src/utils/performance/__tests__/performanceBenchmark.test.ts +0 -251
  1479. package/src/utils/performance/__tests__/performanceBudgets.test.ts +0 -241
  1480. package/src/utils/permissions/__tests__/permissionTypes.test.ts +0 -149
  1481. package/src/utils/persistence/__tests__/keyDerivation.test.ts +0 -306
  1482. package/src/utils/persistence/__tests__/sensitiveFieldDetection.test.ts +0 -271
  1483. package/src/utils/storage/__tests__/config.unit.test.ts +0 -239
  1484. package/src/utils/storage/__tests__/index.unit.test.ts +0 -68
  1485. package/src/utils/validation/__tests__/common.test.ts +0 -115
  1486. package/src/utils/validation/__tests__/csrf.test.ts +0 -170
  1487. package/src/utils/validation/__tests__/htmlSanitization.unit.test.ts +0 -618
  1488. package/src/utils/validation/__tests__/passwordSchema.test.ts +0 -164
  1489. package/src/utils/validation/__tests__/schema.test.ts +0 -127
  1490. package/src/utils/validation/__tests__/sqlInjectionProtection.test.ts +0 -165
  1491. package/src/utils/validation/__tests__/user.test.ts +0 -173
  1492. package/src/utils/validation/__tests__/validation.test.ts +0 -197
  1493. package/src/utils/validation/__tests__/validationUtils.test.ts +0 -294
  1494. /package/src/components/DataTable/{components/__tests__ → ui}/COVERAGE_NOTE.md +0 -0
  1495. /package/src/components/DataTable/utils/{__tests__/COVERAGE_NOTE.md → COVERAGE_NOTE.md} +0 -0
  1496. /package/src/hooks/{__tests__/useApiFetch.unit.test.ts → useApiFetch.unit.test.ts} +0 -0
  1497. /package/src/providers/{__tests__/README.md → README.md} +0 -0
  1498. /package/src/rbac/{__tests__/index.test.ts → index.test.ts} +0 -0
  1499. /package/src/rbac/{__tests__/rbac-integration.test.ts → rbac-integration.test.ts} +0 -0
  1500. /package/src/types/{__tests__/README.md → README.md} +0 -0
@@ -1,4290 +0,0 @@
1
- import * as React$1 from 'react';
2
- import React__default, { ReactNode, Component, ErrorInfo } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { P as ParsedAddress, A as AutocompleteOptions } from './types-Dr8sNhER.js';
5
- import * as LabelPrimitive from '@radix-ui/react-label';
6
- import { F as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, a as FileReference } from './file-reference-BavO2eQj.js';
7
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
8
- import * as SwitchPrimitive from '@radix-ui/react-switch';
9
- import * as TabsPrimitive from '@radix-ui/react-tabs';
10
- import { DayPickerProps, DateRange } from 'react-day-picker';
11
- import * as ToastPrimitives from '@radix-ui/react-toast';
12
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
13
- import { c as DataRecord, D as DataTableColumn, j as DataTableRBACConfig, h as DataTableFeatureConfig, H as HierarchicalConfig, P as PerformanceConfig, S as ServerSideConfig, e as PaginationMode, C as ChunkingConfig, d as SearchIndexConfig, i as ExportOptions, G as GetRowId, E as EmptyStateConfig, A as AggregateConfig, a as DataTableAction } from './types-D05dCGma.js';
14
- import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn, FieldPath, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
15
- import { z } from 'zod';
16
- import { N as NavigationMenuProps, a as NavigationItem } from './types-BE2sEHKd.js';
17
- import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
18
- import { O as Organisation, E as Event } from './event-WTAQuGcq.js';
19
-
20
- /**
21
- * Button component props
22
- * Extends standard HTML button attributes with button-specific styling and behavior options.
23
- *
24
- * @interface ButtonProps
25
- */
26
- /**
27
- * Props for the Button component.
28
- * Extends standard button HTML attributes.
29
- */
30
- interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
31
- /** Visual variant of the button */
32
- variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
33
- /** Size of the button */
34
- size?: 'default' | 'sm' | 'lg' | 'icon';
35
- /** Whether to render as a different element using Radix Slot */
36
- asChild?: boolean;
37
- }
38
- /**
39
- * Button Component
40
- * A flexible, accessible button component with multiple variants and sizes.
41
- *
42
- * @component
43
- * @example
44
- * ```tsx
45
- * // Basic button
46
- * <Button>Click me</Button>
47
- *
48
- * // Button with variant and size
49
- * <Button variant="destructive" size="lg">Delete</Button>
50
- *
51
- * // Button as child (composition)
52
- * <Button asChild>
53
- * <Link href="/dashboard">Go to Dashboard</Link>
54
- * </Button>
55
- * ```
56
- */
57
- declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
58
-
59
- /**
60
- * @file Card Component Suite
61
- * @package @jmruthers/pace-core
62
- * @module Components
63
- * @since 0.1.0
64
- *
65
- * A flexible card component suite for displaying content with consistent styling.
66
- * Includes Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardActions, and HoverCard variants.
67
- * Uses semantic HTML elements for better accessibility and structure.
68
- *
69
- * Features:
70
- * - Semantic HTML structure (article, header, main, footer, etc.)
71
- * - Modular card structure (header, content, footer, actions, etc.)
72
- * - CardContent uses main element for primary content (accessible when nested)
73
- * - Consistent padding, border, and shadow
74
- * - Responsive and accessible
75
- * - HoverCard for popover-style cards
76
- * - Proper heading hierarchy and semantic elements
77
- *
78
- * @example
79
- * ```tsx
80
- * // Basic card with semantic HTML structure
81
- * <Card>
82
- * <CardHeader>
83
- * <CardTitle>Article Title</CardTitle>
84
- * <CardDescription>Brief description of the article content</CardDescription>
85
- * </CardHeader>
86
- * <CardContent>
87
- * <p>Main content goes here with proper semantic structure.</p>
88
- * <p>Additional paragraphs and content.</p>
89
- * </CardContent>
90
- * <CardFooter>
91
- * <CardActions>
92
- * <Button>Primary Action</Button>
93
- * <Button variant="outline">Secondary Action</Button>
94
- * </CardActions>
95
- * </CardFooter>
96
- * </Card>
97
- *
98
- * // Semantic HTML structure:
99
- * // - Card: <article> element for self-contained content
100
- * // - CardHeader: <header> element for card heading area
101
- * // - CardContent: <main> element for primary card content
102
- * // - CardFooter: <footer> element for card footer area
103
- * // - CardActions: <nav> element for action buttons
104
- *
105
- * // HoverCard usage with semantic structure
106
- * <HoverCard>
107
- * <HoverCardTrigger>Hover me</HoverCardTrigger>
108
- * <HoverCardContent>
109
- * <p>Popover content with semantic elements</p>
110
- * </HoverCardContent>
111
- * </HoverCard>
112
- * ```
113
- *
114
- * @accessibility
115
- * - Uses semantic HTML structure (article, header, main, footer, nav)
116
- * - Focusable and keyboard accessible
117
- * - Proper heading hierarchy for screen readers
118
- * - HoverCard supports mouse and keyboard interaction
119
- * - Screen reader friendly with semantic landmarks
120
- */
121
-
122
- /**
123
- * Props for the Card component.
124
- * Extends standard HTML attributes for semantic HTML elements.
125
- */
126
- interface CardProps extends React$1.HTMLAttributes<HTMLElement> {
127
- /** Visual variant of the card */
128
- variant?: 'default' | 'outline' | 'ghost';
129
- /** Size of the card */
130
- size?: 'default' | 'sm' | 'lg';
131
- /** Whether the card should appear as a clickable link with hover effects */
132
- isLink?: boolean;
133
- /** Path or URL to navigate to when the card is clicked */
134
- link?: string;
135
- }
136
- declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLElement>>;
137
- declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
138
- declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
139
- declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
140
- declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
141
- declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
142
- declare const CardActions: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
143
- type CardActionsProps = React$1.HTMLAttributes<HTMLElement>;
144
-
145
- /**
146
- * Props for the Input component.
147
- * Extends standard input HTML attributes.
148
- */
149
- interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'> {
150
- /**
151
- * Input variant style
152
- */
153
- variant?: 'default' | 'destructive';
154
- /**
155
- * Input size
156
- */
157
- size?: 'sm' | 'md' | 'lg';
158
- /**
159
- * Error state for styling
160
- */
161
- error?: boolean;
162
- }
163
- /**
164
- * Input component
165
- * A flexible, accessible input component with multiple variants and sizes
166
- *
167
- * @param props - Input configuration and styling
168
- * @param ref - Forwarded ref to the input element
169
- * @returns JSX.Element - The rendered input element
170
- *
171
- * @example
172
- * ```tsx
173
- * // Basic input
174
- * <Input placeholder="Enter your name" />
175
- *
176
- * // Input with error state
177
- * <Input
178
- * placeholder="Email"
179
- * type="email"
180
- * error={true}
181
- * />
182
- *
183
- * // Large input with destructive variant
184
- * <Input
185
- * variant="destructive"
186
- * size="lg"
187
- * placeholder="Error input"
188
- * />
189
- * ```
190
- */
191
- declare function Input({ className, variant, size, error, type, ref, ...props }: InputProps & {
192
- ref?: React$1.Ref<HTMLInputElement>;
193
- }): react_jsx_runtime.JSX.Element;
194
- declare namespace Input {
195
- var displayName: string;
196
- }
197
-
198
- /**
199
- * @file AddressField Component Types
200
- * @package @jmruthers/pace-core
201
- * @module Components/AddressField
202
- * @since 0.1.0
203
- */
204
-
205
- /**
206
- * Props for AddressField component
207
- */
208
- interface AddressFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'defaultValue' | 'size'> {
209
- /** Google Places API key (required) */
210
- apiKey: string;
211
- /** Controlled input value */
212
- value?: string;
213
- /** Uncontrolled default value */
214
- defaultValue?: string;
215
- /** Callback when address is selected */
216
- onChange?: (address: ParsedAddress | null) => void;
217
- /** Callback when input value changes */
218
- onInputChange?: (value: string) => void;
219
- /** Placeholder text */
220
- placeholder?: string;
221
- /** Error state styling */
222
- error?: boolean;
223
- /** Disabled state */
224
- disabled?: boolean;
225
- /** Input size */
226
- size?: 'sm' | 'md' | 'lg';
227
- /** Input variant */
228
- variant?: 'default' | 'destructive';
229
- /** Google Places API autocomplete options */
230
- autocompleteOptions?: AutocompleteOptions;
231
- /** Debounce delay in milliseconds */
232
- debounceDelay?: number;
233
- /** Enable caching (default: true) */
234
- cacheEnabled?: boolean;
235
- /** Cache TTL configuration */
236
- cacheTTL?: {
237
- /** Autocomplete cache TTL in seconds */
238
- autocomplete?: number;
239
- /** Place details cache TTL in seconds */
240
- placeDetails?: number;
241
- };
242
- }
243
- /**
244
- * Ref type for AddressField component
245
- */
246
- interface AddressFieldRef {
247
- /** Focus the input */
248
- focus: () => void;
249
- /** Blur the input */
250
- blur: () => void;
251
- /** Get current input value */
252
- getValue: () => string;
253
- /** Clear the input and suggestions */
254
- clear: () => void;
255
- }
256
-
257
- /**
258
- * @file AddressField Component
259
- * @package @jmruthers/pace-core
260
- * @module Components/AddressField
261
- * @since 0.1.0
262
- *
263
- * Address input field with Google Places API autocomplete.
264
- * Provides address suggestions, keyboard navigation, and accessibility.
265
- *
266
- * Features:
267
- * - Google Places API autocomplete integration
268
- * - Debounced input with caching
269
- * - Keyboard navigation (Arrow keys, Enter, Escape)
270
- * - Accessible ARIA attributes
271
- * - Semantic HTML (description list for suggestions)
272
- * - Loading and error states
273
- * - place_id storage for later retrieval
274
- *
275
- * @accessibility
276
- * - Uses semantic HTML: `<dl>`, `<dt>`, `<dd>` for address suggestions
277
- * - Proper ARIA attributes for combobox pattern
278
- * - Keyboard navigation support
279
- * - Screen reader friendly
280
- */
281
-
282
- /**
283
- * AddressField component
284
- *
285
- * A production-ready address input field with Google Places API autocomplete.
286
- * Returns structured address data including place_id for later retrieval.
287
- *
288
- * @param props - AddressField configuration
289
- * @param ref - Forwarded ref for imperative access
290
- * @returns JSX.Element - The rendered address field
291
- *
292
- * @example
293
- * ```tsx
294
- * <AddressField
295
- * apiKey={apiKey}
296
- * onChange={(address) => {
297
- * // address includes place_id, full_address, lat, lng, etc.
298
- * console.log(address.place_id);
299
- * }}
300
- * placeholder="Enter your address"
301
- * />
302
- * ```
303
- */
304
- declare const AddressField: React$1.ForwardRefExoticComponent<AddressFieldProps & React$1.RefAttributes<HTMLInputElement>>;
305
-
306
- /**
307
- * @file Label Component
308
- * @package @jmruthers/pace-core
309
- * @module Components/Label
310
- * @since 0.1.0
311
- *
312
- * An accessible label component built on top of Radix UI primitives.
313
- * Provides form labels with helper text, error states, and required indicators.
314
- *
315
- * Features:
316
- * - Proper label association with form controls
317
- * - Required field indicators
318
- * - Helper text support
319
- * - Error state display
320
- * - Customizable styling
321
- * - Screen reader friendly
322
- * - Keyboard accessible
323
- *
324
- * @example
325
- * ```tsx
326
- * // Basic label
327
- * <Label htmlFor="email">Email Address</Label>
328
- * <Input id="email" type="email" />
329
- *
330
- * // Label with required indicator
331
- * <Label htmlFor="name" required>
332
- * Full Name
333
- * </Label>
334
- * <Input id="name" />
335
- *
336
- * // Label with helper text
337
- * <Label
338
- * htmlFor="password"
339
- * required
340
- * helperText="Must be at least 8 characters"
341
- * >
342
- * Password
343
- * </Label>
344
- * <Input id="password" type="password" />
345
- *
346
- * // Label with error state
347
- * <Label
348
- * htmlFor="email"
349
- * error="Please enter a valid email address"
350
- * >
351
- * Email Address
352
- * </Label>
353
- * <Input id="email" type="email" />
354
- *
355
- * // Custom required indicator
356
- * <Label
357
- * htmlFor="terms"
358
- * required
359
- * requiredIndicator="(required)"
360
- * >
361
- * Accept Terms
362
- * </Label>
363
- * <Checkbox id="terms" />
364
- * ```
365
- *
366
- * @accessibility
367
- * - WCAG 2.1 AA compliant
368
- * - Proper label association with htmlFor
369
- * - Screen reader announcements for errors
370
- * - Required field indicators for screen readers
371
- * - Error messages with role="alert"
372
- * - High contrast support
373
- *
374
- * @dependencies
375
- * - @radix-ui/react-label - Core label functionality
376
- * - React 19+ - Hooks and refs
377
- * - Tailwind CSS - Styling
378
- */
379
-
380
- /**
381
- * Props for the Label component
382
- */
383
- interface LabelProps extends React$1.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
384
- /** Whether the field is required */
385
- required?: boolean;
386
- /** Custom required indicator (default: '*') */
387
- requiredIndicator?: React$1.ReactNode;
388
- /** Whether to hide the required indicator visually */
389
- hideRequiredIndicator?: boolean;
390
- /** Helper text to display below the label */
391
- helperText?: string;
392
- /** CSS classes for helper text styling */
393
- helperTextClassName?: string;
394
- /** Error message to display */
395
- error?: string;
396
- /** CSS classes for error message styling */
397
- errorClassName?: string;
398
- }
399
- /**
400
- * Label component
401
- * An accessible label with helper text and error state support
402
- *
403
- * @param props - Label configuration and styling
404
- * @param ref - Forwarded ref to the label element
405
- * @returns JSX.Element - The rendered label with optional helper text and errors
406
- *
407
- * @example
408
- * ```tsx
409
- * <Label htmlFor="email" required helperText="We'll never share your email">
410
- * Email Address
411
- * </Label>
412
- * ```
413
- */
414
- declare const Label: React$1.ForwardRefExoticComponent<LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
415
-
416
- interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
417
- /**
418
- * Textarea variant style
419
- */
420
- variant?: 'default' | 'destructive';
421
- /**
422
- * Textarea size
423
- */
424
- size?: 'sm' | 'md' | 'lg';
425
- /**
426
- * Error state for styling
427
- */
428
- error?: boolean;
429
- }
430
- /**
431
- * Textarea component
432
- * A flexible, accessible textarea component with multiple variants and sizes.
433
- * Matches the Input component API and styling for consistency.
434
- *
435
- * @param props - Textarea configuration and styling
436
- * @param ref - Forwarded ref to the textarea element
437
- * @returns JSX.Element - The rendered textarea element
438
- *
439
- * @example
440
- * ```tsx
441
- * // Basic textarea
442
- * <Textarea placeholder="Enter your message..." />
443
- *
444
- * // Textarea with error state
445
- * <Textarea
446
- * placeholder="Comments"
447
- * error={true}
448
- * />
449
- *
450
- * // Large textarea with destructive variant
451
- * <Textarea
452
- * variant="destructive"
453
- * size="lg"
454
- * placeholder="Error textarea"
455
- * />
456
- * ```
457
- */
458
- declare function Textarea({ className, variant, size, error, ref, ...props }: TextareaProps & {
459
- ref?: React$1.Ref<HTMLTextAreaElement>;
460
- }): react_jsx_runtime.JSX.Element;
461
- declare namespace Textarea {
462
- var displayName: string;
463
- }
464
-
465
- /**
466
- * @file Alert Component Suite
467
- * @package @jmruthers/pace-core
468
- * @module Components
469
- * @since 0.1.0
470
- *
471
- * A flexible and accessible alert component for displaying important messages.
472
- * Includes Alert, AlertTitle, and AlertDescription subcomponents.
473
- *
474
- * Features:
475
- * - Multiple visual variants (default, destructive, inline)
476
- * - Title and description support
477
- * - Semantic HTML: renders as `<div>` element with `role="alert"` (default) or custom role
478
- * - Keyboard and screen reader accessible
479
- * - Composable with icons and actions
480
- * - Inline variant for lightweight text formatting
481
- *
482
- * @example
483
- * ```tsx
484
- * // Basic alert (renders as <div role="alert"> with <h5> title and <p> description)
485
- * <Alert>
486
- * <AlertTitle>Success</AlertTitle>
487
- * <AlertDescription>Your changes have been saved.</AlertDescription>
488
- * </Alert>
489
- *
490
- * // Destructive alert with icon (renders as <div role="alert"> with <h5> title and <p> description)
491
- * <Alert variant="destructive">
492
- * <ErrorIcon />
493
- * <AlertTitle>Error</AlertTitle>
494
- * <AlertDescription>Something went wrong.</AlertDescription>
495
- * </Alert>
496
- *
497
- * // Status message (renders as <div role="status"> for informational messages)
498
- * <Alert role="status" aria-live="polite">
499
- * <AlertTitle>No data available</AlertTitle>
500
- * <AlertDescription>Get started by adding your first entry.</AlertDescription>
501
- * </Alert>
502
- *
503
- * // Inline alert (renders as React.Fragment with <strong> title and <span> description)
504
- * <Alert variant="inline">
505
- * <AlertTitle>Note:</AlertTitle>
506
- * <AlertDescription>This is an inline message.</AlertDescription>
507
- * </Alert>
508
- * ```
509
- *
510
- * @accessibility
511
- * - Uses semantic HTML: `<div>` element with `role="alert"` (default) for screen reader announcements
512
- * - Can be customized with `role="status"` for informational messages
513
- * - Title and description are semantically structured
514
- * - Supports keyboard navigation and focus
515
- */
516
-
517
- declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & {
518
- variant?: "default" | "destructive" | "inline";
519
- role?: string;
520
- } & React$1.RefAttributes<HTMLDivElement>>;
521
- declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
522
- declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
523
-
524
- /**
525
- * @file Avatar Component
526
- * @package @jmruthers/pace-core
527
- * @module Components
528
- * @since 0.1.0
529
- *
530
- * A simple and accessible avatar component for displaying user profile images or initials.
531
- * Supports three approaches for image display:
532
- * - File reference props (uses FileDisplay for Supabase storage)
533
- * - File ID (uses file reference lookup)
534
- * - Direct URL (simple img tag for public images)
535
- *
536
- * Features:
537
- * - Circular avatar display
538
- * - Image, fallback, and initials support
539
- * - Customizable size and style
540
- * - Keyboard and screen reader accessible
541
- * - Graceful fallback for missing images
542
- *
543
- * @example
544
- * ```tsx
545
- * // Avatar with direct URL
546
- * <Avatar
547
- * src="/user.jpg"
548
- * alt="User"
549
- * fallback="AB"
550
- * />
551
- *
552
- * // Avatar with file reference props
553
- * <Avatar
554
- * table_name="user_profiles"
555
- * record_id={userId}
556
- * organisation_id={orgId}
557
- * category={FileCategory.PROFILE_PHOTOS}
558
- * fallback="JD"
559
- * />
560
- *
561
- * // Avatar with file ID
562
- * <Avatar
563
- * fileId={fileReferenceId}
564
- * organisation_id={orgId}
565
- * fallback="JD"
566
- * />
567
- *
568
- * // Avatar with fallback only
569
- * <Avatar fallback="JD" />
570
- * ```
571
- *
572
- * @accessibility
573
- * - Uses alt text for images
574
- * - Fallback content is accessible to screen readers
575
- * - Keyboard focusable and navigable
576
- */
577
-
578
- interface AvatarProps extends React$1.HTMLAttributes<HTMLDivElement> {
579
- table_name?: string;
580
- record_id?: string;
581
- organisation_id?: string;
582
- category?: FileCategory;
583
- fileId?: string;
584
- src?: string;
585
- alt?: string;
586
- fallback: string;
587
- className?: string;
588
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
589
- }
590
- /**
591
- * Avatar component for displaying user profile images or initials
592
- */
593
- declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLDivElement>>;
594
-
595
- /**
596
- * Badge variant type
597
- * Defines the visual style, color palette, and shade intensity of the badge.
598
- * Format: {style}-{color}-{shade}
599
- * - style: 'solid' | 'outline' | 'soft'
600
- * - color: 'main' | 'sec' | 'acc'
601
- * - shade: 'muted' | 'normal' | 'strong'
602
- */
603
- type BadgeVariant = 'solid-main-muted' | 'solid-main-normal' | 'solid-main-strong' | 'solid-sec-muted' | 'solid-sec-normal' | 'solid-sec-strong' | 'solid-acc-muted' | 'solid-acc-normal' | 'solid-acc-strong' | 'outline-main-muted' | 'outline-main-normal' | 'outline-main-strong' | 'outline-sec-muted' | 'outline-sec-normal' | 'outline-sec-strong' | 'outline-acc-muted' | 'outline-acc-normal' | 'outline-acc-strong' | 'soft-main-muted' | 'soft-main-normal' | 'soft-main-strong' | 'soft-sec-muted' | 'soft-sec-normal' | 'soft-sec-strong' | 'soft-acc-muted' | 'soft-acc-normal' | 'soft-acc-strong';
604
- /**
605
- * Badge component props
606
- * Extends standard HTML span attributes with badge-specific styling options.
607
- *
608
- * @interface BadgeProps
609
- */
610
- interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
611
- /** Visual variant of the badge (style-color-shade) */
612
- variant?: BadgeVariant;
613
- }
614
- /**
615
- * Badge Component
616
- * A small, non-interactive visual label for displaying concise information.
617
- *
618
- * @component
619
- * @example
620
- * ```tsx
621
- * // Default variant
622
- * <Badge>New</Badge>
623
- *
624
- * // Specific variant
625
- * <Badge variant="solid-main-normal">Active</Badge>
626
- *
627
- * // Outline variant
628
- * <Badge variant="outline-sec-muted">Pending</Badge>
629
- *
630
- * // Soft variant
631
- * <Badge variant="soft-acc-strong">Featured</Badge>
632
- * ```
633
- */
634
- declare function Badge({ className, variant, ref, ...props }: BadgeProps & {
635
- ref?: React$1.Ref<HTMLSpanElement>;
636
- }): react_jsx_runtime.JSX.Element;
637
- declare namespace Badge {
638
- var displayName: string;
639
- }
640
-
641
- /**
642
- * @file Checkbox Component
643
- * @package @jmruthers/pace-core
644
- * @module Components
645
- * @since 0.1.0
646
- *
647
- * An accessible checkbox component built on top of Radix UI's Checkbox primitive.
648
- * Provides a customizable checkbox input with proper keyboard and screen reader support.
649
- *
650
- * Features:
651
- * - Customizable styling via className
652
- * - Built-in focus and hover states
653
- * - Disabled state support
654
- * - Checked state indicator
655
- * - Full keyboard navigation
656
- * - Screen reader support
657
- *
658
- * @example
659
- * ```tsx
660
- * // Basic usage
661
- * <Checkbox />
662
- *
663
- * // With label
664
- * <>
665
- * <Checkbox id="terms" />
666
- * <label htmlFor="terms">Accept terms and conditions</label>
667
- * </>
668
- *
669
- * // Disabled state
670
- * <Checkbox disabled />
671
- *
672
- * // Controlled component
673
- * const [checked, setChecked] = React.useState(false);
674
- * <Checkbox
675
- * checked={checked}
676
- * onCheckedChange={setChecked}
677
- * />
678
- * ```
679
- *
680
- * @accessibility
681
- * - Uses Radix UI's accessible checkbox primitive
682
- * - Proper keyboard navigation (Space to toggle)
683
- * - Screen reader announcements for state changes
684
- * - Focus visible styles for keyboard users
685
- * - ARIA attributes handled automatically
686
- */
687
-
688
- declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
689
-
690
- /**
691
- * @file Switch Component
692
- * @package @jmruthers/pace-core
693
- * @module Components/Switch
694
- * @since 0.5.67
695
- *
696
- * A toggle switch component built on Radix UI primitives.
697
- * Provides an accessible, keyboard-navigable switch for boolean states.
698
- *
699
- * Features:
700
- * - WCAG 2.1 AA compliant
701
- * - Keyboard navigation (Space/Enter)
702
- * - Focus visible indicators
703
- * - Disabled state support
704
- * - Smooth animations
705
- * - Tailwind v4 compatible
706
- * - Theme-aware colors
707
- *
708
- * @example
709
- * ```tsx
710
- * import { Switch } from '@jmruthers/pace-core';
711
- *
712
- * function Example() {
713
- * const [checked, setChecked] = React.useState(false);
714
- *
715
- * return (
716
- * <>
717
- * <Switch
718
- * checked={checked}
719
- * onCheckedChange={setChecked}
720
- * id="notifications"
721
- * />
722
- * <label htmlFor="notifications">
723
- * Enable notifications
724
- * </label>
725
- * </>
726
- * );
727
- * }
728
- * ```
729
- *
730
- * @example With Form
731
- * ```tsx
732
- * import { Switch, Label } from '@jmruthers/pace-core';
733
- *
734
- * function FormExample() {
735
- * return (
736
- * <>
737
- * <Switch id="terms" />
738
- * <Label htmlFor="terms">
739
- * I agree to the terms and conditions
740
- * </Label>
741
- * </>
742
- * );
743
- * }
744
- * ```
745
- *
746
- * @example Disabled State
747
- * ```tsx
748
- * <Switch disabled checked />
749
- * ```
750
- *
751
- * @accessibility
752
- * - Uses Radix UI's accessible switch primitive
753
- * - Proper keyboard navigation (Space to toggle)
754
- * - Screen reader announcements for state changes
755
- * - Focus visible styles for keyboard users
756
- * - ARIA attributes handled automatically
757
- */
758
-
759
- /**
760
- * Switch component props
761
- * Extends all props from Radix UI Switch.Root
762
- */
763
- interface SwitchProps extends React$1.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> {
764
- /**
765
- * Additional CSS classes to apply to the switch
766
- */
767
- className?: string;
768
- }
769
- /**
770
- * Switch component
771
- *
772
- * A toggle switch for boolean states. Built on Radix UI for accessibility.
773
- *
774
- * @component
775
- * @example
776
- * ```tsx
777
- * <Switch checked={isEnabled} onCheckedChange={setIsEnabled} />
778
- * ```
779
- */
780
- declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
781
-
782
- /**
783
- * @file Progress Component
784
- * @package @jmruthers/pace-core
785
- * @module Components/Progress
786
- * @since 0.1.0
787
- *
788
- * An accessible progress bar component built on the native HTML `<progress>` element.
789
- * Provides smooth animations and proper ARIA attributes for screen readers.
790
- *
791
- * Features:
792
- * - Smooth progress animations
793
- * - Customizable value and max range
794
- * - Native accessibility support (role="progressbar" automatically applied)
795
- * - Customizable styling and appearance
796
- * - Responsive design
797
- * - Indeterminate state support
798
- *
799
- * @example
800
- * ```tsx
801
- * // Basic progress bar
802
- * <Progress value={50} />
803
- *
804
- * // Progress with custom max value
805
- * <Progress value={7} max={10} />
806
- *
807
- * // Progress with custom styling
808
- * <Progress
809
- * value={75}
810
- * className="h-4 bg-sec-200"
811
- * />
812
- *
813
- * // Animated progress (controlled)
814
- * const [progress, setProgress] = useState(0);
815
- *
816
- * useEffect(() => {
817
- * const timer = setInterval(() => {
818
- * setProgress(prev => prev >= 100 ? 0 : prev + 10);
819
- * }, 1000);
820
- * return () => clearInterval(timer);
821
- * }, []);
822
- *
823
- * <Progress value={progress} />
824
- *
825
- * // Indeterminate progress (no value)
826
- * <Progress />
827
- * ```
828
- *
829
- * @accessibility
830
- * - WCAG 2.1 AA compliant
831
- * - Native `<progress>` element provides role="progressbar" automatically
832
- * - Screen reader announcements for progress changes
833
- * - High contrast support
834
- *
835
- * @performance
836
- * - CSS transitions for smooth animations
837
- * - Efficient re-rendering
838
- * - Minimal DOM structure (native HTML element)
839
- *
840
- * @dependencies
841
- * - React 19+ - Hooks and refs
842
- * - Tailwind CSS - Styling
843
- */
844
-
845
- /**
846
- * Props for the Progress component
847
- */
848
- interface ProgressProps extends React$1.HTMLAttributes<HTMLProgressElement> {
849
- /** Current progress value (0 to max). Omit for indeterminate state. */
850
- value?: number;
851
- /** Maximum progress value (default: 100) */
852
- max?: number;
853
- }
854
- /**
855
- * Progress component
856
- * An accessible progress bar with smooth animations using native HTML `<progress>` element
857
- *
858
- * @param props - Progress configuration and styling
859
- * @param ref - Forwarded ref to the progress element
860
- * @returns JSX.Element - The rendered progress bar
861
- *
862
- * @example
863
- * ```tsx
864
- * <Progress value={75} max={100} />
865
- * ```
866
- */
867
- declare const Progress: React$1.ForwardRefExoticComponent<ProgressProps & React$1.RefAttributes<HTMLProgressElement>>;
868
-
869
- /**
870
- * Dialog size variants
871
- * @public
872
- */
873
- type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'auto';
874
- /**
875
- * Props for the Dialog root component
876
- * @public
877
- */
878
- interface DialogProps {
879
- children: React$1.ReactNode;
880
- open?: boolean;
881
- defaultOpen?: boolean;
882
- onOpenChange?: (open: boolean) => void;
883
- }
884
- /**
885
- * Props for the DialogTrigger component
886
- * @public
887
- */
888
- interface DialogTriggerProps {
889
- children: React$1.ReactNode;
890
- asChild?: boolean;
891
- className?: string;
892
- onClick?: (e: React$1.MouseEvent) => void;
893
- }
894
- /**
895
- * Enhanced props for the DialogContent component with size variants and customization
896
- * Uses semantic HTML dialog element
897
- * @public
898
- */
899
- interface DialogContentProps extends React$1.HTMLAttributes<HTMLDialogElement> {
900
- /** Dialog size variant */
901
- size?: DialogSize;
902
- /** Whether to show the close button */
903
- showCloseButton?: boolean;
904
- /** Whether to prevent closing on escape key */
905
- preventCloseOnEscape?: boolean;
906
- /** Whether to prevent closing on outside click */
907
- preventCloseOnOutsideClick?: boolean;
908
- /** Maximum height as percentage of viewport height (0-100) */
909
- maxHeightPercent?: number;
910
- /** Maximum width as percentage of viewport width (0-100) */
911
- maxWidthPercent?: number;
912
- /** Enable smart scrolling with sticky header/footer */
913
- enableScrolling?: boolean;
914
- /** Custom max height in CSS units (overrides maxHeightPercent) */
915
- maxHeight?: string;
916
- /** Custom max width in CSS units (overrides maxWidthPercent and size) */
917
- maxWidth?: string;
918
- /** Minimum height in CSS units */
919
- minHeight?: string;
920
- /** Minimum width in CSS units */
921
- minWidth?: string;
922
- /** Dialog title - sets native title attribute and aria-labelledby */
923
- title?: string;
924
- /** Dialog description - sets native aria-description attribute */
925
- description?: string;
926
- /** Whether to persist open state across tab switches */
927
- persistOpenState?: boolean;
928
- }
929
- /**
930
- * Props for the DialogPortal component
931
- * @public
932
- */
933
- interface DialogPortalProps {
934
- children: React$1.ReactNode;
935
- }
936
- /**
937
- * Props for the DialogHeader component (semantic header element)
938
- * @public
939
- */
940
- interface DialogHeaderProps extends React$1.HTMLAttributes<HTMLElement> {
941
- /** Whether this header should be sticky when scrolling is enabled */
942
- sticky?: boolean;
943
- }
944
- /**
945
- * Props for the DialogFooter component (semantic footer element)
946
- * @public
947
- */
948
- interface DialogFooterProps extends React$1.HTMLAttributes<HTMLElement> {
949
- /** Whether this footer should be sticky when scrolling is enabled */
950
- sticky?: boolean;
951
- }
952
- /**
953
- * Props for the DialogBody component (semantic main element)
954
- * @public
955
- */
956
- interface DialogBodyProps extends React$1.HTMLAttributes<HTMLElement> {
957
- /** Custom max height for the scrollable area */
958
- maxHeight?: string;
959
- /** HTML content to render (will be sanitized for security) */
960
- htmlContent?: string;
961
- /** Whether to allow HTML content rendering (default: true) */
962
- allowHtml?: boolean;
963
- /** Whether to log HTML sanitization warnings to console (default: false) */
964
- logWarnings?: boolean;
965
- }
966
- /**
967
- * Props for the DialogTitle component
968
- * @public
969
- */
970
- interface DialogTitleProps extends React$1.HTMLAttributes<HTMLHeadingElement> {
971
- /** HTML content to render as title (will be sanitized for security) */
972
- htmlContent?: string;
973
- /** Whether to allow HTML content rendering (default: true) */
974
- allowHtml?: boolean;
975
- }
976
- /**
977
- * Props for the DialogDescription component
978
- * @public
979
- */
980
- interface DialogDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
981
- /** HTML content to render as description (will be sanitized for security) */
982
- htmlContent?: string;
983
- /** Whether to allow HTML content rendering (default: true) */
984
- allowHtml?: boolean;
985
- }
986
- /**
987
- * Dialog root component
988
- * Provides context for dialog state management
989
- */
990
- declare const Dialog: React$1.NamedExoticComponent<DialogProps>;
991
- /**
992
- * DialogTrigger component
993
- * Opens the dialog when clicked
994
- */
995
- declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogTriggerProps & React$1.RefAttributes<HTMLElement>>;
996
- /**
997
- * DialogPortal component
998
- * Portals dialog content to document.body
999
- */
1000
- declare const DialogPortal: React$1.FC<DialogPortalProps>;
1001
- /**
1002
- * DialogContent component
1003
- * The main content container using semantic HTML <dialog> element with enhanced features
1004
- *
1005
- * @param props - Content configuration and styling
1006
- * @param ref - Forwarded ref to the dialog element
1007
- * @returns JSX.Element - The semantic dialog content with overlay and optional close button
1008
- */
1009
- declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDialogElement>>;
1010
- /**
1011
- * Props for the DialogClose component
1012
- * @public
1013
- */
1014
- interface DialogCloseProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
1015
- /** Whether to merge props with child element instead of rendering a button */
1016
- asChild?: boolean;
1017
- }
1018
- /**
1019
- * DialogClose component
1020
- * Button to close the dialog
1021
- */
1022
- declare const DialogClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
1023
- /**
1024
- * DialogHeader component
1025
- * Semantic header container for dialog title and description with optional sticky behavior
1026
- */
1027
- declare const DialogHeader: {
1028
- ({ className, sticky, ...props }: DialogHeaderProps): react_jsx_runtime.JSX.Element;
1029
- displayName: string;
1030
- };
1031
- /**
1032
- * DialogBody component
1033
- * Semantic main content area for dialog body content with scrollable functionality
1034
- */
1035
- declare const DialogBody: {
1036
- ({ className, maxHeight, style, htmlContent, allowHtml, logWarnings, children, ...props }: DialogBodyProps): react_jsx_runtime.JSX.Element;
1037
- displayName: string;
1038
- };
1039
- /**
1040
- * DialogFooter component
1041
- * Semantic footer container for dialog action buttons with optional sticky behavior
1042
- */
1043
- declare const DialogFooter: {
1044
- ({ className, sticky, ...props }: DialogFooterProps): react_jsx_runtime.JSX.Element;
1045
- displayName: string;
1046
- };
1047
- /**
1048
- * DialogTitle component
1049
- * Title element with ARIA support
1050
- */
1051
- declare const DialogTitle: React$1.ForwardRefExoticComponent<DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>>;
1052
- /**
1053
- * DialogDescription component
1054
- * Description element with ARIA support
1055
- */
1056
- declare const DialogDescription: React$1.ForwardRefExoticComponent<DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
1057
-
1058
- /**
1059
- * Direction for Select dropdown opening.
1060
- * Controls whether the dropdown opens upward or downward.
1061
- */
1062
- type SelectDirection = "up" | "down";
1063
- /**
1064
- * Props for the useSelectState hook.
1065
- */
1066
- interface UseSelectStateProps {
1067
- value?: string;
1068
- defaultValue?: string;
1069
- selectedText?: string;
1070
- open?: boolean;
1071
- defaultOpen?: boolean;
1072
- disabled?: boolean;
1073
- onValueChange?: (value: string) => void;
1074
- onOpenChange?: (open: boolean) => void;
1075
- }
1076
- /**
1077
- * Props for the Select root component.
1078
- */
1079
- interface SelectProps extends Omit<React$1.HTMLAttributes<HTMLFieldSetElement>, "onChange" | "onKeyDown" | "onFocus" | "onBlur"> {
1080
- children: React$1.ReactNode;
1081
- className?: string;
1082
- direction?: SelectDirection;
1083
- showCheckmark?: boolean;
1084
- }
1085
- /**
1086
- * Props for the SelectTrigger component.
1087
- */
1088
- interface SelectTriggerProps extends Omit<ButtonProps, "onClick" | "onKeyDown"> {
1089
- children: React$1.ReactNode;
1090
- asChild?: boolean;
1091
- /** Whether to show the chevron icon. Defaults to true. */
1092
- showChevron?: boolean;
1093
- }
1094
- /**
1095
- * Props for the SelectValue component.
1096
- */
1097
- interface SelectValueProps {
1098
- placeholder?: string;
1099
- children?: React$1.ReactNode;
1100
- className?: string;
1101
- }
1102
- /**
1103
- * Props for the SelectContent component.
1104
- */
1105
- interface SelectContentProps {
1106
- children: React$1.ReactNode;
1107
- className?: string;
1108
- searchable?: boolean;
1109
- searchPlaceholder?: string;
1110
- maxHeight?: string;
1111
- style?: React$1.CSSProperties;
1112
- }
1113
- /**
1114
- * Props for the SelectItem component.
1115
- */
1116
- interface SelectItemProps {
1117
- value: string;
1118
- children: React$1.ReactNode;
1119
- disabled?: boolean;
1120
- className?: string;
1121
- onClick?: (e: React$1.MouseEvent) => void;
1122
- showCheckmark?: boolean;
1123
- }
1124
-
1125
- /**
1126
- * @file Select Component - Refactored SOLID Implementation
1127
- * @package @jmruthers/pace-core
1128
- * @module Components/Select
1129
- * @since 0.4.0
1130
- *
1131
- * Refactored Select component following SOLID principles:
1132
- * - Single Responsibility: Each component has one clear purpose
1133
- * - Open/Closed: Easy to extend without modification
1134
- * - Liskov Substitution: Components can be substituted
1135
- * - Interface Segregation: Small, focused interfaces
1136
- * - Dependency Inversion: Depends on abstractions, not concretions
1137
- */
1138
-
1139
- /**
1140
- * Select component root.
1141
- * Provides select dropdown functionality with search, keyboard navigation, and accessibility.
1142
- *
1143
- * @param props - Select configuration
1144
- * @param ref - Forwarded ref to the fieldset element
1145
- * @returns The rendered select component
1146
- */
1147
- declare const Select: React$1.ForwardRefExoticComponent<SelectProps & UseSelectStateProps & React$1.RefAttributes<HTMLFieldSetElement>>;
1148
- /**
1149
- * Select trigger button component.
1150
- * Opens/closes the select dropdown and displays the selected value.
1151
- *
1152
- * @param props - Select trigger configuration
1153
- * @param ref - Forwarded ref to the button element
1154
- * @returns The rendered select trigger
1155
- */
1156
- declare const SelectTrigger: React$1.ForwardRefExoticComponent<SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1157
- /**
1158
- * Select value display component.
1159
- * Shows the selected value or placeholder text.
1160
- *
1161
- * @param props - Select value configuration
1162
- * @param ref - Forwarded ref to the span element
1163
- * @returns The rendered select value display
1164
- */
1165
- declare const SelectValue: React$1.ForwardRefExoticComponent<SelectValueProps & React$1.RefAttributes<HTMLSpanElement>>;
1166
- /**
1167
- * Select content/dropdown component.
1168
- * Contains the list of selectable options.
1169
- *
1170
- * @param props - Select content configuration
1171
- * @param ref - Forwarded ref to the list element
1172
- * @returns The rendered select content
1173
- */
1174
- declare const SelectContent: React$1.ForwardRefExoticComponent<SelectContentProps & React$1.RefAttributes<HTMLUListElement>>;
1175
- /**
1176
- * Select item component.
1177
- * Represents a single selectable option in the dropdown.
1178
- *
1179
- * @param props - Select item configuration
1180
- * @param ref - Forwarded ref to the list item element
1181
- * @returns The rendered select item
1182
- */
1183
- declare const SelectItem: React$1.ForwardRefExoticComponent<SelectItemProps & React$1.RefAttributes<HTMLLIElement>>;
1184
- /**
1185
- * Select group component.
1186
- * Groups related select items together using a nested list structure.
1187
- *
1188
- * @param props - Select group configuration
1189
- * @param ref - Forwarded ref to the ul element
1190
- * @returns The rendered select group
1191
- */
1192
- declare const SelectGroup: React$1.ForwardRefExoticComponent<{
1193
- children: React$1.ReactNode;
1194
- className?: string;
1195
- } & React$1.RefAttributes<HTMLUListElement>>;
1196
- /**
1197
- * Select label component.
1198
- * Provides a label for a group of select items.
1199
- *
1200
- * @param props - Select label configuration
1201
- * @param ref - Forwarded ref to the li element
1202
- * @returns The rendered select label
1203
- */
1204
- declare const SelectLabel: React$1.ForwardRefExoticComponent<{
1205
- children: React$1.ReactNode;
1206
- className?: string;
1207
- } & React$1.RefAttributes<HTMLLIElement>>;
1208
- /**
1209
- * Select separator component.
1210
- * Provides visual separation between groups of select items.
1211
- *
1212
- * @param props - Select separator configuration
1213
- * @param ref - Forwarded ref to the hr element
1214
- * @returns The rendered select separator
1215
- */
1216
- declare const SelectSeparator: React$1.ForwardRefExoticComponent<{
1217
- className?: string;
1218
- } & React$1.RefAttributes<HTMLHRElement>>;
1219
-
1220
- /**
1221
- * @file Tabs Component System
1222
- * @package @jmruthers/pace-core
1223
- * @module Components/Tabs
1224
- * @since 0.5.141
1225
- *
1226
- * A comprehensive tabs component system built on top of Radix UI primitives.
1227
- * Provides accessible tabbed interfaces with keyboard navigation and ARIA support.
1228
- *
1229
- * Features:
1230
- * - Controlled and uncontrolled modes
1231
- * - Keyboard navigation (arrow keys)
1232
- * - Accessible ARIA attributes
1233
- * - Customizable styling via className
1234
- * - Support for icons in triggers
1235
- * - Compound component pattern
1236
- *
1237
- * @example
1238
- * ```tsx
1239
- * // Basic tabs
1240
- * <Tabs defaultValue="tab1">
1241
- * <TabsList>
1242
- * <TabsTrigger value="tab1">Tab 1</TabsTrigger>
1243
- * <TabsTrigger value="tab2">Tab 2</TabsTrigger>
1244
- * </TabsList>
1245
- * <TabsContent value="tab1">Content 1</TabsContent>
1246
- * <TabsContent value="tab2">Content 2</TabsContent>
1247
- * </Tabs>
1248
- *
1249
- * // Controlled tabs
1250
- * <Tabs value={activeTab} onValueChange={setActiveTab}>
1251
- * <TabsList>
1252
- * <TabsTrigger value="transport">
1253
- * <Plane size={16} /> Transport
1254
- * </TabsTrigger>
1255
- * <TabsTrigger value="accommodation">
1256
- * <Building size={16} /> Accommodation
1257
- * </TabsTrigger>
1258
- * </TabsList>
1259
- * <TabsContent value="transport">
1260
- * <TransportPlanningView />
1261
- * </TabsContent>
1262
- * <TabsContent value="accommodation">
1263
- * <AccommodationPlanningView />
1264
- * </TabsContent>
1265
- * </Tabs>
1266
- * ```
1267
- *
1268
- * @accessibility
1269
- * - WCAG 2.1 AA compliant
1270
- * - Keyboard navigation (Arrow keys, Home, End)
1271
- * - Screen reader support with proper ARIA attributes
1272
- * - Focus management
1273
- * - Tab panel association
1274
- */
1275
-
1276
- interface TabsProps extends TabsPrimitive.TabsProps {
1277
- }
1278
- /**
1279
- * Tabs root component
1280
- * Provides the context for tab navigation and state management
1281
- *
1282
- * @component
1283
- * @example
1284
- * ```tsx
1285
- * <Tabs defaultValue="tab1">
1286
- * <TabsList>...</TabsList>
1287
- * <TabsContent value="tab1">...</TabsContent>
1288
- * </Tabs>
1289
- * ```
1290
- */
1291
- declare const Tabs: React$1.ForwardRefExoticComponent<TabsProps & React$1.RefAttributes<HTMLDivElement>>;
1292
- interface TabsListProps extends React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
1293
- }
1294
- /**
1295
- * TabsList component
1296
- * Container for tab triggers
1297
- *
1298
- * @component
1299
- * @example
1300
- * ```tsx
1301
- * <TabsList>
1302
- * <TabsTrigger value="tab1">Tab 1</TabsTrigger>
1303
- * <TabsTrigger value="tab2">Tab 2</TabsTrigger>
1304
- * </TabsList>
1305
- * ```
1306
- */
1307
- declare const TabsList: React$1.ForwardRefExoticComponent<TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
1308
- interface TabsTriggerProps extends Omit<React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>, 'asChild'>, Pick<ButtonProps, 'variant' | 'size'> {
1309
- }
1310
- /**
1311
- * TabsTrigger component
1312
- * Individual tab button that activates a tab panel
1313
- *
1314
- * Uses Button component internally, allowing Button props (variant, size) to be passed through.
1315
- *
1316
- * @component
1317
- * @example
1318
- * ```tsx
1319
- * <TabsTrigger value="tab1">Tab 1</TabsTrigger>
1320
- *
1321
- * // With icon
1322
- * <TabsTrigger value="transport">
1323
- * <Plane size={16} /> Transport
1324
- * </TabsTrigger>
1325
- *
1326
- * // With Button variant
1327
- * <TabsTrigger value="tab1" variant="outline" size="sm">
1328
- * Tab 1
1329
- * </TabsTrigger>
1330
- * ```
1331
- */
1332
- declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1333
- interface TabsContentProps extends React$1.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
1334
- }
1335
- /**
1336
- * TabsContent component
1337
- * Container for tab panel content
1338
- *
1339
- * @component
1340
- * @example
1341
- * ```tsx
1342
- * <TabsContent value="tab1">
1343
- * <section>Content for tab 1</section>
1344
- * </TabsContent>
1345
- * ```
1346
- */
1347
- declare const TabsContent: React$1.ForwardRefExoticComponent<TabsContentProps & React$1.RefAttributes<HTMLDivElement>>;
1348
-
1349
- /**
1350
- * @file Calendar Component
1351
- * @package @jmruthers/pace-core
1352
- * @module Components/Calendar
1353
- * @since 0.5.141
1354
- *
1355
- * A date picker calendar component built on react-day-picker.
1356
- * Provides accessible date selection with keyboard navigation and ARIA support.
1357
- *
1358
- * Features:
1359
- * - Single, range, and multiple date selection modes
1360
- * - Date disabling (past dates, weekends, etc.)
1361
- * - Localization support (defaults to Australian locale with Monday as first day of week)
1362
- * - Keyboard navigation
1363
- * - Accessible date selection
1364
- * - Customizable styling
1365
- *
1366
- * @example
1367
- * ```tsx
1368
- * // Single date selection
1369
- * <Calendar
1370
- * mode="single"
1371
- * selected={date}
1372
- * onSelect={setDate}
1373
- * />
1374
- *
1375
- * // Date range selection
1376
- * <Calendar
1377
- * mode="range"
1378
- * selected={dateRange}
1379
- * onSelect={setDateRange}
1380
- * />
1381
- *
1382
- * // Multiple date selection
1383
- * <Calendar
1384
- * mode="multiple"
1385
- * selected={dates}
1386
- * onSelect={setDates}
1387
- * />
1388
- *
1389
- * // With disabled dates
1390
- * <Calendar
1391
- * mode="single"
1392
- * selected={date}
1393
- * onSelect={setDate}
1394
- * disabled={(date) => date < new Date()}
1395
- * />
1396
- * ```
1397
- *
1398
- * @accessibility
1399
- * - WCAG 2.1 AA compliant
1400
- * - Keyboard navigation (Arrow keys, Page Up/Down, Home, End)
1401
- * - Screen reader support with proper ARIA attributes
1402
- * - Focus management
1403
- * - Date announcements
1404
- */
1405
-
1406
- /**
1407
- * Props for the Calendar component.
1408
- * Extends DayPickerProps with pace-core specific customizations.
1409
- */
1410
- interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames' | 'styles' | 'onSelect'> {
1411
- /**
1412
- * Additional CSS classes to apply to the calendar table
1413
- */
1414
- className?: string;
1415
- /**
1416
- * Custom classNames for DayPicker sub-components
1417
- */
1418
- classNames?: DayPickerProps['classNames'];
1419
- /**
1420
- * Currently selected value; mirrors DayPicker's `selected` prop so callers
1421
- * can control the selection state.
1422
- */
1423
- selected?: Date | Date[] | DateRange | undefined;
1424
- /**
1425
- * Date selection handler. Signature depends on mode:
1426
- * - mode="single": (date: Date | undefined) => void
1427
- * - mode="range": (range: { from: Date; to?: Date } | undefined) => void
1428
- * - mode="multiple": (dates: Date[]) => void
1429
- */
1430
- onSelect?: ((date: Date | undefined) => void) | ((range: {
1431
- from: Date;
1432
- to?: Date;
1433
- } | undefined) => void) | ((dates: Date[]) => void);
1434
- }
1435
- /**
1436
- * Calendar component
1437
- * A flexible, accessible calendar component for date selection.
1438
- * Built on react-day-picker with pace-core styling.
1439
- *
1440
- * Defaults to Australian locale (en-AU) with Monday as the first day of the week.
1441
- * The locale can be overridden by passing a `locale` prop.
1442
- *
1443
- * Month navigation is automatically managed internally when `month` and `onMonthChange` props
1444
- * are not provided. The displayed month will sync with the selected date when available,
1445
- * or default to the current month. Navigation buttons (prev/next) work automatically.
1446
- *
1447
- * For controlled month state, pass `month` and `onMonthChange` props.
1448
- *
1449
- * @param props - Calendar configuration and styling
1450
- * @param ref - Forwarded ref (not used directly, but maintained for API consistency)
1451
- * @returns JSX.Element - The rendered calendar element
1452
- *
1453
- * @example
1454
- * ```tsx
1455
- * // Single date selection (uses default Australian locale)
1456
- * <Calendar
1457
- * mode="single"
1458
- * selected={date}
1459
- * onSelect={setDate}
1460
- * />
1461
- *
1462
- * // With disabled dates
1463
- * <Calendar
1464
- * mode="single"
1465
- * selected={date}
1466
- * onSelect={setDate}
1467
- * disabled={(date) => date < new Date()}
1468
- * />
1469
- *
1470
- * // Override locale (e.g., US locale with Sunday as first day)
1471
- * import { enUS } from 'date-fns/locale';
1472
- * <Calendar
1473
- * mode="single"
1474
- * selected={date}
1475
- * onSelect={setDate}
1476
- * locale={enUS}
1477
- * />
1478
- *
1479
- * // Controlled month state (optional - month is auto-managed if not provided)
1480
- * const [month, setMonth] = useState(new Date());
1481
- * <Calendar
1482
- * mode="single"
1483
- * selected={date}
1484
- * onSelect={setDate}
1485
- * month={month}
1486
- * onMonthChange={setMonth}
1487
- * />
1488
- * ```
1489
- */
1490
- declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<HTMLTableElement>>;
1491
-
1492
- /**
1493
- * @file DatePickerWithTimezone Component
1494
- * @package @jmruthers/pace-core
1495
- * @module Components/DatePickerWithTimezone
1496
- * @since 0.1.0
1497
- *
1498
- * Date picker component that displays timezone information alongside the calendar.
1499
- * Provides a calendar interface with timezone context for date selection.
1500
- *
1501
- * Features:
1502
- * - Calendar date selection with dropdown month/year navigation
1503
- * - Timezone display (shows "Local" when matches user timezone)
1504
- * - Optional "Done" button
1505
- * - Accessible date selection
1506
- * - Keyboard navigation support
1507
- * - Wide date range support (1900-2100) via dropdown selectors
1508
- *
1509
- * @example
1510
- * ```tsx
1511
- * import { DatePickerWithTimezone } from '@jmruthers/pace-core/components';
1512
- * import { useState } from 'react';
1513
- *
1514
- * function DateSelector() {
1515
- * const [date, setDate] = useState<Date>();
1516
- *
1517
- * return (
1518
- * <DatePickerWithTimezone
1519
- * selected={date}
1520
- * onSelect={setDate}
1521
- * timezone="America/New_York"
1522
- * onDone={() => console.log('Date selected')}
1523
- * />
1524
- * );
1525
- * }
1526
- * ```
1527
- *
1528
- * @accessibility
1529
- * - WCAG 2.1 AA compliant
1530
- * - Keyboard navigation support
1531
- * - Screen reader friendly
1532
- * - Focus management
1533
- * - Proper ARIA attributes
1534
- */
1535
- /**
1536
- * Props for the DatePickerWithTimezone component
1537
- */
1538
- interface DatePickerWithTimezoneProps {
1539
- /**
1540
- * Currently selected date
1541
- */
1542
- selected?: Date;
1543
- /**
1544
- * Date selection handler
1545
- */
1546
- onSelect: (date: Date | undefined) => void;
1547
- /**
1548
- * Optional callback when "Done" button is clicked
1549
- */
1550
- onDone?: () => void;
1551
- /**
1552
- * Timezone to display (defaults to user's timezone)
1553
- */
1554
- timezone?: string;
1555
- /**
1556
- * Additional CSS classes
1557
- */
1558
- className?: string;
1559
- }
1560
- /**
1561
- * DatePickerWithTimezone component
1562
- * Date picker with timezone information display
1563
- *
1564
- * @param props - DatePickerWithTimezone configuration
1565
- * @returns JSX.Element - The rendered date picker with timezone
1566
- */
1567
- declare function DatePickerWithTimezone({ selected, onSelect, onDone, timezone, className }: DatePickerWithTimezoneProps): react_jsx_runtime.JSX.Element;
1568
-
1569
- declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
1570
- /**
1571
- * ToastViewport component
1572
- * Container for all toast notifications with customizable positioning
1573
- *
1574
- * @param props - Viewport configuration and styling
1575
- * @param ref - Forwarded ref to the viewport element
1576
- * @returns JSX.Element - The toast viewport container
1577
- */
1578
- declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
1579
- /**
1580
- * Toast component
1581
- * The main toast notification component with animations and interactions
1582
- *
1583
- * @param props - Toast configuration and content
1584
- * @param ref - Forwarded ref to the toast element
1585
- * @returns JSX.Element - The rendered toast notification
1586
- *
1587
- * @example
1588
- * ```tsx
1589
- * <Toast>
1590
- * <ToastTitle>Success!</ToastTitle>
1591
- * <ToastDescription>Your changes have been saved.</ToastDescription>
1592
- * <ToastClose />
1593
- * </Toast>
1594
- * ```
1595
- */
1596
- declare const Toast: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
1597
- /**
1598
- * ToastAction component
1599
- * Action button within a toast notification
1600
- *
1601
- * @param props - Action button configuration
1602
- * @param ref - Forwarded ref to the action button
1603
- * @returns JSX.Element - The action button element
1604
- *
1605
- * @example
1606
- * ```tsx
1607
- * <ToastAction altText="Undo changes">Undo</ToastAction>
1608
- * ```
1609
- */
1610
- declare const ToastAction: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1611
- /**
1612
- * ToastClose component
1613
- * Close button for dismissing toast notifications
1614
- *
1615
- * @param props - Close button configuration
1616
- * @param ref - Forwarded ref to the close button
1617
- * @returns JSX.Element - The close button with X icon
1618
- *
1619
- * @example
1620
- * ```tsx
1621
- * <ToastClose />
1622
- * ```
1623
- */
1624
- declare const ToastClose: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1625
- /**
1626
- * ToastTitle component
1627
- * Title text for toast notifications
1628
- *
1629
- * @param props - Title configuration and styling
1630
- * @param ref - Forwarded ref to the title element
1631
- * @returns JSX.Element - The toast title
1632
- *
1633
- * @example
1634
- * ```tsx
1635
- * <ToastTitle>Success!</ToastTitle>
1636
- * ```
1637
- */
1638
- declare const ToastTitle: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1639
- /**
1640
- * ToastDescription component
1641
- * Description text for toast notifications
1642
- *
1643
- * @param props - Description configuration and styling
1644
- * @param ref - Forwarded ref to the description element
1645
- * @returns JSX.Element - The toast description
1646
- *
1647
- * @example
1648
- * ```tsx
1649
- * <ToastDescription>Your changes have been saved successfully.</ToastDescription>
1650
- * ```
1651
- */
1652
- declare const ToastDescription: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1653
- interface ToastProps extends React$1.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> {
1654
- }
1655
- /**
1656
- * Type for toast action elements.
1657
- * Represents a React element that can be used as a toast action button.
1658
- */
1659
- interface ToastActionElement extends React$1.ReactElement<typeof ToastAction> {
1660
- }
1661
- /**
1662
- * Toaster component
1663
- * Container component that renders actual toast notifications
1664
- * Should be placed at the root of your application
1665
- *
1666
- * @returns JSX.Element - The toast provider with viewport and rendered toasts
1667
- *
1668
- * @example
1669
- * ```tsx
1670
- * function App() {
1671
- * return (
1672
- * <ToastProvider>
1673
- * <YourApp />
1674
- * <Toaster />
1675
- * </ToastProvider>
1676
- * );
1677
- * }
1678
- * ```
1679
- */
1680
- declare function Toaster(): react_jsx_runtime.JSX.Element;
1681
-
1682
- /**
1683
- * @file Tooltip Component System
1684
- * @package @jmruthers/pace-core
1685
- * @module Components/Tooltip
1686
- * @since 0.1.0
1687
- *
1688
- * A comprehensive tooltip component system built on top of Radix UI primitives.
1689
- * Provides accessible tooltips with customizable positioning and animations.
1690
- *
1691
- * Features:
1692
- * - Multiple positioning options (top, bottom, left, right)
1693
- * - Customizable delay duration
1694
- * - Smooth animations and transitions
1695
- * - Keyboard and mouse interaction
1696
- * - Screen reader support
1697
- * - Responsive design
1698
- * - Customizable styling
1699
- * - Focus management
1700
- *
1701
- * @example
1702
- * ```tsx
1703
- * // Basic tooltip
1704
- * <Tooltip content="This is a helpful tooltip">
1705
- * <Button>Hover me</Button>
1706
- * </Tooltip>
1707
- *
1708
- * // Tooltip with custom delay
1709
- * <Tooltip content="Custom delay" delayDuration={500}>
1710
- * <IconButton icon={<Info />} />
1711
- * </Tooltip>
1712
- *
1713
- * // Advanced tooltip with custom content
1714
- * <TooltipProvider>
1715
- * <TooltipRoot>
1716
- * <TooltipTrigger asChild>
1717
- * <Button>Advanced Tooltip</Button>
1718
- * </TooltipTrigger>
1719
- * <TooltipContent side="top" className="bg-main-500 text-main-50">
1720
- * <section className="space-y-1">
1721
- * <p className="font-semibold">Advanced Tooltip</p>
1722
- * <p className="text-xs">With custom styling</p>
1723
- * </section>
1724
- * </TooltipContent>
1725
- * </TooltipRoot>
1726
- * </TooltipProvider>
1727
- *
1728
- * // Tooltip on disabled element
1729
- * <Tooltip content="This feature is coming soon">
1730
- * <Button disabled>Coming Soon</Button>
1731
- * </Tooltip>
1732
- * ```
1733
- *
1734
- * @accessibility
1735
- * - WCAG 2.1 AA compliant
1736
- * - Proper ARIA attributes and roles
1737
- * - Keyboard navigation support
1738
- * - Screen reader announcements
1739
- * - Focus management
1740
- * - High contrast support
1741
- * - Reduced motion support
1742
- *
1743
- * @performance
1744
- * - Efficient positioning calculations
1745
- * - Optimized animations
1746
- * - Memory leak prevention
1747
- * - Lazy rendering
1748
- *
1749
- * @dependencies
1750
- * - @radix-ui/react-tooltip - Core tooltip functionality
1751
- * - React 19+ - Hooks and refs
1752
- * - Tailwind CSS - Styling and animations
1753
- */
1754
-
1755
- declare const TooltipProvider: React$1.FC<TooltipPrimitive.TooltipProviderProps>;
1756
- declare const TooltipRoot: React$1.FC<TooltipPrimitive.TooltipProps>;
1757
- declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1758
- /**
1759
- * TooltipContent component
1760
- * The content container for tooltip information
1761
- *
1762
- * @param props - Content configuration and styling
1763
- * @param ref - Forwarded ref to the content element
1764
- * @returns JSX.Element - The tooltip content container
1765
- *
1766
- * @example
1767
- * ```tsx
1768
- * <TooltipContent side="top" className="bg-main-500">
1769
- * Custom tooltip content
1770
- * </TooltipContent>
1771
- * ```
1772
- */
1773
- declare const TooltipContent: React$1.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1774
- /**
1775
- * Props for the simplified Tooltip component
1776
- */
1777
- interface TooltipProps {
1778
- /** The element that triggers the tooltip */
1779
- children: React$1.ReactNode;
1780
- /** The content to display in the tooltip */
1781
- content: React$1.ReactNode;
1782
- /** Delay before showing the tooltip (in milliseconds) */
1783
- delayDuration?: number;
1784
- }
1785
- /**
1786
- * Tooltip component
1787
- * A simplified tooltip component for easy usage
1788
- *
1789
- * @param props - Tooltip configuration
1790
- * @param ref - Forwarded ref to the trigger element
1791
- * @returns JSX.Element - The tooltip with trigger and content
1792
- *
1793
- * @example
1794
- * ```tsx
1795
- * <Tooltip content="This is a helpful tooltip">
1796
- * <Button>Hover me</Button>
1797
- * </Tooltip>
1798
- * ```
1799
- */
1800
- declare const Tooltip: React$1.ForwardRefExoticComponent<TooltipProps & React$1.RefAttributes<HTMLButtonElement>>;
1801
-
1802
- /**
1803
- * Configuration interface for customizing ImportModal text content
1804
- * @public
1805
- */
1806
- interface ImportModalConfig {
1807
- /** Custom title for the import modal */
1808
- title?: string;
1809
- /** Custom description text shown below the title */
1810
- description?: string;
1811
- /** Custom text shown in the file upload area when no file is selected */
1812
- uploadText?: string;
1813
- /** Custom text for the file selection button */
1814
- selectFileButtonText?: string;
1815
- /** Custom text for the import button */
1816
- importButtonText?: string;
1817
- /** Custom text for the import button when processing */
1818
- importButtonProcessingText?: string;
1819
- /** Custom text for the cancel button */
1820
- cancelButtonText?: string;
1821
- /** Custom text for the preview section header */
1822
- previewHeaderText?: string;
1823
- /** Custom text pattern for total rows display. Use {count} as placeholder for the actual count */
1824
- totalRowsText?: string;
1825
- }
1826
-
1827
- /**
1828
- * Enhanced DataTable props with performance features
1829
- * @template TData - The type of data records in the table
1830
- */
1831
- interface DataTableProps<TData extends DataRecord> {
1832
- /** Array of data records to display in the table */
1833
- data: TData[];
1834
- /** Column definitions for the table */
1835
- columns: DataTableColumn<TData>[];
1836
- /** RBAC configuration - REQUIRED for all DataTables */
1837
- rbac: DataTableRBACConfig;
1838
- /** Optional title displayed above the table */
1839
- title?: string;
1840
- /** Optional description displayed below the title */
1841
- description?: string;
1842
- /** Visual variant of the table */
1843
- variant?: 'default' | 'compact' | 'spacious';
1844
- /** Additional CSS classes for the table container */
1845
- className?: string;
1846
- /** Feature configuration - all features are disabled by default */
1847
- features?: DataTableFeatureConfig;
1848
- /** Hierarchical parent/child row configuration */
1849
- hierarchical?: HierarchicalConfig;
1850
- /** Performance optimization configuration */
1851
- performance?: PerformanceConfig;
1852
- /** Server-side data fetching configuration */
1853
- serverSide?: ServerSideConfig<TData>;
1854
- /** Override automatic pagination mode detection */
1855
- paginationMode?: PaginationMode;
1856
- /** Data chunking configuration for memory optimization */
1857
- chunking?: ChunkingConfig;
1858
- /** Search indexing configuration for fast search */
1859
- searchIndex?: SearchIndexConfig;
1860
- /** Virtual scrolling height */
1861
- virtualHeight?: number;
1862
- /** Initial page size for pagination */
1863
- initialPageSize?: number;
1864
- /** Initial grouping configuration - columns to group by on load */
1865
- defaultGrouping?: string[];
1866
- /** Initial sorting configuration - sort state to apply on load */
1867
- defaultSorting?: Array<{
1868
- id: string;
1869
- desc: boolean;
1870
- }>;
1871
- /** Enable enhanced pagination controls */
1872
- enhancedPagination?: boolean;
1873
- /** Custom loading component */
1874
- loadingComponent?: React__default.ComponentType;
1875
- /** Custom error component */
1876
- errorComponent?: React__default.ComponentType<{
1877
- error: Error;
1878
- retry: () => void;
1879
- }>;
1880
- /** Callback when a row is edited */
1881
- onEditRow?: (row: TData, data: Partial<TData>) => void;
1882
- /** Callback when a row is deleted */
1883
- onDeleteRow?: (row: TData) => void;
1884
- /** Callback when a new row is created */
1885
- onCreateRow?: (data: Partial<TData>) => void;
1886
- /** Callback when data is imported */
1887
- onImport?: (data: TData[]) => void | Promise<void>;
1888
- /** Callback for custom export functionality */
1889
- onExport?: (options: ExportOptions<TData>) => void | Promise<void>;
1890
- /** Callback when row selection changes */
1891
- onRowSelectionChange?: (selection: Record<string, boolean>) => void;
1892
- /** Controlled selection state */
1893
- selection?: Record<string, boolean>;
1894
- /** Callback when bulk delete selected rows is triggered */
1895
- onDeleteSelected?: (selectedRows: Record<string, boolean>) => void;
1896
- /** Function to generate unique row IDs */
1897
- getRowId?: GetRowId<TData>;
1898
- /** Whether the table is in a loading state */
1899
- isLoading?: boolean;
1900
- /** Custom component to display when table is empty */
1901
- emptyState?: EmptyStateConfig | React__default.ReactElement;
1902
- /** Array of aggregation functions for grouped data */
1903
- aggregates?: AggregateConfig[];
1904
- /** Import modal configuration */
1905
- importModalConfig?: ImportModalConfig;
1906
- /** Custom row actions - use this for custom action buttons */
1907
- actions?: DataTableAction<TData>[];
1908
- /** Column order configuration - array of column IDs in desired order */
1909
- columnOrder?: string[];
1910
- /** Unique storage key for persisting table layout state across sessions */
1911
- storageKey?: string;
1912
- /** Callback when table layout changes (column order, visibility, etc.) */
1913
- onLayoutChange?: (layout: {
1914
- columnOrder: string[];
1915
- columnVisibility: Record<string, boolean>;
1916
- }) => void;
1917
- }
1918
- /**
1919
- * Enhanced DataTable with comprehensive performance optimizations
1920
- *
1921
- * This component automatically detects dataset size and applies appropriate performance optimizations:
1922
- * - < 1,000 records: Standard rendering with full feature support
1923
- * - 1,000+ records: Automatic virtual scrolling with intelligent memory management
1924
- * - 10,000+ records: Enhanced chunking and memory optimization
1925
- * - 100,000+ records: Advanced server-side processing with virtualization
1926
- *
1927
- * Features are configured through the unified `features` prop for maximum flexibility.
1928
- */
1929
- /**
1930
- * Enhanced DataTable component with performance optimizations and comprehensive features.
1931
- *
1932
- * This is the main entry point for the DataTable component. It wraps DataTableCore
1933
- * and provides feature normalization and validation.
1934
- *
1935
- * @template TData - The type of data records in the table
1936
- * @param props - DataTable configuration including data, columns, features, and RBAC
1937
- * @returns The rendered DataTable component
1938
- *
1939
- * @example
1940
- * ```tsx
1941
- * <DataTable
1942
- * data={users}
1943
- * columns={userColumns}
1944
- * rbac={{ pageId: 'user-management' }}
1945
- * features={{
1946
- * search: true,
1947
- * pagination: true,
1948
- * sorting: true
1949
- * }}
1950
- * />
1951
- * ```
1952
- */
1953
- /**
1954
- * Comprehensive, feature-rich data table component built on top of TanStack Table.
1955
- * Provides advanced data management capabilities with a clean, accessible interface.
1956
- *
1957
- * @template TData - The type of data records in the table
1958
- * @param props - DataTable configuration and props
1959
- * @returns The rendered DataTable component
1960
- */
1961
- declare function DataTable<TData extends DataRecord>(props: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
1962
-
1963
- /**
1964
- * Props for the Form component
1965
- */
1966
- interface FormProps<TFieldValues extends FieldValues = FieldValues> {
1967
- /**
1968
- * Form schema for validation
1969
- */
1970
- schema?: z.ZodType<TFieldValues>;
1971
- /**
1972
- * Default values for the form
1973
- */
1974
- defaultValues?: DefaultValues<TFieldValues>;
1975
- /**
1976
- * Handler called when form is submitted successfully
1977
- */
1978
- onSubmit: SubmitHandler<TFieldValues>;
1979
- /**
1980
- * Handler called when form submission has errors
1981
- */
1982
- onError?: SubmitErrorHandler<TFieldValues>;
1983
- /**
1984
- * Form mode for react-hook-form
1985
- * @default "onSubmit"
1986
- */
1987
- mode?: "onSubmit" | "onChange" | "onBlur" | "onTouched" | "all";
1988
- /**
1989
- * Children components or render function
1990
- */
1991
- children: React__default.ReactNode | ((methods: UseFormReturn<TFieldValues>) => React__default.ReactNode);
1992
- /**
1993
- * Class name for the form
1994
- */
1995
- className?: string;
1996
- }
1997
- /**
1998
- * Form component with validation and React Hook Form integration
1999
- *
2000
- * @template TFieldValues - The type of form field values
2001
- * @param props - Form configuration and handlers
2002
- * @returns JSX.Element - The rendered form with FormProvider context
2003
- *
2004
- * @example
2005
- * ```tsx
2006
- * <Form
2007
- * schema={userSchema}
2008
- * defaultValues={{ name: "", email: "" }}
2009
- * onSubmit={handleSubmit}
2010
- * mode="onBlur"
2011
- * >
2012
- * <FormField name="name" label="Name" />
2013
- * <FormField name="email" label="Email" />
2014
- * <Button type="submit">Submit</Button>
2015
- * </Form>
2016
- * ```
2017
- */
2018
- declare function Form<TFieldValues extends FieldValues = FieldValues>({ schema, defaultValues, onSubmit, onError, mode, children, className, }: FormProps<TFieldValues>): react_jsx_runtime.JSX.Element;
2019
- /**
2020
- * Props for the FormField component
2021
- */
2022
- interface FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
2023
- /**
2024
- * Field name
2025
- */
2026
- name: TName;
2027
- /**
2028
- * Field label
2029
- */
2030
- label?: string;
2031
- /**
2032
- * Field type
2033
- */
2034
- type?: string;
2035
- /**
2036
- * Placeholder text
2037
- */
2038
- placeholder?: string;
2039
- /**
2040
- * Additional props for the input
2041
- */
2042
- inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
2043
- /**
2044
- * Validation rules
2045
- */
2046
- validation?: {
2047
- required?: boolean;
2048
- pattern?: {
2049
- value: RegExp;
2050
- message: string;
2051
- };
2052
- minLength?: {
2053
- value: number;
2054
- message: string;
2055
- };
2056
- maxLength?: {
2057
- value: number;
2058
- message: string;
2059
- };
2060
- };
2061
- /**
2062
- * Custom render function
2063
- */
2064
- render?: (props: {
2065
- field: ControllerRenderProps<TFieldValues, TName>;
2066
- fieldState: ControllerFieldState;
2067
- formState: UseFormStateReturn<TFieldValues>;
2068
- }) => React__default.ReactElement;
2069
- /**
2070
- * Test ID
2071
- */
2072
- 'data-testid'?: string;
2073
- /**
2074
- * Class name
2075
- */
2076
- className?: string;
2077
- }
2078
- /**
2079
- * FormField component for React Hook Form integration
2080
- *
2081
- * A flexible form field component that integrates with React Hook Form and provides
2082
- * built-in validation, error handling, and accessibility features.
2083
- *
2084
- * Features:
2085
- * - React Hook Form integration with Controller
2086
- * - Built-in validation with error display
2087
- * - Accessible labels and error messages
2088
- * - Custom render function support
2089
- * - TypeScript support with generic field paths
2090
- * - Consistent styling with error states
2091
- * - Test ID support for testing
2092
- * - Flexible input types and props
2093
- *
2094
- * @template TFieldValues - The type of form field values
2095
- * @template TName - The type of the field name (must be a valid field path)
2096
- * @param props - Form field configuration and validation
2097
- * @returns JSX.Element - The rendered form field with validation
2098
- *
2099
- * @example
2100
- * ```tsx
2101
- * // Basic text field
2102
- * <FormField
2103
- * name="username"
2104
- * label="Username"
2105
- * placeholder="Enter your username"
2106
- * validation={{ required: true }}
2107
- * />
2108
- *
2109
- * // Email field with custom validation
2110
- * <FormField
2111
- * name="email"
2112
- * label="Email Address"
2113
- * type="email"
2114
- * validation={{
2115
- * required: true,
2116
- * pattern: {
2117
- * value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
2118
- * message: "Invalid email address"
2119
- * }
2120
- * }}
2121
- * />
2122
- *
2123
- * // Custom render function
2124
- * <FormField
2125
- * name="avatar"
2126
- * label="Profile Picture"
2127
- * render={({ field }) => (
2128
- * <input
2129
- * {...field}
2130
- * type="file"
2131
- * accept="image/*"
2132
- * />
2133
- * )}
2134
- * />
2135
- * ```
2136
- *
2137
- * @accessibility
2138
- * - Proper label association with htmlFor
2139
- * - Error messages with role="alert"
2140
- * - Required field indicators
2141
- * - Focus management
2142
- * - Screen reader friendly error announcements
2143
- * - Keyboard navigation support
2144
- */
2145
- declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, type, placeholder, inputProps, validation, render, 'data-testid': testId, className, }: FormFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
2146
-
2147
- /**
2148
- * @file LoginForm Component
2149
- * @package @jmruthers/pace-core
2150
- * @module Components/LoginForm
2151
- * @since 0.1.0
2152
- *
2153
- * A comprehensive login form component with built-in validation, error handling,
2154
- * and loading states for user authentication.
2155
- *
2156
- * Features:
2157
- * - Email and password validation
2158
- * - Loading states with disabled form
2159
- * - Error handling and display
2160
- * - Customizable branding and messaging
2161
- * - Sign-up link integration
2162
- * - Performance optimized with React.memo
2163
- * - Accessibility compliant
2164
- * - Responsive design
2165
- * - Form validation
2166
- * - Success and error callbacks
2167
- *
2168
- * @example
2169
- * ```tsx
2170
- * // Basic login form
2171
- * <LoginForm
2172
- * onSignIn={async (data) => {
2173
- * await signIn(data.email, data.password);
2174
- * }}
2175
- * onSuccess={() => navigate('/dashboard')}
2176
- * onError={(error) => console.error('Login failed:', error)}
2177
- * />
2178
- *
2179
- * // Login form with custom branding
2180
- * <LoginForm
2181
- * appName="My Application"
2182
- * title="Welcome Back"
2183
- * subtitle="Please sign in to access your account"
2184
- * onSignIn={handleSignIn}
2185
- * onSuccess={handleSuccess}
2186
- * onError={handleError}
2187
- * />
2188
- *
2189
- * // Login form with sign-up integration
2190
- * <LoginForm
2191
- * appName="My App"
2192
- * showSignUp={true}
2193
- * onSignUp={() => navigate('/signup')}
2194
- * onSignIn={handleSignIn}
2195
- * isLoading={isAuthenticating}
2196
- * />
2197
- *
2198
- * // Login form with custom error handling
2199
- * <LoginForm
2200
- * onSignIn={async (data) => {
2201
- * try {
2202
- * const result = await authService.signIn(data);
2203
- * if (result.success) {
2204
- * onSuccess();
2205
- * } else {
2206
- * throw new Error(result.error);
2207
- * }
2208
- * } catch (error) {
2209
- * onError(error);
2210
- * }
2211
- * }}
2212
- * onSuccess={() => {
2213
- * toast.success('Successfully signed in!');
2214
- * navigate('/dashboard');
2215
- * }}
2216
- * onError={(error) => {
2217
- * toast.error(`Sign in failed: ${error.message}`);
2218
- * }}
2219
- * />
2220
- * ```
2221
- *
2222
- * @accessibility
2223
- * - WCAG 2.1 AA compliant
2224
- * - Proper form labels and associations
2225
- * - Screen reader friendly error messages
2226
- * - Keyboard navigation support
2227
- * - Focus management
2228
- * - High contrast support
2229
- * - Clear error identification
2230
- *
2231
- * @performance
2232
- * - React.memo for efficient re-rendering
2233
- * - useCallback for stable event handlers
2234
- * - useMemo for computed values
2235
- * - Minimal re-renders
2236
- *
2237
- * @dependencies
2238
- * - React 19+ - Hooks and memo
2239
- * - Button component
2240
- * - Input component
2241
- * - Label component
2242
- * - Card components
2243
- * - Alert component
2244
- * - Tailwind CSS - Styling
2245
- */
2246
-
2247
- /**
2248
- * Props for the LoginForm component.
2249
- * Configures login form behavior, validation, and callbacks.
2250
- */
2251
- interface LoginFormProps {
2252
- /** Callback invoked when the form is submitted */
2253
- onSignIn: (data: {
2254
- email: string;
2255
- password: string;
2256
- }) => Promise<void>;
2257
- /** Callback invoked on successful sign-in */
2258
- onSuccess?: () => void;
2259
- /** Callback invoked if sign-in fails */
2260
- onError?: (error: Error) => void;
2261
- /** Show loading spinner and disable form while true */
2262
- isLoading?: boolean;
2263
- /** Application name for display in the form */
2264
- appName?: string;
2265
- /** Custom title for the form */
2266
- title?: string;
2267
- /** Custom subtitle for the form */
2268
- subtitle?: string;
2269
- /** Show a sign-up link or button */
2270
- showSignUp?: boolean;
2271
- /** Optional callback for sign-up button */
2272
- onSignUp?: () => void;
2273
- /** Additional CSS classes */
2274
- className?: string;
2275
- }
2276
- /**
2277
- * LoginForm component that provides a ready-to-use authentication form for user sign-in.
2278
- * It supports validation, loading state, error handling, and can be customized via props.
2279
- * Now includes performance optimizations and onSignUp support.
2280
- *
2281
- * @param props - Login form configuration and handlers
2282
- * @returns JSX.Element - The rendered login form
2283
- *
2284
- * @example
2285
- * ```tsx
2286
- * <LoginForm
2287
- * onSignIn={handleSignIn}
2288
- * onSuccess={() => navigate('/dashboard')}
2289
- * onError={(error) => toast.error(error.message)}
2290
- * isLoading={isAuthenticating}
2291
- * />
2292
- * ```
2293
- */
2294
- declare const LoginForm: React__default.NamedExoticComponent<LoginFormProps>;
2295
-
2296
- /**
2297
- * @file Unified Navigation Menu Component
2298
- * @package @jmruthers/pace-core
2299
- * @module Navigation
2300
- * @since 0.1.0
2301
- *
2302
- * A flexible navigation menu component that supports both dropdown and hierarchical modes.
2303
- *
2304
- * Features:
2305
- * - Dropdown mode: Menu button that opens a dropdown list
2306
- * - Hierarchical mode: Expandable tree navigation with nested items
2307
- * - Icon support for navigation items
2308
- * - Current page highlighting
2309
- * - Keyboard navigation support
2310
- * - Accessible design with proper ARIA attributes
2311
- * - Click outside to close (dropdown mode)
2312
- * - Recursive rendering for nested items (hierarchical mode)
2313
- *
2314
- * @example
2315
- * Basic dropdown navigation (most common use case):
2316
- * ```tsx
2317
- * import { NavigationMenu } from '@jmruthers/pace-core';
2318
- * import { useNavigate, useLocation } from 'react-router-dom';
2319
- *
2320
- * function AppNavigation() {
2321
- * const navigate = useNavigate();
2322
- * const location = useLocation();
2323
- *
2324
- * const navItems = [
2325
- * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
2326
- * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
2327
- * { id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },
2328
- * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
2329
- * ];
2330
- *
2331
- * return (
2332
- * <NavigationMenu
2333
- * items={navItems}
2334
- * mode="dropdown"
2335
- * currentPath={location.pathname}
2336
- * onNavigate={(item) => navigate(item.href)}
2337
- * buttonText="Main Menu"
2338
- * showIcons={true}
2339
- * />
2340
- * );
2341
- * }
2342
- *
2343
- * @example
2344
- * Hierarchical navigation with nested items:
2345
- * ```tsx
2346
- * import { NavigationMenu } from '@jmruthers/pace-core';
2347
- *
2348
- * function SidebarNavigation() {
2349
- * const hierarchicalItems = [
2350
- * {
2351
- * id: 'user-management',
2352
- * label: 'User Management',
2353
- * icon: 'Users',
2354
- * children: [
2355
- * { id: 'users-list', label: 'All Users', href: '/users' },
2356
- * { id: 'users-create', label: 'Create User', href: '/users/create' },
2357
- * { id: 'user-roles', label: 'User Roles', href: '/users/roles' }
2358
- * ]
2359
- * },
2360
- * {
2361
- * id: 'reports',
2362
- * label: 'Reports',
2363
- * icon: 'BarChart',
2364
- * children: [
2365
- * { id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },
2366
- * { id: 'user-reports', label: 'User Reports', href: '/reports/users' }
2367
- * ]
2368
- * },
2369
- * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
2370
- * ];
2371
- *
2372
- * return (
2373
- * <NavigationMenu
2374
- * items={hierarchicalItems}
2375
- * mode="hierarchical"
2376
- * currentPath={window.location.pathname}
2377
- * onNavigate={(item) => {
2378
- * if (item.href) {
2379
- * window.location.href = item.href;
2380
- * }
2381
- * }}
2382
- * className="w-64 bg-sec-50 p-4"
2383
- * />
2384
- * );
2385
- * }
2386
- * ```
2387
- *
2388
- * @example
2389
- * Integration with React Router and authentication:
2390
- * ```tsx
2391
- * import { NavigationMenu } from '@jmruthers/pace-core';
2392
- * import { useNavigate, useLocation } from 'react-router-dom';
2393
- * import { useUnifiedAuth } from '@jmruthers/pace-core/providers';
2394
- *
2395
- * function AuthenticatedNavigation() {
2396
- * const navigate = useNavigate();
2397
- * const location = useLocation();
2398
- * const { hasRole, hasPermission } = useUnifiedAuth();
2399
- *
2400
- * // Build navigation items based on user permissions
2401
- * const navItems = [
2402
- * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
2403
- * ...(hasPermission('meals:read') ? [
2404
- * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
2405
- * ] : []),
2406
- * ...(hasRole('admin') ? [
2407
- * { id: 'admin', label: 'Admin Panel', href: '/admin', icon: 'Shield' }
2408
- * ] : []),
2409
- * { id: 'profile', label: 'Profile', href: '/profile', icon: 'User' }
2410
- * ];
2411
- *
2412
- * return (
2413
- * <NavigationMenu
2414
- * items={navItems}
2415
- * mode="dropdown"
2416
- * currentPath={location.pathname}
2417
- * onNavigate={(item) => navigate(item.href)}
2418
- * buttonText="Navigation"
2419
- * navigationLabel="Main application navigation"
2420
- * />
2421
- * );
2422
- * }
2423
- * ```
2424
- *
2425
- * @example
2426
- * ```tsx
2427
- * // Custom navigation with external links and actions
2428
- * import { NavigationMenu } from '@jmruthers/pace-core';
2429
- *
2430
- * function CustomNavigation() {
2431
- * const handleNavigation = (item) => {
2432
- * if (item.id === 'logout') {
2433
- * // Handle logout action
2434
- * handleLogout();
2435
- * } else if (item.href?.startsWith('http')) {
2436
- * // Handle external links
2437
- * window.open(item.href, '_blank');
2438
- * } else if (item.href) {
2439
- * // Handle internal navigation
2440
- * navigate(item.href);
2441
- * }
2442
- * };
2443
- *
2444
- * const navItems = [
2445
- * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
2446
- * { id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },
2447
- * { id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions
2448
- * ];
2449
- *
2450
- * return (
2451
- * <NavigationMenu
2452
- * items={navItems}
2453
- * mode="dropdown"
2454
- * onNavigate={handleNavigation}
2455
- * buttonText="Menu"
2456
- * disabled={false}
2457
- * />
2458
- * );
2459
- * }
2460
- * ```
2461
- *
2462
- * @accessibility
2463
- * - WCAG 2.1 AA compliant navigation structure
2464
- * - Proper ARIA attributes for screen readers
2465
- * - Keyboard navigation with Enter, Space, and Escape keys
2466
- * - Focus management for dropdown menus
2467
- * - Semantic HTML structure with nav, menu, and menuitem roles
2468
- * - Clear visual indicators for active/current page
2469
- *
2470
- * @performance
2471
- * - Lightweight component with minimal re-renders
2472
- * - Efficient click outside detection
2473
- * - Optimized keyboard event handling
2474
- * - Memory cleanup for event listeners
2475
- *
2476
- * @styling
2477
- * - Uses Tailwind CSS for consistent styling
2478
- * - Supports custom className for additional styling
2479
- * - Responsive design considerations
2480
- *
2481
- * @dependencies
2482
- * - React 19+ - Component framework and hooks
2483
- * - Lucide React - Icon components
2484
- * - Radix UI - Dropdown menu primitives
2485
- * - React Router (optional) - For navigation handling
2486
- * - Tailwind CSS - Styling system
2487
- */
2488
-
2489
- /**
2490
- * Unified NavigationMenu component that supports both dropdown and hierarchical navigation modes.
2491
- *
2492
- * A flexible navigation menu component with support for icons, current page highlighting,
2493
- * keyboard navigation, and nested menu items.
2494
- *
2495
- * Features:
2496
- * - Dropdown mode: Menu button that opens a dropdown list
2497
- * - Hierarchical mode: Expandable tree navigation with nested items
2498
- * - Icon support for navigation items
2499
- * - Current page highlighting
2500
- * - Keyboard navigation support (Enter, Space, Escape)
2501
- * - Accessible design with proper ARIA attributes
2502
- * - Click outside to close (dropdown mode)
2503
- * - Recursive rendering for nested items (hierarchical mode)
2504
- *
2505
- * @example
2506
- * Basic dropdown navigation (most common use case):
2507
- * ```tsx
2508
- * import { NavigationMenu } from '@jmruthers/pace-core';
2509
- * import { useNavigate, useLocation } from 'react-router-dom';
2510
- *
2511
- * function AppNavigation() {
2512
- * const navigate = useNavigate();
2513
- * const location = useLocation();
2514
- *
2515
- * const navItems = [
2516
- * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
2517
- * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
2518
- * { id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },
2519
- * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
2520
- * ];
2521
- *
2522
- * return (
2523
- * <NavigationMenu
2524
- * items={navItems}
2525
- * mode="dropdown"
2526
- * currentPath={location.pathname}
2527
- * onNavigate={(item) => navigate(item.href)}
2528
- * buttonText="Main Menu"
2529
- * showIcons={true}
2530
- * />
2531
- * );
2532
- * }
2533
- * ```
2534
- *
2535
- * @example
2536
- * Hierarchical navigation with nested items:
2537
- * ```tsx
2538
- * import { NavigationMenu } from '@jmruthers/pace-core';
2539
- *
2540
- * function SidebarNavigation() {
2541
- * const hierarchicalItems = [
2542
- * {
2543
- * id: 'user-management',
2544
- * label: 'User Management',
2545
- * icon: 'Users',
2546
- * children: [
2547
- * { id: 'users-list', label: 'All Users', href: '/users' },
2548
- * { id: 'users-create', label: 'Create User', href: '/users/create' },
2549
- * { id: 'user-roles', label: 'User Roles', href: '/users/roles' }
2550
- * ]
2551
- * },
2552
- * {
2553
- * id: 'reports',
2554
- * label: 'Reports',
2555
- * icon: 'BarChart',
2556
- * children: [
2557
- * { id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },
2558
- * { id: 'user-reports', label: 'User Reports', href: '/reports/users' }
2559
- * ]
2560
- * },
2561
- * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
2562
- * ];
2563
- *
2564
- * return (
2565
- * <NavigationMenu
2566
- * items={hierarchicalItems}
2567
- * mode="hierarchical"
2568
- * currentPath={window.location.pathname}
2569
- * onNavigate={(item) => {
2570
- * if (item.href) {
2571
- * window.location.href = item.href;
2572
- * }
2573
- * }}
2574
- * className="w-64 bg-sec-50 p-4"
2575
- * />
2576
- * );
2577
- * }
2578
- * ```
2579
- *
2580
- * @example
2581
- * Integration with React Router and authentication:
2582
- * ```tsx
2583
- * import { NavigationMenu } from '@jmruthers/pace-core';
2584
- * import { useNavigate, useLocation } from 'react-router-dom';
2585
- * import { useUnifiedAuth } from '@jmruthers/pace-core/providers';
2586
- *
2587
- * function AuthenticatedNavigation() {
2588
- * const navigate = useNavigate();
2589
- * const location = useLocation();
2590
- * const { hasRole, hasPermission } = useUnifiedAuth();
2591
- *
2592
- * // Build navigation items with permission requirements
2593
- * const navItems = [
2594
- * {
2595
- * id: 'dashboard',
2596
- * label: 'Dashboard',
2597
- * href: '/dashboard',
2598
- * icon: 'LayoutDashboard',
2599
- * permissions: ['dashboard:read']
2600
- * },
2601
- * {
2602
- * id: 'meals',
2603
- * label: 'Meals',
2604
- * href: '/meals',
2605
- * icon: 'UtensilsCrossed',
2606
- * permissions: ['meals:read']
2607
- * },
2608
- * {
2609
- * id: 'admin',
2610
- * label: 'Admin Panel',
2611
- * href: '/admin',
2612
- * icon: 'Shield',
2613
- * roles: ['admin', 'super_admin']
2614
- * },
2615
- * {
2616
- * id: 'profile',
2617
- * label: 'Profile',
2618
- * href: '/profile',
2619
- * icon: 'User'
2620
- * }
2621
- * ];
2622
- *
2623
- * return (
2624
- * <NavigationMenu
2625
- * items={navItems}
2626
- * mode="dropdown"
2627
- * currentPath={location.pathname}
2628
- * onNavigate={(item) => navigate(item.href)}
2629
- * buttonText="Navigation"
2630
- * navigationLabel="Main application navigation"
2631
- * // Permission filtering is always enabled - no prop needed
2632
- * auditLog={true}
2633
- * />
2634
- * );
2635
- * }
2636
- * ```
2637
- *
2638
- * @example
2639
- * Custom navigation with external links and actions:
2640
- * ```tsx
2641
- * import { NavigationMenu } from '@jmruthers/pace-core';
2642
- *
2643
- * function CustomNavigation() {
2644
- * const handleNavigation = (item) => {
2645
- * if (item.id === 'logout') {
2646
- * // Handle logout action
2647
- * handleLogout();
2648
- * } else if (item.href?.startsWith('http')) {
2649
- * // Handle external links
2650
- * window.open(item.href, '_blank');
2651
- * } else if (item.href) {
2652
- * // Handle internal navigation
2653
- * navigate(item.href);
2654
- * }
2655
- * };
2656
- *
2657
- * const navItems = [
2658
- * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
2659
- * { id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },
2660
- * { id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions
2661
- * ];
2662
- *
2663
- * return (
2664
- * <NavigationMenu
2665
- * items={navItems}
2666
- * mode="dropdown"
2667
- * onNavigate={handleNavigation}
2668
- * buttonText="Menu"
2669
- * disabled={false}
2670
- * />
2671
- * );
2672
- * }
2673
- * ```
2674
- *
2675
- * @param props - NavigationMenu component props including items, mode, navigation handlers, and styling options
2676
- * @returns React element with navigation menu functionality
2677
- *
2678
- * @since 0.1.0
2679
- */
2680
- declare const NavigationMenu: React$1.ForwardRefExoticComponent<NavigationMenuProps & React$1.RefAttributes<HTMLDivElement>>;
2681
-
2682
- /**
2683
- * @file Password Change Form Component
2684
- * @package @jmruthers/pace-core
2685
- * @module Components/PasswordChange
2686
- * @since 0.1.0
2687
- *
2688
- * A secure password change form component with validation, confirmation matching,
2689
- * and proper error handling for updating user passwords.
2690
- *
2691
- * Features:
2692
- * - Password strength validation (minimum 8 characters)
2693
- * - Password confirmation matching
2694
- * - Loading states with disabled form
2695
- * - Error handling and display
2696
- * - Accessibility compliant
2697
- * - Responsive design
2698
- * - Form validation
2699
- * - Secure password input
2700
- * - Success and error callbacks
2701
- *
2702
- * @example
2703
- * ```tsx
2704
- * // Basic password change form
2705
- * <PasswordChangeForm
2706
- * onSubmit={async (values) => {
2707
- * try {
2708
- * await updatePassword(values.newPassword);
2709
- * toast.success('Password updated successfully!');
2710
- * return {};
2711
- * } catch (error) {
2712
- * return { error: { message: error.message } };
2713
- * }
2714
- * }}
2715
- * />
2716
- *
2717
- * // Password change form with custom styling
2718
- * <PasswordChangeForm
2719
- * className="max-w-md mx-auto p-6 bg-main-50 rounded-lg shadow-md"
2720
- * onSubmit={async (values) => {
2721
- * const result = await authService.changePassword(values.newPassword);
2722
- * if (result.success) {
2723
- * navigate('/profile');
2724
- * return {};
2725
- * } else {
2726
- * return { error: { message: result.error } };
2727
- * }
2728
- * }}
2729
- * />
2730
- *
2731
- * // Password change form in a modal with onSuccess callback
2732
- * <Modal isOpen={showPasswordChange} onClose={() => setShowPasswordChange(false)}>
2733
- * <ModalContent>
2734
- * <ModalHeader>
2735
- * <ModalTitle>Change Password</ModalTitle>
2736
- * </ModalHeader>
2737
- * <ModalBody>
2738
- * <PasswordChangeForm
2739
- * onSubmit={async (values) => {
2740
- * const result = await changePassword(values.newPassword);
2741
- * if (result.success) {
2742
- * return {};
2743
- * } else {
2744
- * return { error: { message: result.error } };
2745
- * }
2746
- * }}
2747
- * onSuccess={() => {
2748
- * setShowPasswordChange(false);
2749
- * toast.success('Password changed successfully');
2750
- * }}
2751
- * />
2752
- * </ModalBody>
2753
- * </ModalContent>
2754
- * </Modal>
2755
- * ```
2756
- *
2757
- * @accessibility
2758
- * - WCAG 2.1 AA compliant
2759
- * - Proper form labels and associations
2760
- * - Screen reader friendly error messages
2761
- * - Keyboard navigation support
2762
- * - Focus management
2763
- * - High contrast support
2764
- * - Clear error identification
2765
- * - Role="alert" for error announcements
2766
- * - Password field security
2767
- *
2768
- * @security
2769
- * - Password strength validation
2770
- * - Secure password input fields
2771
- * - Confirmation matching
2772
- * - No password logging
2773
- * - Proper error handling
2774
- *
2775
- * @dependencies
2776
- * - React 19+ - Hooks and state
2777
- * - Button component
2778
- * - Input component
2779
- * - Label component
2780
- * - Tailwind CSS - Styling
2781
- */
2782
- /**
2783
- * Form values for password change.
2784
- */
2785
- interface PasswordChangeFormValues {
2786
- newPassword: string;
2787
- confirmPassword: string;
2788
- }
2789
- /**
2790
- * Error structure for password change form.
2791
- */
2792
- interface PasswordChangeFormError {
2793
- message?: string;
2794
- code?: string;
2795
- }
2796
- /**
2797
- * Props for the PasswordChangeForm component.
2798
- */
2799
- interface PasswordChangeFormProps {
2800
- onSubmit: (values: PasswordChangeFormValues) => Promise<{
2801
- error?: PasswordChangeFormError;
2802
- }>;
2803
- onSuccess?: () => void;
2804
- className?: string;
2805
- }
2806
- declare function PasswordChangeForm({ onSubmit, onSuccess, className }: PasswordChangeFormProps): react_jsx_runtime.JSX.Element;
2807
-
2808
- /**
2809
- * Props for the Header component
2810
- */
2811
- interface HeaderProps {
2812
- /** URL to the app logo image */
2813
- logoUrl?: string;
2814
- /** Alt text for the logo */
2815
- logoAlt?: string;
2816
- /** Navigation items for the menu - uses NavigationItem interface */
2817
- navItems?: NavigationItem[];
2818
- /** Current user for the user menu */
2819
- user?: User | null;
2820
- /** Sign out handler for user menu */
2821
- onSignOut?: () => Promise<void>;
2822
- /** Password change handler for user menu */
2823
- onChangePassword?: (newPassword: string, confirmPassword: string) => Promise<{
2824
- error?: PasswordChangeFormError;
2825
- }>;
2826
- /** Additional actions to display (will be placed between context selector and user menu) */
2827
- actions?: React__default.ReactNode;
2828
- /** Custom user menu component (overrides default UserMenu) */
2829
- userMenu?: React__default.ReactNode;
2830
- /** Custom className */
2831
- className?: string;
2832
- /** Show/hide context selector - default: true */
2833
- showContextSelector?: boolean;
2834
- /** Show organisations in context selector - default: true */
2835
- showOrganisations?: boolean;
2836
- /** Show events in context selector - default: true */
2837
- showEvents?: boolean;
2838
- /** Show/hide user menu */
2839
- showUserMenu?: boolean;
2840
- /** Current path for navigation highlighting */
2841
- currentPath?: string;
2842
- /** Custom navigation handler */
2843
- onNavigate?: (item: NavigationItem) => void;
2844
- /** URL to navigate to when logo is clicked (e.g., '/dashboard'). Defaults to '/' if not provided. */
2845
- logoHref?: string;
2846
- }
2847
- declare function Header({ logoUrl, logoAlt, navItems, user, onSignOut, onChangePassword, actions, userMenu, className, showContextSelector, showOrganisations, showEvents, showUserMenu, currentPath, onNavigate, logoHref }: HeaderProps): react_jsx_runtime.JSX.Element;
2848
-
2849
- /**
2850
- * @file Footer Component
2851
- * @package @jmruthers/pace-core
2852
- * @module Components/Footer
2853
- * @since 0.1.0
2854
- *
2855
- * A flexible footer component for application layouts with copyright information,
2856
- * navigation links, and customizable content.
2857
- *
2858
- * Features:
2859
- * - Copyright information with automatic year generation
2860
- * - Customizable company name and branding
2861
- * - Optional navigation links
2862
- * - Logo display support
2863
- * - Custom footer content via children
2864
- * - Responsive design
2865
- * - Accessibility compliant
2866
- * - Flexible layout options
2867
- * - Consistent styling with design system
2868
- *
2869
- * @example
2870
- * ```tsx
2871
- * // Basic footer with default copyright
2872
- * <Footer />
2873
- *
2874
- * // Footer with custom company name and year
2875
- * <Footer
2876
- * companyName="My Company Inc."
2877
- * year={2024}
2878
- * />
2879
- *
2880
- * // Footer with navigation links
2881
- * <Footer
2882
- * companyName="My Company"
2883
- * links={[
2884
- * { label: 'Privacy Policy', href: '/privacy' },
2885
- * { label: 'Terms of Service', href: '/terms' },
2886
- * { label: 'Contact', href: '/contact' }
2887
- * ]}
2888
- * />
2889
- *
2890
- * // Footer with logo and custom copyright
2891
- * <Footer
2892
- * logo="/logo.svg"
2893
- * copyright="© 2024 My Company. All rights reserved."
2894
- * />
2895
- *
2896
- * // Footer with custom content
2897
- * <Footer companyName="My Company">
2898
- * <section className="grid grid-cols-1 md:grid-cols-3 gap-8 mb-8">
2899
- * <section>
2900
- * <h3 className="font-semibold mb-2">About Us</h3>
2901
- * <p className="text-sm text-muted-foreground">
2902
- * We provide innovative solutions for modern businesses.
2903
- * </p>
2904
- * </section>
2905
- * <section>
2906
- * <h3 className="font-semibold mb-2">Contact</h3>
2907
- * <p className="text-sm text-muted-foreground">
2908
- * Email: info@mycompany.com<br />
2909
- * Phone: (555) 123-4567
2910
- * </p>
2911
- * </section>
2912
- * <section>
2913
- * <h3 className="font-semibold mb-2">Follow Us</h3>
2914
- * <nav className="flex gap-2">
2915
- * <a href="#" className="text-muted-foreground hover:text-foreground">Twitter</a>
2916
- * <a href="#" className="text-muted-foreground hover:text-foreground">LinkedIn</a>
2917
- * </nav>
2918
- * </section>
2919
- * </section>
2920
- * </Footer>
2921
- * ```
2922
- *
2923
- * @accessibility
2924
- * - WCAG 2.1 AA compliant
2925
- * - Proper semantic HTML with role="contentinfo"
2926
- * - Screen reader friendly navigation
2927
- * - Keyboard navigation support
2928
- * - High contrast support
2929
- * - Clear link identification
2930
- *
2931
- * @dependencies
2932
- * - React 19+ - Component framework
2933
- * - Tailwind CSS - Styling
2934
- */
2935
-
2936
- /**
2937
- * Props for the Footer component.
2938
- */
2939
- interface FooterProps {
2940
- /**
2941
- * Company or organization name
2942
- */
2943
- companyName?: string;
2944
- /**
2945
- * Current year or custom year for copyright
2946
- * @default current year
2947
- */
2948
- year?: number;
2949
- /**
2950
- * Optional array of navigation links to display
2951
- */
2952
- links?: Array<{
2953
- label: string;
2954
- href: string;
2955
- }>;
2956
- /**
2957
- * Optional CSS class name
2958
- */
2959
- className?: string;
2960
- /**
2961
- * Logo image URL (from UI version)
2962
- */
2963
- logo?: string;
2964
- /**
2965
- * Copyright text (from UI version)
2966
- */
2967
- copyright?: string;
2968
- /**
2969
- * Footer content - children to render inside footer
2970
- */
2971
- children?: React__default.ReactNode;
2972
- }
2973
- declare const Footer: React__default.NamedExoticComponent<FooterProps>;
2974
-
2975
- /**
2976
- * @file User Menu Component
2977
- * @package @jmruthers/pace-core
2978
- * @module Components/UserMenu
2979
- * @since 0.1.0
2980
- *
2981
- * A comprehensive user menu component that displays user information and provides
2982
- * access to user-specific actions like password changes and sign out.
2983
- *
2984
- * Features:
2985
- * - User avatar and display name
2986
- * - Dropdown menu with user actions
2987
- * - Password change functionality
2988
- * - Sign out capability
2989
- * - Loading state component
2990
- * - Responsive design
2991
- * - Accessibility compliant
2992
- * - Performance optimized with React.memo
2993
- * - Integration with Supabase User
2994
- * - Customizable styling
2995
- *
2996
- * @example
2997
- * ```tsx
2998
- * // Basic user menu
2999
- * <UserMenu
3000
- * user={currentUser}
3001
- * onSignOut={async () => {
3002
- * await signOut();
3003
- * navigate('/login');
3004
- * }}
3005
- * onChangePassword={async (newPassword, confirmPassword) => {
3006
- * try {
3007
- * await updatePassword(newPassword);
3008
- * toast.success('Password updated successfully!');
3009
- * return {};
3010
- * } catch (error) {
3011
- * return { error: { message: error.message } };
3012
- * }
3013
- * }}
3014
- * />
3015
- *
3016
- * // User menu without avatar
3017
- * <UserMenu
3018
- * user={currentUser}
3019
- * showAvatar={false}
3020
- * onSignOut={handleSignOut}
3021
- * onChangePassword={handlePasswordChange}
3022
- * />
3023
- *
3024
- * // User menu with loading state
3025
- * {isLoading ? (
3026
- * <UserMenu.Loading />
3027
- * ) : (
3028
- * <UserMenu
3029
- * user={user}
3030
- * onSignOut={handleSignOut}
3031
- * onChangePassword={handlePasswordChange}
3032
- * />
3033
- * )}
3034
- *
3035
- * // User menu in header
3036
- * <Header>
3037
- * <nav className="flex items-center gap-4">
3038
- * <Navigation />
3039
- * <UserMenu
3040
- * user={user}
3041
- * onSignOut={handleSignOut}
3042
- * onChangePassword={handlePasswordChange}
3043
- * className="ml-auto"
3044
- * />
3045
- * </nav>
3046
- * </Header>
3047
- * ```
3048
- *
3049
- * @accessibility
3050
- * - WCAG 2.1 AA compliant
3051
- * - Proper ARIA labels and roles
3052
- * - Keyboard navigation support
3053
- * - Focus management
3054
- * - Screen reader friendly
3055
- * - High contrast support
3056
- * - Loading state announcements
3057
- * - Clear action identification
3058
- *
3059
- * @performance
3060
- * - React.memo for efficient re-rendering
3061
- * - useCallback for stable event handlers
3062
- * - useMemo for computed values
3063
- * - Minimal re-renders
3064
- * - Optimized avatar rendering
3065
- *
3066
- * @dependencies
3067
- * - React 19+ - Hooks and memo
3068
- * - @supabase/supabase-js - User type
3069
- * - lucide-react - Icons
3070
- * - DropdownMenu components
3071
- * - Dialog components
3072
- * - PasswordChangeForm component
3073
- * - Avatar component
3074
- * - Button component
3075
- * - Tailwind CSS - Styling
3076
- */
3077
-
3078
- /**
3079
- * Props for the UserMenu component.
3080
- */
3081
- interface UserMenuProps {
3082
- user: User | null;
3083
- onSignOut?: () => Promise<void>;
3084
- onChangePassword?: (newPassword: string, confirmPassword: string) => Promise<{
3085
- error?: PasswordChangeFormError;
3086
- }>;
3087
- className?: string;
3088
- showAvatar?: boolean;
3089
- }
3090
- declare const UserMenu: React__default.NamedExoticComponent<UserMenuProps>;
3091
-
3092
- type Operation = 'read' | 'create' | 'update' | 'delete' | 'manage';
3093
- /**
3094
- * Props for the PaceAppLayout component.
3095
- * Configures the application layout including navigation, header, and footer.
3096
- */
3097
- interface PaceAppLayoutProps {
3098
- /** The name of the application to be displayed in the header. */
3099
- appName: string;
3100
- /** Optional navigation items for the header menu. If not provided, uses default navigation. */
3101
- navItems?: NavigationItem[];
3102
- /** Show/hide unified context selector (shows all accessible orgs and events) - default: true */
3103
- showContextSelector?: boolean;
3104
- /** Show organisations in context selector - default: true */
3105
- showOrganisations?: boolean;
3106
- /** Show events in context selector - default: true */
3107
- showEvents?: boolean;
3108
- /** Custom actions to display in the header (between event selector and user menu) */
3109
- headerActions?: React__default.ReactNode;
3110
- /** URL to navigate to when logo is clicked (defaults to '/dashboard') */
3111
- logoHref?: string;
3112
- /** Custom user menu component (overrides default user menu) */
3113
- customUserMenu?: React__default.ReactNode;
3114
- /** Custom className for the header */
3115
- headerClassName?: string;
3116
- /** Show/hide user menu */
3117
- showUserMenu?: boolean;
3118
- /** Enable layout-level permission enforcement */
3119
- enforcePermissions?: boolean;
3120
- /** Default permission to check for all routes (when enforcePermissions is true) */
3121
- defaultPermission?: Operation;
3122
- /** Route-specific permissions mapping */
3123
- routePermissions?: Record<string, Operation>;
3124
- /** Fallback component to show when user lacks permission */
3125
- permissionFallback?: React__default.ReactNode;
3126
- /** Custom permission page ID mapping */
3127
- pageIdMapping?: Record<string, string>;
3128
- /** Enable strict mode to prevent bypassing permission checks (default: true) */
3129
- strictMode?: boolean;
3130
- /** Enable page-level permission enforcement (default: false) */
3131
- enforcePagePermissions?: boolean;
3132
- /** Default page permission fallback component */
3133
- pagePermissionFallback?: React__default.ReactNode;
3134
- /** Enable audit logging for all permission checks (default: true) */
3135
- auditLog?: boolean;
3136
- /** Callback when page access is denied */
3137
- onPageAccessDenied?: (pageName: string, operation: string) => void;
3138
- /** Callback when strict mode violation occurs */
3139
- onStrictModeViolation?: (pageName: string, operation: string) => void;
3140
- /** Enable role-based routing (default: false) */
3141
- roleBasedRouting?: boolean;
3142
- /** Route configuration for role-based routing */
3143
- routeConfig?: Array<{
3144
- path: string;
3145
- component: React__default.ComponentType;
3146
- permissions: string[];
3147
- roles?: string[];
3148
- accessLevel?: string;
3149
- pageId?: string;
3150
- strictMode?: boolean;
3151
- meta?: {
3152
- title?: string;
3153
- description?: string;
3154
- requiresAuth?: boolean;
3155
- hidden?: boolean;
3156
- };
3157
- }>;
3158
- /** Fallback route for unauthorized access */
3159
- fallbackRoute?: string;
3160
- /** Callback when route access is denied */
3161
- onRouteAccessDenied?: (route: string, reason: string) => void;
3162
- /** Callback when route strict mode violation occurs */
3163
- onRouteStrictModeViolation?: (route: string, reason: string) => void;
3164
- }
3165
- /**
3166
- * A consistent layout component for all PACE suite applications that provides a standard
3167
- * structure with header, main content area, and footer.
3168
- *
3169
- * NEW: This component now includes layout-level permission enforcement to ensure
3170
- * consuming apps can't forget to implement permission checks on individual pages.
3171
- *
3172
- * This component is designed to work with React Router's nested routing pattern using
3173
- * Outlet to render child routes. It provides integrated authentication, navigation,
3174
- * and user management functionality.
3175
- *
3176
- * **Super Admin Access:** When `enforcePermissions={true}`, PaceAppLayout automatically
3177
- * checks if the user is a super admin before enforcing permissions. Super admins bypass
3178
- * all permission checks and can access any route without violations. The component extracts
3179
- * base page names from route paths (e.g., `/organisation/scouts-victoria` → `"organisation"`)
3180
- * for permission checking, which can be overridden using `pageIdMapping`.
3181
- *
3182
- * **Important:** The appName prop should use an APP_NAME constant declared in your App.tsx
3183
- * file. This ensures consistency with public pages (via PublicPageProvider) which should
3184
- * also receive the same APP_NAME constant. The logo URL is automatically constructed as
3185
- * `/${appName.toLowerCase()}_logo_wide.svg` from the public folder.
3186
- *
3187
- * Features:
3188
- * - React Router v6 integration with nested routing
3189
- * - Unified authentication integration
3190
- * - Consistent header with navigation and user menu
3191
- * - Flexible main content area with Outlet
3192
- * - Footer with application branding
3193
- * - User sign-out and password change functionality
3194
- * - Responsive design and accessibility compliant
3195
- * - Layout-level permission enforcement
3196
- * - Permission-based navigation filtering
3197
- * - Automatic page permission validation
3198
- * - Super admin bypass (super admins automatically bypass all permission checks)
3199
- *
3200
- * @example
3201
- * Basic React Router setup with permission enforcement (RECOMMENDED):
3202
- * ```tsx
3203
- * import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
3204
- * import { UnifiedAuthProvider } from '@jmruthers/pace-core/providers';
3205
- * import { PaceAppLayout, PaceLoginPage, PublicPageApp } from '@jmruthers/pace-core';
3206
- *
3207
- * const APP_NAME = 'CORE';
3208
- *
3209
- * function App() {
3210
- * return (
3211
- * <UnifiedAuthProvider supabaseClient={supabase} appName={APP_NAME}>
3212
- * <Router>
3213
- * <Routes>
3214
- * <Route path="/login" element={<PaceLoginPage appName={APP_NAME} />} />
3215
- * <Route path="/events/*" element={<PublicPageApp appName={APP_NAME} />} />
3216
- * <Route path="/" element={
3217
- * <PaceAppLayout
3218
- * appName={APP_NAME}
3219
- * enforcePermissions={true}
3220
- * defaultPermission="read"
3221
- * />
3222
- * }>
3223
- * <Route index element={<HomePage />} />
3224
- * <Route path="dashboard" element={<DashboardPage />} />
3225
- * <Route path="meals" element={<MealsPage />} />
3226
- * </Route>
3227
- * </Routes>
3228
- * </Router>
3229
- * </UnifiedAuthProvider>
3230
- * );
3231
- * }
3232
- * ```
3233
- *
3234
- *
3235
- * @example
3236
- * Custom navigation items with permission filtering (works independently of route enforcement):
3237
- * ```tsx
3238
- * import { NavigationItem } from '@jmruthers/pace-core';
3239
- *
3240
- * function App() {
3241
- * const customNavItems: NavigationItem[] = [
3242
- * { id: 'components', label: 'Components', href: '/components', icon: 'Component' },
3243
- * { id: 'styles', label: 'Styles', href: '/styles', icon: 'Palette' },
3244
- * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
3245
- * ];
3246
- *
3247
- * return (
3248
- * <Router>
3249
- * <Routes>
3250
- * <Route path="/" element={
3251
- * <PaceAppLayout
3252
- * appName="My Custom App"
3253
- * navItems={customNavItems}
3254
- * // Permission filtering is always enabled - no prop needed
3255
- * routePermissions={{
3256
- * '/components': 'read',
3257
- * '/styles': 'read',
3258
- * '/meals': 'read'
3259
- * }}
3260
- * // Optionally enable route-level enforcement (separate from navigation filtering)
3261
- * // enforcePermissions={true}
3262
- * />
3263
- * }>
3264
- * <Route path="components" element={<ComponentsPage />} />
3265
- * <Route path="styles" element={<StylesPage />} />
3266
- * <Route path="meals" element={<MealsPage />} />
3267
- * </Route>
3268
- * </Routes>
3269
- * </Router>
3270
- * );
3271
- * }
3272
- * ```
3273
- *
3274
- * @example
3275
- * Route-specific permissions with custom page IDs:
3276
- * ```tsx
3277
- * function AdminApp() {
3278
- * return (
3279
- * <Router>
3280
- * <Routes>
3281
- * <Route path="/" element={
3282
- * <PaceAppLayout
3283
- * appName="Admin Panel"
3284
- * enforcePermissions={true}
3285
- * routePermissions={{
3286
- * '/dashboard': 'read',
3287
- * '/user-management': 'read',
3288
- * '/system-settings': 'update'
3289
- * }}
3290
- * pageIdMapping={{
3291
- * '/dashboard': 'dashboard',
3292
- * '/user-management': 'user-management',
3293
- * '/system-settings': 'system-admin'
3294
- * }}
3295
- * permissionFallback={<AccessDeniedPage />}
3296
- * />
3297
- * }>
3298
- * <Route path="dashboard" element={<DashboardPage />} />
3299
- * <Route path="user-management" element={<UserManagementPage />} />
3300
- * <Route path="system-settings" element={<SystemSettingsPage />} />
3301
- * </Route>
3302
- * </Routes>
3303
- * </Router>
3304
- * );
3305
- * }
3306
- * ```
3307
- *
3308
- * @param props - Layout configuration including app name for branding and permission settings
3309
- * @returns React element with complete application layout structure and permission enforcement
3310
- *
3311
- * @since 0.1.0
3312
- */
3313
- declare function PaceAppLayout({ appName, navItems, showContextSelector, showOrganisations, showEvents, headerActions, logoHref, customUserMenu, headerClassName, showUserMenu, enforcePermissions, defaultPermission, routePermissions, permissionFallback, pageIdMapping, strictMode, enforcePagePermissions, pagePermissionFallback, auditLog, onPageAccessDenied, onStrictModeViolation, roleBasedRouting, routeConfig, fallbackRoute, onRouteAccessDenied, onRouteStrictModeViolation }: PaceAppLayoutProps): react_jsx_runtime.JSX.Element;
3314
-
3315
- /**
3316
- * @file PACE Login Page Component
3317
- * @package @jmruthers/pace-core
3318
- * @module Components/PaceLoginPage
3319
- * @since 0.1.0
3320
- *
3321
- * A comprehensive login page component that provides a consistent authentication
3322
- * experience for all PACE suite applications with role-based redirection and
3323
- * enhanced error handling.
3324
- *
3325
- * Features:
3326
- * - Consistent login page layout
3327
- * - Unified authentication integration
3328
- * - Role-based automatic redirection (admin users)
3329
- * - Manual redirection for all successful logins
3330
- * - Customizable app branding
3331
- * - Configurable redirect paths
3332
- * - Enhanced error handling and display
3333
- * - Dual loading state management (auth + form)
3334
- * - Navigation error recovery
3335
- * - Responsive design
3336
- * - Accessibility compliant
3337
- * - Integration with LoginForm
3338
- * - React Router navigation
3339
- * - Centered layout design
3340
- * - Error persistence and display
3341
- *
3342
- * @example
3343
- * ```tsx
3344
- * // Basic login page
3345
- * <PaceLoginPage appName="My Application" />
3346
- *
3347
- * // Login page with custom redirect
3348
- * <PaceLoginPage
3349
- * appName="Dashboard App"
3350
- * onSuccessRedirectPath="/dashboard"
3351
- * />
3352
- *
3353
- * // Login page in router setup
3354
- * <Router>
3355
- * <Routes>
3356
- * <Route path="/login" element={
3357
- * <PaceLoginPage
3358
- * appName="My App"
3359
- * onSuccessRedirectPath="/home"
3360
- * />
3361
- * } />
3362
- * <Route path="/home" element={<HomePage />} />
3363
- * </Routes>
3364
- * </Router>
3365
- *
3366
- * // Login page with authentication provider
3367
- * <UnifiedAuthProvider supabaseClient={supabase} appName="My App">
3368
- * <Router>
3369
- * <Routes>
3370
- * <Route path="/login" element={
3371
- * <PaceLoginPage appName="My Application" />
3372
- * } />
3373
- * <Route path="/" element={<PaceAppLayout appName="My Application" />}>
3374
- * <Route index element={<HomePage />} />
3375
- * </Route>
3376
- * </Routes>
3377
- * </Router>
3378
- * </UnifiedAuthProvider>
3379
- *
3380
- * // Login page with role-based access control
3381
- * function App() {
3382
- * return (
3383
- * <UnifiedAuthProvider supabaseClient={supabase} appName="Admin Portal">
3384
- * <Router>
3385
- * <Routes>
3386
- * <Route path="/login" element={
3387
- * <PaceLoginPage
3388
- * appName="Admin Portal"
3389
- * onSuccessRedirectPath="/admin/dashboard"
3390
- * />
3391
- * } />
3392
- * <Route path="/admin/*" element={<AdminRoutes />} />
3393
- * </Routes>
3394
- * </Router>
3395
- * </UnifiedAuthProvider>
3396
- * );
3397
- * }
3398
- * ```
3399
- *
3400
- * @accessibility
3401
- * - WCAG 2.1 AA compliant
3402
- * - Proper semantic HTML structure
3403
- * - Screen reader friendly
3404
- * - Keyboard navigation support
3405
- * - Focus management
3406
- * - High contrast support
3407
- * - Clear page hierarchy
3408
- * - Accessible form elements
3409
- * - Error announcements
3410
- *
3411
- * @routing
3412
- * - React Router v6 integration
3413
- * - Automatic navigation on success
3414
- * - Role-based redirect logic (admin users)
3415
- * - Configurable redirect paths
3416
- * - Replace navigation for login flow
3417
- * - Navigation error handling
3418
- *
3419
- * @authentication
3420
- * - Integration with UnifiedAuthProvider
3421
- * - Role detection via hasRole('admin')
3422
- * - Loading state management
3423
- * - Error state handling
3424
- * - Session validation
3425
- * - Automatic redirect prevention loops
3426
- *
3427
- * @dependencies
3428
- * - React 19+ - Hooks and effects
3429
- * - React Router v6 - Navigation
3430
- * - UnifiedAuthProvider - Authentication
3431
- * - LoginForm component
3432
- * - Button component
3433
- * - Input component
3434
- * - Label component
3435
- * - Tailwind CSS - Styling
3436
- */
3437
-
3438
- /**
3439
- * Props for the PaceLoginPage component.
3440
- */
3441
- interface PaceLoginPageProps {
3442
- /** The name of the application to be displayed on the login form. */
3443
- appName: string;
3444
- /** The path to redirect to upon successful login. Defaults to `/`. */
3445
- onSuccessRedirectPath?: string;
3446
- /** Whether to check app access using RBAC. Defaults to false. */
3447
- requireAppAccess?: boolean;
3448
- }
3449
- /**
3450
- * A consistent, reusable login page for all PACE suite applications.
3451
- * It handles the sign-in logic with role-based automatic redirection for admin users,
3452
- * enhanced error handling, and dual loading state management.
3453
- *
3454
- * Recent enhancements:
3455
- * - Role-based redirection: Admin users are automatically redirected
3456
- * - RBAC-based app access control: Checks if user has permission to access the app
3457
- * - Enhanced error handling with navigation error recovery
3458
- * - Dual loading states: auth loading + form submission loading
3459
- * - Error persistence: Auth errors are displayed below the form
3460
- * - Navigation safety: Try-catch blocks prevent navigation errors
3461
- *
3462
- * @param props - Login page configuration including app name and redirect path
3463
- * @returns JSX.Element - The rendered login page with enhanced functionality
3464
- *
3465
- * @example
3466
- * ```tsx
3467
- * <PaceLoginPage
3468
- * appName="My Application"
3469
- * onSuccessRedirectPath="/dashboard"
3470
- * />
3471
- * ```
3472
- */
3473
- declare const PaceLoginPage: React__default.FC<PaceLoginPageProps>;
3474
-
3475
- /**
3476
- * Props for the ProtectedRoute component.
3477
- */
3478
- interface ProtectedRouteProps {
3479
- /**
3480
- * Whether an event is required for routes inside this component.
3481
- * When true, routes will only render if an event is selected or can be selected.
3482
- * When false, routes render regardless of event state.
3483
- * @default true
3484
- */
3485
- requireEvent?: boolean;
3486
- /**
3487
- * Custom component to render when no events are available.
3488
- * If not provided, a default message is shown.
3489
- */
3490
- noEventsFallback?: React__default.ReactNode;
3491
- /**
3492
- * Custom component to render while events are loading.
3493
- * If not provided, a default loading spinner is shown.
3494
- */
3495
- loadingFallback?: React__default.ReactNode;
3496
- /**
3497
- * Login redirect path when user is not authenticated.
3498
- * @default '/login'
3499
- */
3500
- loginPath?: string;
3501
- }
3502
- /**
3503
- * ProtectedRoute component that handles authentication and optional event selection.
3504
- *
3505
- * This component solves the chicken-and-egg problem where apps check for `selectedEvent`
3506
- * before rendering, which blocks the event selector (typically in the header) from being visible.
3507
- *
3508
- * Strategy:
3509
- * 1. Check authentication first - redirect to login if not authenticated
3510
- * 2. Allow rendering during event loading - prevents blocking UI
3511
- * 3. If events exist but none selected - allow rendering so selector is visible
3512
- * 4. If no events available - show error message
3513
- * 5. Individual pages should handle "no selected event" state gracefully
3514
- *
3515
- * @param props - Configuration for route protection
3516
- * @returns React element with route protection logic
3517
- */
3518
- declare function ProtectedRoute({ requireEvent, noEventsFallback, loadingFallback, loginPath }: ProtectedRouteProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element;
3519
-
3520
- /**
3521
- * State interface for the ErrorBoundary component
3522
- * @public
3523
- */
3524
- interface ErrorBoundaryState {
3525
- /** Whether an error has been caught */
3526
- hasError: boolean;
3527
- /** The error that was caught */
3528
- error?: Error;
3529
- /** Additional error information from React */
3530
- errorInfo?: React__default.ErrorInfo;
3531
- /** Unique identifier for the error */
3532
- errorId?: string;
3533
- /** Number of retry attempts made */
3534
- retryCount: number;
3535
- }
3536
- /**
3537
- * Props interface for the ErrorBoundary component
3538
- * @public
3539
- */
3540
- interface ErrorBoundaryProps {
3541
- /** Child components to wrap with error boundary */
3542
- children: ReactNode;
3543
- /** Name of the component for error reporting */
3544
- componentName?: string;
3545
- /** Custom fallback UI to display when error occurs */
3546
- fallback?: ReactNode;
3547
- /** Callback function called when an error is caught */
3548
- onError?: (error: Error, errorInfo: React__default.ErrorInfo, errorId: string) => void;
3549
- /** Maximum number of retry attempts */
3550
- maxRetries?: number;
3551
- /** Whether to enable retry functionality */
3552
- enableRetry?: boolean;
3553
- /** Whether to enable error reporting */
3554
- enableReporting?: boolean;
3555
- /** Internal: Global error handler from context (not part of public API) */
3556
- _globalErrorHandler?: (error: Error, errorInfo: React__default.ErrorInfo, errorId: string, componentName: string) => void;
3557
- }
3558
- /**
3559
- * ErrorBoundary component
3560
- * Catches JavaScript errors in child components and provides fallback UI
3561
- *
3562
- * @example
3563
- * ```tsx
3564
- * <ErrorBoundary
3565
- * componentName="MyComponent"
3566
- * maxRetries={3}
3567
- * onError={(error, errorInfo, errorId) => {
3568
- * console.log('Error caught:', errorId);
3569
- * }}
3570
- * >
3571
- * <MyComponent />
3572
- * </ErrorBoundary>
3573
- * ```
3574
- */
3575
- declare class ErrorBoundary$1 extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
3576
- private retryTimeoutId;
3577
- constructor(props: ErrorBoundaryProps);
3578
- static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
3579
- componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
3580
- private reportError;
3581
- private handleRetry;
3582
- componentWillUnmount(): void;
3583
- render(): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
3584
- }
3585
-
3586
- /**
3587
- * @file Error Boundary Context Types
3588
- * @package @jmruthers/pace-core
3589
- * @module Components/ErrorBoundary
3590
- * @since 0.6.2
3591
- *
3592
- * Type definitions for ErrorBoundary context.
3593
- */
3594
-
3595
- /**
3596
- * Type definition for the global error handler function
3597
- * @public
3598
- */
3599
- type GlobalErrorHandler = (error: Error, errorInfo: ErrorInfo, errorId: string, componentName: string) => void;
3600
- /**
3601
- * Props for ErrorBoundaryProvider component
3602
- * @public
3603
- */
3604
- interface ErrorBoundaryProviderProps {
3605
- /** Children to wrap with the provider */
3606
- children: ReactNode;
3607
- /** Global error handler that will be used by all ErrorBoundary instances unless overridden */
3608
- defaultErrorHandler?: GlobalErrorHandler;
3609
- }
3610
-
3611
- /**
3612
- * Provider component for ErrorBoundary global error handler configuration
3613
- *
3614
- * Wrap your application with this provider to set a default error handler that will
3615
- * be used by all ErrorBoundary instances unless they provide their own onError prop.
3616
- *
3617
- * @example
3618
- * ```tsx
3619
- * <ErrorBoundaryProvider
3620
- * defaultErrorHandler={(error, errorInfo, errorId, componentName) => {
3621
- * errorTracking.captureException(error, {
3622
- * componentStack: errorInfo.componentStack,
3623
- * errorBoundary: true,
3624
- * errorId,
3625
- * componentName,
3626
- * });
3627
- * }}
3628
- * >
3629
- * <App />
3630
- * </ErrorBoundaryProvider>
3631
- * ```
3632
- *
3633
- * @public
3634
- */
3635
- /**
3636
- * Error boundary provider component.
3637
- * Provides global error handling configuration to child ErrorBoundary components.
3638
- *
3639
- * @param props - Error boundary provider configuration
3640
- * @returns The error boundary provider
3641
- */
3642
- declare function ErrorBoundaryProvider({ children, defaultErrorHandler, }: ErrorBoundaryProviderProps): react_jsx_runtime.JSX.Element;
3643
-
3644
- /**
3645
- * @file Error Boundary exports
3646
- */
3647
-
3648
- /**
3649
- * ErrorBoundary component with automatic context support
3650
- * This wrapper automatically uses the global error handler from ErrorBoundaryProvider
3651
- * if no onError prop is provided.
3652
- */
3653
- declare const ErrorBoundary: React__default.ForwardRefExoticComponent<Omit<ErrorBoundaryProps, "_globalErrorHandler"> & React__default.RefAttributes<ErrorBoundary$1>>;
3654
-
3655
- /**
3656
- * @file LoadingSpinner Component
3657
- * @package @jmruthers/pace-core
3658
- * @module Components/LoadingSpinner
3659
- * @since 0.1.0
3660
- *
3661
- * A simple, accessible loading spinner component for indicating loading states.
3662
- * Provides smooth animations with reduced motion support for accessibility.
3663
- *
3664
- * Features:
3665
- * - Multiple size variants (sm, md, lg)
3666
- * - Smooth CSS animations
3667
- * - Reduced motion support for accessibility
3668
- * - Screen reader friendly with proper ARIA attributes
3669
- * - Customizable styling
3670
- * - Lightweight and performant
3671
- *
3672
- * @example
3673
- * ```tsx
3674
- * // Basic loading spinner
3675
- * <LoadingSpinner />
3676
- *
3677
- * // Different sizes
3678
- * <LoadingSpinner size="sm" />
3679
- * <LoadingSpinner size="md" />
3680
- * <LoadingSpinner size="lg" />
3681
- *
3682
- * // With custom styling
3683
- * <LoadingSpinner
3684
- * size="lg"
3685
- * className="text-main-500"
3686
- * />
3687
- *
3688
- * // In a button
3689
- * <Button disabled>
3690
- * <LoadingSpinner size="sm" className="mr-2" />
3691
- * Loading...
3692
- * </Button>
3693
- * ```
3694
- *
3695
- * @accessibility
3696
- * - WCAG 2.1 AA compliant
3697
- * - Proper ARIA role="status"
3698
- * - Screen reader announcement with "Loading..." text
3699
- * - Reduced motion support for users with vestibular disorders
3700
- * - High contrast support
3701
- *
3702
- * @performance
3703
- * - CSS-only animations for optimal performance
3704
- * - No JavaScript dependencies
3705
- * - Minimal DOM structure
3706
- * - Efficient rendering
3707
- *
3708
- * @dependencies
3709
- * - React 19+ - Component framework
3710
- * - Tailwind CSS - Styling and animations
3711
- */
3712
-
3713
- /**
3714
- * Props for the LoadingSpinner component
3715
- */
3716
- interface LoadingSpinnerProps {
3717
- /** Size variant of the spinner */
3718
- size?: 'sm' | 'md' | 'lg';
3719
- /** Additional CSS classes for styling */
3720
- className?: string;
3721
- }
3722
- /**
3723
- * LoadingSpinner component
3724
- * A simple, accessible loading spinner for indicating loading states
3725
- *
3726
- * @param props - Spinner configuration and styling
3727
- * @returns JSX.Element - The rendered loading spinner
3728
- *
3729
- * @example
3730
- * ```tsx
3731
- * <LoadingSpinner size="lg" className="text-main-500" />
3732
- * ```
3733
- */
3734
- declare const LoadingSpinner: React__default.FC<LoadingSpinnerProps>;
3735
-
3736
- /**
3737
- * @file SessionRestorationLoader Component
3738
- * @package @jmruthers/pace-core
3739
- * @module Components/SessionRestorationLoader
3740
- * @since 0.1.0
3741
- *
3742
- * Displays a consistent loading state while the authentication service
3743
- * restores the Supabase session from persistent storage.
3744
- *
3745
- * Features:
3746
- * - Full-screen loading state
3747
- * - Accessible with proper ARIA attributes
3748
- * - Screen reader friendly
3749
- * - Customizable message
3750
- * - Uses LoadingSpinner component
3751
- *
3752
- * @example
3753
- * ```tsx
3754
- * // Basic usage
3755
- * <SessionRestorationLoader />
3756
- *
3757
- * // With custom message
3758
- * <SessionRestorationLoader message="Restoring your session..." />
3759
- * ```
3760
- *
3761
- * @accessibility
3762
- * - WCAG 2.1 AA compliant
3763
- * - Proper ARIA role="status"
3764
- * - Screen reader announcement
3765
- * - High contrast support
3766
- *
3767
- * @dependencies
3768
- * - React 19+ - Component framework
3769
- * - LoadingSpinner - Spinner component
3770
- * - Tailwind CSS - Styling
3771
- */
3772
-
3773
- interface SessionRestorationLoaderProps {
3774
- /** Customise the status message displayed under the spinner */
3775
- message?: string;
3776
- /** Additional CSS classes for styling */
3777
- className?: string;
3778
- }
3779
- declare const SessionRestorationLoader: React__default.FC<SessionRestorationLoaderProps>;
3780
-
3781
- /**
3782
- * Props for the ContextSelector component.
3783
- */
3784
- interface ContextSelectorProps {
3785
- /** Placeholder text for the dropdown */
3786
- placeholder?: string;
3787
- /** Additional CSS classes */
3788
- className?: string;
3789
- /** Callback fired when an organisation is selected */
3790
- onOrganisationSelect?: (org: Organisation) => void;
3791
- /** Callback fired when an event is selected */
3792
- onEventSelect?: (event: Event) => void;
3793
- /** Show friendly message when no items available */
3794
- showNoItemsMessage?: boolean;
3795
- /** Show retry button on errors */
3796
- showRetryButton?: boolean;
3797
- /** Compact display mode */
3798
- compact?: boolean;
3799
- /** Disabled state */
3800
- disabled?: boolean;
3801
- /** Show organisations section (default: true) */
3802
- showOrganisations?: boolean;
3803
- /** Show events section (default: true) */
3804
- showEvents?: boolean;
3805
- }
3806
- /**
3807
- * ContextSelector component for selecting organisations or events
3808
- *
3809
- * This is the unified intelligent selector that shows all organisations and events
3810
- * a user can access. It automatically determines what to show based on the user's
3811
- * roles and permissions - no need to configure separate org/event selectors.
3812
- *
3813
- * The selector intelligently shows:
3814
- * - All organisations the user has access to (via organisation roles)
3815
- * - All events the user has access to (via event-app roles or organisation membership)
3816
- * - Everything for super admins
3817
- *
3818
- * @component
3819
- * @example
3820
- * <ContextSelector
3821
- * onOrganisationSelect={(org) => switchOrganisation(org)}
3822
- * onEventSelect={(event) => setSelectedEvent(event)}
3823
- * />
3824
- */
3825
- declare function ContextSelector({ placeholder, className, onOrganisationSelect, onEventSelect, showNoItemsMessage, showRetryButton, compact, disabled, showOrganisations, showEvents }: ContextSelectorProps): react_jsx_runtime.JSX.Element | null;
3826
-
3827
- /**
3828
- * Props for the FileUpload component.
3829
- * Configures file upload behavior including storage location, validation, and callbacks.
3830
- */
3831
- interface FileUploadProps {
3832
- supabase: SupabaseClient;
3833
- table_name: string;
3834
- record_id: string;
3835
- organisation_id?: string | null;
3836
- userId?: string;
3837
- app_id?: string;
3838
- category: FileCategory;
3839
- folder: string;
3840
- pageContext: string;
3841
- event_id?: string;
3842
- accept?: string;
3843
- maxSize?: number;
3844
- multiple?: boolean;
3845
- disabled?: boolean;
3846
- isPublic?: boolean;
3847
- className?: string;
3848
- showPreview?: boolean;
3849
- showProgress?: boolean;
3850
- onUploadSuccess?: (result: FileUploadResult) => void;
3851
- onUploadError?: (error: string, file?: File) => void;
3852
- onProgress?: (progress: UploadProgress) => void;
3853
- children?: React__default.ReactNode;
3854
- }
3855
- declare function FileUpload({ supabase, table_name, record_id, organisation_id, userId, app_id, category, folder, pageContext, event_id, accept, maxSize, // 10MB default
3856
- multiple, disabled, isPublic, className, showPreview, showProgress, onUploadSuccess, onUploadError, onProgress, children }: FileUploadProps): react_jsx_runtime.JSX.Element;
3857
-
3858
- interface FileDisplayProps {
3859
- table_name: string;
3860
- record_id: string;
3861
- /**
3862
- * Optional organisation ID. When not provided (undefined), the component will automatically
3863
- * search for files in both user-scoped (organisation_id = null) and organisation-scoped contexts.
3864
- * If both types of files exist, organisation-scoped files are preferred.
3865
- * When explicitly set to null, only user-scoped files are searched.
3866
- */
3867
- organisation_id?: string;
3868
- category?: FileCategory;
3869
- /** Display only a single file instead of all files. Uses first file (prefers images) from all files, without category filtering */
3870
- displayOnly?: boolean;
3871
- showDelete?: boolean;
3872
- className?: string;
3873
- /** Classes to apply to the first child element of <figure> (img, p, or other elements) */
3874
- imgClassName?: string;
3875
- children?: React__default.ReactNode;
3876
- /** Custom loading component to render during data fetching */
3877
- loadingComponent?: React__default.ComponentType;
3878
- /** Custom error component to render when an error occurs */
3879
- errorComponent?: React__default.ComponentType<{
3880
- error: Error | string | null;
3881
- retry?: () => void;
3882
- }>;
3883
- /** Whether to show fallback UI when no file is available or image fails to load */
3884
- showFallback?: boolean;
3885
- /** Custom function to generate fallback text from file name or other context */
3886
- generateFallbackText?: (fileName?: string) => string;
3887
- /** Explicit fallback text to display (overrides generateFallbackText) */
3888
- fallbackText?: string;
3889
- /** Source text to use for generating fallback text (overrides filename) */
3890
- fallbackSourceText?: string;
3891
- /** Size variant for fallback display (only applies when showFallback is true) */
3892
- fallbackSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
3893
- /**
3894
- * Enable children rendering in displayOnly mode. When true, uses standard display path
3895
- * (with children support) even if showDelete is false. The delete button will only appear
3896
- * if showDelete is also true.
3897
- */
3898
- enableChildren?: boolean;
3899
- /** Whether to show metadata (filename, filesize, mimetype) in figcaption. Defaults to true. */
3900
- showMetadata?: boolean;
3901
- }
3902
- /**
3903
- * Component for displaying file references with context-awareness
3904
- *
3905
- * This component is context-aware and automatically detects whether it's being used
3906
- * in a public or authenticated context. It fetches and displays files from storage.
3907
- *
3908
- * The component automatically detects context and uses:
3909
- * - PublicPageProvider context for public pages
3910
- * - UnifiedAuthProvider context for authenticated pages
3911
- *
3912
- * @param props - File display configuration
3913
- * @param props.displayOnly - Display only a single file instead of all files. Uses first file (prefers images) from all files, without category filtering. When true:
3914
- * - **Image files**: Renders a simplified image-only display without metadata or wrapper divs
3915
- * - **Non-image files** (PDFs, Word docs, Excel files, etc.): Renders as clickable links that open in a new tab with document icon, filename, and external link icon. Links include proper security attributes (`rel="noopener noreferrer"`) and accessibility features (ARIA labels, keyboard navigation, visible focus states)
3916
- * - If `showDelete={true}`, uses standard wrapper behavior instead of simplified display
3917
- * @param props.category - Optional category filter. When specified, only displays files matching this category and uses single file display variant.
3918
- * @returns React element with file display
3919
- */
3920
- /**
3921
- * File display component.
3922
- * Renders files from the file reference system with support for previews, downloads, and public/private access.
3923
- *
3924
- * @param props - File display configuration
3925
- * @returns The rendered file display
3926
- */
3927
- declare function FileDisplay({ table_name, record_id, organisation_id, category, displayOnly, showDelete, className, imgClassName, children, loadingComponent, errorComponent, showFallback, generateFallbackText, fallbackText, fallbackSourceText, fallbackSize, enableChildren, showMetadata }: FileDisplayProps): react_jsx_runtime.JSX.Element;
3928
-
3929
- /**
3930
- * Hook for managing file references.
3931
- * Provides file upload, retrieval, and URL generation functionality.
3932
- *
3933
- * @param supabase - Supabase client instance
3934
- * @returns File reference service with upload, get, and URL methods
3935
- */
3936
- declare function useFileReference(supabase: SupabaseClient): {
3937
- isLoading: boolean;
3938
- error: string | null;
3939
- uploadFile: (options: FileUploadOptions, file: File) => Promise<FileUploadResult | null>;
3940
- getFileReference: (table_name: string, record_id: string, organisation_id: string) => Promise<FileReference | null>;
3941
- getFileReferenceById: (id: string, organisation_id: string) => Promise<FileReference | null>;
3942
- getFileUrl: (table_name: string, record_id: string, organisation_id: string) => Promise<string | null>;
3943
- getSignedUrl: (table_name: string, record_id: string, organisation_id: string, expires_in?: number) => Promise<string | null>;
3944
- updateFileReference: (id: string, updates: Partial<FileReference>) => Promise<FileReference | null>;
3945
- deleteFileReference: (table_name: string, record_id: string, organisation_id: string, delete_file?: boolean) => Promise<boolean>;
3946
- listFileReferences: (table_name: string, record_id: string, organisation_id: string) => Promise<FileReference[]>;
3947
- getFilesByCategory: (table_name: string, record_id: string, category: FileCategory, organisation_id: string) => Promise<FileReference[]>;
3948
- getFileCount: (table_name: string, record_id: string, organisation_id: string) => Promise<number>;
3949
- clearError: () => void;
3950
- };
3951
- declare function useFileReferenceForRecord(supabase: SupabaseClient, table_name: string, record_id: string, organisation_id: string): {
3952
- isLoading: boolean;
3953
- error: string | null;
3954
- fileUrl: string | null;
3955
- fileReference: FileReference | null;
3956
- fileReferences: FileReference[];
3957
- fileCount: number;
3958
- loadFileReference: () => Promise<FileReference | null>;
3959
- loadFileUrl: () => Promise<string | null>;
3960
- loadFileReferences: () => Promise<FileReference[]>;
3961
- loadFileCount: () => Promise<number>;
3962
- deleteFile: (delete_file?: boolean) => Promise<boolean>;
3963
- updateFileReference: (id: string, updates: Partial<FileReference>) => Promise<FileReference | null>;
3964
- clearError: () => void;
3965
- };
3966
- /**
3967
- * Hook for getting a file reference by ID
3968
- */
3969
- declare function useFileReferenceById(supabase: SupabaseClient, fileReferenceId: string | null, organisationId: string | null): {
3970
- isLoading: boolean;
3971
- error: string | null;
3972
- fileReference: FileReference | null;
3973
- fileUrl: string | null;
3974
- loadFileReference: () => Promise<FileReference | null>;
3975
- clearError: () => void;
3976
- };
3977
- /**
3978
- * Convenience hook for getting files by category with automatic URL loading.
3979
- *
3980
- * This hook wraps useFileReference().getFilesByCategory and automatically:
3981
- * - Loads file references filtered by category
3982
- * - Generates URLs for all files (public URLs for public files, signed URLs for private files)
3983
- * - Manages state for fileReferences and fileUrls
3984
- * - Auto-refetches when table_name, record_id, category, or organisation_id changes
3985
- *
3986
- * Use this hook when you need files by category with their URLs ready to display.
3987
- * For more control, use useFileReference() directly and manage URLs yourself.
3988
- */
3989
- declare function useFilesByCategory(supabase: SupabaseClient, table_name: string, record_id: string, category: FileCategory | null, organisation_id: string | null): {
3990
- isLoading: boolean;
3991
- error: string | null;
3992
- fileReferences: FileReference[];
3993
- fileUrls: Map<string, string>;
3994
- loadFiles: () => Promise<FileReference[]>;
3995
- clearError: () => void;
3996
- };
3997
- type UseFileReferenceOptions = {
3998
- table_name: string;
3999
- record_id: string;
4000
- organisation_id: string;
4001
- };
4002
- /**
4003
- * Return value of the useFileReference hook.
4004
- */
4005
- type UseFileReferenceReturn = {
4006
- isLoading: boolean;
4007
- error: string | null;
4008
- uploadFile: (options: FileUploadOptions, file: File) => Promise<FileUploadResult | null>;
4009
- getFileReference: (table_name: string, record_id: string, organisation_id: string) => Promise<FileReference | null>;
4010
- getFileUrl: (table_name: string, record_id: string, organisation_id: string) => Promise<string | null>;
4011
- getSignedUrl: (table_name: string, record_id: string, organisation_id: string, expires_in?: number) => Promise<string | null>;
4012
- updateFileReference: (id: string, updates: Partial<FileReference>) => Promise<FileReference | null>;
4013
- deleteFileReference: (table_name: string, record_id: string, organisation_id: string, delete_file?: boolean) => Promise<boolean>;
4014
- listFileReferences: (table_name: string, record_id: string, organisation_id: string) => Promise<FileReference[]>;
4015
- getFileCount: (table_name: string, record_id: string, organisation_id: string) => Promise<number>;
4016
- clearError: () => void;
4017
- };
4018
- /**
4019
- * Return value of the useFileReferenceForRecord hook.
4020
- */
4021
- type UseFileReferenceForRecordReturn = {
4022
- isLoading: boolean;
4023
- error: string | null;
4024
- fileUrl: string | null;
4025
- fileReference: FileReference | null;
4026
- fileReferences: FileReference[];
4027
- fileCount: number;
4028
- loadFileReference: () => Promise<FileReference | null>;
4029
- loadFileUrl: () => Promise<string | null>;
4030
- loadFileReferences: () => Promise<FileReference[]>;
4031
- loadFileCount: () => Promise<number>;
4032
- deleteFile: (delete_file?: boolean) => Promise<boolean>;
4033
- updateFileReference: (id: string, updates: Partial<FileReference>) => Promise<FileReference | null>;
4034
- clearError: () => void;
4035
- };
4036
-
4037
- /**
4038
- * @file Table Component System
4039
- * @package @jmruthers/pace-core
4040
- * @module Components/Table
4041
- * @since 0.1.0
4042
- *
4043
- * A comprehensive table component system for displaying tabular data.
4044
- * Provides accessible table components with consistent styling and behavior.
4045
- *
4046
- * Features:
4047
- * - Semantic HTML table structure
4048
- * - Consistent styling and spacing
4049
- * - Hover states and transitions
4050
- * - Responsive design
4051
- * - Accessibility compliant
4052
- * - Customizable styling
4053
- * - Checkbox support
4054
- * - Caption support
4055
- *
4056
- * @example
4057
- * ```tsx
4058
- * // Basic table
4059
- * <Table>
4060
- * <TableCaption>A list of your recent invoices.</TableCaption>
4061
- * <TableHeader>
4062
- * <TableRow>
4063
- * <TableHead>Invoice</TableHead>
4064
- * <TableHead>Status</TableHead>
4065
- * <TableHead>Method</TableHead>
4066
- * <TableHead>Amount</TableHead>
4067
- * </TableRow>
4068
- * </TableHeader>
4069
- * <TableBody>
4070
- * <TableRow>
4071
- * <TableCell>INV001</TableCell>
4072
- * <TableCell>Paid</TableCell>
4073
- * <TableCell>Credit Card</TableCell>
4074
- * <TableCell>$250.00</TableCell>
4075
- * </TableRow>
4076
- * <TableRow>
4077
- * <TableCell>INV002</TableCell>
4078
- * <TableCell>Pending</TableCell>
4079
- * <TableCell>PayPal</TableCell>
4080
- * <TableCell>$150.00</TableCell>
4081
- * </TableRow>
4082
- * </TableBody>
4083
- * <TableFooter>
4084
- * <TableRow>
4085
- * <TableCell colSpan={3}>Total</TableCell>
4086
- * <TableCell>$400.00</TableCell>
4087
- * </TableRow>
4088
- * </TableFooter>
4089
- * </Table>
4090
- *
4091
- * // Table with checkboxes
4092
- * <Table>
4093
- * <TableHeader>
4094
- * <TableRow>
4095
- * <TableHead className="w-12">
4096
- * <Checkbox />
4097
- * </TableHead>
4098
- * <TableHead>Name</TableHead>
4099
- * <TableHead>Email</TableHead>
4100
- * </TableRow>
4101
- * </TableHeader>
4102
- * <TableBody>
4103
- * <TableRow>
4104
- * <TableCell>
4105
- * <Checkbox />
4106
- * </TableCell>
4107
- * <TableCell>John Doe</TableCell>
4108
- * <TableCell>john@example.com</TableCell>
4109
- * </TableRow>
4110
- * </TableBody>
4111
- * </Table>
4112
- * ```
4113
- *
4114
- * @accessibility
4115
- * - WCAG 2.1 AA compliant
4116
- * - Proper table semantics
4117
- * - Screen reader support
4118
- * - Keyboard navigation
4119
- * - Focus management
4120
- * - High contrast support
4121
- * - Caption for table description
4122
- *
4123
- * @dependencies
4124
- * - React 19+ - Hooks and refs
4125
- * - Tailwind CSS - Styling
4126
- */
4127
-
4128
- /**
4129
- * Table component
4130
- * The main table container with semantic HTML structure
4131
- *
4132
- * @param props - Table configuration and styling
4133
- * @param ref - Forwarded ref to the table element
4134
- * @returns JSX.Element - The rendered table element
4135
- *
4136
- * @example
4137
- * ```tsx
4138
- * <Table>
4139
- * <TableHeader>...</TableHeader>
4140
- * <TableBody>...</TableBody>
4141
- * </Table>
4142
- * ```
4143
- */
4144
- declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
4145
- declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
4146
- declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
4147
- declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
4148
- declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
4149
- declare const TableHead: React$1.ForwardRefExoticComponent<React$1.ThHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
4150
- declare const TableCell: React$1.ForwardRefExoticComponent<React$1.TdHTMLAttributes<HTMLTableCellElement> & React$1.RefAttributes<HTMLTableCellElement>>;
4151
- declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
4152
-
4153
- interface PublicPageLayoutProps {
4154
- /** The event code for this public page */
4155
- eventCode: string;
4156
- /** Child components to render */
4157
- children: ReactNode;
4158
- /** Optional event data - if not provided, will be fetched by parent component */
4159
- event?: Event | null;
4160
- /** Loading state - if true, shows loading spinner */
4161
- isLoading?: boolean;
4162
- /** Error state - if provided, shows error message */
4163
- error?: Error | null;
4164
- /** Function to retry loading event data */
4165
- refetch?: () => Promise<void> | void;
4166
- /** Whether to show the footer (default: true) */
4167
- showFooter?: boolean;
4168
- /** Custom error fallback component */
4169
- errorFallback?: React__default.ComponentType<{
4170
- error: Error;
4171
- retry: () => void;
4172
- }>;
4173
- /** Custom loading fallback component */
4174
- loadingFallback?: React__default.ComponentType;
4175
- /** Custom header component */
4176
- customHeader?: ReactNode;
4177
- /** Custom footer component */
4178
- customFooter?: ReactNode;
4179
- /** Whether to show event validation errors (default: true) */
4180
- showValidationErrors?: boolean;
4181
- /** Custom loading message */
4182
- loadingMessage?: string;
4183
- }
4184
- interface PublicPageHeaderProps {
4185
- /** The event data for this public page */
4186
- event?: Event;
4187
- /** The event code for this public page */
4188
- eventCode: string;
4189
- /** Optional page title */
4190
- title?: string;
4191
- /** Optional page description */
4192
- description?: string;
4193
- /** Whether to show the event logo (default: true) */
4194
- showEventLogo?: boolean;
4195
- /** Whether to show the app logo (default: true) */
4196
- showAppLogo?: boolean;
4197
- /** Custom CSS classes for the header */
4198
- className?: string;
4199
- /** Custom content to display in the header */
4200
- children?: ReactNode;
4201
- /** Custom event logo component */
4202
- customEventLogo?: ReactNode;
4203
- }
4204
- declare function PublicPageHeader({ event, eventCode: _eventCode, title, description, showEventLogo, showAppLogo, className, children, customEventLogo }: PublicPageHeaderProps): react_jsx_runtime.JSX.Element;
4205
- interface PublicPageFooterProps {
4206
- /** The event data for this public page */
4207
- event: Event;
4208
- /** Company or organization name */
4209
- companyName?: string;
4210
- /** Current year or custom year for copyright */
4211
- year?: number;
4212
- /** Optional array of navigation links to display */
4213
- links?: Array<{
4214
- label: string;
4215
- href: string;
4216
- }>;
4217
- /** Optional CSS class name */
4218
- className?: string;
4219
- /** Logo image URL */
4220
- logo?: string;
4221
- /** Copyright text */
4222
- copyright?: string;
4223
- /** Footer content - children to render inside footer */
4224
- children?: React__default.ReactNode;
4225
- }
4226
- declare function PublicPageFooter({ event: _event, companyName, year, links, className, logo, copyright, children }: PublicPageFooterProps): react_jsx_runtime.JSX.Element;
4227
- /**
4228
- * Layout component for public pages that don't require authentication
4229
- *
4230
- * This component provides a consistent structure for public event pages
4231
- * with event-specific branding, error handling, and loading states.
4232
- *
4233
- * Automatically applies event colors from the event's event_colours field
4234
- * when an event is provided, ensuring consistent theming across public pages.
4235
- *
4236
- * @param props - Layout configuration and content
4237
- * @returns React element with complete public page layout
4238
- */
4239
- declare function PublicPageLayout({ eventCode, children, event, isLoading, error, refetch, showFooter, errorFallback: ErrorFallback, loadingFallback: LoadingFallback, customHeader, customFooter, showValidationErrors, loadingMessage }: PublicPageLayoutProps): react_jsx_runtime.JSX.Element;
4240
-
4241
- interface PublicPageProviderProps {
4242
- children: ReactNode;
4243
- /** Application name for logo display and branding. Should match the APP_NAME constant used in App.tsx */
4244
- appName?: string;
4245
- }
4246
- /**
4247
- * Provider for public pages that completely isolates them from authentication context
4248
- *
4249
- * This provider:
4250
- * - Does not initialize any authentication providers
4251
- * - Provides environment variables for public data access
4252
- * - Includes error boundary for graceful error handling
4253
- * - Is completely separate from the main app context
4254
- * - Provides appName for consistent logo display
4255
- */
4256
- declare function PublicPageProvider({ children, appName }: PublicPageProviderProps): react_jsx_runtime.JSX.Element;
4257
-
4258
- interface PublicPageContextType {
4259
- isPublicPage: true;
4260
- supabase: ReturnType<typeof createClient<Database>> | null;
4261
- appName: string | null;
4262
- environment: {
4263
- supabaseUrl: string | null;
4264
- supabaseKey: string | null;
4265
- };
4266
- }
4267
-
4268
- /**
4269
- * @file usePublicPageContext Hook
4270
- * @package @jmruthers/pace-core
4271
- * @module Components/PublicLayout
4272
- * @since 1.0.0
4273
- *
4274
- * Hooks for accessing public page context.
4275
- */
4276
-
4277
- /**
4278
- * Hook to access public page context
4279
- *
4280
- * @returns Public page context with environment variables
4281
- */
4282
- declare function usePublicPageContext(): PublicPageContextType;
4283
- /**
4284
- * Hook to check if we're in a public page context
4285
- *
4286
- * @returns True if we're in a public page context
4287
- */
4288
- declare function useIsPublicPage(): boolean;
4289
-
4290
- export { type DialogContentProps as $, AddressField as A, Button as B, Card as C, TableHeader as D, TableBody as E, TableCaption as F, TableCell as G, TableFooter as H, Input as I, TableHead as J, TableRow as K, Label as L, Dialog as M, DialogPortal as N, DialogTrigger as O, Progress as P, DialogClose as Q, DialogContent as R, Switch as S, Textarea as T, DialogHeader as U, DialogBody as V, DialogFooter as W, DialogTitle as X, DialogDescription as Y, type DialogProps as Z, type DialogTriggerProps as _, type ButtonProps as a, NavigationMenu as a$, type DialogPortalProps as a0, type DialogCloseProps as a1, type DialogHeaderProps as a2, type DialogFooterProps as a3, type DialogBodyProps as a4, type DialogSize as a5, Select as a6, SelectGroup as a7, SelectValue as a8, SelectTrigger as a9, Tooltip as aA, TooltipTrigger as aB, TooltipContent as aC, TooltipProvider as aD, TooltipRoot as aE, DataTable as aF, type DataTableProps as aG, Form as aH, FormField as aI, type FormProps as aJ, type FormFieldProps as aK, LoginForm as aL, type LoginFormProps as aM, Header as aN, Footer as aO, type FooterProps as aP, PublicPageLayout as aQ, PublicPageHeader as aR, PublicPageFooter as aS, PublicPageProvider as aT, usePublicPageContext as aU, useIsPublicPage as aV, type PublicPageLayoutProps as aW, type PublicPageHeaderProps as aX, type PublicPageFooterProps as aY, ProtectedRoute as aZ, type ProtectedRouteProps as a_, SelectContent as aa, SelectLabel as ab, SelectItem as ac, SelectSeparator as ad, Tabs as ae, TabsList as af, TabsTrigger as ag, TabsContent as ah, type TabsProps as ai, type TabsListProps as aj, type TabsTriggerProps as ak, type TabsContentProps as al, Calendar as am, type CalendarProps as an, DatePickerWithTimezone as ao, type DatePickerWithTimezoneProps as ap, Toast as aq, Toaster as ar, ToastAction as as, ToastProvider as at, ToastViewport as au, ToastTitle as av, ToastDescription as aw, ToastClose as ax, type ToastActionElement as ay, type ToastProps as az, CardHeader as b, ContextSelector as b0, type ContextSelectorProps as b1, UserMenu as b2, ErrorBoundary as b3, ErrorBoundaryProvider as b4, type ErrorBoundaryProps as b5, type ErrorBoundaryState as b6, type ErrorBoundaryProviderProps as b7, type GlobalErrorHandler as b8, LoadingSpinner as b9, SessionRestorationLoader as ba, type SessionRestorationLoaderProps as bb, FileUpload as bc, type FileUploadProps as bd, FileDisplay as be, type FileDisplayProps as bf, useFileReference as bg, useFileReferenceForRecord as bh, useFileReferenceById as bi, useFilesByCategory as bj, type UseFileReferenceOptions as bk, type UseFileReferenceReturn as bl, type UseFileReferenceForRecordReturn as bm, type PaceAppLayoutProps as bn, PaceAppLayout as bo, type PaceLoginPageProps as bp, PaceLoginPage as bq, type UserMenuProps as br, PasswordChangeForm as bs, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type AddressFieldProps as k, type AddressFieldRef as l, type LabelProps as m, type TextareaProps as n, Alert as o, AlertTitle as p, AlertDescription as q, Avatar as r, type AvatarProps as s, Badge as t, type BadgeProps as u, type BadgeVariant as v, Checkbox as w, type SwitchProps as x, type ProgressProps as y, Table as z };