@burdenoff/microfe-sandbox 2026.625.2 → 2026.625.3

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.
@@ -1,8 +1,8 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { EmptyState as r } from "@burdenoff/fe-libs/ui";
3
+ import "@burdenoff/fe-libs/ui";
4
4
  //#region src/sandbox/components/PageLayout.tsx
5
- var i = {
5
+ var r = {
6
6
  sm: "max-w-screen-sm",
7
7
  md: "max-w-screen-md",
8
8
  lg: "max-w-screen-lg",
@@ -11,57 +11,50 @@ var i = {
11
11
  "3xl": "max-w-[1600px]",
12
12
  full: "max-w-full"
13
13
  };
14
- function a({ children: r, title: a, subtitle: o, icon: s, headerActions: c, headerContent: l, maxWidth: u = "xl", showHeader: d = !0, className: f, contentClassName: p }) {
14
+ function i({ children: i, title: a, subtitle: o, icon: s, headerActions: c, headerContent: l, heroBackdrop: u, maxWidth: d = "xl", showHeader: f = !0, className: p, contentClassName: m }) {
15
15
  return /* @__PURE__ */ t("div", {
16
- className: e("min-h-screen w-full bg-bg-surface text-text-primary", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-200", f),
16
+ className: e("min-h-screen w-full bg-bg-surface text-text-primary", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-200", p),
17
17
  children: /* @__PURE__ */ n("div", {
18
- className: e("mx-auto w-full", i[u], p),
19
- children: [d && (a || c) && /* @__PURE__ */ n("header", {
20
- className: "mb-6 sm:mb-8",
21
- children: [/* @__PURE__ */ n("div", {
22
- className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
23
- children: [/* @__PURE__ */ n("div", {
24
- className: "space-y-1",
25
- children: [(a || s) && /* @__PURE__ */ n("div", {
26
- className: "flex items-center gap-3",
27
- children: [s && /* @__PURE__ */ t("div", {
28
- className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
29
- children: s
30
- }), a && /* @__PURE__ */ t("h1", {
31
- className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
32
- children: a
18
+ className: e("mx-auto w-full", r[d], m),
19
+ children: [f && (a || c) && /* @__PURE__ */ n("header", {
20
+ className: e("mb-6 sm:mb-8", u && "relative overflow-hidden rounded-2xl px-4 py-5 sm:px-6 sm:py-6"),
21
+ children: [
22
+ u,
23
+ /* @__PURE__ */ n("div", {
24
+ className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
25
+ children: [/* @__PURE__ */ n("div", {
26
+ className: "space-y-1",
27
+ children: [(a || s) && /* @__PURE__ */ n("div", {
28
+ className: "flex items-center gap-3",
29
+ children: [s && /* @__PURE__ */ t("div", {
30
+ className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
31
+ children: s
32
+ }), a && /* @__PURE__ */ t("h1", {
33
+ className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
34
+ children: a
35
+ })]
36
+ }), o && /* @__PURE__ */ t("p", {
37
+ className: "text-sm sm:text-base text-text-secondary max-w-2xl",
38
+ children: o
33
39
  })]
34
- }), o && /* @__PURE__ */ t("p", {
35
- className: "text-sm sm:text-base text-text-secondary max-w-2xl",
36
- children: o
40
+ }), c && /* @__PURE__ */ t("div", {
41
+ className: "flex items-center gap-2 flex-shrink-0",
42
+ children: c
37
43
  })]
38
- }), c && /* @__PURE__ */ t("div", {
39
- className: "flex items-center gap-2 flex-shrink-0",
40
- children: c
41
- })]
42
- }), l && /* @__PURE__ */ t("div", {
43
- className: "mt-4",
44
- children: l
45
- })]
44
+ }),
45
+ l && /* @__PURE__ */ t("div", {
46
+ className: "mt-4",
47
+ children: l
48
+ })
49
+ ]
46
50
  }), /* @__PURE__ */ t("div", {
47
51
  className: "space-y-6",
48
- children: r
52
+ children: i
49
53
  })]
50
54
  })
51
55
  });
52
56
  }
53
- function o({ icon: e, title: n, description: i, action: a, className: o }) {
54
- return /* @__PURE__ */ t("div", {
55
- className: o,
56
- children: /* @__PURE__ */ t(r, {
57
- icon: e,
58
- title: n,
59
- description: i,
60
- action: a
61
- })
62
- });
63
- }
64
57
  //#endregion
65
- export { o as EmptyState, a as PageLayout };
58
+ export { i as PageLayout };
66
59
 
67
60
  //# sourceMappingURL=PageLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/sandbox/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',\n md: 'max-w-screen-md',\n lg: 'max-w-screen-lg',\n xl: 'max-w-screen-xl',\n '2xl': 'max-w-screen-2xl',\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\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 'min-h-screen w-full bg-bg-surface text-text-primary',\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n 'py-6 sm:py-8 lg:py-10',\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-200',\n className\n )}\n >\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\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 <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\">{subtitle}</p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\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 * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n * Keeps the existing microfe-sandbox 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 icon={icon} title={title} description={description} action={action} />\n </div>\n );\n}\n"],"mappings":";;;;AA0BA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAKD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,uDACA,iCACA,yBACA,4DACA,EACD;YAED,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,EAAiB;aAAjF,CACG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA,EAEP,KACC,kBAAC,MAAD;QAAI,WAAU;kBACX;QACE,CAAA,CAEH;UAEP,KACC,kBAAC,KAAD;OAAG,WAAU;iBAAsD;OAAa,CAAA,CAE9E;SACL,KACC,kBAAC,OAAD;MAAK,WAAU;gBAAyC;MAAoB,CAAA,CAE1E;QACL,KAAiB,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAoB,CAAA,CACtD;OAKX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AASV,SAAgB,EAAW,EACzB,SACA,UACA,gBACA,WACA,gBAOC;AACD,QACE,kBAAC,OAAD;EAAgB;YACd,kBAAC,GAAD;GAA2B;GAAa;GAAoB;GAAqB;GAAU,CAAA;EACvF,CAAA"}
1
+ {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/sandbox/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 (string, or a node when a gradient/emphasis treatment is needed) */\n title?: ReactNode;\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 /**\n * Optional decorative backdrop rendered behind the header section (e.g. an\n * `<AuroraBackground />`). It is placed in a `relative overflow-hidden`\n * wrapper at -z-10 so it never moves or covers content. Use sparingly — one\n * hero backdrop per MFE (the primary page).\n */\n heroBackdrop?: 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',\n md: 'max-w-screen-md',\n lg: 'max-w-screen-lg',\n xl: 'max-w-screen-xl',\n '2xl': 'max-w-screen-2xl',\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n heroBackdrop,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n 'min-h-screen w-full bg-bg-surface text-text-primary',\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n 'py-6 sm:py-8 lg:py-10',\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-200',\n className\n )}\n >\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\n {showHeader && (title || headerActions) && (\n <header\n className={cn(\n 'mb-6 sm:mb-8',\n heroBackdrop && 'relative overflow-hidden rounded-2xl px-4 py-5 sm:px-6 sm:py-6'\n )}\n >\n {heroBackdrop}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\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\">{subtitle}</p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\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 * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n * Keeps the existing microfe-sandbox 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 icon={icon} title={title} description={description} action={action} />\n </div>\n );\n}\n"],"mappings":";;;;AAiCA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAKD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,iBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,uDACA,iCACA,yBACA,4DACA,EACD;YAED,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,EAAiB;aAAjF,CACG,MAAe,KAAS,MACvB,kBAAC,UAAD;IACE,WAAW,EACT,gBACA,KAAgB,iEACjB;cAJH;KAMG;KACD,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OAAK,WAAU;iBAAf,EACI,KAAS,MACT,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,KACC,kBAAC,OAAD;SAAK,WAAU;mBACZ;SACG,CAAA,EAEP,KACC,kBAAC,MAAD;SAAI,WAAU;mBACX;SACE,CAAA,CAEH;WAEP,KACC,kBAAC,KAAD;QAAG,WAAU;kBAAsD;QAAa,CAAA,CAE9E;UACL,KACC,kBAAC,OAAD;OAAK,WAAU;iBAAyC;OAAoB,CAAA,CAE1E;;KACL,KAAiB,kBAAC,OAAD;MAAK,WAAU;gBAAQ;MAAoB,CAAA;KACtD;OAKX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA"}
@@ -59,7 +59,7 @@ var p = {
59
59
  color: "text-text-secondary",
60
60
  bg: "bg-bg-sunken border-border-subtle",
61
61
  icon: i
62
- }, l = c.icon, m = n === "PROVISIONING" || n === "STOPPING", h = {
62
+ }, l = c.icon, m = n === "PROVISIONING" || n === "STOPPING", h = n === "RUNNING", g = {
63
63
  PENDING: t(s, "sandbox.status.pending", "Pending"),
64
64
  PROVISIONING: t(s, "sandbox.status.provisioning", "Provisioning"),
65
65
  RUNNING: t(s, "sandbox.status.running", "Running"),
@@ -70,13 +70,13 @@ var p = {
70
70
  FAILED: t(s, "sandbox.status.failed", "Failed")
71
71
  }[n] ?? c.label;
72
72
  return /* @__PURE__ */ f("output", {
73
- "aria-label": h,
73
+ "aria-label": g,
74
74
  className: e("inline-flex items-center gap-1.5 border rounded-full font-medium", o === "sm" ? "px-2.5 py-0.5 text-xs" : "px-3 py-1 text-sm", c.bg, c.color, r),
75
75
  children: [a && /* @__PURE__ */ d(l, {
76
76
  size: o === "sm" ? 12 : 14,
77
77
  "aria-hidden": "true",
78
- className: e(m && "animate-spin")
79
- }), h]
78
+ className: e(m && "animate-spin", h && "motion-safe:animate-vc-glow-pulse")
79
+ }), g]
80
80
  });
81
81
  };
82
82
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/sandbox/components/StatusBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {\n Clock,\n Loader2,\n CheckCircle2,\n StopCircle,\n AlertTriangle,\n TimerOff,\n XCircle,\n Circle,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { cn } from '../utils/cn';\nimport type { SandboxStatus } from '../types';\nimport { tWithFallback } from '../utils/i18n';\n\ninterface StatusBadgeProps {\n status: SandboxStatus;\n className?: string;\n showIcon?: boolean;\n size?: 'sm' | 'md';\n}\n\nconst statusConfig: Record<\n SandboxStatus,\n { label: string; color: string; bg: string; icon: FC<{ size?: number; className?: string }> }\n> = {\n PENDING: {\n label: 'Pending',\n color: 'text-status-warning-text',\n bg: 'bg-status-warning-bg-subtle border-border-default',\n icon: Clock,\n },\n PROVISIONING: {\n label: 'Provisioning',\n color: 'text-status-info-text',\n bg: 'bg-status-info-bg-subtle border-border-default',\n icon: Loader2,\n },\n RUNNING: {\n label: 'Running',\n color: 'text-status-success-text',\n bg: 'bg-status-success-bg-subtle border-border-default',\n icon: CheckCircle2,\n },\n STOPPING: {\n label: 'Stopping',\n color: 'text-accent-orange',\n bg: 'bg-accent-orange-subtle border-border-default',\n icon: Loader2,\n },\n STOPPED: {\n label: 'Stopped',\n color: 'text-text-secondary',\n bg: 'bg-bg-sunken border-border-default',\n icon: StopCircle,\n },\n ERROR: {\n label: 'Error',\n color: 'text-status-error-text',\n bg: 'bg-status-error-bg-subtle border-border-default',\n icon: AlertTriangle,\n },\n EXPIRED: {\n label: 'Expired',\n color: 'text-text-secondary',\n bg: 'bg-bg-sunken border-border-default',\n icon: TimerOff,\n },\n FAILED: {\n label: 'Failed',\n color: 'text-status-error-text',\n bg: 'bg-status-error-bg-subtle border-border-default',\n icon: XCircle,\n },\n};\n\n/**\n * Color-coded status badge for sandbox lifecycle states\n */\nexport const StatusBadge: FC<StatusBadgeProps> = ({\n status,\n className,\n showIcon = true,\n size = 'sm',\n}) => {\n const { t } = useI18n();\n const config = statusConfig[status] || {\n label: status,\n color: 'text-text-secondary',\n bg: 'bg-bg-sunken border-border-subtle',\n icon: Circle,\n };\n const Icon = config.icon;\n const isAnimated = status === 'PROVISIONING' || status === 'STOPPING';\n const labels: Record<SandboxStatus, string> = {\n PENDING: tWithFallback(t, 'sandbox.status.pending', 'Pending'),\n PROVISIONING: tWithFallback(t, 'sandbox.status.provisioning', 'Provisioning'),\n RUNNING: tWithFallback(t, 'sandbox.status.running', 'Running'),\n STOPPING: tWithFallback(t, 'sandbox.status.stopping', 'Stopping'),\n STOPPED: tWithFallback(t, 'sandbox.status.stopped', 'Stopped'),\n ERROR: tWithFallback(t, 'sandbox.status.error', 'Error'),\n EXPIRED: tWithFallback(t, 'sandbox.status.expired', 'Expired'),\n FAILED: tWithFallback(t, 'sandbox.status.failed', 'Failed'),\n };\n\n const label = labels[status] ?? config.label;\n return (\n <output\n aria-label={label}\n className={cn(\n 'inline-flex items-center gap-1.5 border rounded-full font-medium',\n size === 'sm' ? 'px-2.5 py-0.5 text-xs' : 'px-3 py-1 text-sm',\n config.bg,\n config.color,\n className\n )}\n >\n {showIcon && (\n <Icon\n size={size === 'sm' ? 12 : 14}\n aria-hidden=\"true\"\n className={cn(isAnimated && 'animate-spin')}\n />\n )}\n {label}\n </output>\n );\n};\n"],"mappings":";;;;;;AAuBA,IAAM,IAGF;CACF,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,cAAc;EACZ,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,UAAU;EACR,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,OAAO;EACL,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,QAAQ;EACN,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACF,EAKY,KAAqC,EAChD,WACA,cACA,cAAW,IACX,UAAO,WACH;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,IAAS,EAAa,MAAW;EACrC,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP,EACK,IAAO,EAAO,MACd,IAAa,MAAW,kBAAkB,MAAW,YAYrD,IAXwC;EAC5C,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,cAAc,EAAc,GAAG,+BAA+B,eAAe;EAC7E,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,UAAU,EAAc,GAAG,2BAA2B,WAAW;EACjE,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,OAAO,EAAc,GAAG,wBAAwB,QAAQ;EACxD,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,QAAQ,EAAc,GAAG,yBAAyB,SAAS;EAC5D,CAEoB,MAAW,EAAO;AACvC,QACE,kBAAC,UAAD;EACE,cAAY;EACZ,WAAW,EACT,oEACA,MAAS,OAAO,0BAA0B,qBAC1C,EAAO,IACP,EAAO,OACP,EACD;YARH,CAUG,KACC,kBAAC,GAAD;GACE,MAAM,MAAS,OAAO,KAAK;GAC3B,eAAY;GACZ,WAAW,EAAG,KAAc,eAAe;GAC3C,CAAA,EAEH,EACM"}
1
+ {"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/sandbox/components/StatusBadge.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {\n Clock,\n Loader2,\n CheckCircle2,\n StopCircle,\n AlertTriangle,\n TimerOff,\n XCircle,\n Circle,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { cn } from '../utils/cn';\nimport type { SandboxStatus } from '../types';\nimport { tWithFallback } from '../utils/i18n';\n\ninterface StatusBadgeProps {\n status: SandboxStatus;\n className?: string;\n showIcon?: boolean;\n size?: 'sm' | 'md';\n}\n\nconst statusConfig: Record<\n SandboxStatus,\n { label: string; color: string; bg: string; icon: FC<{ size?: number; className?: string }> }\n> = {\n PENDING: {\n label: 'Pending',\n color: 'text-status-warning-text',\n bg: 'bg-status-warning-bg-subtle border-border-default',\n icon: Clock,\n },\n PROVISIONING: {\n label: 'Provisioning',\n color: 'text-status-info-text',\n bg: 'bg-status-info-bg-subtle border-border-default',\n icon: Loader2,\n },\n RUNNING: {\n label: 'Running',\n color: 'text-status-success-text',\n bg: 'bg-status-success-bg-subtle border-border-default',\n icon: CheckCircle2,\n },\n STOPPING: {\n label: 'Stopping',\n color: 'text-accent-orange',\n bg: 'bg-accent-orange-subtle border-border-default',\n icon: Loader2,\n },\n STOPPED: {\n label: 'Stopped',\n color: 'text-text-secondary',\n bg: 'bg-bg-sunken border-border-default',\n icon: StopCircle,\n },\n ERROR: {\n label: 'Error',\n color: 'text-status-error-text',\n bg: 'bg-status-error-bg-subtle border-border-default',\n icon: AlertTriangle,\n },\n EXPIRED: {\n label: 'Expired',\n color: 'text-text-secondary',\n bg: 'bg-bg-sunken border-border-default',\n icon: TimerOff,\n },\n FAILED: {\n label: 'Failed',\n color: 'text-status-error-text',\n bg: 'bg-status-error-bg-subtle border-border-default',\n icon: XCircle,\n },\n};\n\n/**\n * Color-coded status badge for sandbox lifecycle states\n */\nexport const StatusBadge: FC<StatusBadgeProps> = ({\n status,\n className,\n showIcon = true,\n size = 'sm',\n}) => {\n const { t } = useI18n();\n const config = statusConfig[status] || {\n label: status,\n color: 'text-text-secondary',\n bg: 'bg-bg-sunken border-border-subtle',\n icon: Circle,\n };\n const Icon = config.icon;\n const isAnimated = status === 'PROVISIONING' || status === 'STOPPING';\n // Subtle opacity pulse on the live/running indicator (reduced-motion-safe).\n const isLive = status === 'RUNNING';\n const labels: Record<SandboxStatus, string> = {\n PENDING: tWithFallback(t, 'sandbox.status.pending', 'Pending'),\n PROVISIONING: tWithFallback(t, 'sandbox.status.provisioning', 'Provisioning'),\n RUNNING: tWithFallback(t, 'sandbox.status.running', 'Running'),\n STOPPING: tWithFallback(t, 'sandbox.status.stopping', 'Stopping'),\n STOPPED: tWithFallback(t, 'sandbox.status.stopped', 'Stopped'),\n ERROR: tWithFallback(t, 'sandbox.status.error', 'Error'),\n EXPIRED: tWithFallback(t, 'sandbox.status.expired', 'Expired'),\n FAILED: tWithFallback(t, 'sandbox.status.failed', 'Failed'),\n };\n\n const label = labels[status] ?? config.label;\n return (\n <output\n aria-label={label}\n className={cn(\n 'inline-flex items-center gap-1.5 border rounded-full font-medium',\n size === 'sm' ? 'px-2.5 py-0.5 text-xs' : 'px-3 py-1 text-sm',\n config.bg,\n config.color,\n className\n )}\n >\n {showIcon && (\n <Icon\n size={size === 'sm' ? 12 : 14}\n aria-hidden=\"true\"\n className={cn(\n isAnimated && 'animate-spin',\n isLive && 'motion-safe:animate-vc-glow-pulse'\n )}\n />\n )}\n {label}\n </output>\n );\n};\n"],"mappings":";;;;;;AAuBA,IAAM,IAGF;CACF,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,cAAc;EACZ,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,UAAU;EACR,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,OAAO;EACL,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,SAAS;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACD,QAAQ;EACN,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP;CACF,EAKY,KAAqC,EAChD,WACA,cACA,cAAW,IACX,UAAO,WACH;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,IAAS,EAAa,MAAW;EACrC,OAAO;EACP,OAAO;EACP,IAAI;EACJ,MAAM;EACP,EACK,IAAO,EAAO,MACd,IAAa,MAAW,kBAAkB,MAAW,YAErD,IAAS,MAAW,WAYpB,IAXwC;EAC5C,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,cAAc,EAAc,GAAG,+BAA+B,eAAe;EAC7E,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,UAAU,EAAc,GAAG,2BAA2B,WAAW;EACjE,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,OAAO,EAAc,GAAG,wBAAwB,QAAQ;EACxD,SAAS,EAAc,GAAG,0BAA0B,UAAU;EAC9D,QAAQ,EAAc,GAAG,yBAAyB,SAAS;EAC5D,CAEoB,MAAW,EAAO;AACvC,QACE,kBAAC,UAAD;EACE,cAAY;EACZ,WAAW,EACT,oEACA,MAAS,OAAO,0BAA0B,qBAC1C,EAAO,IACP,EAAO,OACP,EACD;YARH,CAUG,KACC,kBAAC,GAAD;GACE,MAAM,MAAS,OAAO,KAAK;GAC3B,eAAY;GACZ,WAAW,EACT,KAAc,gBACd,KAAU,oCACX;GACD,CAAA,EAEH,EACM"}