@jmruthers/pace-core 0.5.188 → 0.5.189
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/{PublicPageProvider-DrLDztHt.d.ts → PublicPageProvider-B8HaLe69.d.ts} +47 -17
- package/dist/{chunk-IPCH26AG.js → chunk-MX64ZF6I.js} +2 -2
- package/dist/{chunk-UNOTYLQF.js → chunk-UCQSRW7Z.js} +827 -827
- package/dist/chunk-UCQSRW7Z.js.map +1 -0
- package/dist/{chunk-EFCLXK7F.js → chunk-YGPFYGA6.js} +3756 -3688
- package/dist/chunk-YGPFYGA6.js.map +1 -0
- package/dist/components.d.ts +1 -2
- package/dist/components.js +2 -6
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +3 -7
- package/dist/index.js.map +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/Logger.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/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 +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/enums/LogLevel.md +1 -1
- package/docs/api/enums/RBACErrorCode.md +1 -1
- package/docs/api/enums/RPCFunction.md +1 -1
- package/docs/api/interfaces/AddressFieldProps.md +1 -1
- package/docs/api/interfaces/AddressFieldRef.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/AutocompleteOptions.md +1 -1
- package/docs/api/interfaces/AvatarProps.md +128 -0
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.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/ComplianceResult.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/DatabaseComplianceResult.md +1 -1
- package/docs/api/interfaces/DatabaseIssue.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- 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 +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/FormFieldProps.md +1 -1
- package/docs/api/interfaces/FormProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.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/LoggerConfig.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/ParsedAddress.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProgressProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.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/QuickFix.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
- package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
- package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACContext.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
- package/docs/api/interfaces/RBACResult.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
- package/docs/api/interfaces/RBACRolesListParams.md +1 -1
- package/docs/api/interfaces/RBACRolesListResult.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
- package/docs/api/interfaces/ResourcePermissions.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/SetupIssue.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/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +1 -1
- package/docs/api/interfaces/TextareaProps.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 +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
- package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.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/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +6 -45
- package/docs/api-reference/components.md +57 -22
- package/package.json +1 -2
- package/src/components/Avatar/Avatar.test.tsx +183 -209
- package/src/components/Avatar/Avatar.tsx +179 -53
- package/src/components/Avatar/index.ts +1 -1
- package/src/components/UserMenu/UserMenu.test.tsx +7 -9
- package/src/components/UserMenu/UserMenu.tsx +7 -5
- package/src/components/index.ts +2 -1
- package/src/index.ts +2 -1
- package/dist/chunk-EFCLXK7F.js.map +0 -1
- package/dist/chunk-UNOTYLQF.js.map +0 -1
- /package/dist/{chunk-IPCH26AG.js.map → chunk-MX64ZF6I.js.map} +0 -0
package/docs/api/modules.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.189](README.md) / Exports
|
|
2
2
|
|
|
3
|
-
# @jmruthers/pace-core - v0.5.
|
|
3
|
+
# @jmruthers/pace-core - v0.5.189
|
|
4
4
|
|
|
5
5
|
**`File`**
|
|
6
6
|
|
|
@@ -57,6 +57,7 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
57
57
|
|
|
58
58
|
- [AddressFieldProps](interfaces/AddressFieldProps.md)
|
|
59
59
|
- [AddressFieldRef](interfaces/AddressFieldRef.md)
|
|
60
|
+
- [AvatarProps](interfaces/AvatarProps.md)
|
|
60
61
|
- [BadgeProps](interfaces/BadgeProps.md)
|
|
61
62
|
- [ButtonProps](interfaces/ButtonProps.md)
|
|
62
63
|
- [CalendarProps](interfaces/CalendarProps.md)
|
|
@@ -247,8 +248,6 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
247
248
|
- [AlertTitle](modules.md#alerttitle)
|
|
248
249
|
- [AlertDescription](modules.md#alertdescription)
|
|
249
250
|
- [Avatar](modules.md#avatar)
|
|
250
|
-
- [AvatarImage](modules.md#avatarimage)
|
|
251
|
-
- [AvatarFallback](modules.md#avatarfallback)
|
|
252
251
|
- [Badge](modules.md#badge)
|
|
253
252
|
- [Button](modules.md#button)
|
|
254
253
|
- [Calendar](modules.md#calendar)
|
|
@@ -1343,51 +1342,13 @@ ___
|
|
|
1343
1342
|
|
|
1344
1343
|
▸ **Avatar**(`props`): `ReactNode`
|
|
1345
1344
|
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
| Name | Type |
|
|
1349
|
-
| :------ | :------ |
|
|
1350
|
-
| `props` | `Omit`\<`AvatarProps` & `RefAttributes`\<`HTMLSpanElement`\>, ``"ref"``\> & `RefAttributes`\<`HTMLSpanElement`\> |
|
|
1351
|
-
|
|
1352
|
-
#### Returns
|
|
1353
|
-
|
|
1354
|
-
`ReactNode`
|
|
1355
|
-
|
|
1356
|
-
#### Defined in
|
|
1357
|
-
|
|
1358
|
-
[packages/core/src/components/Avatar/Avatar.tsx:42](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Avatar/Avatar.tsx#L42)
|
|
1359
|
-
|
|
1360
|
-
___
|
|
1361
|
-
|
|
1362
|
-
### AvatarImage
|
|
1363
|
-
|
|
1364
|
-
▸ **AvatarImage**(`props`): `ReactNode`
|
|
1365
|
-
|
|
1366
|
-
#### Parameters
|
|
1367
|
-
|
|
1368
|
-
| Name | Type |
|
|
1369
|
-
| :------ | :------ |
|
|
1370
|
-
| `props` | `Omit`\<`AvatarImageProps` & `RefAttributes`\<`HTMLImageElement`\>, ``"ref"``\> & `RefAttributes`\<`HTMLImageElement`\> |
|
|
1371
|
-
|
|
1372
|
-
#### Returns
|
|
1373
|
-
|
|
1374
|
-
`ReactNode`
|
|
1375
|
-
|
|
1376
|
-
#### Defined in
|
|
1377
|
-
|
|
1378
|
-
[packages/core/src/components/Avatar/Avatar.tsx:57](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Avatar/Avatar.tsx#L57)
|
|
1379
|
-
|
|
1380
|
-
___
|
|
1381
|
-
|
|
1382
|
-
### AvatarFallback
|
|
1383
|
-
|
|
1384
|
-
▸ **AvatarFallback**(`props`): `ReactNode`
|
|
1345
|
+
Avatar component for displaying user profile images or initials
|
|
1385
1346
|
|
|
1386
1347
|
#### Parameters
|
|
1387
1348
|
|
|
1388
1349
|
| Name | Type |
|
|
1389
1350
|
| :------ | :------ |
|
|
1390
|
-
| `props` | `
|
|
1351
|
+
| `props` | [`AvatarProps`](interfaces/AvatarProps.md) & `RefAttributes`\<`HTMLDivElement`\> |
|
|
1391
1352
|
|
|
1392
1353
|
#### Returns
|
|
1393
1354
|
|
|
@@ -1395,7 +1356,7 @@ ___
|
|
|
1395
1356
|
|
|
1396
1357
|
#### Defined in
|
|
1397
1358
|
|
|
1398
|
-
[packages/core/src/components/Avatar/Avatar.tsx:
|
|
1359
|
+
[packages/core/src/components/Avatar/Avatar.tsx:99](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Avatar/Avatar.tsx#L99)
|
|
1399
1360
|
|
|
1400
1361
|
___
|
|
1401
1362
|
|
|
@@ -1997,49 +1997,84 @@ For more information about testing components, see the [Testing Guide](../testin
|
|
|
1997
1997
|
|
|
1998
1998
|
## Avatar
|
|
1999
1999
|
|
|
2000
|
-
Display user profile pictures with fallback initials or icons.
|
|
2000
|
+
Display user profile pictures with fallback initials or icons. Supports three approaches for image display: direct URLs, file reference props, or file ID.
|
|
2001
2001
|
|
|
2002
2002
|
### Props
|
|
2003
2003
|
|
|
2004
2004
|
```typescript
|
|
2005
2005
|
interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2006
|
+
// File reference approach (uses FileDisplay for Supabase storage)
|
|
2007
|
+
table_name?: string;
|
|
2008
|
+
record_id?: string;
|
|
2009
|
+
organisation_id?: string;
|
|
2010
|
+
category?: FileCategory;
|
|
2011
|
+
|
|
2012
|
+
// OR file ID approach (uses file reference lookup)
|
|
2013
|
+
fileId?: string;
|
|
2014
|
+
|
|
2015
|
+
// OR direct URL approach (simple <img> tag for public images)
|
|
2010
2016
|
src?: string;
|
|
2011
2017
|
alt?: string;
|
|
2018
|
+
|
|
2019
|
+
// Fallback (always required)
|
|
2020
|
+
fallback: string;
|
|
2021
|
+
|
|
2022
|
+
// Styling
|
|
2012
2023
|
className?: string;
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
interface AvatarFallbackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2016
|
-
className?: string;
|
|
2024
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
2017
2025
|
}
|
|
2018
2026
|
```
|
|
2019
2027
|
|
|
2020
2028
|
### Usage
|
|
2021
2029
|
|
|
2022
2030
|
```tsx
|
|
2023
|
-
import { Avatar
|
|
2031
|
+
import { Avatar } from '@jmruthers/pace-core';
|
|
2032
|
+
import { FileCategory } from '@jmruthers/pace-core/types';
|
|
2033
|
+
|
|
2034
|
+
// Avatar with direct URL
|
|
2035
|
+
<Avatar
|
|
2036
|
+
src="/user.jpg"
|
|
2037
|
+
alt="User"
|
|
2038
|
+
fallback="JD"
|
|
2039
|
+
/>
|
|
2040
|
+
|
|
2041
|
+
// Avatar with file reference props (Supabase storage)
|
|
2042
|
+
<Avatar
|
|
2043
|
+
table_name="user_profiles"
|
|
2044
|
+
record_id={userId}
|
|
2045
|
+
organisation_id={orgId}
|
|
2046
|
+
category={FileCategory.PROFILE_PHOTOS}
|
|
2047
|
+
fallback="JD"
|
|
2048
|
+
/>
|
|
2049
|
+
|
|
2050
|
+
// Avatar with file ID
|
|
2051
|
+
<Avatar
|
|
2052
|
+
fileId={fileReferenceId}
|
|
2053
|
+
organisation_id={orgId}
|
|
2054
|
+
fallback="JD"
|
|
2055
|
+
/>
|
|
2024
2056
|
|
|
2025
|
-
//
|
|
2026
|
-
<Avatar
|
|
2027
|
-
<AvatarImage src="/user.jpg" alt="User" />
|
|
2028
|
-
<AvatarFallback>JD</AvatarFallback>
|
|
2029
|
-
</Avatar>
|
|
2057
|
+
// Avatar with fallback only
|
|
2058
|
+
<Avatar fallback="AB" />
|
|
2030
2059
|
|
|
2031
|
-
// Avatar
|
|
2032
|
-
<Avatar
|
|
2033
|
-
|
|
2034
|
-
|
|
2060
|
+
// Avatar with custom size
|
|
2061
|
+
<Avatar
|
|
2062
|
+
src="/user.jpg"
|
|
2063
|
+
alt="User"
|
|
2064
|
+
fallback="JD"
|
|
2065
|
+
size="lg"
|
|
2066
|
+
className="custom-class"
|
|
2067
|
+
/>
|
|
2035
2068
|
```
|
|
2036
2069
|
|
|
2037
2070
|
### Features
|
|
2038
2071
|
|
|
2039
|
-
-
|
|
2040
|
-
-
|
|
2072
|
+
- Three image source approaches: direct URL, file reference props, or file ID
|
|
2073
|
+
- Automatic fallback to initials when image fails or not provided
|
|
2074
|
+
- Responsive sizing with size prop or custom className
|
|
2041
2075
|
- Accessible ARIA attributes
|
|
2042
|
-
- Integration with
|
|
2076
|
+
- Integration with Supabase storage via FileDisplay
|
|
2077
|
+
- Circular avatar display with customizable styling
|
|
2043
2078
|
|
|
2044
2079
|
---
|
|
2045
2080
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jmruthers/pace-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.189",
|
|
4
4
|
"description": "Clean, modern React component library with Tailwind v4 styling and native utilities",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -197,7 +197,6 @@
|
|
|
197
197
|
"author": "PACE Team",
|
|
198
198
|
"license": "MIT",
|
|
199
199
|
"peerDependencies": {
|
|
200
|
-
"@radix-ui/react-avatar": "^1.0.0",
|
|
201
200
|
"@radix-ui/react-checkbox": "^1.0.0",
|
|
202
201
|
"@radix-ui/react-dialog": "^1.0.0",
|
|
203
202
|
"@radix-ui/react-label": "^2.0.0",
|