@burdenoff/microfe-export 2026.623.2 → 2026.625.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.
- package/dist/export/ExportRoutes.js +9 -9
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/components/ExportProgressBar.js +4 -4
- package/dist/export/components/ExportProgressBar.js.map +1 -1
- package/dist/export/components/PageLayout.js +5 -5
- package/dist/export/components/PageLayout.js.map +1 -1
- package/dist/export/pages/CreateExportPage.js +280 -273
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.js +128 -83
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.js +225 -209
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.js +22 -22
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.js +205 -206
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.js +135 -124
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -39,23 +39,23 @@ var y = class extends t {
|
|
|
39
39
|
className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
|
|
40
40
|
children: [
|
|
41
41
|
/* @__PURE__ */ d("div", {
|
|
42
|
-
className: "p-3 rounded-full bg-
|
|
43
|
-
children: /* @__PURE__ */ d(i, { className: "size-8 text-
|
|
42
|
+
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
43
|
+
children: /* @__PURE__ */ d(i, { className: "size-8 text-status-error-text" })
|
|
44
44
|
}),
|
|
45
45
|
/* @__PURE__ */ f("div", {
|
|
46
46
|
className: "space-y-2",
|
|
47
47
|
children: [/* @__PURE__ */ d("h3", {
|
|
48
|
-
className: "text-lg font-semibold text-
|
|
48
|
+
className: "text-lg font-semibold text-text-primary",
|
|
49
49
|
children: "Failed to load page"
|
|
50
50
|
}), /* @__PURE__ */ d("p", {
|
|
51
|
-
className: "text-sm text-
|
|
51
|
+
className: "text-sm text-text-secondary max-w-md",
|
|
52
52
|
children: this.state.error?.message || "The page chunk could not be loaded. This may be due to a network issue."
|
|
53
53
|
})]
|
|
54
54
|
}),
|
|
55
55
|
/* @__PURE__ */ f("button", {
|
|
56
56
|
type: "button",
|
|
57
57
|
onClick: this.handleRetry,
|
|
58
|
-
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-
|
|
58
|
+
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
59
59
|
children: [/* @__PURE__ */ d(o, { className: "size-4" }), "Try Again"]
|
|
60
60
|
})
|
|
61
61
|
]
|
|
@@ -66,9 +66,9 @@ function b() {
|
|
|
66
66
|
return /* @__PURE__ */ f("div", {
|
|
67
67
|
className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
|
|
68
68
|
children: [/* @__PURE__ */ d("div", {
|
|
69
|
-
className: "p-3 rounded-full bg-
|
|
69
|
+
className: "p-3 rounded-full bg-bg-sunken",
|
|
70
70
|
children: /* @__PURE__ */ d("svg", {
|
|
71
|
-
className: "size-8 text-
|
|
71
|
+
className: "size-8 text-text-secondary",
|
|
72
72
|
fill: "none",
|
|
73
73
|
viewBox: "0 0 24 24",
|
|
74
74
|
stroke: "currentColor",
|
|
@@ -82,10 +82,10 @@ function b() {
|
|
|
82
82
|
}), /* @__PURE__ */ f("div", {
|
|
83
83
|
className: "space-y-2",
|
|
84
84
|
children: [/* @__PURE__ */ d("h3", {
|
|
85
|
-
className: "text-lg font-semibold text-
|
|
85
|
+
className: "text-lg font-semibold text-text-primary",
|
|
86
86
|
children: "Data Export Unavailable"
|
|
87
87
|
}), /* @__PURE__ */ d("p", {
|
|
88
|
-
className: "text-sm text-
|
|
88
|
+
className: "text-sm text-text-secondary max-w-md",
|
|
89
89
|
children: "The Data Export feature is currently disabled for this workspace. Contact your administrator to enable it."
|
|
90
90
|
})]
|
|
91
91
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportRoutes.js","names":[],"sources":["../../src/export/ExportRoutes.tsx"],"sourcesContent":["import {\n lazy,\n Suspense,\n Component,\n type ReactNode,\n type ErrorInfo,\n} from \"react\";\nimport { Navigate, Route, Routes } from \"react-router-dom\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\nimport { FeatureGate } from \"@burdenoff/fe-libs/shared/feature-flags\";\n\n// Eager loaded - primary landing page\nimport { ExportLandingPage } from \"./pages/ExportLandingPage\";\n\n// Lazy loaded pages\nconst CreateExportPage = lazy(() =>\n import(\"./pages/CreateExportPage\").then((m) => ({\n default: m.CreateExportPage,\n })),\n);\nconst ExportHistoryPage = lazy(() =>\n import(\"./pages/ExportHistoryPage\").then((m) => ({\n default: m.ExportHistoryPage,\n })),\n);\nconst ExportDetailPage = lazy(() =>\n import(\"./pages/ExportDetailPage\").then((m) => ({\n default: m.ExportDetailPage,\n })),\n);\nconst ExportTemplatesPage = lazy(() =>\n import(\"./pages/ExportTemplatesPage\").then((m) => ({\n default: m.ExportTemplatesPage,\n })),\n);\nconst TemplateDetailPage = lazy(() =>\n import(\"./pages/TemplateDetailPage\").then((m) => ({\n default: m.TemplateDetailPage,\n })),\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(\"[Export] Lazy page load failed:\", error, errorInfo);\n }\n\n handleRetry = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-
|
|
1
|
+
{"version":3,"file":"ExportRoutes.js","names":[],"sources":["../../src/export/ExportRoutes.tsx"],"sourcesContent":["import {\n lazy,\n Suspense,\n Component,\n type ReactNode,\n type ErrorInfo,\n} from \"react\";\nimport { Navigate, Route, Routes } from \"react-router-dom\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\nimport { FeatureGate } from \"@burdenoff/fe-libs/shared/feature-flags\";\n\n// Eager loaded - primary landing page\nimport { ExportLandingPage } from \"./pages/ExportLandingPage\";\n\n// Lazy loaded pages\nconst CreateExportPage = lazy(() =>\n import(\"./pages/CreateExportPage\").then((m) => ({\n default: m.CreateExportPage,\n })),\n);\nconst ExportHistoryPage = lazy(() =>\n import(\"./pages/ExportHistoryPage\").then((m) => ({\n default: m.ExportHistoryPage,\n })),\n);\nconst ExportDetailPage = lazy(() =>\n import(\"./pages/ExportDetailPage\").then((m) => ({\n default: m.ExportDetailPage,\n })),\n);\nconst ExportTemplatesPage = lazy(() =>\n import(\"./pages/ExportTemplatesPage\").then((m) => ({\n default: m.ExportTemplatesPage,\n })),\n);\nconst TemplateDetailPage = lazy(() =>\n import(\"./pages/TemplateDetailPage\").then((m) => ({\n default: m.TemplateDetailPage,\n })),\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(\"[Export] Lazy page load failed:\", error, errorInfo);\n }\n\n handleRetry = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">\n Failed to load page\n </h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {this.state.error?.message ||\n \"The page chunk could not be loaded. This may be due to a network issue.\"}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n/**\n * Fallback shown when the Export feature flag is OFF.\n */\nfunction ExportDisabledFallback() {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-bg-sunken\">\n <svg\n className=\"size-8 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3\"\n />\n </svg>\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">\n Data Export Unavailable\n </h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n The Data Export feature is currently disabled for this workspace.\n Contact your administrator to enable it.\n </p>\n </div>\n </div>\n );\n}\n\n/**\n * Internal router for the Export microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes (relative to basePath, e.g., /export):\n * - / → Export dashboard page\n * - /new → Create new export job\n * - /history → Export history list\n * - /:jobId → Export job detail page\n * - /templates → Export templates list\n * - /templates/:templateId → Template detail page\n */\nexport function ExportRoutes() {\n return (\n <LazyErrorBoundary>\n <FeatureGate\n flag=\"workspaces.export\"\n defaultValue={true}\n fallback={<ExportDisabledFallback />}\n >\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route index element={<ExportLandingPage />} />\n\n {/* Create new export (lazy loaded) */}\n <Route path=\"new\" element={<CreateExportPage />} />\n\n {/* Export history (lazy loaded) */}\n <Route path=\"history\" element={<ExportHistoryPage />} />\n\n {/* Export job detail (lazy loaded) */}\n <Route path=\":jobId\" element={<ExportDetailPage />} />\n\n {/* Templates (lazy loaded) */}\n <Route path=\"templates\" element={<ExportTemplatesPage />} />\n <Route\n path=\"templates/:templateId\"\n element={<TemplateDetailPage />}\n />\n\n {/* Catch-all route - redirect to dashboard */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </FeatureGate>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;AAeA,IAAM,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAC/C,SAAS,EAAE,mBACZ,EAAE,CACJ,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,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c;KACd,gBAAe;KACf,GAAE;KACF,CAAA;IACE,CAAA;GACF,CAAA,EACN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,MAAD;IAAI,WAAU;cAA0C;IAEnD,CAAA,EACL,kBAAC,KAAD;IAAG,WAAU;cAAuC;IAGhD,CAAA,CACA;KACF;;;AAgBV,SAAgB,IAAe;AAC7B,QACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EACE,MAAK;EACL,cAAc;EACd,UAAU,kBAAC,GAAD,EAA0B,CAAA;YAEpC,kBAAC,GAAD;GAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;aAChC,kBAAC,GAAD,EAAA,UAAA;IAEE,kBAAC,GAAD;KAAO,OAAA;KAAM,SAAS,kBAAC,GAAD,EAAqB,CAAA;KAAI,CAAA;IAG/C,kBAAC,GAAD;KAAO,MAAK;KAAM,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAGnD,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,kBAAC,GAAD,EAAqB,CAAA;KAAI,CAAA;IAGxD,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAGtD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAuB,CAAA;KAAI,CAAA;IAC5D,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,kBAAC,GAAD,EAAsB,CAAA;KAC/B,CAAA;IAGF,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACC,CAAA,EACI,CAAA"}
|
|
@@ -13,16 +13,16 @@ function i({ progress: i, className: a, showLabel: o = !0, size: s = "md" }) {
|
|
|
13
13
|
children: [o && /* @__PURE__ */ n("div", {
|
|
14
14
|
className: "flex items-center justify-between mb-1",
|
|
15
15
|
children: [/* @__PURE__ */ t("span", {
|
|
16
|
-
className: "text-xs font-medium text-
|
|
16
|
+
className: "text-xs font-medium text-text-secondary",
|
|
17
17
|
children: "Progress"
|
|
18
18
|
}), /* @__PURE__ */ n("span", {
|
|
19
|
-
className: "text-xs font-semibold text-
|
|
19
|
+
className: "text-xs font-semibold text-text-primary",
|
|
20
20
|
children: [Math.round(c), "%"]
|
|
21
21
|
})]
|
|
22
22
|
}), /* @__PURE__ */ t("div", {
|
|
23
|
-
className: e("w-full bg-
|
|
23
|
+
className: e("w-full bg-bg-sunken rounded-full overflow-hidden", r[s]),
|
|
24
24
|
children: /* @__PURE__ */ t("div", {
|
|
25
|
-
className: e("h-full rounded-full transition-all duration-500 ease-out", c === 100 ? "bg-status-success-bg" : "bg-primary bg-gradient-to-r from-primary to-primary/80"),
|
|
25
|
+
className: e("h-full rounded-full transition-all duration-500 ease-out", c === 100 ? "bg-status-success-bg" : "bg-action-primary-bg bg-gradient-to-r from-primary to-primary/80"),
|
|
26
26
|
style: { width: `${c}%` }
|
|
27
27
|
})
|
|
28
28
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportProgressBar.js","names":[],"sources":["../../../src/export/components/ExportProgressBar.tsx"],"sourcesContent":["import { cn } from \"../utils/cn\";\n\ninterface ExportProgressBarProps {\n progress: number;\n className?: string;\n showLabel?: boolean;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst sizeClasses = {\n sm: \"h-1.5\",\n md: \"h-2.5\",\n lg: \"h-4\",\n};\n\n/**\n * ExportProgressBar - Shows export progress percentage\n */\nexport function ExportProgressBar({\n progress,\n className,\n showLabel = true,\n size = \"md\",\n}: ExportProgressBarProps) {\n const clampedProgress = Math.min(100, Math.max(0, progress));\n\n return (\n <div className={cn(\"w-full\", className)}>\n {showLabel && (\n <div className=\"flex items-center justify-between mb-1\">\n <span className=\"text-xs font-medium text-
|
|
1
|
+
{"version":3,"file":"ExportProgressBar.js","names":[],"sources":["../../../src/export/components/ExportProgressBar.tsx"],"sourcesContent":["import { cn } from \"../utils/cn\";\n\ninterface ExportProgressBarProps {\n progress: number;\n className?: string;\n showLabel?: boolean;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst sizeClasses = {\n sm: \"h-1.5\",\n md: \"h-2.5\",\n lg: \"h-4\",\n};\n\n/**\n * ExportProgressBar - Shows export progress percentage\n */\nexport function ExportProgressBar({\n progress,\n className,\n showLabel = true,\n size = \"md\",\n}: ExportProgressBarProps) {\n const clampedProgress = Math.min(100, Math.max(0, progress));\n\n return (\n <div className={cn(\"w-full\", className)}>\n {showLabel && (\n <div className=\"flex items-center justify-between mb-1\">\n <span className=\"text-xs font-medium text-text-secondary\">\n Progress\n </span>\n <span className=\"text-xs font-semibold text-text-primary\">\n {Math.round(clampedProgress)}%\n </span>\n </div>\n )}\n <div\n className={cn(\n \"w-full bg-bg-sunken rounded-full overflow-hidden\",\n sizeClasses[size],\n )}\n >\n <div\n className={cn(\n \"h-full rounded-full transition-all duration-500 ease-out\",\n clampedProgress === 100\n ? \"bg-status-success-bg\"\n : \"bg-action-primary-bg bg-gradient-to-r from-primary to-primary/80\",\n )}\n style={{ width: `${clampedProgress}%` }}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;AASA,IAAM,IAAc;CAClB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAKD,SAAgB,EAAkB,EAChC,aACA,cACA,eAAY,IACZ,UAAO,QACkB;CACzB,IAAM,IAAkB,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,EAAS,CAAC;AAE5D,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,UAAU,EAAU;YAAvC,CACG,KACC,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cAA0C;IAEnD,CAAA,EACP,kBAAC,QAAD;IAAM,WAAU;cAAhB,CACG,KAAK,MAAM,EAAgB,EAAC,IACxB;MACH;MAER,kBAAC,OAAD;GACE,WAAW,EACT,oDACA,EAAY,GACb;aAED,kBAAC,OAAD;IACE,WAAW,EACT,4DACA,MAAoB,MAChB,yBACA,mEACL;IACD,OAAO,EAAE,OAAO,GAAG,EAAgB,IAAI;IACvC,CAAA;GACE,CAAA,CACF"}
|
|
@@ -25,14 +25,14 @@ function a({ children: r, title: a, subtitle: o, icon: s, headerActions: c, head
|
|
|
25
25
|
children: [(a || s) && /* @__PURE__ */ n("div", {
|
|
26
26
|
className: "flex items-center gap-3",
|
|
27
27
|
children: [s && /* @__PURE__ */ t("div", {
|
|
28
|
-
className: "flex-shrink-0 p-2.5 rounded-xl bg-primary/10 text-primary",
|
|
28
|
+
className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
|
|
29
29
|
children: s
|
|
30
30
|
}), a && /* @__PURE__ */ t("h1", {
|
|
31
|
-
className: "text-2xl sm:text-3xl font-bold tracking-tight text-
|
|
31
|
+
className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
|
|
32
32
|
children: a
|
|
33
33
|
})]
|
|
34
34
|
}), o && /* @__PURE__ */ t("p", {
|
|
35
|
-
className: "text-sm sm:text-base text-
|
|
35
|
+
className: "text-sm sm:text-base text-text-secondary max-w-2xl",
|
|
36
36
|
children: o
|
|
37
37
|
})]
|
|
38
38
|
}), c && /* @__PURE__ */ t("div", {
|
|
@@ -57,10 +57,10 @@ function o({ children: r, title: i, description: a, actions: o, className: s, ..
|
|
|
57
57
|
children: [(i || o) && /* @__PURE__ */ n("div", {
|
|
58
58
|
className: "flex items-center justify-between",
|
|
59
59
|
children: [/* @__PURE__ */ n("div", { children: [i && /* @__PURE__ */ t("h2", {
|
|
60
|
-
className: "text-lg font-semibold text-
|
|
60
|
+
className: "text-lg font-semibold text-text-primary",
|
|
61
61
|
children: i
|
|
62
62
|
}), a && /* @__PURE__ */ t("p", {
|
|
63
|
-
className: "text-sm text-
|
|
63
|
+
className: "text-sm text-text-secondary",
|
|
64
64
|
children: a
|
|
65
65
|
})] }), o && /* @__PURE__ */ t("div", {
|
|
66
66
|
className: "flex items-center gap-2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/export/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { EmptyState as CanonicalEmptyState } from \"@burdenoff/fe-libs/ui\";\nimport { cn } from \"../utils/cn\";\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"full\";\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: \"max-w-screen-sm\", // 640px\n md: \"max-w-screen-md\", // 768px\n lg: \"max-w-screen-lg\", // 1024px\n xl: \"max-w-screen-xl\", // 1280px\n \"2xl\": \"max-w-screen-2xl\", // 1536px\n \"3xl\": \"max-w-[1600px]\",\n full: \"max-w-full\",\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = \"xl\",\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n \"min-h-full w-full\",\n // Responsive horizontal padding\n \"px-4 sm:px-6 lg:px-8 xl:px-12\",\n // Responsive vertical padding\n \"py-6 sm:py-8 lg:py-10\",\n // Entrance animation\n \"animate-in fade-in-0 slide-in-from-bottom-4 duration-500\",\n className,\n )}\n >\n {/* Max-width constrained content container */}\n <div\n className={cn(\n \"mx-auto w-full\",\n maxWidthClasses[maxWidth],\n contentClassName,\n )}\n >\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-primary/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/export/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { EmptyState as CanonicalEmptyState } from \"@burdenoff/fe-libs/ui\";\nimport { cn } from \"../utils/cn\";\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"full\";\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: \"max-w-screen-sm\", // 640px\n md: \"max-w-screen-md\", // 768px\n lg: \"max-w-screen-lg\", // 1024px\n xl: \"max-w-screen-xl\", // 1280px\n \"2xl\": \"max-w-screen-2xl\", // 1536px\n \"3xl\": \"max-w-[1600px]\",\n full: \"max-w-full\",\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = \"xl\",\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n \"min-h-full w-full\",\n // Responsive horizontal padding\n \"px-4 sm:px-6 lg:px-8 xl:px-12\",\n // Responsive vertical padding\n \"py-6 sm:py-8 lg:py-10\",\n // Entrance animation\n \"animate-in fade-in-0 slide-in-from-bottom-4 duration-500\",\n className,\n )}\n >\n {/* Max-width constrained content container */}\n <div\n className={cn(\n \"mx-auto w-full\",\n maxWidthClasses[maxWidth],\n contentClassName,\n )}\n >\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-text-primary\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-text-secondary max-w-2xl\">\n {subtitle}\n </p>\n )}\n </div>\n\n {/* Header Actions */}\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n {headerActions}\n </div>\n )}\n </div>\n\n {/* Additional Header Content */}\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * PageSection - A section within a page with consistent spacing\n */\nexport function PageSection({\n children,\n title,\n description,\n actions,\n className,\n ...rest\n}: {\n children: ReactNode;\n title?: string;\n description?: string;\n actions?: ReactNode;\n className?: string;\n} & React.HTMLAttributes<HTMLElement>) {\n return (\n <section className={cn(\"space-y-4\", className)} {...rest}>\n {(title || actions) && (\n <div className=\"flex items-center justify-between\">\n <div>\n {title && (\n <h2 className=\"text-lg font-semibold text-text-primary\">{title}</h2>\n )}\n {description && (\n <p className=\"text-sm text-text-secondary\">{description}</p>\n )}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n )}\n {children}\n </section>\n );\n}\n\n/**\n * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n * Keeps the existing microfe-export call sites stable while routing all\n * empty-state rendering through the shared primitive.\n */\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n return (\n <div className={className}>\n <CanonicalEmptyState\n icon={icon}\n title={title}\n description={description}\n action={action}\n />\n </div>\n );\n}\n"],"mappings":";;;;AA0BA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAWD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EAET,qBAEA,iCAEA,yBAEA,4DACA,EACD;YAGD,kBAAC,OAAD;GACE,WAAW,EACT,kBACA,EAAgB,IAChB,EACD;aALH,CAQG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CAEE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,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