@jmruthers/pace-core 0.5.87 → 0.5.89
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/dist/{AuthService-Df3IozMG.d.ts → AuthService-DcTI5Ov4.d.ts} +9 -0
- package/dist/{DataTable-FA6EUX5M.js → DataTable-PWBMKMOG.js} +7 -7
- package/dist/{PublicLoadingSpinner-DecuJBX0.d.ts → PublicLoadingSpinner-BQXD1fbO.d.ts} +160 -130
- package/dist/{UnifiedAuthProvider-K2IZAY5F.js → UnifiedAuthProvider-5D3HEQND.js} +4 -4
- package/dist/{UnifiedAuthProvider-B391Aqum.d.ts → UnifiedAuthProvider-BVKmQd9u.d.ts} +4 -0
- package/dist/auth-DReDSLq9.d.ts +16 -0
- package/dist/{chunk-CBSD3BZ3.js → chunk-3RZBKQ5Y.js} +2 -6
- package/dist/{chunk-CBSD3BZ3.js.map → chunk-3RZBKQ5Y.js.map} +1 -1
- package/dist/{chunk-NTW3KGS4.js → chunk-6UHXQH7P.js} +5 -5
- package/dist/{chunk-ZFLOV3OM.js → chunk-7VJDS5QD.js} +401 -16
- package/dist/chunk-7VJDS5QD.js.map +1 -0
- package/dist/{chunk-YVUZWLQG.js → chunk-AQGF5OG7.js} +3 -3
- package/dist/{chunk-CVMVPYAL.js → chunk-BDZUMRBD.js} +3 -5
- package/dist/chunk-BDZUMRBD.js.map +1 -0
- package/dist/{chunk-KAY3K5TP.js → chunk-BNXBJOGL.js} +4 -4
- package/dist/{chunk-S3JKDMD5.js → chunk-CXKMRKRF.js} +4 -4
- package/dist/{chunk-5BN3YGNK.js → chunk-DP5X5ORK.js} +217 -27
- package/dist/chunk-DP5X5ORK.js.map +1 -0
- package/dist/{chunk-RIXPZJUB.js → chunk-KTPG5VCH.js} +2 -2
- package/dist/{chunk-2FQEQUJT.js → chunk-KWICIQVK.js} +4 -4
- package/dist/{chunk-WUXCWRL6.js → chunk-XJ2HZOBU.js} +6 -1
- package/dist/chunk-XJ2HZOBU.js.map +1 -0
- package/dist/{chunk-I7O3RSMN.js → chunk-YWAFPVJA.js} +1298 -769
- package/dist/chunk-YWAFPVJA.js.map +1 -0
- package/dist/{chunk-I2VVV5PQ.js → chunk-YY4YYM3E.js} +2 -2
- package/dist/components.d.ts +6 -55
- package/dist/components.js +24 -205
- package/dist/components.js.map +1 -1
- package/dist/{file-reference-9xUOnwyt.d.ts → file-reference-C9isKNPn.d.ts} +67 -2
- package/dist/hooks.js +9 -8
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +152 -26
- package/dist/index.js +64 -194
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +5 -3
- package/dist/providers.js +3 -3
- package/dist/rbac/index.js +8 -8
- package/dist/types.d.ts +2 -1
- package/dist/types.js +3 -3
- package/dist/utils.js +2 -2
- package/docs/DOCUMENTATION_AUDIT.md +6 -6
- package/docs/DOCUMENTATION_STANDARD.md +137 -0
- package/docs/README.md +1 -1
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +83 -40
- package/docs/api/enums/FileCategory.md +56 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +11 -11
- package/docs/api/interfaces/FileDisplayProps.md +10 -10
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +8 -8
- package/docs/api/interfaces/FileUploadProps.md +137 -42
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.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 +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +83 -50
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
- package/docs/api/interfaces/UseEventLogoOptions.md +74 -0
- package/docs/api/interfaces/UseEventLogoReturn.md +81 -0
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +6 -6
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +6 -6
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +11 -11
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +290 -95
- package/docs/api-reference/components.md +1 -18
- package/docs/api-reference/hooks.md +1 -4
- package/docs/best-practices/testing.md +2 -0
- package/docs/documentation-index.md +1 -1
- package/docs/getting-started/faq.md +1 -1
- package/docs/implementation-guides/file-reference-system.md +592 -58
- package/docs/implementation-guides/file-upload-storage.md +137 -73
- package/docs/implementation-guides/public-pages-advanced.md +10 -0
- package/docs/rbac/super-admin-guide.md +18 -70
- package/docs/testing/README.md +2 -0
- package/package.json +1 -1
- package/src/__tests__/TEST_STANDARD.md +674 -0
- package/src/__tests__/helpers/test-utils.tsx +3 -2
- package/src/components/DataTable/__tests__/{DataTable.comprehensive.test.tsx.skip → DataTable.comprehensive.test.tsx} +17 -18
- package/src/components/DataTable/__tests__/{DataTable.test.tsx.skip → DataTable.test.tsx} +14 -22
- package/src/components/DataTable/__tests__/{ssr.strict-mode.test.tsx.skip → ssr.strict-mode.test.tsx} +42 -47
- package/src/components/DataTable/components/__tests__/COVERAGE_NOTE.md +1 -1
- package/src/components/DataTable/examples/__tests__/PerformanceExample.test.tsx +13 -4
- package/src/components/DataTable/utils/__tests__/COVERAGE_NOTE.md +1 -1
- package/src/components/DataTable/utils/__tests__/performanceUtils.test.ts +10 -6
- package/src/components/FileDisplay/FileDisplay.test.tsx +257 -0
- package/src/components/{FileDisplay.tsx → FileDisplay/FileDisplay.tsx} +111 -10
- package/src/components/FileDisplay/index.tsx +4 -0
- package/src/components/FileUpload/FileUpload.test.tsx +171 -621
- package/src/components/FileUpload/FileUpload.tsx +512 -168
- package/src/components/FileUpload/index.tsx +4 -0
- package/src/components/Progress/Progress.test.tsx +38 -0
- package/src/components/PublicLayout/EventLogo.tsx +6 -4
- package/src/components/Select/Select.test.tsx +1 -1
- package/src/components/SessionRestorationLoader.tsx +48 -0
- package/src/components/Toast/Toast.tsx +13 -8
- package/src/components/index.ts +16 -16
- package/src/hooks/__tests__/ServiceHooks.test.tsx +615 -0
- package/src/hooks/public/usePublicEventLogo.ts +16 -20
- package/src/hooks/useEventLogo.ts +316 -0
- package/src/hooks/useEvents.ts +0 -5
- package/src/hooks/useFileReference.test.ts +659 -0
- package/src/hooks/useFileReference.ts +207 -3
- package/src/hooks/useSessionRestoration.ts +64 -0
- package/src/index.ts +17 -5
- package/src/providers/{UnifiedAuthProvider.test.simple.tsx → UnifiedAuthProvider.smoke.test.tsx} +81 -60
- package/src/providers/services/AuthServiceProvider.tsx +27 -3
- package/src/providers/services/UnifiedAuthProvider.tsx +34 -5
- package/src/rbac/{engine.test.simple.ts → RBACEngine.smoke.test.ts} +17 -12
- package/src/services/AuthService.ts +142 -20
- package/src/services/EventService.ts +0 -4
- package/src/types/auth.ts +15 -0
- package/src/types/file-reference.ts +73 -1
- package/src/types/index.ts +1 -0
- package/src/utils/__tests__/organisationContext.unit.test.ts +2 -4
- package/src/utils/appNameResolver.simple.test.ts +99 -29
- package/src/utils/file-reference.test.ts +535 -0
- package/src/utils/file-reference.ts +200 -30
- package/src/utils/organisationContext.test.ts +5 -19
- package/src/utils/organisationContext.ts +3 -5
- package/src/utils/storage/README.md +269 -262
- package/src/utils/storage/config.ts +9 -0
- package/src/utils/storage/helpers.test.ts +735 -0
- package/src/utils/storage/helpers.ts +189 -16
- package/src/utils/storage/index.ts +3 -0
- package/src/validation/__tests__/sanitization.unit.test.ts +1 -1
- package/src/validation/__tests__/schemaUtils.unit.test.ts +1 -1
- package/src/validation/__tests__/user.unit.test.ts +1 -1
- package/dist/chunk-5BN3YGNK.js.map +0 -1
- package/dist/chunk-CVMVPYAL.js.map +0 -1
- package/dist/chunk-I7O3RSMN.js.map +0 -1
- package/dist/chunk-WUXCWRL6.js.map +0 -1
- package/dist/chunk-ZFLOV3OM.js.map +0 -1
- package/docs/CONTENT_AUDIT_REPORT.md +0 -253
- package/docs/STYLE_GUIDE.md +0 -37
- package/examples/RBAC/__tests__/PermissionExample.test.tsx +0 -150
- package/examples/public-pages/__tests__/PublicPageUsageExample.test.tsx +0 -159
- package/src/__tests__/TEST_GUIDE_CURSOR.md +0 -1605
- package/src/__tests__/TEST_GUIDE_HUMAN.md +0 -103
- package/src/components/FileUpload/FileUpload.example.tsx +0 -218
- package/src/components/FileUpload/index.ts +0 -6
- package/src/components/FileUpload.tsx +0 -176
- package/src/components/Progress/index.ts +0 -3
- package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +0 -666
- package/src/components/SuperAdminGuard.tsx +0 -116
- package/src/components/__tests__/FileDisplay.test.tsx +0 -575
- package/src/components/__tests__/FileUpload.test.tsx +0 -446
- package/src/components/__tests__/SuperAdminGuard.test.tsx +0 -627
- package/src/components/examples/PermissionExample.tsx +0 -173
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +0 -583
- package/src/hooks/__tests__/usePublicEventLogo.unit.test.ts +0 -640
- package/src/types/__tests__/file-reference.test.ts +0 -447
- package/src/utils/__tests__/file-reference.test.ts +0 -383
- /package/dist/{DataTable-FA6EUX5M.js.map → DataTable-PWBMKMOG.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-K2IZAY5F.js.map → UnifiedAuthProvider-5D3HEQND.js.map} +0 -0
- /package/dist/{chunk-NTW3KGS4.js.map → chunk-6UHXQH7P.js.map} +0 -0
- /package/dist/{chunk-YVUZWLQG.js.map → chunk-AQGF5OG7.js.map} +0 -0
- /package/dist/{chunk-KAY3K5TP.js.map → chunk-BNXBJOGL.js.map} +0 -0
- /package/dist/{chunk-S3JKDMD5.js.map → chunk-CXKMRKRF.js.map} +0 -0
- /package/dist/{chunk-RIXPZJUB.js.map → chunk-KTPG5VCH.js.map} +0 -0
- /package/dist/{chunk-2FQEQUJT.js.map → chunk-KWICIQVK.js.map} +0 -0
- /package/dist/{chunk-I2VVV5PQ.js.map → chunk-YY4YYM3E.js.map} +0 -0
- /package/src/providers/{OrganisationProvider.test.simple.tsx → OrganisationProvider.context.test.tsx} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { renderWithProviders, screen, act } from '../../__tests__/helpers/test-utils';
|
|
3
|
+
import { Progress } from './Progress';
|
|
4
|
+
|
|
5
|
+
describe('[component] Progress', () => {
|
|
6
|
+
it('renders an accessible progressbar with correct aria attributes', () => {
|
|
7
|
+
renderWithProviders(<Progress value={40} max={200} />);
|
|
8
|
+
|
|
9
|
+
const progressbar = screen.getByRole('progressbar');
|
|
10
|
+
expect(progressbar).toHaveAttribute('aria-valuenow', '40');
|
|
11
|
+
expect(progressbar).toHaveAttribute('aria-valuemax', '200');
|
|
12
|
+
expect(progressbar).toHaveAttribute('aria-valuemin', '0');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('defaults max to 100 when not provided', () => {
|
|
16
|
+
renderWithProviders(<Progress value={75} />);
|
|
17
|
+
const progressbar = screen.getByRole('progressbar');
|
|
18
|
+
expect(progressbar).toHaveAttribute('aria-valuemax', '100');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('updates indicator transform based on value', () => {
|
|
22
|
+
const { rerender } = renderWithProviders(<Progress value={25} />);
|
|
23
|
+
// Indicator is the first child within the progress root
|
|
24
|
+
const indicator = screen.getByRole('progressbar').firstElementChild as HTMLElement;
|
|
25
|
+
expect(indicator.style.transform).toContain('translateX(-75%)');
|
|
26
|
+
|
|
27
|
+
rerender(<Progress value={80} />);
|
|
28
|
+
expect(indicator.style.transform).toContain('translateX(-20%)');
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('supports indeterminate state when no value is provided (no aria-valuenow)', () => {
|
|
32
|
+
renderWithProviders(<Progress />);
|
|
33
|
+
const progressbar = screen.getByRole('progressbar');
|
|
34
|
+
expect(progressbar).not.toHaveAttribute('aria-valuenow');
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
import React, { useMemo, useContext } from 'react';
|
|
50
50
|
import { usePublicEventLogo } from '../../hooks/public/usePublicEventLogo';
|
|
51
|
+
import { useEventLogo } from '../../hooks/useEventLogo';
|
|
51
52
|
import { PublicPageContext, useIsPublicPage } from './PublicPageProvider';
|
|
52
53
|
import { useUnifiedAuth } from '../../providers/services/UnifiedAuthProvider';
|
|
53
54
|
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
@@ -277,19 +278,20 @@ function EventLogoAuthenticated({
|
|
|
277
278
|
);
|
|
278
279
|
}
|
|
279
280
|
|
|
281
|
+
// Use the authenticated event logo hook (supports both public and private logos)
|
|
280
282
|
const {
|
|
281
283
|
logoUrl,
|
|
282
284
|
fallbackText,
|
|
283
285
|
isLoading,
|
|
284
286
|
error
|
|
285
|
-
} =
|
|
287
|
+
} = useEventLogo(
|
|
288
|
+
supabase,
|
|
286
289
|
eventId,
|
|
287
290
|
eventName,
|
|
288
|
-
organisationId,
|
|
291
|
+
organisationId,
|
|
289
292
|
{
|
|
290
293
|
validateImage,
|
|
291
|
-
generateFallbackText
|
|
292
|
-
supabase
|
|
294
|
+
generateFallbackText
|
|
293
295
|
}
|
|
294
296
|
);
|
|
295
297
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @package @jmruthers/pace-core
|
|
5
5
|
* @module Components/Select
|
|
6
6
|
*
|
|
7
|
-
* This test suite follows the testing guidelines in
|
|
7
|
+
* This test suite follows the testing guidelines in TEST_STANDARD.md
|
|
8
8
|
* and focuses on observable behavior, accessibility, and user interactions.
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file SessionRestorationLoader Component
|
|
3
|
+
* @package @jmruthers/pace-core
|
|
4
|
+
* @module Components
|
|
5
|
+
* @since 0.1.0
|
|
6
|
+
*
|
|
7
|
+
* Displays a consistent loading state while the authentication service
|
|
8
|
+
* restores the Supabase session from persistent storage.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { LoadingSpinner } from './LoadingSpinner/LoadingSpinner';
|
|
13
|
+
|
|
14
|
+
export interface SessionRestorationLoaderProps {
|
|
15
|
+
/** Customise the status message displayed under the spinner */
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const SessionRestorationLoader: React.FC<SessionRestorationLoaderProps> = ({
|
|
20
|
+
message = 'Restoring session...'
|
|
21
|
+
}) => {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
style={{
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
height: '100vh',
|
|
30
|
+
width: '100%',
|
|
31
|
+
gap: '1rem',
|
|
32
|
+
textAlign: 'center',
|
|
33
|
+
padding: '1rem',
|
|
34
|
+
background: 'var(--background, transparent)'
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<LoadingSpinner size="lg" />
|
|
38
|
+
<div
|
|
39
|
+
style={{
|
|
40
|
+
fontSize: '0.95rem',
|
|
41
|
+
color: 'var(--muted-foreground, #6b7280)'
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
{message}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -294,14 +294,19 @@ export function Toaster() {
|
|
|
294
294
|
return (
|
|
295
295
|
<ToastProvider data-testid="toast-provider">
|
|
296
296
|
<ToastViewport />
|
|
297
|
-
{toasts.map((toast: any) =>
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<
|
|
303
|
-
|
|
304
|
-
|
|
297
|
+
{toasts.map((toast: any) => {
|
|
298
|
+
// Destructure custom properties that shouldn't be passed to DOM
|
|
299
|
+
const { id, title, description, action, dismiss, ...toastProps } = toast;
|
|
300
|
+
|
|
301
|
+
return (
|
|
302
|
+
<Toast key={id} {...toastProps}>
|
|
303
|
+
{title && <ToastTitle>{title}</ToastTitle>}
|
|
304
|
+
{description && <ToastDescription>{description}</ToastDescription>}
|
|
305
|
+
{action && action}
|
|
306
|
+
<ToastClose onClick={dismiss} />
|
|
307
|
+
</Toast>
|
|
308
|
+
);
|
|
309
|
+
})}
|
|
305
310
|
</ToastProvider>
|
|
306
311
|
);
|
|
307
312
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -52,7 +52,7 @@ export { Avatar, AvatarImage, AvatarFallback } from './Avatar';
|
|
|
52
52
|
export { Checkbox } from './Checkbox';
|
|
53
53
|
export { Switch } from './Switch';
|
|
54
54
|
export type { SwitchProps } from './Switch';
|
|
55
|
-
export { Progress } from './Progress';
|
|
55
|
+
export { Progress } from './Progress/Progress';
|
|
56
56
|
|
|
57
57
|
// Table components
|
|
58
58
|
export {
|
|
@@ -180,19 +180,9 @@ export type { FooterProps } from './Footer';
|
|
|
180
180
|
export * from './PublicLayout';
|
|
181
181
|
|
|
182
182
|
// ============================================================================
|
|
183
|
-
// SECURITY COMPONENTS
|
|
183
|
+
// SECURITY COMPONENTS (none currently exported)
|
|
184
184
|
// ============================================================================
|
|
185
185
|
|
|
186
|
-
// Super Admin Guard components
|
|
187
|
-
export {
|
|
188
|
-
SuperAdminGuard,
|
|
189
|
-
SuperAdminBadge,
|
|
190
|
-
SuperAdminDebugPanel
|
|
191
|
-
} from './SuperAdminGuard';
|
|
192
|
-
export type { SuperAdminGuardProps } from './SuperAdminGuard';
|
|
193
|
-
|
|
194
|
-
// Removed: Protected and AdminGuard components (unused)
|
|
195
|
-
|
|
196
186
|
// ============================================================================
|
|
197
187
|
// NAVIGATION COMPONENTS
|
|
198
188
|
// ============================================================================
|
|
@@ -218,6 +208,7 @@ export * from './PaceLoginPage';
|
|
|
218
208
|
export { ErrorBoundary } from './ErrorBoundary';
|
|
219
209
|
export type { ErrorBoundaryProps, ErrorBoundaryState } from './ErrorBoundary';
|
|
220
210
|
export { LoadingSpinner } from './LoadingSpinner';
|
|
211
|
+
export { SessionRestorationLoader } from './SessionRestorationLoader';
|
|
221
212
|
|
|
222
213
|
// ============================================================================
|
|
223
214
|
// EVENT MANAGEMENT
|
|
@@ -254,11 +245,20 @@ export type { FileReference, FileMetadata, FileUploadOptions } from '../types/fi
|
|
|
254
245
|
// HOOKS
|
|
255
246
|
// ============================================================================
|
|
256
247
|
|
|
257
|
-
export { useStorage, useFileUpload } from '../hooks/useStorage';
|
|
258
|
-
export type { UseStorageOptions, UseStorageReturn } from '../hooks/useStorage';
|
|
259
248
|
|
|
260
|
-
export {
|
|
261
|
-
|
|
249
|
+
export {
|
|
250
|
+
useFileReference,
|
|
251
|
+
useFileReferenceForRecord,
|
|
252
|
+
useFileReferenceById,
|
|
253
|
+
useFilesByCategory
|
|
254
|
+
} from '../hooks/useFileReference';
|
|
255
|
+
export type {
|
|
256
|
+
UseFileReferenceOptions,
|
|
257
|
+
UseFileReferenceReturn,
|
|
258
|
+
UseFileReferenceForRecordReturn
|
|
259
|
+
} from '../hooks/useFileReference';
|
|
260
|
+
export { useEventLogo, clearEventLogoCache, getEventLogoCacheStats } from '../hooks/useEventLogo';
|
|
261
|
+
export type { UseEventLogoReturn, UseEventLogoOptions } from '../hooks/useEventLogo';
|
|
262
262
|
|
|
263
263
|
export { useToast } from '../hooks/useToast';
|
|
264
264
|
|