@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.
Files changed (182) hide show
  1. package/dist/{PublicPageProvider-DrLDztHt.d.ts → PublicPageProvider-B8HaLe69.d.ts} +47 -17
  2. package/dist/{chunk-IPCH26AG.js → chunk-MX64ZF6I.js} +2 -2
  3. package/dist/{chunk-UNOTYLQF.js → chunk-UCQSRW7Z.js} +827 -827
  4. package/dist/chunk-UCQSRW7Z.js.map +1 -0
  5. package/dist/{chunk-EFCLXK7F.js → chunk-YGPFYGA6.js} +3756 -3688
  6. package/dist/chunk-YGPFYGA6.js.map +1 -0
  7. package/dist/components.d.ts +1 -2
  8. package/dist/components.js +2 -6
  9. package/dist/components.js.map +1 -1
  10. package/dist/hooks.js +2 -2
  11. package/dist/index.d.ts +1 -2
  12. package/dist/index.js +3 -7
  13. package/dist/index.js.map +1 -1
  14. package/docs/api/classes/ColumnFactory.md +1 -1
  15. package/docs/api/classes/ErrorBoundary.md +1 -1
  16. package/docs/api/classes/InvalidScopeError.md +1 -1
  17. package/docs/api/classes/Logger.md +1 -1
  18. package/docs/api/classes/MissingUserContextError.md +1 -1
  19. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  20. package/docs/api/classes/PermissionDeniedError.md +1 -1
  21. package/docs/api/classes/RBACAuditManager.md +1 -1
  22. package/docs/api/classes/RBACCache.md +1 -1
  23. package/docs/api/classes/RBACEngine.md +1 -1
  24. package/docs/api/classes/RBACError.md +1 -1
  25. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  26. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  27. package/docs/api/classes/StorageUtils.md +1 -1
  28. package/docs/api/enums/FileCategory.md +1 -1
  29. package/docs/api/enums/LogLevel.md +1 -1
  30. package/docs/api/enums/RBACErrorCode.md +1 -1
  31. package/docs/api/enums/RPCFunction.md +1 -1
  32. package/docs/api/interfaces/AddressFieldProps.md +1 -1
  33. package/docs/api/interfaces/AddressFieldRef.md +1 -1
  34. package/docs/api/interfaces/AggregateConfig.md +1 -1
  35. package/docs/api/interfaces/AutocompleteOptions.md +1 -1
  36. package/docs/api/interfaces/AvatarProps.md +128 -0
  37. package/docs/api/interfaces/BadgeProps.md +1 -1
  38. package/docs/api/interfaces/ButtonProps.md +1 -1
  39. package/docs/api/interfaces/CalendarProps.md +1 -1
  40. package/docs/api/interfaces/CardProps.md +1 -1
  41. package/docs/api/interfaces/ColorPalette.md +1 -1
  42. package/docs/api/interfaces/ColorShade.md +1 -1
  43. package/docs/api/interfaces/ComplianceResult.md +1 -1
  44. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  45. package/docs/api/interfaces/DataRecord.md +1 -1
  46. package/docs/api/interfaces/DataTableAction.md +1 -1
  47. package/docs/api/interfaces/DataTableColumn.md +1 -1
  48. package/docs/api/interfaces/DataTableProps.md +1 -1
  49. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  50. package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
  51. package/docs/api/interfaces/DatabaseIssue.md +1 -1
  52. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  53. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  54. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  55. package/docs/api/interfaces/ExportColumn.md +1 -1
  56. package/docs/api/interfaces/ExportOptions.md +1 -1
  57. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  58. package/docs/api/interfaces/FileMetadata.md +1 -1
  59. package/docs/api/interfaces/FileReference.md +1 -1
  60. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  61. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  62. package/docs/api/interfaces/FileUploadProps.md +1 -1
  63. package/docs/api/interfaces/FooterProps.md +1 -1
  64. package/docs/api/interfaces/FormFieldProps.md +1 -1
  65. package/docs/api/interfaces/FormProps.md +1 -1
  66. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  67. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  68. package/docs/api/interfaces/InputProps.md +1 -1
  69. package/docs/api/interfaces/LabelProps.md +1 -1
  70. package/docs/api/interfaces/LoggerConfig.md +1 -1
  71. package/docs/api/interfaces/LoginFormProps.md +1 -1
  72. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  73. package/docs/api/interfaces/NavigationContextType.md +1 -1
  74. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  75. package/docs/api/interfaces/NavigationItem.md +1 -1
  76. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  77. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  78. package/docs/api/interfaces/Organisation.md +1 -1
  79. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  80. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  81. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  82. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  83. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  84. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  85. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  86. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  87. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  88. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  89. package/docs/api/interfaces/PaletteData.md +1 -1
  90. package/docs/api/interfaces/ParsedAddress.md +1 -1
  91. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  92. package/docs/api/interfaces/ProgressProps.md +1 -1
  93. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  94. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  95. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  96. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  97. package/docs/api/interfaces/QuickFix.md +1 -1
  98. package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
  99. package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
  100. package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
  101. package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
  102. package/docs/api/interfaces/RBACConfig.md +1 -1
  103. package/docs/api/interfaces/RBACContext.md +1 -1
  104. package/docs/api/interfaces/RBACLogger.md +1 -1
  105. package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
  106. package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
  107. package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
  108. package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
  109. package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
  110. package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
  111. package/docs/api/interfaces/RBACResult.md +1 -1
  112. package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
  113. package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
  114. package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
  115. package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
  116. package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
  117. package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
  118. package/docs/api/interfaces/RBACRolesListParams.md +1 -1
  119. package/docs/api/interfaces/RBACRolesListResult.md +1 -1
  120. package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
  121. package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
  122. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  123. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  124. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  125. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  126. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  127. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  128. package/docs/api/interfaces/RouteConfig.md +1 -1
  129. package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
  130. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  131. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  132. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  133. package/docs/api/interfaces/SetupIssue.md +1 -1
  134. package/docs/api/interfaces/StorageConfig.md +1 -1
  135. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  136. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  137. package/docs/api/interfaces/StorageListOptions.md +1 -1
  138. package/docs/api/interfaces/StorageListResult.md +1 -1
  139. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  140. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  141. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  142. package/docs/api/interfaces/StyleImport.md +1 -1
  143. package/docs/api/interfaces/SwitchProps.md +1 -1
  144. package/docs/api/interfaces/TabsContentProps.md +1 -1
  145. package/docs/api/interfaces/TabsListProps.md +1 -1
  146. package/docs/api/interfaces/TabsProps.md +1 -1
  147. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  148. package/docs/api/interfaces/TextareaProps.md +1 -1
  149. package/docs/api/interfaces/ToastActionElement.md +1 -1
  150. package/docs/api/interfaces/ToastProps.md +1 -1
  151. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  152. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  153. package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
  154. package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
  155. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  156. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  157. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  158. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  159. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  160. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  161. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  162. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  163. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  164. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  165. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  166. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  167. package/docs/api/interfaces/UserEventAccess.md +1 -1
  168. package/docs/api/interfaces/UserMenuProps.md +1 -1
  169. package/docs/api/interfaces/UserProfile.md +1 -1
  170. package/docs/api/modules.md +6 -45
  171. package/docs/api-reference/components.md +57 -22
  172. package/package.json +1 -2
  173. package/src/components/Avatar/Avatar.test.tsx +183 -209
  174. package/src/components/Avatar/Avatar.tsx +179 -53
  175. package/src/components/Avatar/index.ts +1 -1
  176. package/src/components/UserMenu/UserMenu.test.tsx +7 -9
  177. package/src/components/UserMenu/UserMenu.tsx +7 -5
  178. package/src/components/index.ts +2 -1
  179. package/src/index.ts +2 -1
  180. package/dist/chunk-EFCLXK7F.js.map +0 -1
  181. package/dist/chunk-UNOTYLQF.js.map +0 -1
  182. /package/dist/{chunk-IPCH26AG.js.map → chunk-MX64ZF6I.js.map} +0 -0
@@ -1,6 +1,6 @@
1
- [@jmruthers/pace-core - v0.5.188](README.md) / Exports
1
+ [@jmruthers/pace-core - v0.5.189](README.md) / Exports
2
2
 
3
- # @jmruthers/pace-core - v0.5.188
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
- #### Parameters
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` | `Omit`\<`AvatarFallbackProps` & `RefAttributes`\<`HTMLSpanElement`\>, ``"ref"``\> & `RefAttributes`\<`HTMLSpanElement`\> |
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:69](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Avatar/Avatar.tsx#L69)
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
- className?: string;
2007
- }
2008
-
2009
- interface AvatarImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
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, AvatarImage, AvatarFallback } from '@jmruthers/pace-core';
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
- // User avatar
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 without image
2032
- <Avatar>
2033
- <AvatarFallback>AB</AvatarFallback>
2034
- </Avatar>
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
- - Automatic fallback to initials or icon
2040
- - Responsive sizing
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 user profiles
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.188",
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",