@jmruthers/pace-core 0.6.9 → 0.6.11

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