@jmruthers/pace-core 0.2.7 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -26
- package/README.md +229 -231
- package/dist/{DataTable-EEUDXPE5.js → DataTable-2LB6HI6V.js} +17 -10
- package/dist/{DataTable-C1AEm9Cx.d.ts → DataTable-BDBqkU-i.d.ts} +51 -23
- package/dist/{PublicLoadingSpinner-DztrzuJr.d.ts → Table-CIm9IWqk.d.ts} +122 -635
- package/dist/UnifiedAuthProvider-V7y63NjT.d.ts +88 -0
- package/dist/{api-ETQ6YJ3C.js → api-AIJ3IJX3.js} +4 -6
- package/dist/{appConfig-BVGyuvI7.d.ts → appConfig-fB1pP_v3.d.ts} +1 -1
- package/dist/{audit-BUW3LMJB.js → audit-PD5L5ZSC.js} +3 -3
- package/dist/{chunk-ETEJVKYK.js → chunk-4MCJAK7J.js} +4927 -504
- package/dist/chunk-4MCJAK7J.js.map +1 -0
- package/dist/{chunk-CDQ3PX7L.js → chunk-4ZTIEYU2.js} +1 -1
- package/dist/chunk-4ZTIEYU2.js.map +1 -0
- package/dist/{chunk-PLDDJCW6.js → chunk-DC5AMYBS.js} +5 -15
- package/dist/{chunk-HEMJ4SUJ.js → chunk-H4PZ4B3Y.js} +27 -124
- package/dist/chunk-H4PZ4B3Y.js.map +1 -0
- package/dist/{chunk-HNDFPXUU.js → chunk-IOX76PSM.js} +28 -270
- package/dist/chunk-IOX76PSM.js.map +1 -0
- package/dist/{chunk-TIVL4UQ7.js → chunk-JUUNUW3O.js} +5 -14
- package/dist/chunk-JUUNUW3O.js.map +1 -0
- package/dist/chunk-KK6WIDK6.js +63 -0
- package/dist/chunk-KK6WIDK6.js.map +1 -0
- package/dist/chunk-U7DY5T33.js +11 -0
- package/dist/chunk-U7DY5T33.js.map +1 -0
- package/dist/{chunk-SS3E6QLB.js → chunk-WHLSWC6W.js} +61 -16
- package/dist/chunk-WHLSWC6W.js.map +1 -0
- package/dist/chunk-XI7QFSSC.js +790 -0
- package/dist/chunk-XI7QFSSC.js.map +1 -0
- package/dist/chunk-XIJMMBDD.js +73 -0
- package/dist/chunk-XIJMMBDD.js.map +1 -0
- package/dist/{chunk-7BNPOCLL.js → chunk-YNU5QJ4S.js} +5 -22
- package/dist/chunk-YNU5QJ4S.js.map +1 -0
- package/dist/chunk-YWYCNGWH.js +2070 -0
- package/dist/chunk-YWYCNGWH.js.map +1 -0
- package/dist/chunk-ZJ3UKPIW.js +952 -0
- package/dist/chunk-ZJ3UKPIW.js.map +1 -0
- package/dist/components.d.ts +10 -906
- package/dist/components.js +77 -3255
- package/dist/components.js.map +1 -1
- package/dist/{database-C3Szpi5J.d.ts → database-CAMsquLm.d.ts} +11 -28
- package/dist/hooks.d.ts +6 -7
- package/dist/hooks.js +11 -35
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +111 -245
- package/dist/index.js +178 -187
- package/dist/index.js.map +1 -1
- package/dist/{organisation-CO3Sh3_D.d.ts → organisation-DLNNQhPB.d.ts} +1 -1
- package/dist/providers.d.ts +4 -4
- package/dist/providers.js +5 -19
- package/dist/rbac/index.d.ts +5 -61
- package/dist/rbac/index.js +93 -256
- package/dist/rbac/index.js.map +1 -1
- package/dist/{types-DiRQsGJs.d.ts → types-Bavn44NW.d.ts} +36 -71
- package/dist/types.d.ts +5 -5
- package/dist/types.js +2 -7
- package/dist/types.js.map +1 -1
- package/dist/{unified-CM7T0aTK.d.ts → unified-BtRpPbmp.d.ts} +2 -1
- package/dist/useAppConfig-CZNJJsT_.d.ts +148 -0
- package/dist/utils.d.ts +60 -83
- package/dist/utils.js +55633 -277
- package/dist/utils.js.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +1 -1
- package/docs/README.md +32 -46
- package/docs/api/README.md +229 -231
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +4 -4
- package/docs/api/interfaces/ButtonProps.md +2 -2
- package/docs/api/interfaces/CardProps.md +2 -2
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +7 -85
- package/docs/api/interfaces/DataTableColumn.md +12 -131
- package/docs/api/interfaces/DataTableProps.md +274 -64
- package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
- package/docs/api/interfaces/EmptyStateConfig.md +5 -5
- package/docs/api/interfaces/EventContextType.md +7 -7
- package/docs/api/interfaces/EventProviderProps.md +2 -2
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +2 -2
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +26 -26
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/StyleImport.md +2 -2
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +46 -447
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +9 -95
- package/docs/api/interfaces/UserEventAccess.md +14 -14
- package/docs/api/interfaces/UserMenuProps.md +6 -6
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +773 -1631
- package/docs/api-reference/components.md +43 -761
- package/docs/api-reference/hooks.md +0 -126
- package/docs/api-reference/providers.md +65 -141
- package/docs/api-reference/types.md +36 -66
- package/docs/api-reference/utilities.md +1 -1
- package/docs/architecture/README.md +2 -1
- package/docs/consuming-app-example.md +96 -42
- package/docs/core-concepts/events.md +3 -3
- package/docs/core-concepts/organisations.md +1 -0
- package/docs/core-concepts/rbac-system.md +10 -23
- package/docs/documentation-style-checklist.md +2 -8
- package/docs/getting-started/examples/README.md +1 -15
- package/docs/getting-started/examples/basic-auth-app.md +119 -444
- package/docs/getting-started/examples/full-featured-app.md +6 -6
- package/docs/getting-started/installation.md +52 -231
- package/docs/getting-started/quick-start.md +24 -121
- package/docs/implementation-guides/app-layout.md +108 -133
- package/docs/implementation-guides/data-tables.md +29 -1011
- package/docs/implementation-guides/forms.md +3 -3
- package/docs/implementation-guides/large-datasets.md +2 -2
- package/docs/implementation-guides/navigation.md +1 -1
- package/docs/implementation-guides/permission-enforcement.md +4 -4
- package/docs/migration/README.md +8 -18
- package/docs/migration/rbac-migration.md +0 -50
- package/docs/migration-guide.md +104 -51
- package/docs/performance/README.md +4 -1
- package/docs/quick-reference.md +36 -53
- package/docs/rbac/README.md +69 -136
- package/docs/rbac/api-reference.md +8 -39
- package/docs/rbac/examples.md +66 -237
- package/docs/rbac/getting-started.md +16 -131
- package/docs/rbac/quick-start.md +323 -499
- package/docs/rbac/troubleshooting.md +262 -240
- package/docs/security/README.md +1 -50
- package/docs/styles/README.md +117 -143
- package/docs/testing/README.md +10 -6
- package/docs/troubleshooting/common-issues.md +14 -604
- package/docs/usage.md +90 -28
- package/docs/visual-testing.md +7 -0
- package/package.json +24 -43
- package/dist/UnifiedAuthProvider-w66zSCUf.d.ts +0 -160
- package/dist/appNameResolver-7GHF5ED2.js +0 -22
- package/dist/chunk-2V3Y6YBC.js +0 -114
- package/dist/chunk-2V3Y6YBC.js.map +0 -1
- package/dist/chunk-7BNPOCLL.js.map +0 -1
- package/dist/chunk-BEZRLNK3.js +0 -1744
- package/dist/chunk-BEZRLNK3.js.map +0 -1
- package/dist/chunk-C5G2A4PO.js +0 -1349
- package/dist/chunk-C5G2A4PO.js.map +0 -1
- package/dist/chunk-CDQ3PX7L.js.map +0 -1
- package/dist/chunk-ETEJVKYK.js.map +0 -1
- package/dist/chunk-EWKPTNPO.js +0 -5139
- package/dist/chunk-EWKPTNPO.js.map +0 -1
- package/dist/chunk-HEMJ4SUJ.js.map +0 -1
- package/dist/chunk-HNDFPXUU.js.map +0 -1
- package/dist/chunk-MZBUOP4P.js +0 -119
- package/dist/chunk-MZBUOP4P.js.map +0 -1
- package/dist/chunk-N2EUGZRW.js +0 -98
- package/dist/chunk-N2EUGZRW.js.map +0 -1
- package/dist/chunk-NQ4TOOO6.js +0 -20
- package/dist/chunk-NQ4TOOO6.js.map +0 -1
- package/dist/chunk-OHXGNT3K.js +0 -21
- package/dist/chunk-OHXGNT3K.js.map +0 -1
- package/dist/chunk-PLDDJCW6.js.map +0 -1
- package/dist/chunk-RRUYHORU.js +0 -3431
- package/dist/chunk-RRUYHORU.js.map +0 -1
- package/dist/chunk-SS3E6QLB.js.map +0 -1
- package/dist/chunk-TIVL4UQ7.js.map +0 -1
- package/dist/chunk-VYG4AXYW.js +0 -388
- package/dist/chunk-VYG4AXYW.js.map +0 -1
- package/dist/chunk-YDJW5XTN.js +0 -84
- package/dist/chunk-YDJW5XTN.js.map +0 -1
- package/dist/styles/core.css +0 -422
- package/dist/styles/fonts/georama-italic.woff2 +0 -0
- package/dist/styles/fonts/georama.woff2 +0 -0
- package/dist/styles/fonts/open-sans-italic.woff2 +0 -0
- package/dist/styles/fonts/open-sans.woff2 +0 -0
- package/dist/styles/fonts/reddit-mono.woff2 +0 -0
- package/dist/styles/index.d.ts +0 -36
- package/dist/styles/index.js +0 -24
- package/dist/styles/index.js.map +0 -1
- package/dist/theming/runtime.d.ts +0 -73
- package/dist/theming/runtime.js +0 -16
- package/dist/theming/runtime.js.map +0 -1
- package/dist/usePublicRouteParams-B6i0KtXW.d.ts +0 -477
- package/docs/INDEX.md +0 -192
- package/docs/api/classes/PublicErrorBoundary.md +0 -132
- package/docs/api/interfaces/EventLogoProps.md +0 -152
- package/docs/api/interfaces/FileSizeLimits.md +0 -7
- package/docs/api/interfaces/FileUploadProps.md +0 -154
- package/docs/api/interfaces/InactivityWarningModalProps.md +0 -115
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +0 -94
- package/docs/api/interfaces/PublicErrorBoundaryState.md +0 -68
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +0 -86
- package/docs/api/interfaces/PublicPageFooterProps.md +0 -112
- package/docs/api/interfaces/PublicPageHeaderProps.md +0 -138
- package/docs/api/interfaces/PublicPageLayoutProps.md +0 -138
- package/docs/api/interfaces/StorageConfig.md +0 -41
- package/docs/api/interfaces/StorageFileInfo.md +0 -74
- package/docs/api/interfaces/StorageFileMetadata.md +0 -140
- package/docs/api/interfaces/StorageListOptions.md +0 -86
- package/docs/api/interfaces/StorageListResult.md +0 -41
- package/docs/api/interfaces/StorageUploadOptions.md +0 -88
- package/docs/api/interfaces/StorageUploadResult.md +0 -63
- package/docs/api/interfaces/StorageUrlOptions.md +0 -47
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +0 -136
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +0 -123
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +0 -87
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +0 -81
- package/docs/api/interfaces/UsePublicEventOptions.md +0 -34
- package/docs/api/interfaces/UsePublicEventReturn.md +0 -68
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +0 -94
- package/docs/best-practices/README.md +0 -400
- package/docs/consuming-app-vite-config.md +0 -233
- package/docs/examples/navigation-menu-auth-fix.md +0 -344
- package/docs/implementation-guides/hierarchical-datatable.md +0 -850
- package/docs/implementation-guides/public-pages.md +0 -752
- package/docs/migration/quick-migration-guide.md +0 -320
- package/docs/migration/v0.4.15-tailwind-scanning.md +0 -272
- package/docs/migration/v0.4.16-css-first-approach.md +0 -306
- package/docs/migration/v0.4.17-source-path-fix.md +0 -229
- package/docs/print-components/README.md +0 -258
- package/docs/print-components/api-reference.md +0 -636
- package/docs/print-components/examples/README.md +0 -204
- package/docs/print-components/examples/basic-report.tsx +0 -92
- package/docs/print-components/examples/card-catalog.tsx +0 -149
- package/docs/print-components/examples/cover-page-report.tsx +0 -163
- package/docs/print-components/quick-start.md +0 -363
- package/docs/troubleshooting/README.md +0 -497
- package/docs/troubleshooting/styling-issues.md +0 -219
- package/docs/troubleshooting/tailwind-content-scanning.md +0 -213
- package/src/__mocks__/lucide-react.ts +0 -181
- package/src/__tests__/README.md +0 -404
- package/src/__tests__/debug-provider.unit.test.tsx +0 -67
- package/src/__tests__/e2e/workflows.test.tsx +0 -373
- package/src/__tests__/hybridPermissions.unit.test.tsx +0 -474
- package/src/__tests__/index.integration.test.ts +0 -491
- package/src/__tests__/mocks/MockAuthProvider-standalone.tsx +0 -47
- package/src/__tests__/mocks/MockAuthProvider.tsx +0 -63
- package/src/__tests__/mocks/enhancedSupabaseMock.ts +0 -252
- package/src/__tests__/mocks/index.test.ts +0 -23
- package/src/__tests__/mocks/index.ts +0 -16
- package/src/__tests__/mocks/mockAuth.ts +0 -155
- package/src/__tests__/mocks/mockSupabase.ts +0 -83
- package/src/__tests__/mocks/mockSupabaseClient.ts +0 -63
- package/src/__tests__/mocks/providers.tsx +0 -22
- package/src/__tests__/patterns/__tests__/testPatterns.test.ts +0 -394
- package/src/__tests__/patterns/testPatterns.ts +0 -124
- package/src/__tests__/performance/componentPerformance.performance.test.ts +0 -27
- package/src/__tests__/performance/index.ts +0 -24
- package/src/__tests__/performance/performanceValidation.performance.test.ts +0 -15
- package/src/__tests__/security/security.unit.test.tsx +0 -7
- package/src/__tests__/security/securityValidation.security.test.tsx +0 -153
- package/src/__tests__/setup.ts +0 -259
- package/src/__tests__/setupTests.d.ts +0 -1
- package/src/__tests__/shared/componentTestUtils.tsx +0 -475
- package/src/__tests__/shared/errorHandlingTestUtils.ts +0 -107
- package/src/__tests__/shared/index.ts +0 -81
- package/src/__tests__/shared/integrationTestUtils.tsx +0 -375
- package/src/__tests__/shared/performanceTestUtils.tsx +0 -476
- package/src/__tests__/shared/testUtils.optimized.tsx +0 -685
- package/src/__tests__/simple.test.tsx +0 -20
- package/src/__tests__/templates/accessibility.test.template.tsx +0 -279
- package/src/__tests__/templates/component.test.template.tsx +0 -122
- package/src/__tests__/templates/integration.test.template.tsx +0 -199
- package/src/__tests__/test-utils/dataFactories.ts +0 -60
- package/src/__tests__/test-utils/index.ts +0 -6
- package/src/__tests__/typeSafety.unit.test.ts +0 -65
- package/src/__tests__/unifiedAuth.unit.test.tsx +0 -151
- package/src/__tests__/utils/accessibilityHelpers.ts +0 -254
- package/src/__tests__/utils/assertions.ts +0 -50
- package/src/__tests__/utils/deterministicHelpers.ts +0 -31
- package/src/__tests__/utils/edgeCaseConfig.test.ts +0 -75
- package/src/__tests__/utils/edgeCaseConfig.ts +0 -98
- package/src/__tests__/utils/mockHelpers.ts +0 -149
- package/src/__tests__/utils/mockLoader.ts +0 -101
- package/src/__tests__/utils/performanceHelpers.ts +0 -55
- package/src/__tests__/utils/performanceTestHelpers.ts +0 -68
- package/src/__tests__/utils/testDataFactories.ts +0 -28
- package/src/__tests__/utils/testIsolation.ts +0 -67
- package/src/__tests__/utils/visualTestHelpers.ts +0 -20
- package/src/__tests__/visual/__snapshots__/componentSnapshots.visual.test.tsx.snap +0 -68
- package/src/__tests__/visual/__snapshots__/componentVisuals.visual.test.tsx.snap +0 -14
- package/src/__tests__/visual/__snapshots__/visualRegression.test.tsx.snap +0 -217
- package/src/__tests__/visual/__snapshots__/visualRegression.visual.test.tsx.snap +0 -24
- package/src/__tests__/visual/componentSnapshots.visual.test.tsx +0 -33
- package/src/__tests__/visual/componentVisuals.visual.test.tsx +0 -12
- package/src/__tests__/visual/visualRegression.visual.test.tsx +0 -20
- package/src/components/Alert/Alert.tsx +0 -134
- package/src/components/Alert/__tests__/Alert.unit.test.tsx +0 -381
- package/src/components/Alert/index.ts +0 -2
- package/src/components/Avatar/Avatar.tsx +0 -84
- package/src/components/Avatar/__tests__/Avatar.unit.test.tsx +0 -232
- package/src/components/Avatar/index.ts +0 -2
- package/src/components/Button/Button.tsx +0 -270
- package/src/components/Button/__tests__/Button.accessibility.test.tsx +0 -131
- package/src/components/Button/__tests__/Button.comprehensive.test.tsx +0 -721
- package/src/components/Button/__tests__/Button.unit.test.tsx +0 -189
- package/src/components/Button/__tests__/EventSelector.integration.test.tsx +0 -285
- package/src/components/Button/index.ts +0 -2
- package/src/components/Card/Card.tsx +0 -271
- package/src/components/Card/__tests__/Card.accessibility.test.tsx +0 -394
- package/src/components/Card/__tests__/Card.comprehensive.test.tsx +0 -599
- package/src/components/Card/__tests__/Card.integration.test.tsx +0 -673
- package/src/components/Card/__tests__/Card.performance.test.tsx +0 -546
- package/src/components/Card/__tests__/Card.unit.test.tsx +0 -330
- package/src/components/Card/__tests__/Card.visual.test.tsx +0 -599
- package/src/components/Card/__tests__/README.md +0 -211
- package/src/components/Card/index.ts +0 -1
- package/src/components/Checkbox/Checkbox.tsx +0 -75
- package/src/components/Checkbox/__mocks__/Checkbox.tsx +0 -2
- package/src/components/Checkbox/__tests__/Checkbox.unit.test.tsx +0 -520
- package/src/components/Checkbox/index.ts +0 -2
- package/src/components/DataTable/DataTable.tsx +0 -438
- package/src/components/DataTable/__tests__/DataTable.errorHandling.test.tsx +0 -251
- package/src/components/DataTable/__tests__/DataTable.hierarchical.test.tsx +0 -680
- package/src/components/DataTable/__tests__/DataTable.infinite-loop.test.tsx +0 -323
- package/src/components/DataTable/__tests__/DataTable.integration.test.tsx +0 -716
- package/src/components/DataTable/__tests__/DataTable.performance.test.tsx +0 -589
- package/src/components/DataTable/__tests__/DataTable.permissions.test.tsx +0 -316
- package/src/components/DataTable/__tests__/DataTable.regressionFixes.test.tsx +0 -546
- package/src/components/DataTable/__tests__/DataTable.selection.controlled.test.tsx +0 -386
- package/src/components/DataTable/__tests__/DataTable.selection.test.tsx +0 -338
- package/src/components/DataTable/__tests__/DataTable.sorting.test.tsx +0 -321
- package/src/components/DataTable/__tests__/DataTable.userWorkflows.test.tsx +0 -320
- package/src/components/DataTable/__tests__/DataTable.workflowValidation.test.tsx +0 -583
- package/src/components/DataTable/__tests__/DataTable.workflows.test.tsx +0 -711
- package/src/components/DataTable/__tests__/README.md +0 -145
- package/src/components/DataTable/__tests__/mocks/MockRBACProvider.tsx +0 -66
- package/src/components/DataTable/__tests__/performance-regression.test.tsx +0 -777
- package/src/components/DataTable/__tests__/performance.test.tsx +0 -365
- package/src/components/DataTable/__tests__/test-utils/dataFactories.ts +0 -103
- package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +0 -381
- package/src/components/DataTable/__tests__/test-utils.ts +0 -94
- package/src/components/DataTable/components/ActionButtons.tsx +0 -177
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +0 -160
- package/src/components/DataTable/components/ColumnFilter.tsx +0 -114
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +0 -100
- package/src/components/DataTable/components/DataTableBody.tsx +0 -461
- package/src/components/DataTable/components/DataTableCore.tsx +0 -941
- package/src/components/DataTable/components/DataTableErrorBoundary.tsx +0 -214
- package/src/components/DataTable/components/DataTableModals.tsx +0 -87
- package/src/components/DataTable/components/DataTableToolbar.tsx +0 -250
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +0 -144
- package/src/components/DataTable/components/EditableRow.tsx +0 -159
- package/src/components/DataTable/components/EmptyState.tsx +0 -64
- package/src/components/DataTable/components/ExpandButton.tsx +0 -113
- package/src/components/DataTable/components/FilterRow.tsx +0 -100
- package/src/components/DataTable/components/GroupHeader.tsx +0 -42
- package/src/components/DataTable/components/GroupingDropdown.tsx +0 -96
- package/src/components/DataTable/components/ImportModal.tsx +0 -345
- package/src/components/DataTable/components/LoadingState.tsx +0 -12
- package/src/components/DataTable/components/PaginationControls.tsx +0 -332
- package/src/components/DataTable/components/UnifiedTableBody.tsx +0 -713
- package/src/components/DataTable/components/ViewRowModal.tsx +0 -68
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +0 -513
- package/src/components/DataTable/components/__tests__/ActionButtons.unit.test.tsx +0 -150
- package/src/components/DataTable/components/__tests__/BulkOperationsDropdown.test.tsx +0 -224
- package/src/components/DataTable/components/__tests__/ColumnVisibilityDropdown.unit.test.tsx +0 -244
- package/src/components/DataTable/components/__tests__/DataTable.accessibility.test.tsx +0 -629
- package/src/components/DataTable/components/__tests__/DataTable.integration.test.tsx +0 -470
- package/src/components/DataTable/components/__tests__/DataTable.performance.test.tsx +0 -160
- package/src/components/DataTable/components/__tests__/DataTable.real.test.tsx +0 -251
- package/src/components/DataTable/components/__tests__/DataTable.security.test.tsx +0 -171
- package/src/components/DataTable/components/__tests__/DataTable.unit.test.tsx +0 -290
- package/src/components/DataTable/components/__tests__/DataTableBody.unit.test.tsx +0 -147
- package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.unit.test.tsx +0 -182
- package/src/components/DataTable/components/__tests__/DataTableModals.unit.test.tsx +0 -123
- package/src/components/DataTable/components/__tests__/EditableRow.unit.test.tsx +0 -660
- package/src/components/DataTable/components/__tests__/EmptyState.unit.test.tsx +0 -256
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +0 -498
- package/src/components/DataTable/components/__tests__/FilterRow.unit.test.tsx +0 -112
- package/src/components/DataTable/components/__tests__/FilteringToggle.unit.test.tsx +0 -133
- package/src/components/DataTable/components/__tests__/GroupHeader.unit.test.tsx +0 -172
- package/src/components/DataTable/components/__tests__/GroupingDropdown.unit.test.tsx +0 -222
- package/src/components/DataTable/components/__tests__/ImportModal.unit.test.tsx +0 -780
- package/src/components/DataTable/components/__tests__/LoadingState.unit.test.tsx +0 -65
- package/src/components/DataTable/components/__tests__/PaginationControls.unit.test.tsx +0 -634
- package/src/components/DataTable/components/__tests__/StateComponents.unit.test.tsx +0 -48
- package/src/components/DataTable/components/__tests__/UnifiedTableBody.hierarchical.test.tsx +0 -541
- package/src/components/DataTable/components/__tests__/ViewRowModal.unit.test.tsx +0 -228
- package/src/components/DataTable/components/__tests__/VirtualizedDataTable.unit.test.tsx +0 -568
- package/src/components/DataTable/components/index.ts +0 -16
- package/src/components/DataTable/context/DataTableContext.tsx +0 -97
- package/src/components/DataTable/core/ActionManager.ts +0 -235
- package/src/components/DataTable/core/ColumnFactory.ts +0 -268
- package/src/components/DataTable/core/ColumnManager.ts +0 -205
- package/src/components/DataTable/core/DataManager.ts +0 -188
- package/src/components/DataTable/core/DataTableContext.tsx +0 -181
- package/src/components/DataTable/core/LocalDataAdapter.ts +0 -264
- package/src/components/DataTable/core/PluginRegistry.ts +0 -229
- package/src/components/DataTable/core/StateManager.ts +0 -311
- package/src/components/DataTable/core/__tests__/ActionManager.unit.test.ts +0 -405
- package/src/components/DataTable/core/__tests__/ArchitectureIntegration.unit.test.tsx +0 -445
- package/src/components/DataTable/core/__tests__/ColumnFactory.unit.test.ts +0 -288
- package/src/components/DataTable/core/__tests__/ColumnManager.unit.test.ts +0 -623
- package/src/components/DataTable/core/__tests__/DataManager.unit.test.ts +0 -431
- package/src/components/DataTable/core/__tests__/DataTableContext.unit.test.tsx +0 -433
- package/src/components/DataTable/core/__tests__/LocalDataAdapter.unit.test.ts +0 -422
- package/src/components/DataTable/core/__tests__/PluginRegistry.unit.test.tsx +0 -207
- package/src/components/DataTable/core/__tests__/StateManager.unit.test.ts +0 -278
- package/src/components/DataTable/core/index.ts +0 -8
- package/src/components/DataTable/core/interfaces.ts +0 -338
- package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +0 -418
- package/src/components/DataTable/examples/HierarchicalExample.tsx +0 -472
- package/src/components/DataTable/examples/InitialPageSizeExample.tsx +0 -173
- package/src/components/DataTable/examples/PerformanceExample.tsx +0 -502
- package/src/components/DataTable/examples/__tests__/PerformanceExample.unit.test.tsx +0 -281
- package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.unit.test.ts +0 -407
- package/src/components/DataTable/hooks/__tests__/useColumnReordering.unit.test.ts +0 -679
- package/src/components/DataTable/hooks/useColumnOrderPersistence.ts +0 -95
- package/src/components/DataTable/hooks/useColumnReordering.ts +0 -110
- package/src/components/DataTable/hooks/useDataTableState.ts +0 -325
- package/src/components/DataTable/hooks/useHierarchicalState.ts +0 -174
- package/src/components/DataTable/index.ts +0 -68
- package/src/components/DataTable/styles.ts +0 -171
- package/src/components/DataTable/types.ts +0 -473
- package/src/components/DataTable/utils/__tests__/debugTools.unit.test.ts +0 -267
- package/src/components/DataTable/utils/__tests__/errorHandling.unit.test.ts +0 -467
- package/src/components/DataTable/utils/__tests__/exportUtils.unit.test.ts +0 -380
- package/src/components/DataTable/utils/__tests__/flexibleImport.unit.test.ts +0 -233
- package/src/components/DataTable/utils/__tests__/performanceUtils.unit.test.ts +0 -414
- package/src/components/DataTable/utils/debugTools.ts +0 -583
- package/src/components/DataTable/utils/errorHandling.ts +0 -494
- package/src/components/DataTable/utils/exportUtils.ts +0 -126
- package/src/components/DataTable/utils/flexibleImport.ts +0 -510
- package/src/components/DataTable/utils/hierarchicalSorting.ts +0 -151
- package/src/components/DataTable/utils/hierarchicalUtils.ts +0 -218
- package/src/components/DataTable/utils/index.ts +0 -1
- package/src/components/DataTable/utils/performanceUtils.ts +0 -351
- package/src/components/Dialog/Dialog.tsx +0 -782
- package/src/components/Dialog/README.md +0 -804
- package/src/components/Dialog/__tests__/Dialog.accessibility.test.tsx +0 -521
- package/src/components/Dialog/__tests__/Dialog.auto-size.example.tsx +0 -157
- package/src/components/Dialog/__tests__/Dialog.enhanced.test.tsx +0 -538
- package/src/components/Dialog/__tests__/Dialog.unit.test.tsx +0 -1373
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +0 -55
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +0 -68
- package/src/components/Dialog/examples/HtmlDialogExample.tsx +0 -202
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +0 -61
- package/src/components/Dialog/examples/SmartDialogExample.tsx +0 -322
- package/src/components/Dialog/examples/__tests__/SmartDialogExample.unit.test.tsx +0 -151
- package/src/components/Dialog/index.ts +0 -12
- package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +0 -611
- package/src/components/Dialog/utils/safeHtml.ts +0 -185
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -312
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.accessibility.test.tsx +0 -517
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.integration.test.tsx +0 -572
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.unit.test.tsx +0 -579
- package/src/components/ErrorBoundary/index.ts +0 -8
- package/src/components/EventSelector/EventSelector.tsx +0 -360
- package/src/components/EventSelector/__tests__/EventSelector.test.tsx +0 -528
- package/src/components/EventSelector/index.ts +0 -3
- package/src/components/EventSelector/types.ts +0 -79
- package/src/components/FileUpload/FileUpload.example.tsx +0 -218
- package/src/components/FileUpload/FileUpload.tsx +0 -237
- package/src/components/FileUpload/__tests__/FileUpload.integration.test.tsx +0 -992
- package/src/components/FileUpload/__tests__/FileUpload.real.test.tsx +0 -927
- package/src/components/FileUpload/__tests__/FileUpload.test.tsx +0 -855
- package/src/components/FileUpload/__tests__/FileUpload.unit.test.tsx +0 -1311
- package/src/components/FileUpload/__tests__/FileUpload.unmocked.test.tsx +0 -937
- package/src/components/FileUpload/index.ts +0 -6
- package/src/components/Footer/Footer.tsx +0 -197
- package/src/components/Footer/__tests__/Footer.accessibility.test.tsx +0 -359
- package/src/components/Footer/__tests__/Footer.integration.test.tsx +0 -353
- package/src/components/Footer/__tests__/Footer.performance.test.tsx +0 -309
- package/src/components/Footer/__tests__/Footer.unit.test.tsx +0 -309
- package/src/components/Footer/__tests__/Footer.visual.test.tsx +0 -335
- package/src/components/Footer/index.ts +0 -17
- package/src/components/Form/Form.tsx +0 -166
- package/src/components/Form/FormErrorSummary.tsx +0 -113
- package/src/components/Form/FormField.tsx +0 -249
- package/src/components/Form/FormFieldset.tsx +0 -127
- package/src/components/Form/FormLiveRegion.tsx +0 -198
- package/src/components/Form/__tests__/Form.accessibility.test.tsx +0 -820
- package/src/components/Form/__tests__/Form.unit.test.tsx +0 -305
- package/src/components/Form/__tests__/FormErrorSummary.unit.test.tsx +0 -285
- package/src/components/Form/__tests__/FormFieldset.unit.test.tsx +0 -241
- package/src/components/Form/index.ts +0 -26
- package/src/components/Header/Header.tsx +0 -301
- package/src/components/Header/__tests__/Header.accessibility.test.tsx +0 -382
- package/src/components/Header/__tests__/Header.comprehensive.test.tsx +0 -509
- package/src/components/Header/__tests__/Header.unit.test.tsx +0 -335
- package/src/components/Header/index.ts +0 -4
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +0 -196
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +0 -164
- package/src/components/InactivityWarningModal/__tests__/InactivityWarningModal.unit.test.tsx +0 -224
- package/src/components/InactivityWarningModal/index.ts +0 -9
- package/src/components/Input/Input.tsx +0 -201
- package/src/components/Input/__mocks__/Input.tsx +0 -2
- package/src/components/Input/__tests__/Input.accessibility.test.tsx +0 -632
- package/src/components/Input/__tests__/Input.unit.test.tsx +0 -1121
- package/src/components/Input/index.ts +0 -9
- package/src/components/Label/Label.tsx +0 -186
- package/src/components/Label/__tests__/Label.accessibility.test.tsx +0 -239
- package/src/components/Label/__tests__/Label.unit.test.tsx +0 -331
- package/src/components/Label/index.ts +0 -2
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +0 -98
- package/src/components/LoadingSpinner/__tests__/LoadingSpinner.accessibility.test.tsx +0 -116
- package/src/components/LoadingSpinner/__tests__/LoadingSpinner.unit.test.tsx +0 -144
- package/src/components/LoadingSpinner/index.ts +0 -3
- package/src/components/LoginForm/LoginForm.tsx +0 -273
- package/src/components/LoginForm/__tests__/LoginForm.accessibility.test.tsx +0 -201
- package/src/components/LoginForm/__tests__/LoginForm.unit.test.tsx +0 -119
- package/src/components/LoginForm/index.ts +0 -3
- package/src/components/NavigationMenu/NavigationMenu.tsx +0 -698
- package/src/components/NavigationMenu/__tests__/NavigationMenu.accessibility.test.tsx +0 -378
- package/src/components/NavigationMenu/__tests__/NavigationMenu.enhanced.test.tsx +0 -768
- package/src/components/NavigationMenu/__tests__/NavigationMenu.integration.test.tsx +0 -576
- package/src/components/NavigationMenu/__tests__/NavigationMenu.performance.test.tsx +0 -585
- package/src/components/NavigationMenu/__tests__/NavigationMenu.real.component.test.tsx +0 -783
- package/src/components/NavigationMenu/__tests__/NavigationMenu.security.enhanced.test.tsx +0 -810
- package/src/components/NavigationMenu/__tests__/NavigationMenu.security.test.tsx +0 -494
- package/src/components/NavigationMenu/__tests__/NavigationMenu.unit.test.tsx +0 -331
- package/src/components/NavigationMenu/__tests__/NavigationMenu.userWorkflows.test.tsx +0 -347
- package/src/components/NavigationMenu/__tests__/NavigationMenu.workflows.test.tsx +0 -584
- package/src/components/NavigationMenu/index.ts +0 -10
- package/src/components/NavigationMenu/types.ts +0 -85
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +0 -304
- package/src/components/OrganisationSelector/__tests__/OrganisationSelector.unit.test.tsx +0 -664
- package/src/components/OrganisationSelector/index.ts +0 -9
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +0 -699
- package/src/components/PaceAppLayout/README.md +0 -278
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.accessibility.test.tsx +0 -288
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.integration.test.tsx +0 -893
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +0 -629
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.security.test.tsx +0 -782
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.unit.test.tsx +0 -904
- package/src/components/PaceAppLayout/index.ts +0 -1
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +0 -221
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.accessibility.test.tsx +0 -463
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.integration.test.tsx +0 -586
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.unit.test.tsx +0 -533
- package/src/components/PaceLoginPage/index.ts +0 -1
- package/src/components/PasswordReset/PasswordChangeForm.tsx +0 -186
- package/src/components/PasswordReset/PasswordResetForm.tsx +0 -201
- package/src/components/PasswordReset/__tests__/PasswordChangeForm.accessibility.test.tsx +0 -408
- package/src/components/PasswordReset/__tests__/PasswordChangeForm.unit.test.tsx +0 -561
- package/src/components/PasswordReset/__tests__/PasswordReset.integration.test.tsx +0 -304
- package/src/components/PasswordReset/__tests__/PasswordResetForm.accessibility.test.tsx +0 -20
- package/src/components/PasswordReset/__tests__/PasswordResetForm.unit.test.tsx +0 -523
- package/src/components/PasswordReset/__tests__/__mocks__/UnifiedAuthProvider.ts +0 -29
- package/src/components/PasswordReset/index.ts +0 -4
- package/src/components/Print/__tests__/Print.comprehensive.test.tsx +0 -331
- package/src/components/PrintButton/PrintButton.tsx +0 -321
- package/src/components/PrintButton/PrintButtonGroup.tsx +0 -84
- package/src/components/PrintButton/PrintToolbar.tsx +0 -94
- package/src/components/PrintButton/__tests__/PrintButton.unit.test.tsx +0 -429
- package/src/components/PrintButton/__tests__/PrintButtonGroup.unit.test.tsx +0 -277
- package/src/components/PrintButton/__tests__/PrintToolbar.unit.test.tsx +0 -264
- package/src/components/PrintButton/examples/PrintButtonShowcase.tsx +0 -438
- package/src/components/PrintButton/index.ts +0 -33
- package/src/components/PrintButton/types.ts +0 -173
- package/src/components/PrintCard/PrintCard.tsx +0 -154
- package/src/components/PrintCard/PrintCardContent.tsx +0 -57
- package/src/components/PrintCard/PrintCardFooter.tsx +0 -60
- package/src/components/PrintCard/PrintCardGrid.tsx +0 -91
- package/src/components/PrintCard/PrintCardHeader.tsx +0 -78
- package/src/components/PrintCard/PrintCardImage.tsx +0 -81
- package/src/components/PrintCard/__tests__/PrintCard.unit.test.tsx +0 -233
- package/src/components/PrintCard/__tests__/PrintCardContent.test.tsx +0 -284
- package/src/components/PrintCard/__tests__/PrintCardGrid.unit.test.tsx +0 -214
- package/src/components/PrintCard/__tests__/PrintCardImage.unit.test.tsx +0 -264
- package/src/components/PrintCard/examples/PrintCardShowcase.tsx +0 -239
- package/src/components/PrintCard/index.ts +0 -34
- package/src/components/PrintCard/types.ts +0 -171
- package/src/components/PrintDataTable/PrintDataTable.tsx +0 -215
- package/src/components/PrintDataTable/PrintTableGroup.tsx +0 -90
- package/src/components/PrintDataTable/PrintTableRow.tsx +0 -76
- package/src/components/PrintDataTable/__tests__/PrintDataTable.unit.test.tsx +0 -361
- package/src/components/PrintDataTable/__tests__/PrintTableGroup.unit.test.tsx +0 -314
- package/src/components/PrintDataTable/__tests__/PrintTableRow.unit.test.tsx +0 -362
- package/src/components/PrintDataTable/index.ts +0 -25
- package/src/components/PrintDataTable/types.ts +0 -67
- package/src/components/PrintFooter/PrintFooter.tsx +0 -183
- package/src/components/PrintFooter/PrintFooterContent.tsx +0 -71
- package/src/components/PrintFooter/PrintFooterInfo.tsx +0 -86
- package/src/components/PrintFooter/PrintPageNumber.tsx +0 -90
- package/src/components/PrintFooter/__tests__/PrintFooter.unit.test.tsx +0 -500
- package/src/components/PrintFooter/__tests__/PrintFooterContent.unit.test.tsx +0 -321
- package/src/components/PrintFooter/__tests__/PrintFooterInfo.unit.test.tsx +0 -335
- package/src/components/PrintFooter/__tests__/PrintPageNumber.unit.test.tsx +0 -340
- package/src/components/PrintFooter/examples/PrintFooterShowcase.tsx +0 -390
- package/src/components/PrintFooter/index.ts +0 -30
- package/src/components/PrintFooter/types.ts +0 -149
- package/src/components/PrintGrid/PrintGrid.tsx +0 -180
- package/src/components/PrintGrid/PrintGridBreakpoint.tsx +0 -109
- package/src/components/PrintGrid/PrintGridContainer.tsx +0 -128
- package/src/components/PrintGrid/PrintGridItem.tsx +0 -220
- package/src/components/PrintGrid/__tests__/PrintGrid.unit.test.tsx +0 -340
- package/src/components/PrintGrid/__tests__/PrintGridBreakpoint.unit.test.tsx +0 -261
- package/src/components/PrintGrid/__tests__/PrintGridContainer.unit.test.tsx +0 -338
- package/src/components/PrintGrid/__tests__/PrintGridItem.unit.test.tsx +0 -338
- package/src/components/PrintGrid/examples/PrintGridShowcase.tsx +0 -359
- package/src/components/PrintGrid/index.ts +0 -31
- package/src/components/PrintGrid/types.ts +0 -159
- package/src/components/PrintHeader/PrintCoverHeader.tsx +0 -230
- package/src/components/PrintHeader/PrintHeader.tsx +0 -150
- package/src/components/PrintHeader/__tests__/PrintCoverHeader.unit.test.tsx +0 -309
- package/src/components/PrintHeader/__tests__/PrintHeader.unit.test.tsx +0 -202
- package/src/components/PrintHeader/index.ts +0 -17
- package/src/components/PrintHeader/types.ts +0 -42
- package/src/components/PrintLayout/PrintLayout.tsx +0 -122
- package/src/components/PrintLayout/PrintLayoutContext.tsx +0 -66
- package/src/components/PrintLayout/PrintPageBreak.tsx +0 -52
- package/src/components/PrintLayout/__tests__/PrintLayout.unit.test.tsx +0 -238
- package/src/components/PrintLayout/examples/PrintShowcase.tsx +0 -230
- package/src/components/PrintLayout/index.ts +0 -19
- package/src/components/PrintLayout/types.ts +0 -37
- package/src/components/PrintPageBreak/PrintPageBreak.tsx +0 -120
- package/src/components/PrintPageBreak/PrintPageBreakGroup.tsx +0 -90
- package/src/components/PrintPageBreak/PrintPageBreakIndicator.tsx +0 -112
- package/src/components/PrintPageBreak/__tests__/PrintPageBreak.unit.test.tsx +0 -263
- package/src/components/PrintPageBreak/__tests__/PrintPageBreakGroup.unit.test.tsx +0 -239
- package/src/components/PrintPageBreak/__tests__/PrintPageBreakIndicator.unit.test.tsx +0 -235
- package/src/components/PrintPageBreak/examples/PrintPageBreakShowcase.tsx +0 -279
- package/src/components/PrintPageBreak/index.ts +0 -23
- package/src/components/PrintPageBreak/types.ts +0 -94
- package/src/components/PrintSection/PrintColumn.tsx +0 -104
- package/src/components/PrintSection/PrintDivider.tsx +0 -101
- package/src/components/PrintSection/PrintSection.tsx +0 -129
- package/src/components/PrintSection/PrintSectionContent.tsx +0 -75
- package/src/components/PrintSection/PrintSectionHeader.tsx +0 -97
- package/src/components/PrintSection/__tests__/PrintColumn.unit.test.tsx +0 -385
- package/src/components/PrintSection/__tests__/PrintDivider.unit.test.tsx +0 -373
- package/src/components/PrintSection/__tests__/PrintSection.unit.test.tsx +0 -390
- package/src/components/PrintSection/__tests__/PrintSectionContent.unit.test.tsx +0 -321
- package/src/components/PrintSection/__tests__/PrintSectionHeader.unit.test.tsx +0 -334
- package/src/components/PrintSection/examples/PrintSectionShowcase.tsx +0 -258
- package/src/components/PrintSection/index.ts +0 -33
- package/src/components/PrintSection/types.ts +0 -155
- package/src/components/PrintText/PrintText.tsx +0 -116
- package/src/components/PrintText/__tests__/PrintText.unit.test.tsx +0 -351
- package/src/components/PrintText/index.ts +0 -16
- package/src/components/PrintText/types.ts +0 -24
- package/src/components/Progress/Progress.tsx +0 -116
- package/src/components/Progress/__tests__/Progress.accessibility.test.tsx +0 -240
- package/src/components/Progress/__tests__/Progress.unit.test.tsx +0 -242
- package/src/components/Progress/index.ts +0 -3
- package/src/components/PublicLayout/EventLogo.tsx +0 -287
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +0 -279
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +0 -208
- package/src/components/PublicLayout/PublicPageContextChecker.tsx +0 -130
- package/src/components/PublicLayout/PublicPageDebugger.tsx +0 -104
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +0 -162
- package/src/components/PublicLayout/PublicPageFooter.tsx +0 -124
- package/src/components/PublicLayout/PublicPageHeader.tsx +0 -178
- package/src/components/PublicLayout/PublicPageLayout.tsx +0 -232
- package/src/components/PublicLayout/PublicPageProvider.tsx +0 -137
- package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +0 -761
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.simplified.test.tsx +0 -228
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +0 -228
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +0 -459
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +0 -362
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +0 -522
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +0 -599
- package/src/components/PublicLayout/__tests__/PublicPageProvider.test.tsx +0 -513
- package/src/components/PublicLayout/index.ts +0 -51
- package/src/components/RBAC/PagePermissionGuard.tsx +0 -287
- package/src/components/RBAC/RBACGuard.tsx +0 -143
- package/src/components/RBAC/RBACProvider.tsx +0 -186
- package/src/components/RBAC/RoleBasedContent.tsx +0 -129
- package/src/components/RBAC/__tests__/PagePermissionGuard.unit.test.tsx +0 -683
- package/src/components/RBAC/__tests__/RBAC.integration.test.tsx +0 -573
- package/src/components/RBAC/__tests__/RBACGuard.unit.test.tsx +0 -467
- package/src/components/RBAC/__tests__/RBACProvider.accessibility.test.tsx +0 -475
- package/src/components/RBAC/__tests__/RBACProvider.advanced.test.tsx +0 -569
- package/src/components/RBAC/__tests__/RBACProvider.integration.test.tsx +0 -352
- package/src/components/RBAC/__tests__/RBACProvider.unit.test.tsx +0 -128
- package/src/components/RBAC/__tests__/RoleBasedContent.unit.test.tsx +0 -657
- package/src/components/RBAC/index.ts +0 -23
- package/src/components/Select/Select.tsx +0 -660
- package/src/components/Select/__tests__/SearchableSelect.unit.test.tsx +0 -437
- package/src/components/Select/__tests__/Select.accessibility.test.tsx +0 -1202
- package/src/components/Select/__tests__/Select.actual.test.tsx +0 -774
- package/src/components/Select/__tests__/Select.comprehensive.test.tsx +0 -837
- package/src/components/Select/__tests__/Select.enhanced.test.tsx +0 -1101
- package/src/components/Select/__tests__/Select.integration.test.tsx +0 -772
- package/src/components/Select/__tests__/Select.performance.test.tsx +0 -695
- package/src/components/Select/__tests__/Select.real-world.test.tsx +0 -1046
- package/src/components/Select/__tests__/Select.search-algorithms.test.tsx +0 -968
- package/src/components/Select/__tests__/Select.unit.test.tsx +0 -647
- package/src/components/Select/__tests__/Select.utils.test.tsx +0 -890
- package/src/components/Select/index.ts +0 -1
- package/src/components/SuperAdminGuard.tsx +0 -116
- package/src/components/Table/Table.tsx +0 -222
- package/src/components/Table/__tests__/Table.accessibility.test.tsx +0 -233
- package/src/components/Table/__tests__/Table.unit.test.tsx +0 -235
- package/src/components/Table/index.ts +0 -11
- package/src/components/Toast/Toast.tsx +0 -339
- package/src/components/Toast/__tests__/Toast.accessibility.test.tsx +0 -238
- package/src/components/Toast/__tests__/Toast.integration.test.tsx +0 -699
- package/src/components/Toast/__tests__/Toast.unit.test.tsx +0 -750
- package/src/components/Toast/index.ts +0 -14
- package/src/components/Tooltip/Tooltip.tsx +0 -167
- package/src/components/Tooltip/__tests__/Tooltip.accessibility.test.tsx +0 -121
- package/src/components/Tooltip/__tests__/Tooltip.unit.test.tsx +0 -185
- package/src/components/Tooltip/index.ts +0 -7
- package/src/components/UserMenu/UserMenu.tsx +0 -243
- package/src/components/UserMenu/__tests__/UserMenu.accessibility.test.tsx +0 -139
- package/src/components/UserMenu/__tests__/UserMenu.integration.test.tsx +0 -188
- package/src/components/UserMenu/__tests__/UserMenu.unit.test.tsx +0 -458
- package/src/components/UserMenu/index.ts +0 -3
- package/src/components/__tests__/EdgeCaseTesting.enhanced.test.tsx +0 -524
- package/src/components/__tests__/ErrorTesting.enhanced.test.tsx +0 -455
- package/src/components/__tests__/SuperAdminGuard.test.tsx +0 -456
- package/src/components/__tests__/SuperAdminGuard.unit.test.tsx +0 -456
- package/src/components/examples/PermissionExample.tsx +0 -150
- package/src/components/examples/__tests__/PermissionExample.unit.test.tsx +0 -360
- package/src/components/index.ts +0 -434
- package/src/components.ts +0 -19
- package/src/constants/performance.ts +0 -14
- package/src/examples/CorrectPublicPageImplementation.tsx +0 -301
- package/src/examples/PublicEventPage.tsx +0 -274
- package/src/examples/PublicPageApp.tsx +0 -308
- package/src/examples/PublicPageUsageExample.tsx +0 -216
- package/src/hooks/__tests__/hooks.integration.test.tsx +0 -575
- package/src/hooks/__tests__/useApiFetch.unit.test.ts +0 -115
- package/src/hooks/__tests__/useComponentPerformance.unit.test.tsx +0 -133
- package/src/hooks/__tests__/useDebounce.unit.test.ts +0 -82
- package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +0 -293
- package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +0 -385
- package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +0 -286
- package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +0 -838
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -627
- package/src/hooks/__tests__/useRBAC.unit.test.ts +0 -911
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +0 -537
- package/src/hooks/__tests__/useToast.unit.test.tsx +0 -62
- package/src/hooks/__tests__/useZodForm.unit.test.tsx +0 -37
- package/src/hooks/index.ts +0 -56
- package/src/hooks/public/__tests__/usePublicEvent.test.tsx +0 -397
- package/src/hooks/public/__tests__/usePublicEventLogo.test.tsx +0 -690
- package/src/hooks/public/__tests__/usePublicRouteParams.test.tsx +0 -449
- package/src/hooks/public/index.ts +0 -34
- package/src/hooks/public/usePublicEvent.ts +0 -261
- package/src/hooks/public/usePublicEventLogo.ts +0 -285
- package/src/hooks/public/usePublicRouteParams.ts +0 -259
- package/src/hooks/useAppConfig.ts +0 -94
- package/src/hooks/useComponentPerformance.ts +0 -39
- package/src/hooks/useDataTablePerformance.ts +0 -387
- package/src/hooks/useDataTableState.ts +0 -110
- package/src/hooks/useDebounce.ts +0 -18
- package/src/hooks/useFocusManagement.ts +0 -161
- package/src/hooks/useFocusTrap.ts +0 -155
- package/src/hooks/useInactivityTracker.ts +0 -372
- package/src/hooks/useIsMobile.ts +0 -42
- package/src/hooks/useKeyboardShortcuts.ts +0 -237
- package/src/hooks/useOrganisationPermissions.ts +0 -208
- package/src/hooks/useOrganisationSecurity.ts +0 -262
- package/src/hooks/usePerformanceMonitor.ts +0 -128
- package/src/hooks/usePermissionCache.ts +0 -455
- package/src/hooks/useRBAC.ts +0 -262
- package/src/hooks/useSecureDataAccess.ts +0 -586
- package/src/hooks/useStorage.ts +0 -274
- package/src/hooks/useToast.ts +0 -242
- package/src/hooks/useZodForm.ts +0 -28
- package/src/index.ts +0 -200
- package/src/providers/AuthProvider.tsx +0 -369
- package/src/providers/EventProvider.tsx +0 -324
- package/src/providers/InactivityProvider.tsx +0 -238
- package/src/providers/OrganisationProvider.tsx +0 -588
- package/src/providers/RBACProvider.tsx +0 -634
- package/src/providers/UnifiedAuthProvider.tsx +0 -327
- package/src/providers/__tests__/EventProvider.unit.test.tsx +0 -768
- package/src/providers/__tests__/OrganisationProvider.basic.test.tsx +0 -116
- package/src/providers/__tests__/OrganisationProvider.unit.test.tsx +0 -1312
- package/src/providers/__tests__/UnifiedAuthProvider.inactivity.test.tsx +0 -601
- package/src/providers/__tests__/UnifiedAuthProvider.unit.test.tsx +0 -683
- package/src/providers/__tests__/index.unit.test.ts +0 -78
- package/src/providers/index.ts +0 -15
- package/src/rbac/README.md +0 -885
- package/src/rbac/__tests__/PagePermissionGuard.test.tsx +0 -673
- package/src/rbac/__tests__/README.md +0 -170
- package/src/rbac/__tests__/RoleBasedRouter.test.tsx +0 -709
- package/src/rbac/__tests__/TestContext.tsx +0 -72
- package/src/rbac/__tests__/__mocks__/cache.ts +0 -144
- package/src/rbac/__tests__/__mocks__/supabase.ts +0 -152
- package/src/rbac/__tests__/adapters-hooks-comprehensive.test.tsx +0 -782
- package/src/rbac/__tests__/adapters-hooks.test.tsx +0 -561
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +0 -963
- package/src/rbac/__tests__/adapters.test.tsx +0 -444
- package/src/rbac/__tests__/api.test.ts +0 -620
- package/src/rbac/__tests__/audit-observability-comprehensive.test.ts +0 -792
- package/src/rbac/__tests__/audit-observability.test.ts +0 -549
- package/src/rbac/__tests__/audit.test.ts +0 -616
- package/src/rbac/__tests__/build-contract-compliance-simple.test.ts +0 -230
- package/src/rbac/__tests__/cache-invalidation-comprehensive.test.ts +0 -889
- package/src/rbac/__tests__/cache-invalidation.test.ts +0 -457
- package/src/rbac/__tests__/cache.test.ts +0 -458
- package/src/rbac/__tests__/components-navigation-guard.enhanced.test.tsx +0 -859
- package/src/rbac/__tests__/components-navigation-guard.test.tsx +0 -895
- package/src/rbac/__tests__/components-navigation-provider.test.tsx +0 -692
- package/src/rbac/__tests__/components-page-permission-guard.test.tsx +0 -673
- package/src/rbac/__tests__/components-page-permission-provider.test.tsx +0 -614
- package/src/rbac/__tests__/components-permission-enforcer.enhanced.fixed.test.tsx +0 -836
- package/src/rbac/__tests__/components-permission-enforcer.enhanced.test.tsx +0 -837
- package/src/rbac/__tests__/components-permission-enforcer.test.tsx +0 -825
- package/src/rbac/__tests__/components-role-based-router.test.tsx +0 -709
- package/src/rbac/__tests__/components-secure-data-provider.test.tsx +0 -607
- package/src/rbac/__tests__/config.test.ts +0 -583
- package/src/rbac/__tests__/core-logic-unit.test.ts +0 -190
- package/src/rbac/__tests__/core-permission-logic-comprehensive.test.ts +0 -1467
- package/src/rbac/__tests__/core-permission-logic-fixed.test.ts +0 -151
- package/src/rbac/__tests__/core-permission-logic-simple.test.ts +0 -968
- package/src/rbac/__tests__/core-permission-logic.test.ts +0 -966
- package/src/rbac/__tests__/edge-cases-comprehensive.test.ts +0 -988
- package/src/rbac/__tests__/edge-cases.test.ts +0 -654
- package/src/rbac/__tests__/engine.test.ts +0 -361
- package/src/rbac/__tests__/engine.unit.test.ts +0 -361
- package/src/rbac/__tests__/hooks.enhanced.test.tsx +0 -979
- package/src/rbac/__tests__/hooks.fixed.test.tsx +0 -475
- package/src/rbac/__tests__/hooks.test.tsx +0 -385
- package/src/rbac/__tests__/index.test.ts +0 -269
- package/src/rbac/__tests__/integration.enhanced.test.tsx +0 -824
- package/src/rbac/__tests__/page-permission-guard-super-admin.test.tsx +0 -261
- package/src/rbac/__tests__/performance.enhanced.test.tsx +0 -724
- package/src/rbac/__tests__/permissions.test.ts +0 -383
- package/src/rbac/__tests__/requires-event.test.ts +0 -330
- package/src/rbac/__tests__/scope-isolation-comprehensive.test.ts +0 -1349
- package/src/rbac/__tests__/scope-isolation.test.ts +0 -755
- package/src/rbac/__tests__/secure-client-rls-comprehensive.test.ts +0 -592
- package/src/rbac/__tests__/secure-client-rls.test.ts +0 -377
- package/src/rbac/__tests__/security.test.ts +0 -296
- package/src/rbac/__tests__/setup.ts +0 -228
- package/src/rbac/__tests__/test-utils-enhanced.tsx +0 -400
- package/src/rbac/__tests__/types.test.ts +0 -685
- package/src/rbac/adapters.tsx +0 -726
- package/src/rbac/api.ts +0 -339
- package/src/rbac/audit-enhanced.ts +0 -339
- package/src/rbac/audit.ts +0 -338
- package/src/rbac/cache.ts +0 -215
- package/src/rbac/components/EnhancedNavigationMenu.tsx +0 -294
- package/src/rbac/components/NavigationGuard.tsx +0 -294
- package/src/rbac/components/NavigationProvider.tsx +0 -314
- package/src/rbac/components/PagePermissionGuard.tsx +0 -430
- package/src/rbac/components/PagePermissionProvider.tsx +0 -274
- package/src/rbac/components/PermissionEnforcer.tsx +0 -307
- package/src/rbac/components/RoleBasedRouter.tsx +0 -425
- package/src/rbac/components/SecureDataProvider.tsx +0 -319
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +0 -631
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +0 -667
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +0 -647
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +0 -496
- package/src/rbac/components/index.ts +0 -64
- package/src/rbac/config.ts +0 -133
- package/src/rbac/docs/event-based-apps.md +0 -285
- package/src/rbac/engine.ts +0 -1026
- package/src/rbac/eslint-rules.js +0 -285
- package/src/rbac/examples/CompleteRBACExample.tsx +0 -323
- package/src/rbac/examples/EventBasedApp.tsx +0 -238
- package/src/rbac/hooks.ts +0 -570
- package/src/rbac/index.ts +0 -114
- package/src/rbac/permissions.ts +0 -293
- package/src/rbac/secureClient.ts +0 -244
- package/src/rbac/security.ts +0 -346
- package/src/rbac/testing/__tests__/index.test.tsx +0 -342
- package/src/rbac/testing/index.tsx +0 -340
- package/src/rbac/types.ts +0 -343
- package/src/rbac/utils/__tests__/eventContext.test.ts +0 -428
- package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
- package/src/rbac/utils/eventContext.ts +0 -83
- package/src/styles/__tests__/styles.unit.test.ts +0 -164
- package/src/styles/core.css +0 -422
- package/src/styles/index.ts +0 -51
- package/src/test-dom-cleanup.test.tsx +0 -38
- package/src/theming/__tests__/README.md +0 -335
- package/src/theming/__tests__/runtime.accessibility.test.ts +0 -474
- package/src/theming/__tests__/runtime.error.test.ts +0 -616
- package/src/theming/__tests__/runtime.integration.test.ts +0 -376
- package/src/theming/__tests__/runtime.performance.test.ts +0 -411
- package/src/theming/__tests__/runtime.unit.test.ts +0 -470
- package/src/theming/runtime.ts +0 -187
- package/src/types/__tests__/database.unit.test.ts +0 -489
- package/src/types/__tests__/guards.unit.test.ts +0 -146
- package/src/types/__tests__/index.unit.test.ts +0 -77
- package/src/types/__tests__/organisation.unit.test.ts +0 -713
- package/src/types/__tests__/rbac.unit.test.ts +0 -621
- package/src/types/__tests__/security.unit.test.ts +0 -347
- package/src/types/__tests__/supabase.unit.test.ts +0 -658
- package/src/types/__tests__/theme.unit.test.ts +0 -218
- package/src/types/__tests__/unified.unit.test.ts +0 -537
- package/src/types/__tests__/validation.unit.test.ts +0 -616
- package/src/types/database.ts +0 -472
- package/src/types/guards.ts +0 -30
- package/src/types/index.ts +0 -25
- package/src/types/organisation.ts +0 -184
- package/src/types/security.ts +0 -70
- package/src/types/supabase.ts +0 -166
- package/src/types/theme.ts +0 -6
- package/src/types/unified.ts +0 -262
- package/src/types/validation.ts +0 -164
- package/src/types/vitest-globals.d.ts +0 -43
- package/src/utils/__mocks__/supabaseMock.ts +0 -75
- package/src/utils/__mocks__/supabaseMock.tsx +0 -198
- package/src/utils/__tests__/appConfig.unit.test.ts +0 -55
- package/src/utils/__tests__/appNameResolver.unit.test.ts +0 -137
- package/src/utils/__tests__/audit.unit.test.ts +0 -69
- package/src/utils/__tests__/auth-utils.unit.test.ts +0 -70
- package/src/utils/__tests__/bundleAnalysis.unit.test.ts +0 -317
- package/src/utils/__tests__/cn.unit.test.ts +0 -34
- package/src/utils/__tests__/deviceFingerprint.unit.test.ts +0 -480
- package/src/utils/__tests__/dynamicUtils.unit.test.ts +0 -322
- package/src/utils/__tests__/formatDate.unit.test.ts +0 -109
- package/src/utils/__tests__/formatting.unit.test.ts +0 -66
- package/src/utils/__tests__/index.unit.test.ts +0 -251
- package/src/utils/__tests__/lazyLoad.unit.test.tsx +0 -304
- package/src/utils/__tests__/organisationContext.unit.test.ts +0 -192
- package/src/utils/__tests__/performanceBudgets.unit.test.ts +0 -259
- package/src/utils/__tests__/permissionTypes.unit.test.ts +0 -250
- package/src/utils/__tests__/permissionUtils.unit.test.ts +0 -362
- package/src/utils/__tests__/sanitization.unit.test.ts +0 -346
- package/src/utils/__tests__/schemaUtils.unit.test.ts +0 -441
- package/src/utils/__tests__/secureDataAccess.unit.test.ts +0 -334
- package/src/utils/__tests__/secureErrors.unit.test.ts +0 -377
- package/src/utils/__tests__/secureStorage.unit.test.ts +0 -293
- package/src/utils/__tests__/security.unit.test.ts +0 -127
- package/src/utils/__tests__/securityMonitor.unit.test.ts +0 -280
- package/src/utils/__tests__/sessionTracking.unit.test.ts +0 -370
- package/src/utils/__tests__/validation.unit.test.ts +0 -84
- package/src/utils/__tests__/validationUtils.unit.test.ts +0 -571
- package/src/utils/appConfig.ts +0 -47
- package/src/utils/appIdResolver.ts +0 -130
- package/src/utils/appNameResolver.ts +0 -190
- package/src/utils/audit.ts +0 -127
- package/src/utils/auth-utils.ts +0 -96
- package/src/utils/bundleAnalysis.ts +0 -129
- package/src/utils/cn.ts +0 -7
- package/src/utils/debugLogger.ts +0 -46
- package/src/utils/deviceFingerprint.ts +0 -215
- package/src/utils/dynamicUtils.ts +0 -105
- package/src/utils/formatting.ts +0 -77
- package/src/utils/index.ts +0 -145
- package/src/utils/lazyLoad.tsx +0 -44
- package/src/utils/organisationContext.ts +0 -135
- package/src/utils/performanceBenchmark.ts +0 -64
- package/src/utils/performanceBudgets.ts +0 -111
- package/src/utils/permissionTypes.ts +0 -37
- package/src/utils/permissionUtils.ts +0 -31
- package/src/utils/print/PrintDataProcessor.ts +0 -390
- package/src/utils/print/__tests__/PrintDataProcessor.unit.test.ts +0 -219
- package/src/utils/print/__tests__/usePrintOptimization.unit.test.tsx +0 -353
- package/src/utils/print/examples/PrintUtilitiesShowcase.tsx +0 -397
- package/src/utils/print/index.ts +0 -29
- package/src/utils/print/types.ts +0 -196
- package/src/utils/print/usePrintOptimization.ts +0 -272
- package/src/utils/sanitization.ts +0 -264
- package/src/utils/schemaUtils.ts +0 -37
- package/src/utils/secureDataAccess.ts +0 -361
- package/src/utils/secureErrors.ts +0 -79
- package/src/utils/secureStorage.ts +0 -244
- package/src/utils/security.ts +0 -156
- package/src/utils/securityMonitor.ts +0 -45
- package/src/utils/sessionTracking.ts +0 -170
- package/src/utils/storage/README.md +0 -348
- package/src/utils/storage/__tests__/config.unit.test.ts +0 -206
- package/src/utils/storage/__tests__/helpers.unit.test.ts +0 -648
- package/src/utils/storage/__tests__/index.unit.test.ts +0 -167
- package/src/utils/storage/__tests__/types.unit.test.ts +0 -441
- package/src/utils/storage/config.ts +0 -100
- package/src/utils/storage/helpers.ts +0 -359
- package/src/utils/storage/index.ts +0 -36
- package/src/utils/storage/types.ts +0 -90
- package/src/utils/validation.ts +0 -111
- package/src/utils/validationUtils.ts +0 -120
- package/src/validation/__tests__/common.unit.test.ts +0 -101
- package/src/validation/__tests__/csrf.unit.test.ts +0 -302
- package/src/validation/__tests__/passwordSchema.unit.test.ts +0 -98
- package/src/validation/__tests__/sqlInjectionProtection.unit.test.ts +0 -466
- package/src/validation/common.ts +0 -53
- package/src/validation/csrf.ts +0 -214
- package/src/validation/index.ts +0 -43
- package/src/validation/passwordSchema.ts +0 -125
- package/src/validation/sanitization.ts +0 -96
- package/src/validation/schemaUtils.ts +0 -42
- package/src/validation/sqlInjectionProtection.ts +0 -242
- package/src/validation/user.ts +0 -34
- package/dist/{DataTable-EEUDXPE5.js.map → DataTable-2LB6HI6V.js.map} +0 -0
- package/dist/{api-ETQ6YJ3C.js.map → api-AIJ3IJX3.js.map} +0 -0
- package/dist/{appNameResolver-7GHF5ED2.js.map → audit-PD5L5ZSC.js.map} +0 -0
- package/dist/{audit-BUW3LMJB.js.map → chunk-DC5AMYBS.js.map} +0 -0
- package/dist/{validation-PM_iOaTI.d.ts → validation-D2-NNCCE.d.ts} +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Card/Card.tsx","../src/components/Label/Label.tsx","../src/components/Alert/Alert.tsx","../src/components/Avatar/Avatar.tsx","../src/components/Progress/Progress.tsx","../src/components/Toast/Toast.tsx","../src/components/Form/Form.tsx","../src/components/LoginForm/LoginForm.tsx","../src/components/EventSelector/EventSelector.tsx","../src/components/PasswordReset/PasswordChangeForm.tsx","../src/components/UserMenu/UserMenu.tsx","../src/components/NavigationMenu/NavigationMenu.tsx","../src/components/Header/Header.tsx","../src/components/Footer/Footer.tsx","../src/components/PaceAppLayout/PaceAppLayout.tsx","../src/components/PaceLoginPage/PaceLoginPage.tsx","../src/components/ErrorBoundary/ErrorBoundary.tsx","../src/components/OrganisationSelector/OrganisationSelector.tsx","../src/components/PasswordReset/PasswordResetForm.tsx"],"sourcesContent":["/**\n * @file Card Component Suite\n * @package @jmruthers/pace-core\n * @module Components\n * @since 0.1.0\n *\n * A flexible card component suite for displaying content with consistent styling.\n * Includes Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardActions, and HoverCard variants.\n * Uses semantic HTML elements for better accessibility and structure.\n *\n * Features:\n * - Semantic HTML structure (article, header, main, footer, etc.)\n * - Modular card structure (header, content, footer, actions, etc.)\n * - CardContent uses div element for primary content (accessible when nested)\n * - Consistent padding, border, and shadow\n * - Responsive and accessible\n * - HoverCard for popover-style cards\n * - Proper heading hierarchy and semantic elements\n *\n * @example\n * ```tsx\n * // Basic card with semantic HTML structure\n * <Card>\n * <CardHeader>\n * <CardTitle>Article Title</CardTitle>\n * <CardDescription>Brief description of the article content</CardDescription>\n * </CardHeader>\n * <CardContent>\n * <p>Main content goes here with proper semantic structure.</p>\n * <p>Additional paragraphs and content.</p>\n * </CardContent>\n * <CardFooter>\n * <CardActions>\n * <Button>Primary Action</Button>\n * <Button variant=\"outline\">Secondary Action</Button>\n * </CardActions>\n * </CardFooter>\n * </Card>\n *\n * // Semantic HTML structure:\n * // - Card: <article> element for self-contained content\n * // - CardHeader: <header> element for card heading area\n * // - CardContent: <div> element for primary card content\n * // - CardFooter: <footer> element for card footer area\n * // - CardActions: <nav> element for action buttons\n *\n * // HoverCard usage with semantic structure\n * <HoverCard>\n * <HoverCardTrigger>Hover me</HoverCardTrigger>\n * <HoverCardContent>\n * <p>Popover content with semantic elements</p>\n * </HoverCardContent>\n * </HoverCard>\n * ```\n *\n * @accessibility\n * - Uses semantic HTML structure (article, header, main, footer, nav)\n * - Focusable and keyboard accessible\n * - Proper heading hierarchy for screen readers\n * - HoverCard supports mouse and keyboard interaction\n * - Screen reader friendly with semantic landmarks\n */\n\nimport * as React from \"react\"\nimport { cn } from \"../../utils/cn\"\n\nexport interface CardProps extends React.HTMLAttributes<HTMLElement> {\n /** Visual variant of the card */\n variant?: 'default' | 'outline' | 'ghost';\n /** Size of the card */\n size?: 'default' | 'sm' | 'lg';\n}\n\n/**\n * Get card classes based on variant and size\n */\nfunction getCardClasses(variant: CardProps['variant'] = 'default', size: CardProps['size'] = 'default'): string {\n const baseClasses = \"rounded-lg border bg-card text-card-foreground shadow-sm\";\n \n const variantClasses = {\n default: \"shadow-xl shadow-main-800/20\",\n outline: \"border-2\",\n ghost: \"border-0 shadow-none\"\n };\n \n const sizeClasses = {\n default: \"\",\n sm: \"text-sm\",\n lg: \"text-lg\"\n };\n \n return `${baseClasses} ${variantClasses[variant]} ${sizeClasses[size]}`;\n}\n\nconst Card = React.forwardRef<\n HTMLElement,\n CardProps\n>(({ className, variant, size, ...props }, ref) => (\n <article\n ref={ref}\n className={cn(\n \"grid grid-rows-[auto_1fr_auto]\",\n getCardClasses(variant, size),\n className\n )}\n {...props}\n />\n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <header\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n))\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\n 'text-2xl font-semibold leading-none tracking-tight',\n className\n )}\n {...props}\n />\n))\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(className)}\n {...props}\n />\n))\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div \n ref={ref} \n className={cn(\"p-6 pt-0\", className)} \n {...props} \n />\n))\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <footer\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n))\nCardFooter.displayName = \"CardFooter\"\n\nconst CardActions = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <nav\n ref={ref}\n className={cn(\"flex gap-2\", className)}\n role=\"group\"\n aria-label=\"Card actions\"\n {...props}\n />\n))\nCardActions.displayName = \"CardActions\"\n\n// HoverCard components - improved with semantic structure\nconst HoverCard = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement> & { children: React.ReactNode }\n>(({ children, className, ...props }, ref) => {\n return (\n <section\n ref={ref}\n className={cn(\"relative inline-block\", className)}\n {...props}\n >\n {children}\n </section>\n );\n});\nHoverCard.displayName = \"HoverCard\"\n\nconst HoverCardTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ButtonHTMLAttributes<HTMLButtonElement> & { asChild?: boolean }\n>(({ className, asChild, children, ...props }, ref) => {\n if (asChild) {\n return (\n <span className={cn(\"cursor-pointer\", className)}>\n {children}\n </span>\n );\n }\n \n return (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n \"cursor-pointer bg-transparent border-0 p-0 m-0 font-inherit color-inherit text-left\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n})\nHoverCardTrigger.displayName = \"HoverCardTrigger\"\n\nconst HoverCardContent = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <aside\n ref={ref}\n className={cn(\n \"absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-md\",\n className\n )}\n role=\"tooltip\"\n {...props}\n />\n))\nHoverCardContent.displayName = \"HoverCardContent\"\n\nexport { \n Card, \n CardHeader, \n CardFooter, \n CardTitle, \n CardDescription, \n CardContent,\n CardActions,\n HoverCard,\n HoverCardTrigger,\n HoverCardContent\n}\n\n// Export types with correct semantic element types\nexport type CardHeaderProps = React.HTMLAttributes<HTMLElement>;\nexport type CardTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport type CardDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\nexport type CardContentProps = React.HTMLAttributes<HTMLElement>;\nexport type CardFooterProps = React.HTMLAttributes<HTMLElement>;\nexport type CardActionsProps = React.HTMLAttributes<HTMLElement>;\nexport type HoverCardProps = React.HTMLAttributes<HTMLElement>;\nexport type HoverCardTriggerProps = React.ButtonHTMLAttributes<HTMLButtonElement> & { asChild?: boolean };\nexport type HoverCardContentProps = React.HTMLAttributes<HTMLElement>;\n","/**\n * @file Label Component\n * @package @jmruthers/pace-core\n * @module Components/Label\n * @since 0.1.0\n *\n * An accessible label component built on top of Radix UI primitives.\n * Provides form labels with helper text, error states, and required indicators.\n *\n * Features:\n * - Proper label association with form controls\n * - Required field indicators\n * - Helper text support\n * - Error state display\n * - Customizable styling\n * - Screen reader friendly\n * - Keyboard accessible\n *\n * @example\n * ```tsx\n * // Basic label\n * <Label htmlFor=\"email\">Email Address</Label>\n * <Input id=\"email\" type=\"email\" />\n * \n * // Label with required indicator\n * <Label htmlFor=\"name\" required>\n * Full Name\n * </Label>\n * <Input id=\"name\" />\n * \n * // Label with helper text\n * <Label \n * htmlFor=\"password\" \n * required \n * helperText=\"Must be at least 8 characters\"\n * >\n * Password\n * </Label>\n * <Input id=\"password\" type=\"password\" />\n * \n * // Label with error state\n * <Label \n * htmlFor=\"email\" \n * error=\"Please enter a valid email address\"\n * >\n * Email Address\n * </Label>\n * <Input id=\"email\" type=\"email\" />\n * \n * // Custom required indicator\n * <Label \n * htmlFor=\"terms\" \n * required \n * requiredIndicator=\"(required)\"\n * >\n * Accept Terms\n * </Label>\n * <Checkbox id=\"terms\" />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper label association with htmlFor\n * - Screen reader announcements for errors\n * - Required field indicators for screen readers\n * - Error messages with role=\"alert\"\n * - High contrast support\n *\n * @dependencies\n * - @radix-ui/react-label - Core label functionality\n * - class-variance-authority - Variant styling\n * - React 18+ - Hooks and refs\n * - Tailwind CSS - Styling\n */\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../../utils/cn';\n\nconst getLabelClasses = (): string => {\n return 'font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n};\n\n/**\n * Props for the Label component\n */\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {\n /** Whether the field is required */\n required?: boolean;\n /** Custom required indicator (default: '*') */\n requiredIndicator?: React.ReactNode;\n /** Whether to hide the required indicator visually */\n hideRequiredIndicator?: boolean;\n /** Helper text to display below the label */\n helperText?: string;\n /** CSS classes for helper text styling */\n helperTextClassName?: string;\n /** Error message to display */\n error?: string;\n /** CSS classes for error message styling */\n errorClassName?: string;\n}\n\n/**\n * Label component\n * An accessible label with helper text and error state support\n * \n * @param props - Label configuration and styling\n * @param ref - Forwarded ref to the label element\n * @returns JSX.Element - The rendered label with optional helper text and errors\n * \n * @example\n * ```tsx\n * <Label htmlFor=\"email\" required helperText=\"We'll never share your email\">\n * Email Address\n * </Label>\n * ```\n */\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n LabelProps\n>(({\n className,\n required = false,\n requiredIndicator,\n hideRequiredIndicator = false,\n helperText,\n helperTextClassName,\n error,\n errorClassName,\n children,\n htmlFor,\n ...props\n}, ref) => {\n const hasError = !!error;\n const showHelperText = helperText && !hasError;\n \n return (\n <>\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n getLabelClasses(),\n hasError && 'text-destructive',\n className\n )}\n htmlFor={htmlFor}\n {...props}\n >\n {children}\n {required && (\n <label\n aria-label=\"required\"\n className={cn(\n 'text-destructive ml-1',\n hideRequiredIndicator && 'sr-only'\n )}\n >\n {requiredIndicator || '*'}\n </label>\n )}\n </LabelPrimitive.Root>\n \n {showHelperText && (\n <p className={cn('text-muted-foreground', helperTextClassName)}>\n {helperText}\n </p>\n )}\n \n {hasError && (\n <p\n role=\"alert\"\n aria-live=\"polite\"\n className={cn('text-destructive', errorClassName)}\n >\n {error}\n </p>\n )}\n </>\n );\n});\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","/**\n * @file Alert Component Suite\n * @package @jmruthers/pace-core\n * @module Components\n * @since 0.1.0\n *\n * A flexible and accessible alert component for displaying important messages.\n * Includes Alert, AlertTitle, and AlertDescription subcomponents.\n *\n * Features:\n * - Multiple visual variants (default, destructive, inline)\n * - Title and description support\n * - ARIA role=\"alert\" for accessibility\n * - Keyboard and screen reader accessible\n * - Composable with icons and actions\n * - Inline variant for lightweight text formatting\n *\n * @example\n * ```tsx\n * // Basic alert\n * <Alert>\n * <AlertTitle>Success</AlertTitle>\n * <AlertDescription>Your changes have been saved.</AlertDescription>\n * </Alert>\n *\n * // Destructive alert with icon\n * <Alert variant=\"destructive\">\n * <ErrorIcon />\n * <div>\n * <AlertTitle>Error</AlertTitle>\n * <AlertDescription>Something went wrong.</AlertDescription>\n * </div>\n * </Alert>\n *\n * // Inline alert (renders as fragment with strong/span)\n * <Alert variant=\"inline\">\n * <AlertTitle>Note:</AlertTitle>\n * <AlertDescription>This is an inline message.</AlertDescription>\n * </Alert>\n * ```\n *\n * @accessibility\n * - Uses role=\"alert\" for screen reader announcement\n * - Title and description are semantically structured\n * - Supports keyboard navigation and focus\n */\n\nimport * as React from \"react\"\n\nimport { cn } from \"../../utils/cn\"\n\n// Context to share variant with child components\nconst AlertContext = React.createContext<{ variant?: \"default\" | \"destructive\" | \"inline\" | null }>({ variant: \"default\" })\n\nconst getAlertClasses = (variant: \"default\" | \"destructive\" | \"inline\" = \"default\"): string => {\n const baseClasses = \"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground\";\n \n const variantClasses = {\n default: \"bg-background text-foreground\",\n destructive: \"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive\",\n inline: \"\", // No classes for inline variant as it renders as fragment\n };\n \n return `${baseClasses} ${variantClasses[variant]}`;\n};\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & { variant?: \"default\" | \"destructive\" | \"inline\" }\n>(({ className, variant = \"default\", ...props }, ref) => {\n const contextValue = React.useMemo(() => ({ variant }), [variant])\n \n if (variant === \"inline\") {\n return (\n <AlertContext.Provider value={contextValue}>\n <React.Fragment {...props} />\n </AlertContext.Provider>\n )\n }\n \n return (\n <AlertContext.Provider value={contextValue}>\n <div\n ref={ref}\n className={cn(getAlertClasses(variant), className)}\n role=\"alert\"\n {...props}\n />\n </AlertContext.Provider>\n )\n})\nAlert.displayName = \"Alert\"\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => {\n const { variant } = React.useContext(AlertContext)\n \n if (variant === \"inline\") {\n return <strong {...props} />\n }\n \n return (\n <h5\n ref={ref}\n className={cn(\"\", className)}\n {...props}\n />\n )\n})\nAlertTitle.displayName = \"AlertTitle\"\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { variant } = React.useContext(AlertContext)\n \n if (variant === \"inline\") {\n return <span {...props} />\n }\n \n return (\n <p\n ref={ref}\n className={cn(\"\", className)}\n {...props}\n />\n )\n})\nAlertDescription.displayName = \"AlertDescription\"\n\nexport { Alert, AlertTitle, AlertDescription }\n","/**\n * @file Avatar Component Suite\n * @package @jmruthers/pace-core\n * @module Components\n * @since 0.1.0\n *\n * A flexible and accessible avatar component for displaying user profile images or initials.\n * Includes Avatar, AvatarImage, and AvatarFallback subcomponents.\n *\n * Features:\n * - Circular avatar display\n * - Image, fallback, and initials support\n * - Customizable size and style\n * - Keyboard and screen reader accessible\n * - Graceful fallback for missing images\n *\n * @example\n * ```tsx\n * // Basic avatar with image\n * <Avatar>\n * <AvatarImage src=\"/user.jpg\" alt=\"User\" />\n * <AvatarFallback>AB</AvatarFallback>\n * </Avatar>\n *\n * // Avatar with fallback only\n * <Avatar>\n * <AvatarFallback>JD</AvatarFallback>\n * </Avatar>\n * ```\n *\n * @accessibility\n * - Uses alt text for images\n * - Fallback content is accessible to screen readers\n * - Keyboard focusable and navigable\n */\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"../../utils/cn\"\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"object-cover\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full text-app-sec-50 bg-app-sec-500\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","/**\n * @file Progress Component\n * @package @jmruthers/pace-core\n * @module Components/Progress\n * @since 0.1.0\n *\n * An accessible progress bar component built on top of Radix UI primitives.\n * Provides smooth animations and proper ARIA attributes for screen readers.\n *\n * Features:\n * - Smooth progress animations\n * - Customizable value and max range\n * - Proper ARIA attributes for accessibility\n * - Customizable styling and appearance\n * - Responsive design\n * - Keyboard accessible\n *\n * @example\n * ```tsx\n * // Basic progress bar\n * <Progress value={50} />\n * \n * // Progress with custom max value\n * <Progress value={7} max={10} />\n * \n * // Progress with custom styling\n * <Progress \n * value={75} \n * className=\"h-4 bg-app-sec-200\" \n * />\n * \n * // Animated progress (controlled)\n * const [progress, setProgress] = useState(0);\n * \n * useEffect(() => {\n * const timer = setInterval(() => {\n * setProgress(prev => prev >= 100 ? 0 : prev + 10);\n * }, 1000);\n * return () => clearInterval(timer);\n * }, []);\n * \n * <Progress value={progress} />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper ARIA attributes (aria-valuenow, aria-valuemax, aria-valuemin)\n * - Screen reader announcements for progress changes\n * - Keyboard navigation support\n * - High contrast support\n *\n * @performance\n * - CSS transitions for smooth animations\n * - Efficient re-rendering\n * - Minimal DOM structure\n *\n * @dependencies\n * - @radix-ui/react-progress - Core progress functionality\n * - React 18+ - Hooks and refs\n * - Tailwind CSS - Styling\n */\n\nimport * as React from 'react';\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cn } from '../../utils/cn';\n\n/**\n * Props for the Progress component\n */\nexport interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n /** Current progress value (0 to max) */\n value?: number;\n /** Maximum progress value (default: 100) */\n max?: number;\n}\n\n/**\n * Progress component\n * An accessible progress bar with smooth animations\n * \n * @param props - Progress configuration and styling\n * @param ref - Forwarded ref to the progress element\n * @returns JSX.Element - The rendered progress bar\n * \n * @example\n * ```tsx\n * <Progress value={75} max={100} />\n * ```\n */\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n ProgressProps\n>(({ className, value, max = 100, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n 'relative h-2 w-full overflow-hidden rounded-full bg-primary/20',\n className\n )}\n {...props}\n value={value}\n max={max}\n aria-valuenow={value}\n aria-valuemax={max}\n aria-valuemin={0}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full w-full flex-1 bg-primary transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\n\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n","/**\n * @file Toast Component System\n * @package @jmruthers/pace-core\n * @module Components/Toast\n * @since 0.1.0\n *\n * A comprehensive toast notification system built on top of Radix UI primitives.\n * Provides accessible, customizable toast notifications with smooth animations.\n *\n * Features:\n * - Multiple toast types (success, error, warning, info)\n * - Customizable positioning and styling\n * - Swipe gestures for dismissal\n * - Keyboard navigation support\n * - Auto-dismiss with configurable duration\n * - Action buttons and close functionality\n * - Responsive design\n * - Accessibility compliant\n * - Smooth animations and transitions\n * - Toast queue management\n *\n * @example\n * ```tsx\n * // Basic toast usage\n * import { useToast } from '@jmruthers/pace-core';\n * \n * function MyComponent() {\n * const { toast } = useToast();\n * \n * const handleSuccess = () => {\n * toast({\n * title: \"Success!\",\n * description: \"Your changes have been saved.\",\n * variant: \"success\"\n * });\n * };\n * \n * return <button onClick={handleSuccess}>Save Changes</button>;\n * }\n * \n * // Toast with action\n * toast({\n * title: \"Undo Changes\",\n * description: \"Your changes have been saved.\",\n * action: <ToastAction altText=\"Undo\">Undo</ToastAction>\n * });\n * \n * // Custom toast component\n * <Toast>\n * <ToastTitle>Custom Toast</ToastTitle>\n * <ToastDescription>This is a custom toast message.</ToastDescription>\n * <ToastClose />\n * </Toast>\n * \n * // Toast provider setup\n * function App() {\n * return (\n * <ToastProvider>\n * <YourApp />\n * <Toaster />\n * </ToastProvider>\n * );\n * }\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper ARIA attributes and roles\n * - Keyboard navigation support\n * - Screen reader announcements\n * - Focus management\n * - High contrast support\n * - Swipe gesture alternatives\n *\n * @performance\n * - Efficient toast queue management\n * - Optimized animations\n * - Memory leak prevention\n * - Lazy rendering\n *\n * @dependencies\n * - @radix-ui/react-toast - Core toast functionality\n * - lucide-react - Icons\n * - React 18+ - Hooks and refs\n * - Tailwind CSS - Styling\n */\n\nimport * as React from \"react\"\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { X } from \"lucide-react\"\nimport { cn } from \"../../utils/cn\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\n/**\n * ToastViewport component\n * Container for all toast notifications with customizable positioning\n * \n * @param props - Viewport configuration and styling\n * @param ref - Forwarded ref to the viewport element\n * @returns JSX.Element - The toast viewport container\n */\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n data-testid=\"toast-viewport\"\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\n/**\n * Toast component\n * The main toast notification component with animations and interactions\n * \n * @param props - Toast configuration and content\n * @param ref - Forwarded ref to the toast element\n * @returns JSX.Element - The rendered toast notification\n * \n * @example\n * ```tsx\n * <Toast>\n * <ToastTitle>Success!</ToastTitle>\n * <ToastDescription>Your changes have been saved.</ToastDescription>\n * <ToastClose />\n * </Toast>\n * ```\n */\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root>\n>(({ className, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n data-testid=\"toast-root\"\n className={cn(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n className\n )}\n {...props}\n />\n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\n/**\n * ToastAction component\n * Action button within a toast notification\n * \n * @param props - Action button configuration\n * @param ref - Forwarded ref to the action button\n * @returns JSX.Element - The action button element\n * \n * @example\n * ```tsx\n * <ToastAction altText=\"Undo changes\">Undo</ToastAction>\n * ```\n */\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n data-testid=\"toast-action\"\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\n/**\n * ToastClose component\n * Close button for dismissing toast notifications\n * \n * @param props - Close button configuration\n * @param ref - Forwarded ref to the close button\n * @returns JSX.Element - The close button with X icon\n * \n * @example\n * ```tsx\n * <ToastClose />\n * ```\n */\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n data-testid=\"toast-close\"\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-app-acc-300 group-[.destructive]:hover:text-app-acc-50 group-[.destructive]:focus:ring-app-acc-400 group-[.destructive]:focus:ring-offset-app-acc-600\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\n/**\n * ToastTitle component\n * Title text for toast notifications\n * \n * @param props - Title configuration and styling\n * @param ref - Forwarded ref to the title element\n * @returns JSX.Element - The toast title\n * \n * @example\n * ```tsx\n * <ToastTitle>Success!</ToastTitle>\n * ```\n */\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n data-testid=\"toast-title\"\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\n/**\n * ToastDescription component\n * Description text for toast notifications\n * \n * @param props - Description configuration and styling\n * @param ref - Forwarded ref to the description element\n * @returns JSX.Element - The toast description\n * \n * @example\n * ```tsx\n * <ToastDescription>Your changes have been saved successfully.</ToastDescription>\n * ```\n */\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n data-testid=\"toast-description\"\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\nexport interface ToastProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> {}\n\nexport interface ToastActionElement extends React.ReactElement<typeof ToastAction> {}\n\n// Simple useToast hook\n/**\n * useToast hook\n * Hook for managing toast notifications\n * \n * @returns Object with toast and dismiss functions\n * \n * @example\n * ```tsx\n * const { toast, dismiss } = useToast();\n * \n * // Show a toast\n * toast({\n * title: \"Success!\",\n * description: \"Your changes have been saved.\"\n * });\n * \n * // Dismiss all toasts\n * dismiss();\n * ```\n */\nexport function useToast() {\n return {\n toast: (props: any) => {\n console.log('Toast:', props);\n },\n dismiss: () => {\n console.log('Toast dismissed');\n }\n };\n}\n\n// Simple Toaster component\n/**\n * Toaster component\n * Container component that provides the toast viewport\n * Should be placed at the root of your application\n * \n * @returns JSX.Element - The toast provider with viewport\n * \n * @example\n * ```tsx\n * function App() {\n * return (\n * <ToastProvider>\n * <YourApp />\n * <Toaster />\n * </ToastProvider>\n * );\n * }\n * ```\n */\nexport function Toaster() {\n return (\n <ToastProvider data-testid=\"toast-provider\">\n <ToastViewport />\n </ToastProvider>\n );\n}\n\nexport {\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n}\n","/**\n * @file Form Component\n * @package @jmruthers/pace-core\n * @module Components/Form\n * @since 0.1.0\n *\n * A comprehensive form component with React Hook Form integration and Zod validation.\n * Provides a clean, accessible form interface with built-in validation and error handling.\n *\n * Features:\n * - React Hook Form integration for efficient form state management\n * - Zod schema validation with type safety\n * - Flexible rendering with children function or JSX\n * - Built-in error handling and validation modes\n * - Accessible form structure\n * - TypeScript support with generic field values\n * - Customizable styling and layout\n *\n * @example\n * ```tsx\n * // Basic form with schema validation\n * const userSchema = z.object({\n * name: z.string().min(2, \"Name must be at least 2 characters\"),\n * email: z.string().email(\"Invalid email address\"),\n * age: z.number().min(18, \"Must be at least 18 years old\")\n * });\n * \n * <Form\n * schema={userSchema}\n * defaultValues={{ name: \"\", email: \"\", age: 0 }}\n * onSubmit={(data) => console.log(data)}\n * onError={(errors) => console.error(errors)}\n * >\n * <FormField name=\"name\" label=\"Name\" />\n * <FormField name=\"email\" label=\"Email\" type=\"email\" />\n * <FormField name=\"age\" label=\"Age\" type=\"number\" />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * \n * // Form with render function\n * <Form\n * schema={userSchema}\n * onSubmit={handleSubmit}\n * >\n * {(methods) => (\n * <>\n * <FormField name=\"name\" label=\"Name\" />\n * <FormField name=\"email\" label=\"Email\" />\n * <Button \n * type=\"submit\" \n * disabled={methods.formState.isSubmitting}\n * >\n * {methods.formState.isSubmitting ? \"Submitting...\" : \"Submit\"}\n * </Button>\n * </>\n * )}\n * </Form>\n * ```\n *\n * @accessibility\n * - Proper form structure with labels and descriptions\n * - Error announcements for screen readers\n * - Keyboard navigation support\n * - Focus management\n * - ARIA attributes for form validation\n *\n * @dependencies\n * - react-hook-form - Form state management\n * - @hookform/resolvers/zod - Zod validation integration\n * - zod - Schema validation\n * - React 18+ - Hooks and context\n */\n\nimport React from 'react';\nimport { useForm, FormProvider, UseFormReturn, FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { z } from 'zod';\nimport { cn } from '../../utils/cn';\n\n/**\n * Props for the Form component\n */\nexport interface FormProps<TFieldValues extends FieldValues = FieldValues> {\n /**\n * Form schema for validation\n */\n schema?: z.ZodType<TFieldValues>;\n \n /**\n * Default values for the form\n */\n defaultValues?: DefaultValues<TFieldValues>;\n \n /**\n * Handler called when form is submitted successfully\n */\n onSubmit: SubmitHandler<TFieldValues>;\n \n /**\n * Handler called when form submission has errors\n */\n onError?: SubmitErrorHandler<TFieldValues>;\n \n /**\n * Form mode for react-hook-form\n * @default \"onSubmit\"\n */\n mode?: \"onSubmit\" | \"onChange\" | \"onBlur\" | \"onTouched\" | \"all\";\n \n /**\n * Children components or render function\n */\n children: React.ReactNode | ((methods: UseFormReturn<TFieldValues>) => React.ReactNode);\n \n /**\n * Class name for the form\n */\n className?: string;\n}\n\n/**\n * Form component with validation and React Hook Form integration\n * \n * @template TFieldValues - The type of form field values\n * @param props - Form configuration and handlers\n * @returns JSX.Element - The rendered form with FormProvider context\n * \n * @example\n * ```tsx\n * <Form\n * schema={userSchema}\n * defaultValues={{ name: \"\", email: \"\" }}\n * onSubmit={handleSubmit}\n * mode=\"onBlur\"\n * >\n * <FormField name=\"name\" label=\"Name\" />\n * <FormField name=\"email\" label=\"Email\" />\n * <Button type=\"submit\">Submit</Button>\n * </Form>\n * ```\n */\nexport function Form<TFieldValues extends FieldValues = FieldValues>({\n schema,\n defaultValues,\n onSubmit,\n onError,\n mode = \"onSubmit\",\n children,\n className,\n}: FormProps<TFieldValues>) {\n const methods = useForm<TFieldValues>({\n resolver: schema ? zodResolver(schema) : undefined,\n defaultValues,\n mode,\n });\n\n const handleSubmit = methods.handleSubmit(onSubmit, onError);\n\n return (\n <FormProvider {...methods}>\n <form onSubmit={handleSubmit} className={cn(\"space-y-4\", className)}>\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormProvider>\n );\n}\n","/**\n * @file LoginForm Component\n * @package @jmruthers/pace-core\n * @module Components/LoginForm\n * @since 0.1.0\n *\n * A comprehensive login form component with built-in validation, error handling,\n * and loading states for user authentication.\n *\n * Features:\n * - Email and password validation\n * - Loading states with disabled form\n * - Error handling and display\n * - Customizable branding and messaging\n * - Sign-up link integration\n * - Performance optimized with React.memo\n * - Accessibility compliant\n * - Responsive design\n * - Form validation\n * - Success and error callbacks\n *\n * @example\n * ```tsx\n * // Basic login form\n * <LoginForm\n * onSignIn={async (data) => {\n * await signIn(data.email, data.password);\n * }}\n * onSuccess={() => navigate('/dashboard')}\n * onError={(error) => console.error('Login failed:', error)}\n * />\n * \n * // Login form with custom branding\n * <LoginForm\n * appName=\"My Application\"\n * title=\"Welcome Back\"\n * subtitle=\"Please sign in to access your account\"\n * onSignIn={handleSignIn}\n * onSuccess={handleSuccess}\n * onError={handleError}\n * />\n * \n * // Login form with sign-up integration\n * <LoginForm\n * appName=\"My App\"\n * showSignUp={true}\n * onSignUp={() => navigate('/signup')}\n * onSignIn={handleSignIn}\n * isLoading={isAuthenticating}\n * />\n * \n * // Login form with custom error handling\n * <LoginForm\n * onSignIn={async (data) => {\n * try {\n * const result = await authService.signIn(data);\n * if (result.success) {\n * onSuccess();\n * } else {\n * throw new Error(result.error);\n * }\n * } catch (error) {\n * onError(error);\n * }\n * }}\n * onSuccess={() => {\n * toast.success('Successfully signed in!');\n * navigate('/dashboard');\n * }}\n * onError={(error) => {\n * toast.error(`Sign in failed: ${error.message}`);\n * }}\n * />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper form labels and associations\n * - Screen reader friendly error messages\n * - Keyboard navigation support\n * - Focus management\n * - High contrast support\n * - Clear error identification\n *\n * @performance\n * - React.memo for efficient re-rendering\n * - useCallback for stable event handlers\n * - useMemo for computed values\n * - Minimal re-renders\n *\n * @dependencies\n * - React 18+ - Hooks and memo\n * - Button component\n * - Input component\n * - Label component\n * - Card components\n * - Alert component\n * - Tailwind CSS - Styling\n */\n\nimport React, { useState, useCallback, useMemo } from 'react';\nimport { Button } from '../Button/Button';\nimport { Input } from '../Input/Input';\nimport { Label } from '../Label/Label';\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../Card/index';\nimport { Alert, AlertDescription } from '../Alert/Alert';\nimport { cn } from '../../utils/cn';\n\nexport interface LoginFormProps {\n /** Callback invoked when the form is submitted */\n onSignIn: (data: { email: string; password: string }) => Promise<void>;\n /** Callback invoked on successful sign-in */\n onSuccess?: () => void;\n /** Callback invoked if sign-in fails */\n onError?: (error: Error) => void;\n /** Show loading spinner and disable form while true */\n isLoading?: boolean;\n /** Application name for display in the form */\n appName?: string;\n /** Custom title for the form */\n title?: string;\n /** Custom subtitle for the form */\n subtitle?: string;\n /** Show a sign-up link or button */\n showSignUp?: boolean;\n /** Optional callback for sign-up button */\n onSignUp?: () => void;\n /** Additional CSS classes */\n className?: string;\n}\n\n/**\n * LoginForm component that provides a ready-to-use authentication form for user sign-in.\n * It supports validation, loading state, error handling, and can be customized via props.\n * Now includes performance optimizations and onSignUp support.\n * \n * @param props - Login form configuration and handlers\n * @returns JSX.Element - The rendered login form\n * \n * @example\n * ```tsx\n * <LoginForm\n * onSignIn={handleSignIn}\n * onSuccess={() => navigate('/dashboard')}\n * onError={(error) => toast.error(error.message)}\n * isLoading={isAuthenticating}\n * />\n * ```\n */\nexport const LoginForm = React.memo<LoginFormProps>(({\n onSignIn,\n onSuccess,\n onError,\n isLoading = false,\n appName,\n title,\n subtitle,\n showSignUp = false,\n onSignUp,\n className\n}) => {\n const [formData, setFormData] = useState({ email: '', password: '' });\n const [error, setError] = useState<string | null>(null);\n\n // Memoized validation state\n const isFormValid = useMemo(() => {\n return formData.email.length > 0 && formData.password.length > 0;\n }, [formData.email, formData.password]);\n\n // Memoized handlers\n const handleEmailChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormData(prev => ({ ...prev, email: e.target.value }));\n }, []);\n\n const handlePasswordChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n setFormData(prev => ({ ...prev, password: e.target.value }));\n }, []);\n\n const handleSubmit = useCallback(async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n if (!isFormValid || isLoading) return;\n try {\n await onSignIn(formData);\n onSuccess?.();\n } catch (err) {\n const errorMessage = err instanceof Error ? err.message : 'Sign in failed';\n setError(errorMessage);\n onError?.(err instanceof Error ? err : new Error(errorMessage));\n }\n }, [formData, isFormValid, isLoading, onSignIn, onSuccess, onError]);\n\n const handleSignUpClick = useCallback(() => {\n onSignUp?.();\n }, [onSignUp]);\n\n const displayTitle = useMemo(() => title || (appName ? `Sign in to ${appName}` : 'Sign In'), [title, appName]);\n const displaySubtitle = useMemo(() => subtitle || 'Enter your credentials to continue.', [subtitle]);\n\n return (\n <Card className={cn('w-full max-w-md mx-auto', className)}>\n <form onSubmit={handleSubmit} data-testid=\"login-form\">\n <CardHeader className=\"space-y-1\">\n <CardTitle className=\"text-2xl text-center\">{displayTitle}</CardTitle>\n <CardDescription className=\"text-center\">\n {displaySubtitle}\n </CardDescription>\n </CardHeader>\n\n <CardContent className=\"space-y-4\">\n {error && (\n <Alert variant=\"destructive\">\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n \n <Label htmlFor=\"email\">Email</Label>\n <Input\n id=\"email\"\n type=\"email\"\n placeholder=\"Enter your email\"\n value={formData.email}\n onChange={handleEmailChange}\n required\n disabled={isLoading}\n />\n \n \n <Label htmlFor=\"password\">Password</Label>\n <Input\n id=\"password\"\n type=\"password\"\n placeholder=\"Enter your password\"\n value={formData.password}\n onChange={handlePasswordChange}\n required\n disabled={isLoading}\n />\n \n </CardContent>\n <CardFooter className=\"flex flex-col space-y-4\">\n <Button \n type=\"submit\" \n className=\"w-full\" \n disabled={isLoading || !isFormValid}\n >\n {isLoading ? 'Signing in...' : 'Sign In'}\n </Button>\n {showSignUp && (\n onSignUp ? (\n <div className=\"text-sm text-center text-muted-foreground\">\n <button\n type=\"button\"\n onClick={handleSignUpClick}\n className=\"text-primary hover:underline\"\n >\n Don't have an account? Sign up\n </button>\n </div>\n ) : (\n <p className=\"text-center text-muted-foreground\">\n Don't have an account?{' '}\n <a href=\"/signup\" className=\"text-primary hover:underline\">\n Sign up\n </a>\n </p>\n )\n )}\n </CardFooter>\n </form>\n </Card>\n );\n});\n","/**\n * @file EventSelector Component\n * @package @jmruthers/pace-core\n * @module Components/EventSelector\n * @since 0.1.0\n *\n * A secure event selector component that allows users to choose from events they have\n * access to based on their role-based permissions. Integrates with the RBAC system\n * to ensure users only see events they're authorized to access.\n *\n * Features:\n * - Role-based event access control\n * - Automatic next event detection and selection\n * - Cross-device synchronization via Supabase\n * - Offline support with localStorage fallback\n * - Comprehensive error handling and retry functionality\n * - Event details display in dropdown\n * - Next/upcoming event indicators\n * - Loading states and user feedback\n * - Accessible interface design\n * - Integration with EventProvider\n *\n * @example\n * ```tsx\n * // Basic event selector\n * <EventSelector \n * onEventChange={(event) => console.log('Selected event:', event)}\n * />\n * \n * // With custom configuration\n * <EventSelector\n * placeholder=\"Choose an event...\"\n * showEventDetails={true}\n * showNextEventIndicator={true}\n * showRetryButton={true}\n * onEventChange={handleEventChange}\n * />\n * \n * // In a header component\n * <Header>\n * <EventSelector \n * className=\"w-64\"\n * showEventDetails={false}\n * onEventChange={setCurrentEvent}\n * />\n * </Header>\n * \n * // With error handling\n * <EventSelector\n * showNoEventsMessage={true}\n * showRetryButton={true}\n * onEventChange={(event) => {\n * if (event) {\n * setCurrentEvent(event);\n * navigate(`/events/${event.id}`);\n * }\n * }}\n * />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper ARIA labels and descriptions\n * - Keyboard navigation support\n * - Screen reader friendly\n * - Focus management\n * - High contrast support\n * - Clear error identification\n *\n * @security\n * - Role-based access control integration\n * - Secure event data handling\n * - User permission validation\n * - No unauthorized event exposure\n * - Secure session management\n *\n * @dependencies\n * - EventProvider - Event context and state\n * - Select components - Dropdown interface\n * - Button component - Retry functionality\n * - Alert component - Error display\n * - LoadingSpinner - Loading states\n * - React 18+ - Hooks and effects\n * - Tailwind CSS - Styling\n */\n\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../Select';\nimport { Alert, AlertDescription } from '../Alert/Alert';\nimport { Button } from '../Button/Button';\nimport { LoadingSpinner } from '../LoadingSpinner/LoadingSpinner';\nimport { RefreshCw, AlertCircle, Lock, Calendar, Star } from 'lucide-react';\nimport { useEvents } from '../../providers/EventProvider';\nimport { Event } from '../../types';\nimport { useEffect, useMemo } from 'react';\n\nexport interface EventSelectorProps {\n /** Placeholder text for the dropdown */\n placeholder?: string;\n /** Additional CSS classes */\n className?: string;\n /** Callback fired when an event changes, providing full event object */\n onEventChange?: (event: Event | null) => void;\n /** Show friendly message when no events available */\n showNoEventsMessage?: boolean;\n /** Show retry button on errors */\n showRetryButton?: boolean;\n /** Show event details in dropdown */\n showEventDetails?: boolean;\n /** Show indicator for next/upcoming events */\n showNextEventIndicator?: boolean;\n}\n\n/**\n * EventSelector component for selecting events with built-in access control\n * \n * This component provides secure event selection with:\n * - Database integration via rbac_event_app_roles table\n * - Auto-selection of next upcoming event by date\n * - Cross-device sync via Supabase user session metadata\n * - localStorage fallback for offline scenarios\n * - Comprehensive error handling and user feedback\n * \n * @component\n * @example\n * <UnifiedAuthProvider supabaseClient={supabase} appName=\"PACE\">\n * <EventSelector onEventChange={(event) => console.log(event)} />\n * </UnifiedAuthProvider>\n */\nexport function EventSelector({\n placeholder = \"Select an event\",\n className,\n onEventChange,\n showNoEventsMessage = true,\n showRetryButton = true,\n showEventDetails = true,\n showNextEventIndicator = true\n}: EventSelectorProps) {\n const { \n events, \n selectedEvent, \n isLoading, \n error, \n setSelectedEvent, \n refreshEvents,\n } = useEvents();\n\n\n const handleValueChange = (eventId: string) => {\n const event = events.find((e) => (e.event_id || e.id) === eventId);\n \n if (event) {\n setSelectedEvent(event);\n if (onEventChange) {\n onEventChange(event);\n }\n }\n };\n\n const handleRetry = () => {\n refreshEvents();\n };\n\n // Helper function to check if an event is the next upcoming event\n const isNextEvent = (event: Event): boolean => {\n if (!event.event_date) return false;\n \n const now = new Date();\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const eventDate = new Date(event.event_date);\n \n return eventDate >= today;\n };\n\n // Helper function to format event date\n const formatEventDate = (dateString: string): string => {\n const date = new Date(dateString);\n const today = new Date();\n const tomorrow = new Date(today);\n tomorrow.setDate(tomorrow.getDate() + 1);\n \n if (date.toDateString() === today.toDateString()) {\n return 'Today';\n } else if (date.toDateString() === tomorrow.toDateString()) {\n return 'Tomorrow';\n } else {\n return date.toLocaleDateString();\n }\n };\n\n // Compute sorted list: descending by event_date (newest first); events without date go last\n const sortedEvents = useMemo(() => {\n const getTime = (e: Event) => (e.event_date ? new Date(e.event_date).getTime() : Number.NEGATIVE_INFINITY);\n return [...events].sort((a, b) => getTime(b) - getTime(a));\n }, [events]);\n\n // Default to the next upcoming event if none selected\n useEffect(() => {\n if (!selectedEvent && events.length > 0) {\n const today = new Date();\n const startOfToday = new Date(today.getFullYear(), today.getMonth(), today.getDate()).getTime();\n const next = [...events]\n .filter(e => e.event_date && new Date(e.event_date).getTime() >= startOfToday)\n .sort((a, b) => new Date(a.event_date as string).getTime() - new Date(b.event_date as string).getTime())[0];\n if (next) {\n setSelectedEvent(next);\n if (onEventChange) onEventChange(next);\n }\n }\n }, [events, selectedEvent, setSelectedEvent, onEventChange]);\n\n // Loading state\n if (isLoading) {\n return (\n <div className={`flex items-center gap-2 ${className}`}>\n <LoadingSpinner size=\"sm\" />\n <span className=\"text-sm text-muted-foreground\">Loading events...</span>\n </div>\n );\n }\n\n // Access error state\n if (error) {\n return (\n <div className={className}>\n <Alert variant=\"destructive\">\n <Lock className=\"h-4 w-4\" />\n <AlertDescription className=\"flex items-center justify-between\">\n <span>{error.message}</span>\n {showRetryButton && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={handleRetry}\n className=\"ml-2\"\n >\n <RefreshCw className=\"h-3 w-3 mr-1\" />\n Retry\n </Button>\n )}\n </AlertDescription>\n </Alert>\n </div>\n );\n }\n\n // No events available state\n if (events.length === 0) {\n if (showNoEventsMessage) {\n return (\n <div className={className}>\n <Alert variant=\"inline\">\n <AlertCircle className=\"h-4 w-4 text-app-acc-700\" />\n <AlertDescription className=\"flex items-center justify-between\">\n <span>No events available.</span>\n {showRetryButton && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={handleRetry}\n className=\"ml-2\"\n >\n <RefreshCw className=\"h-3 w-3 mr-1\" />\n Refresh\n </Button>\n )}\n </AlertDescription>\n </Alert>\n </div>\n );\n }\n return null;\n }\n\n // Normal selector state\n return (\n <Select \n value={selectedEvent ? (selectedEvent.event_id || selectedEvent.id) : ''}\n onValueChange={handleValueChange}\n >\n <SelectTrigger className={`text-left ${className || ''}`}>\n <SelectValue placeholder={placeholder}>\n {selectedEvent && (\n <div className=\"flex items-center gap-2\">\n <Calendar className=\"h-4 w-4 flex-shrink-0\" />\n <span className=\"truncate\">{selectedEvent.event_name || selectedEvent.name}</span>\n {selectedEvent.event_date && (\n <span className=\"text-xs text-muted-foreground flex-shrink-0\">\n ({formatEventDate(selectedEvent.event_date)})\n </span>\n )}\n </div>\n )}\n </SelectValue>\n </SelectTrigger>\n <SelectContent className=\"w-96\">\n {sortedEvents\n .map((event) => {\n const isNext = isNextEvent(event);\n const isSelected = selectedEvent && (selectedEvent.event_id === event.event_id || selectedEvent.id === event.id);\n \n return (\n <SelectItem \n key={event.event_id || event.id}\n value={event.event_id || event.id}\n className=\"flex items-center justify-between\"\n >\n <div className=\"flex items-center gap-2 w-full\">\n {showNextEventIndicator && isNext && (\n <Star className=\"h-3 w-3 text-yellow-500\" />\n )}\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className={isSelected ? \"font-semibold\" : \"\"}>\n {event.event_name || event.name}\n </span>\n {isSelected && (\n <span className=\"text-xs bg-primary text-primary-foreground px-1 rounded\">\n Current\n </span>\n )}\n </div>\n {showEventDetails && event.event_date && (\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Calendar className=\"h-3 w-3\" />\n <span>{formatEventDate(event.event_date)}</span>\n {isNext && (\n <span className=\"text-yellow-600 font-medium\">\n (Next)\n </span>\n )}\n </div>\n )}\n {showEventDetails && event.event_venue && (\n <div className=\"text-xs text-muted-foreground\">\n 📍 {event.event_venue}\n </div>\n )}\n </div>\n </div>\n </SelectItem>\n );\n })}\n </SelectContent>\n </Select>\n );\n}\n","/**\n * @file Password Change Form Component\n * @package @jmruthers/pace-core\n * @module Components/PasswordReset\n * @since 0.1.0\n *\n * A secure password change form component with validation, confirmation matching,\n * and proper error handling for updating user passwords.\n *\n * Features:\n * - Password strength validation (minimum 8 characters)\n * - Password confirmation matching\n * - Loading states with disabled form\n * - Error handling and display\n * - Accessibility compliant\n * - Responsive design\n * - Form validation\n * - Secure password input\n * - Success and error callbacks\n *\n * @example\n * ```tsx\n * // Basic password change form\n * <PasswordChangeForm\n * onSubmit={async (values) => {\n * try {\n * await updatePassword(values.newPassword);\n * toast.success('Password updated successfully!');\n * return {};\n * } catch (error) {\n * return { error: { message: error.message } };\n * }\n * }}\n * />\n * \n * // Password change form with custom styling\n * <PasswordChangeForm\n * className=\"max-w-md mx-auto p-6 bg-app-main-50 rounded-lg shadow-md\"\n * onSubmit={async (values) => {\n * const result = await authService.changePassword(values.newPassword);\n * if (result.success) {\n * navigate('/profile');\n * return {};\n * } else {\n * return { error: { message: result.error } };\n * }\n * }}\n * />\n * \n * // Password change form in a modal\n * <Modal isOpen={showPasswordChange} onClose={() => setShowPasswordChange(false)}>\n * <ModalContent>\n * <ModalHeader>\n * <ModalTitle>Change Password</ModalTitle>\n * </ModalHeader>\n * <ModalBody>\n * <PasswordChangeForm\n * onSubmit={async (values) => {\n * const result = await changePassword(values.newPassword);\n * if (result.success) {\n * setShowPasswordChange(false);\n * toast.success('Password changed successfully');\n * return {};\n * } else {\n * return { error: { message: result.error } };\n * }\n * }}\n * />\n * </ModalBody>\n * </ModalContent>\n * </Modal>\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper form labels and associations\n * - Screen reader friendly error messages\n * - Keyboard navigation support\n * - Focus management\n * - High contrast support\n * - Clear error identification\n * - Role=\"alert\" for error announcements\n * - Password field security\n *\n * @security\n * - Password strength validation\n * - Secure password input fields\n * - Confirmation matching\n * - No password logging\n * - Proper error handling\n *\n * @dependencies\n * - React 18+ - Hooks and state\n * - Button component\n * - Input component\n * - Label component\n * - Tailwind CSS - Styling\n */\n\nimport React, { useState } from 'react';\nimport { Button } from '../Button/Button';\nimport { Input } from '../Input/Input';\nimport { Label } from '../Label';\nimport { cn } from '../../utils/cn';\n\nexport interface PasswordChangeFormValues {\n newPassword: string;\n confirmPassword: string;\n}\n\nexport interface PasswordChangeFormProps {\n onSubmit: (values: PasswordChangeFormValues) => Promise<{ error?: any }>;\n className?: string;\n}\n\nexport function PasswordChangeForm({ onSubmit, className }: PasswordChangeFormProps) {\n const [newPassword, setNewPassword] = useState('');\n const [confirmPassword, setConfirmPassword] = useState('');\n const [error, setError] = useState<string | null>(null);\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n setError(null);\n\n if (newPassword.length < 8) {\n setError('Password must be at least 8 characters.');\n return;\n }\n if (newPassword !== confirmPassword) {\n setError('Passwords do not match.');\n return;\n }\n\n setIsSubmitting(true);\n try {\n const result = await onSubmit({ newPassword, confirmPassword });\n if (result && result.error) {\n setError(result.error.message || 'Failed to change password.');\n }\n } catch (err: any) {\n setError(err?.message || 'An unexpected error occurred.');\n } finally {\n setIsSubmitting(false);\n }\n };\n\n return (\n <form onSubmit={handleSubmit} className={cn('space-y-4', className)}>\n {error && (\n <div role=\"alert\">\n {error}\n </div>\n )}\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-password\">New Password</Label>\n <Input\n id=\"new-password\"\n type=\"password\"\n value={newPassword}\n onChange={(e) => setNewPassword(e.target.value)}\n required\n disabled={isSubmitting}\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor=\"confirm-password\">Confirm Password</Label>\n <Input\n id=\"confirm-password\"\n type=\"password\"\n value={confirmPassword}\n onChange={(e) => setConfirmPassword(e.target.value)}\n required\n disabled={isSubmitting}\n />\n </div>\n <Button\n type=\"submit\"\n className=\"w-full\"\n disabled={isSubmitting || !newPassword || !confirmPassword}\n >\n {isSubmitting ? 'Changing...' : 'Change Password'}\n </Button>\n </form>\n );\n} ","/**\n * @file User Menu Component\n * @package @jmruthers/pace-core\n * @module Components/UserMenu\n * @since 0.1.0\n *\n * A comprehensive user menu component that displays user information and provides\n * access to user-specific actions like password changes and sign out.\n *\n * Features:\n * - User avatar and display name\n * - Dropdown menu with user actions\n * - Password change functionality\n * - Sign out capability\n * - Loading state component\n * - Responsive design\n * - Accessibility compliant\n * - Performance optimized with React.memo\n * - Integration with Supabase User\n * - Customizable styling\n *\n * @example\n * ```tsx\n * // Basic user menu\n * <UserMenu\n * user={currentUser}\n * onSignOut={async () => {\n * await signOut();\n * navigate('/login');\n * }}\n * onChangePassword={async (newPassword, confirmPassword) => {\n * try {\n * await updatePassword(newPassword);\n * toast.success('Password updated successfully!');\n * return {};\n * } catch (error) {\n * return { error: { message: error.message } };\n * }\n * }}\n * />\n * \n * // User menu without avatar\n * <UserMenu\n * user={currentUser}\n * showAvatar={false}\n * onSignOut={handleSignOut}\n * onChangePassword={handlePasswordChange}\n * />\n * \n * // User menu with loading state\n * {isLoading ? (\n * <UserMenu.Loading />\n * ) : (\n * <UserMenu\n * user={user}\n * onSignOut={handleSignOut}\n * onChangePassword={handlePasswordChange}\n * />\n * )}\n * \n * // User menu in header\n * <Header>\n * <div className=\"flex items-center gap-4\">\n * <Navigation />\n * <UserMenu\n * user={user}\n * onSignOut={handleSignOut}\n * onChangePassword={handlePasswordChange}\n * className=\"ml-auto\"\n * />\n * </div>\n * </Header>\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper ARIA labels and roles\n * - Keyboard navigation support\n * - Focus management\n * - Screen reader friendly\n * - High contrast support\n * - Loading state announcements\n * - Clear action identification\n *\n * @performance\n * - React.memo for efficient re-rendering\n * - useCallback for stable event handlers\n * - useMemo for computed values\n * - Minimal re-renders\n * - Optimized avatar rendering\n *\n * @dependencies\n * - React 18+ - Hooks and memo\n * - @supabase/supabase-js - User type\n * - lucide-react - Icons\n * - DropdownMenu components\n * - Dialog components\n * - PasswordChangeForm component\n * - Avatar component\n * - Button component\n * - Tailwind CSS - Styling\n */\n\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { User } from '@supabase/supabase-js';\nimport { ChevronDown, LogOut, KeyRound } from 'lucide-react';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../DropdownMenu';\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n DialogOverlay\n} from '../Dialog';\nimport { PasswordChangeForm } from '../PasswordReset/PasswordChangeForm';\nimport { Avatar, AvatarFallback, AvatarImage } from '../Avatar';\nimport { Button } from '../Button';\n\nexport interface UserMenuProps {\n user: User | null;\n onSignOut?: () => Promise<void>;\n onChangePassword?: (newPassword: string, confirmPassword: string) => Promise<{ error: any }>;\n className?: string;\n showAvatar?: boolean;\n}\n\nexport const UserMenu = React.memo<UserMenuProps>(function UserMenu({\n user,\n onSignOut,\n onChangePassword,\n className,\n showAvatar = true,\n}) {\n const [isPasswordDialogOpen, setPasswordDialogOpen] = useState(false);\n\n const userInfo = useMemo(() => {\n if (!user) return null;\n return {\n email: user.email,\n displayName: user.user_metadata?.display_name || user.user_metadata?.full_name || user.email?.split('@')[0],\n avatarUrl: user.user_metadata?.avatar_url,\n initial: (user.user_metadata?.display_name || user.user_metadata?.full_name || user.email || 'U').charAt(0).toUpperCase(),\n };\n }, [user]);\n\n const handleSignOut = useCallback(async () => {\n if (onSignOut) await onSignOut();\n }, [onSignOut]);\n\n if (!user || !userInfo) {\n return null; // Or a loading/login button\n }\n\n return (\n <Dialog open={isPasswordDialogOpen} onOpenChange={setPasswordDialogOpen}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" className=\"flex items-center gap-2\">\n {showAvatar && (\n <Avatar className=\"h-8 w-8\">\n <AvatarImage src={userInfo.avatarUrl} alt={userInfo.displayName} />\n <AvatarFallback>{userInfo.initial}</AvatarFallback>\n </Avatar>\n )}\n <span className=\"hidden sm:inline-block\">{userInfo.displayName}</span>\n <ChevronDown className=\"h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-56\">\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col space-y-1\">\n <p className=\"font-medium\">{userInfo.displayName}</p>\n <p className=\"text-muted-foreground\">{userInfo.email}</p>\n </div>\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DialogTrigger asChild>\n <DropdownMenuItem>\n <KeyRound className=\"mr-2 h-4 w-4\" />\n <span>Change Password</span>\n </DropdownMenuItem>\n </DialogTrigger>\n <DropdownMenuItem onClick={handleSignOut}>\n <LogOut className=\"mr-2 h-4 w-4\" />\n <span>Sign out</span>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n \n <DialogOverlay />\n <DialogContent className={className}>\n <DialogHeader>\n <DialogTitle>Change Password</DialogTitle>\n </DialogHeader>\n <PasswordChangeForm\n onSubmit={async ({ newPassword, confirmPassword }) => {\n if (onChangePassword) {\n const { error } = await onChangePassword(newPassword, confirmPassword);\n if (!error) {\n setPasswordDialogOpen(false);\n }\n return { error };\n }\n return {};\n }}\n />\n </DialogContent>\n </Dialog>\n );\n});\n\nexport const UserMenuLoading = React.memo(function UserMenuLoading() {\n return (\n <div className=\"relative inline-block text-left\">\n <button\n type=\"button\"\n disabled\n className=\"flex items-center space-x-2 px-3 py-2 text-sm font-medium text-muted-foreground bg-muted border border-input rounded-md\"\n >\n <div className=\"w-6 h-6 rounded-full bg-muted animate-pulse\" />\n <span className=\"truncate max-w-[150px]\">Loading...</span>\n <ChevronDown className=\"w-4 h-4 text-muted-foreground\" />\n </button>\n <div role=\"status\" aria-label=\"Loading user menu\" aria-live=\"polite\" className=\"w-6 h-6 rounded-full bg-muted animate-pulse\" />\n </div>\n );\n});\n\n// Add Loading as a property to UserMenu for backward compatibility\ntype UserMenuWithLoading = typeof UserMenu & {\n Loading: typeof UserMenuLoading;\n};\n\n(UserMenu as UserMenuWithLoading).Loading = UserMenuLoading;\n","/**\n * @file Unified Navigation Menu Component\n * @package @jmruthers/pace-core\n * @module Navigation\n * @since 0.1.0\n * \n * A flexible navigation menu component that supports both dropdown and hierarchical modes.\n * \n * Features:\n * - Dropdown mode: Menu button that opens a dropdown list\n * - Hierarchical mode: Expandable tree navigation with nested items\n * - Icon support for navigation items\n * - Current page highlighting\n * - Keyboard navigation support\n * - Accessible design with proper ARIA attributes\n * - Click outside to close (dropdown mode)\n * - Recursive rendering for nested items (hierarchical mode)\n * \n * @example\n * Basic dropdown navigation (most common use case):\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * import { useNavigate, useLocation } from 'react-router-dom';\n * \n * function AppNavigation() {\n * const navigate = useNavigate();\n * const location = useLocation();\n * \n * const navItems = [\n * { id: 'home', label: 'Home', href: '/', icon: 'Home' },\n * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },\n * { id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },\n * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }\n * ];\n * \n * return (\n * <NavigationMenu \n * items={navItems}\n * mode=\"dropdown\"\n * currentPath={location.pathname}\n * onNavigate={(item) => navigate(item.href)}\n * buttonText=\"Main Menu\"\n * showIcons={true}\n * />\n * );\n * }\n * \n * @example\n * Hierarchical navigation with nested items:\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * \n * function SidebarNavigation() {\n * const hierarchicalItems = [\n * { \n * id: 'user-management', \n * label: 'User Management',\n * icon: 'Users',\n * children: [\n * { id: 'users-list', label: 'All Users', href: '/users' },\n * { id: 'users-create', label: 'Create User', href: '/users/create' },\n * { id: 'user-roles', label: 'User Roles', href: '/users/roles' }\n * ]\n * },\n * { \n * id: 'reports', \n * label: 'Reports',\n * icon: 'BarChart',\n * children: [\n * { id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },\n * { id: 'user-reports', label: 'User Reports', href: '/reports/users' }\n * ]\n * },\n * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }\n * ];\n * \n * return (\n * <NavigationMenu \n * items={hierarchicalItems}\n * mode=\"hierarchical\"\n * currentPath={window.location.pathname}\n * onNavigate={(item) => {\n * if (item.href) {\n * window.location.href = item.href;\n * }\n * }}\n * className=\"w-64 bg-gray-50 p-4\"\n * />\n * );\n * }\n * ```\n * \n * @example\n * Integration with React Router and authentication:\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * import { useNavigate, useLocation } from 'react-router-dom';\n * import { useUnifiedAuth } from '@jmruthers/pace-core/providers';\n * \n * function AuthenticatedNavigation() {\n * const navigate = useNavigate();\n * const location = useLocation();\n * const { hasRole, hasPermission } = useUnifiedAuth();\n * \n * // Build navigation items based on user permissions\n * const navItems = [\n * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },\n * ...(hasPermission('meals:read') ? [\n * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }\n * ] : []),\n * ...(hasRole('admin') ? [\n * { id: 'admin', label: 'Admin Panel', href: '/admin', icon: 'Shield' }\n * ] : []),\n * { id: 'profile', label: 'Profile', href: '/profile', icon: 'User' }\n * ];\n * \n * return (\n * <NavigationMenu \n * items={navItems}\n * mode=\"dropdown\"\n * currentPath={location.pathname}\n * onNavigate={(item) => navigate(item.href)}\n * buttonText=\"Navigation\"\n * navigationLabel=\"Main application navigation\"\n * />\n * );\n * }\n * ```\n * \n * @example\n * ```tsx\n * // Custom navigation with external links and actions\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * \n * function CustomNavigation() {\n * const handleNavigation = (item) => {\n * if (item.id === 'logout') {\n * // Handle logout action\n * handleLogout();\n * } else if (item.href?.startsWith('http')) {\n * // Handle external links\n * window.open(item.href, '_blank');\n * } else if (item.href) {\n * // Handle internal navigation\n * navigate(item.href);\n * }\n * };\n * \n * const navItems = [\n * { id: 'home', label: 'Home', href: '/', icon: 'Home' },\n * { id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },\n * { id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions\n * ];\n * \n * return (\n * <NavigationMenu \n * items={navItems}\n * mode=\"dropdown\"\n * onNavigate={handleNavigation}\n * buttonText=\"Menu\"\n * disabled={false}\n * />\n * );\n * }\n * ```\n * \n * @accessibility\n * - WCAG 2.1 AA compliant navigation structure\n * - Proper ARIA attributes for screen readers\n * - Keyboard navigation with Enter, Space, and Escape keys\n * - Focus management for dropdown menus\n * - Semantic HTML structure with nav, menu, and menuitem roles\n * - Clear visual indicators for active/current page\n * \n * @performance\n * - Lightweight component with minimal re-renders\n * - Efficient click outside detection\n * - Optimized keyboard event handling\n * - Memory cleanup for event listeners\n * \n * @styling\n * - Uses Tailwind CSS for consistent styling\n * - Supports custom className for additional styling\n * - Responsive design considerations\n * - Dark mode compatible color schemes\n * \n * @dependencies\n * - React 18+ - Component framework and hooks\n * - Lucide React - Icon components\n * - Radix UI - Dropdown menu primitives\n * - React Router (optional) - For navigation handling\n * - Tailwind CSS - Styling system\n */\n\nimport * as React from \"react\";\nimport { Menu, ChevronDown } from \"lucide-react\";\nimport { cn } from \"../../utils/cn\";\nimport { NavigationMenuProps, NavigationItem } from \"./types\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"../DropdownMenu\";\nimport { Button } from \"../Button\";\n\n/**\n * Unified NavigationMenu component that supports both dropdown and hierarchical navigation modes.\n * \n * A flexible navigation menu component with support for icons, current page highlighting,\n * keyboard navigation, and nested menu items.\n * \n * Features:\n * - Dropdown mode: Menu button that opens a dropdown list\n * - Hierarchical mode: Expandable tree navigation with nested items\n * - Icon support for navigation items\n * - Current page highlighting\n * - Keyboard navigation support (Enter, Space, Escape)\n * - Accessible design with proper ARIA attributes\n * - Click outside to close (dropdown mode)\n * - Recursive rendering for nested items (hierarchical mode)\n * \n * @example\n * Basic dropdown navigation (most common use case):\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * import { useNavigate, useLocation } from 'react-router-dom';\n * \n * function AppNavigation() {\n * const navigate = useNavigate();\n * const location = useLocation();\n * \n * const navItems = [\n * { id: 'home', label: 'Home', href: '/', icon: 'Home' },\n * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },\n * { id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },\n * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }\n * ];\n * \n * return (\n * <NavigationMenu \n * items={navItems}\n * mode=\"dropdown\"\n * currentPath={location.pathname}\n * onNavigate={(item) => navigate(item.href)}\n * buttonText=\"Main Menu\"\n * showIcons={true}\n * />\n * );\n * }\n * ```\n * \n * @example\n * Hierarchical navigation with nested items:\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * \n * function SidebarNavigation() {\n * const hierarchicalItems = [\n * { \n * id: 'user-management', \n * label: 'User Management',\n * icon: 'Users',\n * children: [\n * { id: 'users-list', label: 'All Users', href: '/users' },\n * { id: 'users-create', label: 'Create User', href: '/users/create' },\n * { id: 'user-roles', label: 'User Roles', href: '/users/roles' }\n * ]\n * },\n * { \n * id: 'reports', \n * label: 'Reports',\n * icon: 'BarChart',\n * children: [\n * { id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },\n * { id: 'user-reports', label: 'User Reports', href: '/reports/users' }\n * ]\n * },\n * { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }\n * ];\n * \n * return (\n * <NavigationMenu \n * items={hierarchicalItems}\n * mode=\"hierarchical\"\n * currentPath={window.location.pathname}\n * onNavigate={(item) => {\n * if (item.href) {\n * window.location.href = item.href;\n * }\n * }}\n * className=\"w-64 bg-gray-50 p-4\"\n * />\n * );\n * }\n * ```\n * \n * @example\n * Integration with React Router and authentication:\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * import { useNavigate, useLocation } from 'react-router-dom';\n * import { useUnifiedAuth } from '@jmruthers/pace-core/providers';\n * \n * function AuthenticatedNavigation() {\n * const navigate = useNavigate();\n * const location = useLocation();\n * const { hasRole, hasPermission } = useUnifiedAuth();\n * \n * // Build navigation items based on user permissions\n * const navItems = [\n * { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },\n * ...(hasPermission('meals:read') ? [\n * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }\n * ] : []),\n * ...(hasRole('admin') ? [\n * { id: 'admin', label: 'Admin Panel', href: '/admin', icon: 'Shield' }\n * ] : []),\n * { id: 'profile', label: 'Profile', href: '/profile', icon: 'User' }\n * ];\n * \n * return (\n * <NavigationMenu \n * items={navItems}\n * mode=\"dropdown\"\n * currentPath={location.pathname}\n * onNavigate={(item) => navigate(item.href)}\n * buttonText=\"Navigation\"\n * navigationLabel=\"Main application navigation\"\n * />\n * );\n * }\n * ```\n * \n * @example\n * Custom navigation with external links and actions:\n * ```tsx\n * import { NavigationMenu } from '@jmruthers/pace-core';\n * \n * function CustomNavigation() {\n * const handleNavigation = (item) => {\n * if (item.id === 'logout') {\n * // Handle logout action\n * handleLogout();\n * } else if (item.href?.startsWith('http')) {\n * // Handle external links\n * window.open(item.href, '_blank');\n * } else if (item.href) {\n * // Handle internal navigation\n * navigate(item.href);\n * }\n * };\n * \n * const navItems = [\n * { id: 'home', label: 'Home', href: '/', icon: 'Home' },\n * { id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },\n * { id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions\n * ];\n * \n * return (\n * <NavigationMenu \n * items={navItems}\n * mode=\"dropdown\"\n * onNavigate={handleNavigation}\n * buttonText=\"Menu\"\n * disabled={false}\n * />\n * );\n * }\n * ```\n * \n * @param props - NavigationMenu component props including items, mode, navigation handlers, and styling options\n * @returns React element with navigation menu functionality\n * \n * @since 0.1.0\n */\nexport const NavigationMenu = React.forwardRef<\n HTMLDivElement,\n NavigationMenuProps\n>(({ \n items, \n mode = 'dropdown',\n currentPath, \n onNavigate, \n className, \n disabled = false,\n buttonText = \"Menu\",\n showIcons = true,\n navigationLabel = \"Main navigation\",\n // NEW: Phase 2 - Enhanced Security Features\n strictMode = true,\n auditLog = true,\n onNavigationAccessDenied,\n onStrictModeViolation,\n filterByPermissions = true,\n ...props \n}, ref) => {\n const [isOpen, setIsOpen] = React.useState(false);\n const [expandedItems, setExpandedItems] = React.useState<Set<string>>(new Set());\n const menuRef = React.useRef<HTMLDivElement>(null);\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n\n // NEW: Phase 2 - Enhanced Security Features\n // Filter navigation items based on permissions\n const filteredItems = React.useMemo(() => {\n if (!filterByPermissions) return items;\n \n // For now, return all items - this will be enhanced with actual permission checking\n // when we integrate with the existing RBAC system\n return items.filter(item => {\n // Check if item should be hidden\n if (item.meta?.hidden) return false;\n \n // For now, show all items - this will be enhanced with actual permission checking\n return true;\n });\n }, [items, filterByPermissions]);\n\n // Close dropdown menu when clicking outside\n React.useEffect(() => {\n if (mode !== 'dropdown') return;\n\n const handleClickOutside = (event: MouseEvent) => {\n if (menuRef.current && !menuRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, mode]);\n\n // Handle keyboard navigation for dropdown mode\n const handleDropdownKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsOpen(false);\n buttonRef.current?.focus();\n } else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n setIsOpen(!isOpen);\n }\n };\n\n // Handle keyboard navigation for hierarchical mode\n const handleHierarchicalKeyDown = (event: React.KeyboardEvent, item: NavigationItem) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (item.children && item.children.length > 0) {\n toggleExpanded(item.id);\n } else if (item.href) {\n onNavigate?.(item);\n }\n break;\n case 'Escape':\n if (expandedItems.has(item.id)) {\n toggleExpanded(item.id);\n }\n break;\n }\n };\n\n // Toggle expanded state for hierarchical items\n const toggleExpanded = (itemId: string) => {\n const newExpanded = new Set(expandedItems);\n if (newExpanded.has(itemId)) {\n newExpanded.delete(itemId);\n } else {\n newExpanded.add(itemId);\n }\n setExpandedItems(newExpanded);\n };\n\n // Handle navigation item click\n const handleItemClick = (item: NavigationItem) => {\n // NEW: Phase 2 - Enhanced Security Features\n // Log navigation access attempt for audit\n if (auditLog) {\n console.log(`[NavigationMenu] Navigation access attempt:`, {\n itemId: item.id,\n label: item.label,\n href: item.href,\n permissions: item.permissions,\n roles: item.roles,\n accessLevel: item.accessLevel,\n timestamp: new Date().toISOString()\n });\n }\n \n // Check if user has permission to access this navigation item\n // For now, allow all access - this will be enhanced with actual permission checking\n const hasPermission = true; // This will be replaced with actual permission checking\n \n if (!hasPermission) {\n // Handle access denied\n if (onNavigationAccessDenied) {\n onNavigationAccessDenied(item.id, 'Insufficient permissions');\n }\n \n if (strictMode) {\n console.error(`[NavigationMenu] STRICT MODE VIOLATION: User attempted to access protected navigation item without permission`, {\n itemId: item.id,\n label: item.label,\n href: item.href,\n permissions: item.permissions,\n roles: item.roles,\n accessLevel: item.accessLevel,\n timestamp: new Date().toISOString()\n });\n \n if (onStrictModeViolation) {\n onStrictModeViolation(item.id, 'Insufficient permissions');\n }\n }\n \n return; // Don't navigate if access is denied\n }\n \n if (onNavigate) {\n onNavigate(item);\n } else if (item.href) {\n // Default navigation behavior\n window.location.href = item.href;\n }\n };\n\n // Check if item is currently active\n const isActiveItem = (item: NavigationItem): boolean => {\n if (item.isActive !== undefined) return item.isActive;\n if (currentPath === item.href) return true;\n if (item.children && item.children.length > 0) {\n return item.children.some(child => isActiveItem(child));\n }\n return false;\n };\n\n // Render dropdown menu\n const renderDropdownMenu = () => {\n if (!isOpen) return null;\n\n return (\n <div\n className={cn(\n \"absolute top-full left-0 mt-1 min-w-[200px] z-50\",\n \"bg-popover border border-border rounded-md shadow-lg\",\n \"animate-in fade-in-0 zoom-in-95 duration-200\"\n )}\n role=\"menu\"\n aria-orientation=\"vertical\"\n >\n <div className=\"py-1\">\n {items.map((item) => {\n const isActive = isActiveItem(item);\n \n return (\n <a\n key={item.id}\n href={item.href || '#'}\n onClick={(e) => handleItemClick(item)}\n className={cn(\n \"flex items-center gap-2 px-4 py-2 text-sm\",\n \"hover:bg-accent hover:text-accent-foreground\",\n \"focus:bg-accent focus:text-accent-foreground focus:outline-none\",\n \"transition-colors duration-150\",\n isActive && \"bg-accent text-accent-foreground font-medium\"\n )}\n role=\"menuitem\"\n tabIndex={0}\n >\n {item.icon && showIcons && (\n <div data-testid={`${item.icon.toLowerCase()}-icon`} className=\"h-4 w-4 flex-shrink-0\" />\n )}\n <span>{item.label}</span>\n {isActive && (\n <div className=\"ml-auto w-2 h-2 bg-primary rounded-full\" />\n )}\n </a>\n );\n })}\n </div>\n </div>\n );\n };\n\n // Render hierarchical navigation item\n const renderHierarchicalItem = (item: NavigationItem, level: number = 0) => {\n const hasChildren = item.children && item.children.length > 0;\n const isExpanded = expandedItems.has(item.id);\n const itemIsActive = isActiveItem(item);\n\n return (\n <li key={item.id} role=\"none\">\n {hasChildren ? (\n <div>\n <button\n onClick={() => toggleExpanded(item.id)}\n onKeyDown={(e) => handleHierarchicalKeyDown(e, item)}\n className={cn(\n \"flex items-center justify-between w-full px-3 py-2 text-left rounded-md transition-colors\",\n \"hover:bg-muted focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n itemIsActive && \"bg-muted text-primary font-medium\"\n )}\n aria-expanded={isExpanded}\n aria-controls={`submenu-${item.id}`}\n aria-current={itemIsActive ? \"page\" : undefined}\n >\n <span>{item.label}</span>\n <ChevronDown \n className={cn(\n \"h-4 w-4 transition-transform\",\n isExpanded && \"rotate-180\"\n )}\n aria-hidden=\"true\"\n />\n </button>\n \n {isExpanded && item.children && (\n <ul\n id={`submenu-${item.id}`}\n role=\"menu\"\n className=\"ml-4 mt-1 space-y-1\"\n aria-label={`${item.label} submenu`}\n >\n {item.children.map(child => renderHierarchicalItem(child, level + 1))}\n </ul>\n )}\n </div>\n ) : (\n <a\n href={item.href || '#'}\n onClick={(e) => {\n if (onNavigate && item.href) {\n e.preventDefault();\n onNavigate(item);\n }\n }}\n onKeyDown={(e) => handleHierarchicalKeyDown(e, item)}\n className={cn(\n \"block px-3 py-2 rounded-md transition-colors\",\n \"hover:bg-muted focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n itemIsActive && \"bg-muted text-primary font-medium\"\n )}\n role=\"menuitem\"\n aria-current={itemIsActive ? \"page\" : undefined}\n >\n {item.label}\n </a>\n )}\n </li>\n );\n };\n\n // Render based on mode\n if (mode === 'dropdown') {\n return (\n <div className={cn(className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" disabled={disabled}>\n <Menu className=\"h-4 w-4\" />\n <span>{buttonText}</span>\n <ChevronDown className=\"h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" className=\"w-56 bg-popover text-popover-foreground\">\n {filteredItems.map((item) => {\n const isActive = isActiveItem(item);\n return (\n <DropdownMenuItem\n key={item.id}\n onClick={() => handleItemClick(item)}\n disabled={!item.href}\n className={cn(isActive && \"bg-accent text-accent-foreground\")}\n >\n {item.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n }\n\n // Hierarchical mode\n return (\n <nav \n ref={ref}\n className={cn(\"w-full\", className)}\n aria-label={navigationLabel}\n {...props}\n >\n <ul role=\"menubar\" className=\"space-y-1\">\n {filteredItems.map(item => renderHierarchicalItem(item))}\n </ul>\n </nav>\n );\n});\n\nNavigationMenu.displayName = \"NavigationMenu\";\n","/**\n * @file Header Component\n * @package @jmruthers/pace-core\n * @module Components/Header\n * @since 0.1.0\n *\n * A comprehensive header component for application layouts with navigation,\n * user menu, event selector, and customizable branding.\n *\n * Features:\n * - Customizable logo (URL or component)\n * - Navigation menu integration\n * - User menu with authentication\n * - Event selector for multi-tenant applications\n * - Custom actions support\n * - Responsive design\n * - Accessibility compliant\n * - Backdrop blur effects\n * - Flexible layout options\n *\n * @example\n * ```tsx\n * // Basic header with logo and user menu\n * <Header\n * logoUrl=\"/logo.svg\"\n * logoAlt=\"My App\"\n * user={currentUser}\n * onSignOut={handleSignOut}\n * />\n * \n * // Header with navigation and custom actions\n * <Header\n * logo={<CustomLogo />}\n * navItems={[\n * { id: 'dashboard', label: 'Dashboard', href: '/dashboard' },\n * { id: 'users', label: 'Users', href: '/users' },\n * { id: 'settings', label: 'Settings', href: '/settings' }\n * ]}\n * currentPath=\"/dashboard\"\n * actions={\n * <div className=\"flex gap-2\">\n * <Button variant=\"outline\">Export</Button>\n * <Button>New Item</Button>\n * </div>\n * }\n * user={currentUser}\n * onSignOut={handleSignOut}\n * />\n * \n * // Header without event selector\n * <Header\n * logoUrl=\"/logo.svg\"\n * showEventSelector={false}\n * user={currentUser}\n * onSignOut={handleSignOut}\n * />\n * \n * // Header with custom user menu\n * <Header\n * logoUrl=\"/logo.svg\"\n * userMenu={<CustomUserMenu user={currentUser} />}\n * showUserMenu={true}\n * />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper semantic HTML with role=\"banner\"\n * - Screen reader friendly navigation\n * - Keyboard navigation support\n * - High contrast support\n * - Focus management\n *\n * @dependencies\n * - @supabase/supabase-js - User authentication\n * - React 18+ - Component framework\n * - Tailwind CSS - Styling\n * - NavigationMenu component\n * - UserMenu component\n * - EventSelector component\n */\n\nimport React from 'react';\nimport { User } from '@supabase/supabase-js';\nimport { cn } from '../../utils/cn';\nimport { EventSelector } from '../EventSelector';\nimport { UserMenu } from '../UserMenu';\nimport { NavigationMenu } from '../NavigationMenu';\nimport type { NavigationItem } from '../NavigationMenu';\n\n/**\n * Props for the Header component\n */\nexport interface HeaderProps {\n /** URL to the app logo image */\n logoUrl?: string;\n /** Alt text for the logo */\n logoAlt?: string;\n /** Custom logo component (overrides logoUrl) */\n logo?: React.ReactNode;\n /** Navigation items for the menu - uses NavigationItem interface */\n navItems?: NavigationItem[];\n /** Current user for the user menu */\n user?: User | null;\n /** Sign out handler for user menu */\n onSignOut?: () => Promise<void>;\n /** Password change handler for user menu */\n onChangePassword?: (newPassword: string, confirmPassword: string) => Promise<{ error: any }>;\n /** Additional actions to display (will be placed between event selector and user menu) */\n actions?: React.ReactNode;\n /** Custom user menu component (overrides default UserMenu) */\n userMenu?: React.ReactNode;\n /** Custom className */\n className?: string;\n /** Show/hide event selector */\n showEventSelector?: boolean;\n /** Show/hide user menu */\n showUserMenu?: boolean;\n /** Current path for navigation highlighting */\n currentPath?: string;\n /** Custom navigation handler */\n onNavigate?: (item: NavigationItem) => void;\n}\n\n/**\n * Header component for application layouts with comprehensive navigation, user management, \n * and customizable branding support.\n * \n * A flexible header component that supports various configurations including custom logos,\n * navigation menus, user authentication, event selection, and custom actions.\n * \n * Features:\n * - Customizable logo (URL or custom component)\n * - Navigation menu integration with highlighting\n * - User menu with authentication and password management\n * - Event selector for multi-tenant applications\n * - Custom actions support\n * - Responsive design with mobile considerations\n * - Accessibility compliant with proper ARIA attributes\n * - Backdrop blur effects for modern UI\n * - Flexible layout with configurable sections\n * \n * @example\n * Basic header with logo and navigation:\n * ```tsx\n * import { Header } from '@jmruthers/pace-core';\n * import { useNavigate, useLocation } from 'react-router-dom';\n * \n * function AppHeader() {\n * const navigate = useNavigate();\n * const location = useLocation();\n * \n * const navItems = [\n * { id: 'dashboard', label: 'Dashboard', href: '/dashboard' },\n * { id: 'meals', label: 'Meals', href: '/meals' },\n * { id: 'settings', label: 'Settings', href: '/settings' }\n * ];\n * \n * return (\n * <Header\n * logoUrl=\"/company-logo.svg\"\n * logoAlt=\"My Company\"\n * navItems={navItems}\n * currentPath={location.pathname}\n * onNavigate={(item) => navigate(item.href)}\n * user={currentUser}\n * onSignOut={handleSignOut}\n * />\n * );\n * }\n * ```\n * \n * @example\n * Header with custom actions:\n * ```tsx\n * import { Header, Button } from '@jmruthers/pace-core';\n * \n * function HeaderWithActions() {\n * const customActions = (\n * <div className=\"flex items-center gap-2\">\n * <Button variant=\"outline\" size=\"sm\">Export</Button>\n * <Button size=\"sm\">New Item</Button>\n * </div>\n * );\n * \n * return (\n * <Header\n * logoUrl=\"/logo.svg\"\n * navItems={navigationItems}\n * actions={customActions}\n * user={currentUser}\n * onSignOut={handleSignOut}\n * />\n * );\n * }\n * ```\n * \n * @example\n * Minimal header configuration:\n * ```tsx\n * function MinimalHeader() {\n * return (\n * <Header\n * logoUrl=\"/simple-logo.svg\"\n * logoAlt=\"Simple App\"\n * showEventSelector={false}\n * user={currentUser}\n * onSignOut={handleSignOut}\n * />\n * );\n * }\n * ```\n * \n * @param props - Header configuration including logo, navigation, user settings, and custom content\n * @returns React element with complete header functionality\n * \n * @since 0.1.0\n */\nexport function Header({\n logoUrl,\n logoAlt = 'Logo',\n logo,\n navItems = [],\n user,\n onSignOut,\n onChangePassword,\n actions,\n userMenu,\n className,\n showEventSelector = true,\n showUserMenu = true,\n currentPath,\n onNavigate\n}: HeaderProps) {\n return (\n <header className={cn(\n \"flex items-center w-full border-b border-gray-200 bg-white h-16 shadow-sm\",\n \"bg-main-100 backdrop-blur-sm border-border\",\n \"supports-[backdrop-filter]:bg-main-100/90 supports-[backdrop-filter]:backdrop-blur-md\",\n className\n )} role=\"banner\">\n <nav className=\"px-4 w-[min(var(--app-width),100%)] mx-auto flex items-center justify-between min-h-[4rem]\">\n {/* Left side: Logo and Menu */}\n <div className=\"flex items-center gap-6\">\n {/* Logo */}\n {logo ? (\n logo\n ) : logoUrl ? (\n <img\n src={logoUrl}\n alt={logoAlt}\n className=\"h-8 w-auto max-w-[200px] object-contain\"\n />\n ) : (\n <img\n src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E\"\n alt={logoAlt}\n className=\"h-8 w-8\"\n />\n )}\n\n {/* Navigation Menu */}\n {navItems.length > 0 && (\n <NavigationMenu\n items={navItems}\n currentPath={currentPath}\n onNavigate={onNavigate}\n buttonText=\"Menu\"\n />\n )}\n </div>\n\n {/* Right side: Event Selector, Actions, and User Menu */}\n <div className=\"flex items-center gap-4\">\n {/* Event Selector */}\n {showEventSelector && (\n <EventSelector \n placeholder=\"Select event\" \n className=\"hidden sm:block w-96\" \n data-testid=\"event-selector\" \n />\n )}\n \n {/* Custom Actions */}\n {actions}\n \n {/* User Menu */}\n {showUserMenu && (\n userMenu ? (\n userMenu\n ) : (\n <UserMenu\n user={user || null}\n onSignOut={onSignOut}\n onChangePassword={onChangePassword}\n />\n )\n )}\n </div>\n </nav>\n </header>\n );\n}\n","/**\n * @file Footer Component\n * @package @jmruthers/pace-core\n * @module Components/Footer\n * @since 0.1.0\n *\n * A flexible footer component for application layouts with copyright information,\n * navigation links, and customizable content.\n *\n * Features:\n * - Copyright information with automatic year generation\n * - Customizable company name and branding\n * - Optional navigation links\n * - Logo display support\n * - Custom footer content via children\n * - Responsive design\n * - Accessibility compliant\n * - Flexible layout options\n * - Consistent styling with design system\n *\n * @example\n * ```tsx\n * // Basic footer with default copyright\n * <Footer />\n * \n * // Footer with custom company name and year\n * <Footer \n * companyName=\"My Company Inc.\"\n * year={2024}\n * />\n * \n * // Footer with navigation links\n * <Footer\n * companyName=\"My Company\"\n * links={[\n * { label: 'Privacy Policy', href: '/privacy' },\n * { label: 'Terms of Service', href: '/terms' },\n * { label: 'Contact', href: '/contact' }\n * ]}\n * />\n * \n * // Footer with logo and custom copyright\n * <Footer\n * logo=\"/logo.svg\"\n * copyright=\"© 2024 My Company. All rights reserved.\"\n * />\n * \n * // Footer with custom content\n * <Footer companyName=\"My Company\">\n * <div className=\"grid grid-cols-1 md:grid-cols-3 gap-8 mb-8\">\n * <div>\n * <h3 className=\"font-semibold mb-2\">About Us</h3>\n * <p className=\"text-sm text-muted-foreground\">\n * We provide innovative solutions for modern businesses.\n * </p>\n * </div>\n * <div>\n * <h3 className=\"font-semibold mb-2\">Contact</h3>\n * <p className=\"text-sm text-muted-foreground\">\n * Email: info@mycompany.com<br />\n * Phone: (555) 123-4567\n * </p>\n * </div>\n * <div>\n * <h3 className=\"font-semibold mb-2\">Follow Us</h3>\n * <div className=\"flex gap-2\">\n * <a href=\"#\" className=\"text-muted-foreground hover:text-foreground\">Twitter</a>\n * <a href=\"#\" className=\"text-muted-foreground hover:text-foreground\">LinkedIn</a>\n * </div>\n * </div>\n * </div>\n * </Footer>\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper semantic HTML with role=\"contentinfo\"\n * - Screen reader friendly navigation\n * - Keyboard navigation support\n * - High contrast support\n * - Clear link identification\n *\n * @dependencies\n * - React 18+ - Component framework\n * - Tailwind CSS - Styling\n */\nimport React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport interface FooterProps {\n /**\n * Company or organization name\n */\n companyName?: string;\n\n /**\n * Current year or custom year for copyright\n * @default current year\n */\n year?: number;\n\n /**\n * Optional array of navigation links to display\n */\n links?: Array<{\n label: string;\n href: string;\n }>;\n\n /**\n * Optional CSS class name\n */\n className?: string;\n\n /**\n * Logo image URL (from UI version)\n */\n logo?: string;\n\n /**\n * Copyright text (from UI version)\n */\n copyright?: string;\n\n /**\n * Footer content - children to render inside footer\n */\n children?: React.ReactNode;\n}\n\n/**\n * Footer component that displays copyright information and navigation\n * \n * @example\n * ```tsx\n * // Basic usage\n * <Footer />\n * \n * // With children\n * <Footer>\n * <div>Custom footer content</div>\n * </Footer>\n * \n * // With logo and copyright\n * <Footer logo=\"/logo.png\" copyright=\"© 2024 Company. All rights reserved.\" />\n * ```\n */\nconst FooterComponent: React.FC<FooterProps> = ({\n companyName = 'Solvera Solutions Pty Ltd',\n year = new Date().getFullYear(),\n links,\n className = '',\n logo,\n copyright,\n children\n}) => {\n // Use custom copyright if provided, otherwise generate default\n const copyrightText = copyright || `© Copyright 2022–${year} all rights reserved, ${companyName}.`;\n\n return (\n <footer className={cn('mt-8 py-6 flex justify-center border-t border-border bg-app-main-100', className)}>\n\n <section className='px-4 w-[min(var(--app-width),100%)] mx-auto text-center'>\n {logo && (\n <img src={logo} alt=\"Logo\" className=\"h-8 w-auto\" />\n )}\n\n {children && (\n <>\n {children}\n </>\n )}\n\n <span className=\"text-muted-foreground\">\n {copyrightText}\n </span>\n\n {links && links.length > 0 && (\n <ul className=\"flex gap-4 mt-2 md:mt-0\">\n {links.map((link, index) => (\n <li key={index}>\n <a href={link.href} className=\"text-muted-foreground hover:text-foreground\">\n {link.label}\n </a>\n </li>\n ))}\n </ul>\n )}\n </section>\n </footer>\n );\n};\n\nFooterComponent.displayName = 'Footer';\n\nexport const Footer = React.memo(FooterComponent);\nFooter.displayName = 'Footer';\n","/**\n * @file PACE App Layout Component\n * @package @jmruthers/pace-core\n * @module Components/PaceAppLayout\n * @since 0.1.0\n *\n * A comprehensive application layout component that provides a consistent\n * structure for all PACE suite applications with header, navigation, and footer.\n * \n * NEW: Layout-level permission enforcement to ensure consuming apps can't\n * forget to implement permission checks on individual pages.\n *\n * Features:\n * - Consistent application layout structure\n * - Header with logo, navigation, and user menu\n * - Footer with copyright and links\n * - React Router integration with Outlet\n * - Unified authentication integration\n * - Navigation menu with configurable items\n * - User sign-out functionality\n * - Password change capability\n * - Responsive design\n * - Accessibility compliant\n * - Flexible content area\n * - Branding support\n * - Layout-level permission enforcement\n * - Automatic page permission validation\n * - Permission-based navigation filtering\n *\n * @example\n * ```tsx\n * // Basic app layout with permission enforcement\n * <Router>\n * <Routes>\n * <Route path=\"/\" element={<PaceAppLayout appName=\"My Application\" />}>\n * <Route index element={<HomePage />} />\n * <Route path=\"dashboard\" element={<DashboardPage />} />\n * <Route path=\"settings\" element={<SettingsPage />} />\n * </Route>\n * </Routes>\n * </Router>\n * \n * // App layout with custom permission configuration\n * function MyApp() {\n * return (\n * <UnifiedAuthProvider supabaseClient={supabase} appName=\"My App\">\n * <Router>\n * <Routes>\n * <Route path=\"/\" element={\n * <PaceAppLayout \n * appName=\"My Application\"\n * enforcePermissions={true}\n * defaultPermission=\"read\"\n * permissionFallback={<AccessDeniedPage />}\n * />\n * }>\n * <Route index element={<HomePage />} />\n * <Route path=\"events\" element={<EventsPage />} />\n * <Route path=\"reports\" element={<ReportsPage />} />\n * <Route path=\"admin\" element={<AdminPage />} />\n * </Route>\n * </Routes>\n * </Router>\n * </UnifiedAuthProvider>\n * );\n * }\n * \n * // App layout with route-specific permissions\n * <PaceAppLayout \n * appName=\"Custom App\"\n * enforcePermissions={true}\n * routePermissions={{\n * '/dashboard': 'read',\n * '/admin': 'read',\n * '/settings': 'update'\n * }}\n * />\n * \n * // App layout without permission enforcement (legacy mode)\n * <PaceAppLayout \n * appName=\"Legacy App\"\n * enforcePermissions={false}\n * />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper semantic HTML structure\n * - Screen reader friendly navigation\n * - Keyboard navigation support\n * - Focus management\n * - High contrast support\n * - Clear content hierarchy\n * - Consistent navigation patterns\n *\n * @routing\n * - React Router v6 integration\n * - Nested route support\n * - Dynamic navigation handling\n * - Path-based navigation\n * - Route outlet rendering\n * - Permission-based route protection\n *\n * @dependencies\n * - React 18+ - Component framework\n * - React Router v6 - Routing\n * - UnifiedAuthProvider - Authentication\n * - usePermissionCache - Permission management\n * - Header component\n * - Footer component\n * - Button component\n * - NavigationMenu types\n * - Tailwind CSS - Styling\n */\n\nimport React, { useState, useEffect, useMemo } from 'react';\nimport { Outlet, useNavigate, useLocation } from 'react-router-dom';\nimport { useUnifiedAuth } from '../../providers/UnifiedAuthProvider';\n// Import RBAC functions directly so they can be mocked in tests\nimport { isPermitted } from '../../rbac/api';\nimport type { Permission } from '../../rbac/types';\nimport { Button } from '../Button';\nimport { Footer } from '../Footer';\nimport { Header } from '../Header';\nimport type { NavigationItem } from '../NavigationMenu/types';\n// Define Operation type locally since old RBAC types are removed\ntype Operation = 'read' | 'create' | 'update' | 'delete' | 'manage';\n\nexport interface PaceAppLayoutProps {\n /** The name of the application to be displayed in the header. */\n appName: string;\n /** Optional navigation items for the header menu. If not provided, uses default navigation. */\n navItems?: NavigationItem[];\n /** Show/hide event selector in the header */\n showEventSelector?: boolean;\n /** Custom actions to display in the header (between event selector and user menu) */\n headerActions?: React.ReactNode;\n /** Custom logo component (overrides default logo) */\n customLogo?: React.ReactNode;\n /** Custom user menu component (overrides default user menu) */\n customUserMenu?: React.ReactNode;\n /** Custom className for the header */\n headerClassName?: string;\n /** Show/hide user menu */\n showUserMenu?: boolean;\n /** Enable layout-level permission enforcement */\n enforcePermissions?: boolean;\n /** Default permission to check for all routes (when enforcePermissions is true) */\n defaultPermission?: Operation;\n /** Route-specific permissions mapping */\n routePermissions?: Record<string, Operation>;\n /** Fallback component to show when user lacks permission */\n permissionFallback?: React.ReactNode;\n /** Enable permission-based navigation filtering */\n filterNavigationByPermissions?: boolean;\n /** Custom permission page ID mapping */\n pageIdMapping?: Record<string, string>;\n \n // NEW: Phase 1 - Enhanced Security Features\n /** Enable strict mode to prevent bypassing permission checks (default: true) */\n strictMode?: boolean;\n /** Enable page-level permission enforcement (default: false) */\n enforcePagePermissions?: boolean;\n /** Default page permission fallback component */\n pagePermissionFallback?: React.ReactNode;\n /** Enable audit logging for all permission checks (default: true) */\n auditLog?: boolean;\n /** Callback when page access is denied */\n onPageAccessDenied?: (pageName: string, operation: string) => void;\n /** Callback when strict mode violation occurs */\n onStrictModeViolation?: (pageName: string, operation: string) => void;\n \n // NEW: Phase 2 - Enhanced Routing Features\n /** Enable role-based routing (default: false) */\n roleBasedRouting?: boolean;\n /** Route configuration for role-based routing */\n routeConfig?: Array<{\n path: string;\n component: React.ComponentType;\n permissions: string[];\n roles?: string[];\n accessLevel?: string;\n pageId?: string;\n strictMode?: boolean;\n meta?: {\n title?: string;\n description?: string;\n requiresAuth?: boolean;\n hidden?: boolean;\n };\n }>;\n /** Fallback route for unauthorized access */\n fallbackRoute?: string;\n /** Callback when route access is denied */\n onRouteAccessDenied?: (route: string, reason: string) => void;\n /** Callback when route strict mode violation occurs */\n onRouteStrictModeViolation?: (route: string, reason: string) => void;\n}\n\n/**\n * A consistent layout component for all PACE suite applications that provides a standard\n * structure with header, main content area, and footer.\n * \n * NEW: This component now includes layout-level permission enforcement to ensure\n * consuming apps can't forget to implement permission checks on individual pages.\n * \n * This component is designed to work with React Router's nested routing pattern using\n * Outlet to render child routes. It provides integrated authentication, navigation,\n * and user management functionality.\n * \n * Features:\n * - React Router v6 integration with nested routing\n * - Unified authentication integration\n * - Consistent header with navigation and user menu\n * - Flexible main content area with Outlet\n * - Footer with application branding\n * - User sign-out and password change functionality\n * - Responsive design and accessibility compliant\n * - Layout-level permission enforcement\n * - Permission-based navigation filtering\n * - Automatic page permission validation\n * \n * @example\n * Basic React Router setup with permission enforcement:\n * ```tsx\n * import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';\n * import { UnifiedAuthProvider } from '@jmruthers/pace-core/providers';\n * import { PaceAppLayout, PaceLoginPage } from '@jmruthers/pace-core';\n * \n * function App() {\n * return (\n * <UnifiedAuthProvider supabaseClient={supabase} appName=\"My App\">\n * <Router>\n * <Routes>\n * <Route path=\"/login\" element={<PaceLoginPage appName=\"My App\" />} />\n * <Route path=\"/\" element={\n * <PaceAppLayout \n * appName=\"My Application\"\n * enforcePermissions={true}\n * defaultPermission=\"read\"\n * />\n * }>\n * <Route index element={<HomePage />} />\n * <Route path=\"dashboard\" element={<DashboardPage />} />\n * <Route path=\"meals\" element={<MealsPage />} />\n * </Route>\n * </Routes>\n * </Router>\n * </UnifiedAuthProvider>\n * );\n * }\n * ```\n * \n * @example\n * Custom navigation items with permission filtering:\n * ```tsx\n * import { NavigationItem } from '@jmruthers/pace-core';\n * \n * function App() {\n * const customNavItems: NavigationItem[] = [\n * { id: 'components', label: 'Components', href: '/components', icon: 'Component' },\n * { id: 'styles', label: 'Styles', href: '/styles', icon: 'Palette' },\n * { id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }\n * ];\n * \n * return (\n * <Router>\n * <Routes>\n * <Route path=\"/\" element={\n * <PaceAppLayout \n * appName=\"My Custom App\" \n * navItems={customNavItems}\n * enforcePermissions={true}\n * filterNavigationByPermissions={true}\n * routePermissions={{\n * '/components': 'read',\n * '/styles': 'read',\n * '/meals': 'read'\n * }}\n * />\n * }>\n * <Route path=\"components\" element={<ComponentsPage />} />\n * <Route path=\"styles\" element={<StylesPage />} />\n * <Route path=\"meals\" element={<MealsPage />} />\n * </Route>\n * </Routes>\n * </Router>\n * );\n * }\n * ```\n * \n * @example\n * Route-specific permissions with custom page IDs:\n * ```tsx\n * function AdminApp() {\n * return (\n * <Router>\n * <Routes>\n * <Route path=\"/\" element={\n * <PaceAppLayout \n * appName=\"Admin Panel\"\n * enforcePermissions={true}\n * routePermissions={{\n * '/dashboard': 'read',\n * '/user-management': 'read',\n * '/system-settings': 'update'\n * }}\n * pageIdMapping={{\n * '/dashboard': 'dashboard',\n * '/user-management': 'user-management',\n * '/system-settings': 'system-admin'\n * }}\n * permissionFallback={<AccessDeniedPage />}\n * />\n * }>\n * <Route path=\"dashboard\" element={<DashboardPage />} />\n * <Route path=\"user-management\" element={<UserManagementPage />} />\n * <Route path=\"system-settings\" element={<SystemSettingsPage />} />\n * </Route>\n * </Routes>\n * </Router>\n * );\n * }\n * ```\n * \n * @param props - Layout configuration including app name for branding and permission settings\n * @returns React element with complete application layout structure and permission enforcement\n * \n * @since 0.1.0\n */\nexport function PaceAppLayout({ \n appName, \n navItems, \n showEventSelector,\n headerActions,\n customLogo,\n customUserMenu,\n headerClassName,\n showUserMenu = true,\n enforcePermissions = false,\n defaultPermission = 'read',\n routePermissions = {},\n permissionFallback,\n filterNavigationByPermissions = false,\n pageIdMapping = {},\n // NEW: Phase 1 - Enhanced Security Features\n strictMode = true,\n enforcePagePermissions = false,\n pagePermissionFallback,\n auditLog = true,\n onPageAccessDenied,\n onStrictModeViolation,\n // NEW: Phase 2 - Enhanced Routing Features\n roleBasedRouting = false,\n routeConfig = [],\n fallbackRoute = '/unauthorized',\n onRouteAccessDenied,\n onRouteStrictModeViolation\n}: PaceAppLayoutProps) {\n const { user, signOut, updatePassword } = useUnifiedAuth();\n const navigate = useNavigate();\n const location = useLocation();\n // Use the new RBAC system for permission checking\n const checkPermission = useMemo(() => {\n return async (permission: string, pageId?: string): Promise<boolean> => {\n try {\n // Use the imported RBAC API function\n \n if (!user?.id) return false;\n \n const scope = {\n organisationId: user.user_metadata?.organisationId || user.app_metadata?.organisationId,\n eventId: user.user_metadata?.eventId || user.app_metadata?.eventId,\n appId: user.user_metadata?.appId || user.app_metadata?.appId,\n };\n \n // Ensure we have at least organisationId for RBAC\n if (!scope.organisationId) {\n console.warn('No organisation context available for permission check, denying access');\n return false;\n }\n \n return await isPermitted({\n userId: user.id,\n scope,\n permission: permission as Permission,\n pageId\n });\n } catch (error) {\n console.error('Permission check failed:', error);\n // Let the error bubble up so it can be handled by the calling code\n throw error;\n }\n };\n }, [user]);\n\n // Permission enforcement state\n const [hasPermission, setHasPermission] = useState<boolean | null>(null);\n const [isCheckingPermission, setIsCheckingPermission] = useState(false);\n const [permissionError, setPermissionError] = useState<Error | null>(null);\n\n // Default navigation items if none provided\n const defaultNavItems: NavigationItem[] = useMemo(() => [\n { id: 'home', label: 'Home', href: '/', icon: 'Home' },\n { id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },\n { id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' },\n { id: 'ui-showcase', label: 'UI Showcase', href: '/ui-showcase', icon: 'Component' },\n { id: 'data-table-showcase', label: 'DataTable Showcase', href: '/data-table-showcase', icon: 'Table' },\n ], []);\n\n // Use provided navItems or fall back to default\n const baseMenuItems = useMemo(() => navItems || defaultNavItems, [navItems]);\n\n // Get current route permission requirements\n const currentRoutePermission = useMemo(() => {\n const currentPath = location.pathname;\n return routePermissions[currentPath] || defaultPermission;\n }, [location.pathname, routePermissions, defaultPermission]);\n\n // Get current page ID for permission checking\n const currentPageId = useMemo(() => {\n const currentPath = location.pathname;\n return pageIdMapping[currentPath] || currentPath.slice(1) || 'home';\n }, [location.pathname, pageIdMapping]);\n\n // Check permission for current route\n useEffect(() => {\n if (!enforcePermissions) {\n setHasPermission(true);\n return;\n }\n\n let isMounted = true;\n\n const checkRoutePermission = async () => {\n if (!isMounted) return;\n \n setIsCheckingPermission(true);\n setPermissionError(null);\n\n try {\n const hasAccess = await checkPermission(currentRoutePermission, currentPageId);\n \n if (!isMounted) return;\n \n setHasPermission(hasAccess);\n \n // NEW: Phase 1 - Enhanced Security Features\n // Log page access attempt for audit\n if (auditLog) {\n console.log(`[PaceAppLayout] Page access attempt:`, {\n pageName: currentPageId,\n operation: currentRoutePermission,\n userId: user?.id,\n allowed: hasAccess,\n strictMode,\n timestamp: new Date().toISOString()\n });\n }\n \n // Handle strict mode violations\n if (strictMode && !hasAccess) {\n console.error(`[PaceAppLayout] STRICT MODE VIOLATION: User attempted to access protected page without permission`, {\n pageName: currentPageId,\n operation: currentRoutePermission,\n userId: user?.id,\n timestamp: new Date().toISOString()\n });\n \n if (onStrictModeViolation) {\n onStrictModeViolation(currentPageId, currentRoutePermission);\n }\n }\n \n // Handle page access denied callback\n if (!hasAccess && onPageAccessDenied) {\n onPageAccessDenied(currentPageId, currentRoutePermission);\n }\n \n } catch (error) {\n if (!isMounted) return;\n \n console.error(`[PaceAppLayout] Permission check failed for ${currentPageId}:`, error);\n setPermissionError(error instanceof Error ? error : new Error('Permission check failed'));\n setHasPermission(false);\n } finally {\n if (isMounted) {\n setIsCheckingPermission(false);\n }\n }\n };\n\n checkRoutePermission();\n\n return () => {\n isMounted = false;\n };\n }, [enforcePermissions, currentRoutePermission, currentPageId, checkPermission, auditLog, strictMode, user?.id, onStrictModeViolation, onPageAccessDenied]);\n\n // Filter navigation items based on permissions\n const [filteredMenuItems, setFilteredMenuItems] = useState<NavigationItem[]>(baseMenuItems);\n\n useEffect(() => {\n if (!filterNavigationByPermissions || !enforcePermissions) {\n setFilteredMenuItems(baseMenuItems);\n return;\n }\n\n let isMounted = true;\n\n const filterItems = async () => {\n const filtered = await Promise.all(\n baseMenuItems.map(async (item) => {\n if (!item.href) return { item, hasAccess: true };\n \n const pageId = pageIdMapping[item.href] || item.href.slice(1) || 'home';\n const permission = routePermissions[item.href] || defaultPermission;\n \n try {\n const hasAccess = await checkPermission(permission, pageId);\n return { item, hasAccess };\n } catch {\n return { item, hasAccess: false };\n }\n })\n );\n\n if (!isMounted) return;\n\n const accessibleItems = filtered\n .filter(({ hasAccess }) => hasAccess)\n .map(({ item }) => item);\n\n setFilteredMenuItems(accessibleItems);\n };\n\n filterItems();\n\n return () => {\n isMounted = false;\n };\n }, [baseMenuItems, filterNavigationByPermissions, enforcePermissions, pageIdMapping, routePermissions, defaultPermission, checkPermission]);\n\n // NEW: Phase 2 - Enhanced Routing Features\n // Check route access for role-based routing\n useEffect(() => {\n if (!roleBasedRouting || routeConfig.length === 0) return;\n \n const currentPath = location.pathname;\n const currentRoute = routeConfig.find(route => route.path === currentPath);\n \n if (!currentRoute) {\n // Route not found in configuration\n if (strictMode) {\n console.error(`[PaceAppLayout] STRICT MODE VIOLATION: Route not found in configuration`, {\n route: currentPath,\n userId: user?.id,\n timestamp: new Date().toISOString()\n });\n \n if (onRouteStrictModeViolation) {\n onRouteStrictModeViolation(currentPath, 'Route not found in configuration');\n }\n }\n return;\n }\n \n // For now, allow all access - this will be enhanced with actual permission checking\n const hasAccess = true; // This will be replaced with actual permission checking\n \n if (!hasAccess) {\n // Handle route access denied\n if (onRouteAccessDenied) {\n onRouteAccessDenied(currentPath, 'Insufficient permissions');\n }\n \n if (strictMode) {\n console.error(`[PaceAppLayout] STRICT MODE VIOLATION: User attempted to access protected route without permission`, {\n route: currentPath,\n userId: user?.id,\n permissions: currentRoute.permissions,\n roles: currentRoute.roles,\n accessLevel: currentRoute.accessLevel,\n timestamp: new Date().toISOString()\n });\n \n if (onRouteStrictModeViolation) {\n onRouteStrictModeViolation(currentPath, 'Insufficient permissions');\n }\n }\n \n // Redirect to fallback route\n navigate(fallbackRoute, { replace: true });\n }\n \n // Log route access attempt for audit\n if (auditLog) {\n console.log(`[PaceAppLayout] Route access attempt:`, {\n route: currentPath,\n userId: user?.id,\n allowed: hasAccess,\n permissions: currentRoute.permissions,\n roles: currentRoute.roles,\n accessLevel: currentRoute.accessLevel,\n timestamp: new Date().toISOString()\n });\n }\n }, [roleBasedRouting, routeConfig, location.pathname, strictMode, user?.id, onRouteStrictModeViolation, onRouteAccessDenied, navigate, fallbackRoute, auditLog]);\n\n const handleSignOut = async () => {\n await signOut();\n };\n\n const handleChangePassword = async (newPassword: string) => {\n // The form component in UserMenu already checks for matching passwords\n const result = await updatePassword(newPassword);\n if (result?.error) {\n // The form will display the error message\n console.error('Failed to change password:', result.error.message);\n }\n // The form will handle closing the modal on success\n return result || { error: null };\n };\n\n // Show loading state while checking permissions\n if (enforcePermissions && isCheckingPermission) {\n return (\n <div className=\"flex items-center justify-center min-h-screen\">\n <div className=\"text-center\">\n <div className=\"animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900 mx-auto mb-4\"></div>\n <p className=\"text-gray-600\">Checking permissions...</p>\n </div>\n </div>\n );\n }\n\n // Show permission error\n if (enforcePermissions && permissionError) {\n return (\n <div className=\"flex items-center justify-center min-h-screen\">\n <div className=\"text-center\">\n <h2 className=\"text-xl font-semibold text-red-600 mb-2\">Permission Error</h2>\n <p className=\"text-gray-600 mb-4\">{permissionError.message}</p>\n <Button onClick={() => navigate('/')}>Go Home</Button>\n </div>\n </div>\n );\n }\n\n // Show permission fallback if user lacks permission\n if (enforcePermissions && hasPermission === false) {\n // NEW: Phase 1 - Use page permission fallback if available\n if (enforcePagePermissions && pagePermissionFallback) {\n return <>{pagePermissionFallback}</>;\n }\n \n if (permissionFallback) {\n return <>{permissionFallback}</>;\n }\n \n return (\n <div className=\"flex items-center justify-center min-h-screen\">\n <div className=\"text-center\">\n <h2 className=\"text-xl font-semibold text-red-600 mb-2\">Access Denied</h2>\n <p className=\"text-gray-600 mb-4\">\n You don't have permission to access this page.\n </p>\n <Button onClick={() => navigate('/')}>Go Home</Button>\n </div>\n </div>\n );\n }\n\n return (\n <>\n <Header\n logo={customLogo || undefined}\n logoUrl={!customLogo ? `/${appName.toLowerCase()}_logo_wide.svg` : undefined}\n logoAlt={`${appName} Logo`}\n navItems={filteredMenuItems}\n actions={headerActions}\n userMenu={customUserMenu}\n user={user}\n onSignOut={handleSignOut}\n onChangePassword={handleChangePassword}\n currentPath={window.location.pathname}\n onNavigate={(item) => {\n if (item.href) {\n navigate(item.href);\n }\n }}\n showEventSelector={showEventSelector}\n showUserMenu={showUserMenu}\n className={headerClassName || \"sticky top-0 z-[40] w-full\"}\n />\n <main className=\"px-4 w-[min(var(--app-width),100%)] mx-auto py-8\">\n <Outlet />\n </main>\n <Footer />\n </>\n );\n} ","/**\n * @file PACE Login Page Component\n * @package @jmruthers/pace-core\n * @module Components/PaceLoginPage\n * @since 0.1.0\n *\n * A comprehensive login page component that provides a consistent authentication\n * experience for all PACE suite applications with role-based redirection and\n * enhanced error handling.\n *\n * Features:\n * - Consistent login page layout\n * - Unified authentication integration\n * - Role-based automatic redirection (admin users)\n * - Manual redirection for all successful logins\n * - Customizable app branding\n * - Configurable redirect paths\n * - Enhanced error handling and display\n * - Dual loading state management (auth + form)\n * - Navigation error recovery\n * - Responsive design\n * - Accessibility compliant\n * - Integration with LoginForm\n * - React Router navigation\n * - Centered layout design\n * - Error persistence and display\n *\n * @example\n * ```tsx\n * // Basic login page\n * <PaceLoginPage appName=\"My Application\" />\n * \n * // Login page with custom redirect\n * <PaceLoginPage\n * appName=\"Dashboard App\"\n * onSuccessRedirectPath=\"/dashboard\"\n * />\n * \n * // Login page in router setup\n * <Router>\n * <Routes>\n * <Route path=\"/login\" element={\n * <PaceLoginPage \n * appName=\"My App\"\n * onSuccessRedirectPath=\"/home\"\n * />\n * } />\n * <Route path=\"/home\" element={<HomePage />} />\n * </Routes>\n * </Router>\n * \n * // Login page with authentication provider\n * <UnifiedAuthProvider supabaseClient={supabase} appName=\"My App\">\n * <Router>\n * <Routes>\n * <Route path=\"/login\" element={\n * <PaceLoginPage appName=\"My Application\" />\n * } />\n * <Route path=\"/\" element={<PaceAppLayout appName=\"My Application\" />}>\n * <Route index element={<HomePage />} />\n * </Route>\n * </Routes>\n * </Router>\n * </UnifiedAuthProvider>\n * \n * // Login page with role-based access control\n * function App() {\n * return (\n * <UnifiedAuthProvider supabaseClient={supabase} appName=\"Admin Portal\">\n * <Router>\n * <Routes>\n * <Route path=\"/login\" element={\n * <PaceLoginPage \n * appName=\"Admin Portal\"\n * onSuccessRedirectPath=\"/admin/dashboard\"\n * />\n * } />\n * <Route path=\"/admin/*\" element={<AdminRoutes />} />\n * </Routes>\n * </Router>\n * </UnifiedAuthProvider>\n * );\n * }\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper semantic HTML structure\n * - Screen reader friendly\n * - Keyboard navigation support\n * - Focus management\n * - High contrast support\n * - Clear page hierarchy\n * - Accessible form elements\n * - Error announcements\n *\n * @routing\n * - React Router v6 integration\n * - Automatic navigation on success\n * - Role-based redirect logic (admin users)\n * - Configurable redirect paths\n * - Replace navigation for login flow\n * - Navigation error handling\n *\n * @authentication\n * - Integration with UnifiedAuthProvider\n * - Role detection via hasRole('admin')\n * - Loading state management\n * - Error state handling\n * - Session validation\n * - Automatic redirect prevention loops\n *\n * @dependencies\n * - React 18+ - Hooks and effects\n * - React Router v6 - Navigation\n * - UnifiedAuthProvider - Authentication\n * - LoginForm component\n * - Button component\n * - Input component\n * - Label component\n * - Tailwind CSS - Styling\n */\n\nimport React, { useEffect, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useUnifiedAuth } from '../../providers';\nimport { LoginForm } from '../LoginForm';\nimport { Button, Input, Label } from '..';\n\nexport interface PaceLoginPageProps {\n /** The name of the application to be displayed on the login form. */\n appName: string;\n /** The path to redirect to upon successful login. Defaults to `/`. */\n onSuccessRedirectPath?: string;\n}\n\n/**\n * A consistent, reusable login page for all PACE suite applications.\n * It handles the sign-in logic with role-based automatic redirection for admin users,\n * enhanced error handling, and dual loading state management.\n * \n * Recent enhancements:\n * - Role-based redirection: Admin users are automatically redirected\n * - Enhanced error handling with navigation error recovery\n * - Dual loading states: auth loading + form submission loading\n * - Error persistence: Auth errors are displayed below the form\n * - Navigation safety: Try-catch blocks prevent navigation errors\n * \n * @param props - Login page configuration including app name and redirect path\n * @returns JSX.Element - The rendered login page with enhanced functionality\n * \n * @example\n * ```tsx\n * <PaceLoginPage \n * appName=\"My Application\" \n * onSuccessRedirectPath=\"/dashboard\" \n * />\n * ```\n */\nexport const PaceLoginPage: React.FC<PaceLoginPageProps> = ({\n appName = 'Pace',\n onSuccessRedirectPath = '/'\n}) => {\n const { signIn, isAuthenticated, isLoading, authError, hasRole } = useUnifiedAuth();\n const navigate = useNavigate();\n const [isSigningIn, setIsSigningIn] = useState(false);\n\n useEffect(() => {\n // Only redirect super admin users automatically\n if (isAuthenticated && !isLoading && hasRole('super_admin')) {\n try {\n navigate(onSuccessRedirectPath, { replace: true });\n } catch (error) {\n console.error('Navigation error:', error);\n }\n }\n }, [isAuthenticated, isLoading, navigate, onSuccessRedirectPath, hasRole]);\n\n const handleSubmit = async (data: { email: string; password: string }) => {\n setIsSigningIn(true);\n try {\n const { error } = await signIn(data.email, data.password);\n\n if (!error) {\n try {\n navigate(onSuccessRedirectPath, { replace: true });\n } catch (navError) {\n console.error('Navigation error after sign-in:', navError);\n }\n }\n } finally {\n setIsSigningIn(false);\n }\n };\n\n return (\n <main className=\"min-h-screen grid mx-auto w-fit content-center justify-items-center gap-y-8\">\n <img\n src={`/${appName.toLowerCase()}_logo_square.svg`}\n alt={`${appName} logo`}\n className=\"h-48\"\n />\n\n <LoginForm className=\"w-md\"\n onSignIn={handleSubmit}\n appName={appName}\n isLoading={isSigningIn}\n onError={(error) => {\n // LoginForm will handle display of the error\n console.error('Login error:', error);\n }}\n />\n {authError && (\n <em className=\"mt-4 text-destructive text-center\">\n {authError.message}\n </em>\n )}\n\n </main>\n );\n} ","/**\n * @file Error Boundary Component\n * @package @jmruthers/pace-core\n * @module Components/ErrorBoundary\n * @since 0.1.0\n *\n * A comprehensive error boundary component that catches JavaScript errors in child components\n * and provides fallback UI with retry functionality and error reporting.\n *\n * Features:\n * - Catches JavaScript errors in component tree\n * - Custom fallback UI with retry functionality\n * - Error reporting and logging\n * - Performance monitoring integration\n * - Retry mechanism with configurable attempts\n * - Development mode error details\n * - Accessibility compliant error display\n * - Component-specific error tracking\n * - Error ID generation for tracking\n *\n * @example\n * ```tsx\n * // Basic error boundary\n * <ErrorBoundary>\n * <MyComponent />\n * </ErrorBoundary>\n * \n * // Error boundary with custom fallback\n * <ErrorBoundary\n * componentName=\"UserProfile\"\n * fallback={<div>Something went wrong loading the profile.</div>}\n * onError={(error, errorInfo, errorId) => {\n * console.log('Error caught:', errorId, error);\n * }}\n * >\n * <UserProfile />\n * </ErrorBoundary>\n * \n * // Error boundary with retry functionality\n * <ErrorBoundary\n * componentName=\"DataTable\"\n * maxRetries={3}\n * enableRetry={true}\n * enableReporting={true}\n * onError={(error, errorInfo, errorId) => {\n * // Send to error reporting service\n * errorReportingService.report({ error, errorInfo, errorId });\n * }}\n * >\n * <DataTable data={data} />\n * </ErrorBoundary>\n * \n * // Wrapping multiple components\n * <ErrorBoundary componentName=\"App\">\n * <Header />\n * <ErrorBoundary componentName=\"MainContent\">\n * <MainContent />\n * </ErrorBoundary>\n * <Footer />\n * </ErrorBoundary>\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper ARIA role=\"alert\" for error announcements\n * - Screen reader friendly error messages\n * - Keyboard accessible retry buttons\n * - High contrast error styling\n * - Clear error identification\n *\n * @performance\n * - Efficient error state management\n * - Performance monitoring integration\n * - Minimal impact on normal rendering\n * - Configurable error reporting\n *\n * @dependencies\n * - React 18+ - Component lifecycle\n * - Performance monitoring utilities\n * - Tailwind CSS - Styling\n */\n\nimport React, { Component, ReactNode } from 'react';\nimport { performanceBudgetMonitor } from '../../utils/performanceBudgets';\n\n/**\n * State interface for the ErrorBoundary component\n * @public\n */\nexport interface ErrorBoundaryState {\n /** Whether an error has been caught */\n hasError: boolean;\n /** The error that was caught */\n error?: Error;\n /** Additional error information from React */\n errorInfo?: React.ErrorInfo;\n /** Unique identifier for the error */\n errorId?: string;\n /** Number of retry attempts made */\n retryCount: number;\n}\n\n/**\n * Props interface for the ErrorBoundary component\n * @public\n */\nexport interface ErrorBoundaryProps {\n /** Child components to wrap with error boundary */\n children: ReactNode;\n /** Name of the component for error reporting */\n componentName?: string;\n /** Custom fallback UI to display when error occurs */\n fallback?: ReactNode;\n /** Callback function called when an error is caught */\n onError?: (error: Error, errorInfo: React.ErrorInfo, errorId: string) => void;\n /** Maximum number of retry attempts */\n maxRetries?: number;\n /** Whether to enable retry functionality */\n enableRetry?: boolean;\n /** Whether to enable error reporting */\n enableReporting?: boolean;\n}\n\n/**\n * ErrorBoundary component\n * Catches JavaScript errors in child components and provides fallback UI\n * \n * @example\n * ```tsx\n * <ErrorBoundary\n * componentName=\"MyComponent\"\n * maxRetries={3}\n * onError={(error, errorInfo, errorId) => {\n * console.log('Error caught:', errorId);\n * }}\n * >\n * <MyComponent />\n * </ErrorBoundary>\n * ```\n */\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n private retryTimeoutId: NodeJS.Timeout | null = null;\n\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { \n hasError: false, \n retryCount: 0 \n };\n }\n\n static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState> {\n const errorId = `error_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n return { \n hasError: true, \n error,\n errorId \n };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n const { componentName = 'Unknown Component', onError, enableReporting = true } = this.props;\n const errorId = this.state.errorId!;\n \n this.setState({ errorInfo });\n \n // Enhanced logging with component name and error ID\n console.error(`ErrorBoundary [${componentName}] caught error ${errorId}:`, error, errorInfo);\n \n // Performance monitoring - track error occurrence\n performanceBudgetMonitor.measure('ERROR_BOUNDARY_TRIGGER', 1, {\n componentName,\n errorId,\n errorMessage: error.message,\n stack: error.stack?.substring(0, 200), // Truncated stack trace\n });\n\n // Report error if enabled\n if (enableReporting) {\n this.reportError(errorId, componentName);\n }\n \n // Call custom error handler if provided\n if (onError) {\n onError(error, errorInfo, errorId);\n }\n }\n\n private reportError = (errorId: string, componentName: string) => {\n // In production, this would send to error reporting service\n if (process.env.NODE_ENV === 'production') {\n // Example: Send to error reporting service\n // errorReportingService.report({ error, errorInfo, errorId, componentName });\n console.warn('Error reporting would be triggered in production:', { errorId, componentName });\n }\n };\n\n private handleRetry = () => {\n const { maxRetries = 3 } = this.props;\n const { retryCount } = this.state;\n\n if (retryCount < maxRetries) {\n console.log(`Retrying component render (attempt ${retryCount + 1}/${maxRetries})`);\n \n this.setState(prevState => ({\n hasError: false,\n error: undefined,\n errorInfo: undefined,\n errorId: undefined,\n retryCount: prevState.retryCount + 1\n }));\n }\n };\n\n componentWillUnmount() {\n if (this.retryTimeoutId) {\n clearTimeout(this.retryTimeoutId);\n }\n }\n\n render() {\n if (this.state.hasError) {\n const { \n componentName = 'Component', \n fallback, \n enableRetry = true, \n maxRetries = 3 \n } = this.props;\n const { retryCount, errorId } = this.state;\n\n // Use custom fallback if provided\n if (fallback) {\n return fallback;\n }\n\n // Enhanced error UI with retry functionality\n return (\n <div \n role=\"alert\" \n className=\"p-6 bg-destructive/10 border border-destructive/20 rounded-lg\"\n data-error-boundary={errorId}\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"flex-shrink-0\">\n <svg className=\"w-5 h-5 text-destructive\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n <path fillRule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z\" clipRule=\"evenodd\" />\n </svg>\n </div>\n <div className=\"flex-1 min-w-0\">\n <h3 className=\"text-destructive\">\n Error in {componentName}\n </h3>\n <p className=\"text-destructive/80\">\n {this.state.error?.message || 'An unexpected error occurred.'}\n </p>\n \n {enableRetry && retryCount < maxRetries && (\n <div className=\"flex gap-3 mb-4\">\n <button\n onClick={this.handleRetry}\n className=\"px-4 py-2 bg-destructive text-destructive-foreground rounded-md hover:bg-destructive/90 transition-colors text-sm font-medium\"\n >\n Retry ({retryCount + 1}/{maxRetries})\n </button>\n <button\n onClick={() => window.location.reload()}\n className=\"px-4 py-2 bg-app-sec-600 text-app-main-50 rounded-md hover:bg-app-sec-700 transition-colors text-sm font-medium\"\n >\n Reload Page\n </button>\n </div>\n )}\n\n {retryCount >= maxRetries && (\n <div className=\"mb-4 p-3 bg-app-acc-50 border border-app-acc-200 rounded-md\">\n <p className=\"text-app-acc-800\">\n Maximum retry attempts reached. Please reload the page or contact support.\n </p>\n <button\n onClick={() => window.location.reload()}\n className=\"mt-2 px-3 py-1 bg-app-acc-600 text-app-main-50 rounded text-sm hover:bg-app-acc-700\"\n >\n Reload Page\n </button>\n </div>\n )}\n\n {process.env.NODE_ENV === 'development' && this.state.error && (\n <details className=\"text-sm text-destructive/70\">\n <summary className=\"cursor-pointer font-medium mb-2\">\n Error Details (Development)\n </summary>\n <div className=\"bg-destructive/5 p-3 rounded border\">\n <p className=\"font-mono\">Error ID: {errorId}</p>\n <pre className=\"whitespace-pre-wrap text-xs overflow-auto max-h-32\">\n {this.state.error.toString()}\n {this.state.errorInfo?.componentStack}\n </pre>\n </div>\n </details>\n )}\n </div>\n </div>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n","/**\n * @file Organisation Selector Component\n * @package @jmruthers/pace-core\n * @module Components/OrganisationSelector\n * @since 0.4.0\n *\n * A secure organisation selector component that allows users to switch between organisations\n * they have access to. Includes role display and security validation.\n *\n * Features:\n * - Secure organisation switching with validation\n * - Role display for each organisation\n * - Real-time organisation validation\n * - Accessible dropdown interface\n * - Error handling for security violations\n * - Loading states and feedback\n * - Integration with OrganisationProvider\n *\n * @example\n * ```tsx\n * // Basic organisation selector\n * <OrganisationSelector \n * onOrganisationChange={(org) => console.log('Switched to:', org.display_name)}\n * />\n * \n * // Compact version for header\n * <OrganisationSelector \n * className=\"w-48\" \n * compact={true}\n * showRole={true}\n * />\n * \n * // With custom placeholder\n * <OrganisationSelector \n * placeholder=\"Choose organisation...\"\n * showNoOrganisationsMessage={true}\n * />\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Keyboard navigation support\n * - Screen reader friendly\n * - Focus management\n * - ARIA labels and descriptions\n * - High contrast support\n *\n * @security\n * - Validates user access to organisations\n * - Prevents switching to unauthorised organisations\n * - Error handling for security violations\n * - Real-time access validation\n * - Secure organisation data handling\n */\n\nimport React, { useState, useCallback } from 'react';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../Select';\nimport { Alert, AlertDescription } from '../Alert/Alert';\nimport { Button } from '../Button/Button';\nimport { LoadingSpinner } from '../LoadingSpinner/LoadingSpinner';\nimport { RefreshCw, AlertCircle, Building2, Shield } from 'lucide-react';\nimport { useOrganisations } from '../../providers/OrganisationProvider';\nimport type { Organisation } from '../../types/organisation';\n\nexport interface OrganisationSelectorProps {\n /** Placeholder text for the dropdown */\n placeholder?: string;\n /** Additional CSS classes */\n className?: string;\n /** Callback fired when organisation changes, providing full organisation object */\n onOrganisationChange?: (org: Organisation) => void;\n /** Show friendly message when no organisations available */\n showNoOrganisationsMessage?: boolean;\n /** Show retry button on errors */\n showRetryButton?: boolean;\n /** Show user's role in each organisation */\n showRole?: boolean;\n /** Compact display mode */\n compact?: boolean;\n /** Disabled state */\n disabled?: boolean;\n}\n\n/**\n * OrganisationSelector component for secure organisation switching\n * \n * This component provides secure organisation selection with:\n * - User membership validation\n * - Role-based access display\n * - Security error handling\n * - Real-time organisation switching\n * - Accessible interface design\n * \n * Security: Only shows organisations the user has valid access to\n */\nexport function OrganisationSelector({\n placeholder = \"Select organisation\",\n className,\n onOrganisationChange,\n showNoOrganisationsMessage = true,\n showRetryButton = true,\n showRole = false,\n compact = false,\n disabled = false\n}: OrganisationSelectorProps) {\n const [isLoading, setIsLoading] = useState(false);\n const [switchError, setSwitchError] = useState<string | null>(null);\n \n const { \n organisations, \n selectedOrganisation, \n isLoading: orgLoading,\n error: orgError,\n switchOrganisation,\n getUserRole,\n validateOrganisationAccess,\n refreshOrganisations\n } = useOrganisations();\n\n\n const handleOrganisationChange = useCallback(async (orgId: string) => {\n if (disabled || isLoading) return;\n \n setSwitchError(null);\n setIsLoading(true);\n \n try {\n // Validate access before attempting switch\n if (!validateOrganisationAccess(orgId)) {\n throw new Error('You do not have access to this organisation');\n }\n \n await switchOrganisation(orgId);\n \n const newOrganisation = organisations.find(org => org.id === orgId);\n if (newOrganisation && onOrganisationChange) {\n onOrganisationChange(newOrganisation);\n }\n \n console.log(\"[OrganisationSelector] Successfully switched to organisation:\", orgId);\n } catch (error) {\n console.error(\"[OrganisationSelector] Failed to switch organisation:\", error);\n setSwitchError(error instanceof Error ? error.message : 'Failed to switch organisation');\n } finally {\n setIsLoading(false);\n }\n }, [\n disabled, \n isLoading, \n validateOrganisationAccess, \n switchOrganisation, \n organisations, \n onOrganisationChange\n ]);\n\n const handleRetry = useCallback(async () => {\n setIsLoading(true);\n setSwitchError(null);\n try {\n await refreshOrganisations();\n } catch (error) {\n console.error(\"[OrganisationSelector] Failed to refresh organisations:\", error);\n setSwitchError('Failed to refresh organisations');\n } finally {\n setIsLoading(false);\n }\n }, [refreshOrganisations]);\n\n // Loading state\n if (orgLoading) {\n return (\n <div className={`flex items-center gap-2 ${className}`}>\n <LoadingSpinner size=\"sm\" />\n <span className=\"text-sm text-muted-foreground\">\n {compact ? \"Loading...\" : \"Loading organisations...\"}\n </span>\n </div>\n );\n }\n\n // Error state\n if (orgError) {\n return (\n <div className={`space-y-2 ${className}`}>\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>\n Failed to load organisations: {orgError.message}\n </AlertDescription>\n </Alert>\n {showRetryButton && (\n <Button \n variant=\"outline\" \n size=\"sm\" \n onClick={handleRetry}\n disabled={isLoading}\n className=\"w-full\"\n >\n <RefreshCw className={`h-4 w-4 mr-2 ${isLoading ? 'animate-spin' : ''}`} />\n Retry\n </Button>\n )}\n </div>\n );\n }\n\n // No organisations available\n if (organisations.length === 0) {\n if (showNoOrganisationsMessage) {\n return (\n <div className={`space-y-2 ${className}`}>\n <Alert>\n <Building2 className=\"h-4 w-4\" />\n <AlertDescription>\n No organisations available. Please contact your administrator to be added to an organisation.\n </AlertDescription>\n </Alert>\n {showRetryButton && (\n <Button \n variant=\"outline\" \n size=\"sm\" \n onClick={handleRetry}\n disabled={isLoading}\n className=\"w-full\"\n >\n <RefreshCw className={`h-4 w-4 mr-2 ${isLoading ? 'animate-spin' : ''}`} />\n Check Again\n </Button>\n )}\n </div>\n );\n }\n return null;\n }\n\n // Switch error display\n const switchErrorDisplay = switchError && (\n <Alert variant=\"destructive\" className=\"mt-2\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{switchError}</AlertDescription>\n </Alert>\n );\n\n // Normal selector state\n return (\n <div className={`space-y-2 ${className}`}>\n <Select \n value={selectedOrganisation.id}\n onValueChange={handleOrganisationChange}\n disabled={disabled || isLoading}\n >\n <SelectTrigger className={`${isLoading ? 'opacity-50' : ''}`}>\n <div className=\"flex items-center gap-2\">\n {isLoading ? (\n <LoadingSpinner size=\"sm\" />\n ) : (\n <Building2 className=\"h-4 w-4 text-muted-foreground\" />\n )}\n <SelectValue placeholder={placeholder} />\n </div>\n </SelectTrigger>\n <SelectContent>\n {organisations.map((org) => {\n const userRole = getUserRole(org.id);\n const hasAccess = validateOrganisationAccess(org.id);\n \n return (\n <SelectItem \n key={org.id} \n value={org.id}\n disabled={!hasAccess}\n className={!hasAccess ? 'opacity-50' : ''}\n >\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex items-center gap-2\">\n <Building2 className=\"h-4 w-4\" />\n <div className=\"flex flex-col\">\n <span className=\"font-medium\">{org.display_name}</span>\n {!compact && org.description && (\n <span className=\"text-xs text-muted-foreground truncate max-w-40\">\n {org.description}\n </span>\n )}\n </div>\n </div>\n {showRole && (\n <div className=\"flex items-center gap-1 ml-4\">\n <Shield className=\"h-3 w-3 text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground capitalize\">\n {userRole.replace('_', ' ')}\n </span>\n </div>\n )}\n </div>\n </SelectItem>\n );\n })}\n </SelectContent>\n </Select>\n \n {switchErrorDisplay}\n </div>\n );\n} ","/**\n * @file Password Reset Form Component\n * @package @jmruthers/pace-core\n * @module Components/PasswordReset\n * @since 0.1.0\n *\n * A comprehensive password reset form component that handles email-based password recovery\n * with proper validation, loading states, and success feedback.\n *\n * Features:\n * - Email validation and submission\n * - Loading states with disabled form\n * - Success state with confirmation message\n * - Error handling and display\n * - Resend functionality\n * - Accessibility compliant\n * - Responsive design\n * - Integration with UnifiedAuthProvider\n * - Form validation\n * - Success and error callbacks\n *\n * @example\n * ```tsx\n * // Basic password reset form\n * <PasswordResetForm\n * onSuccess={() => {\n * toast.success('Password reset email sent!');\n * }}\n * onError={(error) => {\n * toast.error(`Failed to send reset email: ${error.message}`);\n * }}\n * />\n * \n * // Password reset form with custom styling\n * <PasswordResetForm\n * className=\"max-w-md mx-auto p-6 bg-app-main-50 rounded-lg shadow-md\"\n * onSuccess={() => {\n * console.log('Reset email sent successfully');\n * navigate('/check-email');\n * }}\n * onError={(error) => {\n * console.error('Password reset failed:', error);\n * }}\n * />\n * \n * // Password reset form in a modal\n * <Modal isOpen={showResetForm} onClose={() => setShowResetForm(false)}>\n * <ModalContent>\n * <PasswordResetForm\n * onSuccess={() => {\n * setShowResetForm(false);\n * toast.success('Check your email for reset instructions');\n * }}\n * onError={(error) => {\n * toast.error(error.message);\n * }}\n * />\n * </ModalContent>\n * </Modal>\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Proper form labels and associations\n * - Screen reader friendly error messages\n * - Keyboard navigation support\n * - Focus management\n * - High contrast support\n * - Clear error identification\n * - Role=\"alert\" for error announcements\n *\n * @dependencies\n * - React 18+ - Hooks and state\n * - UnifiedAuthProvider - Authentication context\n * - Button component\n * - Input component\n * - Label component\n * - Tailwind CSS - Styling\n */\n\nimport React, { useState } from 'react';\nimport { Button } from '../Button/Button';\nimport { Input } from '../Input/Input';\nimport { Label } from '../Label';\nimport { cn } from '../../utils/cn';\nimport { useUnifiedAuth } from '../../providers/UnifiedAuthProvider';\n\nexport interface PasswordResetFormProps {\n onSuccess?: () => void;\n onError?: (error: Error) => void;\n className?: string;\n}\n\nexport function PasswordResetForm({\n onSuccess,\n onError,\n className\n}: PasswordResetFormProps) {\n const { resetPassword } = useUnifiedAuth();\n const [email, setEmail] = useState('');\n const [isLoading, setIsLoading] = useState(false);\n const [isSuccess, setIsSuccess] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n \n if (!email.trim()) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n const { error: resetError } = await resetPassword(email);\n \n if (resetError) {\n const errorObj = new Error(resetError.message || 'Failed to send reset email');\n setError(errorObj.message);\n onError?.(errorObj);\n } else {\n setIsSuccess(true);\n onSuccess?.();\n }\n } catch (err) {\n const errorObj = err instanceof Error ? err : new Error('An unexpected error occurred');\n setError(errorObj.message);\n onError?.(errorObj);\n } finally {\n setIsLoading(false);\n }\n };\n\n const handleSendAnother = () => {\n setIsSuccess(false);\n setError(null);\n };\n\n if (isSuccess) {\n return (\n <div className={cn('', className)} role=\"form\">\n <div className=\"space-y-4 text-center\">\n <h2>Check your email</h2>\n <p className=\"text-app-sec-600\">\n We have sent a password reset link to {email}\n </p>\n <Button \n variant=\"outline\" \n onClick={handleSendAnother}\n className=\"w-full\"\n >\n Send another email\n </Button>\n </div>\n </div>\n );\n }\n\n return (\n <div className={cn('', className)} role=\"form\">\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <h2>Reset Password</h2>\n <p className=\"text-app-sec-600\">\n Enter your email address and we'll send you a reset link.\n </p>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"email\">Email Address</Label>\n <Input\n id=\"email\"\n type=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n placeholder=\"Enter your email\"\n required\n disabled={isLoading}\n />\n </div>\n\n {error && (\n <div className=\"text-sm text-destructive\" role=\"alert\">\n {error}\n </div>\n )}\n\n <Button\n type=\"submit\"\n className=\"w-full\"\n disabled={!email.trim() || isLoading}\n >\n {isLoading ? 'Sending...' : 'Send Reset Link'}\n </Button>\n </form>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,YAAY,WAAW;AAmCrB;AAtBF,SAAS,eAAe,UAAgC,WAAW,OAA0B,WAAmB;AAC9G,QAAM,cAAc;AAEpB,QAAM,iBAAiB;AAAA,IACrB,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAEA,QAAM,cAAc;AAAA,IAClB,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,SAAO,GAAG,WAAW,IAAI,eAAe,OAAO,CAAC,IAAI,YAAY,IAAI,CAAC;AACvE;AAEA,IAAM,OAAa,iBAGjB,CAAC,EAAE,WAAW,SAAS,MAAM,GAAG,MAAM,GAAG,QACzC;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,eAAe,SAAS,IAAI;AAAA,MAC5B;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,KAAK,cAAc;AAEnB,IAAM,aAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,WAAW,cAAc;AAEzB,IAAM,YAAkB,iBAGtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,UAAU,cAAc;AAExB,IAAM,kBAAwB,iBAG5B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AAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,UAAU,CAAC,MAAM,KAAK,KAAK;AAAA,UAE1B,sBAAY,eAAe;AAAA;AAAA,MAC9B;AAAA,OACF;AAAA,KACF,GACF;AAEJ;","names":["React","jsx","React","jsx","React","jsx","React","jsx","React","jsx","jsx","React","useMemo","jsx","jsxs","React","useMemo","useMemo","jsx","jsxs","useState","jsx","jsxs","useState","React","useCallback","useMemo","useState","jsx","jsxs","React","UserMenu","useState","useMemo","useCallback","UserMenuLoading","React","ChevronDown","jsx","jsxs","ChevronDown","jsx","jsxs","React","Fragment","jsx","jsxs","React","useState","useEffect","useMemo","Fragment","jsx","jsxs","useMemo","useState","useEffect","useEffect","useState","useNavigate","jsx","jsxs","useNavigate","useState","useEffect","jsx","jsxs","useState","useCallback","RefreshCw","AlertCircle","jsx","jsxs","useState","useCallback","AlertCircle","RefreshCw","useState","jsx","jsxs","useState"]}
|