@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.
- package/{scripts/audit/audit-dependencies.cjs → audit-tool/00-dependencies.cjs} +12 -13
- package/audit-tool/audits/01-pace-core-compliance.cjs +556 -0
- package/audit-tool/audits/02-project-structure.cjs +255 -0
- package/audit-tool/audits/03-architecture.cjs +196 -0
- package/audit-tool/audits/04-code-quality.cjs +149 -0
- package/audit-tool/audits/05-styling.cjs +224 -0
- package/audit-tool/audits/06-security-rbac.cjs +544 -0
- package/audit-tool/audits/07-api-tech-stack.cjs +301 -0
- package/audit-tool/audits/08-testing-documentation.cjs +202 -0
- package/audit-tool/audits/09-operations.cjs +208 -0
- package/audit-tool/index.cjs +291 -0
- package/audit-tool/utils/code-utils.cjs +218 -0
- package/audit-tool/utils/file-utils.cjs +230 -0
- package/audit-tool/utils/report-utils.cjs +241 -0
- package/cursor-rules/00-standards-overview.mdc +156 -0
- package/cursor-rules/{00-pace-core-compliance.mdc → 01-pace-core-compliance.mdc} +187 -34
- package/cursor-rules/02-project-structure.mdc +37 -5
- package/cursor-rules/{03-solid-principles.mdc → 03-architecture.mdc} +125 -11
- package/cursor-rules/04-code-quality.mdc +419 -0
- package/cursor-rules/{08-markup-quality.mdc → 05-styling.mdc} +55 -10
- package/cursor-rules/{09-rbac-compliance.mdc → 06-security-rbac.mdc} +62 -6
- package/cursor-rules/07-api-tech-stack.mdc +377 -0
- package/cursor-rules/08-testing-documentation.mdc +324 -0
- package/cursor-rules/09-operations.mdc +365 -0
- package/dist/DataTable-7PMH7XN7.js +15 -0
- package/dist/{DataTable-2N_tqbfq.d.ts → DataTable-DRUIgtUH.d.ts} +1 -1
- package/dist/{PublicPageProvider-BBH6Vqg7.d.ts → PublicPageProvider-DlsCaR5v.d.ts} +26 -16
- package/dist/{chunk-FENMYN2U.js → chunk-5X4QLXRG.js} +1 -3
- package/dist/{chunk-4T7OBVTU.js → chunk-6F3IILHI.js} +1 -1
- package/dist/{chunk-SD6WQY43.js → chunk-7ILTDCL2.js} +9 -1
- package/dist/{chunk-3QC3KRHK.js → chunk-A3W6LW53.js} +16 -1
- package/dist/{chunk-7TYHROIV.js → chunk-BM4CQ5P3.js} +50 -8
- package/dist/{chunk-2HGJFNAH.js → chunk-FEJLJNWA.js} +1 -15
- package/dist/{chunk-OHIK3MIO.js → chunk-GHYHJTYV.js} +2 -2
- package/dist/{chunk-UIYSCEV7.js → chunk-IUBRCBSY.js} +1 -1
- package/dist/{chunk-LAZMKTTF.js → chunk-JGWDVX64.js} +281 -347
- package/dist/{chunk-MAGBIDNS.js → chunk-L4XMVJKY.js} +2 -2
- package/dist/{chunk-A55DK444.js → chunk-OJ4SKRSV.js} +1 -7
- package/dist/{chunk-ZS5VO5JB.js → chunk-Q7Q7V5NV.js} +406 -451
- package/dist/{chunk-3O3WHILE.js → chunk-VBCS3DUA.js} +236 -60
- package/dist/{chunk-BVP2BCJF.js → chunk-ZKAWKYT4.js} +8 -8
- package/dist/components.d.ts +5 -4
- package/dist/components.js +27 -32
- package/dist/eslint-rules/index.cjs +22 -9
- package/{src/eslint-rules/rules/compliance.cjs → dist/eslint-rules/rules/01-pace-core-compliance.cjs} +184 -23
- package/dist/eslint-rules/rules/04-code-quality.cjs +290 -0
- package/dist/eslint-rules/rules/05-styling.cjs +61 -0
- package/dist/eslint-rules/rules/{rbac.cjs → 06-security-rbac.cjs} +26 -10
- package/dist/eslint-rules/rules/07-api-tech-stack.cjs +263 -0
- package/dist/eslint-rules/rules/08-testing.cjs +94 -0
- package/dist/hooks.d.ts +5 -5
- package/dist/hooks.js +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +18 -17
- package/dist/rbac/index.js +6 -6
- package/dist/theming/runtime.d.ts +14 -1
- package/dist/theming/runtime.js +1 -1
- package/dist/{types-B-K_5VnO.d.ts → types-DXstZpNI.d.ts} +0 -17
- package/dist/{usePublicRouteParams-COZ28Mvq.d.ts → usePublicRouteParams-MamNgwqe.d.ts} +19 -19
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +8 -8
- package/docs/README.md +1 -1
- package/docs/api/modules.md +47 -31
- package/docs/api-reference/components.md +18 -20
- package/docs/api-reference/hooks.md +80 -80
- package/docs/api-reference/types.md +1 -1
- package/docs/api-reference/utilities.md +1 -1
- package/docs/architecture/README.md +1 -1
- package/docs/core-concepts/events.md +3 -3
- package/docs/core-concepts/organisations.md +6 -6
- package/docs/core-concepts/permissions.md +6 -6
- package/docs/documentation-index.md +12 -18
- package/docs/getting-started/documentation-index.md +1 -1
- package/docs/getting-started/examples/README.md +4 -4
- package/docs/getting-started/examples/full-featured-app.md +1 -1
- package/docs/getting-started/faq.md +2 -2
- package/docs/getting-started/quick-reference.md +4 -4
- package/docs/implementation-guides/authentication.md +15 -15
- package/docs/implementation-guides/component-styling.md +1 -1
- package/docs/implementation-guides/data-tables.md +126 -33
- package/docs/implementation-guides/datatable-rbac-usage.md +1 -1
- package/docs/implementation-guides/dynamic-colors.md +3 -3
- package/docs/implementation-guides/file-upload-storage.md +2 -2
- package/docs/implementation-guides/hierarchical-datatable.md +40 -60
- package/docs/implementation-guides/inactivity-tracking.md +3 -3
- package/docs/implementation-guides/large-datasets.md +3 -2
- package/docs/implementation-guides/organisation-security.md +2 -2
- package/docs/implementation-guides/performance.md +2 -2
- package/docs/implementation-guides/permission-enforcement.md +1 -1
- package/docs/migration/V0.3.44_organisation-context-timing-fix.md +1 -1
- package/docs/migration/V0.4.0_rbac-migration.md +6 -6
- package/docs/rbac/README.md +5 -5
- package/docs/rbac/advanced-patterns.md +6 -6
- package/docs/rbac/api-reference.md +20 -20
- package/docs/rbac/event-based-apps.md +3 -3
- package/docs/rbac/examples.md +41 -41
- package/docs/rbac/getting-started.md +37 -37
- package/docs/rbac/performance.md +1 -1
- package/docs/rbac/quick-start.md +52 -52
- package/docs/rbac/secure-client-protection.md +1 -1
- package/docs/rbac/troubleshooting.md +1 -1
- package/docs/security/README.md +5 -5
- package/docs/standards/0-standards-overview.md +220 -0
- package/docs/standards/{00-pace-core-compliance.md → 1-pace-core-compliance-standards.md} +204 -185
- package/docs/standards/{02-project-structure.md → 2-project-structure-standards.md} +11 -47
- package/docs/standards/3-architecture-standards.md +606 -0
- package/docs/standards/4-code-quality-standards.md +728 -0
- package/docs/standards/{08-markup-quality.md → 5-styling-standards.md} +12 -9
- package/docs/standards/{09-rbac-compliance.md → 6-security-rbac-standards.md} +126 -18
- package/docs/standards/7-api-tech-stack-standards.md +662 -0
- package/docs/standards/8-testing-documentation-standards.md +401 -0
- package/docs/standards/9-operations-standards.md +1102 -0
- package/docs/standards/README.md +203 -104
- package/docs/troubleshooting/README.md +4 -4
- package/docs/troubleshooting/common-issues.md +2 -2
- package/docs/troubleshooting/debugging.md +9 -9
- package/docs/troubleshooting/migration.md +4 -4
- package/eslint-config-pace-core.cjs +21 -10
- package/package.json +6 -5
- package/scripts/install-cursor-rules.cjs +11 -243
- package/scripts/install-eslint-config.cjs +284 -0
- package/src/__tests__/helpers/__tests__/component-test-utils.test.tsx +2 -2
- package/src/__tests__/helpers/__tests__/test-providers.test.tsx +2 -2
- package/src/__tests__/helpers/__tests__/test-utils.test.tsx +10 -10
- package/src/__tests__/integration/UserProfile.test.tsx +14 -14
- package/src/__tests__/rbac/PagePermissionGuard.test.tsx +6 -6
- package/src/__tests__/templates/accessibility.test.template.tsx +9 -9
- package/src/__tests__/templates/component.test.template.tsx +18 -15
- package/src/components/Calendar/Calendar.tsx +201 -47
- package/src/components/ContextSelector/ContextSelector.tsx +137 -153
- package/src/components/DataTable/AUDIT_REPORT.md +293 -0
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +10 -2
- package/src/components/DataTable/__tests__/a11y.basic.test.tsx +10 -4
- package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +9 -9
- package/src/components/DataTable/components/ColumnFilter.tsx +63 -74
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +43 -41
- package/src/components/DataTable/components/DataTableErrorBoundary.tsx +9 -11
- package/src/components/DataTable/components/DataTableLayout.tsx +5 -16
- package/src/components/DataTable/components/EditableRow.tsx +5 -7
- package/src/components/DataTable/components/EmptyState.tsx +10 -9
- package/src/components/DataTable/components/FilterRow.tsx +2 -4
- package/src/components/DataTable/components/ImportModal.tsx +124 -126
- package/src/components/DataTable/components/LoadingState.tsx +5 -6
- package/src/components/DataTable/components/SortIndicator.tsx +50 -0
- package/src/components/DataTable/components/__tests__/COVERAGE_NOTE.md +4 -4
- package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +23 -82
- package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.test.tsx +37 -9
- package/src/components/DataTable/components/__tests__/EmptyState.test.tsx +7 -4
- package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +12 -4
- package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +41 -27
- package/src/components/DataTable/components/index.ts +2 -1
- package/src/components/DataTable/types.ts +0 -18
- package/src/components/DataTable/utils/a11yUtils.ts +17 -0
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +2 -1
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +11 -15
- package/src/components/DateTimeField/DateTimeField.tsx +7 -8
- package/src/components/Dialog/Dialog.test.tsx +1 -0
- package/src/components/Dialog/Dialog.tsx +25 -8
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +77 -79
- package/src/components/FileUpload/FileUpload.test.tsx +52 -14
- package/src/components/FileUpload/FileUpload.tsx +112 -130
- package/src/components/Progress/Progress.tsx +2 -4
- package/src/components/ProtectedRoute/ProtectedRoute.tsx +8 -8
- package/src/components/Select/Select.tsx +86 -77
- package/src/components/Select/types.ts +3 -0
- package/src/hooks/__tests__/ServiceHooks.test.tsx +16 -16
- package/src/hooks/__tests__/hooks.integration.test.tsx +49 -49
- package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +97 -97
- package/src/hooks/public/usePublicEvent.ts +5 -5
- package/src/hooks/public/usePublicEventLogo.ts +5 -5
- package/src/hooks/public/usePublicFileDisplay.ts +2 -2
- package/src/hooks/public/usePublicRouteParams.ts +5 -5
- package/src/hooks/useAppConfig.ts +2 -2
- package/src/hooks/useEventTheme.test.ts +7 -7
- package/src/hooks/useEventTheme.ts +1 -4
- package/src/hooks/useFileDisplay.ts +2 -2
- package/src/providers/UnifiedAuthProvider.smoke.test.tsx +21 -21
- package/src/providers/__tests__/AuthProvider.test.tsx +21 -21
- package/src/providers/__tests__/EventProvider.test.tsx +61 -61
- package/src/providers/__tests__/InactivityProvider.test.tsx +56 -56
- package/src/providers/__tests__/OrganisationProvider.test.tsx +75 -75
- package/src/providers/__tests__/ProviderLifecycle.test.tsx +37 -37
- package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +103 -103
- package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +7 -7
- package/src/providers/services/__tests__/UnifiedAuthProvider.integration.test.tsx +10 -10
- package/src/styles/core.css +7 -0
- package/src/theming/__tests__/parseEventColours.test.ts +9 -3
- package/src/theming/parseEventColours.ts +22 -10
- package/src/utils/__tests__/lazyLoad.unit.test.tsx +42 -39
- package/src/utils/storage/README.md +1 -1
- package/cursor-rules/01-standards-compliance.mdc +0 -285
- package/cursor-rules/04-testing-standards.mdc +0 -270
- package/cursor-rules/05-bug-reports-and-features.mdc +0 -248
- package/cursor-rules/06-code-quality.mdc +0 -311
- package/cursor-rules/07-tech-stack-compliance.mdc +0 -216
- package/cursor-rules/10-error-handling-patterns.mdc +0 -179
- package/cursor-rules/11-performance-optimization.mdc +0 -169
- package/cursor-rules/12-ci-cd-integration.mdc +0 -150
- package/dist/DataTable-LRJL4IRV.js +0 -15
- package/dist/eslint-rules/rules/compliance.cjs +0 -348
- package/dist/eslint-rules/rules/components.cjs +0 -113
- package/dist/eslint-rules/rules/imports.cjs +0 -102
- package/docs/best-practices/README.md +0 -472
- package/docs/best-practices/accessibility.md +0 -604
- package/docs/best-practices/common-patterns.md +0 -516
- package/docs/best-practices/deployment.md +0 -1103
- package/docs/best-practices/performance.md +0 -1328
- package/docs/best-practices/security.md +0 -940
- package/docs/best-practices/testing.md +0 -1034
- package/docs/rbac/compliance/compliance-guide.md +0 -544
- package/docs/standards/01-standards-compliance.md +0 -188
- package/docs/standards/03-solid-principles.md +0 -39
- package/docs/standards/04-testing-standards.md +0 -36
- package/docs/standards/05-bug-reports-and-features.md +0 -27
- package/docs/standards/06-code-quality.md +0 -34
- package/docs/standards/07-tech-stack-compliance.md +0 -30
- package/docs/standards/10-error-handling-patterns.md +0 -401
- package/docs/standards/11-performance-optimization.md +0 -348
- package/docs/standards/12-ci-cd-integration.md +0 -370
- package/docs/standards/ALIGNMENT_REVIEW_SUMMARY.md +0 -192
- package/scripts/audit/audit-compliance.cjs +0 -1295
- package/scripts/audit/audit-components.cjs +0 -260
- package/scripts/audit/audit-rbac.cjs +0 -954
- package/scripts/audit/audit-standards.cjs +0 -1268
- package/scripts/audit/index.cjs +0 -1927
- package/src/components/DataTable/components/DataTableBody.tsx +0 -478
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +0 -156
- package/src/components/DataTable/components/ExpandButton.tsx +0 -113
- package/src/components/DataTable/components/GroupHeader.tsx +0 -54
- package/src/components/DataTable/components/ViewRowModal.tsx +0 -68
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +0 -525
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +0 -462
- package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +0 -393
- package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +0 -476
- package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +0 -128
- package/src/components/DataTable/core/DataTableContext.tsx +0 -216
- package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +0 -136
- package/src/components/DataTable/hooks/__tests__/useColumnReordering.test.ts +0 -570
- package/src/components/DataTable/hooks/useColumnReordering.ts +0 -123
- package/src/components/DataTable/utils/debugTools.ts +0 -514
- package/src/eslint-rules/index.cjs +0 -22
- package/src/eslint-rules/rules/components.cjs +0 -113
- package/src/eslint-rules/rules/imports.cjs +0 -102
- package/src/eslint-rules/rules/rbac.cjs +0 -790
- package/src/eslint-rules/utils/helpers.cjs +0 -42
- package/src/eslint-rules/utils/manifest-loader.cjs +0 -75
|
@@ -1,10 +1,188 @@
|
|
|
1
1
|
import { UnifiedAuthContext, useUnifiedAuth, useOrganisations } from './chunk-FTCRZOG2.js';
|
|
2
|
-
import { performanceBudgetMonitor } from './chunk-
|
|
2
|
+
import { cn, performanceBudgetMonitor } from './chunk-7ILTDCL2.js';
|
|
3
3
|
import { logger } from './chunk-TTRFSOKR.js';
|
|
4
|
-
import
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import React__default, { createContext, useContext, Component, useMemo, useState, useEffect, useCallback } from 'react';
|
|
6
|
+
import { useNavigate } from 'react-router-dom';
|
|
5
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
8
|
import { createClient } from '@supabase/supabase-js';
|
|
7
9
|
|
|
10
|
+
function getCardClasses(variant = "default", size = "default") {
|
|
11
|
+
const baseClasses = "rounded-lg border bg-card text-card-foreground shadow-sm";
|
|
12
|
+
const variantClasses = {
|
|
13
|
+
default: "shadow-xl",
|
|
14
|
+
outline: "border-2",
|
|
15
|
+
ghost: "border-0 shadow-none"
|
|
16
|
+
};
|
|
17
|
+
const sizeClasses = {
|
|
18
|
+
default: "",
|
|
19
|
+
sm: "text-sm",
|
|
20
|
+
lg: "text-lg"
|
|
21
|
+
};
|
|
22
|
+
return `${baseClasses} ${variantClasses[variant]} ${sizeClasses[size]}`;
|
|
23
|
+
}
|
|
24
|
+
var CardWithNavigation = React.forwardRef(({ className, variant, size, isLink, link, onClick, ...props }, ref) => {
|
|
25
|
+
const navigate = useNavigate();
|
|
26
|
+
const handleClick = (e) => {
|
|
27
|
+
onClick?.(e);
|
|
28
|
+
if (link && !e.defaultPrevented) {
|
|
29
|
+
if (link.startsWith("http://") || link.startsWith("https://")) {
|
|
30
|
+
window.location.href = link;
|
|
31
|
+
} else {
|
|
32
|
+
navigate(link);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const shouldShowLinkStyles = isLink || !!link;
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"article",
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
className: cn(
|
|
42
|
+
"grid grid-rows-[auto_1fr_auto] min-w-0 overflow-visible",
|
|
43
|
+
getCardClasses(variant, size),
|
|
44
|
+
shouldShowLinkStyles && "cursor-pointer hover:bg-acc-200 hover:shadow-xl/30",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
onClick: handleClick,
|
|
48
|
+
role: "link",
|
|
49
|
+
tabIndex: 0,
|
|
50
|
+
onKeyDown: (e) => {
|
|
51
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
handleClick(e);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
CardWithNavigation.displayName = "CardWithNavigation";
|
|
61
|
+
var CardWithoutNavigation = React.forwardRef(({ className, variant, size, isLink, onClick, ...props }, ref) => {
|
|
62
|
+
const shouldShowLinkStyles = isLink;
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
"article",
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
className: cn(
|
|
68
|
+
"grid grid-rows-[auto_1fr_auto] min-w-0 overflow-visible",
|
|
69
|
+
getCardClasses(variant, size),
|
|
70
|
+
shouldShowLinkStyles && "cursor-pointer hover:bg-acc-200 hover:shadow-xl/30",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
onClick,
|
|
74
|
+
...props
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
CardWithoutNavigation.displayName = "CardWithoutNavigation";
|
|
79
|
+
var Card = React.forwardRef(({ link, ...props }, ref) => {
|
|
80
|
+
if (link) {
|
|
81
|
+
return /* @__PURE__ */ jsx(CardWithNavigation, { ref, link, ...props });
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ jsx(CardWithoutNavigation, { ref, ...props });
|
|
84
|
+
});
|
|
85
|
+
Card.displayName = "Card";
|
|
86
|
+
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
87
|
+
"header",
|
|
88
|
+
{
|
|
89
|
+
ref,
|
|
90
|
+
className: cn("p-6 min-w-0 w-full", className),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
));
|
|
94
|
+
CardHeader.displayName = "CardHeader";
|
|
95
|
+
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
96
|
+
"h3",
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
className: cn(className),
|
|
100
|
+
...props
|
|
101
|
+
}
|
|
102
|
+
));
|
|
103
|
+
CardTitle.displayName = "CardTitle";
|
|
104
|
+
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
105
|
+
"p",
|
|
106
|
+
{
|
|
107
|
+
ref,
|
|
108
|
+
className: cn(className),
|
|
109
|
+
...props
|
|
110
|
+
}
|
|
111
|
+
));
|
|
112
|
+
CardDescription.displayName = "CardDescription";
|
|
113
|
+
var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
114
|
+
"main",
|
|
115
|
+
{
|
|
116
|
+
ref,
|
|
117
|
+
className: cn("p-6 pt-0 min-w-0 w-full", className),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
));
|
|
121
|
+
CardContent.displayName = "CardContent";
|
|
122
|
+
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
123
|
+
"footer",
|
|
124
|
+
{
|
|
125
|
+
ref,
|
|
126
|
+
className: cn("p-6 pt-0 min-w-0 w-full", className),
|
|
127
|
+
...props
|
|
128
|
+
}
|
|
129
|
+
));
|
|
130
|
+
CardFooter.displayName = "CardFooter";
|
|
131
|
+
var CardActions = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
132
|
+
"nav",
|
|
133
|
+
{
|
|
134
|
+
ref,
|
|
135
|
+
className: cn("flex gap-2", className),
|
|
136
|
+
role: "group",
|
|
137
|
+
"aria-label": "Card actions",
|
|
138
|
+
...props
|
|
139
|
+
}
|
|
140
|
+
));
|
|
141
|
+
CardActions.displayName = "CardActions";
|
|
142
|
+
var HoverCard = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
143
|
+
return /* @__PURE__ */ jsx(
|
|
144
|
+
"section",
|
|
145
|
+
{
|
|
146
|
+
ref,
|
|
147
|
+
className: cn("relative inline-block", className),
|
|
148
|
+
...props,
|
|
149
|
+
children
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
HoverCard.displayName = "HoverCard";
|
|
154
|
+
var HoverCardTrigger = React.forwardRef(({ className, asChild, children, ...props }, ref) => {
|
|
155
|
+
if (asChild) {
|
|
156
|
+
return /* @__PURE__ */ jsx("span", { className: cn("cursor-pointer", className), children });
|
|
157
|
+
}
|
|
158
|
+
return /* @__PURE__ */ jsx(
|
|
159
|
+
"button",
|
|
160
|
+
{
|
|
161
|
+
ref,
|
|
162
|
+
type: "button",
|
|
163
|
+
className: cn(
|
|
164
|
+
"cursor-pointer bg-transparent border-0 p-0 m-0 font-inherit color-inherit text-left",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
...props,
|
|
168
|
+
children
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
});
|
|
172
|
+
HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
173
|
+
var HoverCardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
174
|
+
"aside",
|
|
175
|
+
{
|
|
176
|
+
ref,
|
|
177
|
+
className: cn(
|
|
178
|
+
"absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-md",
|
|
179
|
+
className
|
|
180
|
+
),
|
|
181
|
+
role: "tooltip",
|
|
182
|
+
...props
|
|
183
|
+
}
|
|
184
|
+
));
|
|
185
|
+
HoverCardContent.displayName = "HoverCardContent";
|
|
8
186
|
var ErrorBoundaryContext = createContext(void 0);
|
|
9
187
|
function ErrorBoundaryProvider({
|
|
10
188
|
children,
|
|
@@ -93,80 +271,78 @@ var ErrorBoundary = class extends Component {
|
|
|
93
271
|
if (fallback) {
|
|
94
272
|
return fallback;
|
|
95
273
|
}
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
|
|
274
|
+
return /* @__PURE__ */ jsxs(
|
|
275
|
+
Card,
|
|
98
276
|
{
|
|
99
277
|
role: "alert",
|
|
100
|
-
className: "
|
|
278
|
+
className: "bg-destructive/10 border-destructive/20",
|
|
101
279
|
"data-error-boundary": errorId,
|
|
102
|
-
children:
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
/* @__PURE__ */ jsxs(
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "flex items-start gap-3", children: [
|
|
282
|
+
/* @__PURE__ */ jsx("svg", { className: "w-5 h-5 text-destructive flex-shrink-0", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }),
|
|
283
|
+
/* @__PURE__ */ jsxs(CardTitle, { className: "text-destructive", children: [
|
|
106
284
|
"Error in ",
|
|
107
285
|
componentName
|
|
108
286
|
] }),
|
|
109
|
-
/* @__PURE__ */ jsx(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"/",
|
|
120
|
-
maxRetries,
|
|
121
|
-
")"
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
/* @__PURE__ */ jsx(
|
|
126
|
-
"button",
|
|
127
|
-
{
|
|
128
|
-
onClick: () => window.location.reload(),
|
|
129
|
-
className: "px-4 py-2 bg-sec-600 text-main-50 rounded-md hover:bg-sec-700 transition-colors text-sm font-medium",
|
|
130
|
-
children: "Reload Page"
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
] }),
|
|
134
|
-
retryCount >= maxRetries && /* @__PURE__ */ jsxs("div", { className: "mb-4 p-3 bg-acc-50 border border-acc-200 rounded-md", children: [
|
|
135
|
-
/* @__PURE__ */ jsx("p", { className: "text-acc-800", children: "Maximum retry attempts reached. Please reload the page or contact support." }),
|
|
136
|
-
/* @__PURE__ */ jsx(
|
|
137
|
-
"button",
|
|
138
|
-
{
|
|
139
|
-
onClick: () => window.location.reload(),
|
|
140
|
-
className: "mt-2 px-3 py-1 bg-acc-600 text-main-50 rounded text-sm hover:bg-acc-700",
|
|
141
|
-
children: "Reload Page"
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
] }),
|
|
145
|
-
import.meta.env.MODE === "development" && this.state.error && /* @__PURE__ */ jsxs("details", { className: "text-sm text-destructive/70", children: [
|
|
146
|
-
/* @__PURE__ */ jsx("summary", { className: "cursor-pointer font-medium mb-2", children: "Error Details (Development)" }),
|
|
147
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-destructive/5 p-3 rounded border", children: [
|
|
148
|
-
/* @__PURE__ */ jsxs("p", { className: "font-mono", children: [
|
|
149
|
-
"Error ID: ",
|
|
150
|
-
errorId
|
|
151
|
-
] }),
|
|
152
|
-
/* @__PURE__ */ jsxs("pre", { className: "whitespace-pre-wrap text-xs overflow-auto max-h-32", children: [
|
|
153
|
-
this.state.error.toString(),
|
|
154
|
-
this.state.errorInfo?.componentStack
|
|
155
|
-
] })
|
|
287
|
+
/* @__PURE__ */ jsx(CardDescription, { className: "text-destructive/80", children: this.state.error?.message || "An unexpected error occurred." })
|
|
288
|
+
] }),
|
|
289
|
+
import.meta.env.MODE === "development" && this.state.error && /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("details", { className: "text-sm text-destructive/70", children: [
|
|
290
|
+
/* @__PURE__ */ jsx("summary", { className: "cursor-pointer font-medium mb-2", children: "Error Details (Development)" }),
|
|
291
|
+
/* @__PURE__ */ jsxs("pre", { children: [
|
|
292
|
+
"Error ID: ",
|
|
293
|
+
errorId,
|
|
294
|
+
/* @__PURE__ */ jsxs("code", { className: "overflow-auto max-h-32", children: [
|
|
295
|
+
this.state.error.toString(),
|
|
296
|
+
this.state.errorInfo?.componentStack
|
|
156
297
|
] })
|
|
157
298
|
] })
|
|
299
|
+
] }) }),
|
|
300
|
+
enableRetry && retryCount < maxRetries && /* @__PURE__ */ jsxs(CardFooter, { className: "flex gap-3", children: [
|
|
301
|
+
/* @__PURE__ */ jsxs(
|
|
302
|
+
"button",
|
|
303
|
+
{
|
|
304
|
+
onClick: this.handleRetry,
|
|
305
|
+
className: "px-4 py-2 bg-destructive text-destructive-foreground rounded-md hover:bg-destructive/90 transition-colors text-sm font-medium",
|
|
306
|
+
children: [
|
|
307
|
+
"Retry (",
|
|
308
|
+
retryCount + 1,
|
|
309
|
+
"/",
|
|
310
|
+
maxRetries,
|
|
311
|
+
")"
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
),
|
|
315
|
+
/* @__PURE__ */ jsx(
|
|
316
|
+
"button",
|
|
317
|
+
{
|
|
318
|
+
onClick: () => window.location.reload(),
|
|
319
|
+
className: "px-4 py-2 bg-sec-600 text-main-50 rounded-md hover:bg-sec-700 transition-colors text-sm font-medium",
|
|
320
|
+
children: "Reload Page"
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
] }),
|
|
324
|
+
retryCount >= maxRetries && /* @__PURE__ */ jsxs(CardFooter, { className: "flex flex-col gap-3", children: [
|
|
325
|
+
/* @__PURE__ */ jsx("p", { className: "text-acc-800", children: "Maximum retry attempts reached. Please reload the page or contact support." }),
|
|
326
|
+
/* @__PURE__ */ jsx(
|
|
327
|
+
"button",
|
|
328
|
+
{
|
|
329
|
+
onClick: () => window.location.reload(),
|
|
330
|
+
className: "px-3 py-1 bg-acc-600 text-main-50 rounded text-sm hover:bg-acc-700",
|
|
331
|
+
children: "Reload Page"
|
|
332
|
+
}
|
|
333
|
+
)
|
|
158
334
|
] })
|
|
159
|
-
]
|
|
335
|
+
]
|
|
160
336
|
}
|
|
161
337
|
);
|
|
162
338
|
}
|
|
163
339
|
return this.props.children;
|
|
164
340
|
}
|
|
165
341
|
};
|
|
166
|
-
var ErrorBoundary2 =
|
|
342
|
+
var ErrorBoundary2 = React__default.forwardRef((props, ref) => {
|
|
167
343
|
const context = useErrorBoundaryContext();
|
|
168
344
|
const globalErrorHandler = context?.defaultErrorHandler;
|
|
169
|
-
return
|
|
345
|
+
return React__default.createElement(ErrorBoundary, { ...props, ref, _globalErrorHandler: globalErrorHandler });
|
|
170
346
|
});
|
|
171
347
|
ErrorBoundary2.displayName = "ErrorBoundary";
|
|
172
348
|
var PublicPageContext = createContext(void 0);
|
|
@@ -432,4 +608,4 @@ var useOrganisationSecurity = () => {
|
|
|
432
608
|
};
|
|
433
609
|
};
|
|
434
610
|
|
|
435
|
-
export { ErrorBoundary2 as ErrorBoundary, ErrorBoundaryProvider, PublicPageContext, PublicPageProvider, useAppConfig, useIsPublicPage, useOrganisationSecurity, usePublicPageContext };
|
|
611
|
+
export { Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ErrorBoundary2 as ErrorBoundary, ErrorBoundaryProvider, PublicPageContext, PublicPageProvider, useAppConfig, useIsPublicPage, useOrganisationSecurity, usePublicPageContext };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createLogger } from './chunk-TTRFSOKR.js';
|
|
2
2
|
|
|
3
3
|
// src/theming/parseEventColours.ts
|
|
4
|
-
var log = createLogger("ParseEventColours");
|
|
5
4
|
function parseAndNormalizeEventColours(input) {
|
|
6
5
|
try {
|
|
7
6
|
if (!input) return null;
|
|
@@ -15,10 +14,12 @@ function parseAndNormalizeEventColours(input) {
|
|
|
15
14
|
} else if (typeof input !== "object") {
|
|
16
15
|
return null;
|
|
17
16
|
}
|
|
18
|
-
const main = obj?.main || null;
|
|
19
|
-
const sec = obj?.sec || null;
|
|
20
|
-
const acc = obj?.acc || null;
|
|
21
|
-
if (!main && !sec && !acc)
|
|
17
|
+
const main = obj?.main || obj?.["ev-main"] || null;
|
|
18
|
+
const sec = obj?.sec || obj?.["ev-sec"] || null;
|
|
19
|
+
const acc = obj?.acc || obj?.["ev-acc"] || null;
|
|
20
|
+
if (!main && !sec && !acc) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
22
23
|
const fill = (p) => {
|
|
23
24
|
if (!p || typeof p !== "object") return {};
|
|
24
25
|
const out = {};
|
|
@@ -36,19 +37,18 @@ function parseAndNormalizeEventColours(input) {
|
|
|
36
37
|
acc: fill(acc)
|
|
37
38
|
};
|
|
38
39
|
} catch (error) {
|
|
39
|
-
log.warn("Failed to parse/normalize event colours:", error);
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// src/theming/runtime.ts
|
|
45
|
-
var
|
|
45
|
+
var log = createLogger("ThemingRuntime");
|
|
46
46
|
function formatOklchCss(color) {
|
|
47
47
|
return `oklch(${color.L} ${color.C} ${color.H})`;
|
|
48
48
|
}
|
|
49
49
|
function applyPalette(palette) {
|
|
50
50
|
if (typeof document === "undefined" || document === null) {
|
|
51
|
-
|
|
51
|
+
log.warn("Document not available (SSR) - palette not applied");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
const root = document.documentElement;
|
package/dist/components.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { a as UnifiedAuthContextType, d as UnifiedAuthProvider, c as UnifiedAuthProviderProps, u as useUnifiedAuth } from './UnifiedAuthProvider-CKvHP1MK.js';
|
|
2
|
-
export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, s as AvatarProps, t as Badge, u as BadgeProps, v as BadgeVariant, B as Button, a as ButtonProps, am as Calendar, an as CalendarProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, w as Checkbox, aP as ContextSelector, aQ as ContextSelectorProps, M as Dialog, V as DialogBody, a4 as DialogBodyProps, Q as DialogClose, a1 as DialogCloseProps, R as DialogContent, $ as DialogContentProps, Y as DialogDescription, W as DialogFooter, a3 as DialogFooterProps, U as DialogHeader, a2 as DialogHeaderProps, N as DialogPortal, a0 as DialogPortalProps, Z as DialogProps, a5 as DialogSize, X as DialogTitle, O as DialogTrigger, _ as DialogTriggerProps, aS as ErrorBoundary, aU as ErrorBoundaryProps, aT as ErrorBoundaryProvider, aW as ErrorBoundaryProviderProps, aV as ErrorBoundaryState, b1 as FileDisplay, b2 as FileDisplayProps, a$ as FileUpload, b0 as FileUploadProps, aK as Footer, aL as FooterProps, aD as Form, aE as FormField, aG as FormFieldProps, aF as FormProps, aX as GlobalErrorHandler, aJ as Header, I as Input, j as InputProps, L as Label, m as LabelProps, aY as LoadingSpinner, aH as LoginForm, aI as LoginFormProps, aO as NavigationMenu, bk as PaceAppLayout, bj as PaceAppLayoutProps, bm as PaceLoginPage, bl as PaceLoginPageProps, P as Progress, y as ProgressProps, aM as ProtectedRoute, aN as ProtectedRouteProps, bc as PublicPageFooter, bi as PublicPageFooterProps, bb as PublicPageHeader, bh as PublicPageHeaderProps, ba as PublicPageLayout, bg as PublicPageLayoutProps, bd as PublicPageProvider, a6 as Select, aa as SelectContent, a7 as SelectGroup, ac as SelectItem, ab as SelectLabel, ad as SelectSeparator, a9 as SelectTrigger, a8 as SelectValue, aZ as SessionRestorationLoader, a_ as SessionRestorationLoaderProps, S as Switch, x as SwitchProps, z as Table, E as TableBody, F as TableCaption, G as TableCell, H as TableFooter, J as TableHead, D as TableHeader, K as TableRow, ae as Tabs, ah as TabsContent, al as TabsContentProps, af as TabsList, aj as TabsListProps, ai as TabsProps, ag as TabsTrigger, ak as TabsTriggerProps, T as Textarea, n as TextareaProps, ao as Toast, aq as ToastAction, aw as ToastActionElement, av as ToastClose, au as ToastDescription, ax as ToastProps, ar as ToastProvider, at as ToastTitle, as as ToastViewport, ap as Toaster, ay as Tooltip, aA as TooltipContent, aB as TooltipProvider, aC as TooltipRoot, az as TooltipTrigger, b9 as UseFileReferenceForRecordReturn, b7 as UseFileReferenceOptions, b8 as UseFileReferenceReturn, aR as UserMenu, b3 as useFileReference, b5 as useFileReferenceById, b4 as useFileReferenceForRecord, b6 as useFilesByCategory, bf as useIsPublicPage, be as usePublicPageContext } from './PublicPageProvider-
|
|
2
|
+
export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, s as AvatarProps, t as Badge, u as BadgeProps, v as BadgeVariant, B as Button, a as ButtonProps, am as Calendar, an as CalendarProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, w as Checkbox, aP as ContextSelector, aQ as ContextSelectorProps, M as Dialog, V as DialogBody, a4 as DialogBodyProps, Q as DialogClose, a1 as DialogCloseProps, R as DialogContent, $ as DialogContentProps, Y as DialogDescription, W as DialogFooter, a3 as DialogFooterProps, U as DialogHeader, a2 as DialogHeaderProps, N as DialogPortal, a0 as DialogPortalProps, Z as DialogProps, a5 as DialogSize, X as DialogTitle, O as DialogTrigger, _ as DialogTriggerProps, aS as ErrorBoundary, aU as ErrorBoundaryProps, aT as ErrorBoundaryProvider, aW as ErrorBoundaryProviderProps, aV as ErrorBoundaryState, b1 as FileDisplay, b2 as FileDisplayProps, a$ as FileUpload, b0 as FileUploadProps, aK as Footer, aL as FooterProps, aD as Form, aE as FormField, aG as FormFieldProps, aF as FormProps, aX as GlobalErrorHandler, aJ as Header, I as Input, j as InputProps, L as Label, m as LabelProps, aY as LoadingSpinner, aH as LoginForm, aI as LoginFormProps, aO as NavigationMenu, bk as PaceAppLayout, bj as PaceAppLayoutProps, bm as PaceLoginPage, bl as PaceLoginPageProps, P as Progress, y as ProgressProps, aM as ProtectedRoute, aN as ProtectedRouteProps, bc as PublicPageFooter, bi as PublicPageFooterProps, bb as PublicPageHeader, bh as PublicPageHeaderProps, ba as PublicPageLayout, bg as PublicPageLayoutProps, bd as PublicPageProvider, a6 as Select, aa as SelectContent, a7 as SelectGroup, ac as SelectItem, ab as SelectLabel, ad as SelectSeparator, a9 as SelectTrigger, a8 as SelectValue, aZ as SessionRestorationLoader, a_ as SessionRestorationLoaderProps, S as Switch, x as SwitchProps, z as Table, E as TableBody, F as TableCaption, G as TableCell, H as TableFooter, J as TableHead, D as TableHeader, K as TableRow, ae as Tabs, ah as TabsContent, al as TabsContentProps, af as TabsList, aj as TabsListProps, ai as TabsProps, ag as TabsTrigger, ak as TabsTriggerProps, T as Textarea, n as TextareaProps, ao as Toast, aq as ToastAction, aw as ToastActionElement, av as ToastClose, au as ToastDescription, ax as ToastProps, ar as ToastProvider, at as ToastTitle, as as ToastViewport, ap as Toaster, ay as Tooltip, aA as TooltipContent, aB as TooltipProvider, aC as TooltipRoot, az as TooltipTrigger, b9 as UseFileReferenceForRecordReturn, b7 as UseFileReferenceOptions, b8 as UseFileReferenceReturn, aR as UserMenu, b3 as useFileReference, b5 as useFileReferenceById, b4 as useFileReferenceForRecord, b6 as useFilesByCategory, bf as useIsPublicPage, be as usePublicPageContext } from './PublicPageProvider-DlsCaR5v.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
export { u as useToast } from './useToast-AyaT-x7p.js';
|
|
5
|
-
export { D as DataTable, a as DataTableProps } from './DataTable-
|
|
6
|
-
export { c as AggregateConfig, A as AutocompleteOptions, d as DataRecord, a as DataTableAction, D as DataTableColumn, b as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId, P as ParsedAddress } from './types-
|
|
5
|
+
export { D as DataTable, a as DataTableProps } from './DataTable-DRUIgtUH.js';
|
|
6
|
+
export { c as AggregateConfig, A as AutocompleteOptions, d as DataRecord, a as DataTableAction, D as DataTableColumn, b as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId, P as ParsedAddress } from './types-DXstZpNI.js';
|
|
7
7
|
export { F as FileCategory, b as FileMetadata, a as FileReference, c as FileUploadOptions } from './file-reference-BavO2eQj.js';
|
|
8
8
|
export { a as NavigationItem, N as NavigationMenuProps } from './types-t9H8qKRw.js';
|
|
9
9
|
import 'react';
|
|
@@ -131,11 +131,12 @@ declare function DateTimeField({ label, value, onChange, timezone, required, cla
|
|
|
131
131
|
* Provides a calendar interface with timezone context for date selection.
|
|
132
132
|
*
|
|
133
133
|
* Features:
|
|
134
|
-
* - Calendar date selection
|
|
134
|
+
* - Calendar date selection with dropdown month/year navigation
|
|
135
135
|
* - Timezone display (shows "Local" when matches user timezone)
|
|
136
136
|
* - Optional "Done" button
|
|
137
137
|
* - Accessible date selection
|
|
138
138
|
* - Keyboard navigation support
|
|
139
|
+
* - Wide date range support (1900-2100) via dropdown selectors
|
|
139
140
|
*
|
|
140
141
|
* @example
|
|
141
142
|
* ```tsx
|
package/dist/components.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { AddressField, Avatar, Badge, Calendar, ContextSelector, FileDisplay, FileUpload, Footer, Form, FormField, Header,
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { Input } from './chunk-
|
|
5
|
-
export { Alert, AlertDescription, AlertTitle,
|
|
6
|
-
import { Button } from './chunk-
|
|
7
|
-
export { Button, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
1
|
+
import { Calendar } from './chunk-JGWDVX64.js';
|
|
2
|
+
export { AddressField, Avatar, Badge, Calendar, ContextSelector, FileDisplay, FileUpload, Footer, Form, FormField, Header, LoginForm, NavigationMenu, PaceAppLayout, PaceLoginPage, ProtectedRoute, PublicPageFooter, PublicPageHeader, PublicPageLayout, SessionRestorationLoader, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, UserMenu, useFileReference, useFileReferenceById, useFileReferenceForRecord, useFilesByCategory } from './chunk-JGWDVX64.js';
|
|
3
|
+
import './chunk-6F3IILHI.js';
|
|
4
|
+
import { Label, Input } from './chunk-Q7Q7V5NV.js';
|
|
5
|
+
export { Alert, AlertDescription, AlertTitle, Checkbox, DataTable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './chunk-Q7Q7V5NV.js';
|
|
6
|
+
import { Button } from './chunk-BM4CQ5P3.js';
|
|
7
|
+
export { Button, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from './chunk-BM4CQ5P3.js';
|
|
8
|
+
import './chunk-5X4QLXRG.js';
|
|
9
|
+
import './chunk-ZKAWKYT4.js';
|
|
10
10
|
export { useToast } from './chunk-S7DKJPLT.js';
|
|
11
|
-
export { ErrorBoundary, ErrorBoundaryProvider, PublicPageProvider, useIsPublicPage, usePublicPageContext } from './chunk-
|
|
11
|
+
export { Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ErrorBoundary, ErrorBoundaryProvider, PublicPageProvider, useIsPublicPage, usePublicPageContext } from './chunk-VBCS3DUA.js';
|
|
12
12
|
import './chunk-C7NSAPTL.js';
|
|
13
13
|
export { UnifiedAuthProvider, useUnifiedAuth } from './chunk-FTCRZOG2.js';
|
|
14
14
|
import './chunk-ZFYPMX46.js';
|
|
15
15
|
import './chunk-AHU7G2R5.js';
|
|
16
16
|
export { FileCategory } from './chunk-6QYDGKQY.js';
|
|
17
17
|
import './chunk-4SXLQIZO.js';
|
|
18
|
-
import { toZonedTime, fromZonedTime, getUserTimeZone } from './chunk-
|
|
19
|
-
export { LoadingSpinner } from './chunk-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import { cn } from './chunk-A55DK444.js';
|
|
18
|
+
import { toZonedTime, fromZonedTime, getUserTimeZone } from './chunk-FEJLJNWA.js';
|
|
19
|
+
export { LoadingSpinner } from './chunk-A3W6LW53.js';
|
|
20
|
+
import './chunk-OJ4SKRSV.js';
|
|
22
21
|
import './chunk-FYHN4DD5.js';
|
|
23
|
-
import './chunk-
|
|
22
|
+
import { cn } from './chunk-7ILTDCL2.js';
|
|
24
23
|
import './chunk-HF6O3O37.js';
|
|
25
24
|
import './chunk-TTRFSOKR.js';
|
|
26
25
|
import './chunk-3RG5ZIWI.js';
|
|
@@ -103,8 +102,8 @@ function DateTimeField({
|
|
|
103
102
|
return timezone;
|
|
104
103
|
}, [timezone]);
|
|
105
104
|
const timezoneDisplay = getTimezoneDisplay();
|
|
106
|
-
return /* @__PURE__ */ jsxs(
|
|
107
|
-
|
|
105
|
+
return /* @__PURE__ */ jsxs(Label, { className: cn("space-y-2", className), htmlFor: fieldId, required, helperText, error, children: [
|
|
106
|
+
label,
|
|
108
107
|
/* @__PURE__ */ jsx(
|
|
109
108
|
Input,
|
|
110
109
|
{
|
|
@@ -119,7 +118,7 @@ function DateTimeField({
|
|
|
119
118
|
className: "w-full"
|
|
120
119
|
}
|
|
121
120
|
),
|
|
122
|
-
timezoneDisplay &&
|
|
121
|
+
timezoneDisplay && /* @__PURE__ */ jsx("span", { className: "absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground pointer-events-none", children: timezoneDisplay })
|
|
123
122
|
] });
|
|
124
123
|
}
|
|
125
124
|
function DatePickerWithTimezone({
|
|
@@ -132,8 +131,8 @@ function DatePickerWithTimezone({
|
|
|
132
131
|
const userTimezone = getUserTimeZone();
|
|
133
132
|
const displayTimezone = timezone || userTimezone;
|
|
134
133
|
const timezoneDisplay = displayTimezone === userTimezone ? "Local" : displayTimezone;
|
|
135
|
-
return /* @__PURE__ */ jsxs("
|
|
136
|
-
/* @__PURE__ */ jsx(
|
|
134
|
+
return /* @__PURE__ */ jsxs("form", { className: cn("grid grid-cols-[1fr_auto] gap-2", className), children: [
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
137
136
|
Calendar,
|
|
138
137
|
{
|
|
139
138
|
mode: "single",
|
|
@@ -143,19 +142,15 @@ function DatePickerWithTimezone({
|
|
|
143
142
|
captionLayout: "dropdown",
|
|
144
143
|
startMonth: new Date(1900, 0),
|
|
145
144
|
endMonth: new Date(2100, 11),
|
|
146
|
-
className: "p-0"
|
|
145
|
+
className: "p-0 col-span-full"
|
|
147
146
|
}
|
|
148
|
-
)
|
|
149
|
-
/* @__PURE__ */ jsxs("
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
] })
|
|
156
|
-
] }),
|
|
157
|
-
onDone && /* @__PURE__ */ jsx(Button, { onClick: onDone, size: "sm", className: "h-8", children: "Done" })
|
|
158
|
-
] })
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ jsxs("label", { htmlFor: "timezone", children: [
|
|
149
|
+
/* @__PURE__ */ jsx(Clock, { className: "size-4 inline-block mr-2", "aria-hidden": "true" }),
|
|
150
|
+
"Timezone: ",
|
|
151
|
+
/* @__PURE__ */ jsx("span", { "aria-label": `Timezone ${timezoneDisplay}`, children: timezoneDisplay })
|
|
152
|
+
] }),
|
|
153
|
+
onDone && /* @__PURE__ */ jsx(Button, { onClick: onDone, size: "sm", className: "ml-auto h-8", children: "Done" })
|
|
159
154
|
] });
|
|
160
155
|
}
|
|
161
156
|
|
|
@@ -3,20 +3,33 @@
|
|
|
3
3
|
* @package @jmruthers/pace-core
|
|
4
4
|
* @module ESLintRules
|
|
5
5
|
*
|
|
6
|
-
* This module exports all pace-core
|
|
6
|
+
* This module exports all pace-core ESLint rules organized by standards.
|
|
7
|
+
* Rules are organized to match the 10-file standards structure.
|
|
8
|
+
*
|
|
9
|
+
* Reference: packages/core/docs/standards/README.md
|
|
7
10
|
*/
|
|
8
11
|
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
12
|
+
const paceCoreComplianceRules = require('./rules/01-pace-core-compliance.cjs');
|
|
13
|
+
const codeQualityRules = require('./rules/04-code-quality.cjs');
|
|
14
|
+
const stylingRules = require('./rules/05-styling.cjs');
|
|
15
|
+
const securityRbacRules = require('./rules/06-security-rbac.cjs');
|
|
16
|
+
const apiTechStackRules = require('./rules/07-api-tech-stack.cjs');
|
|
17
|
+
const testingRules = require('./rules/08-testing.cjs');
|
|
13
18
|
|
|
14
19
|
module.exports = {
|
|
15
20
|
rules: {
|
|
16
|
-
|
|
17
|
-
...
|
|
18
|
-
|
|
19
|
-
...
|
|
21
|
+
// Standard 1: pace-core Compliance
|
|
22
|
+
...paceCoreComplianceRules.rules,
|
|
23
|
+
// Standard 4: Code Quality
|
|
24
|
+
...codeQualityRules.rules,
|
|
25
|
+
// Standard 5: Styling
|
|
26
|
+
...stylingRules.rules,
|
|
27
|
+
// Standard 6: Security & RBAC
|
|
28
|
+
...securityRbacRules.rules,
|
|
29
|
+
// Standard 7: API & Tech Stack
|
|
30
|
+
...apiTechStackRules.rules,
|
|
31
|
+
// Standard 8: Testing
|
|
32
|
+
...testingRules.rules,
|
|
20
33
|
}
|
|
21
34
|
};
|
|
22
35
|
|