@jmruthers/pace-core 0.5.193 → 0.6.1

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 (191) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +7 -1
  3. package/cursor-rules/00-pace-core-compliance.mdc +372 -0
  4. package/cursor-rules/01-standards-compliance.mdc +275 -0
  5. package/cursor-rules/02-project-structure.mdc +200 -0
  6. package/cursor-rules/03-solid-principles.mdc +341 -0
  7. package/cursor-rules/04-testing-standards.mdc +315 -0
  8. package/cursor-rules/05-bug-reports-and-features.mdc +246 -0
  9. package/cursor-rules/06-code-quality.mdc +392 -0
  10. package/cursor-rules/07-tech-stack-compliance.mdc +309 -0
  11. package/cursor-rules/CHANGELOG.md +101 -0
  12. package/cursor-rules/README.md +191 -0
  13. package/dist/{DataTable-Be6dH_dR.d.ts → DataTable-CH1U5Tpy.d.ts} +1 -1
  14. package/dist/{DataTable-5FU7IESH.js → DataTable-DQ7RSOHE.js} +6 -6
  15. package/dist/{PublicPageProvider-C0Sm_e5k.d.ts → PublicPageProvider-ce4xlHYA.d.ts} +34 -155
  16. package/dist/{UnifiedAuthProvider-RGJTDE2C.js → UnifiedAuthProvider-ATAP5UTR.js} +2 -2
  17. package/dist/{chunk-6C4YBBJM 5.js → chunk-3QRJFVBR.js} +1 -1
  18. package/dist/chunk-3QRJFVBR.js.map +1 -0
  19. package/dist/{chunk-IIELH4DL.js → chunk-3XTALGJF.js} +2 -2
  20. package/dist/{chunk-IIELH4DL.js.map → chunk-3XTALGJF.js.map} +1 -1
  21. package/dist/{chunk-HWIIPPNI.js → chunk-4N5C5XZU.js} +20 -20
  22. package/dist/chunk-4N5C5XZU.js.map +1 -0
  23. package/dist/{chunk-7EQTDTTJ.js → chunk-4ZC4GX36.js} +5 -5
  24. package/dist/{chunk-7EQTDTTJ.js 2.map → chunk-4ZC4GX36.js.map} +1 -1
  25. package/dist/{chunk-7FLMSG37.js → chunk-BYFSK72L.js} +22 -22
  26. package/dist/chunk-BYFSK72L.js.map +1 -0
  27. package/dist/{chunk-LFNCN2SP.js → chunk-EXUD6RNJ.js} +46 -7
  28. package/dist/chunk-EXUD6RNJ.js.map +1 -0
  29. package/dist/{chunk-NOAYCWCX 5.js → chunk-GLK6VM3F.js} +167 -169
  30. package/dist/chunk-GLK6VM3F.js.map +1 -0
  31. package/dist/{chunk-HW3OVDUF.js → chunk-J36DSWQK.js} +1 -1
  32. package/dist/{chunk-HW3OVDUF.js.map → chunk-J36DSWQK.js.map} +1 -1
  33. package/dist/{chunk-BC4IJKSL.js → chunk-JBKQ3SAO.js} +2 -2
  34. package/dist/{chunk-QWWZ5CAQ.js → chunk-LXQLPRQ2.js} +2 -2
  35. package/dist/{chunk-E3SPN4VZ 5.js → chunk-T33XF5ZC.js} +119 -114
  36. package/dist/chunk-T33XF5ZC.js.map +1 -0
  37. package/dist/{chunk-XNXXZ43G.js → chunk-XM25TVIE.js} +27 -4
  38. package/dist/chunk-XM25TVIE.js.map +1 -0
  39. package/dist/components.d.ts +3 -3
  40. package/dist/components.js +8 -8
  41. package/dist/hooks.d.ts +6 -6
  42. package/dist/hooks.js +17 -22
  43. package/dist/hooks.js.map +1 -1
  44. package/dist/index.d.ts +7 -7
  45. package/dist/index.js +15 -16
  46. package/dist/index.js.map +1 -1
  47. package/dist/providers.js +1 -1
  48. package/dist/rbac/index.d.ts +1 -1
  49. package/dist/rbac/index.js +5 -5
  50. package/dist/{usePublicRouteParams-TZe0gy-4.d.ts → usePublicRouteParams-BJAlWfuJ.d.ts} +3 -3
  51. package/dist/{useToast-C8gR5ir4.d.ts → useToast-AyaT-x7p.d.ts} +2 -2
  52. package/dist/utils.d.ts +1 -1
  53. package/dist/utils.js +3 -3
  54. package/docs/getting-started/cursor-rules.md +262 -0
  55. package/docs/getting-started/installation-guide.md +6 -1
  56. package/docs/getting-started/quick-start.md +6 -1
  57. package/docs/migration/MIGRATION_GUIDE.md +4 -4
  58. package/docs/migration/REACT_19_MIGRATION.md +227 -0
  59. package/docs/standards/README.md +39 -0
  60. package/docs/troubleshooting/migration.md +4 -4
  61. package/examples/PublicPages/PublicEventPage.tsx +1 -1
  62. package/package.json +11 -6
  63. package/scripts/audit-consuming-app.cjs +961 -0
  64. package/scripts/check-pace-core-compliance.cjs +34 -15
  65. package/scripts/install-cursor-rules.cjs +236 -0
  66. package/src/__tests__/helpers/test-providers.tsx +1 -1
  67. package/src/__tests__/helpers/test-utils.tsx +1 -1
  68. package/src/components/Badge/Badge.tsx +2 -4
  69. package/src/components/Button/Button.tsx +5 -4
  70. package/src/components/Calendar/Calendar.tsx +1 -1
  71. package/src/components/DataTable/DataTable.test.tsx +57 -93
  72. package/src/components/DataTable/DataTable.tsx +2 -2
  73. package/src/components/DataTable/__tests__/pagination.modes.test.tsx +13 -5
  74. package/src/components/DataTable/__tests__/ssr.strict-mode.test.tsx +12 -12
  75. package/src/components/DataTable/components/AccessDeniedPage.tsx +1 -1
  76. package/src/components/DataTable/components/BulkOperationsDropdown.tsx +1 -1
  77. package/src/components/DataTable/components/DataTableCore.tsx +4 -7
  78. package/src/components/DataTable/components/DataTableModals.tsx +1 -1
  79. package/src/components/DataTable/components/EditableRow.tsx +1 -1
  80. package/src/components/DataTable/components/UnifiedTableBody.tsx +6 -8
  81. package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +23 -23
  82. package/src/components/DataTable/components/__tests__/EditableRow.test.tsx +11 -11
  83. package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +36 -36
  84. package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +27 -27
  85. package/src/components/DataTable/components/__tests__/ImportModal.test.tsx +39 -39
  86. package/src/components/DataTable/components/__tests__/UnifiedTableBody.test.tsx +33 -33
  87. package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +29 -29
  88. package/src/components/DataTable/hooks/useColumnReordering.ts +2 -2
  89. package/src/components/DataTable/hooks/useKeyboardNavigation.ts +2 -2
  90. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -14
  91. package/src/components/Dialog/Dialog.tsx +6 -5
  92. package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
  93. package/src/components/EventSelector/EventSelector.tsx +1 -1
  94. package/src/components/FileDisplay/FileDisplay.test.tsx +2 -2
  95. package/src/components/Footer/Footer.tsx +1 -1
  96. package/src/components/Form/Form.test.tsx +36 -15
  97. package/src/components/Form/Form.tsx +30 -26
  98. package/src/components/Header/Header.tsx +1 -1
  99. package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +40 -40
  100. package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +1 -1
  101. package/src/components/Input/Input.tsx +28 -30
  102. package/src/components/Label/Label.tsx +1 -1
  103. package/src/components/LoadingSpinner/LoadingSpinner.tsx +1 -1
  104. package/src/components/LoginForm/LoginForm.test.tsx +42 -42
  105. package/src/components/LoginForm/LoginForm.tsx +8 -8
  106. package/src/components/NavigationMenu/NavigationMenu.tsx +1 -1
  107. package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +1 -1
  108. package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +50 -50
  109. package/src/components/PaceAppLayout/PaceAppLayout.tsx +1 -1
  110. package/src/components/PaceAppLayout/README.md +1 -1
  111. package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -1
  112. package/src/components/PasswordChange/PasswordChangeForm.test.tsx +33 -33
  113. package/src/components/PasswordChange/PasswordChangeForm.tsx +1 -1
  114. package/src/components/Progress/Progress.tsx +1 -1
  115. package/src/components/PublicLayout/PublicPageLayout.tsx +1 -1
  116. package/src/components/Select/Select.tsx +33 -22
  117. package/src/components/SessionRestorationLoader/SessionRestorationLoader.tsx +1 -1
  118. package/src/components/Table/Table.tsx +1 -1
  119. package/src/components/Textarea/Textarea.tsx +27 -29
  120. package/src/components/Toast/Toast.tsx +1 -1
  121. package/src/components/Tooltip/Tooltip.tsx +1 -1
  122. package/src/components/UserMenu/UserMenu.tsx +1 -1
  123. package/src/hooks/__tests__/hooks.integration.test.tsx +80 -55
  124. package/src/hooks/__tests__/useStorage.unit.test.ts +36 -36
  125. package/src/hooks/public/usePublicEvent.ts +1 -1
  126. package/src/hooks/public/usePublicEventLogo.ts +1 -1
  127. package/src/hooks/public/usePublicRouteParams.ts +1 -1
  128. package/src/hooks/useDataTableState.ts +8 -18
  129. package/src/hooks/useFocusManagement.ts +2 -2
  130. package/src/hooks/useFocusTrap.ts +4 -4
  131. package/src/hooks/useFormDialog.ts +8 -7
  132. package/src/hooks/useInactivityTracker.ts +1 -1
  133. package/src/hooks/usePermissionCache.ts +1 -1
  134. package/src/hooks/useSecureDataAccess.ts +19 -4
  135. package/src/hooks/useToast.ts +2 -2
  136. package/src/providers/__tests__/OrganisationProvider.test.tsx +57 -13
  137. package/src/providers/__tests__/ProviderLifecycle.test.tsx +21 -6
  138. package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +10 -10
  139. package/src/providers/services/UnifiedAuthProvider.tsx +22 -22
  140. package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +13 -3
  141. package/src/rbac/__tests__/adapters.comprehensive.test.tsx +24 -24
  142. package/src/rbac/components/EnhancedNavigationMenu.tsx +1 -1
  143. package/src/rbac/components/NavigationGuard.tsx +1 -1
  144. package/src/rbac/components/NavigationProvider.tsx +1 -1
  145. package/src/rbac/components/PagePermissionGuard.tsx +1 -1
  146. package/src/rbac/components/PagePermissionProvider.tsx +1 -1
  147. package/src/rbac/components/PermissionEnforcer.tsx +1 -1
  148. package/src/rbac/components/RoleBasedRouter.tsx +1 -1
  149. package/src/rbac/components/SecureDataProvider.tsx +1 -1
  150. package/src/rbac/secureClient.ts +12 -0
  151. package/src/utils/security/secureDataAccess.test.ts +31 -20
  152. package/src/utils/security/secureDataAccess.ts +4 -3
  153. package/dist/chunk-6C4YBBJM.js +0 -628
  154. package/dist/chunk-6C4YBBJM.js.map +0 -1
  155. package/dist/chunk-7D4SUZUM.js 2.map +0 -1
  156. package/dist/chunk-7EQTDTTJ.js.map +0 -1
  157. package/dist/chunk-7FLMSG37.js 2.map +0 -1
  158. package/dist/chunk-7FLMSG37.js.map +0 -1
  159. package/dist/chunk-E3SPN4VZ.js +0 -12917
  160. package/dist/chunk-E3SPN4VZ.js.map +0 -1
  161. package/dist/chunk-E66EQZE6 5.js +0 -37
  162. package/dist/chunk-E66EQZE6.js 2.map +0 -1
  163. package/dist/chunk-HWIIPPNI.js.map +0 -1
  164. package/dist/chunk-I7PSE6JW 5.js +0 -191
  165. package/dist/chunk-I7PSE6JW.js 2.map +0 -1
  166. package/dist/chunk-KNC55RTG.js 5.map +0 -1
  167. package/dist/chunk-KQCRWDSA.js 5.map +0 -1
  168. package/dist/chunk-LFNCN2SP.js 2.map +0 -1
  169. package/dist/chunk-LFNCN2SP.js.map +0 -1
  170. package/dist/chunk-LMC26NLJ 2.js +0 -84
  171. package/dist/chunk-NOAYCWCX.js +0 -4993
  172. package/dist/chunk-NOAYCWCX.js.map +0 -1
  173. package/dist/chunk-QWWZ5CAQ.js.map +0 -1
  174. package/dist/chunk-QXHPKYJV 3.js +0 -113
  175. package/dist/chunk-R77UEZ4E 3.js +0 -68
  176. package/dist/chunk-VBXEHIUJ.js 6.map +0 -1
  177. package/dist/chunk-XNXXZ43G.js.map +0 -1
  178. package/dist/chunk-ZSAAAMVR 6.js +0 -25
  179. package/dist/components.js 5.map +0 -1
  180. package/dist/styles/index 2.js +0 -12
  181. package/dist/styles/index.js 5.map +0 -1
  182. package/dist/theming/runtime 5.js +0 -19
  183. package/dist/theming/runtime.js 5.map +0 -1
  184. /package/dist/{DataTable-5FU7IESH.js.map → DataTable-DQ7RSOHE.js.map} +0 -0
  185. /package/dist/{UnifiedAuthProvider-RGJTDE2C.js.map → UnifiedAuthProvider-ATAP5UTR.js.map} +0 -0
  186. /package/dist/{chunk-BC4IJKSL.js.map → chunk-JBKQ3SAO.js.map} +0 -0
  187. /package/dist/{chunk-QWWZ5CAQ.js 3.map → chunk-LXQLPRQ2.js.map} +0 -0
  188. /package/examples/{rbac → RBAC}/CompleteRBACExample.tsx +0 -0
  189. /package/examples/{rbac → RBAC}/EventBasedApp.tsx +0 -0
  190. /package/examples/{rbac → RBAC}/PermissionExample.tsx +0 -0
  191. /package/examples/{rbac → RBAC}/index.ts +0 -0
@@ -25,12 +25,12 @@ import {
25
25
  SelectSeparator,
26
26
  SelectTrigger,
27
27
  SelectValue
28
- } from "./chunk-E3SPN4VZ.js";
28
+ } from "./chunk-T33XF5ZC.js";
29
29
  import {
30
30
  useCan,
31
31
  usePermissions,
32
32
  useRBAC
33
- } from "./chunk-XNXXZ43G.js";
33
+ } from "./chunk-XM25TVIE.js";
34
34
  import {
35
35
  createFileReferenceService,
36
36
  generateFileUrlsBatch,
@@ -42,10 +42,10 @@ import {
42
42
  useFileDisplay,
43
43
  usePreventTabReload,
44
44
  usePublicFileDisplay
45
- } from "./chunk-BC4IJKSL.js";
45
+ } from "./chunk-JBKQ3SAO.js";
46
46
  import {
47
47
  useToast
48
- } from "./chunk-6C4YBBJM.js";
48
+ } from "./chunk-3QRJFVBR.js";
49
49
  import {
50
50
  ErrorBoundary,
51
51
  PublicPageContext,
@@ -53,13 +53,13 @@ import {
53
53
  useEvents,
54
54
  useIsPublicPage,
55
55
  useResolvedScope
56
- } from "./chunk-IIELH4DL.js";
56
+ } from "./chunk-3XTALGJF.js";
57
57
  import {
58
58
  EventServiceContext,
59
59
  useOrganisations,
60
60
  useSessionRestoration,
61
61
  useUnifiedAuth
62
- } from "./chunk-7FLMSG37.js";
62
+ } from "./chunk-BYFSK72L.js";
63
63
  import {
64
64
  isSuperAdmin
65
65
  } from "./chunk-KNC55RTG.js";
@@ -69,7 +69,7 @@ import {
69
69
  import {
70
70
  LoadingSpinner,
71
71
  getAppId
72
- } from "./chunk-HW3OVDUF.js";
72
+ } from "./chunk-J36DSWQK.js";
73
73
  import {
74
74
  cn
75
75
  } from "./chunk-R77UEZ4E.js";
@@ -375,35 +375,32 @@ var Label = React2.forwardRef(({
375
375
  Label.displayName = LabelPrimitive.Root.displayName;
376
376
 
377
377
  // src/components/Textarea/Textarea.tsx
378
- import * as React3 from "react";
379
378
  import { jsx as jsx3 } from "react/jsx-runtime";
380
- var Textarea = React3.forwardRef(
381
- ({ className, variant = "default", size = "md", error, ...props }, ref) => {
382
- return /* @__PURE__ */ jsx3(
383
- "textarea",
384
- {
385
- className: cn(
386
- // Base styles (matching Input component)
387
- "flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
388
- // Variant styles
389
- {
390
- "border-input": variant === "default" && !error,
391
- "border-destructive focus-visible:ring-destructive": variant === "destructive" || error
392
- },
393
- // Size styles
394
- {
395
- "min-h-[60px] px-2 py-1 text-xs": size === "sm",
396
- "min-h-[80px] px-3 py-2 text-sm": size === "md",
397
- "min-h-[100px] px-4 py-3 text-base": size === "lg"
398
- },
399
- className
400
- ),
401
- ref,
402
- ...props
403
- }
404
- );
405
- }
406
- );
379
+ function Textarea({ className, variant = "default", size = "md", error, ref, ...props }) {
380
+ return /* @__PURE__ */ jsx3(
381
+ "textarea",
382
+ {
383
+ className: cn(
384
+ // Base styles (matching Input component)
385
+ "flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
386
+ // Variant styles
387
+ {
388
+ "border-input": variant === "default" && !error,
389
+ "border-destructive focus-visible:ring-destructive": variant === "destructive" || error
390
+ },
391
+ // Size styles
392
+ {
393
+ "min-h-[60px] px-2 py-1 text-xs": size === "sm",
394
+ "min-h-[80px] px-3 py-2 text-sm": size === "md",
395
+ "min-h-[100px] px-4 py-3 text-base": size === "lg"
396
+ },
397
+ className
398
+ ),
399
+ ref,
400
+ ...props
401
+ }
402
+ );
403
+ }
407
404
  Textarea.displayName = "Textarea";
408
405
 
409
406
  // src/components/FileDisplay/FileDisplay.tsx
@@ -1489,7 +1486,7 @@ function useFilesByCategory(supabase, table_name, record_id, category, organisat
1489
1486
  }
1490
1487
 
1491
1488
  // src/components/Avatar/Avatar.tsx
1492
- import * as React5 from "react";
1489
+ import * as React4 from "react";
1493
1490
  import { jsx as jsx5 } from "react/jsx-runtime";
1494
1491
  var sizeClasses = {
1495
1492
  xs: "size-4 text-xs",
@@ -1499,7 +1496,7 @@ var sizeClasses = {
1499
1496
  xl: "size-16 text-xl",
1500
1497
  "2xl": "size-20 text-2xl"
1501
1498
  };
1502
- var Avatar = React5.forwardRef(
1499
+ var Avatar = React4.forwardRef(
1503
1500
  ({
1504
1501
  table_name,
1505
1502
  record_id,
@@ -1513,7 +1510,7 @@ var Avatar = React5.forwardRef(
1513
1510
  size = "md",
1514
1511
  ...props
1515
1512
  }, ref) => {
1516
- const [imageError, setImageError] = React5.useState(false);
1513
+ const [imageError, setImageError] = React4.useState(false);
1517
1514
  const { supabase } = useUnifiedAuth();
1518
1515
  const canFetchFileId = Boolean(fileId && organisation_id && supabase);
1519
1516
  const { fileReference, fileUrl: fileIdUrl, isLoading: fileIdLoading } = useFileReferenceById(
@@ -1530,10 +1527,10 @@ var Avatar = React5.forwardRef(
1530
1527
  const fallbackClasses = "size-full grid place-items-center text-center text-sec-50 bg-sec-500";
1531
1528
  const imageClasses = "object-cover size-full";
1532
1529
  const containerClasses = cn(baseClasses, className);
1533
- const handleImageError = React5.useCallback(() => {
1530
+ const handleImageError = React4.useCallback(() => {
1534
1531
  setImageError(true);
1535
1532
  }, []);
1536
- React5.useEffect(() => {
1533
+ React4.useEffect(() => {
1537
1534
  if (src) {
1538
1535
  setImageError(false);
1539
1536
  }
@@ -1592,7 +1589,6 @@ var Avatar = React5.forwardRef(
1592
1589
  Avatar.displayName = "Avatar";
1593
1590
 
1594
1591
  // src/components/Badge/Badge.tsx
1595
- import * as React6 from "react";
1596
1592
  import { jsx as jsx6 } from "react/jsx-runtime";
1597
1593
  var shadeConfig = {
1598
1594
  muted: {
@@ -1658,42 +1654,40 @@ function getBadgeClasses(variant = "solid-main-normal") {
1658
1654
  const baseClasses = "text-balance rounded-2xl px-3 py-1 mr-1 text-xs font-medium transition-colors box-border";
1659
1655
  return `${baseClasses} ${variantClassesMap[variant]}`;
1660
1656
  }
1661
- var Badge = React6.forwardRef(
1662
- ({ className, variant = "solid-main-normal", ...props }, ref) => {
1663
- const isSoftVariant = variant.startsWith("soft-");
1664
- if (isSoftVariant) {
1665
- const variantClasses = getBadgeClasses(variant);
1666
- const shadowColorMatch = variantClasses.match(/\bshadow-(\w+)-(\d+)\b/);
1667
- const shadowColorClass = shadowColorMatch ? shadowColorMatch[0] : "";
1668
- const classesWithoutShadows = variantClasses.replace(/\bshadow-badge-soft\b/g, "").replace(/\bshadow-\w+-\d+\b/g, "").replace(/\s+/g, " ").trim();
1669
- const mergedClasses = cn(classesWithoutShadows, className);
1670
- const finalClasses = `${mergedClasses} shadow-badge-soft ${shadowColorClass}`.trim();
1671
- return /* @__PURE__ */ jsx6(
1672
- "span",
1673
- {
1674
- ref,
1675
- className: finalClasses,
1676
- ...props
1677
- }
1678
- );
1679
- }
1657
+ function Badge({ className, variant = "solid-main-normal", ref, ...props }) {
1658
+ const isSoftVariant = variant.startsWith("soft-");
1659
+ if (isSoftVariant) {
1660
+ const variantClasses = getBadgeClasses(variant);
1661
+ const shadowColorMatch = variantClasses.match(/\bshadow-(\w+)-(\d+)\b/);
1662
+ const shadowColorClass = shadowColorMatch ? shadowColorMatch[0] : "";
1663
+ const classesWithoutShadows = variantClasses.replace(/\bshadow-badge-soft\b/g, "").replace(/\bshadow-\w+-\d+\b/g, "").replace(/\s+/g, " ").trim();
1664
+ const mergedClasses = cn(classesWithoutShadows, className);
1665
+ const finalClasses = `${mergedClasses} shadow-badge-soft ${shadowColorClass}`.trim();
1680
1666
  return /* @__PURE__ */ jsx6(
1681
1667
  "span",
1682
1668
  {
1683
1669
  ref,
1684
- className: cn(getBadgeClasses(variant), className),
1670
+ className: finalClasses,
1685
1671
  ...props
1686
1672
  }
1687
1673
  );
1688
1674
  }
1689
- );
1675
+ return /* @__PURE__ */ jsx6(
1676
+ "span",
1677
+ {
1678
+ ref,
1679
+ className: cn(getBadgeClasses(variant), className),
1680
+ ...props
1681
+ }
1682
+ );
1683
+ }
1690
1684
  Badge.displayName = "Badge";
1691
1685
 
1692
1686
  // src/components/Switch/Switch.tsx
1693
- import * as React7 from "react";
1687
+ import * as React5 from "react";
1694
1688
  import * as SwitchPrimitive from "@radix-ui/react-switch";
1695
1689
  import { jsx as jsx7 } from "react/jsx-runtime";
1696
- var Switch = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
1690
+ var Switch = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
1697
1691
  SwitchPrimitive.Root,
1698
1692
  {
1699
1693
  className: cn(
@@ -1736,12 +1730,12 @@ var Switch = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
1736
1730
  Switch.displayName = SwitchPrimitive.Root.displayName;
1737
1731
 
1738
1732
  // src/components/Tabs/Tabs.tsx
1739
- import * as React8 from "react";
1733
+ import * as React6 from "react";
1740
1734
  import * as TabsPrimitive from "@radix-ui/react-tabs";
1741
1735
  import { jsx as jsx8 } from "react/jsx-runtime";
1742
- var Tabs = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8(TabsPrimitive.Root, { asChild: true, ...props, children: /* @__PURE__ */ jsx8("section", { ref, className, children }) }));
1736
+ var Tabs = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8(TabsPrimitive.Root, { asChild: true, ...props, children: /* @__PURE__ */ jsx8("section", { ref, className, children }) }));
1743
1737
  Tabs.displayName = TabsPrimitive.Root.displayName || "Tabs";
1744
- var TabsList = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8(TabsPrimitive.List, { asChild: true, ...props, children: /* @__PURE__ */ jsx8(
1738
+ var TabsList = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8(TabsPrimitive.List, { asChild: true, ...props, children: /* @__PURE__ */ jsx8(
1745
1739
  "nav",
1746
1740
  {
1747
1741
  ref,
@@ -1753,7 +1747,7 @@ var TabsList = React8.forwardRef(({ className, children, ...props }, ref) => /*
1753
1747
  }
1754
1748
  ) }));
1755
1749
  TabsList.displayName = TabsPrimitive.List.displayName || "TabsList";
1756
- var TabsTrigger = React8.forwardRef(({ className, variant, size, children, ...props }, ref) => {
1750
+ var TabsTrigger = React6.forwardRef(({ className, variant, size, children, ...props }, ref) => {
1757
1751
  return /* @__PURE__ */ jsx8(TabsPrimitive.Trigger, { asChild: true, ...props, children: /* @__PURE__ */ jsx8(
1758
1752
  Button,
1759
1753
  {
@@ -1772,7 +1766,7 @@ var TabsTrigger = React8.forwardRef(({ className, variant, size, children, ...pr
1772
1766
  ) });
1773
1767
  });
1774
1768
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName || "TabsTrigger";
1775
- var TabsContent = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8(TabsPrimitive.Content, { asChild: true, ...props, children: /* @__PURE__ */ jsx8(
1769
+ var TabsContent = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx8(TabsPrimitive.Content, { asChild: true, ...props, children: /* @__PURE__ */ jsx8(
1776
1770
  "aside",
1777
1771
  {
1778
1772
  ref,
@@ -1786,7 +1780,7 @@ var TabsContent = React8.forwardRef(({ className, children, ...props }, ref) =>
1786
1780
  TabsContent.displayName = TabsPrimitive.Content.displayName || "TabsContent";
1787
1781
 
1788
1782
  // src/components/Calendar/Calendar.tsx
1789
- import * as React9 from "react";
1783
+ import * as React7 from "react";
1790
1784
  import {
1791
1785
  DayPicker,
1792
1786
  useDayPicker
@@ -1803,10 +1797,10 @@ var assignToRef = (ref, value) => {
1803
1797
  }
1804
1798
  ref.current = value;
1805
1799
  };
1806
- var Calendar = React9.forwardRef(
1800
+ var Calendar = React7.forwardRef(
1807
1801
  ({ className, classNames, mode, components, locale, month: controlledMonth, onMonthChange: controlledOnMonthChange, onSelect, ...props }, ref) => {
1808
- const tableRef = React9.useRef(null);
1809
- const setForwardedRef = React9.useCallback(
1802
+ const tableRef = React7.useRef(null);
1803
+ const setForwardedRef = React7.useCallback(
1810
1804
  (node) => {
1811
1805
  tableRef.current = node;
1812
1806
  if (!ref) {
@@ -1820,14 +1814,14 @@ var Calendar = React9.forwardRef(
1820
1814
  },
1821
1815
  [ref]
1822
1816
  );
1823
- const rootPropsRef = React9.useRef(null);
1817
+ const rootPropsRef = React7.useRef(null);
1824
1818
  const selected = props.selected;
1825
1819
  const isMonthControlled = controlledMonth !== void 0;
1826
- const [internalMonth, setInternalMonth] = React9.useState(() => {
1820
+ const [internalMonth, setInternalMonth] = React7.useState(() => {
1827
1821
  const now = /* @__PURE__ */ new Date();
1828
1822
  return new Date(now.getFullYear(), now.getMonth(), 1);
1829
1823
  });
1830
- const month = React9.useMemo(() => {
1824
+ const month = React7.useMemo(() => {
1831
1825
  const monthToUse = isMonthControlled ? controlledMonth : internalMonth;
1832
1826
  if (!monthToUse) {
1833
1827
  const now = /* @__PURE__ */ new Date();
@@ -1836,16 +1830,16 @@ var Calendar = React9.forwardRef(
1836
1830
  const normalized = new Date(monthToUse.getFullYear(), monthToUse.getMonth(), 1);
1837
1831
  return normalized;
1838
1832
  }, [isMonthControlled, controlledMonth, internalMonth]);
1839
- const handleMonthChange = React9.useCallback((newMonth) => {
1833
+ const handleMonthChange = React7.useCallback((newMonth) => {
1840
1834
  if (!isMonthControlled) {
1841
1835
  setInternalMonth(newMonth);
1842
1836
  }
1843
1837
  controlledOnMonthChange?.(newMonth);
1844
1838
  }, [isMonthControlled, controlledOnMonthChange]);
1845
- const wrappedHandleMonthChange = React9.useCallback((newMonth) => {
1839
+ const wrappedHandleMonthChange = React7.useCallback((newMonth) => {
1846
1840
  handleMonthChange(newMonth);
1847
1841
  }, [handleMonthChange]);
1848
- const CustomRoot = React9.memo(({ children, rootRef: dayPickerRootRef, ...rootProps }) => {
1842
+ const CustomRoot = React7.memo(({ children, rootRef: dayPickerRootRef, ...rootProps }) => {
1849
1843
  const {
1850
1844
  className: rootClassName,
1851
1845
  style: rootStyle,
@@ -1861,29 +1855,29 @@ var Calendar = React9.forwardRef(
1861
1855
  return /* @__PURE__ */ jsx9(Fragment4, { children });
1862
1856
  });
1863
1857
  CustomRoot.displayName = "CustomRoot";
1864
- const CustomMonths = React9.memo(({ children }) => {
1858
+ const CustomMonths = React7.memo(({ children }) => {
1865
1859
  return /* @__PURE__ */ jsx9(Fragment4, { children });
1866
1860
  });
1867
1861
  CustomMonths.displayName = "CustomMonths";
1868
- const CustomMonthGrid = React9.forwardRef((props2, forwardedRef) => {
1862
+ const CustomMonthGrid = React7.forwardRef((props2, forwardedRef) => {
1869
1863
  return /* @__PURE__ */ jsx9("table", { ref: forwardedRef, ...props2 });
1870
1864
  });
1871
1865
  CustomMonthGrid.displayName = "CustomMonthGrid";
1872
- const CustomMonth = React9.memo(({ calendarMonth, displayIndex, className: className2, children }) => {
1866
+ const CustomMonth = React7.memo(({ calendarMonth, displayIndex, className: className2, children }) => {
1873
1867
  const { formatters, components: components2, labels, classNames: classNames2, previousMonth, nextMonth, goToMonth } = useDayPicker();
1874
1868
  const caption = formatters.formatCaption(calendarMonth.date, {});
1875
1869
  const Chevron = components2?.Chevron;
1876
- const childrenArray = React9.Children.toArray(children);
1870
+ const childrenArray = React7.Children.toArray(children);
1877
1871
  const monthGridIndex = childrenArray.findIndex((child) => {
1878
- if (!React9.isValidElement(child)) return false;
1872
+ if (!React7.isValidElement(child)) return false;
1879
1873
  const childType = child.type;
1880
1874
  return typeof childType === "function" && childType.displayName === "MonthGrid" || child.type === "table";
1881
1875
  });
1882
1876
  return /* @__PURE__ */ jsx9(Fragment4, { children: childrenArray.map((child, index) => {
1883
- if (React9.isValidElement(child) && child.type?.displayName === "MonthCaption") {
1877
+ if (React7.isValidElement(child) && child.type?.displayName === "MonthCaption") {
1884
1878
  return null;
1885
1879
  }
1886
- if (index === monthGridIndex && React9.isValidElement(child)) {
1880
+ if (index === monthGridIndex && React7.isValidElement(child)) {
1887
1881
  const monthGridChild = child;
1888
1882
  const applyRootProps = displayIndex === 0 && index === monthGridIndex;
1889
1883
  const storedRootProps = applyRootProps ? rootPropsRef.current : null;
@@ -1933,7 +1927,7 @@ var Calendar = React9.forwardRef(
1933
1927
  }
1934
1928
  assignToRef(monthGridElement.ref, node);
1935
1929
  } : void 0;
1936
- return React9.cloneElement(
1930
+ return React7.cloneElement(
1937
1931
  monthGridElement,
1938
1932
  {
1939
1933
  key: child.key ?? `month-grid-${displayIndex}`,
@@ -1992,11 +1986,11 @@ var Calendar = React9.forwardRef(
1992
1986
  }) });
1993
1987
  });
1994
1988
  CustomMonth.displayName = "CustomMonth";
1995
- const CustomWeekdays = React9.memo(({ className: className2, children, ...props2 }) => {
1989
+ const CustomWeekdays = React7.memo(({ className: className2, children, ...props2 }) => {
1996
1990
  return /* @__PURE__ */ jsx9("thead", { children: /* @__PURE__ */ jsx9("tr", { className: cn("text-xs text-sec-500", className2), ...props2, children }) });
1997
1991
  });
1998
1992
  CustomWeekdays.displayName = "CustomWeekdays";
1999
- const defaultComponents = React9.useMemo(() => ({
1993
+ const defaultComponents = React7.useMemo(() => ({
2000
1994
  Root: CustomRoot,
2001
1995
  Months: CustomMonths,
2002
1996
  Month: CustomMonth,
@@ -2084,12 +2078,12 @@ var Calendar = React9.forwardRef(
2084
2078
  Calendar.displayName = "Calendar";
2085
2079
 
2086
2080
  // src/components/Toast/Toast.tsx
2087
- import * as React10 from "react";
2081
+ import * as React8 from "react";
2088
2082
  import * as ToastPrimitives from "@radix-ui/react-toast";
2089
2083
  import { X } from "lucide-react";
2090
2084
  import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
2091
2085
  var ToastProvider = ToastPrimitives.Provider;
2092
- var ToastViewport = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2086
+ var ToastViewport = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2093
2087
  ToastPrimitives.Viewport,
2094
2088
  {
2095
2089
  ref,
@@ -2102,7 +2096,7 @@ var ToastViewport = React10.forwardRef(({ className, ...props }, ref) => /* @__P
2102
2096
  }
2103
2097
  ));
2104
2098
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
2105
- var Toast = React10.forwardRef(({ className, ...props }, ref) => {
2099
+ var Toast = React8.forwardRef(({ className, ...props }, ref) => {
2106
2100
  return /* @__PURE__ */ jsx10(
2107
2101
  ToastPrimitives.Root,
2108
2102
  {
@@ -2117,7 +2111,7 @@ var Toast = React10.forwardRef(({ className, ...props }, ref) => {
2117
2111
  );
2118
2112
  });
2119
2113
  Toast.displayName = ToastPrimitives.Root.displayName;
2120
- var ToastAction = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2114
+ var ToastAction = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2121
2115
  ToastPrimitives.Action,
2122
2116
  {
2123
2117
  ref,
@@ -2130,7 +2124,7 @@ var ToastAction = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
2130
2124
  }
2131
2125
  ));
2132
2126
  ToastAction.displayName = ToastPrimitives.Action.displayName;
2133
- var ToastClose = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2127
+ var ToastClose = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2134
2128
  ToastPrimitives.Close,
2135
2129
  {
2136
2130
  ref,
@@ -2145,7 +2139,7 @@ var ToastClose = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE
2145
2139
  }
2146
2140
  ));
2147
2141
  ToastClose.displayName = ToastPrimitives.Close.displayName;
2148
- var ToastTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2142
+ var ToastTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2149
2143
  ToastPrimitives.Title,
2150
2144
  {
2151
2145
  ref,
@@ -2155,7 +2149,7 @@ var ToastTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE
2155
2149
  }
2156
2150
  ));
2157
2151
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
2158
- var ToastDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2152
+ var ToastDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
2159
2153
  ToastPrimitives.Description,
2160
2154
  {
2161
2155
  ref,
@@ -2184,7 +2178,7 @@ function Toaster() {
2184
2178
  // src/components/Form/Form.tsx
2185
2179
  import { useForm, FormProvider, useFormContext, Controller } from "react-hook-form";
2186
2180
  import { zodResolver } from "@hookform/resolvers/zod";
2187
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
2181
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
2188
2182
  function Form({
2189
2183
  schema,
2190
2184
  defaultValues,
@@ -2197,7 +2191,8 @@ function Form({
2197
2191
  const methods = useForm({
2198
2192
  resolver: schema ? zodResolver(schema) : void 0,
2199
2193
  defaultValues,
2200
- mode
2194
+ mode,
2195
+ shouldUnregister: false
2201
2196
  });
2202
2197
  const handleSubmit = methods.handleSubmit(onSubmit, onError);
2203
2198
  return /* @__PURE__ */ jsx11(FormProvider, { ...methods, children: /* @__PURE__ */ jsx11("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: typeof children === "function" ? children(methods) : children }) });
@@ -2213,9 +2208,7 @@ function FormField({
2213
2208
  "data-testid": testId,
2214
2209
  className
2215
2210
  }) {
2216
- const { control, formState: { errors } } = useFormContext();
2217
- const fieldError = errors[name];
2218
- const errorMessage = fieldError && typeof fieldError === "object" && "message" in fieldError ? String(fieldError.message) : void 0;
2211
+ const { control } = useFormContext();
2219
2212
  return /* @__PURE__ */ jsxs6("div", { className: cn("space-y-2", className), children: [
2220
2213
  label && /* @__PURE__ */ jsxs6(Label, { htmlFor: name, children: [
2221
2214
  label,
@@ -2228,35 +2221,40 @@ function FormField({
2228
2221
  control,
2229
2222
  rules: validation,
2230
2223
  render: (props) => {
2224
+ const { field, fieldState } = props;
2225
+ const fieldError = fieldState.error;
2226
+ const errorMessage = fieldError && typeof fieldError === "object" && "message" in fieldError ? String(fieldError.message) : void 0;
2231
2227
  if (render) {
2232
2228
  return render(props);
2233
2229
  }
2234
- return /* @__PURE__ */ jsx11(
2235
- "input",
2236
- {
2237
- ...props.field,
2238
- id: name,
2239
- type,
2240
- placeholder,
2241
- "data-testid": testId,
2242
- className: cn(
2243
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2244
- fieldError && "border-destructive focus-visible:ring-destructive"
2245
- ),
2246
- ...inputProps
2247
- }
2248
- );
2230
+ return /* @__PURE__ */ jsxs6(Fragment5, { children: [
2231
+ /* @__PURE__ */ jsx11(
2232
+ "input",
2233
+ {
2234
+ ...field,
2235
+ id: name,
2236
+ type,
2237
+ placeholder,
2238
+ "data-testid": testId,
2239
+ className: cn(
2240
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2241
+ fieldError && "border-destructive focus-visible:ring-destructive"
2242
+ ),
2243
+ ...inputProps
2244
+ }
2245
+ ),
2246
+ errorMessage && /* @__PURE__ */ jsx11("p", { className: "text-destructive", role: "alert", children: errorMessage })
2247
+ ] });
2249
2248
  }
2250
2249
  }
2251
- ),
2252
- errorMessage && /* @__PURE__ */ jsx11("p", { className: "text-destructive", role: "alert", children: errorMessage })
2250
+ )
2253
2251
  ] });
2254
2252
  }
2255
2253
 
2256
2254
  // src/components/LoginForm/LoginForm.tsx
2257
- import React11, { useState as useState7, useCallback as useCallback7, useMemo as useMemo4 } from "react";
2255
+ import React9, { useState as useState7, useCallback as useCallback7, useMemo as useMemo4 } from "react";
2258
2256
  import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
2259
- var LoginForm = React11.memo(({
2257
+ var LoginForm = React9.memo(({
2260
2258
  onSignIn,
2261
2259
  onSuccess,
2262
2260
  onError,
@@ -2273,12 +2271,12 @@ var LoginForm = React11.memo(({
2273
2271
  const isFormValid = useMemo4(() => {
2274
2272
  return formData.email.length > 0 && formData.password.length > 0;
2275
2273
  }, [formData.email, formData.password]);
2276
- const handleEmailChange = useCallback7((e) => {
2274
+ const handleEmailChange = (e) => {
2277
2275
  setFormData((prev) => ({ ...prev, email: e.target.value }));
2278
- }, []);
2279
- const handlePasswordChange = useCallback7((e) => {
2276
+ };
2277
+ const handlePasswordChange = (e) => {
2280
2278
  setFormData((prev) => ({ ...prev, password: e.target.value }));
2281
- }, []);
2279
+ };
2282
2280
  const handleSubmit = useCallback7(async (e) => {
2283
2281
  e.preventDefault();
2284
2282
  setError(null);
@@ -2292,9 +2290,9 @@ var LoginForm = React11.memo(({
2292
2290
  onError?.(err instanceof Error ? err : new Error(errorMessage));
2293
2291
  }
2294
2292
  }, [formData, isFormValid, isLoading, onSignIn, onSuccess, onError]);
2295
- const handleSignUpClick = useCallback7(() => {
2293
+ const handleSignUpClick = () => {
2296
2294
  onSignUp?.();
2297
- }, [onSignUp]);
2295
+ };
2298
2296
  const displayTitle = useMemo4(() => title || (appName ? `Sign in to ${appName}` : "Sign In"), [title, appName]);
2299
2297
  const displaySubtitle = useMemo4(() => subtitle || "Enter your credentials to continue.", [subtitle]);
2300
2298
  return /* @__PURE__ */ jsx12(Card, { className: cn("w-full max-w-md mx-auto", className), children: /* @__PURE__ */ jsxs7("form", { onSubmit: handleSubmit, "data-testid": "login-form", children: [
@@ -2824,10 +2822,10 @@ function PasswordChangeForm({ onSubmit, className }) {
2824
2822
  }
2825
2823
 
2826
2824
  // src/components/UserMenu/UserMenu.tsx
2827
- import React14, { useCallback as useCallback9, useMemo as useMemo7, useState as useState10 } from "react";
2825
+ import React12, { useCallback as useCallback9, useMemo as useMemo7, useState as useState10 } from "react";
2828
2826
  import { ChevronDown, LogOut, KeyRound } from "lucide-react";
2829
2827
  import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
2830
- var UserMenu = React14.memo(function UserMenu2({
2828
+ var UserMenu = React12.memo(function UserMenu2({
2831
2829
  user,
2832
2830
  onSignOut,
2833
2831
  onChangePassword,
@@ -2902,7 +2900,7 @@ var UserMenu = React14.memo(function UserMenu2({
2902
2900
  ] })
2903
2901
  ] });
2904
2902
  });
2905
- var UserMenuLoading = React14.memo(function UserMenuLoading2() {
2903
+ var UserMenuLoading = React12.memo(function UserMenuLoading2() {
2906
2904
  return /* @__PURE__ */ jsxs11("div", { className: "relative inline-block text-left", children: [
2907
2905
  /* @__PURE__ */ jsxs11(
2908
2906
  "button",
@@ -2923,10 +2921,10 @@ var UserMenuLoading = React14.memo(function UserMenuLoading2() {
2923
2921
  UserMenu.Loading = UserMenuLoading;
2924
2922
 
2925
2923
  // src/components/NavigationMenu/NavigationMenu.tsx
2926
- import * as React15 from "react";
2924
+ import * as React13 from "react";
2927
2925
  import { ChevronDown as ChevronDown2 } from "lucide-react";
2928
2926
  import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
2929
- var NavigationMenu = React15.forwardRef(({
2927
+ var NavigationMenu = React13.forwardRef(({
2930
2928
  items,
2931
2929
  mode = "dropdown",
2932
2930
  currentPath,
@@ -2944,8 +2942,8 @@ var NavigationMenu = React15.forwardRef(({
2944
2942
  itemsPreFiltered = false,
2945
2943
  ...props
2946
2944
  }, ref) => {
2947
- const [expandedItems, setExpandedItems] = React15.useState(/* @__PURE__ */ new Set());
2948
- const buttonRef = React15.useRef(null);
2945
+ const [expandedItems, setExpandedItems] = React13.useState(/* @__PURE__ */ new Set());
2946
+ const buttonRef = React13.useRef(null);
2949
2947
  let authContext = null;
2950
2948
  try {
2951
2949
  authContext = useUnifiedAuth();
@@ -2970,8 +2968,8 @@ var NavigationMenu = React15.forwardRef(({
2970
2968
  selectedOrganisationId: itemsPreFiltered ? null : selectedOrganisation?.id || null,
2971
2969
  selectedEventId: itemsPreFiltered ? null : selectedEvent?.event_id || null
2972
2970
  });
2973
- const [resolvedAppId, setResolvedAppId] = React15.useState(void 0);
2974
- React15.useEffect(() => {
2971
+ const [resolvedAppId, setResolvedAppId] = React13.useState(void 0);
2972
+ React13.useEffect(() => {
2975
2973
  if (!scopeLoading && !resolvedScope?.appId && selectedOrganisation?.id && authContext?.appName && authContext?.user?.id && !resolvedAppId) {
2976
2974
  if (!authContext.user || !authContext.appName) {
2977
2975
  return;
@@ -2991,7 +2989,7 @@ var NavigationMenu = React15.forwardRef(({
2991
2989
  });
2992
2990
  }
2993
2991
  }, [scopeLoading, resolvedScope?.appId, selectedOrganisation?.id, authContext?.appName, authContext?.user?.id, resolvedAppId]);
2994
- const effectiveScope = React15.useMemo(() => {
2992
+ const effectiveScope = React13.useMemo(() => {
2995
2993
  if (resolvedScope?.organisationId) {
2996
2994
  return resolvedScope;
2997
2995
  }
@@ -3006,7 +3004,7 @@ var NavigationMenu = React15.forwardRef(({
3006
3004
  return null;
3007
3005
  }, [resolvedScope, selectedOrganisation?.id, selectedEvent?.event_id, resolvedAppId]);
3008
3006
  const scopeKey = effectiveScope ? `${effectiveScope.organisationId || ""}-${effectiveScope.eventId || ""}-${effectiveScope.appId || ""}` : "empty";
3009
- const stableScope = React15.useMemo(() => {
3007
+ const stableScope = React13.useMemo(() => {
3010
3008
  if (effectiveScope?.organisationId) {
3011
3009
  return {
3012
3010
  organisationId: effectiveScope.organisationId,
@@ -3031,8 +3029,8 @@ var NavigationMenu = React15.forwardRef(({
3031
3029
  itemsPreFiltered ? void 0 : stableScope.appId
3032
3030
  // Skip if pre-filtered
3033
3031
  );
3034
- const previousFilteredItemsRef = React15.useRef([]);
3035
- const filteredItems = React15.useMemo(() => {
3032
+ const previousFilteredItemsRef = React13.useRef([]);
3033
+ const filteredItems = React13.useMemo(() => {
3036
3034
  if (itemsPreFiltered && items && items.length > 0) {
3037
3035
  const visibleItems = (items || []).filter((item) => !item.meta?.hidden);
3038
3036
  previousFilteredItemsRef.current = visibleItems;
@@ -3340,7 +3338,7 @@ var NavigationMenu = React15.forwardRef(({
3340
3338
  id: `submenu-${item.id}`,
3341
3339
  role: "menu",
3342
3340
  "aria-label": `${item.label} submenu`,
3343
- children: item.children.map((child) => /* @__PURE__ */ jsx17(React15.Fragment, { children: renderHierarchicalItem(child, level + 1) }, child.id))
3341
+ children: item.children.map((child) => /* @__PURE__ */ jsx17(React13.Fragment, { children: renderHierarchicalItem(child, level + 1) }, child.id))
3344
3342
  }
3345
3343
  )
3346
3344
  ] }) : /* @__PURE__ */ jsx17(
@@ -3402,7 +3400,7 @@ var NavigationMenu = React15.forwardRef(({
3402
3400
  className,
3403
3401
  "aria-label": navigationLabel,
3404
3402
  ...props,
3405
- children: /* @__PURE__ */ jsx17("ul", { role: "menubar", children: filteredItems.map((item) => /* @__PURE__ */ jsx17(React15.Fragment, { children: renderHierarchicalItem(item, 0) }, item.id)) })
3403
+ children: /* @__PURE__ */ jsx17("ul", { role: "menubar", children: filteredItems.map((item) => /* @__PURE__ */ jsx17(React13.Fragment, { children: renderHierarchicalItem(item, 0) }, item.id)) })
3406
3404
  }
3407
3405
  );
3408
3406
  });
@@ -3513,8 +3511,8 @@ function Header({
3513
3511
  }
3514
3512
 
3515
3513
  // src/components/Footer/Footer.tsx
3516
- import React16 from "react";
3517
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
3514
+ import React14 from "react";
3515
+ import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
3518
3516
  var FooterComponent = ({
3519
3517
  companyName = "Solvera Solutions Pty Ltd",
3520
3518
  year = (/* @__PURE__ */ new Date()).getFullYear(),
@@ -3527,19 +3525,19 @@ var FooterComponent = ({
3527
3525
  const copyrightText = copyright || `\xA9 Copyright 2022\u2013${year} all rights reserved, ${companyName}.`;
3528
3526
  return /* @__PURE__ */ jsx19("footer", { className: cn("mt-8 py-6 flex justify-center border-t border-border bg-main-100", className), children: /* @__PURE__ */ jsxs14("section", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto text-center", children: [
3529
3527
  logo && /* @__PURE__ */ jsx19("img", { src: logo, alt: "Logo", className: "h-8 w-auto" }),
3530
- children && /* @__PURE__ */ jsx19(Fragment6, { children }),
3528
+ children && /* @__PURE__ */ jsx19(Fragment7, { children }),
3531
3529
  /* @__PURE__ */ jsx19("span", { className: "text-muted-foreground", children: copyrightText }),
3532
3530
  links && links.length > 0 && /* @__PURE__ */ jsx19("ul", { className: "flex gap-4 mt-2 md:mt-0", children: links.map((link, index) => /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19("a", { href: link.href, className: "text-muted-foreground hover:text-foreground", children: link.label }) }, index)) })
3533
3531
  ] }) });
3534
3532
  };
3535
3533
  FooterComponent.displayName = "Footer";
3536
- var Footer = React16.memo(FooterComponent);
3534
+ var Footer = React14.memo(FooterComponent);
3537
3535
  Footer.displayName = "Footer";
3538
3536
 
3539
3537
  // src/components/PaceAppLayout/PaceAppLayout.tsx
3540
3538
  import { useState as useState12, useEffect as useEffect8, useMemo as useMemo9 } from "react";
3541
3539
  import { Outlet, useNavigate, useLocation } from "react-router-dom";
3542
- import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
3540
+ import { Fragment as Fragment8, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
3543
3541
  var EMPTY_PAGE_ID_MAPPING = {};
3544
3542
  var EMPTY_ROUTE_PERMISSIONS = {};
3545
3543
  function PaceAppLayout({
@@ -3816,7 +3814,7 @@ function PaceAppLayout({
3816
3814
  }
3817
3815
  }
3818
3816
  if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
3819
- const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-RGJTDE2C.js");
3817
+ const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-ATAP5UTR.js");
3820
3818
  hasAccess = true;
3821
3819
  }
3822
3820
  if (!isMounted) return;
@@ -3883,10 +3881,10 @@ function PaceAppLayout({
3883
3881
  }
3884
3882
  if (enforcePermissions && hasPermission === false && !isCheckingSuperAdminDirect && !isSuperAdmin2) {
3885
3883
  if (enforcePagePermissions && pagePermissionFallback) {
3886
- return /* @__PURE__ */ jsx20(Fragment7, { children: pagePermissionFallback });
3884
+ return /* @__PURE__ */ jsx20(Fragment8, { children: pagePermissionFallback });
3887
3885
  }
3888
3886
  if (permissionFallback) {
3889
- return /* @__PURE__ */ jsx20(Fragment7, { children: permissionFallback });
3887
+ return /* @__PURE__ */ jsx20(Fragment8, { children: permissionFallback });
3890
3888
  }
3891
3889
  return /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs15("div", { className: "text-center", children: [
3892
3890
  /* @__PURE__ */ jsx20("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Access Denied" }),
@@ -3907,7 +3905,7 @@ function PaceAppLayout({
3907
3905
  ] })
3908
3906
  ] }) });
3909
3907
  }
3910
- return /* @__PURE__ */ jsxs15(Fragment7, { children: [
3908
+ return /* @__PURE__ */ jsxs15(Fragment8, { children: [
3911
3909
  /* @__PURE__ */ jsx20(
3912
3910
  Header,
3913
3911
  {
@@ -4256,7 +4254,7 @@ function ProtectedRoute({
4256
4254
 
4257
4255
  // src/components/FileUpload/FileUpload.tsx
4258
4256
  import { useState as useState15, useCallback as useCallback11, useRef as useRef9, useEffect as useEffect11, useMemo as useMemo11 } from "react";
4259
- import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
4257
+ import { Fragment as Fragment9, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
4260
4258
  function FileUpload({
4261
4259
  supabase,
4262
4260
  table_name,
@@ -4621,7 +4619,7 @@ function FileUpload({
4621
4619
  "data-testid": "file-input"
4622
4620
  }
4623
4621
  ),
4624
- /* @__PURE__ */ jsx24("div", { className: "text-sec-600", children: isResolvingAppId ? "Resolving app configuration..." : isDragging ? "Drop files here..." : /* @__PURE__ */ jsxs19(Fragment8, { children: [
4622
+ /* @__PURE__ */ jsx24("div", { className: "text-sec-600", children: isResolvingAppId ? "Resolving app configuration..." : isDragging ? "Drop files here..." : /* @__PURE__ */ jsxs19(Fragment9, { children: [
4625
4623
  /* @__PURE__ */ jsx24("span", { className: "font-medium", children: "Click to upload" }),
4626
4624
  " ",
4627
4625
  "or drag and drop"
@@ -4727,9 +4725,9 @@ function FileUpload({
4727
4725
  }
4728
4726
 
4729
4727
  // src/components/Table/Table.tsx
4730
- import * as React21 from "react";
4728
+ import * as React19 from "react";
4731
4729
  import { jsx as jsx25 } from "react/jsx-runtime";
4732
- var Table = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4730
+ var Table = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4733
4731
  "table",
4734
4732
  {
4735
4733
  ref,
@@ -4738,9 +4736,9 @@ var Table = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
4738
4736
  }
4739
4737
  ));
4740
4738
  Table.displayName = "Table";
4741
- var TableHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
4739
+ var TableHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
4742
4740
  TableHeader.displayName = "TableHeader";
4743
- var TableBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4741
+ var TableBody = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4744
4742
  "tbody",
4745
4743
  {
4746
4744
  ref,
@@ -4749,7 +4747,7 @@ var TableBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE_
4749
4747
  }
4750
4748
  ));
4751
4749
  TableBody.displayName = "TableBody";
4752
- var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4750
+ var TableFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4753
4751
  "tfoot",
4754
4752
  {
4755
4753
  ref,
@@ -4761,7 +4759,7 @@ var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
4761
4759
  }
4762
4760
  ));
4763
4761
  TableFooter.displayName = "TableFooter";
4764
- var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4762
+ var TableRow = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4765
4763
  "tr",
4766
4764
  {
4767
4765
  ref,
@@ -4773,7 +4771,7 @@ var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__
4773
4771
  }
4774
4772
  ));
4775
4773
  TableRow.displayName = "TableRow";
4776
- var TableHead = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4774
+ var TableHead = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4777
4775
  "th",
4778
4776
  {
4779
4777
  ref,
@@ -4785,7 +4783,7 @@ var TableHead = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE_
4785
4783
  }
4786
4784
  ));
4787
4785
  TableHead.displayName = "TableHead";
4788
- var TableCell = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4786
+ var TableCell = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4789
4787
  "td",
4790
4788
  {
4791
4789
  ref,
@@ -4794,7 +4792,7 @@ var TableCell = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE_
4794
4792
  }
4795
4793
  ));
4796
4794
  TableCell.displayName = "TableCell";
4797
- var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4795
+ var TableCaption = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
4798
4796
  "caption",
4799
4797
  {
4800
4798
  ref,
@@ -4805,7 +4803,7 @@ var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PU
4805
4803
  TableCaption.displayName = "TableCaption";
4806
4804
 
4807
4805
  // src/components/PublicLayout/PublicPageLayout.tsx
4808
- import { Fragment as Fragment9, jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
4806
+ import { Fragment as Fragment10, jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
4809
4807
  function PublicPageHeader({
4810
4808
  event,
4811
4809
  eventCode,
@@ -4830,9 +4828,9 @@ function PublicPageHeader({
4830
4828
  alt: appName
4831
4829
  }
4832
4830
  ),
4833
- event && /* @__PURE__ */ jsxs20(Fragment9, { children: [
4831
+ event && /* @__PURE__ */ jsxs20(Fragment10, { children: [
4834
4832
  /* @__PURE__ */ jsx26("h1", { children: event.event_name }),
4835
- showEventLogo && event && /* @__PURE__ */ jsx26(Fragment9, { children: customEventLogo || /* @__PURE__ */ jsx26(
4833
+ showEventLogo && event && /* @__PURE__ */ jsx26(Fragment10, { children: customEventLogo || /* @__PURE__ */ jsx26(
4836
4834
  FileDisplay,
4837
4835
  {
4838
4836
  table_name: "event",
@@ -4851,11 +4849,11 @@ function PublicPageHeader({
4851
4849
  ) }),
4852
4850
  event.event_venue && /* @__PURE__ */ jsx26("h4", { children: event.event_venue })
4853
4851
  ] }),
4854
- title && /* @__PURE__ */ jsxs20(Fragment9, { children: [
4852
+ title && /* @__PURE__ */ jsxs20(Fragment10, { children: [
4855
4853
  /* @__PURE__ */ jsx26("h1", { children: title }),
4856
4854
  description && /* @__PURE__ */ jsx26("p", { className: "text-lg text-sec-600 max-w-3xl mx-auto", children: description })
4857
4855
  ] }),
4858
- children && /* @__PURE__ */ jsx26(Fragment9, { children })
4856
+ children && /* @__PURE__ */ jsx26(Fragment10, { children })
4859
4857
  ] });
4860
4858
  }
4861
4859
  function PublicPageFooter({
@@ -4871,7 +4869,7 @@ function PublicPageFooter({
4871
4869
  const copyrightText = copyright || `\xA9 Copyright 2022\u2013${year} all rights reserved, ${companyName}.`;
4872
4870
  return /* @__PURE__ */ jsx26("footer", { className: cn("mt-8 py-6 flex justify-center", className), children: /* @__PURE__ */ jsxs20("section", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto text-center", children: [
4873
4871
  logo && /* @__PURE__ */ jsx26("img", { src: logo, alt: "Logo", className: "h-8 w-auto" }),
4874
- children && /* @__PURE__ */ jsx26(Fragment9, { children }),
4872
+ children && /* @__PURE__ */ jsx26(Fragment10, { children }),
4875
4873
  /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground", children: copyrightText }),
4876
4874
  links && links.length > 0 && /* @__PURE__ */ jsx26("ul", { className: "flex gap-4 mt-2 md:mt-0", children: links.map((link, index) => /* @__PURE__ */ jsx26("li", { children: /* @__PURE__ */ jsx26("a", { href: link.href, className: "text-muted-foreground hover:text-foreground", children: link.label }) }, index)) })
4877
4875
  ] }) });
@@ -4925,7 +4923,7 @@ function PublicPageLayout({
4925
4923
  handleRefetch && /* @__PURE__ */ jsx26(Button, { onClick: handleRefetch, children: "Try Again" })
4926
4924
  ] });
4927
4925
  }
4928
- return /* @__PURE__ */ jsx26(ErrorBoundary, { componentName: "PublicPageLayout", children: /* @__PURE__ */ jsxs20(Fragment9, { children: [
4926
+ return /* @__PURE__ */ jsx26(ErrorBoundary, { componentName: "PublicPageLayout", children: /* @__PURE__ */ jsxs20(Fragment10, { children: [
4929
4927
  customHeader || /* @__PURE__ */ jsx26(
4930
4928
  PublicPageHeader,
4931
4929
  {
@@ -4990,4 +4988,4 @@ export {
4990
4988
  PublicPageFooter,
4991
4989
  PublicPageLayout
4992
4990
  };
4993
- //# sourceMappingURL=chunk-NOAYCWCX.js.map
4991
+ //# sourceMappingURL=chunk-GLK6VM3F.js.map