@jmruthers/pace-core 0.2.4

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 (1009) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/README.md +299 -0
  3. package/dist/DataTable-BHlzyKZP.d.ts +116 -0
  4. package/dist/DataTable-GEY5U7OI.js +100 -0
  5. package/dist/DataTable-GEY5U7OI.js.map +1 -0
  6. package/dist/PublicLoadingSpinner-DztrzuJr.d.ts +3430 -0
  7. package/dist/UnifiedAuthProvider-w66zSCUf.d.ts +160 -0
  8. package/dist/api-GZHIDA4X.js +41 -0
  9. package/dist/api-GZHIDA4X.js.map +1 -0
  10. package/dist/appConfig-BVGyuvI7.d.ts +71 -0
  11. package/dist/appNameResolver-7GHF5ED2.js +22 -0
  12. package/dist/appNameResolver-7GHF5ED2.js.map +1 -0
  13. package/dist/audit-BUW3LMJB.js +16 -0
  14. package/dist/audit-BUW3LMJB.js.map +1 -0
  15. package/dist/chunk-22KLBHPS.js +29 -0
  16. package/dist/chunk-22KLBHPS.js.map +1 -0
  17. package/dist/chunk-24MKLB7U.js +81 -0
  18. package/dist/chunk-24MKLB7U.js.map +1 -0
  19. package/dist/chunk-2MKP6IYD.js +388 -0
  20. package/dist/chunk-2MKP6IYD.js.map +1 -0
  21. package/dist/chunk-2V3Y6YBC.js +114 -0
  22. package/dist/chunk-2V3Y6YBC.js.map +1 -0
  23. package/dist/chunk-5CDJCTOO.js +190 -0
  24. package/dist/chunk-5CDJCTOO.js.map +1 -0
  25. package/dist/chunk-6ZQVSHKL.js +1345 -0
  26. package/dist/chunk-6ZQVSHKL.js.map +1 -0
  27. package/dist/chunk-74C6SNEC.js +77 -0
  28. package/dist/chunk-74C6SNEC.js.map +1 -0
  29. package/dist/chunk-7BNPOCLL.js +178 -0
  30. package/dist/chunk-7BNPOCLL.js.map +1 -0
  31. package/dist/chunk-7JL3T7BO.js +3344 -0
  32. package/dist/chunk-7JL3T7BO.js.map +1 -0
  33. package/dist/chunk-CDQ3PX7L.js +18 -0
  34. package/dist/chunk-CDQ3PX7L.js.map +1 -0
  35. package/dist/chunk-DY5E3AT7.js +1734 -0
  36. package/dist/chunk-DY5E3AT7.js.map +1 -0
  37. package/dist/chunk-ETEJVKYK.js +6032 -0
  38. package/dist/chunk-ETEJVKYK.js.map +1 -0
  39. package/dist/chunk-I5Z3QH5X.js +32 -0
  40. package/dist/chunk-I5Z3QH5X.js.map +1 -0
  41. package/dist/chunk-MZBUOP4P.js +119 -0
  42. package/dist/chunk-MZBUOP4P.js.map +1 -0
  43. package/dist/chunk-N2EUGZRW.js +98 -0
  44. package/dist/chunk-N2EUGZRW.js.map +1 -0
  45. package/dist/chunk-NQ4TOOO6.js +20 -0
  46. package/dist/chunk-NQ4TOOO6.js.map +1 -0
  47. package/dist/chunk-OHXGNT3K.js +21 -0
  48. package/dist/chunk-OHXGNT3K.js.map +1 -0
  49. package/dist/chunk-OKXMUYIB.js +522 -0
  50. package/dist/chunk-OKXMUYIB.js.map +1 -0
  51. package/dist/chunk-PFRRIDYA.js +382 -0
  52. package/dist/chunk-PFRRIDYA.js.map +1 -0
  53. package/dist/chunk-PLDDJCW6.js +49 -0
  54. package/dist/chunk-PLDDJCW6.js.map +1 -0
  55. package/dist/chunk-SS3E6QLB.js +695 -0
  56. package/dist/chunk-SS3E6QLB.js.map +1 -0
  57. package/dist/chunk-TMRLB2LA.js +326 -0
  58. package/dist/chunk-TMRLB2LA.js.map +1 -0
  59. package/dist/chunk-WYB6MBZA.js +5533 -0
  60. package/dist/chunk-WYB6MBZA.js.map +1 -0
  61. package/dist/chunk-YDJW5XTN.js +84 -0
  62. package/dist/chunk-YDJW5XTN.js.map +1 -0
  63. package/dist/components.d.ts +1308 -0
  64. package/dist/components.js +3759 -0
  65. package/dist/components.js.map +1 -0
  66. package/dist/database-C3Szpi5J.d.ts +470 -0
  67. package/dist/hooks.d.ts +449 -0
  68. package/dist/hooks.js +612 -0
  69. package/dist/hooks.js.map +1 -0
  70. package/dist/index.d.ts +385 -0
  71. package/dist/index.js +569 -0
  72. package/dist/index.js.map +1 -0
  73. package/dist/organisation-CO3Sh3_D.d.ts +99 -0
  74. package/dist/providers.d.ts +45 -0
  75. package/dist/providers.js +36 -0
  76. package/dist/providers.js.map +1 -0
  77. package/dist/rbac/eslint-rules.d.ts +52 -0
  78. package/dist/rbac/eslint-rules.js +252 -0
  79. package/dist/rbac/eslint-rules.js.map +1 -0
  80. package/dist/rbac/index.d.ts +1918 -0
  81. package/dist/rbac/index.js +2212 -0
  82. package/dist/rbac/index.js.map +1 -0
  83. package/dist/styles/core.css +401 -0
  84. package/dist/styles/fonts/georama-italic.woff2 +0 -0
  85. package/dist/styles/fonts/georama.woff2 +0 -0
  86. package/dist/styles/fonts/open-sans-italic.woff2 +0 -0
  87. package/dist/styles/fonts/open-sans.woff2 +0 -0
  88. package/dist/styles/fonts/reddit-mono.woff2 +0 -0
  89. package/dist/styles/index.d.ts +36 -0
  90. package/dist/styles/index.js +24 -0
  91. package/dist/styles/index.js.map +1 -0
  92. package/dist/theming/runtime.d.ts +73 -0
  93. package/dist/theming/runtime.js +16 -0
  94. package/dist/theming/runtime.js.map +1 -0
  95. package/dist/types-CInEi-ng.d.ts +316 -0
  96. package/dist/types.d.ts +196 -0
  97. package/dist/types.js +83 -0
  98. package/dist/types.js.map +1 -0
  99. package/dist/unified-CM7T0aTK.d.ts +198 -0
  100. package/dist/useComponentPerformance-DE9l5RkL.d.ts +11 -0
  101. package/dist/usePublicRouteParams-B6i0KtXW.d.ts +477 -0
  102. package/dist/utils.d.ts +639 -0
  103. package/dist/utils.js +1103 -0
  104. package/dist/utils.js.map +1 -0
  105. package/dist/validation-PM_iOaTI.d.ts +159 -0
  106. package/dist/validation.d.ts +138 -0
  107. package/dist/validation.js +477 -0
  108. package/dist/validation.js.map +1 -0
  109. package/docs/INDEX.md +192 -0
  110. package/docs/README.md +165 -0
  111. package/docs/api/.nojekyll +1 -0
  112. package/docs/api/README.md +301 -0
  113. package/docs/api/classes/ErrorBoundary.md +144 -0
  114. package/docs/api/classes/PublicErrorBoundary.md +132 -0
  115. package/docs/api/interfaces/AggregateConfig.md +43 -0
  116. package/docs/api/interfaces/ButtonProps.md +53 -0
  117. package/docs/api/interfaces/CardProps.md +40 -0
  118. package/docs/api/interfaces/ColorPalette.md +7 -0
  119. package/docs/api/interfaces/ColorShade.md +41 -0
  120. package/docs/api/interfaces/DataTableAction.md +200 -0
  121. package/docs/api/interfaces/DataTableColumn.md +300 -0
  122. package/docs/api/interfaces/DataTableProps.md +517 -0
  123. package/docs/api/interfaces/DataTableToolbarButton.md +96 -0
  124. package/docs/api/interfaces/EmptyStateConfig.md +61 -0
  125. package/docs/api/interfaces/EventContextType.md +96 -0
  126. package/docs/api/interfaces/EventLogoProps.md +152 -0
  127. package/docs/api/interfaces/EventProviderProps.md +19 -0
  128. package/docs/api/interfaces/FileSizeLimits.md +7 -0
  129. package/docs/api/interfaces/FileUploadProps.md +154 -0
  130. package/docs/api/interfaces/FooterProps.md +105 -0
  131. package/docs/api/interfaces/InactivityWarningModalProps.md +115 -0
  132. package/docs/api/interfaces/InputProps.md +53 -0
  133. package/docs/api/interfaces/LabelProps.md +107 -0
  134. package/docs/api/interfaces/LoginFormProps.md +184 -0
  135. package/docs/api/interfaces/NavigationItem.md +176 -0
  136. package/docs/api/interfaces/NavigationMenuProps.md +236 -0
  137. package/docs/api/interfaces/Organisation.md +140 -0
  138. package/docs/api/interfaces/OrganisationContextType.md +377 -0
  139. package/docs/api/interfaces/OrganisationMembership.md +140 -0
  140. package/docs/api/interfaces/OrganisationProviderProps.md +19 -0
  141. package/docs/api/interfaces/OrganisationSecurityError.md +62 -0
  142. package/docs/api/interfaces/PaceAppLayoutProps.md +393 -0
  143. package/docs/api/interfaces/PaceLoginPageProps.md +34 -0
  144. package/docs/api/interfaces/PaletteData.md +41 -0
  145. package/docs/api/interfaces/PublicErrorBoundaryProps.md +94 -0
  146. package/docs/api/interfaces/PublicErrorBoundaryState.md +68 -0
  147. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +86 -0
  148. package/docs/api/interfaces/PublicPageFooterProps.md +112 -0
  149. package/docs/api/interfaces/PublicPageHeaderProps.md +138 -0
  150. package/docs/api/interfaces/PublicPageLayoutProps.md +138 -0
  151. package/docs/api/interfaces/StorageConfig.md +41 -0
  152. package/docs/api/interfaces/StorageFileInfo.md +74 -0
  153. package/docs/api/interfaces/StorageFileMetadata.md +140 -0
  154. package/docs/api/interfaces/StorageListOptions.md +86 -0
  155. package/docs/api/interfaces/StorageListResult.md +41 -0
  156. package/docs/api/interfaces/StorageUploadOptions.md +88 -0
  157. package/docs/api/interfaces/StorageUploadResult.md +63 -0
  158. package/docs/api/interfaces/StorageUrlOptions.md +47 -0
  159. package/docs/api/interfaces/StyleImport.md +19 -0
  160. package/docs/api/interfaces/ToastActionElement.md +9 -0
  161. package/docs/api/interfaces/ToastProps.md +9 -0
  162. package/docs/api/interfaces/UnifiedAuthContextType.md +1108 -0
  163. package/docs/api/interfaces/UnifiedAuthProviderProps.md +171 -0
  164. package/docs/api/interfaces/UseInactivityTrackerOptions.md +136 -0
  165. package/docs/api/interfaces/UseInactivityTrackerReturn.md +123 -0
  166. package/docs/api/interfaces/UsePublicEventLogoOptions.md +87 -0
  167. package/docs/api/interfaces/UsePublicEventLogoReturn.md +81 -0
  168. package/docs/api/interfaces/UsePublicEventOptions.md +34 -0
  169. package/docs/api/interfaces/UsePublicEventReturn.md +68 -0
  170. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +94 -0
  171. package/docs/api/interfaces/UserEventAccess.md +118 -0
  172. package/docs/api/interfaces/UserMenuProps.md +86 -0
  173. package/docs/api/interfaces/UserProfile.md +63 -0
  174. package/docs/api/modules.md +4153 -0
  175. package/docs/api-reference/components.md +1623 -0
  176. package/docs/api-reference/hooks.md +627 -0
  177. package/docs/api-reference/providers.md +487 -0
  178. package/docs/api-reference/types.md +1005 -0
  179. package/docs/api-reference/utilities.md +1104 -0
  180. package/docs/app.css.example +53 -0
  181. package/docs/architecture/README.md +577 -0
  182. package/docs/best-practices/README.md +400 -0
  183. package/docs/best-practices/deployment.md +1042 -0
  184. package/docs/best-practices/performance.md +789 -0
  185. package/docs/best-practices/security.md +881 -0
  186. package/docs/best-practices/testing.md +981 -0
  187. package/docs/consuming-app-example.md +290 -0
  188. package/docs/consuming-app-vite-config.md +233 -0
  189. package/docs/core-concepts/authentication.md +98 -0
  190. package/docs/core-concepts/events.md +756 -0
  191. package/docs/core-concepts/organisations.md +790 -0
  192. package/docs/core-concepts/permissions.md +729 -0
  193. package/docs/core-concepts/rbac-system.md +233 -0
  194. package/docs/database-schema-requirements.md +172 -0
  195. package/docs/documentation-style-checklist.md +294 -0
  196. package/docs/examples/navigation-menu-auth-fix.md +344 -0
  197. package/docs/getting-started/examples/README.md +106 -0
  198. package/docs/getting-started/examples/basic-auth-app.md +521 -0
  199. package/docs/getting-started/examples/full-featured-app.md +616 -0
  200. package/docs/getting-started/installation.md +269 -0
  201. package/docs/getting-started/quick-start.md +401 -0
  202. package/docs/implementation-guides/app-layout.md +983 -0
  203. package/docs/implementation-guides/data-tables.md +1898 -0
  204. package/docs/implementation-guides/dynamic-colors.md +195 -0
  205. package/docs/implementation-guides/forms.md +578 -0
  206. package/docs/implementation-guides/hierarchical-datatable.md +850 -0
  207. package/docs/implementation-guides/large-datasets.md +281 -0
  208. package/docs/implementation-guides/navigation.md +844 -0
  209. package/docs/implementation-guides/performance.md +403 -0
  210. package/docs/implementation-guides/permission-enforcement.md +764 -0
  211. package/docs/implementation-guides/public-pages.md +752 -0
  212. package/docs/migration/README.md +493 -0
  213. package/docs/migration/organisation-context-timing-fix.md +217 -0
  214. package/docs/migration/quick-migration-guide.md +320 -0
  215. package/docs/migration/rbac-migration.md +571 -0
  216. package/docs/migration/v0.4.15-tailwind-scanning.md +272 -0
  217. package/docs/migration/v0.4.16-css-first-approach.md +306 -0
  218. package/docs/migration/v0.4.17-source-path-fix.md +229 -0
  219. package/docs/migration-guide.md +168 -0
  220. package/docs/performance/README.md +551 -0
  221. package/docs/print-components/README.md +258 -0
  222. package/docs/print-components/api-reference.md +636 -0
  223. package/docs/print-components/examples/README.md +204 -0
  224. package/docs/print-components/examples/basic-report.tsx +92 -0
  225. package/docs/print-components/examples/card-catalog.tsx +149 -0
  226. package/docs/print-components/examples/cover-page-report.tsx +163 -0
  227. package/docs/print-components/quick-start.md +363 -0
  228. package/docs/quick-reference.md +576 -0
  229. package/docs/rbac/README.md +265 -0
  230. package/docs/rbac/advanced-patterns.md +776 -0
  231. package/docs/rbac/api-reference.md +1033 -0
  232. package/docs/rbac/examples.md +883 -0
  233. package/docs/rbac/getting-started.md +679 -0
  234. package/docs/rbac/quick-start.md +619 -0
  235. package/docs/rbac/super-admin-guide.md +592 -0
  236. package/docs/rbac/troubleshooting.md +316 -0
  237. package/docs/security/README.md +680 -0
  238. package/docs/security/checklist.md +343 -0
  239. package/docs/style-guide.md +522 -0
  240. package/docs/styles/README.md +319 -0
  241. package/docs/testing/README.md +874 -0
  242. package/docs/troubleshooting/README.md +497 -0
  243. package/docs/troubleshooting/common-issues.md +1563 -0
  244. package/docs/troubleshooting/database-view-compatibility.md +119 -0
  245. package/docs/troubleshooting/debugging.md +1117 -0
  246. package/docs/troubleshooting/migration.md +918 -0
  247. package/docs/troubleshooting/organisation-context-setup.md +277 -0
  248. package/docs/troubleshooting/react-hooks-issue-analysis.md +166 -0
  249. package/docs/troubleshooting/styling-issues.md +219 -0
  250. package/docs/troubleshooting/tailwind-content-scanning.md +213 -0
  251. package/docs/usage.md +175 -0
  252. package/docs/visual-testing.md +114 -0
  253. package/package.json +211 -0
  254. package/src/__mocks__/lucide-react.ts +181 -0
  255. package/src/__tests__/README.md +404 -0
  256. package/src/__tests__/debug-provider.unit.test.tsx +67 -0
  257. package/src/__tests__/e2e/workflows.test.tsx +373 -0
  258. package/src/__tests__/hybridPermissions.unit.test.tsx +474 -0
  259. package/src/__tests__/index.integration.test.ts +491 -0
  260. package/src/__tests__/mocks/MockAuthProvider-standalone.tsx +47 -0
  261. package/src/__tests__/mocks/MockAuthProvider.tsx +63 -0
  262. package/src/__tests__/mocks/enhancedSupabaseMock.ts +252 -0
  263. package/src/__tests__/mocks/index.test.ts +23 -0
  264. package/src/__tests__/mocks/index.ts +16 -0
  265. package/src/__tests__/mocks/mockAuth.ts +155 -0
  266. package/src/__tests__/mocks/mockSupabase.ts +83 -0
  267. package/src/__tests__/mocks/mockSupabaseClient.ts +63 -0
  268. package/src/__tests__/mocks/providers.tsx +22 -0
  269. package/src/__tests__/patterns/__tests__/testPatterns.test.ts +394 -0
  270. package/src/__tests__/patterns/testPatterns.ts +124 -0
  271. package/src/__tests__/performance/componentPerformance.performance.test.ts +27 -0
  272. package/src/__tests__/performance/index.ts +24 -0
  273. package/src/__tests__/performance/performanceValidation.performance.test.ts +15 -0
  274. package/src/__tests__/security/security.unit.test.tsx +7 -0
  275. package/src/__tests__/security/securityValidation.security.test.tsx +153 -0
  276. package/src/__tests__/setup.ts +259 -0
  277. package/src/__tests__/setupTests.d.ts +1 -0
  278. package/src/__tests__/shared/componentTestUtils.tsx +475 -0
  279. package/src/__tests__/shared/errorHandlingTestUtils.ts +107 -0
  280. package/src/__tests__/shared/index.ts +81 -0
  281. package/src/__tests__/shared/integrationTestUtils.tsx +375 -0
  282. package/src/__tests__/shared/performanceTestUtils.tsx +476 -0
  283. package/src/__tests__/shared/testUtils.optimized.tsx +627 -0
  284. package/src/__tests__/simple.test.tsx +20 -0
  285. package/src/__tests__/templates/accessibility.test.template.tsx +279 -0
  286. package/src/__tests__/templates/component.test.template.tsx +122 -0
  287. package/src/__tests__/templates/integration.test.template.tsx +199 -0
  288. package/src/__tests__/test-utils/dataFactories.ts +60 -0
  289. package/src/__tests__/test-utils/index.ts +6 -0
  290. package/src/__tests__/typeSafety.unit.test.ts +65 -0
  291. package/src/__tests__/unifiedAuth.unit.test.tsx +151 -0
  292. package/src/__tests__/utils/accessibilityHelpers.ts +254 -0
  293. package/src/__tests__/utils/assertions.ts +50 -0
  294. package/src/__tests__/utils/deterministicHelpers.ts +31 -0
  295. package/src/__tests__/utils/edgeCaseConfig.test.ts +75 -0
  296. package/src/__tests__/utils/edgeCaseConfig.ts +98 -0
  297. package/src/__tests__/utils/mockHelpers.ts +149 -0
  298. package/src/__tests__/utils/mockLoader.ts +101 -0
  299. package/src/__tests__/utils/performanceHelpers.ts +55 -0
  300. package/src/__tests__/utils/performanceTestHelpers.ts +68 -0
  301. package/src/__tests__/utils/testDataFactories.ts +28 -0
  302. package/src/__tests__/utils/testIsolation.ts +67 -0
  303. package/src/__tests__/utils/visualTestHelpers.ts +20 -0
  304. package/src/__tests__/visual/__snapshots__/componentSnapshots.visual.test.tsx.snap +68 -0
  305. package/src/__tests__/visual/__snapshots__/componentVisuals.visual.test.tsx.snap +14 -0
  306. package/src/__tests__/visual/__snapshots__/visualRegression.test.tsx.snap +217 -0
  307. package/src/__tests__/visual/__snapshots__/visualRegression.visual.test.tsx.snap +24 -0
  308. package/src/__tests__/visual/componentSnapshots.visual.test.tsx +33 -0
  309. package/src/__tests__/visual/componentVisuals.visual.test.tsx +12 -0
  310. package/src/__tests__/visual/visualRegression.visual.test.tsx +20 -0
  311. package/src/components/Alert/Alert.tsx +134 -0
  312. package/src/components/Alert/__tests__/Alert.unit.test.tsx +381 -0
  313. package/src/components/Alert/index.ts +2 -0
  314. package/src/components/Avatar/Avatar.tsx +84 -0
  315. package/src/components/Avatar/__tests__/Avatar.unit.test.tsx +232 -0
  316. package/src/components/Avatar/index.ts +2 -0
  317. package/src/components/Button/Button.tsx +270 -0
  318. package/src/components/Button/__tests__/Button.accessibility.test.tsx +131 -0
  319. package/src/components/Button/__tests__/Button.comprehensive.test.tsx +721 -0
  320. package/src/components/Button/__tests__/Button.unit.test.tsx +189 -0
  321. package/src/components/Button/__tests__/EventSelector.integration.test.tsx +285 -0
  322. package/src/components/Button/index.ts +2 -0
  323. package/src/components/Card/Card.tsx +271 -0
  324. package/src/components/Card/__tests__/Card.accessibility.test.tsx +394 -0
  325. package/src/components/Card/__tests__/Card.comprehensive.test.tsx +599 -0
  326. package/src/components/Card/__tests__/Card.integration.test.tsx +673 -0
  327. package/src/components/Card/__tests__/Card.performance.test.tsx +546 -0
  328. package/src/components/Card/__tests__/Card.unit.test.tsx +330 -0
  329. package/src/components/Card/__tests__/Card.visual.test.tsx +599 -0
  330. package/src/components/Card/__tests__/README.md +211 -0
  331. package/src/components/Card/index.ts +1 -0
  332. package/src/components/Checkbox/Checkbox.tsx +75 -0
  333. package/src/components/Checkbox/__mocks__/Checkbox.tsx +2 -0
  334. package/src/components/Checkbox/__tests__/Checkbox.unit.test.tsx +520 -0
  335. package/src/components/Checkbox/index.ts +2 -0
  336. package/src/components/DataTable/DataTable.tsx +440 -0
  337. package/src/components/DataTable/__tests__/DataTable.autoSizing.test.tsx +526 -0
  338. package/src/components/DataTable/__tests__/DataTable.errorHandling.test.tsx +259 -0
  339. package/src/components/DataTable/__tests__/DataTable.hierarchical.test.tsx +675 -0
  340. package/src/components/DataTable/__tests__/DataTable.infinite-loop.test.tsx +324 -0
  341. package/src/components/DataTable/__tests__/DataTable.integration.test.tsx +724 -0
  342. package/src/components/DataTable/__tests__/DataTable.performance.test.tsx +597 -0
  343. package/src/components/DataTable/__tests__/DataTable.permissions.test.tsx +306 -0
  344. package/src/components/DataTable/__tests__/DataTable.regressionFixes.test.tsx +546 -0
  345. package/src/components/DataTable/__tests__/DataTable.selection.controlled.test.tsx +386 -0
  346. package/src/components/DataTable/__tests__/DataTable.selection.test.tsx +338 -0
  347. package/src/components/DataTable/__tests__/DataTable.userWorkflows.test.tsx +310 -0
  348. package/src/components/DataTable/__tests__/DataTable.workflowValidation.test.tsx +489 -0
  349. package/src/components/DataTable/__tests__/DataTable.workflows.test.tsx +701 -0
  350. package/src/components/DataTable/__tests__/README.md +136 -0
  351. package/src/components/DataTable/__tests__/mocks/MockRBACProvider.tsx +66 -0
  352. package/src/components/DataTable/__tests__/performance-regression.test.tsx +788 -0
  353. package/src/components/DataTable/__tests__/performance.test.tsx +365 -0
  354. package/src/components/DataTable/__tests__/test-utils/dataFactories.ts +103 -0
  355. package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +382 -0
  356. package/src/components/DataTable/__tests__/test-utils.ts +94 -0
  357. package/src/components/DataTable/components/ActionButtons.tsx +177 -0
  358. package/src/components/DataTable/components/BulkOperationsDropdown.tsx +160 -0
  359. package/src/components/DataTable/components/ColumnFilter.tsx +114 -0
  360. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +100 -0
  361. package/src/components/DataTable/components/DataTableBody.tsx +462 -0
  362. package/src/components/DataTable/components/DataTableCore.tsx +869 -0
  363. package/src/components/DataTable/components/DataTableErrorBoundary.tsx +214 -0
  364. package/src/components/DataTable/components/DataTableHeader.tsx +31 -0
  365. package/src/components/DataTable/components/DataTableModals.tsx +87 -0
  366. package/src/components/DataTable/components/DataTableToolbar.tsx +251 -0
  367. package/src/components/DataTable/components/DraggableColumnHeader.tsx +148 -0
  368. package/src/components/DataTable/components/EditableRow.tsx +160 -0
  369. package/src/components/DataTable/components/EmptyState.tsx +64 -0
  370. package/src/components/DataTable/components/ExpandButton.tsx +113 -0
  371. package/src/components/DataTable/components/FilterRow.tsx +101 -0
  372. package/src/components/DataTable/components/GroupHeader.tsx +42 -0
  373. package/src/components/DataTable/components/GroupingDropdown.tsx +96 -0
  374. package/src/components/DataTable/components/ImportModal.tsx +345 -0
  375. package/src/components/DataTable/components/LoadingState.tsx +12 -0
  376. package/src/components/DataTable/components/PaginationControls.tsx +332 -0
  377. package/src/components/DataTable/components/UnifiedTableBody.tsx +911 -0
  378. package/src/components/DataTable/components/ViewRowModal.tsx +68 -0
  379. package/src/components/DataTable/components/VirtualizedDataTable.tsx +593 -0
  380. package/src/components/DataTable/components/__tests__/ActionButtons.unit.test.tsx +150 -0
  381. package/src/components/DataTable/components/__tests__/BulkOperationsDropdown.test.tsx +224 -0
  382. package/src/components/DataTable/components/__tests__/ColumnVisibilityDropdown.unit.test.tsx +244 -0
  383. package/src/components/DataTable/components/__tests__/DataTable.accessibility.test.tsx +523 -0
  384. package/src/components/DataTable/components/__tests__/DataTable.integration.test.tsx +401 -0
  385. package/src/components/DataTable/components/__tests__/DataTable.performance.test.tsx +161 -0
  386. package/src/components/DataTable/components/__tests__/DataTable.real.test.tsx +251 -0
  387. package/src/components/DataTable/components/__tests__/DataTable.security.test.tsx +172 -0
  388. package/src/components/DataTable/components/__tests__/DataTable.unit.test.tsx +290 -0
  389. package/src/components/DataTable/components/__tests__/DataTableBody.unit.test.tsx +147 -0
  390. package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.unit.test.tsx +182 -0
  391. package/src/components/DataTable/components/__tests__/DataTableHeader.unit.test.tsx +143 -0
  392. package/src/components/DataTable/components/__tests__/DataTableModals.unit.test.tsx +123 -0
  393. package/src/components/DataTable/components/__tests__/EditableRow.unit.test.tsx +660 -0
  394. package/src/components/DataTable/components/__tests__/EmptyState.unit.test.tsx +256 -0
  395. package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +498 -0
  396. package/src/components/DataTable/components/__tests__/FilterRow.unit.test.tsx +112 -0
  397. package/src/components/DataTable/components/__tests__/FilteringToggle.unit.test.tsx +130 -0
  398. package/src/components/DataTable/components/__tests__/GroupHeader.unit.test.tsx +172 -0
  399. package/src/components/DataTable/components/__tests__/GroupingDropdown.unit.test.tsx +222 -0
  400. package/src/components/DataTable/components/__tests__/ImportModal.unit.test.tsx +780 -0
  401. package/src/components/DataTable/components/__tests__/LoadingState.unit.test.tsx +65 -0
  402. package/src/components/DataTable/components/__tests__/PaginationControls.unit.test.tsx +634 -0
  403. package/src/components/DataTable/components/__tests__/StateComponents.unit.test.tsx +48 -0
  404. package/src/components/DataTable/components/__tests__/UnifiedTableBody.hierarchical.test.tsx +541 -0
  405. package/src/components/DataTable/components/__tests__/ViewRowModal.unit.test.tsx +228 -0
  406. package/src/components/DataTable/components/__tests__/VirtualizedDataTable.unit.test.tsx +568 -0
  407. package/src/components/DataTable/components/index.ts +17 -0
  408. package/src/components/DataTable/context/DataTableContext.tsx +97 -0
  409. package/src/components/DataTable/core/ActionManager.ts +235 -0
  410. package/src/components/DataTable/core/ColumnFactory.ts +268 -0
  411. package/src/components/DataTable/core/ColumnManager.ts +205 -0
  412. package/src/components/DataTable/core/DataManager.ts +188 -0
  413. package/src/components/DataTable/core/DataTableContext.tsx +182 -0
  414. package/src/components/DataTable/core/LocalDataAdapter.ts +264 -0
  415. package/src/components/DataTable/core/PluginRegistry.ts +229 -0
  416. package/src/components/DataTable/core/StateManager.ts +311 -0
  417. package/src/components/DataTable/core/__tests__/ActionManager.unit.test.ts +405 -0
  418. package/src/components/DataTable/core/__tests__/ArchitectureIntegration.unit.test.tsx +445 -0
  419. package/src/components/DataTable/core/__tests__/ColumnFactory.unit.test.ts +288 -0
  420. package/src/components/DataTable/core/__tests__/ColumnManager.unit.test.ts +623 -0
  421. package/src/components/DataTable/core/__tests__/DataManager.unit.test.ts +431 -0
  422. package/src/components/DataTable/core/__tests__/DataTableContext.unit.test.tsx +433 -0
  423. package/src/components/DataTable/core/__tests__/LocalDataAdapter.unit.test.ts +422 -0
  424. package/src/components/DataTable/core/__tests__/PluginRegistry.unit.test.tsx +207 -0
  425. package/src/components/DataTable/core/__tests__/StateManager.unit.test.ts +278 -0
  426. package/src/components/DataTable/core/index.ts +8 -0
  427. package/src/components/DataTable/core/interfaces.ts +338 -0
  428. package/src/components/DataTable/examples/AutoSizingExample.tsx +180 -0
  429. package/src/components/DataTable/examples/ColumnSizingComparison.tsx +235 -0
  430. package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +418 -0
  431. package/src/components/DataTable/examples/HierarchicalExample.tsx +472 -0
  432. package/src/components/DataTable/examples/InitialPageSizeExample.tsx +173 -0
  433. package/src/components/DataTable/examples/PerformanceExample.tsx +502 -0
  434. package/src/components/DataTable/examples/__tests__/PerformanceExample.unit.test.tsx +281 -0
  435. package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.unit.test.ts +407 -0
  436. package/src/components/DataTable/hooks/__tests__/useColumnReordering.unit.test.ts +679 -0
  437. package/src/components/DataTable/hooks/useColumnOrderPersistence.ts +95 -0
  438. package/src/components/DataTable/hooks/useColumnReordering.ts +110 -0
  439. package/src/components/DataTable/hooks/useDataTableState.ts +325 -0
  440. package/src/components/DataTable/hooks/useHierarchicalState.ts +174 -0
  441. package/src/components/DataTable/index.ts +70 -0
  442. package/src/components/DataTable/styles.ts +171 -0
  443. package/src/components/DataTable/types.ts +475 -0
  444. package/src/components/DataTable/utils/__tests__/columnSizing.test.ts +237 -0
  445. package/src/components/DataTable/utils/__tests__/debugTools.unit.test.ts +267 -0
  446. package/src/components/DataTable/utils/__tests__/errorHandling.unit.test.ts +467 -0
  447. package/src/components/DataTable/utils/__tests__/exportUtils.unit.test.ts +380 -0
  448. package/src/components/DataTable/utils/__tests__/flexibleImport.unit.test.ts +233 -0
  449. package/src/components/DataTable/utils/__tests__/performanceUtils.unit.test.ts +414 -0
  450. package/src/components/DataTable/utils/columnSizing.ts +125 -0
  451. package/src/components/DataTable/utils/debugTools.ts +583 -0
  452. package/src/components/DataTable/utils/errorHandling.ts +494 -0
  453. package/src/components/DataTable/utils/exportUtils.ts +126 -0
  454. package/src/components/DataTable/utils/flexibleImport.ts +510 -0
  455. package/src/components/DataTable/utils/hierarchicalSorting.ts +151 -0
  456. package/src/components/DataTable/utils/hierarchicalUtils.ts +218 -0
  457. package/src/components/DataTable/utils/index.ts +1 -0
  458. package/src/components/DataTable/utils/performanceUtils.ts +351 -0
  459. package/src/components/Dialog/Dialog.tsx +782 -0
  460. package/src/components/Dialog/README.md +804 -0
  461. package/src/components/Dialog/__tests__/Dialog.accessibility.test.tsx +521 -0
  462. package/src/components/Dialog/__tests__/Dialog.auto-size.example.tsx +157 -0
  463. package/src/components/Dialog/__tests__/Dialog.enhanced.test.tsx +538 -0
  464. package/src/components/Dialog/__tests__/Dialog.unit.test.tsx +1373 -0
  465. package/src/components/Dialog/examples/BasicHtmlTest.tsx +55 -0
  466. package/src/components/Dialog/examples/DebugHtmlExample.tsx +68 -0
  467. package/src/components/Dialog/examples/HtmlDialogExample.tsx +202 -0
  468. package/src/components/Dialog/examples/SimpleHtmlTest.tsx +61 -0
  469. package/src/components/Dialog/examples/SmartDialogExample.tsx +322 -0
  470. package/src/components/Dialog/examples/__tests__/SmartDialogExample.unit.test.tsx +151 -0
  471. package/src/components/Dialog/index.ts +12 -0
  472. package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +611 -0
  473. package/src/components/Dialog/utils/safeHtml.ts +185 -0
  474. package/src/components/ErrorBoundary/ErrorBoundary.tsx +312 -0
  475. package/src/components/ErrorBoundary/__tests__/ErrorBoundary.accessibility.test.tsx +517 -0
  476. package/src/components/ErrorBoundary/__tests__/ErrorBoundary.integration.test.tsx +572 -0
  477. package/src/components/ErrorBoundary/__tests__/ErrorBoundary.unit.test.tsx +579 -0
  478. package/src/components/ErrorBoundary/index.ts +8 -0
  479. package/src/components/EventSelector/EventSelector.tsx +360 -0
  480. package/src/components/EventSelector/__tests__/EventSelector.test.tsx +528 -0
  481. package/src/components/EventSelector/index.ts +3 -0
  482. package/src/components/EventSelector/types.ts +79 -0
  483. package/src/components/FileUpload/FileUpload.example.tsx +218 -0
  484. package/src/components/FileUpload/FileUpload.tsx +237 -0
  485. package/src/components/FileUpload/__tests__/FileUpload.integration.test.tsx +992 -0
  486. package/src/components/FileUpload/__tests__/FileUpload.real.test.tsx +927 -0
  487. package/src/components/FileUpload/__tests__/FileUpload.test.tsx +855 -0
  488. package/src/components/FileUpload/__tests__/FileUpload.unit.test.tsx +1311 -0
  489. package/src/components/FileUpload/__tests__/FileUpload.unmocked.test.tsx +937 -0
  490. package/src/components/FileUpload/index.ts +6 -0
  491. package/src/components/Footer/Footer.tsx +197 -0
  492. package/src/components/Footer/__tests__/Footer.accessibility.test.tsx +359 -0
  493. package/src/components/Footer/__tests__/Footer.integration.test.tsx +353 -0
  494. package/src/components/Footer/__tests__/Footer.performance.test.tsx +309 -0
  495. package/src/components/Footer/__tests__/Footer.unit.test.tsx +309 -0
  496. package/src/components/Footer/__tests__/Footer.visual.test.tsx +335 -0
  497. package/src/components/Footer/index.ts +17 -0
  498. package/src/components/Form/Form.tsx +166 -0
  499. package/src/components/Form/FormErrorSummary.tsx +113 -0
  500. package/src/components/Form/FormField.tsx +249 -0
  501. package/src/components/Form/FormFieldset.tsx +127 -0
  502. package/src/components/Form/FormLiveRegion.tsx +198 -0
  503. package/src/components/Form/__tests__/Form.accessibility.test.tsx +820 -0
  504. package/src/components/Form/__tests__/Form.unit.test.tsx +305 -0
  505. package/src/components/Form/__tests__/FormErrorSummary.unit.test.tsx +285 -0
  506. package/src/components/Form/__tests__/FormFieldset.unit.test.tsx +241 -0
  507. package/src/components/Form/index.ts +26 -0
  508. package/src/components/Header/Header.tsx +301 -0
  509. package/src/components/Header/__tests__/Header.accessibility.test.tsx +382 -0
  510. package/src/components/Header/__tests__/Header.comprehensive.test.tsx +509 -0
  511. package/src/components/Header/__tests__/Header.unit.test.tsx +335 -0
  512. package/src/components/Header/index.ts +4 -0
  513. package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +196 -0
  514. package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +164 -0
  515. package/src/components/InactivityWarningModal/__tests__/InactivityWarningModal.unit.test.tsx +224 -0
  516. package/src/components/InactivityWarningModal/index.ts +9 -0
  517. package/src/components/Input/Input.tsx +201 -0
  518. package/src/components/Input/__mocks__/Input.tsx +2 -0
  519. package/src/components/Input/__tests__/Input.accessibility.test.tsx +632 -0
  520. package/src/components/Input/__tests__/Input.unit.test.tsx +1121 -0
  521. package/src/components/Input/index.ts +9 -0
  522. package/src/components/Label/Label.tsx +186 -0
  523. package/src/components/Label/__tests__/Label.accessibility.test.tsx +239 -0
  524. package/src/components/Label/__tests__/Label.unit.test.tsx +331 -0
  525. package/src/components/Label/index.ts +2 -0
  526. package/src/components/LoadingSpinner/LoadingSpinner.tsx +98 -0
  527. package/src/components/LoadingSpinner/__tests__/LoadingSpinner.accessibility.test.tsx +116 -0
  528. package/src/components/LoadingSpinner/__tests__/LoadingSpinner.unit.test.tsx +144 -0
  529. package/src/components/LoadingSpinner/index.ts +3 -0
  530. package/src/components/LoginForm/LoginForm.tsx +273 -0
  531. package/src/components/LoginForm/__tests__/LoginForm.accessibility.test.tsx +201 -0
  532. package/src/components/LoginForm/__tests__/LoginForm.unit.test.tsx +119 -0
  533. package/src/components/LoginForm/index.ts +3 -0
  534. package/src/components/NavigationMenu/NavigationMenu.tsx +698 -0
  535. package/src/components/NavigationMenu/__tests__/NavigationMenu.accessibility.test.tsx +378 -0
  536. package/src/components/NavigationMenu/__tests__/NavigationMenu.enhanced.test.tsx +768 -0
  537. package/src/components/NavigationMenu/__tests__/NavigationMenu.integration.test.tsx +576 -0
  538. package/src/components/NavigationMenu/__tests__/NavigationMenu.performance.test.tsx +585 -0
  539. package/src/components/NavigationMenu/__tests__/NavigationMenu.real.component.test.tsx +783 -0
  540. package/src/components/NavigationMenu/__tests__/NavigationMenu.security.enhanced.test.tsx +810 -0
  541. package/src/components/NavigationMenu/__tests__/NavigationMenu.security.test.tsx +494 -0
  542. package/src/components/NavigationMenu/__tests__/NavigationMenu.unit.test.tsx +331 -0
  543. package/src/components/NavigationMenu/__tests__/NavigationMenu.userWorkflows.test.tsx +347 -0
  544. package/src/components/NavigationMenu/__tests__/NavigationMenu.workflows.test.tsx +584 -0
  545. package/src/components/NavigationMenu/index.ts +10 -0
  546. package/src/components/NavigationMenu/types.ts +85 -0
  547. package/src/components/OrganisationSelector/OrganisationSelector.tsx +304 -0
  548. package/src/components/OrganisationSelector/__tests__/OrganisationSelector.unit.test.tsx +664 -0
  549. package/src/components/OrganisationSelector/index.ts +9 -0
  550. package/src/components/PaceAppLayout/PaceAppLayout.tsx +699 -0
  551. package/src/components/PaceAppLayout/README.md +278 -0
  552. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.accessibility.test.tsx +288 -0
  553. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.integration.test.tsx +889 -0
  554. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +629 -0
  555. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.security.test.tsx +782 -0
  556. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.unit.test.tsx +904 -0
  557. package/src/components/PaceAppLayout/index.ts +1 -0
  558. package/src/components/PaceLoginPage/PaceLoginPage.tsx +221 -0
  559. package/src/components/PaceLoginPage/__tests__/PaceLoginPage.accessibility.test.tsx +463 -0
  560. package/src/components/PaceLoginPage/__tests__/PaceLoginPage.integration.test.tsx +586 -0
  561. package/src/components/PaceLoginPage/__tests__/PaceLoginPage.unit.test.tsx +533 -0
  562. package/src/components/PaceLoginPage/index.ts +1 -0
  563. package/src/components/PasswordReset/PasswordChangeForm.tsx +186 -0
  564. package/src/components/PasswordReset/PasswordResetForm.tsx +201 -0
  565. package/src/components/PasswordReset/__tests__/PasswordChangeForm.accessibility.test.tsx +408 -0
  566. package/src/components/PasswordReset/__tests__/PasswordChangeForm.unit.test.tsx +561 -0
  567. package/src/components/PasswordReset/__tests__/PasswordReset.integration.test.tsx +304 -0
  568. package/src/components/PasswordReset/__tests__/PasswordResetForm.accessibility.test.tsx +20 -0
  569. package/src/components/PasswordReset/__tests__/PasswordResetForm.unit.test.tsx +523 -0
  570. package/src/components/PasswordReset/__tests__/__mocks__/UnifiedAuthProvider.ts +29 -0
  571. package/src/components/PasswordReset/index.ts +4 -0
  572. package/src/components/Print/__tests__/Print.comprehensive.test.tsx +331 -0
  573. package/src/components/PrintButton/PrintButton.tsx +321 -0
  574. package/src/components/PrintButton/PrintButtonGroup.tsx +84 -0
  575. package/src/components/PrintButton/PrintToolbar.tsx +94 -0
  576. package/src/components/PrintButton/__tests__/PrintButton.unit.test.tsx +429 -0
  577. package/src/components/PrintButton/__tests__/PrintButtonGroup.unit.test.tsx +277 -0
  578. package/src/components/PrintButton/__tests__/PrintToolbar.unit.test.tsx +264 -0
  579. package/src/components/PrintButton/examples/PrintButtonShowcase.tsx +438 -0
  580. package/src/components/PrintButton/index.ts +33 -0
  581. package/src/components/PrintButton/types.ts +173 -0
  582. package/src/components/PrintCard/PrintCard.tsx +154 -0
  583. package/src/components/PrintCard/PrintCardContent.tsx +57 -0
  584. package/src/components/PrintCard/PrintCardFooter.tsx +60 -0
  585. package/src/components/PrintCard/PrintCardGrid.tsx +91 -0
  586. package/src/components/PrintCard/PrintCardHeader.tsx +78 -0
  587. package/src/components/PrintCard/PrintCardImage.tsx +81 -0
  588. package/src/components/PrintCard/__tests__/PrintCard.unit.test.tsx +233 -0
  589. package/src/components/PrintCard/__tests__/PrintCardContent.test.tsx +284 -0
  590. package/src/components/PrintCard/__tests__/PrintCardGrid.unit.test.tsx +214 -0
  591. package/src/components/PrintCard/__tests__/PrintCardImage.unit.test.tsx +264 -0
  592. package/src/components/PrintCard/examples/PrintCardShowcase.tsx +239 -0
  593. package/src/components/PrintCard/index.ts +34 -0
  594. package/src/components/PrintCard/types.ts +171 -0
  595. package/src/components/PrintDataTable/PrintDataTable.tsx +215 -0
  596. package/src/components/PrintDataTable/PrintTableGroup.tsx +90 -0
  597. package/src/components/PrintDataTable/PrintTableRow.tsx +76 -0
  598. package/src/components/PrintDataTable/__tests__/PrintDataTable.unit.test.tsx +361 -0
  599. package/src/components/PrintDataTable/__tests__/PrintTableGroup.unit.test.tsx +314 -0
  600. package/src/components/PrintDataTable/__tests__/PrintTableRow.unit.test.tsx +362 -0
  601. package/src/components/PrintDataTable/index.ts +25 -0
  602. package/src/components/PrintDataTable/types.ts +67 -0
  603. package/src/components/PrintFooter/PrintFooter.tsx +183 -0
  604. package/src/components/PrintFooter/PrintFooterContent.tsx +71 -0
  605. package/src/components/PrintFooter/PrintFooterInfo.tsx +86 -0
  606. package/src/components/PrintFooter/PrintPageNumber.tsx +90 -0
  607. package/src/components/PrintFooter/__tests__/PrintFooter.unit.test.tsx +500 -0
  608. package/src/components/PrintFooter/__tests__/PrintFooterContent.unit.test.tsx +321 -0
  609. package/src/components/PrintFooter/__tests__/PrintFooterInfo.unit.test.tsx +335 -0
  610. package/src/components/PrintFooter/__tests__/PrintPageNumber.unit.test.tsx +340 -0
  611. package/src/components/PrintFooter/examples/PrintFooterShowcase.tsx +390 -0
  612. package/src/components/PrintFooter/index.ts +30 -0
  613. package/src/components/PrintFooter/types.ts +149 -0
  614. package/src/components/PrintGrid/PrintGrid.tsx +180 -0
  615. package/src/components/PrintGrid/PrintGridBreakpoint.tsx +109 -0
  616. package/src/components/PrintGrid/PrintGridContainer.tsx +128 -0
  617. package/src/components/PrintGrid/PrintGridItem.tsx +220 -0
  618. package/src/components/PrintGrid/__tests__/PrintGrid.unit.test.tsx +340 -0
  619. package/src/components/PrintGrid/__tests__/PrintGridBreakpoint.unit.test.tsx +261 -0
  620. package/src/components/PrintGrid/__tests__/PrintGridContainer.unit.test.tsx +338 -0
  621. package/src/components/PrintGrid/__tests__/PrintGridItem.unit.test.tsx +338 -0
  622. package/src/components/PrintGrid/examples/PrintGridShowcase.tsx +359 -0
  623. package/src/components/PrintGrid/index.ts +31 -0
  624. package/src/components/PrintGrid/types.ts +159 -0
  625. package/src/components/PrintHeader/PrintCoverHeader.tsx +230 -0
  626. package/src/components/PrintHeader/PrintHeader.tsx +150 -0
  627. package/src/components/PrintHeader/__tests__/PrintCoverHeader.unit.test.tsx +309 -0
  628. package/src/components/PrintHeader/__tests__/PrintHeader.unit.test.tsx +202 -0
  629. package/src/components/PrintHeader/index.ts +17 -0
  630. package/src/components/PrintHeader/types.ts +42 -0
  631. package/src/components/PrintLayout/PrintLayout.tsx +122 -0
  632. package/src/components/PrintLayout/PrintLayoutContext.tsx +66 -0
  633. package/src/components/PrintLayout/PrintPageBreak.tsx +52 -0
  634. package/src/components/PrintLayout/__tests__/PrintLayout.unit.test.tsx +238 -0
  635. package/src/components/PrintLayout/examples/PrintShowcase.tsx +230 -0
  636. package/src/components/PrintLayout/index.ts +19 -0
  637. package/src/components/PrintLayout/types.ts +37 -0
  638. package/src/components/PrintPageBreak/PrintPageBreak.tsx +120 -0
  639. package/src/components/PrintPageBreak/PrintPageBreakGroup.tsx +90 -0
  640. package/src/components/PrintPageBreak/PrintPageBreakIndicator.tsx +112 -0
  641. package/src/components/PrintPageBreak/__tests__/PrintPageBreak.unit.test.tsx +263 -0
  642. package/src/components/PrintPageBreak/__tests__/PrintPageBreakGroup.unit.test.tsx +239 -0
  643. package/src/components/PrintPageBreak/__tests__/PrintPageBreakIndicator.unit.test.tsx +235 -0
  644. package/src/components/PrintPageBreak/examples/PrintPageBreakShowcase.tsx +279 -0
  645. package/src/components/PrintPageBreak/index.ts +23 -0
  646. package/src/components/PrintPageBreak/types.ts +94 -0
  647. package/src/components/PrintSection/PrintColumn.tsx +104 -0
  648. package/src/components/PrintSection/PrintDivider.tsx +101 -0
  649. package/src/components/PrintSection/PrintSection.tsx +129 -0
  650. package/src/components/PrintSection/PrintSectionContent.tsx +75 -0
  651. package/src/components/PrintSection/PrintSectionHeader.tsx +97 -0
  652. package/src/components/PrintSection/__tests__/PrintColumn.unit.test.tsx +385 -0
  653. package/src/components/PrintSection/__tests__/PrintDivider.unit.test.tsx +373 -0
  654. package/src/components/PrintSection/__tests__/PrintSection.unit.test.tsx +390 -0
  655. package/src/components/PrintSection/__tests__/PrintSectionContent.unit.test.tsx +321 -0
  656. package/src/components/PrintSection/__tests__/PrintSectionHeader.unit.test.tsx +334 -0
  657. package/src/components/PrintSection/examples/PrintSectionShowcase.tsx +258 -0
  658. package/src/components/PrintSection/index.ts +33 -0
  659. package/src/components/PrintSection/types.ts +155 -0
  660. package/src/components/PrintText/PrintText.tsx +116 -0
  661. package/src/components/PrintText/__tests__/PrintText.unit.test.tsx +351 -0
  662. package/src/components/PrintText/index.ts +16 -0
  663. package/src/components/PrintText/types.ts +24 -0
  664. package/src/components/Progress/Progress.tsx +116 -0
  665. package/src/components/Progress/__tests__/Progress.accessibility.test.tsx +240 -0
  666. package/src/components/Progress/__tests__/Progress.unit.test.tsx +242 -0
  667. package/src/components/Progress/index.ts +3 -0
  668. package/src/components/PublicLayout/EventLogo.tsx +287 -0
  669. package/src/components/PublicLayout/PublicErrorBoundary.tsx +279 -0
  670. package/src/components/PublicLayout/PublicLoadingSpinner.tsx +208 -0
  671. package/src/components/PublicLayout/PublicPageContextChecker.tsx +130 -0
  672. package/src/components/PublicLayout/PublicPageDebugger.tsx +104 -0
  673. package/src/components/PublicLayout/PublicPageDiagnostic.tsx +162 -0
  674. package/src/components/PublicLayout/PublicPageFooter.tsx +124 -0
  675. package/src/components/PublicLayout/PublicPageHeader.tsx +178 -0
  676. package/src/components/PublicLayout/PublicPageLayout.tsx +232 -0
  677. package/src/components/PublicLayout/PublicPageProvider.tsx +137 -0
  678. package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +761 -0
  679. package/src/components/PublicLayout/__tests__/PublicErrorBoundary.simplified.test.tsx +228 -0
  680. package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +228 -0
  681. package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +459 -0
  682. package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +362 -0
  683. package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +522 -0
  684. package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +599 -0
  685. package/src/components/PublicLayout/__tests__/PublicPageProvider.test.tsx +513 -0
  686. package/src/components/PublicLayout/index.ts +51 -0
  687. package/src/components/RBAC/PagePermissionGuard.tsx +274 -0
  688. package/src/components/RBAC/RBACGuard.tsx +143 -0
  689. package/src/components/RBAC/RBACProvider.tsx +186 -0
  690. package/src/components/RBAC/RoleBasedContent.tsx +129 -0
  691. package/src/components/RBAC/__tests__/PagePermissionGuard.unit.test.tsx +674 -0
  692. package/src/components/RBAC/__tests__/RBAC.integration.test.tsx +573 -0
  693. package/src/components/RBAC/__tests__/RBACGuard.unit.test.tsx +467 -0
  694. package/src/components/RBAC/__tests__/RBACProvider.accessibility.test.tsx +475 -0
  695. package/src/components/RBAC/__tests__/RBACProvider.advanced.test.tsx +569 -0
  696. package/src/components/RBAC/__tests__/RBACProvider.integration.test.tsx +352 -0
  697. package/src/components/RBAC/__tests__/RBACProvider.unit.test.tsx +128 -0
  698. package/src/components/RBAC/__tests__/RoleBasedContent.unit.test.tsx +657 -0
  699. package/src/components/RBAC/index.ts +23 -0
  700. package/src/components/Select/Select.tsx +654 -0
  701. package/src/components/Select/__tests__/SearchableSelect.unit.test.tsx +437 -0
  702. package/src/components/Select/__tests__/Select.accessibility.test.tsx +1202 -0
  703. package/src/components/Select/__tests__/Select.actual.test.tsx +774 -0
  704. package/src/components/Select/__tests__/Select.comprehensive.test.tsx +837 -0
  705. package/src/components/Select/__tests__/Select.enhanced.test.tsx +1101 -0
  706. package/src/components/Select/__tests__/Select.integration.test.tsx +772 -0
  707. package/src/components/Select/__tests__/Select.performance.test.tsx +695 -0
  708. package/src/components/Select/__tests__/Select.real-world.test.tsx +1046 -0
  709. package/src/components/Select/__tests__/Select.search-algorithms.test.tsx +968 -0
  710. package/src/components/Select/__tests__/Select.unit.test.tsx +647 -0
  711. package/src/components/Select/__tests__/Select.utils.test.tsx +890 -0
  712. package/src/components/Select/index.ts +1 -0
  713. package/src/components/SuperAdminGuard.tsx +116 -0
  714. package/src/components/Table/Table.tsx +222 -0
  715. package/src/components/Table/__tests__/Table.accessibility.test.tsx +233 -0
  716. package/src/components/Table/__tests__/Table.unit.test.tsx +235 -0
  717. package/src/components/Table/index.ts +11 -0
  718. package/src/components/Toast/Toast.tsx +339 -0
  719. package/src/components/Toast/__tests__/Toast.accessibility.test.tsx +238 -0
  720. package/src/components/Toast/__tests__/Toast.integration.test.tsx +699 -0
  721. package/src/components/Toast/__tests__/Toast.unit.test.tsx +750 -0
  722. package/src/components/Toast/index.ts +14 -0
  723. package/src/components/Tooltip/Tooltip.tsx +167 -0
  724. package/src/components/Tooltip/__tests__/Tooltip.accessibility.test.tsx +121 -0
  725. package/src/components/Tooltip/__tests__/Tooltip.unit.test.tsx +185 -0
  726. package/src/components/Tooltip/index.ts +7 -0
  727. package/src/components/UserMenu/UserMenu.tsx +243 -0
  728. package/src/components/UserMenu/__tests__/UserMenu.accessibility.test.tsx +139 -0
  729. package/src/components/UserMenu/__tests__/UserMenu.integration.test.tsx +188 -0
  730. package/src/components/UserMenu/__tests__/UserMenu.unit.test.tsx +458 -0
  731. package/src/components/UserMenu/index.ts +3 -0
  732. package/src/components/__tests__/EdgeCaseTesting.enhanced.test.tsx +523 -0
  733. package/src/components/__tests__/ErrorTesting.enhanced.test.tsx +455 -0
  734. package/src/components/__tests__/SuperAdminGuard.test.tsx +456 -0
  735. package/src/components/__tests__/SuperAdminGuard.unit.test.tsx +456 -0
  736. package/src/components/examples/PermissionExample.tsx +150 -0
  737. package/src/components/examples/__tests__/PermissionExample.unit.test.tsx +360 -0
  738. package/src/components/index.ts +434 -0
  739. package/src/components.ts +19 -0
  740. package/src/constants/performance.ts +14 -0
  741. package/src/examples/CorrectPublicPageImplementation.tsx +301 -0
  742. package/src/examples/PublicEventPage.tsx +274 -0
  743. package/src/examples/PublicPageApp.tsx +308 -0
  744. package/src/examples/PublicPageUsageExample.tsx +216 -0
  745. package/src/fonts/georama-italic.woff2 +0 -0
  746. package/src/fonts/georama.woff2 +0 -0
  747. package/src/fonts/open-sans-italic.woff2 +0 -0
  748. package/src/fonts/open-sans.woff2 +0 -0
  749. package/src/fonts/reddit-mono.woff2 +0 -0
  750. package/src/hooks/__tests__/hooks.integration.test.tsx +575 -0
  751. package/src/hooks/__tests__/useApiFetch.unit.test.ts +115 -0
  752. package/src/hooks/__tests__/useComponentPerformance.unit.test.tsx +133 -0
  753. package/src/hooks/__tests__/useDebounce.unit.test.ts +82 -0
  754. package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +293 -0
  755. package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +385 -0
  756. package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +286 -0
  757. package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +838 -0
  758. package/src/hooks/__tests__/usePermissionCache.unit.test.ts +627 -0
  759. package/src/hooks/__tests__/useRBAC.unit.test.ts +903 -0
  760. package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +537 -0
  761. package/src/hooks/__tests__/useToast.unit.test.tsx +62 -0
  762. package/src/hooks/__tests__/useZodForm.unit.test.tsx +37 -0
  763. package/src/hooks/index.ts +56 -0
  764. package/src/hooks/public/__tests__/usePublicEvent.test.tsx +397 -0
  765. package/src/hooks/public/__tests__/usePublicEventLogo.test.tsx +690 -0
  766. package/src/hooks/public/__tests__/usePublicRouteParams.test.tsx +449 -0
  767. package/src/hooks/public/index.ts +34 -0
  768. package/src/hooks/public/usePublicEvent.ts +261 -0
  769. package/src/hooks/public/usePublicEventLogo.ts +285 -0
  770. package/src/hooks/public/usePublicRouteParams.ts +259 -0
  771. package/src/hooks/useAppConfig.ts +94 -0
  772. package/src/hooks/useComponentPerformance.ts +39 -0
  773. package/src/hooks/useDataTablePerformance.ts +387 -0
  774. package/src/hooks/useDataTableState.ts +110 -0
  775. package/src/hooks/useDebounce.ts +18 -0
  776. package/src/hooks/useFocusManagement.ts +161 -0
  777. package/src/hooks/useFocusTrap.ts +155 -0
  778. package/src/hooks/useInactivityTracker.ts +372 -0
  779. package/src/hooks/useIsMobile.ts +42 -0
  780. package/src/hooks/useKeyboardShortcuts.ts +237 -0
  781. package/src/hooks/useOrganisationPermissions.ts +208 -0
  782. package/src/hooks/useOrganisationSecurity.ts +262 -0
  783. package/src/hooks/usePerformanceMonitor.ts +128 -0
  784. package/src/hooks/usePermissionCache.ts +455 -0
  785. package/src/hooks/useRBAC.ts +262 -0
  786. package/src/hooks/useSecureDataAccess.ts +586 -0
  787. package/src/hooks/useStorage.ts +274 -0
  788. package/src/hooks/useToast.ts +242 -0
  789. package/src/hooks/useZodForm.ts +28 -0
  790. package/src/index.ts +200 -0
  791. package/src/providers/AuthProvider.tsx +369 -0
  792. package/src/providers/EventProvider.tsx +324 -0
  793. package/src/providers/InactivityProvider.tsx +238 -0
  794. package/src/providers/OrganisationProvider.tsx +588 -0
  795. package/src/providers/RBACProvider.tsx +622 -0
  796. package/src/providers/UnifiedAuthProvider.tsx +327 -0
  797. package/src/providers/__tests__/EventProvider.unit.test.tsx +768 -0
  798. package/src/providers/__tests__/OrganisationProvider.basic.test.tsx +116 -0
  799. package/src/providers/__tests__/OrganisationProvider.unit.test.tsx +1312 -0
  800. package/src/providers/__tests__/UnifiedAuthProvider.inactivity.test.tsx +601 -0
  801. package/src/providers/__tests__/UnifiedAuthProvider.unit.test.tsx +675 -0
  802. package/src/providers/__tests__/index.unit.test.ts +78 -0
  803. package/src/providers/index.ts +15 -0
  804. package/src/rbac/README.md +885 -0
  805. package/src/rbac/__tests__/PagePermissionGuard.test.tsx +673 -0
  806. package/src/rbac/__tests__/README.md +170 -0
  807. package/src/rbac/__tests__/RoleBasedRouter.test.tsx +709 -0
  808. package/src/rbac/__tests__/TestContext.tsx +72 -0
  809. package/src/rbac/__tests__/__mocks__/cache.ts +144 -0
  810. package/src/rbac/__tests__/__mocks__/supabase.ts +152 -0
  811. package/src/rbac/__tests__/adapters-hooks-comprehensive.test.tsx +782 -0
  812. package/src/rbac/__tests__/adapters-hooks.test.tsx +561 -0
  813. package/src/rbac/__tests__/adapters.comprehensive.test.tsx +963 -0
  814. package/src/rbac/__tests__/adapters.test.tsx +444 -0
  815. package/src/rbac/__tests__/api.test.ts +620 -0
  816. package/src/rbac/__tests__/audit-observability-comprehensive.test.ts +792 -0
  817. package/src/rbac/__tests__/audit-observability.test.ts +549 -0
  818. package/src/rbac/__tests__/audit.test.ts +616 -0
  819. package/src/rbac/__tests__/build-contract-compliance-simple.test.ts +230 -0
  820. package/src/rbac/__tests__/cache-invalidation-comprehensive.test.ts +889 -0
  821. package/src/rbac/__tests__/cache-invalidation.test.ts +457 -0
  822. package/src/rbac/__tests__/cache.test.ts +458 -0
  823. package/src/rbac/__tests__/components-navigation-guard.enhanced.test.tsx +859 -0
  824. package/src/rbac/__tests__/components-navigation-guard.test.tsx +895 -0
  825. package/src/rbac/__tests__/components-navigation-provider.test.tsx +692 -0
  826. package/src/rbac/__tests__/components-page-permission-guard.test.tsx +673 -0
  827. package/src/rbac/__tests__/components-page-permission-provider.test.tsx +614 -0
  828. package/src/rbac/__tests__/components-permission-enforcer.enhanced.fixed.test.tsx +836 -0
  829. package/src/rbac/__tests__/components-permission-enforcer.enhanced.test.tsx +837 -0
  830. package/src/rbac/__tests__/components-permission-enforcer.test.tsx +825 -0
  831. package/src/rbac/__tests__/components-role-based-router.test.tsx +709 -0
  832. package/src/rbac/__tests__/components-secure-data-provider.test.tsx +607 -0
  833. package/src/rbac/__tests__/config.test.ts +583 -0
  834. package/src/rbac/__tests__/core-logic-unit.test.ts +190 -0
  835. package/src/rbac/__tests__/core-permission-logic-comprehensive.test.ts +1467 -0
  836. package/src/rbac/__tests__/core-permission-logic-fixed.test.ts +151 -0
  837. package/src/rbac/__tests__/core-permission-logic-simple.test.ts +968 -0
  838. package/src/rbac/__tests__/core-permission-logic.test.ts +966 -0
  839. package/src/rbac/__tests__/edge-cases-comprehensive.test.ts +988 -0
  840. package/src/rbac/__tests__/edge-cases.test.ts +654 -0
  841. package/src/rbac/__tests__/engine.test.ts +361 -0
  842. package/src/rbac/__tests__/engine.unit.test.ts +361 -0
  843. package/src/rbac/__tests__/hooks.enhanced.test.tsx +979 -0
  844. package/src/rbac/__tests__/hooks.fixed.test.tsx +475 -0
  845. package/src/rbac/__tests__/hooks.test.tsx +385 -0
  846. package/src/rbac/__tests__/index.test.ts +269 -0
  847. package/src/rbac/__tests__/integration.enhanced.test.tsx +824 -0
  848. package/src/rbac/__tests__/page-permission-guard-super-admin.test.tsx +261 -0
  849. package/src/rbac/__tests__/performance.enhanced.test.tsx +724 -0
  850. package/src/rbac/__tests__/permissions.test.ts +383 -0
  851. package/src/rbac/__tests__/requires-event.test.ts +330 -0
  852. package/src/rbac/__tests__/scope-isolation-comprehensive.test.ts +1349 -0
  853. package/src/rbac/__tests__/scope-isolation.test.ts +755 -0
  854. package/src/rbac/__tests__/secure-client-rls-comprehensive.test.ts +592 -0
  855. package/src/rbac/__tests__/secure-client-rls.test.ts +377 -0
  856. package/src/rbac/__tests__/security.test.ts +296 -0
  857. package/src/rbac/__tests__/setup.ts +228 -0
  858. package/src/rbac/__tests__/test-utils-enhanced.tsx +400 -0
  859. package/src/rbac/__tests__/types.test.ts +685 -0
  860. package/src/rbac/adapters.tsx +726 -0
  861. package/src/rbac/api.ts +337 -0
  862. package/src/rbac/audit-enhanced.ts +339 -0
  863. package/src/rbac/audit.ts +338 -0
  864. package/src/rbac/cache.ts +213 -0
  865. package/src/rbac/components/EnhancedNavigationMenu.tsx +294 -0
  866. package/src/rbac/components/NavigationGuard.tsx +294 -0
  867. package/src/rbac/components/NavigationProvider.tsx +314 -0
  868. package/src/rbac/components/PagePermissionGuard.tsx +430 -0
  869. package/src/rbac/components/PagePermissionProvider.tsx +274 -0
  870. package/src/rbac/components/PermissionEnforcer.tsx +307 -0
  871. package/src/rbac/components/RoleBasedRouter.tsx +425 -0
  872. package/src/rbac/components/SecureDataProvider.tsx +319 -0
  873. package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +631 -0
  874. package/src/rbac/components/__tests__/NavigationProvider.test.tsx +667 -0
  875. package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +647 -0
  876. package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +496 -0
  877. package/src/rbac/components/index.ts +64 -0
  878. package/src/rbac/config.ts +133 -0
  879. package/src/rbac/docs/event-based-apps.md +285 -0
  880. package/src/rbac/engine.ts +1026 -0
  881. package/src/rbac/eslint-rules.js +285 -0
  882. package/src/rbac/examples/CompleteRBACExample.tsx +323 -0
  883. package/src/rbac/examples/EventBasedApp.tsx +238 -0
  884. package/src/rbac/hooks.ts +555 -0
  885. package/src/rbac/index.ts +114 -0
  886. package/src/rbac/permissions.ts +293 -0
  887. package/src/rbac/secureClient.ts +244 -0
  888. package/src/rbac/security.ts +346 -0
  889. package/src/rbac/testing/__tests__/index.test.tsx +342 -0
  890. package/src/rbac/testing/index.tsx +340 -0
  891. package/src/rbac/types.ts +341 -0
  892. package/src/rbac/utils/__tests__/eventContext.test.ts +428 -0
  893. package/src/rbac/utils/__tests__/eventContext.unit.test.ts +428 -0
  894. package/src/rbac/utils/eventContext.ts +83 -0
  895. package/src/styles/__tests__/styles.unit.test.ts +164 -0
  896. package/src/styles/core.css +401 -0
  897. package/src/styles/index.ts +51 -0
  898. package/src/test-dom-cleanup.test.tsx +38 -0
  899. package/src/theming/__tests__/README.md +335 -0
  900. package/src/theming/__tests__/runtime.accessibility.test.ts +474 -0
  901. package/src/theming/__tests__/runtime.error.test.ts +616 -0
  902. package/src/theming/__tests__/runtime.integration.test.ts +376 -0
  903. package/src/theming/__tests__/runtime.performance.test.ts +411 -0
  904. package/src/theming/__tests__/runtime.unit.test.ts +470 -0
  905. package/src/theming/runtime.ts +187 -0
  906. package/src/types/__tests__/database.unit.test.ts +489 -0
  907. package/src/types/__tests__/guards.unit.test.ts +146 -0
  908. package/src/types/__tests__/index.unit.test.ts +77 -0
  909. package/src/types/__tests__/organisation.unit.test.ts +713 -0
  910. package/src/types/__tests__/rbac.unit.test.ts +621 -0
  911. package/src/types/__tests__/security.unit.test.ts +347 -0
  912. package/src/types/__tests__/supabase.unit.test.ts +658 -0
  913. package/src/types/__tests__/theme.unit.test.ts +218 -0
  914. package/src/types/__tests__/unified.unit.test.ts +537 -0
  915. package/src/types/__tests__/validation.unit.test.ts +616 -0
  916. package/src/types/database.ts +472 -0
  917. package/src/types/guards.ts +30 -0
  918. package/src/types/index.ts +25 -0
  919. package/src/types/organisation.ts +184 -0
  920. package/src/types/security.ts +70 -0
  921. package/src/types/supabase.ts +166 -0
  922. package/src/types/theme.ts +6 -0
  923. package/src/types/unified.ts +262 -0
  924. package/src/types/validation.ts +164 -0
  925. package/src/types/vitest-globals.d.ts +43 -0
  926. package/src/utils/__mocks__/supabaseMock.ts +75 -0
  927. package/src/utils/__mocks__/supabaseMock.tsx +198 -0
  928. package/src/utils/__tests__/appConfig.unit.test.ts +55 -0
  929. package/src/utils/__tests__/appNameResolver.unit.test.ts +137 -0
  930. package/src/utils/__tests__/audit.unit.test.ts +69 -0
  931. package/src/utils/__tests__/auth-utils.unit.test.ts +70 -0
  932. package/src/utils/__tests__/bundleAnalysis.unit.test.ts +317 -0
  933. package/src/utils/__tests__/cn.unit.test.ts +34 -0
  934. package/src/utils/__tests__/deviceFingerprint.unit.test.ts +480 -0
  935. package/src/utils/__tests__/dynamicUtils.unit.test.ts +322 -0
  936. package/src/utils/__tests__/formatDate.unit.test.ts +109 -0
  937. package/src/utils/__tests__/formatting.unit.test.ts +66 -0
  938. package/src/utils/__tests__/index.unit.test.ts +251 -0
  939. package/src/utils/__tests__/lazyLoad.unit.test.tsx +309 -0
  940. package/src/utils/__tests__/organisationContext.unit.test.ts +192 -0
  941. package/src/utils/__tests__/performanceBudgets.unit.test.ts +259 -0
  942. package/src/utils/__tests__/permissionTypes.unit.test.ts +250 -0
  943. package/src/utils/__tests__/permissionUtils.unit.test.ts +362 -0
  944. package/src/utils/__tests__/sanitization.unit.test.ts +346 -0
  945. package/src/utils/__tests__/schemaUtils.unit.test.ts +441 -0
  946. package/src/utils/__tests__/secureDataAccess.unit.test.ts +334 -0
  947. package/src/utils/__tests__/secureErrors.unit.test.ts +377 -0
  948. package/src/utils/__tests__/secureStorage.unit.test.ts +293 -0
  949. package/src/utils/__tests__/security.unit.test.ts +127 -0
  950. package/src/utils/__tests__/securityMonitor.unit.test.ts +280 -0
  951. package/src/utils/__tests__/sessionTracking.unit.test.ts +370 -0
  952. package/src/utils/__tests__/validation.unit.test.ts +84 -0
  953. package/src/utils/__tests__/validationUtils.unit.test.ts +571 -0
  954. package/src/utils/appConfig.ts +47 -0
  955. package/src/utils/appIdResolver.ts +130 -0
  956. package/src/utils/appNameResolver.ts +190 -0
  957. package/src/utils/audit.ts +127 -0
  958. package/src/utils/auth-utils.ts +96 -0
  959. package/src/utils/bundleAnalysis.ts +129 -0
  960. package/src/utils/cn.ts +7 -0
  961. package/src/utils/debugLogger.ts +46 -0
  962. package/src/utils/deviceFingerprint.ts +215 -0
  963. package/src/utils/dynamicUtils.ts +105 -0
  964. package/src/utils/formatting.ts +77 -0
  965. package/src/utils/index.ts +145 -0
  966. package/src/utils/lazyLoad.tsx +44 -0
  967. package/src/utils/organisationContext.ts +135 -0
  968. package/src/utils/performanceBenchmark.ts +64 -0
  969. package/src/utils/performanceBudgets.ts +111 -0
  970. package/src/utils/permissionTypes.ts +37 -0
  971. package/src/utils/permissionUtils.ts +31 -0
  972. package/src/utils/print/PrintDataProcessor.ts +390 -0
  973. package/src/utils/print/__tests__/PrintDataProcessor.unit.test.ts +219 -0
  974. package/src/utils/print/__tests__/usePrintOptimization.unit.test.tsx +353 -0
  975. package/src/utils/print/examples/PrintUtilitiesShowcase.tsx +397 -0
  976. package/src/utils/print/index.ts +29 -0
  977. package/src/utils/print/types.ts +196 -0
  978. package/src/utils/print/usePrintOptimization.ts +272 -0
  979. package/src/utils/sanitization.ts +264 -0
  980. package/src/utils/schemaUtils.ts +37 -0
  981. package/src/utils/secureDataAccess.ts +361 -0
  982. package/src/utils/secureErrors.ts +79 -0
  983. package/src/utils/secureStorage.ts +244 -0
  984. package/src/utils/security.ts +156 -0
  985. package/src/utils/securityMonitor.ts +45 -0
  986. package/src/utils/sessionTracking.ts +170 -0
  987. package/src/utils/storage/README.md +348 -0
  988. package/src/utils/storage/__tests__/config.unit.test.ts +206 -0
  989. package/src/utils/storage/__tests__/helpers.unit.test.ts +646 -0
  990. package/src/utils/storage/__tests__/index.unit.test.ts +167 -0
  991. package/src/utils/storage/__tests__/types.unit.test.ts +441 -0
  992. package/src/utils/storage/config.ts +100 -0
  993. package/src/utils/storage/helpers.ts +359 -0
  994. package/src/utils/storage/index.ts +36 -0
  995. package/src/utils/storage/types.ts +90 -0
  996. package/src/utils/validation.ts +111 -0
  997. package/src/utils/validationUtils.ts +120 -0
  998. package/src/validation/__tests__/common.unit.test.ts +101 -0
  999. package/src/validation/__tests__/csrf.unit.test.ts +302 -0
  1000. package/src/validation/__tests__/passwordSchema.unit.test.ts +98 -0
  1001. package/src/validation/__tests__/sqlInjectionProtection.unit.test.ts +466 -0
  1002. package/src/validation/common.ts +53 -0
  1003. package/src/validation/csrf.ts +214 -0
  1004. package/src/validation/index.ts +43 -0
  1005. package/src/validation/passwordSchema.ts +125 -0
  1006. package/src/validation/sanitization.ts +96 -0
  1007. package/src/validation/schemaUtils.ts +42 -0
  1008. package/src/validation/sqlInjectionProtection.ts +242 -0
  1009. package/src/validation/user.ts +34 -0
@@ -0,0 +1,3430 @@
1
+ import * as React from 'react';
2
+ import React__default, { Component, ReactNode, ErrorInfo } from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
5
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
6
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
9
+ import * as ToastPrimitives from '@radix-ui/react-toast';
10
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
11
+ import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn } from 'react-hook-form';
12
+ import { z } from 'zod';
13
+ import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
14
+ import { r as Event } from './unified-CM7T0aTK.js';
15
+ import { O as Organisation } from './organisation-CO3Sh3_D.js';
16
+
17
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ /** Visual variant of the button */
19
+ variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
20
+ /** Size of the button */
21
+ size?: 'default' | 'sm' | 'lg' | 'icon';
22
+ /** Whether to render as a different element using Radix Slot */
23
+ asChild?: boolean;
24
+ }
25
+ /**
26
+ * Button Component
27
+ * A flexible, accessible button component with multiple variants and sizes.
28
+ *
29
+ * @component
30
+ * @example
31
+ * ```tsx
32
+ * // Basic button
33
+ * <Button>Click me</Button>
34
+ *
35
+ * // Button with variant and size
36
+ * <Button variant="destructive" size="lg">Delete</Button>
37
+ *
38
+ * // Button as child (composition)
39
+ * <Button asChild>
40
+ * <Link href="/dashboard">Go to Dashboard</Link>
41
+ * </Button>
42
+ * ```
43
+ */
44
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
45
+
46
+ /**
47
+ * @file Card Component Suite
48
+ * @package @jmruthers/pace-core
49
+ * @module Components
50
+ * @since 0.1.0
51
+ *
52
+ * A flexible card component suite for displaying content with consistent styling.
53
+ * Includes Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardActions, and HoverCard variants.
54
+ * Uses semantic HTML elements for better accessibility and structure.
55
+ *
56
+ * Features:
57
+ * - Semantic HTML structure (article, header, main, footer, etc.)
58
+ * - Modular card structure (header, content, footer, actions, etc.)
59
+ * - CardContent uses main element for primary content (accessible when nested)
60
+ * - Consistent padding, border, and shadow
61
+ * - Responsive and accessible
62
+ * - HoverCard for popover-style cards
63
+ * - Proper heading hierarchy and semantic elements
64
+ *
65
+ * @example
66
+ * ```tsx
67
+ * // Basic card with semantic HTML structure
68
+ * <Card>
69
+ * <CardHeader>
70
+ * <CardTitle>Article Title</CardTitle>
71
+ * <CardDescription>Brief description of the article content</CardDescription>
72
+ * </CardHeader>
73
+ * <CardContent>
74
+ * <p>Main content goes here with proper semantic structure.</p>
75
+ * <p>Additional paragraphs and content.</p>
76
+ * </CardContent>
77
+ * <CardFooter>
78
+ * <CardActions>
79
+ * <Button>Primary Action</Button>
80
+ * <Button variant="outline">Secondary Action</Button>
81
+ * </CardActions>
82
+ * </CardFooter>
83
+ * </Card>
84
+ *
85
+ * // Semantic HTML structure:
86
+ * // - Card: <article> element for self-contained content
87
+ * // - CardHeader: <header> element for card heading area
88
+ * // - CardContent: <main> element for primary card content
89
+ * // - CardFooter: <footer> element for card footer area
90
+ * // - CardActions: <nav> element for action buttons
91
+ *
92
+ * // HoverCard usage with semantic structure
93
+ * <HoverCard>
94
+ * <HoverCardTrigger>Hover me</HoverCardTrigger>
95
+ * <HoverCardContent>
96
+ * <p>Popover content with semantic elements</p>
97
+ * </HoverCardContent>
98
+ * </HoverCard>
99
+ * ```
100
+ *
101
+ * @accessibility
102
+ * - Uses semantic HTML structure (article, header, main, footer, nav)
103
+ * - Focusable and keyboard accessible
104
+ * - Proper heading hierarchy for screen readers
105
+ * - HoverCard supports mouse and keyboard interaction
106
+ * - Screen reader friendly with semantic landmarks
107
+ */
108
+
109
+ interface CardProps extends React.HTMLAttributes<HTMLElement> {
110
+ /** Visual variant of the card */
111
+ variant?: 'default' | 'outline' | 'ghost';
112
+ /** Size of the card */
113
+ size?: 'default' | 'sm' | 'lg';
114
+ }
115
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLElement>>;
116
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
117
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
118
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
119
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
120
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
121
+ declare const CardActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
122
+ type CardActionsProps = React.HTMLAttributes<HTMLElement>;
123
+
124
+ /**
125
+ * @file Input Component Suite
126
+ * @package @jmruthers/pace-core
127
+ * @module Input
128
+ * @since 0.1.0
129
+ *
130
+ * A comprehensive input component suite including Input and InputGroup.
131
+ * Provides flexible, accessible input components with consistent styling and behavior.
132
+ *
133
+ * Features:
134
+ * - Multiple input variants (default, destructive)
135
+ * - Multiple input sizes (sm, md, lg)
136
+ * - Error state styling
137
+ * - Input grouping with consistent spacing
138
+ * - Horizontal and vertical orientation support
139
+ * - Forwarded ref support
140
+ * - Composition support
141
+ *
142
+ * @example
143
+ * ```tsx
144
+ * // Basic input
145
+ * <Input placeholder="Enter text" />
146
+ *
147
+ * // Input with variants and sizes
148
+ * <Input
149
+ * variant="destructive"
150
+ * size="lg"
151
+ * placeholder="Error input"
152
+ * />
153
+ *
154
+ * // Input group
155
+ * <InputGroup orientation="horizontal" spacing="md">
156
+ * <Input placeholder="First name" />
157
+ * <Input placeholder="Last name" />
158
+ * </InputGroup>
159
+ *
160
+ * // Vertical input group
161
+ * <InputGroup orientation="vertical" spacing="lg">
162
+ * <Input placeholder="Email" type="email" />
163
+ * <Input placeholder="Password" type="password" />
164
+ * </InputGroup>
165
+ * ```
166
+ *
167
+ * @accessibility
168
+ * - Proper ARIA attributes and roles
169
+ * - Keyboard navigation support
170
+ * - Screen reader friendly
171
+ * - Focus management
172
+ */
173
+
174
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
175
+ /**
176
+ * Input variant style
177
+ */
178
+ variant?: 'default' | 'destructive';
179
+ /**
180
+ * Input size
181
+ */
182
+ size?: 'sm' | 'md' | 'lg';
183
+ /**
184
+ * Error state for styling
185
+ */
186
+ error?: boolean;
187
+ }
188
+ /**
189
+ * Input component
190
+ * A flexible, accessible input component with multiple variants and sizes
191
+ *
192
+ * @param props - Input configuration and styling
193
+ * @param ref - Forwarded ref to the input element
194
+ * @returns JSX.Element - The rendered input element
195
+ *
196
+ * @example
197
+ * ```tsx
198
+ * // Basic input
199
+ * <Input placeholder="Enter your name" />
200
+ *
201
+ * // Input with error state
202
+ * <Input
203
+ * placeholder="Email"
204
+ * type="email"
205
+ * error={true}
206
+ * />
207
+ *
208
+ * // Large input with destructive variant
209
+ * <Input
210
+ * variant="destructive"
211
+ * size="lg"
212
+ * placeholder="Error input"
213
+ * />
214
+ * ```
215
+ */
216
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
217
+
218
+ /**
219
+ * @file Label Component
220
+ * @package @jmruthers/pace-core
221
+ * @module Components/Label
222
+ * @since 0.1.0
223
+ *
224
+ * An accessible label component built on top of Radix UI primitives.
225
+ * Provides form labels with helper text, error states, and required indicators.
226
+ *
227
+ * Features:
228
+ * - Proper label association with form controls
229
+ * - Required field indicators
230
+ * - Helper text support
231
+ * - Error state display
232
+ * - Customizable styling
233
+ * - Screen reader friendly
234
+ * - Keyboard accessible
235
+ *
236
+ * @example
237
+ * ```tsx
238
+ * // Basic label
239
+ * <Label htmlFor="email">Email Address</Label>
240
+ * <Input id="email" type="email" />
241
+ *
242
+ * // Label with required indicator
243
+ * <Label htmlFor="name" required>
244
+ * Full Name
245
+ * </Label>
246
+ * <Input id="name" />
247
+ *
248
+ * // Label with helper text
249
+ * <Label
250
+ * htmlFor="password"
251
+ * required
252
+ * helperText="Must be at least 8 characters"
253
+ * >
254
+ * Password
255
+ * </Label>
256
+ * <Input id="password" type="password" />
257
+ *
258
+ * // Label with error state
259
+ * <Label
260
+ * htmlFor="email"
261
+ * error="Please enter a valid email address"
262
+ * >
263
+ * Email Address
264
+ * </Label>
265
+ * <Input id="email" type="email" />
266
+ *
267
+ * // Custom required indicator
268
+ * <Label
269
+ * htmlFor="terms"
270
+ * required
271
+ * requiredIndicator="(required)"
272
+ * >
273
+ * Accept Terms
274
+ * </Label>
275
+ * <Checkbox id="terms" />
276
+ * ```
277
+ *
278
+ * @accessibility
279
+ * - WCAG 2.1 AA compliant
280
+ * - Proper label association with htmlFor
281
+ * - Screen reader announcements for errors
282
+ * - Required field indicators for screen readers
283
+ * - Error messages with role="alert"
284
+ * - High contrast support
285
+ *
286
+ * @dependencies
287
+ * - @radix-ui/react-label - Core label functionality
288
+ * - class-variance-authority - Variant styling
289
+ * - React 18+ - Hooks and refs
290
+ * - Tailwind CSS - Styling
291
+ */
292
+
293
+ /**
294
+ * Props for the Label component
295
+ */
296
+ interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
297
+ /** Whether the field is required */
298
+ required?: boolean;
299
+ /** Custom required indicator (default: '*') */
300
+ requiredIndicator?: React.ReactNode;
301
+ /** Whether to hide the required indicator visually */
302
+ hideRequiredIndicator?: boolean;
303
+ /** Helper text to display below the label */
304
+ helperText?: string;
305
+ /** CSS classes for helper text styling */
306
+ helperTextClassName?: string;
307
+ /** Error message to display */
308
+ error?: string;
309
+ /** CSS classes for error message styling */
310
+ errorClassName?: string;
311
+ }
312
+ /**
313
+ * Label component
314
+ * An accessible label with helper text and error state support
315
+ *
316
+ * @param props - Label configuration and styling
317
+ * @param ref - Forwarded ref to the label element
318
+ * @returns JSX.Element - The rendered label with optional helper text and errors
319
+ *
320
+ * @example
321
+ * ```tsx
322
+ * <Label htmlFor="email" required helperText="We'll never share your email">
323
+ * Email Address
324
+ * </Label>
325
+ * ```
326
+ */
327
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
328
+
329
+ /**
330
+ * @file Alert Component Suite
331
+ * @package @jmruthers/pace-core
332
+ * @module Components
333
+ * @since 0.1.0
334
+ *
335
+ * A flexible and accessible alert component for displaying important messages.
336
+ * Includes Alert, AlertTitle, and AlertDescription subcomponents.
337
+ *
338
+ * Features:
339
+ * - Multiple visual variants (default, destructive, inline)
340
+ * - Title and description support
341
+ * - ARIA role="alert" for accessibility
342
+ * - Keyboard and screen reader accessible
343
+ * - Composable with icons and actions
344
+ * - Inline variant for lightweight text formatting
345
+ *
346
+ * @example
347
+ * ```tsx
348
+ * // Basic alert
349
+ * <Alert>
350
+ * <AlertTitle>Success</AlertTitle>
351
+ * <AlertDescription>Your changes have been saved.</AlertDescription>
352
+ * </Alert>
353
+ *
354
+ * // Destructive alert with icon
355
+ * <Alert variant="destructive">
356
+ * <ErrorIcon />
357
+ * <div>
358
+ * <AlertTitle>Error</AlertTitle>
359
+ * <AlertDescription>Something went wrong.</AlertDescription>
360
+ * </div>
361
+ * </Alert>
362
+ *
363
+ * // Inline alert (renders as fragment with strong/span)
364
+ * <Alert variant="inline">
365
+ * <AlertTitle>Note:</AlertTitle>
366
+ * <AlertDescription>This is an inline message.</AlertDescription>
367
+ * </Alert>
368
+ * ```
369
+ *
370
+ * @accessibility
371
+ * - Uses role="alert" for screen reader announcement
372
+ * - Title and description are semantically structured
373
+ * - Supports keyboard navigation and focus
374
+ */
375
+
376
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
377
+ variant?: "default" | "destructive" | "inline";
378
+ } & React.RefAttributes<HTMLDivElement>>;
379
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
380
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
381
+
382
+ /**
383
+ * @file Avatar Component Suite
384
+ * @package @jmruthers/pace-core
385
+ * @module Components
386
+ * @since 0.1.0
387
+ *
388
+ * A flexible and accessible avatar component for displaying user profile images or initials.
389
+ * Includes Avatar, AvatarImage, and AvatarFallback subcomponents.
390
+ *
391
+ * Features:
392
+ * - Circular avatar display
393
+ * - Image, fallback, and initials support
394
+ * - Customizable size and style
395
+ * - Keyboard and screen reader accessible
396
+ * - Graceful fallback for missing images
397
+ *
398
+ * @example
399
+ * ```tsx
400
+ * // Basic avatar with image
401
+ * <Avatar>
402
+ * <AvatarImage src="/user.jpg" alt="User" />
403
+ * <AvatarFallback>AB</AvatarFallback>
404
+ * </Avatar>
405
+ *
406
+ * // Avatar with fallback only
407
+ * <Avatar>
408
+ * <AvatarFallback>JD</AvatarFallback>
409
+ * </Avatar>
410
+ * ```
411
+ *
412
+ * @accessibility
413
+ * - Uses alt text for images
414
+ * - Fallback content is accessible to screen readers
415
+ * - Keyboard focusable and navigable
416
+ */
417
+
418
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
419
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
420
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
421
+
422
+ /**
423
+ * @file Checkbox Component
424
+ * @package @jmruthers/pace-core
425
+ * @module Components
426
+ * @since 0.1.0
427
+ *
428
+ * An accessible checkbox component built on top of Radix UI's Checkbox primitive.
429
+ * Provides a customizable checkbox input with proper keyboard and screen reader support.
430
+ *
431
+ * Features:
432
+ * - Customizable styling via className
433
+ * - Built-in focus and hover states
434
+ * - Disabled state support
435
+ * - Checked state indicator
436
+ * - Full keyboard navigation
437
+ * - Screen reader support
438
+ *
439
+ * @example
440
+ * ```tsx
441
+ * // Basic usage
442
+ * <Checkbox />
443
+ *
444
+ * // With label
445
+ * <div className="flex items-center space-x-2">
446
+ * <Checkbox id="terms" />
447
+ * <label htmlFor="terms">Accept terms and conditions</label>
448
+ * </div>
449
+ *
450
+ * // Disabled state
451
+ * <Checkbox disabled />
452
+ *
453
+ * // Controlled component
454
+ * const [checked, setChecked] = React.useState(false);
455
+ * <Checkbox
456
+ * checked={checked}
457
+ * onCheckedChange={setChecked}
458
+ * />
459
+ * ```
460
+ *
461
+ * @accessibility
462
+ * - Uses Radix UI's accessible checkbox primitive
463
+ * - Proper keyboard navigation (Space to toggle)
464
+ * - Screen reader announcements for state changes
465
+ * - Focus visible styles for keyboard users
466
+ * - ARIA attributes handled automatically
467
+ */
468
+
469
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
470
+
471
+ /**
472
+ * @file Progress Component
473
+ * @package @jmruthers/pace-core
474
+ * @module Components/Progress
475
+ * @since 0.1.0
476
+ *
477
+ * An accessible progress bar component built on top of Radix UI primitives.
478
+ * Provides smooth animations and proper ARIA attributes for screen readers.
479
+ *
480
+ * Features:
481
+ * - Smooth progress animations
482
+ * - Customizable value and max range
483
+ * - Proper ARIA attributes for accessibility
484
+ * - Customizable styling and appearance
485
+ * - Responsive design
486
+ * - Keyboard accessible
487
+ *
488
+ * @example
489
+ * ```tsx
490
+ * // Basic progress bar
491
+ * <Progress value={50} />
492
+ *
493
+ * // Progress with custom max value
494
+ * <Progress value={7} max={10} />
495
+ *
496
+ * // Progress with custom styling
497
+ * <Progress
498
+ * value={75}
499
+ * className="h-4 bg-sec-200"
500
+ * />
501
+ *
502
+ * // Animated progress (controlled)
503
+ * const [progress, setProgress] = useState(0);
504
+ *
505
+ * useEffect(() => {
506
+ * const timer = setInterval(() => {
507
+ * setProgress(prev => prev >= 100 ? 0 : prev + 10);
508
+ * }, 1000);
509
+ * return () => clearInterval(timer);
510
+ * }, []);
511
+ *
512
+ * <Progress value={progress} />
513
+ * ```
514
+ *
515
+ * @accessibility
516
+ * - WCAG 2.1 AA compliant
517
+ * - Proper ARIA attributes (aria-valuenow, aria-valuemax, aria-valuemin)
518
+ * - Screen reader announcements for progress changes
519
+ * - Keyboard navigation support
520
+ * - High contrast support
521
+ *
522
+ * @performance
523
+ * - CSS transitions for smooth animations
524
+ * - Efficient re-rendering
525
+ * - Minimal DOM structure
526
+ *
527
+ * @dependencies
528
+ * - @radix-ui/react-progress - Core progress functionality
529
+ * - React 18+ - Hooks and refs
530
+ * - Tailwind CSS - Styling
531
+ */
532
+
533
+ /**
534
+ * Props for the Progress component
535
+ */
536
+ interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {
537
+ /** Current progress value (0 to max) */
538
+ value?: number;
539
+ /** Maximum progress value (default: 100) */
540
+ max?: number;
541
+ }
542
+ /**
543
+ * Progress component
544
+ * An accessible progress bar with smooth animations
545
+ *
546
+ * @param props - Progress configuration and styling
547
+ * @param ref - Forwarded ref to the progress element
548
+ * @returns JSX.Element - The rendered progress bar
549
+ *
550
+ * @example
551
+ * ```tsx
552
+ * <Progress value={75} max={100} />
553
+ * ```
554
+ */
555
+ declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
556
+
557
+ /**
558
+ * Dialog size variants
559
+ * @public
560
+ */
561
+ type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'auto';
562
+ /**
563
+ * Props for the Dialog root component
564
+ * @public
565
+ */
566
+ interface DialogProps extends DialogPrimitive.DialogProps {
567
+ }
568
+ /**
569
+ * Props for the DialogTrigger component
570
+ * @public
571
+ */
572
+ interface DialogTriggerProps extends DialogPrimitive.DialogTriggerProps {
573
+ }
574
+ /**
575
+ * Enhanced props for the DialogContent component with size variants and customization
576
+ * Uses semantic HTML dialog element with Radix UI accessibility features
577
+ * @public
578
+ */
579
+ interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
580
+ /** Dialog size variant */
581
+ size?: DialogSize;
582
+ /** Whether to show the close button */
583
+ showCloseButton?: boolean;
584
+ /** Custom className for the overlay */
585
+ overlayClassName?: string;
586
+ /** Whether to prevent closing on escape key */
587
+ preventCloseOnEscape?: boolean;
588
+ /** Whether to prevent closing on outside click */
589
+ preventCloseOnOutsideClick?: boolean;
590
+ /** Maximum height as percentage of viewport height (0-100) */
591
+ maxHeightPercent?: number;
592
+ /** Maximum width as percentage of viewport width (0-100) */
593
+ maxWidthPercent?: number;
594
+ /** Enable smart scrolling with sticky header/footer */
595
+ enableScrolling?: boolean;
596
+ /** Custom max height in CSS units (overrides maxHeightPercent) */
597
+ maxHeight?: string;
598
+ /** Custom max width in CSS units (overrides maxWidthPercent and size) */
599
+ maxWidth?: string;
600
+ /** Minimum height in CSS units */
601
+ minHeight?: string;
602
+ /** Minimum width in CSS units */
603
+ minWidth?: string;
604
+ }
605
+ /**
606
+ * Props for the DialogOverlay component
607
+ * @public
608
+ */
609
+ interface DialogOverlayProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> {
610
+ }
611
+ /**
612
+ * Props for the DialogHeader component (semantic header element)
613
+ * @public
614
+ */
615
+ interface DialogHeaderProps extends React.HTMLAttributes<HTMLElement> {
616
+ /** Whether this header should be sticky when scrolling is enabled */
617
+ sticky?: boolean;
618
+ }
619
+ /**
620
+ * Props for the DialogFooter component (semantic footer element)
621
+ * @public
622
+ */
623
+ interface DialogFooterProps extends React.HTMLAttributes<HTMLElement> {
624
+ /** Whether this footer should be sticky when scrolling is enabled */
625
+ sticky?: boolean;
626
+ }
627
+ /**
628
+ * Props for the DialogBody component (semantic main element)
629
+ * @public
630
+ */
631
+ interface DialogBodyProps extends React.HTMLAttributes<HTMLElement> {
632
+ /** Custom max height for the scrollable area */
633
+ maxHeight?: string;
634
+ /** HTML content to render (will be sanitized for security) */
635
+ htmlContent?: string;
636
+ /** Whether to allow HTML content rendering (default: true) */
637
+ allowHtml?: boolean;
638
+ /** Whether to use strict HTML sanitization (default: true) */
639
+ strictSanitization?: boolean;
640
+ /** Whether to log HTML sanitization warnings to console (default: false) */
641
+ logWarnings?: boolean;
642
+ }
643
+ /**
644
+ * Props for the DialogTitle component
645
+ * @public
646
+ */
647
+ interface DialogTitleProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> {
648
+ /** HTML content to render as title (will be sanitized for security) */
649
+ htmlContent?: string;
650
+ /** Whether to allow HTML content rendering (default: true) */
651
+ allowHtml?: boolean;
652
+ }
653
+ /**
654
+ * Props for the DialogDescription component
655
+ * @public
656
+ */
657
+ interface DialogDescriptionProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {
658
+ /** HTML content to render as description (will be sanitized for security) */
659
+ htmlContent?: string;
660
+ /** Whether to allow HTML content rendering (default: true) */
661
+ allowHtml?: boolean;
662
+ }
663
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
664
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
665
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
666
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
667
+ declare const DialogOverlay: React.ForwardRefExoticComponent<DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
668
+ /**
669
+ * DialogContent component
670
+ * The main content container using semantic HTML <dialog> element with enhanced features
671
+ * Built on Radix UI primitives for accessibility while providing semantic structure
672
+ *
673
+ * @param props - Content configuration and styling
674
+ * @param ref - Forwarded ref to the dialog element
675
+ * @returns JSX.Element - The semantic dialog content with overlay and optional close button
676
+ *
677
+ * @example
678
+ * ```tsx
679
+ * <DialogContent size="lg" enableScrolling={true} maxHeightPercent={80}>
680
+ * <DialogHeader>
681
+ * <DialogTitle>Scrollable Dialog</DialogTitle>
682
+ * <DialogDescription>This dialog will scroll if content overflows.</DialogDescription>
683
+ * </DialogHeader>
684
+ * <DialogBody>
685
+ * <section>Large amount of semantic content here...</section>
686
+ * </DialogBody>
687
+ * <DialogFooter>
688
+ * <Button>Save</Button>
689
+ * </DialogFooter>
690
+ * </DialogContent>
691
+ * ```
692
+ */
693
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
694
+ /**
695
+ * DialogHeader component
696
+ * Semantic header container for dialog title and description with optional sticky behavior
697
+ *
698
+ * @param props - Header configuration and styling
699
+ * @returns JSX.Element - The dialog header container using semantic <header> element
700
+ *
701
+ * @example
702
+ * ```tsx
703
+ * <DialogHeader sticky={true}>
704
+ * <DialogTitle>Sticky Header</DialogTitle>
705
+ * <DialogDescription>This header stays visible while scrolling.</DialogDescription>
706
+ * </DialogHeader>
707
+ * ```
708
+ */
709
+ declare const DialogHeader: {
710
+ ({ className, sticky, ...props }: DialogHeaderProps): react_jsx_runtime.JSX.Element;
711
+ displayName: string;
712
+ };
713
+ /**
714
+ * DialogBody component
715
+ * Semantic main content area for dialog body content with scrollable functionality
716
+ * Supports both React children and safe HTML content rendering
717
+ *
718
+ * @param props - Body configuration and styling
719
+ * @returns JSX.Element - The scrollable dialog body container using semantic <main> element
720
+ *
721
+ * @example
722
+ * ```tsx
723
+ * // Using React children
724
+ * <DialogBody>
725
+ * <section className="space-y-4">
726
+ * <h4>Content Title</h4>
727
+ * <p>Long content that will scroll...</p>
728
+ * </section>
729
+ * </DialogBody>
730
+ *
731
+ * // Using HTML content
732
+ * <DialogBody
733
+ * htmlContent="<h2>Import Instructions</h2><p>Upload a CSV file with the following format:</p><ul><li>Required columns: name, email</li><li>Optional columns: phone, address</li></ul>"
734
+ * allowHtml={true}
735
+ * />
736
+ * ```
737
+ */
738
+ declare const DialogBody: {
739
+ ({ className, maxHeight, style, htmlContent, allowHtml, strictSanitization, logWarnings, children, ...props }: DialogBodyProps): react_jsx_runtime.JSX.Element;
740
+ displayName: string;
741
+ };
742
+ /**
743
+ * DialogFooter component
744
+ * Semantic footer container for dialog action buttons with optional sticky behavior
745
+ *
746
+ * @param props - Footer configuration and styling
747
+ * @returns JSX.Element - The dialog footer container using semantic <footer> element
748
+ *
749
+ * @example
750
+ * ```tsx
751
+ * <DialogFooter sticky={true}>
752
+ * <Button variant="outline">Cancel</Button>
753
+ * <Button>Save changes</Button>
754
+ * </DialogFooter>
755
+ * ```
756
+ */
757
+ declare const DialogFooter: {
758
+ ({ className, sticky, ...props }: DialogFooterProps): react_jsx_runtime.JSX.Element;
759
+ displayName: string;
760
+ };
761
+ declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
762
+ declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
763
+
764
+ /**
765
+ * @file Select Component - Simple HTML Structure
766
+ * @package @jmruthers/pace-core
767
+ * @module Components/Select
768
+ * @since 0.3.0
769
+ *
770
+ * A simple select component using semantic HTML structure
771
+ * with proper DOM nesting and accessibility.
772
+ *
773
+ * Features:
774
+ * - Semantic HTML with <form> + <button> + <ul> + <li>
775
+ * - Proper DOM nesting (no button inside select)
776
+ * - Built on pace-core Button component for consistency
777
+ * - Simple positioning and styling
778
+ * - Better accessibility and SEO
779
+ * - Backward compatible API
780
+ */
781
+
782
+ interface SelectProps extends Omit<React.HTMLAttributes<HTMLFormElement>, 'onChange' | 'onKeyDown' | 'onFocus' | 'onBlur'> {
783
+ value?: string;
784
+ defaultValue?: string;
785
+ selectedText?: string;
786
+ onValueChange?: (value: string) => void;
787
+ open?: boolean;
788
+ defaultOpen?: boolean;
789
+ onOpenChange?: (open: boolean) => void;
790
+ disabled?: boolean;
791
+ children: React.ReactNode;
792
+ className?: string;
793
+ }
794
+ interface SelectTriggerProps extends Omit<ButtonProps, 'onClick' | 'onKeyDown'> {
795
+ children: React.ReactNode;
796
+ asChild?: boolean;
797
+ }
798
+ interface SelectValueProps {
799
+ placeholder?: string;
800
+ children?: React.ReactNode;
801
+ }
802
+ interface SelectContentProps {
803
+ children: React.ReactNode;
804
+ className?: string;
805
+ searchable?: boolean;
806
+ searchPlaceholder?: string;
807
+ maxHeight?: string;
808
+ style?: React.CSSProperties;
809
+ }
810
+ interface SelectItemProps {
811
+ value: string;
812
+ children: React.ReactNode;
813
+ disabled?: boolean;
814
+ className?: string;
815
+ onClick?: (e: React.MouseEvent) => void;
816
+ }
817
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLFormElement>>;
818
+ declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
819
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
820
+ declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLUListElement>>;
821
+ declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLLIElement>>;
822
+ declare const SelectGroup: React.ForwardRefExoticComponent<{
823
+ children: React.ReactNode;
824
+ className?: string;
825
+ } & React.RefAttributes<HTMLDivElement>>;
826
+ declare const SelectLabel: React.ForwardRefExoticComponent<{
827
+ children: React.ReactNode;
828
+ className?: string;
829
+ } & React.RefAttributes<HTMLDivElement>>;
830
+ declare const SelectSeparator: React.ForwardRefExoticComponent<{
831
+ className?: string;
832
+ } & React.RefAttributes<HTMLDivElement>>;
833
+
834
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
835
+ /**
836
+ * ToastViewport component
837
+ * Container for all toast notifications with customizable positioning
838
+ *
839
+ * @param props - Viewport configuration and styling
840
+ * @param ref - Forwarded ref to the viewport element
841
+ * @returns JSX.Element - The toast viewport container
842
+ */
843
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
844
+ /**
845
+ * Toast component
846
+ * The main toast notification component with animations and interactions
847
+ *
848
+ * @param props - Toast configuration and content
849
+ * @param ref - Forwarded ref to the toast element
850
+ * @returns JSX.Element - The rendered toast notification
851
+ *
852
+ * @example
853
+ * ```tsx
854
+ * <Toast>
855
+ * <ToastTitle>Success!</ToastTitle>
856
+ * <ToastDescription>Your changes have been saved.</ToastDescription>
857
+ * <ToastClose />
858
+ * </Toast>
859
+ * ```
860
+ */
861
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
862
+ /**
863
+ * ToastAction component
864
+ * Action button within a toast notification
865
+ *
866
+ * @param props - Action button configuration
867
+ * @param ref - Forwarded ref to the action button
868
+ * @returns JSX.Element - The action button element
869
+ *
870
+ * @example
871
+ * ```tsx
872
+ * <ToastAction altText="Undo changes">Undo</ToastAction>
873
+ * ```
874
+ */
875
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
876
+ /**
877
+ * ToastClose component
878
+ * Close button for dismissing toast notifications
879
+ *
880
+ * @param props - Close button configuration
881
+ * @param ref - Forwarded ref to the close button
882
+ * @returns JSX.Element - The close button with X icon
883
+ *
884
+ * @example
885
+ * ```tsx
886
+ * <ToastClose />
887
+ * ```
888
+ */
889
+ declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
890
+ /**
891
+ * ToastTitle component
892
+ * Title text for toast notifications
893
+ *
894
+ * @param props - Title configuration and styling
895
+ * @param ref - Forwarded ref to the title element
896
+ * @returns JSX.Element - The toast title
897
+ *
898
+ * @example
899
+ * ```tsx
900
+ * <ToastTitle>Success!</ToastTitle>
901
+ * ```
902
+ */
903
+ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
904
+ /**
905
+ * ToastDescription component
906
+ * Description text for toast notifications
907
+ *
908
+ * @param props - Description configuration and styling
909
+ * @param ref - Forwarded ref to the description element
910
+ * @returns JSX.Element - The toast description
911
+ *
912
+ * @example
913
+ * ```tsx
914
+ * <ToastDescription>Your changes have been saved successfully.</ToastDescription>
915
+ * ```
916
+ */
917
+ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
918
+ interface ToastProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> {
919
+ }
920
+ interface ToastActionElement extends React.ReactElement<typeof ToastAction> {
921
+ }
922
+ /**
923
+ * useToast hook
924
+ * Hook for managing toast notifications
925
+ *
926
+ * @returns Object with toast and dismiss functions
927
+ *
928
+ * @example
929
+ * ```tsx
930
+ * const { toast, dismiss } = useToast();
931
+ *
932
+ * // Show a toast
933
+ * toast({
934
+ * title: "Success!",
935
+ * description: "Your changes have been saved."
936
+ * });
937
+ *
938
+ * // Dismiss all toasts
939
+ * dismiss();
940
+ * ```
941
+ */
942
+ declare function useToast(): {
943
+ toast: (props: any) => void;
944
+ dismiss: () => void;
945
+ };
946
+ /**
947
+ * Toaster component
948
+ * Container component that provides the toast viewport
949
+ * Should be placed at the root of your application
950
+ *
951
+ * @returns JSX.Element - The toast provider with viewport
952
+ *
953
+ * @example
954
+ * ```tsx
955
+ * function App() {
956
+ * return (
957
+ * <ToastProvider>
958
+ * <YourApp />
959
+ * <Toaster />
960
+ * </ToastProvider>
961
+ * );
962
+ * }
963
+ * ```
964
+ */
965
+ declare function Toaster(): react_jsx_runtime.JSX.Element;
966
+
967
+ /**
968
+ * @file Tooltip Component System
969
+ * @package @jmruthers/pace-core
970
+ * @module Components/Tooltip
971
+ * @since 0.1.0
972
+ *
973
+ * A comprehensive tooltip component system built on top of Radix UI primitives.
974
+ * Provides accessible tooltips with customizable positioning and animations.
975
+ *
976
+ * Features:
977
+ * - Multiple positioning options (top, bottom, left, right)
978
+ * - Customizable delay duration
979
+ * - Smooth animations and transitions
980
+ * - Keyboard and mouse interaction
981
+ * - Screen reader support
982
+ * - Responsive design
983
+ * - Customizable styling
984
+ * - Focus management
985
+ *
986
+ * @example
987
+ * ```tsx
988
+ * // Basic tooltip
989
+ * <Tooltip content="This is a helpful tooltip">
990
+ * <Button>Hover me</Button>
991
+ * </Tooltip>
992
+ *
993
+ * // Tooltip with custom delay
994
+ * <Tooltip content="Custom delay" delayDuration={500}>
995
+ * <IconButton icon={<Info />} />
996
+ * </Tooltip>
997
+ *
998
+ * // Advanced tooltip with custom content
999
+ * <TooltipProvider>
1000
+ * <TooltipRoot>
1001
+ * <TooltipTrigger asChild>
1002
+ * <Button>Advanced Tooltip</Button>
1003
+ * </TooltipTrigger>
1004
+ * <TooltipContent side="top" className="bg-main-500 text-main-50">
1005
+ * <div className="space-y-1">
1006
+ * <p className="font-semibold">Advanced Tooltip</p>
1007
+ * <p className="text-xs">With custom styling</p>
1008
+ * </div>
1009
+ * </TooltipContent>
1010
+ * </TooltipRoot>
1011
+ * </TooltipProvider>
1012
+ *
1013
+ * // Tooltip on disabled element
1014
+ * <Tooltip content="This feature is coming soon">
1015
+ * <Button disabled>Coming Soon</Button>
1016
+ * </Tooltip>
1017
+ * ```
1018
+ *
1019
+ * @accessibility
1020
+ * - WCAG 2.1 AA compliant
1021
+ * - Proper ARIA attributes and roles
1022
+ * - Keyboard navigation support
1023
+ * - Screen reader announcements
1024
+ * - Focus management
1025
+ * - High contrast support
1026
+ * - Reduced motion support
1027
+ *
1028
+ * @performance
1029
+ * - Efficient positioning calculations
1030
+ * - Optimized animations
1031
+ * - Memory leak prevention
1032
+ * - Lazy rendering
1033
+ *
1034
+ * @dependencies
1035
+ * - @radix-ui/react-tooltip - Core tooltip functionality
1036
+ * - React 18+ - Hooks and refs
1037
+ * - Tailwind CSS - Styling and animations
1038
+ */
1039
+
1040
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
1041
+ declare const TooltipRoot: React.FC<TooltipPrimitive.TooltipProps>;
1042
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
1043
+ /**
1044
+ * TooltipContent component
1045
+ * The content container for tooltip information
1046
+ *
1047
+ * @param props - Content configuration and styling
1048
+ * @param ref - Forwarded ref to the content element
1049
+ * @returns JSX.Element - The tooltip content container
1050
+ *
1051
+ * @example
1052
+ * ```tsx
1053
+ * <TooltipContent side="top" className="bg-main-500">
1054
+ * Custom tooltip content
1055
+ * </TooltipContent>
1056
+ * ```
1057
+ */
1058
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
1059
+ /**
1060
+ * Props for the simplified Tooltip component
1061
+ */
1062
+ interface TooltipProps {
1063
+ /** The element that triggers the tooltip */
1064
+ children: React.ReactNode;
1065
+ /** The content to display in the tooltip */
1066
+ content: React.ReactNode;
1067
+ /** Delay before showing the tooltip (in milliseconds) */
1068
+ delayDuration?: number;
1069
+ }
1070
+ /**
1071
+ * Tooltip component
1072
+ * A simplified tooltip component for easy usage
1073
+ *
1074
+ * @param props - Tooltip configuration
1075
+ * @param ref - Forwarded ref to the trigger element
1076
+ * @returns JSX.Element - The tooltip with trigger and content
1077
+ *
1078
+ * @example
1079
+ * ```tsx
1080
+ * <Tooltip content="This is a helpful tooltip">
1081
+ * <Button>Hover me</Button>
1082
+ * </Tooltip>
1083
+ * ```
1084
+ */
1085
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLButtonElement>>;
1086
+
1087
+ /**
1088
+ * Props for the Form component
1089
+ */
1090
+ interface FormProps<TFieldValues extends FieldValues = FieldValues> {
1091
+ /**
1092
+ * Form schema for validation
1093
+ */
1094
+ schema?: z.ZodType<TFieldValues>;
1095
+ /**
1096
+ * Default values for the form
1097
+ */
1098
+ defaultValues?: DefaultValues<TFieldValues>;
1099
+ /**
1100
+ * Handler called when form is submitted successfully
1101
+ */
1102
+ onSubmit: SubmitHandler<TFieldValues>;
1103
+ /**
1104
+ * Handler called when form submission has errors
1105
+ */
1106
+ onError?: SubmitErrorHandler<TFieldValues>;
1107
+ /**
1108
+ * Form mode for react-hook-form
1109
+ * @default "onSubmit"
1110
+ */
1111
+ mode?: "onSubmit" | "onChange" | "onBlur" | "onTouched" | "all";
1112
+ /**
1113
+ * Children components or render function
1114
+ */
1115
+ children: React__default.ReactNode | ((methods: UseFormReturn<TFieldValues>) => React__default.ReactNode);
1116
+ /**
1117
+ * Class name for the form
1118
+ */
1119
+ className?: string;
1120
+ }
1121
+ /**
1122
+ * Form component with validation and React Hook Form integration
1123
+ *
1124
+ * @template TFieldValues - The type of form field values
1125
+ * @param props - Form configuration and handlers
1126
+ * @returns JSX.Element - The rendered form with FormProvider context
1127
+ *
1128
+ * @example
1129
+ * ```tsx
1130
+ * <Form
1131
+ * schema={userSchema}
1132
+ * defaultValues={{ name: "", email: "" }}
1133
+ * onSubmit={handleSubmit}
1134
+ * mode="onBlur"
1135
+ * >
1136
+ * <FormField name="name" label="Name" />
1137
+ * <FormField name="email" label="Email" />
1138
+ * <Button type="submit">Submit</Button>
1139
+ * </Form>
1140
+ * ```
1141
+ */
1142
+ declare function Form<TFieldValues extends FieldValues = FieldValues>({ schema, defaultValues, onSubmit, onError, mode, children, className, }: FormProps<TFieldValues>): react_jsx_runtime.JSX.Element;
1143
+
1144
+ /**
1145
+ * @file LoginForm Component
1146
+ * @package @jmruthers/pace-core
1147
+ * @module Components/LoginForm
1148
+ * @since 0.1.0
1149
+ *
1150
+ * A comprehensive login form component with built-in validation, error handling,
1151
+ * and loading states for user authentication.
1152
+ *
1153
+ * Features:
1154
+ * - Email and password validation
1155
+ * - Loading states with disabled form
1156
+ * - Error handling and display
1157
+ * - Customizable branding and messaging
1158
+ * - Sign-up link integration
1159
+ * - Performance optimized with React.memo
1160
+ * - Accessibility compliant
1161
+ * - Responsive design
1162
+ * - Form validation
1163
+ * - Success and error callbacks
1164
+ *
1165
+ * @example
1166
+ * ```tsx
1167
+ * // Basic login form
1168
+ * <LoginForm
1169
+ * onSignIn={async (data) => {
1170
+ * await signIn(data.email, data.password);
1171
+ * }}
1172
+ * onSuccess={() => navigate('/dashboard')}
1173
+ * onError={(error) => console.error('Login failed:', error)}
1174
+ * />
1175
+ *
1176
+ * // Login form with custom branding
1177
+ * <LoginForm
1178
+ * appName="My Application"
1179
+ * title="Welcome Back"
1180
+ * subtitle="Please sign in to access your account"
1181
+ * onSignIn={handleSignIn}
1182
+ * onSuccess={handleSuccess}
1183
+ * onError={handleError}
1184
+ * />
1185
+ *
1186
+ * // Login form with sign-up integration
1187
+ * <LoginForm
1188
+ * appName="My App"
1189
+ * showSignUp={true}
1190
+ * onSignUp={() => navigate('/signup')}
1191
+ * onSignIn={handleSignIn}
1192
+ * isLoading={isAuthenticating}
1193
+ * />
1194
+ *
1195
+ * // Login form with custom error handling
1196
+ * <LoginForm
1197
+ * onSignIn={async (data) => {
1198
+ * try {
1199
+ * const result = await authService.signIn(data);
1200
+ * if (result.success) {
1201
+ * onSuccess();
1202
+ * } else {
1203
+ * throw new Error(result.error);
1204
+ * }
1205
+ * } catch (error) {
1206
+ * onError(error);
1207
+ * }
1208
+ * }}
1209
+ * onSuccess={() => {
1210
+ * toast.success('Successfully signed in!');
1211
+ * navigate('/dashboard');
1212
+ * }}
1213
+ * onError={(error) => {
1214
+ * toast.error(`Sign in failed: ${error.message}`);
1215
+ * }}
1216
+ * />
1217
+ * ```
1218
+ *
1219
+ * @accessibility
1220
+ * - WCAG 2.1 AA compliant
1221
+ * - Proper form labels and associations
1222
+ * - Screen reader friendly error messages
1223
+ * - Keyboard navigation support
1224
+ * - Focus management
1225
+ * - High contrast support
1226
+ * - Clear error identification
1227
+ *
1228
+ * @performance
1229
+ * - React.memo for efficient re-rendering
1230
+ * - useCallback for stable event handlers
1231
+ * - useMemo for computed values
1232
+ * - Minimal re-renders
1233
+ *
1234
+ * @dependencies
1235
+ * - React 18+ - Hooks and memo
1236
+ * - Button component
1237
+ * - Input component
1238
+ * - Label component
1239
+ * - Card components
1240
+ * - Alert component
1241
+ * - Tailwind CSS - Styling
1242
+ */
1243
+
1244
+ interface LoginFormProps {
1245
+ /** Callback invoked when the form is submitted */
1246
+ onSignIn: (data: {
1247
+ email: string;
1248
+ password: string;
1249
+ }) => Promise<void>;
1250
+ /** Callback invoked on successful sign-in */
1251
+ onSuccess?: () => void;
1252
+ /** Callback invoked if sign-in fails */
1253
+ onError?: (error: Error) => void;
1254
+ /** Show loading spinner and disable form while true */
1255
+ isLoading?: boolean;
1256
+ /** Application name for display in the form */
1257
+ appName?: string;
1258
+ /** Custom title for the form */
1259
+ title?: string;
1260
+ /** Custom subtitle for the form */
1261
+ subtitle?: string;
1262
+ /** Show a sign-up link or button */
1263
+ showSignUp?: boolean;
1264
+ /** Optional callback for sign-up button */
1265
+ onSignUp?: () => void;
1266
+ /** Additional CSS classes */
1267
+ className?: string;
1268
+ }
1269
+ /**
1270
+ * LoginForm component that provides a ready-to-use authentication form for user sign-in.
1271
+ * It supports validation, loading state, error handling, and can be customized via props.
1272
+ * Now includes performance optimizations and onSignUp support.
1273
+ *
1274
+ * @param props - Login form configuration and handlers
1275
+ * @returns JSX.Element - The rendered login form
1276
+ *
1277
+ * @example
1278
+ * ```tsx
1279
+ * <LoginForm
1280
+ * onSignIn={handleSignIn}
1281
+ * onSuccess={() => navigate('/dashboard')}
1282
+ * onError={(error) => toast.error(error.message)}
1283
+ * isLoading={isAuthenticating}
1284
+ * />
1285
+ * ```
1286
+ */
1287
+ declare const LoginForm: React__default.NamedExoticComponent<LoginFormProps>;
1288
+
1289
+ /**
1290
+ * @file NavigationMenu Types
1291
+ * @package @jmruthers/pace-core
1292
+ * @module NavigationMenu
1293
+ * @since 0.1.0
1294
+ */
1295
+ /**
1296
+ * Navigation item configuration
1297
+ * Supports both flat and hierarchical navigation structures
1298
+ */
1299
+ interface NavigationItem {
1300
+ /** Unique identifier for the navigation item */
1301
+ id: string;
1302
+ /** Display text for the navigation item */
1303
+ label: string;
1304
+ /** URL or path to navigate to (optional for parent items in hierarchical mode) */
1305
+ href?: string;
1306
+ /** Optional Lucide icon name for the navigation item */
1307
+ icon?: string;
1308
+ /** Child navigation items for hierarchical mode */
1309
+ children?: NavigationItem[];
1310
+ /** Whether this item is currently active (auto-detected if not provided) */
1311
+ isActive?: boolean;
1312
+ /** Permissions required for this navigation item */
1313
+ permissions?: string[];
1314
+ /** Roles that can access this navigation item */
1315
+ roles?: string[];
1316
+ /** Minimum access level required */
1317
+ accessLevel?: string;
1318
+ /** Page ID for permission checking */
1319
+ pageId?: string;
1320
+ /** Enable strict mode for this navigation item */
1321
+ strictMode?: boolean;
1322
+ /** Navigation item metadata */
1323
+ meta?: {
1324
+ title?: string;
1325
+ description?: string;
1326
+ hidden?: boolean;
1327
+ order?: number;
1328
+ };
1329
+ }
1330
+ /**
1331
+ * Navigation mode configuration
1332
+ */
1333
+ type NavigationMode = 'dropdown' | 'hierarchical';
1334
+ /**
1335
+ * NavigationMenu component props
1336
+ */
1337
+ interface NavigationMenuProps {
1338
+ /** Array of navigation items to display */
1339
+ items: NavigationItem[];
1340
+ /** Navigation mode: 'dropdown' for menu button style, 'hierarchical' for expandable tree */
1341
+ mode?: NavigationMode;
1342
+ /** Current page path for highlighting active item */
1343
+ currentPath?: string;
1344
+ /** Optional callback when navigation item is clicked */
1345
+ onNavigate?: (item: NavigationItem) => void;
1346
+ /** Additional CSS classes */
1347
+ className?: string;
1348
+ /** Whether the menu is disabled (dropdown mode only) */
1349
+ disabled?: boolean;
1350
+ /** Custom button text for dropdown mode (defaults to "Menu") */
1351
+ buttonText?: string;
1352
+ /** Whether to show icons in the navigation (dropdown mode only) */
1353
+ showIcons?: boolean;
1354
+ /** Custom navigation label for screen readers */
1355
+ navigationLabel?: string;
1356
+ /** Enable strict mode to prevent bypassing navigation protection (default: true) */
1357
+ strictMode?: boolean;
1358
+ /** Enable audit logging for all navigation access attempts (default: true) */
1359
+ auditLog?: boolean;
1360
+ /** Callback when navigation access is denied */
1361
+ onNavigationAccessDenied?: (itemId: string, reason: string) => void;
1362
+ /** Callback when strict mode violation occurs */
1363
+ onStrictModeViolation?: (itemId: string, reason: string) => void;
1364
+ /** Enable automatic filtering of navigation items based on permissions */
1365
+ filterByPermissions?: boolean;
1366
+ }
1367
+
1368
+ /**
1369
+ * @file Unified Navigation Menu Component
1370
+ * @package @jmruthers/pace-core
1371
+ * @module Navigation
1372
+ * @since 0.1.0
1373
+ *
1374
+ * A flexible navigation menu component that supports both dropdown and hierarchical modes.
1375
+ *
1376
+ * Features:
1377
+ * - Dropdown mode: Menu button that opens a dropdown list
1378
+ * - Hierarchical mode: Expandable tree navigation with nested items
1379
+ * - Icon support for navigation items
1380
+ * - Current page highlighting
1381
+ * - Keyboard navigation support
1382
+ * - Accessible design with proper ARIA attributes
1383
+ * - Click outside to close (dropdown mode)
1384
+ * - Recursive rendering for nested items (hierarchical mode)
1385
+ *
1386
+ * @example
1387
+ * Basic dropdown navigation (most common use case):
1388
+ * ```tsx
1389
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1390
+ * import { useNavigate, useLocation } from 'react-router-dom';
1391
+ *
1392
+ * function AppNavigation() {
1393
+ * const navigate = useNavigate();
1394
+ * const location = useLocation();
1395
+ *
1396
+ * const navItems = [
1397
+ * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
1398
+ * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
1399
+ * { id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },
1400
+ * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
1401
+ * ];
1402
+ *
1403
+ * return (
1404
+ * <NavigationMenu
1405
+ * items={navItems}
1406
+ * mode="dropdown"
1407
+ * currentPath={location.pathname}
1408
+ * onNavigate={(item) => navigate(item.href)}
1409
+ * buttonText="Main Menu"
1410
+ * showIcons={true}
1411
+ * />
1412
+ * );
1413
+ * }
1414
+ *
1415
+ * @example
1416
+ * Hierarchical navigation with nested items:
1417
+ * ```tsx
1418
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1419
+ *
1420
+ * function SidebarNavigation() {
1421
+ * const hierarchicalItems = [
1422
+ * {
1423
+ * id: 'user-management',
1424
+ * label: 'User Management',
1425
+ * icon: 'Users',
1426
+ * children: [
1427
+ * { id: 'users-list', label: 'All Users', href: '/users' },
1428
+ * { id: 'users-create', label: 'Create User', href: '/users/create' },
1429
+ * { id: 'user-roles', label: 'User Roles', href: '/users/roles' }
1430
+ * ]
1431
+ * },
1432
+ * {
1433
+ * id: 'reports',
1434
+ * label: 'Reports',
1435
+ * icon: 'BarChart',
1436
+ * children: [
1437
+ * { id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },
1438
+ * { id: 'user-reports', label: 'User Reports', href: '/reports/users' }
1439
+ * ]
1440
+ * },
1441
+ * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
1442
+ * ];
1443
+ *
1444
+ * return (
1445
+ * <NavigationMenu
1446
+ * items={hierarchicalItems}
1447
+ * mode="hierarchical"
1448
+ * currentPath={window.location.pathname}
1449
+ * onNavigate={(item) => {
1450
+ * if (item.href) {
1451
+ * window.location.href = item.href;
1452
+ * }
1453
+ * }}
1454
+ * className="w-64 bg-sec-50 p-4"
1455
+ * />
1456
+ * );
1457
+ * }
1458
+ * ```
1459
+ *
1460
+ * @example
1461
+ * Integration with React Router and authentication:
1462
+ * ```tsx
1463
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1464
+ * import { useNavigate, useLocation } from 'react-router-dom';
1465
+ * import { useUnifiedAuth } from '@jmruthers/pace-core/providers';
1466
+ *
1467
+ * function AuthenticatedNavigation() {
1468
+ * const navigate = useNavigate();
1469
+ * const location = useLocation();
1470
+ * const { hasRole, hasPermission } = useUnifiedAuth();
1471
+ *
1472
+ * // Build navigation items based on user permissions
1473
+ * const navItems = [
1474
+ * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
1475
+ * ...(hasPermission('meals:read') ? [
1476
+ * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
1477
+ * ] : []),
1478
+ * ...(hasRole('admin') ? [
1479
+ * { id: 'admin', label: 'Admin Panel', href: '/admin', icon: 'Shield' }
1480
+ * ] : []),
1481
+ * { id: 'profile', label: 'Profile', href: '/profile', icon: 'User' }
1482
+ * ];
1483
+ *
1484
+ * return (
1485
+ * <NavigationMenu
1486
+ * items={navItems}
1487
+ * mode="dropdown"
1488
+ * currentPath={location.pathname}
1489
+ * onNavigate={(item) => navigate(item.href)}
1490
+ * buttonText="Navigation"
1491
+ * navigationLabel="Main application navigation"
1492
+ * />
1493
+ * );
1494
+ * }
1495
+ * ```
1496
+ *
1497
+ * @example
1498
+ * ```tsx
1499
+ * // Custom navigation with external links and actions
1500
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1501
+ *
1502
+ * function CustomNavigation() {
1503
+ * const handleNavigation = (item) => {
1504
+ * if (item.id === 'logout') {
1505
+ * // Handle logout action
1506
+ * handleLogout();
1507
+ * } else if (item.href?.startsWith('http')) {
1508
+ * // Handle external links
1509
+ * window.open(item.href, '_blank');
1510
+ * } else if (item.href) {
1511
+ * // Handle internal navigation
1512
+ * navigate(item.href);
1513
+ * }
1514
+ * };
1515
+ *
1516
+ * const navItems = [
1517
+ * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
1518
+ * { id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },
1519
+ * { id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions
1520
+ * ];
1521
+ *
1522
+ * return (
1523
+ * <NavigationMenu
1524
+ * items={navItems}
1525
+ * mode="dropdown"
1526
+ * onNavigate={handleNavigation}
1527
+ * buttonText="Menu"
1528
+ * disabled={false}
1529
+ * />
1530
+ * );
1531
+ * }
1532
+ * ```
1533
+ *
1534
+ * @accessibility
1535
+ * - WCAG 2.1 AA compliant navigation structure
1536
+ * - Proper ARIA attributes for screen readers
1537
+ * - Keyboard navigation with Enter, Space, and Escape keys
1538
+ * - Focus management for dropdown menus
1539
+ * - Semantic HTML structure with nav, menu, and menuitem roles
1540
+ * - Clear visual indicators for active/current page
1541
+ *
1542
+ * @performance
1543
+ * - Lightweight component with minimal re-renders
1544
+ * - Efficient click outside detection
1545
+ * - Optimized keyboard event handling
1546
+ * - Memory cleanup for event listeners
1547
+ *
1548
+ * @styling
1549
+ * - Uses Tailwind CSS for consistent styling
1550
+ * - Supports custom className for additional styling
1551
+ * - Responsive design considerations
1552
+ *
1553
+ * @dependencies
1554
+ * - React 18+ - Component framework and hooks
1555
+ * - Lucide React - Icon components
1556
+ * - Radix UI - Dropdown menu primitives
1557
+ * - React Router (optional) - For navigation handling
1558
+ * - Tailwind CSS - Styling system
1559
+ */
1560
+
1561
+ /**
1562
+ * Unified NavigationMenu component that supports both dropdown and hierarchical navigation modes.
1563
+ *
1564
+ * A flexible navigation menu component with support for icons, current page highlighting,
1565
+ * keyboard navigation, and nested menu items.
1566
+ *
1567
+ * Features:
1568
+ * - Dropdown mode: Menu button that opens a dropdown list
1569
+ * - Hierarchical mode: Expandable tree navigation with nested items
1570
+ * - Icon support for navigation items
1571
+ * - Current page highlighting
1572
+ * - Keyboard navigation support (Enter, Space, Escape)
1573
+ * - Accessible design with proper ARIA attributes
1574
+ * - Click outside to close (dropdown mode)
1575
+ * - Recursive rendering for nested items (hierarchical mode)
1576
+ *
1577
+ * @example
1578
+ * Basic dropdown navigation (most common use case):
1579
+ * ```tsx
1580
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1581
+ * import { useNavigate, useLocation } from 'react-router-dom';
1582
+ *
1583
+ * function AppNavigation() {
1584
+ * const navigate = useNavigate();
1585
+ * const location = useLocation();
1586
+ *
1587
+ * const navItems = [
1588
+ * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
1589
+ * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
1590
+ * { id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },
1591
+ * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
1592
+ * ];
1593
+ *
1594
+ * return (
1595
+ * <NavigationMenu
1596
+ * items={navItems}
1597
+ * mode="dropdown"
1598
+ * currentPath={location.pathname}
1599
+ * onNavigate={(item) => navigate(item.href)}
1600
+ * buttonText="Main Menu"
1601
+ * showIcons={true}
1602
+ * />
1603
+ * );
1604
+ * }
1605
+ * ```
1606
+ *
1607
+ * @example
1608
+ * Hierarchical navigation with nested items:
1609
+ * ```tsx
1610
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1611
+ *
1612
+ * function SidebarNavigation() {
1613
+ * const hierarchicalItems = [
1614
+ * {
1615
+ * id: 'user-management',
1616
+ * label: 'User Management',
1617
+ * icon: 'Users',
1618
+ * children: [
1619
+ * { id: 'users-list', label: 'All Users', href: '/users' },
1620
+ * { id: 'users-create', label: 'Create User', href: '/users/create' },
1621
+ * { id: 'user-roles', label: 'User Roles', href: '/users/roles' }
1622
+ * ]
1623
+ * },
1624
+ * {
1625
+ * id: 'reports',
1626
+ * label: 'Reports',
1627
+ * icon: 'BarChart',
1628
+ * children: [
1629
+ * { id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },
1630
+ * { id: 'user-reports', label: 'User Reports', href: '/reports/users' }
1631
+ * ]
1632
+ * },
1633
+ * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
1634
+ * ];
1635
+ *
1636
+ * return (
1637
+ * <NavigationMenu
1638
+ * items={hierarchicalItems}
1639
+ * mode="hierarchical"
1640
+ * currentPath={window.location.pathname}
1641
+ * onNavigate={(item) => {
1642
+ * if (item.href) {
1643
+ * window.location.href = item.href;
1644
+ * }
1645
+ * }}
1646
+ * className="w-64 bg-sec-50 p-4"
1647
+ * />
1648
+ * );
1649
+ * }
1650
+ * ```
1651
+ *
1652
+ * @example
1653
+ * Integration with React Router and authentication:
1654
+ * ```tsx
1655
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1656
+ * import { useNavigate, useLocation } from 'react-router-dom';
1657
+ * import { useUnifiedAuth } from '@jmruthers/pace-core/providers';
1658
+ *
1659
+ * function AuthenticatedNavigation() {
1660
+ * const navigate = useNavigate();
1661
+ * const location = useLocation();
1662
+ * const { hasRole, hasPermission } = useUnifiedAuth();
1663
+ *
1664
+ * // Build navigation items with permission requirements
1665
+ * const navItems = [
1666
+ * {
1667
+ * id: 'dashboard',
1668
+ * label: 'Dashboard',
1669
+ * href: '/dashboard',
1670
+ * icon: 'LayoutDashboard',
1671
+ * permissions: ['dashboard:read']
1672
+ * },
1673
+ * {
1674
+ * id: 'meals',
1675
+ * label: 'Meals',
1676
+ * href: '/meals',
1677
+ * icon: 'UtensilsCrossed',
1678
+ * permissions: ['meals:read']
1679
+ * },
1680
+ * {
1681
+ * id: 'admin',
1682
+ * label: 'Admin Panel',
1683
+ * href: '/admin',
1684
+ * icon: 'Shield',
1685
+ * roles: ['admin', 'super_admin']
1686
+ * },
1687
+ * {
1688
+ * id: 'profile',
1689
+ * label: 'Profile',
1690
+ * href: '/profile',
1691
+ * icon: 'User'
1692
+ * }
1693
+ * ];
1694
+ *
1695
+ * return (
1696
+ * <NavigationMenu
1697
+ * items={navItems}
1698
+ * mode="dropdown"
1699
+ * currentPath={location.pathname}
1700
+ * onNavigate={(item) => navigate(item.href)}
1701
+ * buttonText="Navigation"
1702
+ * navigationLabel="Main application navigation"
1703
+ * filterByPermissions={true}
1704
+ * auditLog={true}
1705
+ * />
1706
+ * );
1707
+ * }
1708
+ * ```
1709
+ *
1710
+ * @example
1711
+ * Custom navigation with external links and actions:
1712
+ * ```tsx
1713
+ * import { NavigationMenu } from '@jmruthers/pace-core';
1714
+ *
1715
+ * function CustomNavigation() {
1716
+ * const handleNavigation = (item) => {
1717
+ * if (item.id === 'logout') {
1718
+ * // Handle logout action
1719
+ * handleLogout();
1720
+ * } else if (item.href?.startsWith('http')) {
1721
+ * // Handle external links
1722
+ * window.open(item.href, '_blank');
1723
+ * } else if (item.href) {
1724
+ * // Handle internal navigation
1725
+ * navigate(item.href);
1726
+ * }
1727
+ * };
1728
+ *
1729
+ * const navItems = [
1730
+ * { id: 'home', label: 'Home', href: '/', icon: 'Home' },
1731
+ * { id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },
1732
+ * { id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions
1733
+ * ];
1734
+ *
1735
+ * return (
1736
+ * <NavigationMenu
1737
+ * items={navItems}
1738
+ * mode="dropdown"
1739
+ * onNavigate={handleNavigation}
1740
+ * buttonText="Menu"
1741
+ * disabled={false}
1742
+ * />
1743
+ * );
1744
+ * }
1745
+ * ```
1746
+ *
1747
+ * @param props - NavigationMenu component props including items, mode, navigation handlers, and styling options
1748
+ * @returns React element with navigation menu functionality
1749
+ *
1750
+ * @since 0.1.0
1751
+ */
1752
+ declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuProps & React.RefAttributes<HTMLDivElement>>;
1753
+
1754
+ /**
1755
+ * Props for the Header component
1756
+ */
1757
+ interface HeaderProps {
1758
+ /** URL to the app logo image */
1759
+ logoUrl?: string;
1760
+ /** Alt text for the logo */
1761
+ logoAlt?: string;
1762
+ /** Custom logo component (overrides logoUrl) */
1763
+ logo?: React__default.ReactNode;
1764
+ /** Navigation items for the menu - uses NavigationItem interface */
1765
+ navItems?: NavigationItem[];
1766
+ /** Current user for the user menu */
1767
+ user?: User | null;
1768
+ /** Sign out handler for user menu */
1769
+ onSignOut?: () => Promise<void>;
1770
+ /** Password change handler for user menu */
1771
+ onChangePassword?: (newPassword: string, confirmPassword: string) => Promise<{
1772
+ error: any;
1773
+ }>;
1774
+ /** Additional actions to display (will be placed between event selector and user menu) */
1775
+ actions?: React__default.ReactNode;
1776
+ /** Custom user menu component (overrides default UserMenu) */
1777
+ userMenu?: React__default.ReactNode;
1778
+ /** Custom className */
1779
+ className?: string;
1780
+ /** Show/hide event selector */
1781
+ showEventSelector?: boolean;
1782
+ /** Show/hide user menu */
1783
+ showUserMenu?: boolean;
1784
+ /** Current path for navigation highlighting */
1785
+ currentPath?: string;
1786
+ /** Custom navigation handler */
1787
+ onNavigate?: (item: NavigationItem) => void;
1788
+ }
1789
+ /**
1790
+ * Header component for application layouts with comprehensive navigation, user management,
1791
+ * and customizable branding support.
1792
+ *
1793
+ * A flexible header component that supports various configurations including custom logos,
1794
+ * navigation menus, user authentication, event selection, and custom actions.
1795
+ *
1796
+ * Features:
1797
+ * - Customizable logo (URL or custom component)
1798
+ * - Navigation menu integration with highlighting
1799
+ * - User menu with authentication and password management
1800
+ * - Event selector for multi-tenant applications
1801
+ * - Custom actions support
1802
+ * - Responsive design with mobile considerations
1803
+ * - Accessibility compliant with proper ARIA attributes
1804
+ * - Backdrop blur effects for modern UI
1805
+ * - Flexible layout with configurable sections
1806
+ *
1807
+ * @example
1808
+ * Basic header with logo and navigation:
1809
+ * ```tsx
1810
+ * import { Header } from '@jmruthers/pace-core';
1811
+ * import { useNavigate, useLocation } from 'react-router-dom';
1812
+ *
1813
+ * function AppHeader() {
1814
+ * const navigate = useNavigate();
1815
+ * const location = useLocation();
1816
+ *
1817
+ * const navItems = [
1818
+ * { id: 'dashboard', label: 'Dashboard', href: '/dashboard' },
1819
+ * { id: 'meals', label: 'Meals', href: '/meals' },
1820
+ * { id: 'settings', label: 'Settings', href: '/settings' }
1821
+ * ];
1822
+ *
1823
+ * return (
1824
+ * <Header
1825
+ * logoUrl="/company-logo.svg"
1826
+ * logoAlt="My Company"
1827
+ * navItems={navItems}
1828
+ * currentPath={location.pathname}
1829
+ * onNavigate={(item) => navigate(item.href)}
1830
+ * user={currentUser}
1831
+ * onSignOut={handleSignOut}
1832
+ * />
1833
+ * );
1834
+ * }
1835
+ * ```
1836
+ *
1837
+ * @example
1838
+ * Header with custom actions:
1839
+ * ```tsx
1840
+ * import { Header, Button } from '@jmruthers/pace-core';
1841
+ *
1842
+ * function HeaderWithActions() {
1843
+ * const customActions = (
1844
+ * <div className="flex items-center gap-2">
1845
+ * <Button variant="outline" size="sm">Export</Button>
1846
+ * <Button size="sm">New Item</Button>
1847
+ * </div>
1848
+ * );
1849
+ *
1850
+ * return (
1851
+ * <Header
1852
+ * logoUrl="/logo.svg"
1853
+ * navItems={navigationItems}
1854
+ * actions={customActions}
1855
+ * user={currentUser}
1856
+ * onSignOut={handleSignOut}
1857
+ * />
1858
+ * );
1859
+ * }
1860
+ * ```
1861
+ *
1862
+ * @example
1863
+ * Minimal header configuration:
1864
+ * ```tsx
1865
+ * function MinimalHeader() {
1866
+ * return (
1867
+ * <Header
1868
+ * logoUrl="/simple-logo.svg"
1869
+ * logoAlt="Simple App"
1870
+ * showEventSelector={false}
1871
+ * user={currentUser}
1872
+ * onSignOut={handleSignOut}
1873
+ * />
1874
+ * );
1875
+ * }
1876
+ * ```
1877
+ *
1878
+ * @param props - Header configuration including logo, navigation, user settings, and custom content
1879
+ * @returns React element with complete header functionality
1880
+ *
1881
+ * @since 0.1.0
1882
+ */
1883
+ declare function Header({ logoUrl, logoAlt, logo, navItems, user, onSignOut, onChangePassword, actions, userMenu, className, showEventSelector, showUserMenu, currentPath, onNavigate }: HeaderProps): react_jsx_runtime.JSX.Element;
1884
+
1885
+ /**
1886
+ * @file Footer Component
1887
+ * @package @jmruthers/pace-core
1888
+ * @module Components/Footer
1889
+ * @since 0.1.0
1890
+ *
1891
+ * A flexible footer component for application layouts with copyright information,
1892
+ * navigation links, and customizable content.
1893
+ *
1894
+ * Features:
1895
+ * - Copyright information with automatic year generation
1896
+ * - Customizable company name and branding
1897
+ * - Optional navigation links
1898
+ * - Logo display support
1899
+ * - Custom footer content via children
1900
+ * - Responsive design
1901
+ * - Accessibility compliant
1902
+ * - Flexible layout options
1903
+ * - Consistent styling with design system
1904
+ *
1905
+ * @example
1906
+ * ```tsx
1907
+ * // Basic footer with default copyright
1908
+ * <Footer />
1909
+ *
1910
+ * // Footer with custom company name and year
1911
+ * <Footer
1912
+ * companyName="My Company Inc."
1913
+ * year={2024}
1914
+ * />
1915
+ *
1916
+ * // Footer with navigation links
1917
+ * <Footer
1918
+ * companyName="My Company"
1919
+ * links={[
1920
+ * { label: 'Privacy Policy', href: '/privacy' },
1921
+ * { label: 'Terms of Service', href: '/terms' },
1922
+ * { label: 'Contact', href: '/contact' }
1923
+ * ]}
1924
+ * />
1925
+ *
1926
+ * // Footer with logo and custom copyright
1927
+ * <Footer
1928
+ * logo="/logo.svg"
1929
+ * copyright="© 2024 My Company. All rights reserved."
1930
+ * />
1931
+ *
1932
+ * // Footer with custom content
1933
+ * <Footer companyName="My Company">
1934
+ * <div className="grid grid-cols-1 md:grid-cols-3 gap-8 mb-8">
1935
+ * <div>
1936
+ * <h3 className="font-semibold mb-2">About Us</h3>
1937
+ * <p className="text-sm text-muted-foreground">
1938
+ * We provide innovative solutions for modern businesses.
1939
+ * </p>
1940
+ * </div>
1941
+ * <div>
1942
+ * <h3 className="font-semibold mb-2">Contact</h3>
1943
+ * <p className="text-sm text-muted-foreground">
1944
+ * Email: info@mycompany.com<br />
1945
+ * Phone: (555) 123-4567
1946
+ * </p>
1947
+ * </div>
1948
+ * <div>
1949
+ * <h3 className="font-semibold mb-2">Follow Us</h3>
1950
+ * <div className="flex gap-2">
1951
+ * <a href="#" className="text-muted-foreground hover:text-foreground">Twitter</a>
1952
+ * <a href="#" className="text-muted-foreground hover:text-foreground">LinkedIn</a>
1953
+ * </div>
1954
+ * </div>
1955
+ * </div>
1956
+ * </Footer>
1957
+ * ```
1958
+ *
1959
+ * @accessibility
1960
+ * - WCAG 2.1 AA compliant
1961
+ * - Proper semantic HTML with role="contentinfo"
1962
+ * - Screen reader friendly navigation
1963
+ * - Keyboard navigation support
1964
+ * - High contrast support
1965
+ * - Clear link identification
1966
+ *
1967
+ * @dependencies
1968
+ * - React 18+ - Component framework
1969
+ * - Tailwind CSS - Styling
1970
+ */
1971
+
1972
+ interface FooterProps {
1973
+ /**
1974
+ * Company or organization name
1975
+ */
1976
+ companyName?: string;
1977
+ /**
1978
+ * Current year or custom year for copyright
1979
+ * @default current year
1980
+ */
1981
+ year?: number;
1982
+ /**
1983
+ * Optional array of navigation links to display
1984
+ */
1985
+ links?: Array<{
1986
+ label: string;
1987
+ href: string;
1988
+ }>;
1989
+ /**
1990
+ * Optional CSS class name
1991
+ */
1992
+ className?: string;
1993
+ /**
1994
+ * Logo image URL (from UI version)
1995
+ */
1996
+ logo?: string;
1997
+ /**
1998
+ * Copyright text (from UI version)
1999
+ */
2000
+ copyright?: string;
2001
+ /**
2002
+ * Footer content - children to render inside footer
2003
+ */
2004
+ children?: React__default.ReactNode;
2005
+ }
2006
+ declare const Footer: React__default.NamedExoticComponent<FooterProps>;
2007
+
2008
+ /**
2009
+ * @file User Menu Component
2010
+ * @package @jmruthers/pace-core
2011
+ * @module Components/UserMenu
2012
+ * @since 0.1.0
2013
+ *
2014
+ * A comprehensive user menu component that displays user information and provides
2015
+ * access to user-specific actions like password changes and sign out.
2016
+ *
2017
+ * Features:
2018
+ * - User avatar and display name
2019
+ * - Dropdown menu with user actions
2020
+ * - Password change functionality
2021
+ * - Sign out capability
2022
+ * - Loading state component
2023
+ * - Responsive design
2024
+ * - Accessibility compliant
2025
+ * - Performance optimized with React.memo
2026
+ * - Integration with Supabase User
2027
+ * - Customizable styling
2028
+ *
2029
+ * @example
2030
+ * ```tsx
2031
+ * // Basic user menu
2032
+ * <UserMenu
2033
+ * user={currentUser}
2034
+ * onSignOut={async () => {
2035
+ * await signOut();
2036
+ * navigate('/login');
2037
+ * }}
2038
+ * onChangePassword={async (newPassword, confirmPassword) => {
2039
+ * try {
2040
+ * await updatePassword(newPassword);
2041
+ * toast.success('Password updated successfully!');
2042
+ * return {};
2043
+ * } catch (error) {
2044
+ * return { error: { message: error.message } };
2045
+ * }
2046
+ * }}
2047
+ * />
2048
+ *
2049
+ * // User menu without avatar
2050
+ * <UserMenu
2051
+ * user={currentUser}
2052
+ * showAvatar={false}
2053
+ * onSignOut={handleSignOut}
2054
+ * onChangePassword={handlePasswordChange}
2055
+ * />
2056
+ *
2057
+ * // User menu with loading state
2058
+ * {isLoading ? (
2059
+ * <UserMenu.Loading />
2060
+ * ) : (
2061
+ * <UserMenu
2062
+ * user={user}
2063
+ * onSignOut={handleSignOut}
2064
+ * onChangePassword={handlePasswordChange}
2065
+ * />
2066
+ * )}
2067
+ *
2068
+ * // User menu in header
2069
+ * <Header>
2070
+ * <div className="flex items-center gap-4">
2071
+ * <Navigation />
2072
+ * <UserMenu
2073
+ * user={user}
2074
+ * onSignOut={handleSignOut}
2075
+ * onChangePassword={handlePasswordChange}
2076
+ * className="ml-auto"
2077
+ * />
2078
+ * </div>
2079
+ * </Header>
2080
+ * ```
2081
+ *
2082
+ * @accessibility
2083
+ * - WCAG 2.1 AA compliant
2084
+ * - Proper ARIA labels and roles
2085
+ * - Keyboard navigation support
2086
+ * - Focus management
2087
+ * - Screen reader friendly
2088
+ * - High contrast support
2089
+ * - Loading state announcements
2090
+ * - Clear action identification
2091
+ *
2092
+ * @performance
2093
+ * - React.memo for efficient re-rendering
2094
+ * - useCallback for stable event handlers
2095
+ * - useMemo for computed values
2096
+ * - Minimal re-renders
2097
+ * - Optimized avatar rendering
2098
+ *
2099
+ * @dependencies
2100
+ * - React 18+ - Hooks and memo
2101
+ * - @supabase/supabase-js - User type
2102
+ * - lucide-react - Icons
2103
+ * - DropdownMenu components
2104
+ * - Dialog components
2105
+ * - PasswordChangeForm component
2106
+ * - Avatar component
2107
+ * - Button component
2108
+ * - Tailwind CSS - Styling
2109
+ */
2110
+
2111
+ interface UserMenuProps {
2112
+ user: User | null;
2113
+ onSignOut?: () => Promise<void>;
2114
+ onChangePassword?: (newPassword: string, confirmPassword: string) => Promise<{
2115
+ error: any;
2116
+ }>;
2117
+ className?: string;
2118
+ showAvatar?: boolean;
2119
+ }
2120
+ declare const UserMenu: React__default.NamedExoticComponent<UserMenuProps>;
2121
+
2122
+ type Operation = 'read' | 'create' | 'update' | 'delete' | 'manage';
2123
+ interface PaceAppLayoutProps {
2124
+ /** The name of the application to be displayed in the header. */
2125
+ appName: string;
2126
+ /** Optional navigation items for the header menu. If not provided, uses default navigation. */
2127
+ navItems?: NavigationItem[];
2128
+ /** Show/hide event selector in the header */
2129
+ showEventSelector?: boolean;
2130
+ /** Custom actions to display in the header (between event selector and user menu) */
2131
+ headerActions?: React__default.ReactNode;
2132
+ /** Custom logo component (overrides default logo) */
2133
+ customLogo?: React__default.ReactNode;
2134
+ /** Custom user menu component (overrides default user menu) */
2135
+ customUserMenu?: React__default.ReactNode;
2136
+ /** Custom className for the header */
2137
+ headerClassName?: string;
2138
+ /** Show/hide user menu */
2139
+ showUserMenu?: boolean;
2140
+ /** Enable layout-level permission enforcement */
2141
+ enforcePermissions?: boolean;
2142
+ /** Default permission to check for all routes (when enforcePermissions is true) */
2143
+ defaultPermission?: Operation;
2144
+ /** Route-specific permissions mapping */
2145
+ routePermissions?: Record<string, Operation>;
2146
+ /** Fallback component to show when user lacks permission */
2147
+ permissionFallback?: React__default.ReactNode;
2148
+ /** Enable permission-based navigation filtering */
2149
+ filterNavigationByPermissions?: boolean;
2150
+ /** Custom permission page ID mapping */
2151
+ pageIdMapping?: Record<string, string>;
2152
+ /** Enable strict mode to prevent bypassing permission checks (default: true) */
2153
+ strictMode?: boolean;
2154
+ /** Enable page-level permission enforcement (default: false) */
2155
+ enforcePagePermissions?: boolean;
2156
+ /** Default page permission fallback component */
2157
+ pagePermissionFallback?: React__default.ReactNode;
2158
+ /** Enable audit logging for all permission checks (default: true) */
2159
+ auditLog?: boolean;
2160
+ /** Callback when page access is denied */
2161
+ onPageAccessDenied?: (pageName: string, operation: string) => void;
2162
+ /** Callback when strict mode violation occurs */
2163
+ onStrictModeViolation?: (pageName: string, operation: string) => void;
2164
+ /** Enable role-based routing (default: false) */
2165
+ roleBasedRouting?: boolean;
2166
+ /** Route configuration for role-based routing */
2167
+ routeConfig?: Array<{
2168
+ path: string;
2169
+ component: React__default.ComponentType;
2170
+ permissions: string[];
2171
+ roles?: string[];
2172
+ accessLevel?: string;
2173
+ pageId?: string;
2174
+ strictMode?: boolean;
2175
+ meta?: {
2176
+ title?: string;
2177
+ description?: string;
2178
+ requiresAuth?: boolean;
2179
+ hidden?: boolean;
2180
+ };
2181
+ }>;
2182
+ /** Fallback route for unauthorized access */
2183
+ fallbackRoute?: string;
2184
+ /** Callback when route access is denied */
2185
+ onRouteAccessDenied?: (route: string, reason: string) => void;
2186
+ /** Callback when route strict mode violation occurs */
2187
+ onRouteStrictModeViolation?: (route: string, reason: string) => void;
2188
+ }
2189
+ /**
2190
+ * A consistent layout component for all PACE suite applications that provides a standard
2191
+ * structure with header, main content area, and footer.
2192
+ *
2193
+ * NEW: This component now includes layout-level permission enforcement to ensure
2194
+ * consuming apps can't forget to implement permission checks on individual pages.
2195
+ *
2196
+ * This component is designed to work with React Router's nested routing pattern using
2197
+ * Outlet to render child routes. It provides integrated authentication, navigation,
2198
+ * and user management functionality.
2199
+ *
2200
+ * Features:
2201
+ * - React Router v6 integration with nested routing
2202
+ * - Unified authentication integration
2203
+ * - Consistent header with navigation and user menu
2204
+ * - Flexible main content area with Outlet
2205
+ * - Footer with application branding
2206
+ * - User sign-out and password change functionality
2207
+ * - Responsive design and accessibility compliant
2208
+ * - Layout-level permission enforcement
2209
+ * - Permission-based navigation filtering
2210
+ * - Automatic page permission validation
2211
+ *
2212
+ * @example
2213
+ * Basic React Router setup with permission enforcement (RECOMMENDED):
2214
+ * ```tsx
2215
+ * import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
2216
+ * import { UnifiedAuthProvider } from '@jmruthers/pace-core/providers';
2217
+ * import { PaceAppLayout, PaceLoginPage } from '@jmruthers/pace-core';
2218
+ *
2219
+ * function App() {
2220
+ * return (
2221
+ * <UnifiedAuthProvider supabaseClient={supabase} appName="My App">
2222
+ * <Router>
2223
+ * <Routes>
2224
+ * <Route path="/login" element={<PaceLoginPage appName="My App" />} />
2225
+ * <Route path="/" element={
2226
+ * <PaceAppLayout
2227
+ * appName="My Application"
2228
+ * enforcePermissions={true}
2229
+ * defaultPermission="read"
2230
+ * />
2231
+ * }>
2232
+ * <Route index element={<HomePage />} />
2233
+ * <Route path="dashboard" element={<DashboardPage />} />
2234
+ * <Route path="meals" element={<MealsPage />} />
2235
+ * </Route>
2236
+ * </Routes>
2237
+ * </Router>
2238
+ * </UnifiedAuthProvider>
2239
+ * );
2240
+ * }
2241
+ * ```
2242
+ *
2243
+ *
2244
+ * @example
2245
+ * Custom navigation items with permission filtering:
2246
+ * ```tsx
2247
+ * import { NavigationItem } from '@jmruthers/pace-core';
2248
+ *
2249
+ * function App() {
2250
+ * const customNavItems: NavigationItem[] = [
2251
+ * { id: 'components', label: 'Components', href: '/components', icon: 'Component' },
2252
+ * { id: 'styles', label: 'Styles', href: '/styles', icon: 'Palette' },
2253
+ * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
2254
+ * ];
2255
+ *
2256
+ * return (
2257
+ * <Router>
2258
+ * <Routes>
2259
+ * <Route path="/" element={
2260
+ * <PaceAppLayout
2261
+ * appName="My Custom App"
2262
+ * navItems={customNavItems}
2263
+ * enforcePermissions={true}
2264
+ * filterNavigationByPermissions={true}
2265
+ * routePermissions={{
2266
+ * '/components': 'read',
2267
+ * '/styles': 'read',
2268
+ * '/meals': 'read'
2269
+ * }}
2270
+ * />
2271
+ * }>
2272
+ * <Route path="components" element={<ComponentsPage />} />
2273
+ * <Route path="styles" element={<StylesPage />} />
2274
+ * <Route path="meals" element={<MealsPage />} />
2275
+ * </Route>
2276
+ * </Routes>
2277
+ * </Router>
2278
+ * );
2279
+ * }
2280
+ * ```
2281
+ *
2282
+ * @example
2283
+ * Route-specific permissions with custom page IDs:
2284
+ * ```tsx
2285
+ * function AdminApp() {
2286
+ * return (
2287
+ * <Router>
2288
+ * <Routes>
2289
+ * <Route path="/" element={
2290
+ * <PaceAppLayout
2291
+ * appName="Admin Panel"
2292
+ * enforcePermissions={true}
2293
+ * routePermissions={{
2294
+ * '/dashboard': 'read',
2295
+ * '/user-management': 'read',
2296
+ * '/system-settings': 'update'
2297
+ * }}
2298
+ * pageIdMapping={{
2299
+ * '/dashboard': 'dashboard',
2300
+ * '/user-management': 'user-management',
2301
+ * '/system-settings': 'system-admin'
2302
+ * }}
2303
+ * permissionFallback={<AccessDeniedPage />}
2304
+ * />
2305
+ * }>
2306
+ * <Route path="dashboard" element={<DashboardPage />} />
2307
+ * <Route path="user-management" element={<UserManagementPage />} />
2308
+ * <Route path="system-settings" element={<SystemSettingsPage />} />
2309
+ * </Route>
2310
+ * </Routes>
2311
+ * </Router>
2312
+ * );
2313
+ * }
2314
+ * ```
2315
+ *
2316
+ * @param props - Layout configuration including app name for branding and permission settings
2317
+ * @returns React element with complete application layout structure and permission enforcement
2318
+ *
2319
+ * @since 0.1.0
2320
+ */
2321
+ declare function PaceAppLayout({ appName, navItems, showEventSelector, headerActions, customLogo, customUserMenu, headerClassName, showUserMenu, enforcePermissions, defaultPermission, routePermissions, permissionFallback, filterNavigationByPermissions, pageIdMapping, strictMode, enforcePagePermissions, pagePermissionFallback, auditLog, onPageAccessDenied, onStrictModeViolation, roleBasedRouting, routeConfig, fallbackRoute, onRouteAccessDenied, onRouteStrictModeViolation }: PaceAppLayoutProps): react_jsx_runtime.JSX.Element;
2322
+
2323
+ /**
2324
+ * @file PACE Login Page Component
2325
+ * @package @jmruthers/pace-core
2326
+ * @module Components/PaceLoginPage
2327
+ * @since 0.1.0
2328
+ *
2329
+ * A comprehensive login page component that provides a consistent authentication
2330
+ * experience for all PACE suite applications with role-based redirection and
2331
+ * enhanced error handling.
2332
+ *
2333
+ * Features:
2334
+ * - Consistent login page layout
2335
+ * - Unified authentication integration
2336
+ * - Role-based automatic redirection (admin users)
2337
+ * - Manual redirection for all successful logins
2338
+ * - Customizable app branding
2339
+ * - Configurable redirect paths
2340
+ * - Enhanced error handling and display
2341
+ * - Dual loading state management (auth + form)
2342
+ * - Navigation error recovery
2343
+ * - Responsive design
2344
+ * - Accessibility compliant
2345
+ * - Integration with LoginForm
2346
+ * - React Router navigation
2347
+ * - Centered layout design
2348
+ * - Error persistence and display
2349
+ *
2350
+ * @example
2351
+ * ```tsx
2352
+ * // Basic login page
2353
+ * <PaceLoginPage appName="My Application" />
2354
+ *
2355
+ * // Login page with custom redirect
2356
+ * <PaceLoginPage
2357
+ * appName="Dashboard App"
2358
+ * onSuccessRedirectPath="/dashboard"
2359
+ * />
2360
+ *
2361
+ * // Login page in router setup
2362
+ * <Router>
2363
+ * <Routes>
2364
+ * <Route path="/login" element={
2365
+ * <PaceLoginPage
2366
+ * appName="My App"
2367
+ * onSuccessRedirectPath="/home"
2368
+ * />
2369
+ * } />
2370
+ * <Route path="/home" element={<HomePage />} />
2371
+ * </Routes>
2372
+ * </Router>
2373
+ *
2374
+ * // Login page with authentication provider
2375
+ * <UnifiedAuthProvider supabaseClient={supabase} appName="My App">
2376
+ * <Router>
2377
+ * <Routes>
2378
+ * <Route path="/login" element={
2379
+ * <PaceLoginPage appName="My Application" />
2380
+ * } />
2381
+ * <Route path="/" element={<PaceAppLayout appName="My Application" />}>
2382
+ * <Route index element={<HomePage />} />
2383
+ * </Route>
2384
+ * </Routes>
2385
+ * </Router>
2386
+ * </UnifiedAuthProvider>
2387
+ *
2388
+ * // Login page with role-based access control
2389
+ * function App() {
2390
+ * return (
2391
+ * <UnifiedAuthProvider supabaseClient={supabase} appName="Admin Portal">
2392
+ * <Router>
2393
+ * <Routes>
2394
+ * <Route path="/login" element={
2395
+ * <PaceLoginPage
2396
+ * appName="Admin Portal"
2397
+ * onSuccessRedirectPath="/admin/dashboard"
2398
+ * />
2399
+ * } />
2400
+ * <Route path="/admin/*" element={<AdminRoutes />} />
2401
+ * </Routes>
2402
+ * </Router>
2403
+ * </UnifiedAuthProvider>
2404
+ * );
2405
+ * }
2406
+ * ```
2407
+ *
2408
+ * @accessibility
2409
+ * - WCAG 2.1 AA compliant
2410
+ * - Proper semantic HTML structure
2411
+ * - Screen reader friendly
2412
+ * - Keyboard navigation support
2413
+ * - Focus management
2414
+ * - High contrast support
2415
+ * - Clear page hierarchy
2416
+ * - Accessible form elements
2417
+ * - Error announcements
2418
+ *
2419
+ * @routing
2420
+ * - React Router v6 integration
2421
+ * - Automatic navigation on success
2422
+ * - Role-based redirect logic (admin users)
2423
+ * - Configurable redirect paths
2424
+ * - Replace navigation for login flow
2425
+ * - Navigation error handling
2426
+ *
2427
+ * @authentication
2428
+ * - Integration with UnifiedAuthProvider
2429
+ * - Role detection via hasRole('admin')
2430
+ * - Loading state management
2431
+ * - Error state handling
2432
+ * - Session validation
2433
+ * - Automatic redirect prevention loops
2434
+ *
2435
+ * @dependencies
2436
+ * - React 18+ - Hooks and effects
2437
+ * - React Router v6 - Navigation
2438
+ * - UnifiedAuthProvider - Authentication
2439
+ * - LoginForm component
2440
+ * - Button component
2441
+ * - Input component
2442
+ * - Label component
2443
+ * - Tailwind CSS - Styling
2444
+ */
2445
+
2446
+ interface PaceLoginPageProps {
2447
+ /** The name of the application to be displayed on the login form. */
2448
+ appName: string;
2449
+ /** The path to redirect to upon successful login. Defaults to `/`. */
2450
+ onSuccessRedirectPath?: string;
2451
+ }
2452
+ /**
2453
+ * A consistent, reusable login page for all PACE suite applications.
2454
+ * It handles the sign-in logic with role-based automatic redirection for admin users,
2455
+ * enhanced error handling, and dual loading state management.
2456
+ *
2457
+ * Recent enhancements:
2458
+ * - Role-based redirection: Admin users are automatically redirected
2459
+ * - Enhanced error handling with navigation error recovery
2460
+ * - Dual loading states: auth loading + form submission loading
2461
+ * - Error persistence: Auth errors are displayed below the form
2462
+ * - Navigation safety: Try-catch blocks prevent navigation errors
2463
+ *
2464
+ * @param props - Login page configuration including app name and redirect path
2465
+ * @returns JSX.Element - The rendered login page with enhanced functionality
2466
+ *
2467
+ * @example
2468
+ * ```tsx
2469
+ * <PaceLoginPage
2470
+ * appName="My Application"
2471
+ * onSuccessRedirectPath="/dashboard"
2472
+ * />
2473
+ * ```
2474
+ */
2475
+ declare const PaceLoginPage: React__default.FC<PaceLoginPageProps>;
2476
+
2477
+ /**
2478
+ * State interface for the ErrorBoundary component
2479
+ * @public
2480
+ */
2481
+ interface ErrorBoundaryState {
2482
+ /** Whether an error has been caught */
2483
+ hasError: boolean;
2484
+ /** The error that was caught */
2485
+ error?: Error;
2486
+ /** Additional error information from React */
2487
+ errorInfo?: React__default.ErrorInfo;
2488
+ /** Unique identifier for the error */
2489
+ errorId?: string;
2490
+ /** Number of retry attempts made */
2491
+ retryCount: number;
2492
+ }
2493
+ /**
2494
+ * Props interface for the ErrorBoundary component
2495
+ * @public
2496
+ */
2497
+ interface ErrorBoundaryProps {
2498
+ /** Child components to wrap with error boundary */
2499
+ children: ReactNode;
2500
+ /** Name of the component for error reporting */
2501
+ componentName?: string;
2502
+ /** Custom fallback UI to display when error occurs */
2503
+ fallback?: ReactNode;
2504
+ /** Callback function called when an error is caught */
2505
+ onError?: (error: Error, errorInfo: React__default.ErrorInfo, errorId: string) => void;
2506
+ /** Maximum number of retry attempts */
2507
+ maxRetries?: number;
2508
+ /** Whether to enable retry functionality */
2509
+ enableRetry?: boolean;
2510
+ /** Whether to enable error reporting */
2511
+ enableReporting?: boolean;
2512
+ }
2513
+ /**
2514
+ * ErrorBoundary component
2515
+ * Catches JavaScript errors in child components and provides fallback UI
2516
+ *
2517
+ * @example
2518
+ * ```tsx
2519
+ * <ErrorBoundary
2520
+ * componentName="MyComponent"
2521
+ * maxRetries={3}
2522
+ * onError={(error, errorInfo, errorId) => {
2523
+ * console.log('Error caught:', errorId);
2524
+ * }}
2525
+ * >
2526
+ * <MyComponent />
2527
+ * </ErrorBoundary>
2528
+ * ```
2529
+ */
2530
+ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
2531
+ private retryTimeoutId;
2532
+ constructor(props: ErrorBoundaryProps);
2533
+ static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
2534
+ componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
2535
+ private reportError;
2536
+ private handleRetry;
2537
+ componentWillUnmount(): void;
2538
+ render(): string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
2539
+ }
2540
+
2541
+ /**
2542
+ * @file LoadingSpinner Component
2543
+ * @package @jmruthers/pace-core
2544
+ * @module Components/LoadingSpinner
2545
+ * @since 0.1.0
2546
+ *
2547
+ * A simple, accessible loading spinner component for indicating loading states.
2548
+ * Provides smooth animations with reduced motion support for accessibility.
2549
+ *
2550
+ * Features:
2551
+ * - Multiple size variants (sm, md, lg)
2552
+ * - Smooth CSS animations
2553
+ * - Reduced motion support for accessibility
2554
+ * - Screen reader friendly with proper ARIA attributes
2555
+ * - Customizable styling
2556
+ * - Lightweight and performant
2557
+ *
2558
+ * @example
2559
+ * ```tsx
2560
+ * // Basic loading spinner
2561
+ * <LoadingSpinner />
2562
+ *
2563
+ * // Different sizes
2564
+ * <LoadingSpinner size="sm" />
2565
+ * <LoadingSpinner size="md" />
2566
+ * <LoadingSpinner size="lg" />
2567
+ *
2568
+ * // With custom styling
2569
+ * <LoadingSpinner
2570
+ * size="lg"
2571
+ * className="text-main-500"
2572
+ * />
2573
+ *
2574
+ * // In a button
2575
+ * <Button disabled>
2576
+ * <LoadingSpinner size="sm" className="mr-2" />
2577
+ * Loading...
2578
+ * </Button>
2579
+ * ```
2580
+ *
2581
+ * @accessibility
2582
+ * - WCAG 2.1 AA compliant
2583
+ * - Proper ARIA role="status"
2584
+ * - Screen reader announcement with "Loading..." text
2585
+ * - Reduced motion support for users with vestibular disorders
2586
+ * - High contrast support
2587
+ *
2588
+ * @performance
2589
+ * - CSS-only animations for optimal performance
2590
+ * - No JavaScript dependencies
2591
+ * - Minimal DOM structure
2592
+ * - Efficient rendering
2593
+ *
2594
+ * @dependencies
2595
+ * - React 18+ - Component framework
2596
+ * - Tailwind CSS - Styling and animations
2597
+ */
2598
+
2599
+ /**
2600
+ * Props for the LoadingSpinner component
2601
+ */
2602
+ interface LoadingSpinnerProps {
2603
+ /** Size variant of the spinner */
2604
+ size?: 'sm' | 'md' | 'lg';
2605
+ /** Additional CSS classes for styling */
2606
+ className?: string;
2607
+ }
2608
+ /**
2609
+ * LoadingSpinner component
2610
+ * A simple, accessible loading spinner for indicating loading states
2611
+ *
2612
+ * @param props - Spinner configuration and styling
2613
+ * @returns JSX.Element - The rendered loading spinner
2614
+ *
2615
+ * @example
2616
+ * ```tsx
2617
+ * <LoadingSpinner size="lg" className="text-main-500" />
2618
+ * ```
2619
+ */
2620
+ declare const LoadingSpinner: React__default.FC<LoadingSpinnerProps>;
2621
+
2622
+ interface EventSelectorProps {
2623
+ /** Placeholder text for the dropdown */
2624
+ placeholder?: string;
2625
+ /** Additional CSS classes */
2626
+ className?: string;
2627
+ /** Callback fired when an event changes, providing full event object */
2628
+ onEventChange?: (event: Event | null) => void;
2629
+ /** Show friendly message when no events available */
2630
+ showNoEventsMessage?: boolean;
2631
+ /** Show retry button on errors */
2632
+ showRetryButton?: boolean;
2633
+ /** Show event details in dropdown */
2634
+ showEventDetails?: boolean;
2635
+ /** Show indicator for next/upcoming events */
2636
+ showNextEventIndicator?: boolean;
2637
+ }
2638
+ /**
2639
+ * EventSelector component for selecting events with built-in access control
2640
+ *
2641
+ * This component provides secure event selection with:
2642
+ * - Database integration via rbac_event_app_roles table
2643
+ * - Auto-selection of next upcoming event by date
2644
+ * - Cross-device sync via Supabase user session metadata
2645
+ * - localStorage fallback for offline scenarios
2646
+ * - Comprehensive error handling and user feedback
2647
+ *
2648
+ * @component
2649
+ * @example
2650
+ * <UnifiedAuthProvider supabaseClient={supabase} appName="PACE">
2651
+ * <EventSelector onEventChange={(event) => console.log(event)} />
2652
+ * </UnifiedAuthProvider>
2653
+ */
2654
+ declare function EventSelector({ placeholder, className, onEventChange, showNoEventsMessage, showRetryButton, showEventDetails, showNextEventIndicator }: EventSelectorProps): react_jsx_runtime.JSX.Element | null;
2655
+
2656
+ interface OrganisationSelectorProps {
2657
+ /** Placeholder text for the dropdown */
2658
+ placeholder?: string;
2659
+ /** Additional CSS classes */
2660
+ className?: string;
2661
+ /** Callback fired when organisation changes, providing full organisation object */
2662
+ onOrganisationChange?: (org: Organisation) => void;
2663
+ /** Show friendly message when no organisations available */
2664
+ showNoOrganisationsMessage?: boolean;
2665
+ /** Show retry button on errors */
2666
+ showRetryButton?: boolean;
2667
+ /** Show user's role in each organisation */
2668
+ showRole?: boolean;
2669
+ /** Compact display mode */
2670
+ compact?: boolean;
2671
+ /** Disabled state */
2672
+ disabled?: boolean;
2673
+ }
2674
+ /**
2675
+ * OrganisationSelector component for secure organisation switching
2676
+ *
2677
+ * This component provides secure organisation selection with:
2678
+ * - User membership validation
2679
+ * - Role-based access display
2680
+ * - Security error handling
2681
+ * - Real-time organisation switching
2682
+ * - Accessible interface design
2683
+ *
2684
+ * Security: Only shows organisations the user has valid access to
2685
+ */
2686
+ declare function OrganisationSelector({ placeholder, className, onOrganisationChange, showNoOrganisationsMessage, showRetryButton, showRole, compact, disabled }: OrganisationSelectorProps): react_jsx_runtime.JSX.Element | null;
2687
+
2688
+ /**
2689
+ * @file Password Reset Form Component
2690
+ * @package @jmruthers/pace-core
2691
+ * @module Components/PasswordReset
2692
+ * @since 0.1.0
2693
+ *
2694
+ * A comprehensive password reset form component that handles email-based password recovery
2695
+ * with proper validation, loading states, and success feedback.
2696
+ *
2697
+ * Features:
2698
+ * - Email validation and submission
2699
+ * - Loading states with disabled form
2700
+ * - Success state with confirmation message
2701
+ * - Error handling and display
2702
+ * - Resend functionality
2703
+ * - Accessibility compliant
2704
+ * - Responsive design
2705
+ * - Integration with UnifiedAuthProvider
2706
+ * - Form validation
2707
+ * - Success and error callbacks
2708
+ *
2709
+ * @example
2710
+ * ```tsx
2711
+ * // Basic password reset form
2712
+ * <PasswordResetForm
2713
+ * onSuccess={() => {
2714
+ * toast.success('Password reset email sent!');
2715
+ * }}
2716
+ * onError={(error) => {
2717
+ * toast.error(`Failed to send reset email: ${error.message}`);
2718
+ * }}
2719
+ * />
2720
+ *
2721
+ * // Password reset form with custom styling
2722
+ * <PasswordResetForm
2723
+ * className="max-w-md mx-auto p-6 bg-main-50 rounded-lg shadow-md"
2724
+ * onSuccess={() => {
2725
+ * console.log('Reset email sent successfully');
2726
+ * navigate('/check-email');
2727
+ * }}
2728
+ * onError={(error) => {
2729
+ * console.error('Password reset failed:', error);
2730
+ * }}
2731
+ * />
2732
+ *
2733
+ * // Password reset form in a modal
2734
+ * <Modal isOpen={showResetForm} onClose={() => setShowResetForm(false)}>
2735
+ * <ModalContent>
2736
+ * <PasswordResetForm
2737
+ * onSuccess={() => {
2738
+ * setShowResetForm(false);
2739
+ * toast.success('Check your email for reset instructions');
2740
+ * }}
2741
+ * onError={(error) => {
2742
+ * toast.error(error.message);
2743
+ * }}
2744
+ * />
2745
+ * </ModalContent>
2746
+ * </Modal>
2747
+ * ```
2748
+ *
2749
+ * @accessibility
2750
+ * - WCAG 2.1 AA compliant
2751
+ * - Proper form labels and associations
2752
+ * - Screen reader friendly error messages
2753
+ * - Keyboard navigation support
2754
+ * - Focus management
2755
+ * - High contrast support
2756
+ * - Clear error identification
2757
+ * - Role="alert" for error announcements
2758
+ *
2759
+ * @dependencies
2760
+ * - React 18+ - Hooks and state
2761
+ * - UnifiedAuthProvider - Authentication context
2762
+ * - Button component
2763
+ * - Input component
2764
+ * - Label component
2765
+ * - Tailwind CSS - Styling
2766
+ */
2767
+ interface PasswordResetFormProps {
2768
+ onSuccess?: () => void;
2769
+ onError?: (error: Error) => void;
2770
+ className?: string;
2771
+ }
2772
+ declare function PasswordResetForm({ onSuccess, onError, className }: PasswordResetFormProps): react_jsx_runtime.JSX.Element;
2773
+
2774
+ interface FileUploadProps {
2775
+ supabase: SupabaseClient;
2776
+ appName: string;
2777
+ orgId: string;
2778
+ onUploadComplete?: (result: {
2779
+ success: boolean;
2780
+ path?: string;
2781
+ error?: string;
2782
+ }) => void;
2783
+ onUploadStart?: () => void;
2784
+ accept?: string;
2785
+ maxSize?: number;
2786
+ multiple?: boolean;
2787
+ disabled?: boolean;
2788
+ className?: string;
2789
+ children?: React__default.ReactNode;
2790
+ }
2791
+ declare function FileUpload({ supabase, appName, orgId, onUploadComplete, onUploadStart, accept, maxSize, multiple, disabled, className, children }: FileUploadProps): react_jsx_runtime.JSX.Element;
2792
+
2793
+ /**
2794
+ * Storage utility types for pace-core
2795
+ */
2796
+ interface StorageUploadOptions {
2797
+ /** The app name from rbac_apps */
2798
+ appName: string;
2799
+ /** Organisation ID for scoping */
2800
+ orgId: string;
2801
+ /** Whether the file should be publicly accessible */
2802
+ isPublic?: boolean;
2803
+ /** Optional tags for categorisation */
2804
+ tags?: string[];
2805
+ /** Optional custom path within the app/org structure */
2806
+ customPath?: string;
2807
+ /** Optional metadata to store with the file */
2808
+ metadata?: Record<string, any>;
2809
+ }
2810
+ interface StorageFileMetadata {
2811
+ mimeType: string;
2812
+ size: number;
2813
+ width?: number;
2814
+ height?: number;
2815
+ hash?: string;
2816
+ orgId: string;
2817
+ appName: string;
2818
+ uploadedBy: string;
2819
+ uploadedAt: string;
2820
+ tags?: string[];
2821
+ isPublic: boolean;
2822
+ customMetadata?: Record<string, any>;
2823
+ }
2824
+ interface StorageUploadResult {
2825
+ success: boolean;
2826
+ path?: string;
2827
+ publicUrl?: string;
2828
+ metadata?: StorageFileMetadata;
2829
+ error?: string;
2830
+ }
2831
+ interface StorageUrlOptions {
2832
+ /** The app name from rbac_apps */
2833
+ appName: string;
2834
+ /** Organisation ID for scoping */
2835
+ orgId: string;
2836
+ /** Expiry time in seconds for signed URLs (default: 3600) */
2837
+ expiresIn?: number;
2838
+ }
2839
+ interface StorageListOptions {
2840
+ /** The app name from rbac_apps */
2841
+ appName: string;
2842
+ /** Organisation ID for scoping */
2843
+ orgId: string;
2844
+ /** Optional path prefix to filter by */
2845
+ pathPrefix?: string;
2846
+ /** Optional tags to filter by */
2847
+ tags?: string[];
2848
+ /** Maximum number of files to return */
2849
+ limit?: number;
2850
+ /** Offset for pagination */
2851
+ offset?: number;
2852
+ }
2853
+ interface StorageFileInfo {
2854
+ name: string;
2855
+ path: string;
2856
+ size: number;
2857
+ mimeType: string;
2858
+ lastModified: string;
2859
+ metadata: StorageFileMetadata;
2860
+ }
2861
+ interface StorageListResult {
2862
+ files: StorageFileInfo[];
2863
+ totalCount: number;
2864
+ hasMore: boolean;
2865
+ }
2866
+ interface FileSizeLimits {
2867
+ [mimeType: string]: number;
2868
+ }
2869
+ interface StorageConfig {
2870
+ bucketName: string;
2871
+ fileSizeLimits: FileSizeLimits;
2872
+ defaultFileSizeLimit: number;
2873
+ }
2874
+
2875
+ /**
2876
+ * React hook for storage operations
2877
+ */
2878
+
2879
+ interface UseStorageOptions {
2880
+ supabase: SupabaseClient;
2881
+ appName: string;
2882
+ orgId: string;
2883
+ }
2884
+ interface UseStorageReturn {
2885
+ uploadFile: (file: File, options?: Partial<StorageUploadOptions>) => Promise<StorageUploadResult>;
2886
+ isUploading: boolean;
2887
+ uploadError: string | null;
2888
+ getPublicUrl: (path: string) => string;
2889
+ getSignedUrl: (path: string, expiresIn?: number) => Promise<string | null>;
2890
+ getFileUrl: (path: string) => string;
2891
+ deleteFile: (path: string) => Promise<{
2892
+ success: boolean;
2893
+ error?: string;
2894
+ }>;
2895
+ archiveFile: (path: string) => Promise<{
2896
+ success: boolean;
2897
+ error?: string;
2898
+ }>;
2899
+ listFiles: (options?: Partial<StorageListOptions>) => Promise<StorageListResult>;
2900
+ isListing: boolean;
2901
+ listError: string | null;
2902
+ isLoading: boolean;
2903
+ error: string | null;
2904
+ files: StorageFileInfo[];
2905
+ refreshFiles: () => Promise<void>;
2906
+ }
2907
+ /**
2908
+ * Hook for storage operations with app and organisation context
2909
+ */
2910
+ declare function useStorage({ supabase, appName, orgId }: UseStorageOptions): UseStorageReturn;
2911
+ /**
2912
+ * Hook for file upload with progress tracking
2913
+ */
2914
+ declare function useFileUpload({ supabase, appName, orgId }: UseStorageOptions): {
2915
+ uploadWithProgress: (file: File, options?: Partial<StorageUploadOptions>) => Promise<StorageUploadResult>;
2916
+ uploadProgress: number;
2917
+ isUploading: boolean;
2918
+ uploadError: string | null;
2919
+ };
2920
+
2921
+ /**
2922
+ * @file Table Component System
2923
+ * @package @jmruthers/pace-core
2924
+ * @module Components/Table
2925
+ * @since 0.1.0
2926
+ *
2927
+ * A comprehensive table component system for displaying tabular data.
2928
+ * Provides accessible table components with consistent styling and behavior.
2929
+ *
2930
+ * Features:
2931
+ * - Semantic HTML table structure
2932
+ * - Consistent styling and spacing
2933
+ * - Hover states and transitions
2934
+ * - Responsive design
2935
+ * - Accessibility compliant
2936
+ * - Customizable styling
2937
+ * - Checkbox support
2938
+ * - Caption support
2939
+ *
2940
+ * @example
2941
+ * ```tsx
2942
+ * // Basic table
2943
+ * <Table>
2944
+ * <TableCaption>A list of your recent invoices.</TableCaption>
2945
+ * <TableHeader>
2946
+ * <TableRow>
2947
+ * <TableHead>Invoice</TableHead>
2948
+ * <TableHead>Status</TableHead>
2949
+ * <TableHead>Method</TableHead>
2950
+ * <TableHead>Amount</TableHead>
2951
+ * </TableRow>
2952
+ * </TableHeader>
2953
+ * <TableBody>
2954
+ * <TableRow>
2955
+ * <TableCell>INV001</TableCell>
2956
+ * <TableCell>Paid</TableCell>
2957
+ * <TableCell>Credit Card</TableCell>
2958
+ * <TableCell>$250.00</TableCell>
2959
+ * </TableRow>
2960
+ * <TableRow>
2961
+ * <TableCell>INV002</TableCell>
2962
+ * <TableCell>Pending</TableCell>
2963
+ * <TableCell>PayPal</TableCell>
2964
+ * <TableCell>$150.00</TableCell>
2965
+ * </TableRow>
2966
+ * </TableBody>
2967
+ * <TableFooter>
2968
+ * <TableRow>
2969
+ * <TableCell colSpan={3}>Total</TableCell>
2970
+ * <TableCell>$400.00</TableCell>
2971
+ * </TableRow>
2972
+ * </TableFooter>
2973
+ * </Table>
2974
+ *
2975
+ * // Table with checkboxes
2976
+ * <Table>
2977
+ * <TableHeader>
2978
+ * <TableRow>
2979
+ * <TableHead className="w-12">
2980
+ * <Checkbox />
2981
+ * </TableHead>
2982
+ * <TableHead>Name</TableHead>
2983
+ * <TableHead>Email</TableHead>
2984
+ * </TableRow>
2985
+ * </TableHeader>
2986
+ * <TableBody>
2987
+ * <TableRow>
2988
+ * <TableCell>
2989
+ * <Checkbox />
2990
+ * </TableCell>
2991
+ * <TableCell>John Doe</TableCell>
2992
+ * <TableCell>john@example.com</TableCell>
2993
+ * </TableRow>
2994
+ * </TableBody>
2995
+ * </Table>
2996
+ * ```
2997
+ *
2998
+ * @accessibility
2999
+ * - WCAG 2.1 AA compliant
3000
+ * - Proper table semantics
3001
+ * - Screen reader support
3002
+ * - Keyboard navigation
3003
+ * - Focus management
3004
+ * - High contrast support
3005
+ * - Caption for table description
3006
+ *
3007
+ * @dependencies
3008
+ * - React 18+ - Hooks and refs
3009
+ * - Tailwind CSS - Styling
3010
+ */
3011
+
3012
+ /**
3013
+ * Table component
3014
+ * The main table container with semantic HTML structure
3015
+ *
3016
+ * @param props - Table configuration and styling
3017
+ * @param ref - Forwarded ref to the table element
3018
+ * @returns JSX.Element - The rendered table element
3019
+ *
3020
+ * @example
3021
+ * ```tsx
3022
+ * <Table>
3023
+ * <TableHeader>...</TableHeader>
3024
+ * <TableBody>...</TableBody>
3025
+ * </Table>
3026
+ * ```
3027
+ */
3028
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3029
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
3030
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
3031
+ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
3032
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
3033
+ declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
3034
+ declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
3035
+ declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
3036
+
3037
+ interface PublicPageLayoutProps {
3038
+ /** The event code for this public page */
3039
+ eventCode: string;
3040
+ /** Child components to render */
3041
+ children: ReactNode;
3042
+ /** Optional event data - if not provided, will be fetched by parent component */
3043
+ event?: Event | null;
3044
+ /** Whether to show the footer (default: true) */
3045
+ showFooter?: boolean;
3046
+ /** Custom CSS classes for the layout */
3047
+ className?: string;
3048
+ /** Custom error fallback component */
3049
+ errorFallback?: React__default.ComponentType<{
3050
+ error: Error;
3051
+ retry: () => void;
3052
+ }>;
3053
+ /** Custom loading fallback component */
3054
+ loadingFallback?: React__default.ComponentType;
3055
+ /** Custom header component */
3056
+ customHeader?: ReactNode;
3057
+ /** Custom footer component */
3058
+ customFooter?: ReactNode;
3059
+ /** Whether to show event validation errors (default: true) */
3060
+ showValidationErrors?: boolean;
3061
+ }
3062
+ /**
3063
+ * Layout component for public pages that don't require authentication
3064
+ *
3065
+ * This component provides a consistent structure for public event pages
3066
+ * with event-specific branding, error handling, and loading states.
3067
+ *
3068
+ * @param props - Layout configuration and content
3069
+ * @returns React element with complete public page layout
3070
+ */
3071
+ declare function PublicPageLayout({ eventCode, children, event, showFooter, className, errorFallback: ErrorFallback, loadingFallback: LoadingFallback, customHeader, customFooter, showValidationErrors }: PublicPageLayoutProps): react_jsx_runtime.JSX.Element;
3072
+ /**
3073
+ * Hook for accessing public page context
3074
+ * Provides access to event data and layout state within public pages
3075
+ *
3076
+ * @deprecated This hook is no longer needed as PublicPageLayout no longer
3077
+ * automatically fetches event data. Use usePublicRouteParams and usePublicEvent
3078
+ * directly in your components instead.
3079
+ */
3080
+ declare function usePublicPageContext$1(): {
3081
+ eventCode: null;
3082
+ eventId: null;
3083
+ event: null;
3084
+ isLoading: boolean;
3085
+ error: null;
3086
+ refetch: () => Promise<void>;
3087
+ isPublicPage: boolean;
3088
+ };
3089
+
3090
+ interface PublicPageHeaderProps {
3091
+ /** The event data for this public page */
3092
+ event: Event;
3093
+ /** The event code for this public page */
3094
+ eventCode: string;
3095
+ /** Optional page title */
3096
+ title?: string;
3097
+ /** Optional page description */
3098
+ description?: string;
3099
+ /** Whether to show the event logo (default: true) */
3100
+ showEventLogo?: boolean;
3101
+ /** Whether to show the app logo (default: true) */
3102
+ showAppLogo?: boolean;
3103
+ /** Custom CSS classes for the header */
3104
+ className?: string;
3105
+ /** Custom content to display in the header */
3106
+ children?: ReactNode;
3107
+ /** Custom app logo component */
3108
+ customAppLogo?: ReactNode;
3109
+ /** Custom event logo component */
3110
+ customEventLogo?: ReactNode;
3111
+ }
3112
+ /**
3113
+ * Header component for public pages with event-specific branding
3114
+ *
3115
+ * This component displays the app logo, event logo, and event information
3116
+ * in a clean, accessible layout suitable for public pages.
3117
+ *
3118
+ * @param props - Header configuration and content
3119
+ * @returns React element with public page header
3120
+ */
3121
+ declare function PublicPageHeader({ event, eventCode, title, description, showEventLogo, showAppLogo, className, children, customAppLogo, customEventLogo }: PublicPageHeaderProps): react_jsx_runtime.JSX.Element;
3122
+
3123
+ interface PublicPageContextType {
3124
+ isPublicPage: true;
3125
+ supabase: ReturnType<typeof createClient<Database>> | null;
3126
+ environment: {
3127
+ supabaseUrl: string | null;
3128
+ supabaseKey: string | null;
3129
+ };
3130
+ }
3131
+ interface PublicPageProviderProps {
3132
+ children: ReactNode;
3133
+ }
3134
+ /**
3135
+ * Provider for public pages that completely isolates them from authentication context
3136
+ *
3137
+ * This provider:
3138
+ * - Does not initialize any authentication providers
3139
+ * - Provides environment variables for public data access
3140
+ * - Includes error boundary for graceful error handling
3141
+ * - Is completely separate from the main app context
3142
+ */
3143
+ declare function PublicPageProvider({ children }: PublicPageProviderProps): react_jsx_runtime.JSX.Element;
3144
+ /**
3145
+ * Hook to access public page context
3146
+ *
3147
+ * @returns Public page context with environment variables
3148
+ */
3149
+ declare function usePublicPageContext(): PublicPageContextType;
3150
+ /**
3151
+ * Hook to check if we're in a public page context
3152
+ *
3153
+ * @returns True if we're in a public page context
3154
+ */
3155
+ declare function useIsPublicPage(): boolean;
3156
+
3157
+ interface PublicPageFooterProps {
3158
+ /** The event data for this public page */
3159
+ event: Event;
3160
+ /** Company or organization name */
3161
+ companyName?: string;
3162
+ /** Current year or custom year for copyright */
3163
+ year?: number;
3164
+ /** Optional array of navigation links to display */
3165
+ links?: Array<{
3166
+ label: string;
3167
+ href: string;
3168
+ }>;
3169
+ /** Optional CSS class name */
3170
+ className?: string;
3171
+ /** Logo image URL */
3172
+ logo?: string;
3173
+ /** Copyright text */
3174
+ copyright?: string;
3175
+ /** Footer content - children to render inside footer */
3176
+ children?: React__default.ReactNode;
3177
+ }
3178
+ /**
3179
+ * Footer component for public pages that matches the normal Footer exactly
3180
+ *
3181
+ * This component uses the same styling and structure as the main Footer component
3182
+ * to ensure consistency across the application.
3183
+ *
3184
+ * @param props - Footer configuration and content
3185
+ * @returns React element with public page footer
3186
+ */
3187
+ declare function PublicPageFooter({ event, companyName, year, links, className, logo, copyright, children }: PublicPageFooterProps): react_jsx_runtime.JSX.Element;
3188
+
3189
+ /**
3190
+ * @file Public Page Debugger
3191
+ * @package @jmruthers/pace-core
3192
+ * @module Components/PublicLayout
3193
+ * @since 1.0.0
3194
+ *
3195
+ * A debugging component that helps identify why authentication context
3196
+ * is being triggered in public pages.
3197
+ */
3198
+ interface PublicPageDebuggerProps {
3199
+ /** Whether to enable debugging */
3200
+ enabled?: boolean;
3201
+ /** Custom label for this debugger instance */
3202
+ label?: string;
3203
+ }
3204
+ /**
3205
+ * Debugger component that logs context information
3206
+ *
3207
+ * This component helps identify why authentication context
3208
+ * is being triggered in public pages.
3209
+ */
3210
+ declare function PublicPageDebugger({ enabled, label }: PublicPageDebuggerProps): react_jsx_runtime.JSX.Element | null;
3211
+
3212
+ /**
3213
+ * @file Public Page Diagnostic Component
3214
+ * @package @jmruthers/pace-core
3215
+ * @module Components/PublicLayout
3216
+ * @since 1.0.0
3217
+ *
3218
+ * A diagnostic component that helps identify exactly where authentication
3219
+ * context is being triggered in public pages.
3220
+ */
3221
+ interface PublicPageDiagnosticProps {
3222
+ /** Whether to enable diagnostics */
3223
+ enabled?: boolean;
3224
+ /** Custom label for this diagnostic instance */
3225
+ label?: string;
3226
+ }
3227
+ /**
3228
+ * Diagnostic component that identifies authentication context issues
3229
+ *
3230
+ * This component will help you identify exactly where the problem is
3231
+ * in your public page implementation.
3232
+ */
3233
+ declare function PublicPageDiagnostic({ enabled, label }: PublicPageDiagnosticProps): react_jsx_runtime.JSX.Element | null;
3234
+
3235
+ /**
3236
+ * @file Public Page Context Checker
3237
+ * @package @jmruthers/pace-core
3238
+ * @module Components/PublicLayout
3239
+ * @since 1.0.0
3240
+ *
3241
+ * A simple component that immediately identifies if a public page
3242
+ * is being rendered inside authentication context.
3243
+ */
3244
+ interface PublicPageContextCheckerProps {
3245
+ /** Whether to enable checking */
3246
+ enabled?: boolean;
3247
+ /** Custom label for this checker instance */
3248
+ label?: string;
3249
+ }
3250
+ /**
3251
+ * Context checker component that immediately identifies authentication context issues
3252
+ *
3253
+ * This component will immediately log to console if authentication context
3254
+ * is being triggered in a public page.
3255
+ */
3256
+ declare function PublicPageContextChecker({ enabled, label }: PublicPageContextCheckerProps): react_jsx_runtime.JSX.Element | null;
3257
+
3258
+ interface EventLogoProps {
3259
+ /** The event ID to fetch logo for */
3260
+ eventId: string;
3261
+ /** The event name for fallback text generation */
3262
+ eventName: string;
3263
+ /** The organisation ID for storage path */
3264
+ organisationId: string;
3265
+ /** Logo size variant */
3266
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
3267
+ /** Custom CSS classes */
3268
+ className?: string;
3269
+ /** Whether to show fallback text when no logo is available */
3270
+ showFallback?: boolean;
3271
+ /** Custom fallback text generator */
3272
+ generateFallbackText?: (eventName: string) => string;
3273
+ /** Whether to validate image existence */
3274
+ validateImage?: boolean;
3275
+ /** Custom loading component */
3276
+ loadingComponent?: React__default.ComponentType;
3277
+ /** Custom error component */
3278
+ errorComponent?: React__default.ComponentType<{
3279
+ error: Error;
3280
+ }>;
3281
+ }
3282
+ /**
3283
+ * Component for displaying event logos with fallback to initials
3284
+ *
3285
+ * This component is context-aware and automatically detects whether it's being used
3286
+ * in a public or authenticated context. It fetches and displays event logos from storage,
3287
+ * with automatic fallback to event initials if no logo is available.
3288
+ *
3289
+ * @param props - Logo configuration and styling
3290
+ * @returns React element with event logo or fallback
3291
+ */
3292
+ declare function EventLogo({ eventId, eventName, organisationId, size, className, showFallback, generateFallbackText, validateImage, loadingComponent: LoadingComponent, errorComponent: ErrorComponent }: EventLogoProps): react_jsx_runtime.JSX.Element | null;
3293
+ /**
3294
+ * Compact event logo for small spaces
3295
+ */
3296
+ declare function EventLogoCompact(props: EventLogoProps): react_jsx_runtime.JSX.Element;
3297
+ /**
3298
+ * Large event logo for prominent display
3299
+ */
3300
+ declare function EventLogoLarge(props: EventLogoProps): react_jsx_runtime.JSX.Element;
3301
+
3302
+ interface PublicErrorBoundaryProps {
3303
+ /** Child components to wrap */
3304
+ children: ReactNode;
3305
+ /** Custom error fallback component */
3306
+ fallback?: React__default.ComponentType<PublicErrorBoundaryState>;
3307
+ /** Custom CSS classes for error display */
3308
+ className?: string;
3309
+ /** Whether to show error details in development */
3310
+ showErrorDetails?: boolean;
3311
+ /** Custom error message */
3312
+ customErrorMessage?: string;
3313
+ /** Custom recovery action */
3314
+ onRecover?: () => void;
3315
+ }
3316
+ interface PublicErrorBoundaryState {
3317
+ /** Whether an error has occurred */
3318
+ hasError: boolean;
3319
+ /** The error that occurred */
3320
+ error: Error | null;
3321
+ /** Error information */
3322
+ errorInfo: ErrorInfo | null;
3323
+ /** Function to reset the error state */
3324
+ resetError: () => void;
3325
+ }
3326
+ /**
3327
+ * Error boundary component for public pages
3328
+ *
3329
+ * This component catches JavaScript errors anywhere in the child component tree,
3330
+ * logs those errors, and displays a fallback UI instead of the component tree that crashed.
3331
+ *
3332
+ * @param props - Error boundary configuration
3333
+ * @returns React element with error boundary wrapper
3334
+ */
3335
+ declare class PublicErrorBoundary extends Component<PublicErrorBoundaryProps, PublicErrorBoundaryState> {
3336
+ constructor(props: PublicErrorBoundaryProps);
3337
+ static getDerivedStateFromError(error: Error): Partial<PublicErrorBoundaryState>;
3338
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
3339
+ resetError: () => void;
3340
+ render(): string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
3341
+ }
3342
+ /**
3343
+ * Hook for accessing error boundary state
3344
+ * Useful for components that need to know if they're inside an error boundary
3345
+ */
3346
+ declare function useErrorBoundary(): {
3347
+ captureError: (error: Error) => void;
3348
+ resetError: () => void;
3349
+ };
3350
+ /**
3351
+ * Default error fallback component
3352
+ */
3353
+ declare function DefaultPublicErrorFallback({ error, resetError }: PublicErrorBoundaryState): react_jsx_runtime.JSX.Element;
3354
+
3355
+ /**
3356
+ * @file Public Loading Spinner Component
3357
+ * @package @jmruthers/pace-core
3358
+ * @module Components/PublicLayout
3359
+ * @since 1.0.0
3360
+ *
3361
+ * A loading spinner component specifically designed for public pages.
3362
+ * Provides consistent loading states with event-specific branding.
3363
+ *
3364
+ * Features:
3365
+ * - Consistent loading design
3366
+ * - Event-specific branding
3367
+ * - Multiple size options
3368
+ * - Accessibility compliant
3369
+ * - TypeScript support
3370
+ *
3371
+ * @example
3372
+ * ```tsx
3373
+ * import { PublicLoadingSpinner } from '@jmruthers/pace-core';
3374
+ *
3375
+ * function PublicEventPage() {
3376
+ * if (isLoading) {
3377
+ * return <PublicLoadingSpinner message="Loading event details..." />;
3378
+ * }
3379
+ * }
3380
+ * ```
3381
+ *
3382
+ * @accessibility
3383
+ * - WCAG 2.1 AA compliant
3384
+ * - Screen reader friendly
3385
+ * - Proper ARIA labels
3386
+ * - High contrast support
3387
+ *
3388
+ * @dependencies
3389
+ * - React 18+ - Component framework
3390
+ * - Tailwind CSS - Styling
3391
+ */
3392
+ interface PublicLoadingSpinnerProps {
3393
+ /** Loading message to display */
3394
+ message?: string;
3395
+ /** Size variant */
3396
+ size?: 'sm' | 'md' | 'lg' | 'xl';
3397
+ /** Custom CSS classes */
3398
+ className?: string;
3399
+ /** Whether to show the app logo */
3400
+ showLogo?: boolean;
3401
+ /** Custom loading message */
3402
+ customMessage?: string;
3403
+ /** Whether to center the spinner */
3404
+ centered?: boolean;
3405
+ }
3406
+ /**
3407
+ * Loading spinner component for public pages
3408
+ *
3409
+ * This component displays a consistent loading state with optional
3410
+ * branding and messaging for public pages.
3411
+ *
3412
+ * @param props - Spinner configuration and styling
3413
+ * @returns React element with loading spinner
3414
+ */
3415
+ declare function PublicLoadingSpinner({ message, size, className, showLogo, customMessage, centered }: PublicLoadingSpinnerProps): react_jsx_runtime.JSX.Element;
3416
+ /**
3417
+ * Full page loading spinner with event branding
3418
+ */
3419
+ declare function PublicLoadingSpinnerFullPage({ message, eventName, className }: Pick<PublicLoadingSpinnerProps, 'message' | 'className'> & {
3420
+ eventName?: string;
3421
+ }): react_jsx_runtime.JSX.Element;
3422
+ /**
3423
+ * Skeleton loading component for content placeholders
3424
+ */
3425
+ declare function PublicLoadingSkeleton({ lines, className }: {
3426
+ lines?: number;
3427
+ className?: string;
3428
+ }): react_jsx_runtime.JSX.Element;
3429
+
3430
+ export { ToastViewport as $, Alert as A, Button as B, Card as C, Dialog as D, DialogContent as E, type FileSizeLimits as F, DialogHeader as G, DialogBody as H, Input as I, DialogFooter as J, DialogTitle as K, Label as L, DialogDescription as M, Select as N, SelectGroup as O, Progress as P, SelectValue as Q, SelectTrigger as R, type StorageConfig as S, SelectContent as T, SelectLabel as U, SelectItem as V, SelectSeparator as W, Toast as X, Toaster as Y, ToastAction as Z, ToastProvider as _, type StorageUploadOptions as a, type PublicPageLayoutProps as a$, ToastTitle as a0, ToastDescription as a1, ToastClose as a2, useToast as a3, type ToastActionElement as a4, type ToastProps as a5, Tooltip as a6, TooltipTrigger as a7, TooltipContent as a8, TooltipProvider as a9, TableHeader as aA, TableBody as aB, TableCaption as aC, TableCell as aD, TableFooter as aE, TableHead as aF, TableRow as aG, type StorageFileInfo as aH, PublicPageLayout as aI, usePublicPageContext$1 as aJ, PublicPageHeader as aK, PublicPageProvider as aL, usePublicPageContext as aM, useIsPublicPage as aN, PublicPageFooter as aO, PublicPageDebugger as aP, PublicPageDiagnostic as aQ, PublicPageContextChecker as aR, EventLogo as aS, EventLogoCompact as aT, EventLogoLarge as aU, PublicErrorBoundary as aV, useErrorBoundary as aW, DefaultPublicErrorFallback as aX, PublicLoadingSpinner as aY, PublicLoadingSpinnerFullPage as aZ, PublicLoadingSkeleton as a_, TooltipRoot as aa, Form as ab, LoginForm as ac, type LoginFormProps as ad, Header as ae, Footer as af, type FooterProps as ag, NavigationMenu as ah, type NavigationMenuProps as ai, type NavigationItem as aj, UserMenu as ak, type UserMenuProps as al, PaceAppLayout as am, type PaceAppLayoutProps as an, PaceLoginPage as ao, type PaceLoginPageProps as ap, ErrorBoundary as aq, LoadingSpinner as ar, EventSelector as as, OrganisationSelector as at, PasswordResetForm as au, FileUpload as av, type FileUploadProps as aw, useStorage as ax, useFileUpload as ay, Table as az, type StorageUploadResult as b, type PublicPageHeaderProps as b0, type PublicPageFooterProps as b1, type EventLogoProps as b2, type PublicErrorBoundaryProps as b3, type PublicErrorBoundaryState as b4, type PublicLoadingSpinnerProps as b5, type CardActionsProps as b6, type DialogProps as b7, type DialogTriggerProps as b8, type DialogContentProps as b9, type DialogOverlayProps as ba, type DialogHeaderProps as bb, type DialogFooterProps as bc, type DialogTitleProps as bd, type DialogDescriptionProps as be, type DialogSize as bf, type FormProps as bg, type OrganisationSelectorProps as bh, type ErrorBoundaryProps as bi, type ErrorBoundaryState as bj, type UseStorageOptions as bk, type UseStorageReturn as bl, type StorageUrlOptions as c, type StorageListOptions as d, type StorageListResult as e, type StorageFileMetadata as f, type ButtonProps as g, CardHeader as h, CardFooter as i, CardTitle as j, CardDescription as k, CardContent as l, CardActions as m, type CardProps as n, type InputProps as o, type LabelProps as p, AlertTitle as q, AlertDescription as r, Avatar as s, AvatarImage as t, AvatarFallback as u, Checkbox as v, DialogPortal as w, DialogOverlay as x, DialogTrigger as y, DialogClose as z };