@jmruthers/pace-core 0.5.64 → 0.5.67

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 (131) hide show
  1. package/dist/{DataTable-7BER7PDS.js → DataTable-MFUXNGPR.js} +2 -2
  2. package/dist/{DataTable-D15XipLZ.d.ts → DataTable-ntgmhO2W.d.ts} +1 -1
  3. package/dist/{PublicLoadingSpinner-CXJ-W9wZ.d.ts → PublicLoadingSpinner-DdKXTkCZ.d.ts} +94 -1
  4. package/dist/{chunk-S66AJVI2.js → chunk-4HQ5BOVZ.js} +97 -27
  5. package/dist/chunk-4HQ5BOVZ.js.map +1 -0
  6. package/dist/{chunk-2LPYEFXI.js → chunk-ZB6AEA7I.js} +309 -261
  7. package/dist/chunk-ZB6AEA7I.js.map +1 -0
  8. package/dist/components.d.ts +4 -3
  9. package/dist/components.js +4 -2
  10. package/dist/components.js.map +1 -1
  11. package/dist/hooks.d.ts +1 -1
  12. package/dist/index.d.ts +6 -5
  13. package/dist/index.js +4 -2
  14. package/dist/index.js.map +1 -1
  15. package/dist/{types-E5WSpEtz.d.ts → types-CGX9Vyf5.d.ts} +8 -0
  16. package/dist/types.js.map +1 -1
  17. package/dist/utils.d.ts +2 -2
  18. package/dist/utils.js +1 -1
  19. package/docs/api/classes/ColumnFactory.md +6 -6
  20. package/docs/api/classes/ErrorBoundary.md +1 -1
  21. package/docs/api/classes/InvalidScopeError.md +1 -1
  22. package/docs/api/classes/MissingUserContextError.md +1 -1
  23. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  24. package/docs/api/classes/PermissionDeniedError.md +1 -1
  25. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  26. package/docs/api/classes/RBACAuditManager.md +1 -1
  27. package/docs/api/classes/RBACCache.md +1 -1
  28. package/docs/api/classes/RBACEngine.md +1 -1
  29. package/docs/api/classes/RBACError.md +1 -1
  30. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  31. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  32. package/docs/api/classes/StorageUtils.md +1 -1
  33. package/docs/api/interfaces/AggregateConfig.md +4 -4
  34. package/docs/api/interfaces/ButtonProps.md +1 -1
  35. package/docs/api/interfaces/CardProps.md +1 -1
  36. package/docs/api/interfaces/ColorPalette.md +1 -1
  37. package/docs/api/interfaces/ColorShade.md +1 -1
  38. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  39. package/docs/api/interfaces/DataTableAction.md +14 -14
  40. package/docs/api/interfaces/DataTableColumn.md +21 -21
  41. package/docs/api/interfaces/DataTableProps.md +1 -1
  42. package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
  43. package/docs/api/interfaces/EmptyStateConfig.md +5 -5
  44. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  45. package/docs/api/interfaces/EventContextType.md +1 -1
  46. package/docs/api/interfaces/EventLogoProps.md +1 -1
  47. package/docs/api/interfaces/EventProviderProps.md +1 -1
  48. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  49. package/docs/api/interfaces/FileUploadProps.md +1 -1
  50. package/docs/api/interfaces/FooterProps.md +1 -1
  51. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  52. package/docs/api/interfaces/InputProps.md +1 -1
  53. package/docs/api/interfaces/LabelProps.md +1 -1
  54. package/docs/api/interfaces/LoginFormProps.md +1 -1
  55. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  56. package/docs/api/interfaces/NavigationContextType.md +1 -1
  57. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  58. package/docs/api/interfaces/NavigationItem.md +1 -1
  59. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  60. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  61. package/docs/api/interfaces/Organisation.md +1 -1
  62. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  63. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  64. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  65. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  66. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  67. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  68. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  69. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  70. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  71. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  72. package/docs/api/interfaces/PaletteData.md +1 -1
  73. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  74. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  75. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  76. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  77. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  78. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  79. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  80. package/docs/api/interfaces/RBACConfig.md +1 -1
  81. package/docs/api/interfaces/RBACContextType.md +1 -1
  82. package/docs/api/interfaces/RBACLogger.md +1 -1
  83. package/docs/api/interfaces/RBACProviderProps.md +1 -1
  84. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  85. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  86. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  87. package/docs/api/interfaces/RouteConfig.md +1 -1
  88. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  89. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  90. package/docs/api/interfaces/StorageConfig.md +1 -1
  91. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  92. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  93. package/docs/api/interfaces/StorageListOptions.md +1 -1
  94. package/docs/api/interfaces/StorageListResult.md +1 -1
  95. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  96. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  97. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  98. package/docs/api/interfaces/StyleImport.md +1 -1
  99. package/docs/api/interfaces/SwitchProps.md +34 -0
  100. package/docs/api/interfaces/ToastActionElement.md +1 -1
  101. package/docs/api/interfaces/ToastProps.md +1 -1
  102. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  103. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  104. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  105. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  106. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  107. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  108. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  109. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  110. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  111. package/docs/api/interfaces/UserEventAccess.md +1 -1
  112. package/docs/api/interfaces/UserMenuProps.md +1 -1
  113. package/docs/api/interfaces/UserProfile.md +1 -1
  114. package/docs/api/modules.md +38 -4
  115. package/package.json +2 -1
  116. package/src/components/DataTable/components/DataTableBody.tsx +27 -11
  117. package/src/components/DataTable/components/DataTableCore.tsx +13 -13
  118. package/src/components/DataTable/components/EditableRow.tsx +46 -28
  119. package/src/components/DataTable/components/UnifiedTableBody.tsx +86 -38
  120. package/src/components/DataTable/components/VirtualizedDataTable.tsx +5 -3
  121. package/src/components/DataTable/core/ColumnFactory.ts +4 -0
  122. package/src/components/DataTable/types.ts +10 -0
  123. package/src/components/Switch/Switch.test.tsx +438 -0
  124. package/src/components/Switch/Switch.tsx +140 -0
  125. package/src/components/Switch/index.ts +9 -0
  126. package/src/components/index.ts +2 -0
  127. package/src/index.ts +2 -0
  128. package/src/types/index.ts +2 -0
  129. package/dist/chunk-2LPYEFXI.js.map +0 -1
  130. package/dist/chunk-S66AJVI2.js.map +0 -1
  131. /package/dist/{DataTable-7BER7PDS.js.map → DataTable-MFUXNGPR.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageConfig
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageConfig
2
2
 
3
3
  # Interface: StorageConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageFileInfo
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageFileInfo
2
2
 
3
3
  # Interface: StorageFileInfo
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageFileMetadata
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageFileMetadata
2
2
 
3
3
  # Interface: StorageFileMetadata
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageListOptions
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageListOptions
2
2
 
3
3
  # Interface: StorageListOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageListResult
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageListResult
2
2
 
3
3
  # Interface: StorageListResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageUploadOptions
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageUploadOptions
2
2
 
3
3
  # Interface: StorageUploadOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageUploadResult
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageUploadResult
2
2
 
3
3
  # Interface: StorageUploadResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StorageUrlOptions
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StorageUrlOptions
2
2
 
3
3
  # Interface: StorageUrlOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / StyleImport
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / StyleImport
2
2
 
3
3
  # Interface: StyleImport
4
4
 
@@ -0,0 +1,34 @@
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / SwitchProps
2
+
3
+ # Interface: SwitchProps
4
+
5
+ Switch component props
6
+ Extends all props from Radix UI Switch.Root
7
+
8
+ ## Hierarchy
9
+
10
+ - `ComponentPropsWithoutRef`\<typeof `SwitchPrimitive.Root`\>
11
+
12
+ ↳ **`SwitchProps`**
13
+
14
+ ## Table of contents
15
+
16
+ ### Properties
17
+
18
+ - [className](SwitchProps.md#classname)
19
+
20
+ ## Properties
21
+
22
+ ### className
23
+
24
+ • `Optional` **className**: `string`
25
+
26
+ Additional CSS classes to apply to the switch
27
+
28
+ #### Overrides
29
+
30
+ React.ComponentPropsWithoutRef.className
31
+
32
+ #### Defined in
33
+
34
+ [packages/core/src/components/Switch/Switch.tsx:83](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Switch/Switch.tsx#L83)
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / ToastActionElement
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / ToastActionElement
2
2
 
3
3
  # Interface: ToastActionElement
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / ToastProps
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / ToastProps
2
2
 
3
3
  # Interface: ToastProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
2
2
 
3
3
  # Interface: UnifiedAuthContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
2
2
 
3
3
  # Interface: UnifiedAuthProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
2
2
 
3
3
  # Interface: UseInactivityTrackerOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
2
2
 
3
3
  # Interface: UseInactivityTrackerReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UsePublicEventLogoOptions
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UsePublicEventLogoOptions
2
2
 
3
3
  # Interface: UsePublicEventLogoOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UsePublicEventLogoReturn
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UsePublicEventLogoReturn
2
2
 
3
3
  # Interface: UsePublicEventLogoReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
2
2
 
3
3
  # Interface: UsePublicEventOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
2
2
 
3
3
  # Interface: UsePublicEventReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
2
2
 
3
3
  # Interface: UsePublicRouteParamsReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UserEventAccess
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UserEventAccess
2
2
 
3
3
  # Interface: UserEventAccess
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UserMenuProps
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UserMenuProps
2
2
 
3
3
  # Interface: UserMenuProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.64](../README.md) / [Exports](../modules.md) / UserProfile
1
+ [@jmruthers/pace-core - v0.5.67](../README.md) / [Exports](../modules.md) / UserProfile
2
2
 
3
3
  # Interface: UserProfile
4
4
 
@@ -1,6 +1,6 @@
1
- [@jmruthers/pace-core - v0.5.64](README.md) / Exports
1
+ [@jmruthers/pace-core - v0.5.67](README.md) / Exports
2
2
 
3
- # @jmruthers/pace-core - v0.5.64
3
+ # @jmruthers/pace-core - v0.5.67
4
4
 
5
5
  **`File`**
6
6
 
@@ -73,6 +73,7 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
73
73
  - [PublicPageFooterProps](interfaces/PublicPageFooterProps.md)
74
74
  - [PublicPageHeaderProps](interfaces/PublicPageHeaderProps.md)
75
75
  - [PublicPageLayoutProps](interfaces/PublicPageLayoutProps.md)
76
+ - [SwitchProps](interfaces/SwitchProps.md)
76
77
  - [ToastProps](interfaces/ToastProps.md)
77
78
  - [ToastActionElement](interfaces/ToastActionElement.md)
78
79
  - [UserMenuProps](interfaces/UserMenuProps.md)
@@ -233,6 +234,7 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
233
234
  - [SelectGroup](modules.md#selectgroup)
234
235
  - [SelectLabel](modules.md#selectlabel)
235
236
  - [SelectSeparator](modules.md#selectseparator)
237
+ - [Switch](modules.md#switch)
236
238
  - [Table](modules.md#table)
237
239
  - [TableHeader](modules.md#tableheader)
238
240
  - [TableBody](modules.md#tablebody)
@@ -372,7 +374,7 @@ Generic data record type - all DataTable data must extend this
372
374
 
373
375
  #### Defined in
374
376
 
375
- [packages/core/src/components/DataTable/types.ts:27](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/types.ts#L27)
377
+ [packages/core/src/components/DataTable/types.ts:37](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/types.ts#L37)
376
378
 
377
379
  ___
378
380
 
@@ -405,7 +407,7 @@ Row identifier function type
405
407
 
406
408
  #### Defined in
407
409
 
408
- [packages/core/src/components/DataTable/types.ts:32](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/types.ts#L32)
410
+ [packages/core/src/components/DataTable/types.ts:42](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/types.ts#L42)
409
411
 
410
412
  ___
411
413
 
@@ -3035,6 +3037,38 @@ ___
3035
3037
 
3036
3038
  ___
3037
3039
 
3040
+ ### Switch
3041
+
3042
+ ▸ **Switch**(`props`): `ReactNode`
3043
+
3044
+ Switch component
3045
+
3046
+ A toggle switch for boolean states. Built on Radix UI for accessibility.
3047
+
3048
+ #### Parameters
3049
+
3050
+ | Name | Type |
3051
+ | :------ | :------ |
3052
+ | `props` | [`SwitchProps`](interfaces/SwitchProps.md) & `RefAttributes`\<`HTMLButtonElement`\> |
3053
+
3054
+ #### Returns
3055
+
3056
+ `ReactNode`
3057
+
3058
+ **`Component`**
3059
+
3060
+ **`Example`**
3061
+
3062
+ ```tsx
3063
+ <Switch checked={isEnabled} onCheckedChange={setIsEnabled} />
3064
+ ```
3065
+
3066
+ #### Defined in
3067
+
3068
+ [packages/core/src/components/Switch/Switch.tsx:97](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Switch/Switch.tsx#L97)
3069
+
3070
+ ___
3071
+
3038
3072
  ### Table
3039
3073
 
3040
3074
  ▸ **Table**(`props`): `ReactNode`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jmruthers/pace-core",
3
- "version": "0.5.64",
3
+ "version": "0.5.67",
4
4
  "description": "Clean, modern React component library with Tailwind v4 styling and native utilities",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -179,6 +179,7 @@
179
179
  "@radix-ui/react-label": "^2.0.0",
180
180
  "@radix-ui/react-progress": "^1.0.0",
181
181
  "@radix-ui/react-slot": "^1.0.0",
182
+ "@radix-ui/react-switch": "^1.1.0",
182
183
  "@radix-ui/react-toast": "^1.0.0",
183
184
  "@radix-ui/react-tooltip": "^1.0.0",
184
185
  "@tanstack/react-table": "^8.0.0",
@@ -273,7 +273,7 @@ export function DataTableBody<TData extends Record<string, any>>({
273
273
  aria-label={`Sort by ${typeof header.column.columnDef.header === 'string' ? header.column.columnDef.header : 'column'}`}
274
274
  tabIndex={0}
275
275
  >
276
- <div className="flex items-center gap-1">
276
+ <div className={`flex items-center gap-1 ${header.column.columnDef.meta?.align === 'right' ? 'justify-end' : ''}`}>
277
277
  {typeof header.column.columnDef.header === 'function'
278
278
  ? header.column.columnDef.header(header.getContext())
279
279
  : header.column.columnDef.header}
@@ -287,7 +287,7 @@ export function DataTableBody<TData extends Record<string, any>>({
287
287
  </div>
288
288
  </Button>
289
289
  ) : (
290
- <div>
290
+ <div className={header.column.columnDef.meta?.align === 'right' ? 'text-right' : ''}>
291
291
  {typeof header.column.columnDef.header === 'function'
292
292
  ? header.column.columnDef.header(header.getContext())
293
293
  : header.column.columnDef.header}
@@ -438,15 +438,31 @@ export function DataTableBody<TData extends Record<string, any>>({
438
438
  {row.getVisibleCells().map((cell) => (
439
439
  <td key={cell.id}>
440
440
  {isEditing && cell.column.id !== 'actions' ? (
441
- renderEditField(cell.column, editingData[cell.column.id], (value) => {
442
- if (typeof value === 'object' && value !== null) {
443
- // Handle editAccessorKey case
444
- onEditingDataChange({ ...editingData, ...value });
445
- } else {
446
- // Handle simple value case
447
- onEditingDataChange({ ...editingData, [cell.column.id]: value });
448
- }
449
- }, editingData)
441
+ // Check if column has a custom cell renderer - if so, use it in edit mode
442
+ cell.column.columnDef.cell ? (
443
+ flexRender(cell.column.columnDef.cell, {
444
+ ...cell.getContext(),
445
+ getIsEditing: () => true, // Always true in edit mode
446
+ setValue: (value: any) => {
447
+ if (typeof value === 'object' && value !== null) {
448
+ onEditingDataChange({ ...editingData, ...value });
449
+ } else {
450
+ onEditingDataChange({ ...editingData, [cell.column.id]: value });
451
+ }
452
+ }
453
+ })
454
+ ) : (
455
+ // Fall back to default edit field rendering when no custom cell renderer
456
+ renderEditField(cell.column, editingData[cell.column.id], (value) => {
457
+ if (typeof value === 'object' && value !== null) {
458
+ // Handle editAccessorKey case
459
+ onEditingDataChange({ ...editingData, ...value });
460
+ } else {
461
+ // Handle simple value case
462
+ onEditingDataChange({ ...editingData, [cell.column.id]: value });
463
+ }
464
+ }, editingData)
465
+ )
450
466
  ) : (
451
467
  flexRender(cell.column.columnDef.cell, cell.getContext())
452
468
  )}
@@ -1062,21 +1062,21 @@ function DataTableInternal<TData extends DataRecord>({
1062
1062
  aria-label={`Sort by ${typeof header.column.columnDef.header === 'string' ? header.column.columnDef.header : 'column'}`}
1063
1063
  tabIndex={0}
1064
1064
  >
1065
- <div className="flex items-center gap-1">
1066
- {typeof header.column.columnDef.header === 'function'
1067
- ? header.column.columnDef.header(header.getContext())
1068
- : header.column.columnDef.header}
1069
- {header.column.getIsSorted() === 'asc' ? (
1070
- <ChevronUp className="h-4 w-4" />
1071
- ) : header.column.getIsSorted() === 'desc' ? (
1072
- <ChevronDown className="h-4 w-4" />
1073
- ) : (
1074
- <ChevronsUpDown className="h-4 w-4" />
1075
- )}
1076
- </div>
1065
+ <div className={`flex items-center gap-1 ${header.column.columnDef.meta?.align === 'right' ? 'justify-end' : ''}`}>
1066
+ {typeof header.column.columnDef.header === 'function'
1067
+ ? header.column.columnDef.header(header.getContext())
1068
+ : header.column.columnDef.header}
1069
+ {header.column.getIsSorted() === 'asc' ? (
1070
+ <ChevronUp className="h-4 w-4" />
1071
+ ) : header.column.getIsSorted() === 'desc' ? (
1072
+ <ChevronDown className="h-4 w-4" />
1073
+ ) : (
1074
+ <ChevronsUpDown className="h-4 w-4" />
1075
+ )}
1076
+ </div>
1077
1077
  </Button>
1078
1078
  ) : (
1079
- <div>
1079
+ <div className={header.column.columnDef.meta?.align === 'right' ? 'text-right' : ''}>
1080
1080
  {typeof header.column.columnDef.header === 'function'
1081
1081
  ? header.column.columnDef.header(header.getContext())
1082
1082
  : header.column.columnDef.header}
@@ -117,34 +117,52 @@ export function EditableRow<TData extends DataRecord>({
117
117
  <tr>
118
118
  {row.getVisibleCells().map((cell: any) => (
119
119
  <td key={cell.id}>
120
- {cell.column.id !== 'actions' ? (
121
- renderEditField(cell.column, editingData[cell.column.id], (value) => {
122
- if (typeof value === 'object' && value !== null) {
123
- // Handle editAccessorKey case
124
- onEditingDataChange({ ...editingData, ...value });
125
- } else {
126
- // Handle simple value case
127
- onEditingDataChange({ ...editingData, [cell.column.id]: value });
128
- }
129
- }, editingData)
130
- ) : (
131
- <div className="flex gap-1">
132
- <Button
133
- onClick={onSave}
134
- size="sm"
135
- variant="default"
136
- >
137
- Save
138
- </Button>
139
- <Button
140
- onClick={onCancel}
141
- size="sm"
142
- variant="outline"
143
- >
144
- Cancel
145
- </Button>
146
- </div>
147
- )}
120
+ <div className={cell.column.columnDef.meta?.align === 'right' ? 'text-right' : ''}>
121
+ {cell.column.id !== 'actions' ? (
122
+ // Check if column has a custom cell renderer - if so, use it in edit mode
123
+ cell.column.columnDef.cell ? (
124
+ flexRender(cell.column.columnDef.cell, {
125
+ ...cell.getContext(),
126
+ getIsEditing: () => true, // Always true in edit mode
127
+ setValue: (value: any) => {
128
+ if (typeof value === 'object' && value !== null) {
129
+ onEditingDataChange({ ...editingData, ...value });
130
+ } else {
131
+ onEditingDataChange({ ...editingData, [cell.column.id]: value });
132
+ }
133
+ }
134
+ })
135
+ ) : (
136
+ // Fall back to default edit field rendering when no custom cell renderer
137
+ renderEditField(cell.column, editingData[cell.column.id], (value) => {
138
+ if (typeof value === 'object' && value !== null) {
139
+ // Handle editAccessorKey case
140
+ onEditingDataChange({ ...editingData, ...value });
141
+ } else {
142
+ // Handle simple value case
143
+ onEditingDataChange({ ...editingData, [cell.column.id]: value });
144
+ }
145
+ }, editingData)
146
+ )
147
+ ) : (
148
+ <div className="flex gap-1">
149
+ <Button
150
+ onClick={onSave}
151
+ size="sm"
152
+ variant="default"
153
+ >
154
+ Save
155
+ </Button>
156
+ <Button
157
+ onClick={onCancel}
158
+ size="sm"
159
+ variant="outline"
160
+ >
161
+ Cancel
162
+ </Button>
163
+ </div>
164
+ )}
165
+ </div>
148
166
  </td>
149
167
  ))}
150
168
  {actions.length > 0 && (
@@ -349,36 +349,61 @@ const MemoizedRow = ({
349
349
  className: "px-3 py-2 pl-8 whitespace-normal break-words"
350
350
  })}
351
351
  >
352
- {isSubRowEditing && cell.column.id !== 'actions' ? (
353
- renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
354
- if (typeof value === 'object' && value !== null) {
355
- onEditingDataChange?.({ ...editingData, ...value });
356
- } else {
357
- onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
358
- }
359
- }, editingData)
360
- ) : cell.column.id === 'actions' ? (
361
- <ActionButtons
362
- row={row}
363
- actions={actions}
364
- isEditing={isEditing}
365
- isParent={isParent}
366
- hierarchical={!!hierarchical}
367
- rbac={rbac}
368
- permissions={permissions}
369
- />
370
- ) : (
371
- flexRender(cell.column.columnDef.cell, {
372
- ...cell.getContext(),
373
- hierarchical: hierarchical,
374
- isParent: false,
375
- isChild: true,
376
- isHierarchical: false,
377
- rowId: subRowId,
378
- isExpanded: false,
379
- hasChildren: false
380
- })
381
- )}
352
+ <div className={`${cell.column.columnDef.meta?.align === 'right' ? 'text-right' : ''}`}>
353
+ {isSubRowEditing && cell.column.id !== 'actions' ? (
354
+ // Check if column has a custom cell renderer - if so, use it in edit mode
355
+ cell.column.columnDef.cell ? (
356
+ flexRender(cell.column.columnDef.cell, {
357
+ ...cell.getContext(),
358
+ hierarchical: hierarchical,
359
+ isParent: false,
360
+ isChild: true,
361
+ isHierarchical: false,
362
+ rowId: subRowId,
363
+ isExpanded: false,
364
+ hasChildren: false,
365
+ getIsEditing: () => true, // Always true in edit mode
366
+ setValue: (value: any) => {
367
+ if (typeof value === 'object' && value !== null) {
368
+ onEditingDataChange?.({ ...editingData, ...value });
369
+ } else {
370
+ onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
371
+ }
372
+ }
373
+ })
374
+ ) : (
375
+ // Fall back to default edit field rendering when no custom cell renderer
376
+ renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
377
+ if (typeof value === 'object' && value !== null) {
378
+ onEditingDataChange?.({ ...editingData, ...value });
379
+ } else {
380
+ onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
381
+ }
382
+ }, editingData)
383
+ )
384
+ ) : cell.column.id === 'actions' ? (
385
+ <ActionButtons
386
+ row={row}
387
+ actions={actions}
388
+ isEditing={isEditing}
389
+ isParent={isParent}
390
+ hierarchical={!!hierarchical}
391
+ rbac={rbac}
392
+ permissions={permissions}
393
+ />
394
+ ) : (
395
+ flexRender(cell.column.columnDef.cell, {
396
+ ...cell.getContext(),
397
+ hierarchical: hierarchical,
398
+ isParent: false,
399
+ isChild: true,
400
+ isHierarchical: false,
401
+ rowId: subRowId,
402
+ isExpanded: false,
403
+ hasChildren: false
404
+ })
405
+ )}
406
+ </div>
382
407
  </td>
383
408
  ))}
384
409
  </tr>
@@ -468,15 +493,38 @@ const MemoizedRow = ({
468
493
  )}
469
494
 
470
495
  {/* Cell content */}
471
- <div className="flex-1">
496
+ <div className={`flex-1 ${cell.column.columnDef.meta?.align === 'right' ? 'text-right' : ''}`}>
472
497
  {isEditing && cell.column.id !== 'actions' ? (
473
- renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
474
- if (typeof value === 'object' && value !== null) {
475
- onEditingDataChange?.({ ...editingData, ...value });
476
- } else {
477
- onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
478
- }
479
- }, editingData)
498
+ // Check if column has a custom cell renderer - if so, use it in edit mode
499
+ cell.column.columnDef.cell ? (
500
+ flexRender(cell.column.columnDef.cell, {
501
+ ...cell.getContext(),
502
+ hierarchical: hierarchical,
503
+ isParent: isParent,
504
+ isChild: isChild,
505
+ isHierarchical: isHierarchical,
506
+ rowId: rowId,
507
+ isExpanded: isExpanded,
508
+ hasChildren: hasChildren,
509
+ getIsEditing: () => true, // Always true in edit mode
510
+ setValue: (value: any) => {
511
+ if (typeof value === 'object' && value !== null) {
512
+ onEditingDataChange?.({ ...editingData, ...value });
513
+ } else {
514
+ onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
515
+ }
516
+ }
517
+ })
518
+ ) : (
519
+ // Fall back to default edit field rendering when no custom cell renderer
520
+ renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
521
+ if (typeof value === 'object' && value !== null) {
522
+ onEditingDataChange?.({ ...editingData, ...value });
523
+ } else {
524
+ onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
525
+ }
526
+ }, editingData)
527
+ )
480
528
  ) : cell.column.id === 'actions' ? (
481
529
  isEditing ? (
482
530
  <div className="flex gap-1">