@jmruthers/pace-core 0.6.6 → 0.6.7

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 (246) hide show
  1. package/{scripts/audit/audit-dependencies.cjs → audit-tool/00-dependencies.cjs} +12 -13
  2. package/audit-tool/audits/01-pace-core-compliance.cjs +556 -0
  3. package/audit-tool/audits/02-project-structure.cjs +255 -0
  4. package/audit-tool/audits/03-architecture.cjs +196 -0
  5. package/audit-tool/audits/04-code-quality.cjs +149 -0
  6. package/audit-tool/audits/05-styling.cjs +224 -0
  7. package/audit-tool/audits/06-security-rbac.cjs +544 -0
  8. package/audit-tool/audits/07-api-tech-stack.cjs +301 -0
  9. package/audit-tool/audits/08-testing-documentation.cjs +202 -0
  10. package/audit-tool/audits/09-operations.cjs +208 -0
  11. package/audit-tool/index.cjs +291 -0
  12. package/audit-tool/utils/code-utils.cjs +218 -0
  13. package/audit-tool/utils/file-utils.cjs +230 -0
  14. package/audit-tool/utils/report-utils.cjs +241 -0
  15. package/cursor-rules/00-standards-overview.mdc +156 -0
  16. package/cursor-rules/{00-pace-core-compliance.mdc → 01-pace-core-compliance.mdc} +187 -34
  17. package/cursor-rules/02-project-structure.mdc +37 -5
  18. package/cursor-rules/{03-solid-principles.mdc → 03-architecture.mdc} +125 -11
  19. package/cursor-rules/04-code-quality.mdc +419 -0
  20. package/cursor-rules/{08-markup-quality.mdc → 05-styling.mdc} +55 -10
  21. package/cursor-rules/{09-rbac-compliance.mdc → 06-security-rbac.mdc} +62 -6
  22. package/cursor-rules/07-api-tech-stack.mdc +377 -0
  23. package/cursor-rules/08-testing-documentation.mdc +324 -0
  24. package/cursor-rules/09-operations.mdc +365 -0
  25. package/dist/DataTable-7PMH7XN7.js +15 -0
  26. package/dist/{DataTable-2N_tqbfq.d.ts → DataTable-DRUIgtUH.d.ts} +1 -1
  27. package/dist/{PublicPageProvider-BBH6Vqg7.d.ts → PublicPageProvider-DlsCaR5v.d.ts} +26 -16
  28. package/dist/{chunk-FENMYN2U.js → chunk-5X4QLXRG.js} +1 -3
  29. package/dist/{chunk-4T7OBVTU.js → chunk-6F3IILHI.js} +1 -1
  30. package/dist/{chunk-SD6WQY43.js → chunk-7ILTDCL2.js} +9 -1
  31. package/dist/{chunk-3QC3KRHK.js → chunk-A3W6LW53.js} +16 -1
  32. package/dist/{chunk-7TYHROIV.js → chunk-BM4CQ5P3.js} +50 -8
  33. package/dist/{chunk-2HGJFNAH.js → chunk-FEJLJNWA.js} +1 -15
  34. package/dist/{chunk-OHIK3MIO.js → chunk-GHYHJTYV.js} +2 -2
  35. package/dist/{chunk-UIYSCEV7.js → chunk-IUBRCBSY.js} +1 -1
  36. package/dist/{chunk-LAZMKTTF.js → chunk-JGWDVX64.js} +281 -347
  37. package/dist/{chunk-MAGBIDNS.js → chunk-L4XMVJKY.js} +2 -2
  38. package/dist/{chunk-A55DK444.js → chunk-OJ4SKRSV.js} +1 -7
  39. package/dist/{chunk-ZS5VO5JB.js → chunk-Q7Q7V5NV.js} +406 -451
  40. package/dist/{chunk-3O3WHILE.js → chunk-VBCS3DUA.js} +236 -60
  41. package/dist/{chunk-BVP2BCJF.js → chunk-ZKAWKYT4.js} +8 -8
  42. package/dist/components.d.ts +5 -4
  43. package/dist/components.js +27 -32
  44. package/dist/eslint-rules/index.cjs +22 -9
  45. package/{src/eslint-rules/rules/compliance.cjs → dist/eslint-rules/rules/01-pace-core-compliance.cjs} +184 -23
  46. package/dist/eslint-rules/rules/04-code-quality.cjs +290 -0
  47. package/dist/eslint-rules/rules/05-styling.cjs +61 -0
  48. package/dist/eslint-rules/rules/{rbac.cjs → 06-security-rbac.cjs} +26 -10
  49. package/dist/eslint-rules/rules/07-api-tech-stack.cjs +263 -0
  50. package/dist/eslint-rules/rules/08-testing.cjs +94 -0
  51. package/dist/hooks.d.ts +5 -5
  52. package/dist/hooks.js +6 -6
  53. package/dist/index.d.ts +6 -6
  54. package/dist/index.js +18 -17
  55. package/dist/rbac/index.js +6 -6
  56. package/dist/theming/runtime.d.ts +14 -1
  57. package/dist/theming/runtime.js +1 -1
  58. package/dist/{types-B-K_5VnO.d.ts → types-DXstZpNI.d.ts} +0 -17
  59. package/dist/{usePublicRouteParams-COZ28Mvq.d.ts → usePublicRouteParams-MamNgwqe.d.ts} +19 -19
  60. package/dist/utils.d.ts +2 -2
  61. package/dist/utils.js +8 -8
  62. package/docs/README.md +1 -1
  63. package/docs/api/modules.md +47 -31
  64. package/docs/api-reference/components.md +18 -20
  65. package/docs/api-reference/hooks.md +80 -80
  66. package/docs/api-reference/types.md +1 -1
  67. package/docs/api-reference/utilities.md +1 -1
  68. package/docs/architecture/README.md +1 -1
  69. package/docs/core-concepts/events.md +3 -3
  70. package/docs/core-concepts/organisations.md +6 -6
  71. package/docs/core-concepts/permissions.md +6 -6
  72. package/docs/documentation-index.md +12 -18
  73. package/docs/getting-started/documentation-index.md +1 -1
  74. package/docs/getting-started/examples/README.md +4 -4
  75. package/docs/getting-started/examples/full-featured-app.md +1 -1
  76. package/docs/getting-started/faq.md +2 -2
  77. package/docs/getting-started/quick-reference.md +4 -4
  78. package/docs/implementation-guides/authentication.md +15 -15
  79. package/docs/implementation-guides/component-styling.md +1 -1
  80. package/docs/implementation-guides/data-tables.md +126 -33
  81. package/docs/implementation-guides/datatable-rbac-usage.md +1 -1
  82. package/docs/implementation-guides/dynamic-colors.md +3 -3
  83. package/docs/implementation-guides/file-upload-storage.md +2 -2
  84. package/docs/implementation-guides/hierarchical-datatable.md +40 -60
  85. package/docs/implementation-guides/inactivity-tracking.md +3 -3
  86. package/docs/implementation-guides/large-datasets.md +3 -2
  87. package/docs/implementation-guides/organisation-security.md +2 -2
  88. package/docs/implementation-guides/performance.md +2 -2
  89. package/docs/implementation-guides/permission-enforcement.md +1 -1
  90. package/docs/migration/V0.3.44_organisation-context-timing-fix.md +1 -1
  91. package/docs/migration/V0.4.0_rbac-migration.md +6 -6
  92. package/docs/rbac/README.md +5 -5
  93. package/docs/rbac/advanced-patterns.md +6 -6
  94. package/docs/rbac/api-reference.md +20 -20
  95. package/docs/rbac/event-based-apps.md +3 -3
  96. package/docs/rbac/examples.md +41 -41
  97. package/docs/rbac/getting-started.md +37 -37
  98. package/docs/rbac/performance.md +1 -1
  99. package/docs/rbac/quick-start.md +52 -52
  100. package/docs/rbac/secure-client-protection.md +1 -1
  101. package/docs/rbac/troubleshooting.md +1 -1
  102. package/docs/security/README.md +5 -5
  103. package/docs/standards/0-standards-overview.md +220 -0
  104. package/docs/standards/{00-pace-core-compliance.md → 1-pace-core-compliance-standards.md} +204 -185
  105. package/docs/standards/{02-project-structure.md → 2-project-structure-standards.md} +11 -47
  106. package/docs/standards/3-architecture-standards.md +606 -0
  107. package/docs/standards/4-code-quality-standards.md +728 -0
  108. package/docs/standards/{08-markup-quality.md → 5-styling-standards.md} +12 -9
  109. package/docs/standards/{09-rbac-compliance.md → 6-security-rbac-standards.md} +126 -18
  110. package/docs/standards/7-api-tech-stack-standards.md +662 -0
  111. package/docs/standards/8-testing-documentation-standards.md +401 -0
  112. package/docs/standards/9-operations-standards.md +1102 -0
  113. package/docs/standards/README.md +203 -104
  114. package/docs/troubleshooting/README.md +4 -4
  115. package/docs/troubleshooting/common-issues.md +2 -2
  116. package/docs/troubleshooting/debugging.md +9 -9
  117. package/docs/troubleshooting/migration.md +4 -4
  118. package/eslint-config-pace-core.cjs +21 -10
  119. package/package.json +6 -5
  120. package/scripts/install-cursor-rules.cjs +11 -243
  121. package/scripts/install-eslint-config.cjs +284 -0
  122. package/src/__tests__/helpers/__tests__/component-test-utils.test.tsx +2 -2
  123. package/src/__tests__/helpers/__tests__/test-providers.test.tsx +2 -2
  124. package/src/__tests__/helpers/__tests__/test-utils.test.tsx +10 -10
  125. package/src/__tests__/integration/UserProfile.test.tsx +14 -14
  126. package/src/__tests__/rbac/PagePermissionGuard.test.tsx +6 -6
  127. package/src/__tests__/templates/accessibility.test.template.tsx +9 -9
  128. package/src/__tests__/templates/component.test.template.tsx +18 -15
  129. package/src/components/Calendar/Calendar.tsx +201 -47
  130. package/src/components/ContextSelector/ContextSelector.tsx +137 -153
  131. package/src/components/DataTable/AUDIT_REPORT.md +293 -0
  132. package/src/components/DataTable/__tests__/DataTableCore.test.tsx +10 -2
  133. package/src/components/DataTable/__tests__/a11y.basic.test.tsx +10 -4
  134. package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +9 -9
  135. package/src/components/DataTable/components/ColumnFilter.tsx +63 -74
  136. package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +43 -41
  137. package/src/components/DataTable/components/DataTableErrorBoundary.tsx +9 -11
  138. package/src/components/DataTable/components/DataTableLayout.tsx +5 -16
  139. package/src/components/DataTable/components/EditableRow.tsx +5 -7
  140. package/src/components/DataTable/components/EmptyState.tsx +10 -9
  141. package/src/components/DataTable/components/FilterRow.tsx +2 -4
  142. package/src/components/DataTable/components/ImportModal.tsx +124 -126
  143. package/src/components/DataTable/components/LoadingState.tsx +5 -6
  144. package/src/components/DataTable/components/SortIndicator.tsx +50 -0
  145. package/src/components/DataTable/components/__tests__/COVERAGE_NOTE.md +4 -4
  146. package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +23 -82
  147. package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.test.tsx +37 -9
  148. package/src/components/DataTable/components/__tests__/EmptyState.test.tsx +7 -4
  149. package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +12 -4
  150. package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +41 -27
  151. package/src/components/DataTable/components/index.ts +2 -1
  152. package/src/components/DataTable/types.ts +0 -18
  153. package/src/components/DataTable/utils/a11yUtils.ts +17 -0
  154. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +2 -1
  155. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +11 -15
  156. package/src/components/DateTimeField/DateTimeField.tsx +7 -8
  157. package/src/components/Dialog/Dialog.test.tsx +1 -0
  158. package/src/components/Dialog/Dialog.tsx +25 -8
  159. package/src/components/ErrorBoundary/ErrorBoundary.tsx +77 -79
  160. package/src/components/FileUpload/FileUpload.test.tsx +52 -14
  161. package/src/components/FileUpload/FileUpload.tsx +112 -130
  162. package/src/components/Progress/Progress.tsx +2 -4
  163. package/src/components/ProtectedRoute/ProtectedRoute.tsx +8 -8
  164. package/src/components/Select/Select.tsx +86 -77
  165. package/src/components/Select/types.ts +3 -0
  166. package/src/hooks/__tests__/ServiceHooks.test.tsx +16 -16
  167. package/src/hooks/__tests__/hooks.integration.test.tsx +49 -49
  168. package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +97 -97
  169. package/src/hooks/public/usePublicEvent.ts +5 -5
  170. package/src/hooks/public/usePublicEventLogo.ts +5 -5
  171. package/src/hooks/public/usePublicFileDisplay.ts +2 -2
  172. package/src/hooks/public/usePublicRouteParams.ts +5 -5
  173. package/src/hooks/useAppConfig.ts +2 -2
  174. package/src/hooks/useEventTheme.test.ts +7 -7
  175. package/src/hooks/useEventTheme.ts +1 -4
  176. package/src/hooks/useFileDisplay.ts +2 -2
  177. package/src/providers/UnifiedAuthProvider.smoke.test.tsx +21 -21
  178. package/src/providers/__tests__/AuthProvider.test.tsx +21 -21
  179. package/src/providers/__tests__/EventProvider.test.tsx +61 -61
  180. package/src/providers/__tests__/InactivityProvider.test.tsx +56 -56
  181. package/src/providers/__tests__/OrganisationProvider.test.tsx +75 -75
  182. package/src/providers/__tests__/ProviderLifecycle.test.tsx +37 -37
  183. package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +103 -103
  184. package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +7 -7
  185. package/src/providers/services/__tests__/UnifiedAuthProvider.integration.test.tsx +10 -10
  186. package/src/styles/core.css +7 -0
  187. package/src/theming/__tests__/parseEventColours.test.ts +9 -3
  188. package/src/theming/parseEventColours.ts +22 -10
  189. package/src/utils/__tests__/lazyLoad.unit.test.tsx +42 -39
  190. package/src/utils/storage/README.md +1 -1
  191. package/cursor-rules/01-standards-compliance.mdc +0 -285
  192. package/cursor-rules/04-testing-standards.mdc +0 -270
  193. package/cursor-rules/05-bug-reports-and-features.mdc +0 -248
  194. package/cursor-rules/06-code-quality.mdc +0 -311
  195. package/cursor-rules/07-tech-stack-compliance.mdc +0 -216
  196. package/cursor-rules/10-error-handling-patterns.mdc +0 -179
  197. package/cursor-rules/11-performance-optimization.mdc +0 -169
  198. package/cursor-rules/12-ci-cd-integration.mdc +0 -150
  199. package/dist/DataTable-LRJL4IRV.js +0 -15
  200. package/dist/eslint-rules/rules/compliance.cjs +0 -348
  201. package/dist/eslint-rules/rules/components.cjs +0 -113
  202. package/dist/eslint-rules/rules/imports.cjs +0 -102
  203. package/docs/best-practices/README.md +0 -472
  204. package/docs/best-practices/accessibility.md +0 -604
  205. package/docs/best-practices/common-patterns.md +0 -516
  206. package/docs/best-practices/deployment.md +0 -1103
  207. package/docs/best-practices/performance.md +0 -1328
  208. package/docs/best-practices/security.md +0 -940
  209. package/docs/best-practices/testing.md +0 -1034
  210. package/docs/rbac/compliance/compliance-guide.md +0 -544
  211. package/docs/standards/01-standards-compliance.md +0 -188
  212. package/docs/standards/03-solid-principles.md +0 -39
  213. package/docs/standards/04-testing-standards.md +0 -36
  214. package/docs/standards/05-bug-reports-and-features.md +0 -27
  215. package/docs/standards/06-code-quality.md +0 -34
  216. package/docs/standards/07-tech-stack-compliance.md +0 -30
  217. package/docs/standards/10-error-handling-patterns.md +0 -401
  218. package/docs/standards/11-performance-optimization.md +0 -348
  219. package/docs/standards/12-ci-cd-integration.md +0 -370
  220. package/docs/standards/ALIGNMENT_REVIEW_SUMMARY.md +0 -192
  221. package/scripts/audit/audit-compliance.cjs +0 -1295
  222. package/scripts/audit/audit-components.cjs +0 -260
  223. package/scripts/audit/audit-rbac.cjs +0 -954
  224. package/scripts/audit/audit-standards.cjs +0 -1268
  225. package/scripts/audit/index.cjs +0 -1927
  226. package/src/components/DataTable/components/DataTableBody.tsx +0 -478
  227. package/src/components/DataTable/components/DraggableColumnHeader.tsx +0 -156
  228. package/src/components/DataTable/components/ExpandButton.tsx +0 -113
  229. package/src/components/DataTable/components/GroupHeader.tsx +0 -54
  230. package/src/components/DataTable/components/ViewRowModal.tsx +0 -68
  231. package/src/components/DataTable/components/VirtualizedDataTable.tsx +0 -525
  232. package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +0 -462
  233. package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +0 -393
  234. package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +0 -476
  235. package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +0 -128
  236. package/src/components/DataTable/core/DataTableContext.tsx +0 -216
  237. package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +0 -136
  238. package/src/components/DataTable/hooks/__tests__/useColumnReordering.test.ts +0 -570
  239. package/src/components/DataTable/hooks/useColumnReordering.ts +0 -123
  240. package/src/components/DataTable/utils/debugTools.ts +0 -514
  241. package/src/eslint-rules/index.cjs +0 -22
  242. package/src/eslint-rules/rules/components.cjs +0 -113
  243. package/src/eslint-rules/rules/imports.cjs +0 -102
  244. package/src/eslint-rules/rules/rbac.cjs +0 -790
  245. package/src/eslint-rules/utils/helpers.cjs +0 -42
  246. package/src/eslint-rules/utils/manifest-loader.cjs +0 -75
@@ -1,25 +1,30 @@
1
- import { Button, useResolvedScope, useCan } from './chunk-7TYHROIV.js';
1
+ import { Button, ButtonGroup, useResolvedScope, useCan } from './chunk-BM4CQ5P3.js';
2
2
  import { useFocusTrap, useDataTablePerformance, toast } from './chunk-S7DKJPLT.js';
3
+ import { Card, CardHeader, CardDescription, CardContent, CardFooter, CardTitle } from './chunk-VBCS3DUA.js';
3
4
  import { useUnifiedAuth } from './chunk-FTCRZOG2.js';
4
5
  import { isSuperAdmin } from './chunk-ZFYPMX46.js';
5
- import { renderSafeHtml } from './chunk-3QC3KRHK.js';
6
- import { cn } from './chunk-A55DK444.js';
6
+ import { renderSafeHtml, LoadingSpinner } from './chunk-A3W6LW53.js';
7
+ import { cn } from './chunk-7ILTDCL2.js';
7
8
  import { createLogger } from './chunk-TTRFSOKR.js';
8
9
  import * as React7 from 'react';
9
10
  import React7__default, { useState, useRef, useId, useCallback, useEffect, useMemo, Component, useLayoutEffect, useReducer } from 'react';
10
11
  import { flexRender, useReactTable, getExpandedRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, getCoreRowModel } from '@tanstack/react-table';
11
- import { useLocation, useNavigate } from 'react-router-dom';
12
- import { ChevronDown, Search, X, Check, MoreHorizontal, ChevronRight, Group, Settings2, Eye, EyeOff, Filter, Plus, Upload, Download, Trash2, Database, User, ChevronsLeft, ChevronLeft, ChevronsRight, FileText, AlertCircle, Trash, Zap, Server, Edit, ShieldX, RefreshCw, ArrowLeft, ChevronUp, ChevronsUpDown } from 'lucide-react';
12
+ import { useLocation } from 'react-router-dom';
13
+ import { ChevronDown, Search, X, Check, MoreHorizontal, ChevronRight, ChevronUp, ChevronsUpDown, Group, Settings2, Eye, EyeOff, Filter, Plus, Upload, Download, Trash2, Database, User, ChevronsLeft, ChevronLeft, ChevronsRight, FileText, AlertCircle, Trash, Zap, Server, Edit, ShieldX, RefreshCw, ArrowLeft } from 'lucide-react';
13
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
+ import * as LabelPrimitive from '@radix-ui/react-label';
14
16
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
15
17
  import { useVirtualizer } from '@tanstack/react-virtual';
16
18
  import { createPortal } from 'react-dom';
17
19
 
18
20
  function LoadingState() {
19
- return /* @__PURE__ */ jsx("div", { className: "p-8 text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center space-x-2", children: [
20
- /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full size-6 border-b-2 border-primary" }),
21
- /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "text-muted-foreground", children: "Loading..." })
22
- ] }) });
21
+ return /* @__PURE__ */ jsxs("p", { className: "grid place-items-center text-center p-8", children: [
22
+ /* @__PURE__ */ jsx(LoadingSpinner, {}),
23
+ /* @__PURE__ */ jsx("strong", { children: "Loading..." })
24
+ ] });
25
+ }
26
+ function SortIndicator({ sortState, className }) {
27
+ return /* @__PURE__ */ jsx(Fragment, { children: sortState === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: cn("size-4", className) }) : sortState === "desc" ? /* @__PURE__ */ jsx(ChevronDown, { className: cn("size-4", className) }) : /* @__PURE__ */ jsx(ChevronsUpDown, { className: cn("size-4", className) }) });
23
28
  }
24
29
  function Input({ className, variant = "default", size = "md", error, type, ref, ...props }) {
25
30
  return /* @__PURE__ */ jsx(
@@ -300,6 +305,7 @@ var Select = React7.forwardRef(
300
305
  children,
301
306
  className,
302
307
  direction = "down",
308
+ showCheckmark = true,
303
309
  ...selectProps
304
310
  }, ref) => {
305
311
  const internalRef = React7.useRef(null);
@@ -399,8 +405,9 @@ var Select = React7.forwardRef(
399
405
  actions,
400
406
  registerItem,
401
407
  unregisterItem,
402
- direction
403
- }), [state, actions, registerItem, unregisterItem, direction]);
408
+ direction,
409
+ showCheckmark
410
+ }), [state, actions, registerItem, unregisterItem, direction, showCheckmark]);
404
411
  return /* @__PURE__ */ jsx(
405
412
  "fieldset",
406
413
  {
@@ -634,7 +641,7 @@ var SelectContent = React7.forwardRef(
634
641
  "data-testid": "select-content",
635
642
  role: "listbox",
636
643
  children: [
637
- searchable && /* @__PURE__ */ jsx("div", { className: "p-2 border-b border-main-200", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
644
+ searchable && /* @__PURE__ */ jsxs("li", { className: "relative p-2 border-b border-main-200 sticky top-0 bg-main-50 z-10", "data-testid": "select-search-item", children: [
638
645
  /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-1/2 transform -translate-y-1/2 size-4 text-main-400" }),
639
646
  /* @__PURE__ */ jsx(
640
647
  "input",
@@ -666,7 +673,7 @@ var SelectContent = React7.forwardRef(
666
673
  children: /* @__PURE__ */ jsx(X, { className: "size-4" })
667
674
  }
668
675
  )
669
- ] }) }),
676
+ ] }),
670
677
  filteredChildren
671
678
  ]
672
679
  }
@@ -675,9 +682,10 @@ var SelectContent = React7.forwardRef(
675
682
  );
676
683
  SelectContent.displayName = "SelectContent";
677
684
  var SelectItem = React7.forwardRef(
678
- ({ value, children, disabled = false, className, onClick }, ref) => {
679
- const { value: selectedValue, actions, registerItem, unregisterItem } = useSelectContext();
685
+ ({ value, children, disabled = false, className, onClick, showCheckmark: propShowCheckmark }, ref) => {
686
+ const { value: selectedValue, actions, registerItem, unregisterItem, showCheckmark: contextShowCheckmark = true } = useSelectContext();
680
687
  const isSelected = selectedValue === value;
688
+ const showCheckmark = propShowCheckmark ?? contextShowCheckmark;
681
689
  const itemText = getTextContent(children);
682
690
  React7.useLayoutEffect(() => {
683
691
  if (registerItem && itemText) {
@@ -747,7 +755,7 @@ var SelectItem = React7.forwardRef(
747
755
  tabIndex: disabled ? -1 : 0,
748
756
  children: [
749
757
  children,
750
- isSelected && /* @__PURE__ */ jsx(Check, { className: "absolute right-2 size-4 flex-shrink-0 mt-0.5" })
758
+ isSelected && showCheckmark && /* @__PURE__ */ jsx(Check, { className: "absolute right-2 size-4 flex-shrink-0 mt-0.5" })
751
759
  ]
752
760
  }
753
761
  );
@@ -756,20 +764,28 @@ var SelectItem = React7.forwardRef(
756
764
  SelectItem.displayName = "SelectItem";
757
765
  var SelectGroup = React7.forwardRef(
758
766
  ({ children, className }, ref) => {
759
- return /* @__PURE__ */ jsx("div", { ref, className: cn("p-1", className), "data-testid": "select-group", children });
767
+ return /* @__PURE__ */ jsx("li", { className: "list-none", "data-testid": "select-group-wrapper", children: /* @__PURE__ */ jsx(
768
+ "ul",
769
+ {
770
+ ref,
771
+ className: cn("p-1 list-none m-0", className),
772
+ "data-testid": "select-group",
773
+ children
774
+ }
775
+ ) });
760
776
  }
761
777
  );
762
778
  SelectGroup.displayName = "SelectGroup";
763
779
  var SelectLabel = React7.forwardRef(
764
780
  ({ children, className }, ref) => {
765
- return /* @__PURE__ */ jsx("div", { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), "data-testid": "select-label", children });
781
+ return /* @__PURE__ */ jsx("li", { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), "data-testid": "select-label", children });
766
782
  }
767
783
  );
768
784
  SelectLabel.displayName = "SelectLabel";
769
785
  var SelectSeparator = React7.forwardRef(
770
786
  ({ className }, ref) => {
771
787
  return /* @__PURE__ */ jsx(
772
- "div",
788
+ "hr",
773
789
  {
774
790
  ref,
775
791
  className: cn("my-1 h-px bg-sec-200", className),
@@ -851,6 +867,65 @@ function GroupingDropdown({
851
867
  ] })
852
868
  ] });
853
869
  }
870
+ var getLabelClasses = () => {
871
+ return "font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70";
872
+ };
873
+ var Label = React7.forwardRef(({
874
+ className,
875
+ required = false,
876
+ requiredIndicator,
877
+ hideRequiredIndicator = false,
878
+ helperText,
879
+ helperTextClassName,
880
+ error,
881
+ errorClassName,
882
+ children,
883
+ htmlFor,
884
+ ...props
885
+ }, ref) => {
886
+ const hasError = !!error;
887
+ const showHelperText = helperText && !hasError;
888
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
889
+ /* @__PURE__ */ jsxs(
890
+ LabelPrimitive.Root,
891
+ {
892
+ ref,
893
+ className: cn(
894
+ getLabelClasses(),
895
+ hasError && "text-destructive",
896
+ className
897
+ ),
898
+ htmlFor,
899
+ ...props,
900
+ children: [
901
+ children,
902
+ required && /* @__PURE__ */ jsx(
903
+ "span",
904
+ {
905
+ "aria-label": "required",
906
+ className: cn(
907
+ "text-destructive ml-1",
908
+ hideRequiredIndicator && "sr-only"
909
+ ),
910
+ children: requiredIndicator || "*"
911
+ }
912
+ )
913
+ ]
914
+ }
915
+ ),
916
+ showHelperText && /* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground", helperTextClassName), children: helperText }),
917
+ hasError && /* @__PURE__ */ jsx(
918
+ "p",
919
+ {
920
+ role: "alert",
921
+ "aria-live": "polite",
922
+ className: cn("text-destructive", errorClassName),
923
+ children: error
924
+ }
925
+ )
926
+ ] });
927
+ });
928
+ Label.displayName = LabelPrimitive.Root.displayName;
854
929
  var Checkbox = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
855
930
  CheckboxPrimitive.Root,
856
931
  {
@@ -877,7 +952,7 @@ function ColumnVisibilityDropdown({
877
952
  const toggleableColumns = columns.filter(
878
953
  (column) => column.getCanHide() && column.id !== "actions"
879
954
  );
880
- return /* @__PURE__ */ jsxs(Select, { className: "w-52", children: [
955
+ return /* @__PURE__ */ jsxs(Select, { className: "w-52", showCheckmark: false, children: [
881
956
  /* @__PURE__ */ jsx(SelectTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
882
957
  Button,
883
958
  {
@@ -888,14 +963,14 @@ function ColumnVisibilityDropdown({
888
963
  ]
889
964
  }
890
965
  ) }),
891
- /* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsxs("div", { className: "p-2 space-y-1", children: [
892
- /* @__PURE__ */ jsxs("div", { className: "flex gap-1 mb-2", children: [
966
+ /* @__PURE__ */ jsxs(SelectContent, { children: [
967
+ /* @__PURE__ */ jsxs(SelectGroup, { className: "flex flex-row gap-1 p-2", children: [
893
968
  /* @__PURE__ */ jsxs(
894
969
  Button,
895
970
  {
896
971
  variant: "ghost",
897
972
  size: "sm",
898
- className: "h-7 px-2 text-xs",
973
+ className: "h-7 px-2 text-xs flex-1",
899
974
  onClick: () => {
900
975
  toggleableColumns.forEach((column) => {
901
976
  if (!column.getIsVisible()) {
@@ -914,7 +989,7 @@ function ColumnVisibilityDropdown({
914
989
  {
915
990
  variant: "ghost",
916
991
  size: "sm",
917
- className: "h-7 px-2 text-xs",
992
+ className: "h-7 px-2 text-xs flex-1",
918
993
  onClick: () => {
919
994
  toggleableColumns.forEach((column) => {
920
995
  if (column.getIsVisible()) {
@@ -930,34 +1005,34 @@ function ColumnVisibilityDropdown({
930
1005
  )
931
1006
  ] }),
932
1007
  /* @__PURE__ */ jsx(SelectSeparator, {}),
933
- toggleableColumns.map((column) => /* @__PURE__ */ jsxs(
1008
+ /* @__PURE__ */ jsx(SelectGroup, { children: toggleableColumns.map((column) => /* @__PURE__ */ jsx(
934
1009
  SelectItem,
935
1010
  {
936
1011
  value: column.id,
937
1012
  className: "flex items-center space-x-2 cursor-pointer px-3 py-2 text-sm hover:bg-sec-50",
938
1013
  onClick: (e) => e.preventDefault(),
939
- children: [
940
- /* @__PURE__ */ jsx(
941
- Checkbox,
942
- {
943
- id: column.id,
944
- checked: column.getIsVisible(),
945
- onCheckedChange: (checked) => onColumnVisibilityChange(column.id, !!checked)
946
- }
947
- ),
948
- /* @__PURE__ */ jsx(
949
- "label",
950
- {
951
- htmlFor: column.id,
952
- className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
953
- children: typeof column.columnDef?.header === "string" ? column.columnDef.header : column.id
954
- }
955
- )
956
- ]
1014
+ children: /* @__PURE__ */ jsxs(
1015
+ Label,
1016
+ {
1017
+ htmlFor: column.id,
1018
+ children: [
1019
+ /* @__PURE__ */ jsx(
1020
+ Checkbox,
1021
+ {
1022
+ className: "mr-2 align-middle",
1023
+ id: column.id,
1024
+ checked: column.getIsVisible(),
1025
+ onCheckedChange: (checked) => onColumnVisibilityChange(column.id, !!checked)
1026
+ }
1027
+ ),
1028
+ typeof column.columnDef?.header === "string" ? column.columnDef.header : column.id
1029
+ ]
1030
+ }
1031
+ )
957
1032
  },
958
1033
  column.id
959
- ))
960
- ] }) })
1034
+ )) })
1035
+ ] })
961
1036
  ] });
962
1037
  }
963
1038
  function DataTableToolbar({
@@ -1067,6 +1142,63 @@ function DataTableToolbar({
1067
1142
  )
1068
1143
  ] });
1069
1144
  }
1145
+ var AlertContext = React7.createContext({ variant: "default" });
1146
+ var getAlertClasses = (variant = "default") => {
1147
+ const baseClasses = "relative w-full rounded-lg border p-4";
1148
+ const variantClasses = {
1149
+ default: "bg-background text-foreground",
1150
+ destructive: "border-destructive text-destructive",
1151
+ inline: ""
1152
+ // No classes for inline variant as it renders as fragment
1153
+ };
1154
+ return `${baseClasses} ${variantClasses[variant]}`;
1155
+ };
1156
+ var Alert = React7.forwardRef(({ className, variant = "default", ...props }, ref) => {
1157
+ const contextValue = React7.useMemo(() => ({ variant }), [variant]);
1158
+ if (variant === "inline") {
1159
+ return /* @__PURE__ */ jsx(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(React7.Fragment, { ...props }) });
1160
+ }
1161
+ return /* @__PURE__ */ jsx(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1162
+ "aside",
1163
+ {
1164
+ ref,
1165
+ className: cn(getAlertClasses(variant), className),
1166
+ role: "alert",
1167
+ ...props
1168
+ }
1169
+ ) });
1170
+ });
1171
+ Alert.displayName = "Alert";
1172
+ var AlertTitle = React7.forwardRef(({ className, ...props }, ref) => {
1173
+ const { variant } = React7.useContext(AlertContext);
1174
+ if (variant === "inline") {
1175
+ return /* @__PURE__ */ jsx("strong", { ...props });
1176
+ }
1177
+ return /* @__PURE__ */ jsx(
1178
+ "h5",
1179
+ {
1180
+ ref,
1181
+ className: cn(className),
1182
+ ...props
1183
+ }
1184
+ );
1185
+ });
1186
+ AlertTitle.displayName = "AlertTitle";
1187
+ var AlertDescription = React7.forwardRef(({ className, ...props }, ref) => {
1188
+ const { variant } = React7.useContext(AlertContext);
1189
+ if (variant === "inline") {
1190
+ return /* @__PURE__ */ jsx("span", { ...props });
1191
+ }
1192
+ return /* @__PURE__ */ jsx(
1193
+ "p",
1194
+ {
1195
+ ref,
1196
+ className: cn(className),
1197
+ ...props
1198
+ }
1199
+ );
1200
+ });
1201
+ AlertDescription.displayName = "AlertDescription";
1070
1202
  function EmptyState({
1071
1203
  title,
1072
1204
  description,
@@ -1078,11 +1210,11 @@ function EmptyState({
1078
1210
  const defaultTitle = isFiltered ? "No results found" : "No data available";
1079
1211
  const defaultDescription = isFiltered ? "Try adjusting your search or filter criteria" : "Get started by adding your first entry";
1080
1212
  return /* @__PURE__ */ jsxs(
1081
- "div",
1213
+ Alert,
1082
1214
  {
1083
1215
  role: "status",
1084
1216
  "aria-live": "polite",
1085
- className: "flex flex-col items-center justify-center p-8 text-center",
1217
+ className: "grid place-items-center text-center max-w-lg mx-auto",
1086
1218
  children: [
1087
1219
  /* @__PURE__ */ jsx(
1088
1220
  Icon,
@@ -1093,9 +1225,9 @@ function EmptyState({
1093
1225
  "data-testid": Icon === Database ? "lucide-database" : Icon === User ? "lucide-user" : "custom-icon"
1094
1226
  }
1095
1227
  ),
1096
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: title || defaultTitle }),
1097
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: description || defaultDescription }),
1098
- isFiltered && onClearFilters || action ? /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
1228
+ /* @__PURE__ */ jsx(AlertTitle, { className: "text-lg font-semibold mb-2", children: title || defaultTitle }),
1229
+ /* @__PURE__ */ jsx(AlertDescription, { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: description || defaultDescription }),
1230
+ isFiltered && onClearFilters || action ? /* @__PURE__ */ jsxs(Fragment, { children: [
1099
1231
  isFiltered && onClearFilters && /* @__PURE__ */ jsxs(Button, { variant: "outline", onClick: onClearFilters, children: [
1100
1232
  /* @__PURE__ */ jsx(Search, { className: "size-4 mr-2" }),
1101
1233
  "Clear filters"
@@ -1144,12 +1276,9 @@ function ColumnFilter({
1144
1276
  column.setFilterValue(value);
1145
1277
  }
1146
1278
  };
1147
- const clearFilter = () => {
1148
- column.setFilterValue(void 0);
1149
- };
1150
- const hasFilter = columnFilterValue !== void 0 && columnFilterValue !== "";
1151
1279
  const defaultPlaceholder = `Filter ${getColumnHeaderText(column)}...`;
1152
- const renderFilterInput = () => {
1280
+ const selectColumnName = `${getColumnHeaderText(column)}...`;
1281
+ return (() => {
1153
1282
  switch (filterType) {
1154
1283
  case "select":
1155
1284
  return /* @__PURE__ */ jsxs(
@@ -1158,7 +1287,10 @@ function ColumnFilter({
1158
1287
  value: columnFilterValue || "",
1159
1288
  onValueChange: handleFilterChange,
1160
1289
  children: [
1161
- /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: placeholder || defaultPlaceholder }) }),
1290
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsxs(SelectValue, { children: [
1291
+ /* @__PURE__ */ jsx(Filter, { className: "size-4 inline-block mr-2" }),
1292
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: selectColumnName })
1293
+ ] }) }),
1162
1294
  /* @__PURE__ */ jsxs(SelectContent, { children: [
1163
1295
  /* @__PURE__ */ jsx(SelectItem, { value: "", children: "All" }),
1164
1296
  options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value))
@@ -1199,19 +1331,7 @@ function ColumnFilter({
1199
1331
  }
1200
1332
  );
1201
1333
  }
1202
- };
1203
- return /* @__PURE__ */ jsxs("div", { className: "relative flex items-center gap-1", children: [
1204
- renderFilterInput(),
1205
- hasFilter && /* @__PURE__ */ jsx(
1206
- Button,
1207
- {
1208
- variant: "ghost",
1209
- onClick: clearFilter,
1210
- children: /* @__PURE__ */ jsx(X, { className: "size-3" })
1211
- }
1212
- ),
1213
- hasFilter && /* @__PURE__ */ jsx("div", { className: "absolute -top-1 -right-1 h-2 w-2 bg-main-500 rounded-full" })
1214
- ] });
1334
+ })();
1215
1335
  }
1216
1336
  function FilterRow({ table, visibleColumns }) {
1217
1337
  const { getState } = table;
@@ -1267,7 +1387,7 @@ function FilterRow({ table, visibleColumns }) {
1267
1387
  return /* @__PURE__ */ jsx(
1268
1388
  "td",
1269
1389
  {
1270
- className: "px-4 py-2",
1390
+ className: "p-1",
1271
1391
  children: canFilter ? /* @__PURE__ */ jsx(
1272
1392
  ColumnFilter,
1273
1393
  {
@@ -1276,7 +1396,7 @@ function FilterRow({ table, visibleColumns }) {
1276
1396
  options,
1277
1397
  placeholder: `Filter ${getColumnHeaderText(column)}...`
1278
1398
  }
1279
- ) : /* @__PURE__ */ jsx("div", { className: "h-8 flex items-center text-sec-400 text-sm", children: "No filter" })
1399
+ ) : /* @__PURE__ */ jsx(Fragment, { children: "\xA0" })
1280
1400
  },
1281
1401
  header.id
1282
1402
  );
@@ -1654,10 +1774,10 @@ function EditableRow({
1654
1774
  "aria-rowindex": row.index + 1,
1655
1775
  children: row.getVisibleCells().map((cell) => {
1656
1776
  const isSystemColumn = cell.column.id === "select" || cell.column.id === "actions";
1657
- return /* @__PURE__ */ jsx("td", { role: "cell", children: /* @__PURE__ */ jsx("div", { className: cell.column.columnDef.meta?.align === "right" ? "text-right" : "", children: isSystemColumn ? (
1777
+ return /* @__PURE__ */ jsx("td", { role: "cell", className: cell.column.columnDef.meta?.align === "right" ? "text-right" : "", children: isSystemColumn ? (
1658
1778
  // System columns: render their normal cell content (checkbox for select, buttons for actions)
1659
- cell.column.id === "actions" ? /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
1660
- /* @__PURE__ */ jsx(Button, { onClick: onSave, size: "sm", variant: "default", "aria-label": "Save changes", children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) }),
1779
+ cell.column.id === "actions" ? /* @__PURE__ */ jsxs(Fragment, { children: [
1780
+ /* @__PURE__ */ jsx(Button, { onClick: onSave, size: "sm", variant: "default", "aria-label": "Save changes", className: "mr-1", children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) }),
1661
1781
  /* @__PURE__ */ jsx(Button, { onClick: onCancel, size: "sm", variant: "outline", "aria-label": "Cancel editing", children: /* @__PURE__ */ jsx(X, { className: "size-4" }) })
1662
1782
  ] }) : (
1663
1783
  // Select column: render the checkbox normally
@@ -1702,7 +1822,7 @@ function EditableRow({
1702
1822
  shouldGetRef ? firstInputRef : void 0
1703
1823
  );
1704
1824
  })()
1705
- ) }) }, cell.id);
1825
+ ) }, cell.id);
1706
1826
  })
1707
1827
  }
1708
1828
  );
@@ -4040,8 +4160,7 @@ var DialogContent = React7.forwardRef(
4040
4160
  "m-0 p-0 max-w-none max-h-none w-auto h-auto border-0 bg-transparent outline-none",
4041
4161
  // Apply our custom styling
4042
4162
  "border bg-background shadow-lg",
4043
- // Style native backdrop pseudo-element (Tailwind v4 supports arbitrary variants)
4044
- "[&::backdrop]:bg-black/50 [&::backdrop]:animate-in [&::backdrop]:fade-in-0",
4163
+ // Backdrop styling is handled via core.css only
4045
4164
  // Only apply size classes if not using smart width
4046
4165
  !maxWidth && !maxWidthPercent && sizeClasses[size],
4047
4166
  // Auto size gets special handling
@@ -4074,17 +4193,25 @@ var DialogContent = React7.forwardRef(
4074
4193
  );
4075
4194
  DialogContent.displayName = "DialogContent";
4076
4195
  var DialogClose = React7.forwardRef(
4077
- ({ className, onClick, ...props }, ref) => {
4196
+ ({ className, asChild = false, children, onClick, ...props }, ref) => {
4078
4197
  const { onOpenChange, markClosedByUser: contextMarkClosedByUser } = useDialogContext();
4079
4198
  const dialogCloseContextValue = React7.useContext(DialogCloseContext);
4080
4199
  const markClosedByUser = contextMarkClosedByUser || dialogCloseContextValue;
4081
- const handleClick = (e) => {
4200
+ const handleClick = useCallback((e) => {
4082
4201
  if (markClosedByUser) {
4083
4202
  markClosedByUser();
4084
4203
  }
4085
4204
  onClick?.(e);
4086
4205
  onOpenChange(false);
4087
- };
4206
+ }, [onOpenChange, markClosedByUser, onClick]);
4207
+ if (asChild && React7.isValidElement(children)) {
4208
+ return React7.cloneElement(children, {
4209
+ ref,
4210
+ onClick: handleClick,
4211
+ className: cn(className, children.props?.className),
4212
+ ...props
4213
+ });
4214
+ }
4088
4215
  return /* @__PURE__ */ jsxs(
4089
4216
  "button",
4090
4217
  {
@@ -4273,8 +4400,8 @@ var Progress = React7.forwardRef(({ className, value, max: max2 = 100, ...props
4273
4400
  {
4274
4401
  ref,
4275
4402
  className: cn(
4276
- "appearance-none border-0 h-2 w-full rounded-full overflow-hidden transition-all accent-primary",
4277
- isIndeterminate ? "bg-gradient-to-r from-primary/10 via-primary/90 to-primary/10" : "bg-primary/20",
4403
+ "appearance-none border-0 h-2 w-full rounded-full overflow-hidden transition-all accent-main-800",
4404
+ !isIndeterminate && "bg-sec-600/50",
4278
4405
  className
4279
4406
  ),
4280
4407
  ...isIndeterminate ? {} : { value },
@@ -4284,6 +4411,80 @@ var Progress = React7.forwardRef(({ className, value, max: max2 = 100, ...props
4284
4411
  );
4285
4412
  });
4286
4413
  Progress.displayName = "Progress";
4414
+ var Table = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4415
+ "table",
4416
+ {
4417
+ ref,
4418
+ className: cn("w-full caption-bottom text-sm", className),
4419
+ ...props
4420
+ }
4421
+ ));
4422
+ Table.displayName = "Table";
4423
+ var TableHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
4424
+ TableHeader.displayName = "TableHeader";
4425
+ var TableBody = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4426
+ "tbody",
4427
+ {
4428
+ ref,
4429
+ className: cn("[&_tr:last-child]:border-0", className),
4430
+ ...props
4431
+ }
4432
+ ));
4433
+ TableBody.displayName = "TableBody";
4434
+ var TableFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4435
+ "tfoot",
4436
+ {
4437
+ ref,
4438
+ className: cn(
4439
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
4440
+ className
4441
+ ),
4442
+ ...props
4443
+ }
4444
+ ));
4445
+ TableFooter.displayName = "TableFooter";
4446
+ var TableRow = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4447
+ "tr",
4448
+ {
4449
+ ref,
4450
+ className: cn(
4451
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
4452
+ className
4453
+ ),
4454
+ ...props
4455
+ }
4456
+ ));
4457
+ TableRow.displayName = "TableRow";
4458
+ var TableHead = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4459
+ "th",
4460
+ {
4461
+ ref,
4462
+ className: cn(
4463
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
4464
+ className
4465
+ ),
4466
+ ...props
4467
+ }
4468
+ ));
4469
+ TableHead.displayName = "TableHead";
4470
+ var TableCell = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4471
+ "td",
4472
+ {
4473
+ ref,
4474
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
4475
+ ...props
4476
+ }
4477
+ ));
4478
+ TableCell.displayName = "TableCell";
4479
+ var TableCaption = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4480
+ "caption",
4481
+ {
4482
+ ref,
4483
+ className: cn("mt-4 text-sm text-muted-foreground", className),
4484
+ ...props
4485
+ }
4486
+ ));
4487
+ TableCaption.displayName = "TableCaption";
4287
4488
  function ImportModal({ isOpen, onClose, onImport, config = {} }) {
4288
4489
  const logger2 = createLogger("ImportModal");
4289
4490
  const [file, setFile] = useState(null);
@@ -4484,111 +4685,118 @@ function ImportModal({ isOpen, onClose, onImport, config = {} }) {
4484
4685
  }
4485
4686
  }
4486
4687
  };
4487
- return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-2xl bg-main-50", title, description, children: [
4488
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
4489
- /* @__PURE__ */ jsx("h2", { children: title }),
4490
- /* @__PURE__ */ jsx("p", { children: description })
4491
- ] }),
4492
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
4493
- /* @__PURE__ */ jsxs("div", { className: "border-2 border-dashed border-sec-200 rounded-lg p-6 text-center", children: [
4494
- /* @__PURE__ */ jsx(FileText, { className: "size-8 mx-auto text-sec-400 mb-2" }),
4495
- /* @__PURE__ */ jsx("p", { className: "text-sec-600 mb-2", children: file ? `Selected: ${file.name}` : uploadText }),
4496
- file && /* @__PURE__ */ jsx("p", { className: "text-xs text-sec-500", children: "File selected, processing preview..." }),
4497
- /* @__PURE__ */ jsxs(
4498
- Button,
4499
- {
4500
- variant: "outline",
4501
- size: "sm",
4502
- onClick: () => fileInputRef.current?.click(),
4503
- children: [
4504
- /* @__PURE__ */ jsx(Upload, { className: "size-4 mr-2" }),
4505
- selectFileButtonText
4506
- ]
4507
- }
4508
- ),
4509
- /* @__PURE__ */ jsx(
4510
- Input,
4511
- {
4512
- ref: fileInputRef,
4513
- type: "file",
4514
- accept: ".csv",
4515
- onChange: handleFileSelect,
4516
- className: "hidden"
4517
- }
4518
- )
4519
- ] }),
4520
- error && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-3 bg-acc-50 border border-acc-200 rounded text-acc-700", children: [
4521
- /* @__PURE__ */ jsx(AlertCircle, { className: "size-4" }),
4522
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: error })
4523
- ] }),
4524
- validationErrors.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
4525
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-3 bg-acc-50 border border-acc-200 rounded text-acc-700", children: [
4526
- /* @__PURE__ */ jsx(AlertCircle, { className: "size-4" }),
4527
- /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium", children: [
4528
- validationErrors.length,
4529
- " validation error",
4530
- validationErrors.length !== 1 ? "s" : "",
4531
- " found"
4532
- ] })
4688
+ return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(
4689
+ DialogContent,
4690
+ {
4691
+ maxWidthPercent: 95,
4692
+ className: "w-auto",
4693
+ title,
4694
+ description,
4695
+ children: [
4696
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
4697
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
4698
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
4533
4699
  ] }),
4534
- /* @__PURE__ */ jsxs("div", { className: "max-h-32 overflow-y-auto space-y-1", children: [
4535
- validationErrors.slice(0, 10).map((err, idx) => /* @__PURE__ */ jsxs("div", { className: "text-xs text-acc-600 p-2 bg-acc-50 border border-acc-200 rounded", children: [
4536
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
4537
- "Row ",
4538
- err.row
4700
+ /* @__PURE__ */ jsxs(Card, { className: "text-center", children: [
4701
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(FileText, { className: "size-8 mx-auto text-sec-400 mb-2" }) }),
4702
+ /* @__PURE__ */ jsxs(CardDescription, { children: [
4703
+ file ? `Selected: ${file.name}` : uploadText,
4704
+ file && /* @__PURE__ */ jsx("span", { className: "block text-xs text-sec-500 mt-1", children: "File selected, processing preview..." })
4705
+ ] }),
4706
+ /* @__PURE__ */ jsxs(CardContent, { className: "text-center", children: [
4707
+ error && /* @__PURE__ */ jsxs(Fragment, { children: [
4708
+ /* @__PURE__ */ jsx(AlertCircle, { className: "inline-block size-4 mr-2" }),
4709
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: error })
4539
4710
  ] }),
4540
- " \u2022 ",
4541
- err.field,
4542
- ": ",
4543
- err.message
4544
- ] }, idx)),
4545
- validationErrors.length > 10 && /* @__PURE__ */ jsxs("div", { className: "text-xs text-sec-500 italic", children: [
4546
- "... and ",
4547
- validationErrors.length - 10,
4548
- " more errors"
4549
- ] })
4550
- ] })
4551
- ] }),
4552
- importProgress && isProcessing && /* @__PURE__ */ jsxs("div", { className: "space-y-2 p-4 bg-sec-50 rounded-lg border border-sec-200", children: [
4553
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
4554
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-sec-900", children: importProgress.stage === "parsing" ? "Parsing CSV file..." : "Importing data..." }),
4555
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-sec-600", children: [
4556
- importProgress.current.toLocaleString(),
4557
- " / ",
4558
- importProgress.total.toLocaleString(),
4559
- " rows"
4711
+ validationErrors.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
4712
+ /* @__PURE__ */ jsx(AlertCircle, { className: "size-4" }),
4713
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium", children: [
4714
+ validationErrors.length,
4715
+ " validation error",
4716
+ validationErrors.length !== 1 ? "s" : "",
4717
+ " found"
4718
+ ] }),
4719
+ validationErrors.slice(0, 10).map((err, idx) => /* @__PURE__ */ jsxs("p", { className: "text-xs text-acc-600 p-2 bg-acc-50 border border-acc-200 rounded", children: [
4720
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
4721
+ "Row ",
4722
+ err.row
4723
+ ] }),
4724
+ " \u2022 ",
4725
+ err.field,
4726
+ ": ",
4727
+ err.message
4728
+ ] }, idx)),
4729
+ validationErrors.length > 10 && /* @__PURE__ */ jsxs("p", { className: "text-xs text-sec-500 italic", children: [
4730
+ "... and ",
4731
+ validationErrors.length - 10,
4732
+ " more errors"
4733
+ ] })
4734
+ ] }),
4735
+ importProgress && isProcessing && /* @__PURE__ */ jsxs(Fragment, { children: [
4736
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-sec-900", children: importProgress.stage === "parsing" ? "Parsing CSV file..." : "Importing data..." }),
4737
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-sec-600", children: [
4738
+ importProgress.current.toLocaleString(),
4739
+ " / ",
4740
+ importProgress.total.toLocaleString(),
4741
+ " rows"
4742
+ ] }),
4743
+ /* @__PURE__ */ jsx(
4744
+ Progress,
4745
+ {
4746
+ value: importProgress.total > 0 ? importProgress.current / importProgress.total * 100 : 0,
4747
+ className: "h-2 bg-sec-200"
4748
+ }
4749
+ ),
4750
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-sec-500", children: importProgress.total > 0 && importProgress.current < importProgress.total ? `${Math.round(importProgress.current / importProgress.total * 100)}% complete` : importProgress.stage === "importing" && importProgress.current === 0 ? "Processing your data..." : importProgress.current === importProgress.total ? "Complete!" : "Processing..." })
4751
+ ] })
4752
+ ] }),
4753
+ /* @__PURE__ */ jsxs(CardFooter, { children: [
4754
+ /* @__PURE__ */ jsxs(
4755
+ Button,
4756
+ {
4757
+ variant: "outline",
4758
+ size: "sm",
4759
+ onClick: () => fileInputRef.current?.click(),
4760
+ children: [
4761
+ /* @__PURE__ */ jsx(Upload, { className: "size-4 mr-2" }),
4762
+ selectFileButtonText
4763
+ ]
4764
+ }
4765
+ ),
4766
+ /* @__PURE__ */ jsx(
4767
+ Input,
4768
+ {
4769
+ ref: fileInputRef,
4770
+ type: "file",
4771
+ accept: ".csv",
4772
+ onChange: handleFileSelect,
4773
+ className: "hidden"
4774
+ }
4775
+ )
4560
4776
  ] })
4561
4777
  ] }),
4562
- /* @__PURE__ */ jsx(
4563
- Progress,
4564
- {
4565
- value: importProgress.total > 0 ? importProgress.current / importProgress.total * 100 : 0,
4566
- className: "h-2 bg-sec-200"
4567
- }
4568
- ),
4569
- /* @__PURE__ */ jsx("p", { className: "text-xs text-sec-500", children: importProgress.total > 0 && importProgress.current < importProgress.total ? `${Math.round(importProgress.current / importProgress.total * 100)}% complete` : importProgress.stage === "importing" && importProgress.current === 0 ? "Processing your data..." : importProgress.current === importProgress.total ? "Complete!" : "Processing..." })
4570
- ] }),
4571
- file && previewData && previewData.length > 0 && !isProcessing ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
4572
- /* @__PURE__ */ jsx("h4", { className: "text-sec-900", children: previewHeaderText }),
4573
- /* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto max-h-48", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full text-xs", children: [
4574
- /* @__PURE__ */ jsx("thead", { className: "bg-sec-50", children: /* @__PURE__ */ jsx("tr", { children: Object.keys(previewData[0]).map((header) => /* @__PURE__ */ jsx("th", { className: "px-2 py-1 text-left font-medium text-sec-900 border-b", children: header }, header)) }) }),
4575
- /* @__PURE__ */ jsx("tbody", { children: previewData.map((row, index) => /* @__PURE__ */ jsx("tr", { className: index % 2 === 0 ? "bg-app-main-50" : "bg-sec-50", children: Object.values(row).map((value, cellIndex) => /* @__PURE__ */ jsx("td", { className: "px-2 py-1 text-sec-700 border-b", children: String(value) }, cellIndex)) }, index)) })
4576
- ] }) }) }),
4577
- /* @__PURE__ */ jsx("p", { className: "text-sec-500", children: totalRowsText.replace("{count}", totalCount.toString()) })
4578
- ] }) : !file ? /* @__PURE__ */ jsx("div", { className: "border rounded-lg p-6 text-center bg-sec-50", children: /* @__PURE__ */ jsx("p", { className: "text-sec-500", children: "Select a CSV file to preview" }) }) : null,
4579
- /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
4580
- /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleClose, children: cancelButtonText }),
4581
- /* @__PURE__ */ jsx(
4582
- Button,
4583
- {
4584
- onClick: handleImport,
4585
- disabled: !file || isProcessing,
4586
- children: isProcessing ? importButtonProcessingText : importButtonText
4587
- }
4588
- )
4589
- ] })
4590
- ] })
4591
- ] }) });
4778
+ file && previewData && previewData.length > 0 && !isProcessing ? /* @__PURE__ */ jsxs(Card, { children: [
4779
+ /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: previewHeaderText }) }),
4780
+ /* @__PURE__ */ jsx(CardContent, { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs(Table, { className: "text-xs min-w-full", children: [
4781
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: Object.keys(previewData[0]).map((header) => /* @__PURE__ */ jsx(TableHead, { children: header }, header)) }) }),
4782
+ /* @__PURE__ */ jsx(TableBody, { children: previewData.map((row, index) => /* @__PURE__ */ jsx(TableRow, { children: Object.values(row).map((value, cellIndex) => /* @__PURE__ */ jsx(TableCell, { children: String(value) }, cellIndex)) }, index)) })
4783
+ ] }) }),
4784
+ /* @__PURE__ */ jsx(CardFooter, { children: totalRowsText.replace("{count}", totalCount.toString()) })
4785
+ ] }) : null,
4786
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
4787
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleClose, children: cancelButtonText }),
4788
+ /* @__PURE__ */ jsx(
4789
+ Button,
4790
+ {
4791
+ onClick: handleImport,
4792
+ disabled: !file || isProcessing,
4793
+ children: isProcessing ? importButtonProcessingText : importButtonText
4794
+ }
4795
+ )
4796
+ ] })
4797
+ ]
4798
+ }
4799
+ ) });
4592
4800
  }
4593
4801
  function mapCSVToTableColumns(csvData, columns) {
4594
4802
  const logger2 = createLogger("mapCSVToTableColumns");
@@ -4808,6 +5016,14 @@ function getAriaSortValue(sortDirection) {
4808
5016
  if (sortDirection === "desc") return "descending";
4809
5017
  return "none";
4810
5018
  }
5019
+ function getAriaSortState(column) {
5020
+ const isSortable = column.getCanSort ? column.getCanSort() : false;
5021
+ if (!isSortable) {
5022
+ return void 0;
5023
+ }
5024
+ const sortState = column.getIsSorted ? column.getIsSorted() : false;
5025
+ return getAriaSortValue(sortState);
5026
+ }
4811
5027
  function getRowDescription(rowIndex, totalRows, isSelected = false, isEditing = false) {
4812
5028
  let description = `Row ${rowIndex + 1} of ${totalRows}`;
4813
5029
  if (isSelected) {
@@ -5196,7 +5412,7 @@ function DataTableLayout({
5196
5412
  const isFirst = index === 0;
5197
5413
  const isLast = index === visibleHeaders.length - 1;
5198
5414
  const isSortable = header.column.getCanSort();
5199
- const ariaSort = isSortable ? header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none" : void 0;
5415
+ const ariaSort = getAriaSortState(header.column);
5200
5416
  const isRightAligned = header.column.columnDef.meta?.align === "right";
5201
5417
  const handleSortClick = (event) => {
5202
5418
  const originalHandler = header.column.getToggleSortingHandler();
@@ -5245,7 +5461,7 @@ function DataTableLayout({
5245
5461
  tabIndex: 0,
5246
5462
  children: [
5247
5463
  typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header,
5248
- header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" }) : /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-4" })
5464
+ /* @__PURE__ */ jsx(SortIndicator, { sortState: header.column.getIsSorted() || false })
5249
5465
  ]
5250
5466
  }
5251
5467
  ) : typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header
@@ -5394,63 +5610,6 @@ function DataTableLayout({
5394
5610
  )
5395
5611
  ] });
5396
5612
  }
5397
- var AlertContext = React7.createContext({ variant: "default" });
5398
- var getAlertClasses = (variant = "default") => {
5399
- const baseClasses = "relative w-full rounded-lg border p-4";
5400
- const variantClasses = {
5401
- default: "bg-background text-foreground",
5402
- destructive: "border-destructive text-destructive",
5403
- inline: ""
5404
- // No classes for inline variant as it renders as fragment
5405
- };
5406
- return `${baseClasses} ${variantClasses[variant]}`;
5407
- };
5408
- var Alert = React7.forwardRef(({ className, variant = "default", ...props }, ref) => {
5409
- const contextValue = React7.useMemo(() => ({ variant }), [variant]);
5410
- if (variant === "inline") {
5411
- return /* @__PURE__ */ jsx(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(React7.Fragment, { ...props }) });
5412
- }
5413
- return /* @__PURE__ */ jsx(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
5414
- "aside",
5415
- {
5416
- ref,
5417
- className: cn(getAlertClasses(variant), className),
5418
- role: "alert",
5419
- ...props
5420
- }
5421
- ) });
5422
- });
5423
- Alert.displayName = "Alert";
5424
- var AlertTitle = React7.forwardRef(({ className, ...props }, ref) => {
5425
- const { variant } = React7.useContext(AlertContext);
5426
- if (variant === "inline") {
5427
- return /* @__PURE__ */ jsx("strong", { ...props });
5428
- }
5429
- return /* @__PURE__ */ jsx(
5430
- "h5",
5431
- {
5432
- ref,
5433
- className: cn(className),
5434
- ...props
5435
- }
5436
- );
5437
- });
5438
- AlertTitle.displayName = "AlertTitle";
5439
- var AlertDescription = React7.forwardRef(({ className, ...props }, ref) => {
5440
- const { variant } = React7.useContext(AlertContext);
5441
- if (variant === "inline") {
5442
- return /* @__PURE__ */ jsx("span", { ...props });
5443
- }
5444
- return /* @__PURE__ */ jsx(
5445
- "p",
5446
- {
5447
- ref,
5448
- className: cn(className),
5449
- ...props
5450
- }
5451
- );
5452
- });
5453
- AlertDescription.displayName = "AlertDescription";
5454
5613
  var DataTableErrorBoundary = class extends Component {
5455
5614
  constructor(props) {
5456
5615
  super(props);
@@ -5522,7 +5681,7 @@ var DataTableErrorBoundary = class extends Component {
5522
5681
  if (fallback) {
5523
5682
  return fallback;
5524
5683
  }
5525
- return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsxs(Alert, { variant: "destructive", className: "max-w-md", children: [
5684
+ return /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
5526
5685
  /* @__PURE__ */ jsx(AlertTitle, { children: "DataTable Error" }),
5527
5686
  /* @__PURE__ */ jsx(AlertDescription, { className: "mt-2", children: /* @__PURE__ */ jsx("span", { children: "Something went wrong" }) }),
5528
5687
  error && error.message ? /* @__PURE__ */ jsxs("details", { className: "mt-2", children: [
@@ -5534,15 +5693,14 @@ var DataTableErrorBoundary = class extends Component {
5534
5693
  error.stack
5535
5694
  ] })
5536
5695
  ] })
5537
- ] }) : /* @__PURE__ */ jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsx("span", { children: "An unexpected error occurred" }) }),
5538
- /* @__PURE__ */ jsxs("div", { className: "mt-4 flex gap-2", children: [
5696
+ ] }) : /* @__PURE__ */ jsx(Alert, { variant: "destructive", children: /* @__PURE__ */ jsx(AlertDescription, { children: "An unexpected error occurred" }) }),
5697
+ /* @__PURE__ */ jsxs(ButtonGroup, { children: [
5539
5698
  showRetryButton && retryCount < maxRetries && /* @__PURE__ */ jsxs(
5540
5699
  Button,
5541
5700
  {
5542
5701
  variant: "outline",
5543
5702
  size: "sm",
5544
5703
  onClick: this.handleRetry,
5545
- className: "flex items-center gap-2",
5546
5704
  children: [
5547
5705
  "Retry (",
5548
5706
  retryCount + 1,
@@ -5562,7 +5720,7 @@ var DataTableErrorBoundary = class extends Component {
5562
5720
  }
5563
5721
  )
5564
5722
  ] })
5565
- ] }) });
5723
+ ] });
5566
5724
  }
5567
5725
  return children;
5568
5726
  }
@@ -6544,182 +6702,6 @@ function useDataTableConfiguration({
6544
6702
  hasServerSideConfig
6545
6703
  ]);
6546
6704
  }
6547
- function getCardClasses(variant = "default", size = "default") {
6548
- const baseClasses = "rounded-lg border bg-card text-card-foreground shadow-sm";
6549
- const variantClasses = {
6550
- default: "shadow-xl",
6551
- outline: "border-2",
6552
- ghost: "border-0 shadow-none"
6553
- };
6554
- const sizeClasses2 = {
6555
- default: "",
6556
- sm: "text-sm",
6557
- lg: "text-lg"
6558
- };
6559
- return `${baseClasses} ${variantClasses[variant]} ${sizeClasses2[size]}`;
6560
- }
6561
- var CardWithNavigation = React7.forwardRef(({ className, variant, size, isLink, link, onClick, ...props }, ref) => {
6562
- const navigate = useNavigate();
6563
- const handleClick = (e) => {
6564
- onClick?.(e);
6565
- if (link && !e.defaultPrevented) {
6566
- if (link.startsWith("http://") || link.startsWith("https://")) {
6567
- window.location.href = link;
6568
- } else {
6569
- navigate(link);
6570
- }
6571
- }
6572
- };
6573
- const shouldShowLinkStyles = isLink || !!link;
6574
- return /* @__PURE__ */ jsx(
6575
- "article",
6576
- {
6577
- ref,
6578
- className: cn(
6579
- "grid grid-rows-[auto_1fr_auto] min-w-0 overflow-visible",
6580
- getCardClasses(variant, size),
6581
- shouldShowLinkStyles && "cursor-pointer hover:bg-acc-200 hover:shadow-xl/30",
6582
- className
6583
- ),
6584
- onClick: handleClick,
6585
- role: "link",
6586
- tabIndex: 0,
6587
- onKeyDown: (e) => {
6588
- if (e.key === "Enter" || e.key === " ") {
6589
- e.preventDefault();
6590
- handleClick(e);
6591
- }
6592
- },
6593
- ...props
6594
- }
6595
- );
6596
- });
6597
- CardWithNavigation.displayName = "CardWithNavigation";
6598
- var CardWithoutNavigation = React7.forwardRef(({ className, variant, size, isLink, onClick, ...props }, ref) => {
6599
- const shouldShowLinkStyles = isLink;
6600
- return /* @__PURE__ */ jsx(
6601
- "article",
6602
- {
6603
- ref,
6604
- className: cn(
6605
- "grid grid-rows-[auto_1fr_auto] min-w-0 overflow-visible",
6606
- getCardClasses(variant, size),
6607
- shouldShowLinkStyles && "cursor-pointer hover:bg-acc-200 hover:shadow-xl/30",
6608
- className
6609
- ),
6610
- onClick,
6611
- ...props
6612
- }
6613
- );
6614
- });
6615
- CardWithoutNavigation.displayName = "CardWithoutNavigation";
6616
- var Card = React7.forwardRef(({ link, ...props }, ref) => {
6617
- if (link) {
6618
- return /* @__PURE__ */ jsx(CardWithNavigation, { ref, link, ...props });
6619
- }
6620
- return /* @__PURE__ */ jsx(CardWithoutNavigation, { ref, ...props });
6621
- });
6622
- Card.displayName = "Card";
6623
- var CardHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6624
- "header",
6625
- {
6626
- ref,
6627
- className: cn("p-6 min-w-0 w-full", className),
6628
- ...props
6629
- }
6630
- ));
6631
- CardHeader.displayName = "CardHeader";
6632
- var CardTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6633
- "h3",
6634
- {
6635
- ref,
6636
- className: cn(className),
6637
- ...props
6638
- }
6639
- ));
6640
- CardTitle.displayName = "CardTitle";
6641
- var CardDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6642
- "p",
6643
- {
6644
- ref,
6645
- className: cn(className),
6646
- ...props
6647
- }
6648
- ));
6649
- CardDescription.displayName = "CardDescription";
6650
- var CardContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6651
- "main",
6652
- {
6653
- ref,
6654
- className: cn("p-6 pt-0 min-w-0 w-full", className),
6655
- ...props
6656
- }
6657
- ));
6658
- CardContent.displayName = "CardContent";
6659
- var CardFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6660
- "footer",
6661
- {
6662
- ref,
6663
- className: cn("p-6 pt-0 min-w-0 w-full", className),
6664
- ...props
6665
- }
6666
- ));
6667
- CardFooter.displayName = "CardFooter";
6668
- var CardActions = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6669
- "nav",
6670
- {
6671
- ref,
6672
- className: cn("flex gap-2", className),
6673
- role: "group",
6674
- "aria-label": "Card actions",
6675
- ...props
6676
- }
6677
- ));
6678
- CardActions.displayName = "CardActions";
6679
- var HoverCard = React7.forwardRef(({ children, className, ...props }, ref) => {
6680
- return /* @__PURE__ */ jsx(
6681
- "section",
6682
- {
6683
- ref,
6684
- className: cn("relative inline-block", className),
6685
- ...props,
6686
- children
6687
- }
6688
- );
6689
- });
6690
- HoverCard.displayName = "HoverCard";
6691
- var HoverCardTrigger = React7.forwardRef(({ className, asChild, children, ...props }, ref) => {
6692
- if (asChild) {
6693
- return /* @__PURE__ */ jsx("span", { className: cn("cursor-pointer", className), children });
6694
- }
6695
- return /* @__PURE__ */ jsx(
6696
- "button",
6697
- {
6698
- ref,
6699
- type: "button",
6700
- className: cn(
6701
- "cursor-pointer bg-transparent border-0 p-0 m-0 font-inherit color-inherit text-left",
6702
- className
6703
- ),
6704
- ...props,
6705
- children
6706
- }
6707
- );
6708
- });
6709
- HoverCardTrigger.displayName = "HoverCardTrigger";
6710
- var HoverCardContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
6711
- "aside",
6712
- {
6713
- ref,
6714
- className: cn(
6715
- "absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-md",
6716
- className
6717
- ),
6718
- role: "tooltip",
6719
- ...props
6720
- }
6721
- ));
6722
- HoverCardContent.displayName = "HoverCardContent";
6723
6705
  function AccessDeniedPage({
6724
6706
  resource,
6725
6707
  operation = "access",
@@ -8418,33 +8400,6 @@ function BulkOperationsDropdown({
8418
8400
  }) })
8419
8401
  ] });
8420
8402
  }
8421
- function GroupHeader({
8422
- row,
8423
- groupByColumn,
8424
- isExpanded,
8425
- onToggle,
8426
- subRowsCount
8427
- }) {
8428
- const groupValue = row.getValue(groupByColumn);
8429
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center py-2 px-4 bg-muted/50 border-b font-medium", children: [
8430
- /* @__PURE__ */ jsx(
8431
- Button,
8432
- {
8433
- variant: "ghost",
8434
- size: "sm",
8435
- onClick: onToggle,
8436
- className: "p-0 h-auto mr-2",
8437
- children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
8438
- }
8439
- ),
8440
- /* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
8441
- String(groupValue),
8442
- " (",
8443
- subRowsCount,
8444
- " items)"
8445
- ] })
8446
- ] });
8447
- }
8448
8403
 
8449
8404
  // src/components/DataTable/utils/aggregationUtils.ts
8450
8405
  function sum(accessorKey) {
@@ -8496,4 +8451,4 @@ function max(accessorKey) {
8496
8451
  };
8497
8452
  }
8498
8453
 
8499
- export { ActionButtons, Alert, AlertDescription, AlertTitle, BulkOperationsDropdown, Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColumnFactory, ColumnVisibilityDropdown, DataTable, DataTableCore, DataTableErrorBoundary, DataTableModals, DataTableToolbar, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, EditableRow, EmptyState, EnhancedPaginationControls, GroupHeader, GroupingDropdown, ImportModal, Input, LoadingState, PaginationControls, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, UnifiedTableBody, announce, announceBulkOperation, announceFilterChange, announceLoadingState, announcePaginationChange, announceSearchResults, announceSelectionChange, announceSortChange, average, calculateAllDepths, calculateAllIndentation, calculateIndentation, calculateOptimalPageSize, cleanupLiveRegion, count, createHierarchicalStructure, defaultDataTableFeatures, deriveFormKey, exportToCSV, exportToCSVWithTableRows, filterSensitiveFields, generateCSVContent, getAriaSortValue, getCellRenderer, getColumnHeaderText, getHierarchicalSortConfig, getPageSizeOptions, getPaginationBinding, getRowDepth, getRowDescription, getRowIdSafe, getSortButtonLabel, groupHierarchicalData, hasValidRowId, initializeLiveRegion, isHierarchicalSortableColumn, isSensitiveField, max, min, normalizeDataTableFeatures, shouldShowColumnForRow, sortHierarchicalDataByStructure, sortHierarchicalDataWithSorting, sum, useSessionDraft, validateHierarchicalData, validatePaginationConfig };
8454
+ export { ActionButtons, Alert, AlertDescription, AlertTitle, BulkOperationsDropdown, Checkbox, ColumnFactory, ColumnVisibilityDropdown, DataTable, DataTableCore, DataTableErrorBoundary, DataTableModals, DataTableToolbar, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, EditableRow, EmptyState, EnhancedPaginationControls, GroupingDropdown, ImportModal, Input, Label, LoadingState, PaginationControls, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, SortIndicator, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, UnifiedTableBody, announce, announceBulkOperation, announceFilterChange, announceLoadingState, announcePaginationChange, announceSearchResults, announceSelectionChange, announceSortChange, average, calculateAllDepths, calculateAllIndentation, calculateIndentation, calculateOptimalPageSize, cleanupLiveRegion, count, createHierarchicalStructure, defaultDataTableFeatures, deriveFormKey, exportToCSV, exportToCSVWithTableRows, filterSensitiveFields, generateCSVContent, getAriaSortState, getAriaSortValue, getCellRenderer, getColumnHeaderText, getHierarchicalSortConfig, getPageSizeOptions, getPaginationBinding, getRowDepth, getRowDescription, getRowIdSafe, getSortButtonLabel, groupHierarchicalData, hasValidRowId, initializeLiveRegion, isHierarchicalSortableColumn, isSensitiveField, max, min, normalizeDataTableFeatures, shouldShowColumnForRow, sortHierarchicalDataByStructure, sortHierarchicalDataWithSorting, sum, useSessionDraft, validateHierarchicalData, validatePaginationConfig };