@cjlapao/ui-kit 0.2.3 → 0.2.4
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/index.cjs +1205 -829
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +37 -0
- package/dist/index.d.cts +260 -44
- package/dist/index.d.ts +260 -44
- package/dist/index.js +1140 -767
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/CapsuleBlueprint--CgRT7dr.d.cts +0 -426
- package/dist/CapsuleBlueprint--CgRT7dr.d.ts +0 -426
- package/dist/CapsuleBlueprint-12uQWAvU.d.cts +0 -732
- package/dist/CapsuleBlueprint-12uQWAvU.d.ts +0 -732
- package/dist/CapsuleBlueprint-1FP6avn4.d.cts +0 -1017
- package/dist/CapsuleBlueprint-1FP6avn4.d.ts +0 -1017
- package/dist/CapsuleBlueprint-6DmJgar9.d.cts +0 -358
- package/dist/CapsuleBlueprint-6DmJgar9.d.ts +0 -358
- package/dist/CapsuleBlueprint-B7MPc5wu.d.cts +0 -835
- package/dist/CapsuleBlueprint-B7MPc5wu.d.ts +0 -835
- package/dist/CapsuleBlueprint-BFHAMKUF.d.cts +0 -991
- package/dist/CapsuleBlueprint-BFHAMKUF.d.ts +0 -991
- package/dist/CapsuleBlueprint-BG23ZWsl.d.cts +0 -460
- package/dist/CapsuleBlueprint-BG23ZWsl.d.ts +0 -460
- package/dist/CapsuleBlueprint-BGx-KPqS.d.cts +0 -925
- package/dist/CapsuleBlueprint-BGx-KPqS.d.ts +0 -925
- package/dist/CapsuleBlueprint-BJYVRyFD.d.cts +0 -449
- package/dist/CapsuleBlueprint-BJYVRyFD.d.ts +0 -449
- package/dist/CapsuleBlueprint-BQq4ywG4.d.cts +0 -835
- package/dist/CapsuleBlueprint-BQq4ywG4.d.ts +0 -835
- package/dist/CapsuleBlueprint-BTgmUcyF.d.cts +0 -278
- package/dist/CapsuleBlueprint-BTgmUcyF.d.ts +0 -278
- package/dist/CapsuleBlueprint-BX2YI1yC.d.cts +0 -415
- package/dist/CapsuleBlueprint-BX2YI1yC.d.ts +0 -415
- package/dist/CapsuleBlueprint-BfPODmvJ.d.cts +0 -822
- package/dist/CapsuleBlueprint-BfPODmvJ.d.ts +0 -822
- package/dist/CapsuleBlueprint-BfSPPu5k.d.cts +0 -616
- package/dist/CapsuleBlueprint-BfSPPu5k.d.ts +0 -616
- package/dist/CapsuleBlueprint-BoPkPR2J.d.cts +0 -785
- package/dist/CapsuleBlueprint-BoPkPR2J.d.ts +0 -785
- package/dist/CapsuleBlueprint-CJeLH0j2.d.cts +0 -228
- package/dist/CapsuleBlueprint-CJeLH0j2.d.ts +0 -228
- package/dist/CapsuleBlueprint-CJwXDMzM.d.cts +0 -622
- package/dist/CapsuleBlueprint-CJwXDMzM.d.ts +0 -622
- package/dist/CapsuleBlueprint-CM125BJI.d.cts +0 -811
- package/dist/CapsuleBlueprint-CM125BJI.d.ts +0 -811
- package/dist/CapsuleBlueprint-CQPeacGV.d.cts +0 -426
- package/dist/CapsuleBlueprint-CQPeacGV.d.ts +0 -426
- package/dist/CapsuleBlueprint-CQy2O0UN.d.cts +0 -889
- package/dist/CapsuleBlueprint-CQy2O0UN.d.ts +0 -889
- package/dist/CapsuleBlueprint-CRy04iCR.d.cts +0 -695
- package/dist/CapsuleBlueprint-CRy04iCR.d.ts +0 -695
- package/dist/CapsuleBlueprint-CixXdjMu.d.cts +0 -925
- package/dist/CapsuleBlueprint-CixXdjMu.d.ts +0 -925
- package/dist/CapsuleBlueprint-CjCxwO1O.d.cts +0 -786
- package/dist/CapsuleBlueprint-CjCxwO1O.d.ts +0 -786
- package/dist/CapsuleBlueprint-Cm10IA2w.d.cts +0 -342
- package/dist/CapsuleBlueprint-Cm10IA2w.d.ts +0 -342
- package/dist/CapsuleBlueprint-CoGsooJJ.d.cts +0 -492
- package/dist/CapsuleBlueprint-CoGsooJJ.d.ts +0 -492
- package/dist/CapsuleBlueprint-CpHqUsJK.d.cts +0 -786
- package/dist/CapsuleBlueprint-CpHqUsJK.d.ts +0 -786
- package/dist/CapsuleBlueprint-CrRg8EVW.d.cts +0 -358
- package/dist/CapsuleBlueprint-CrRg8EVW.d.ts +0 -358
- package/dist/CapsuleBlueprint-DGxsd0aY.d.cts +0 -785
- package/dist/CapsuleBlueprint-DGxsd0aY.d.ts +0 -785
- package/dist/CapsuleBlueprint-DYnwizSo.d.cts +0 -698
- package/dist/CapsuleBlueprint-DYnwizSo.d.ts +0 -698
- package/dist/CapsuleBlueprint-DbLSB78P.d.cts +0 -235
- package/dist/CapsuleBlueprint-DbLSB78P.d.ts +0 -235
- package/dist/CapsuleBlueprint-DfV8XBEZ.d.cts +0 -1001
- package/dist/CapsuleBlueprint-DfV8XBEZ.d.ts +0 -1001
- package/dist/CapsuleBlueprint-DiG1FUoM.d.cts +0 -757
- package/dist/CapsuleBlueprint-DiG1FUoM.d.ts +0 -757
- package/dist/CapsuleBlueprint-DvdeHC13.d.cts +0 -289
- package/dist/CapsuleBlueprint-DvdeHC13.d.ts +0 -289
- package/dist/CapsuleBlueprint-DvinXyHp.d.cts +0 -342
- package/dist/CapsuleBlueprint-DvinXyHp.d.ts +0 -342
- package/dist/CapsuleBlueprint-DwW8YOJg.d.cts +0 -925
- package/dist/CapsuleBlueprint-DwW8YOJg.d.ts +0 -925
- package/dist/CapsuleBlueprint-E069msDY.d.cts +0 -310
- package/dist/CapsuleBlueprint-E069msDY.d.ts +0 -310
- package/dist/CapsuleBlueprint-LECoxlXA.d.cts +0 -497
- package/dist/CapsuleBlueprint-LECoxlXA.d.ts +0 -497
- package/dist/CapsuleBlueprint-V9pDg6lh.d.cts +0 -247
- package/dist/CapsuleBlueprint-V9pDg6lh.d.ts +0 -247
- package/dist/CapsuleBlueprint-bOLrWbIc.d.cts +0 -858
- package/dist/CapsuleBlueprint-bOLrWbIc.d.ts +0 -858
- package/dist/CapsuleBlueprint-if_tP8K8.d.cts +0 -1022
- package/dist/CapsuleBlueprint-if_tP8K8.d.ts +0 -1022
- package/dist/CapsuleBlueprint-pP0Ima0I.d.cts +0 -768
- package/dist/CapsuleBlueprint-pP0Ima0I.d.ts +0 -768
- package/dist/CapsuleBlueprint-w82xP6zg.d.cts +0 -222
- package/dist/CapsuleBlueprint-w82xP6zg.d.ts +0 -222
- package/dist/CapsuleBlueprint-wdlxOX4L.d.cts +0 -472
- package/dist/CapsuleBlueprint-wdlxOX4L.d.ts +0 -472
- package/dist/CapsuleBlueprint-wxqu6jA3.d.cts +0 -529
- package/dist/CapsuleBlueprint-wxqu6jA3.d.ts +0 -529
package/dist/index.js
CHANGED
|
@@ -21517,27 +21517,38 @@ var PageHeader = ({
|
|
|
21517
21517
|
center,
|
|
21518
21518
|
end,
|
|
21519
21519
|
children,
|
|
21520
|
+
variant = "default",
|
|
21521
|
+
accentColor = "blue",
|
|
21520
21522
|
className = "",
|
|
21521
21523
|
...rest
|
|
21522
|
-
}) =>
|
|
21523
|
-
"
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21528
|
-
|
|
21529
|
-
|
|
21530
|
-
|
|
21531
|
-
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
|
|
21538
|
-
|
|
21539
|
-
|
|
21540
|
-
)
|
|
21524
|
+
}) => {
|
|
21525
|
+
const surface = variant === "default" ? null : getSidebarSurfaceTokens(variant, accentColor);
|
|
21526
|
+
return /* @__PURE__ */ jsxs97(
|
|
21527
|
+
"header",
|
|
21528
|
+
{
|
|
21529
|
+
...rest,
|
|
21530
|
+
className: classNames51(
|
|
21531
|
+
"flex w-full items-center justify-between gap-4 px-5",
|
|
21532
|
+
SIDE_MENU_HEADER_HEIGHT,
|
|
21533
|
+
surface ? classNames51(
|
|
21534
|
+
surface.offset,
|
|
21535
|
+
surface.radius,
|
|
21536
|
+
"border",
|
|
21537
|
+
surface.border,
|
|
21538
|
+
surface.shadow,
|
|
21539
|
+
surface.fill
|
|
21540
|
+
) : classNames51("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
|
|
21541
|
+
className
|
|
21542
|
+
),
|
|
21543
|
+
children: [
|
|
21544
|
+
/* @__PURE__ */ jsx201("div", { className: GROUP_CLASS2, children: start }),
|
|
21545
|
+
/* @__PURE__ */ jsx201("div", { className: GROUP_CLASS2, children: center }),
|
|
21546
|
+
/* @__PURE__ */ jsx201("div", { className: GROUP_CLASS2, children: end }),
|
|
21547
|
+
children != null && /* @__PURE__ */ jsx201("div", { className: GROUP_CLASS2, children })
|
|
21548
|
+
]
|
|
21549
|
+
}
|
|
21550
|
+
);
|
|
21551
|
+
};
|
|
21541
21552
|
PageHeader.displayName = "PageHeader";
|
|
21542
21553
|
var PageHeader_default = PageHeader;
|
|
21543
21554
|
|
|
@@ -42312,7 +42323,8 @@ var SideMenu = ({
|
|
|
42312
42323
|
const hasVisibleLink = visibleItems2.some(
|
|
42313
42324
|
(item) => item.type !== "group" && item.type !== "divider"
|
|
42314
42325
|
);
|
|
42315
|
-
const
|
|
42326
|
+
const detached = Boolean(surface.offset);
|
|
42327
|
+
const heightClass = fullHeight ? detached ? "h-[calc(100%-1rem)]" : "h-full" : detached ? "sticky top-16 h-[calc(100vh-64px-1rem)]" : "sticky top-16 h-[calc(100vh-64px)]";
|
|
42316
42328
|
const isLeft = side === "left";
|
|
42317
42329
|
const isHoverMode = openOnHover && !isMobile;
|
|
42318
42330
|
const borderClasses = surface.border ? `${surface.border} ${surface.borderSides === "all" ? "border" : isLeft ? "border-r" : "border-l"}` : "";
|
|
@@ -42485,48 +42497,56 @@ var SideMenu = ({
|
|
|
42485
42497
|
]
|
|
42486
42498
|
}
|
|
42487
42499
|
),
|
|
42488
|
-
/* @__PURE__ */ jsx257(
|
|
42489
|
-
|
|
42490
|
-
|
|
42491
|
-
|
|
42492
|
-
|
|
42493
|
-
|
|
42494
|
-
|
|
42495
|
-
|
|
42496
|
-
|
|
42497
|
-
|
|
42498
|
-
|
|
42499
|
-
|
|
42500
|
-
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42504
|
-
|
|
42505
|
-
|
|
42506
|
-
|
|
42507
|
-
|
|
42508
|
-
|
|
42509
|
-
|
|
42510
|
-
|
|
42511
|
-
|
|
42512
|
-
|
|
42513
|
-
|
|
42514
|
-
|
|
42515
|
-
|
|
42516
|
-
|
|
42517
|
-
|
|
42518
|
-
|
|
42519
|
-
|
|
42520
|
-
|
|
42521
|
-
|
|
42522
|
-
|
|
42523
|
-
|
|
42524
|
-
|
|
42525
|
-
|
|
42526
|
-
|
|
42527
|
-
|
|
42528
|
-
|
|
42529
|
-
|
|
42500
|
+
/* @__PURE__ */ jsx257(
|
|
42501
|
+
ScrollArea_default,
|
|
42502
|
+
{
|
|
42503
|
+
variant: "hover",
|
|
42504
|
+
className: "flex-1 w-full",
|
|
42505
|
+
contentClassName: "px-3 py-1",
|
|
42506
|
+
children: /* @__PURE__ */ jsxs145("nav", { "aria-label": title || "Side menu", className: "space-y-1 w-full", children: [
|
|
42507
|
+
visibleItems2.map((item, index) => {
|
|
42508
|
+
if (item.type === "divider") {
|
|
42509
|
+
return /* @__PURE__ */ jsx257(
|
|
42510
|
+
"div",
|
|
42511
|
+
{
|
|
42512
|
+
className: `my-2 border-t ${surface.divider} ${contentCollapsed2 && !isMobileView ? "mx-1" : "mx-0"}`
|
|
42513
|
+
},
|
|
42514
|
+
`divider-${index}-${item.slug}`
|
|
42515
|
+
);
|
|
42516
|
+
}
|
|
42517
|
+
if (item.type === "group") {
|
|
42518
|
+
if (contentCollapsed2 && !isMobileView) return null;
|
|
42519
|
+
return /* @__PURE__ */ jsxs145(React59.Fragment, { children: [
|
|
42520
|
+
item.hasDivider && /* @__PURE__ */ jsx257(
|
|
42521
|
+
"div",
|
|
42522
|
+
{
|
|
42523
|
+
className: `my-2 border-t ${surface.divider} ${contentCollapsed2 && !isMobileView ? "mx-1" : "mx-0"}`
|
|
42524
|
+
}
|
|
42525
|
+
),
|
|
42526
|
+
/* @__PURE__ */ jsx257(
|
|
42527
|
+
"div",
|
|
42528
|
+
{
|
|
42529
|
+
className: `px-3 py-1 mb-1 text-xs font-semibold uppercase tracking-wider ${surface.muted} ${index === 0 ? "mt-1" : "mt-4"}`,
|
|
42530
|
+
children: item.label
|
|
42531
|
+
}
|
|
42532
|
+
)
|
|
42533
|
+
] }, `group-${index}-${item.slug}`);
|
|
42534
|
+
}
|
|
42535
|
+
return renderLinkRow(
|
|
42536
|
+
item,
|
|
42537
|
+
0,
|
|
42538
|
+
`link-${index}-${item.slug}`,
|
|
42539
|
+
contentCollapsed2
|
|
42540
|
+
);
|
|
42541
|
+
}),
|
|
42542
|
+
searchActive && !hasVisibleLink && /* @__PURE__ */ jsxs145("p", { className: `px-3 py-6 text-center text-xs ${surface.muted}`, children: [
|
|
42543
|
+
'No results for "',
|
|
42544
|
+
searchQuery.trim(),
|
|
42545
|
+
'"'
|
|
42546
|
+
] })
|
|
42547
|
+
] })
|
|
42548
|
+
}
|
|
42549
|
+
),
|
|
42530
42550
|
footerItem && /* @__PURE__ */ jsx257("div", { className: "shrink-0 px-3 pb-1", children: /* @__PURE__ */ jsx257(
|
|
42531
42551
|
SideMenuDropdownRow,
|
|
42532
42552
|
{
|
|
@@ -59820,93 +59840,14 @@ var TreeView = ({
|
|
|
59820
59840
|
var TreeView_default = TreeView;
|
|
59821
59841
|
|
|
59822
59842
|
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
59823
|
-
import { useMemo as
|
|
59824
|
-
import
|
|
59825
|
-
|
|
59826
|
-
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
59827
|
-
import React87 from "react";
|
|
59828
|
-
import classNames110 from "classnames";
|
|
59843
|
+
import { useMemo as useMemo55 } from "react";
|
|
59844
|
+
import classNames118 from "classnames";
|
|
59829
59845
|
|
|
59830
|
-
// src/components/WorkflowTracker/
|
|
59831
|
-
import
|
|
59832
|
-
import { jsx as jsx296, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
59833
|
-
var Bar3 = ({
|
|
59834
|
-
width,
|
|
59835
|
-
className
|
|
59836
|
-
}) => /* @__PURE__ */ jsx296(
|
|
59837
|
-
"span",
|
|
59838
|
-
{
|
|
59839
|
-
className: classNames107(
|
|
59840
|
-
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
59841
|
-
className
|
|
59842
|
-
),
|
|
59843
|
-
style: { width }
|
|
59844
|
-
}
|
|
59845
|
-
);
|
|
59846
|
-
var Dot = () => /* @__PURE__ */ jsx296("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
59847
|
-
var WorkflowHeaderSkeleton = ({ hasIcon = false, iconCorner = DEFAULT_SURFACE_CORNER }) => /* @__PURE__ */ jsxs179("div", { className: "mb-5 flex animate-pulse flex-wrap items-start justify-between gap-3 motion-reduce:animate-none", children: [
|
|
59848
|
-
/* @__PURE__ */ jsxs179("div", { className: "flex items-center gap-3", children: [
|
|
59849
|
-
hasIcon && /* @__PURE__ */ jsx296(
|
|
59850
|
-
Bar3,
|
|
59851
|
-
{
|
|
59852
|
-
width: "3rem",
|
|
59853
|
-
className: classNames107("h-12", getSurfaceCornerClass(iconCorner))
|
|
59854
|
-
}
|
|
59855
|
-
),
|
|
59856
|
-
/* @__PURE__ */ jsxs179("div", { className: "space-y-3", children: [
|
|
59857
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "11rem", className: "h-2" }),
|
|
59858
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "16rem", className: "h-6" })
|
|
59859
|
-
] })
|
|
59860
|
-
] }),
|
|
59861
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
59862
|
-
] });
|
|
59863
|
-
var WorkflowRailSkeleton = ({
|
|
59864
|
-
rows = 6
|
|
59865
|
-
}) => /* @__PURE__ */ jsxs179("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
59866
|
-
/* @__PURE__ */ jsxs179("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
59867
|
-
/* @__PURE__ */ jsxs179("div", { className: "flex items-center justify-between", children: [
|
|
59868
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "4.5rem" }),
|
|
59869
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "2rem" })
|
|
59870
|
-
] }),
|
|
59871
|
-
/* @__PURE__ */ jsx296("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
59872
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "80%", className: "mt-3" })
|
|
59873
|
-
] }),
|
|
59874
|
-
/* @__PURE__ */ jsx296("div", { className: "space-y-5 px-5 py-5", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ jsxs179("div", { className: "flex items-start gap-3", children: [
|
|
59875
|
-
/* @__PURE__ */ jsx296(Dot, {}),
|
|
59876
|
-
/* @__PURE__ */ jsxs179("div", { className: "flex-1 space-y-2", children: [
|
|
59877
|
-
/* @__PURE__ */ jsx296(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
59878
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "34%", className: "h-2" })
|
|
59879
|
-
] })
|
|
59880
|
-
] }, index)) })
|
|
59881
|
-
] });
|
|
59882
|
-
var WorkflowDetailSkeleton = () => /* @__PURE__ */ jsxs179("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
59883
|
-
/* @__PURE__ */ jsxs179("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
59884
|
-
/* @__PURE__ */ jsxs179("div", { className: "flex items-center justify-between", children: [
|
|
59885
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "6rem" }),
|
|
59886
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "4rem" })
|
|
59887
|
-
] }),
|
|
59888
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "45%", className: "h-5" }),
|
|
59889
|
-
/* @__PURE__ */ jsxs179("div", { className: "space-y-2", children: [
|
|
59890
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "92%", className: "h-2" }),
|
|
59891
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "70%", className: "h-2" })
|
|
59892
|
-
] }),
|
|
59893
|
-
/* @__PURE__ */ jsxs179("div", { className: "flex gap-10 pt-2", children: [
|
|
59894
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "5rem" }),
|
|
59895
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "6rem" }),
|
|
59896
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "4rem" })
|
|
59897
|
-
] })
|
|
59898
|
-
] }),
|
|
59899
|
-
/* @__PURE__ */ jsx296("div", { className: "border-y border-neutral-200 bg-neutral-50 px-5 py-3 dark:border-neutral-800 dark:bg-white/5 sm:px-6", children: /* @__PURE__ */ jsx296(Bar3, { width: "5rem" }) }),
|
|
59900
|
-
/* @__PURE__ */ jsx296("div", { className: "divide-y divide-neutral-200 dark:divide-neutral-800", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxs179("div", { className: "flex items-center gap-3 px-5 py-4 sm:px-6", children: [
|
|
59901
|
-
/* @__PURE__ */ jsx296(Dot, {}),
|
|
59902
|
-
/* @__PURE__ */ jsx296(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
59903
|
-
/* @__PURE__ */ jsx296("span", { className: "flex-1" }),
|
|
59904
|
-
/* @__PURE__ */ jsx296(Bar3, { width: "3rem" })
|
|
59905
|
-
] }, index)) })
|
|
59906
|
-
] });
|
|
59846
|
+
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
59847
|
+
import classNames109 from "classnames";
|
|
59907
59848
|
|
|
59908
59849
|
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
59909
|
-
import
|
|
59850
|
+
import classNames107 from "classnames";
|
|
59910
59851
|
|
|
59911
59852
|
// src/components/WorkflowTracker/surfaces.ts
|
|
59912
59853
|
var isTranslucentVariant = (variant) => getSurfaceTextTokens(variant).translucent;
|
|
@@ -60044,13 +59985,13 @@ var getStatusTokens = (status, palette) => {
|
|
|
60044
59985
|
};
|
|
60045
59986
|
|
|
60046
59987
|
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
60047
|
-
import { jsx as
|
|
59988
|
+
import { jsx as jsx296, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
60048
59989
|
var sizeTokens11 = {
|
|
60049
59990
|
sm: { node: "h-4 w-4", glyph: "h-2.5 w-2.5" },
|
|
60050
59991
|
md: { node: "h-5 w-5", glyph: "h-3 w-3" },
|
|
60051
59992
|
lg: { node: "h-9 w-9", glyph: "h-5 w-5" }
|
|
60052
59993
|
};
|
|
60053
|
-
var DashedRing = ({ className }) => /* @__PURE__ */
|
|
59994
|
+
var DashedRing = ({ className }) => /* @__PURE__ */ jsx296("svg", { viewBox: "0 0 20 20", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx296(
|
|
60054
59995
|
"circle",
|
|
60055
59996
|
{
|
|
60056
59997
|
cx: "10",
|
|
@@ -60063,7 +60004,7 @@ var DashedRing = ({ className }) => /* @__PURE__ */ jsx297("svg", { viewBox: "0
|
|
|
60063
60004
|
strokeLinecap: "round"
|
|
60064
60005
|
}
|
|
60065
60006
|
) });
|
|
60066
|
-
var AlertGlyph = ({ className }) => /* @__PURE__ */
|
|
60007
|
+
var AlertGlyph = ({ className }) => /* @__PURE__ */ jsx296("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx296(
|
|
60067
60008
|
"path",
|
|
60068
60009
|
{
|
|
60069
60010
|
d: "M12 6.5a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1Zm0 9.25a1.15 1.15 0 1 1 0 2.3 1.15 1.15 0 0 1 0-2.3Z",
|
|
@@ -60078,33 +60019,33 @@ var WorkflowStatusNode = ({
|
|
|
60078
60019
|
}) => {
|
|
60079
60020
|
const tokens = getStatusTokens(status, palette);
|
|
60080
60021
|
const { node, glyph } = sizeTokens11[size];
|
|
60081
|
-
return /* @__PURE__ */
|
|
60022
|
+
return /* @__PURE__ */ jsxs179(
|
|
60082
60023
|
"span",
|
|
60083
60024
|
{
|
|
60084
60025
|
"aria-hidden": "true",
|
|
60085
|
-
className:
|
|
60026
|
+
className: classNames107("relative inline-flex shrink-0", node, className),
|
|
60086
60027
|
children: [
|
|
60087
|
-
tokens.pulse && /* @__PURE__ */
|
|
60028
|
+
tokens.pulse && /* @__PURE__ */ jsx296(
|
|
60088
60029
|
"span",
|
|
60089
60030
|
{
|
|
60090
|
-
className:
|
|
60031
|
+
className: classNames107(
|
|
60091
60032
|
"absolute inset-0 animate-ping rounded-full opacity-60 motion-reduce:hidden",
|
|
60092
60033
|
`bg-${tokens.tone}-300 dark:bg-${tokens.tone}-500`
|
|
60093
60034
|
)
|
|
60094
60035
|
}
|
|
60095
60036
|
),
|
|
60096
|
-
/* @__PURE__ */
|
|
60037
|
+
/* @__PURE__ */ jsxs179(
|
|
60097
60038
|
"span",
|
|
60098
60039
|
{
|
|
60099
|
-
className:
|
|
60040
|
+
className: classNames107(
|
|
60100
60041
|
"relative inline-flex h-full w-full items-center justify-center rounded-full",
|
|
60101
60042
|
tokens.node
|
|
60102
60043
|
),
|
|
60103
60044
|
children: [
|
|
60104
|
-
tokens.glyph === "check" && /* @__PURE__ */
|
|
60105
|
-
tokens.glyph === "pause" && /* @__PURE__ */
|
|
60106
|
-
tokens.glyph === "alert" && /* @__PURE__ */
|
|
60107
|
-
tokens.glyph === "dashed" && /* @__PURE__ */
|
|
60045
|
+
tokens.glyph === "check" && /* @__PURE__ */ jsx296(Check, { className: classNames107(glyph, tokens.glyphClass) }),
|
|
60046
|
+
tokens.glyph === "pause" && /* @__PURE__ */ jsx296(Pause, { className: classNames107(glyph, tokens.glyphClass) }),
|
|
60047
|
+
tokens.glyph === "alert" && /* @__PURE__ */ jsx296(AlertGlyph, { className: classNames107(glyph, tokens.glyphClass) }),
|
|
60048
|
+
tokens.glyph === "dashed" && /* @__PURE__ */ jsx296(DashedRing, { className: classNames107("h-full w-full", tokens.glyphClass) })
|
|
60108
60049
|
]
|
|
60109
60050
|
}
|
|
60110
60051
|
)
|
|
@@ -60115,33 +60056,33 @@ var WorkflowStatusNode = ({
|
|
|
60115
60056
|
var WorkflowStatusNode_default = WorkflowStatusNode;
|
|
60116
60057
|
|
|
60117
60058
|
// src/components/WorkflowTracker/parts.tsx
|
|
60118
|
-
import
|
|
60119
|
-
import { jsx as
|
|
60059
|
+
import classNames108 from "classnames";
|
|
60060
|
+
import { jsx as jsx297, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
60120
60061
|
var resolve = (surfaces) => surfaces ?? getSurfaceTokens(false);
|
|
60121
|
-
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */
|
|
60062
|
+
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */ jsxs180(
|
|
60122
60063
|
"div",
|
|
60123
60064
|
{
|
|
60124
|
-
className:
|
|
60065
|
+
className: classNames108(
|
|
60125
60066
|
"flex flex-col items-center justify-center gap-3 px-6 py-10 text-center",
|
|
60126
60067
|
className
|
|
60127
60068
|
),
|
|
60128
60069
|
children: [
|
|
60129
|
-
/* @__PURE__ */
|
|
60130
|
-
/* @__PURE__ */
|
|
60131
|
-
/* @__PURE__ */
|
|
60070
|
+
/* @__PURE__ */ jsx297(WorkflowStatusNode_default, { status: "not_started", palette, size: "lg" }),
|
|
60071
|
+
/* @__PURE__ */ jsxs180("div", { className: "space-y-1", children: [
|
|
60072
|
+
/* @__PURE__ */ jsx297(
|
|
60132
60073
|
"p",
|
|
60133
60074
|
{
|
|
60134
|
-
className:
|
|
60075
|
+
className: classNames108(
|
|
60135
60076
|
"text-sm font-semibold",
|
|
60136
60077
|
resolve(surfaces).mutedText
|
|
60137
60078
|
),
|
|
60138
60079
|
children: title
|
|
60139
60080
|
}
|
|
60140
60081
|
),
|
|
60141
|
-
subtitle && /* @__PURE__ */
|
|
60082
|
+
subtitle && /* @__PURE__ */ jsx297(
|
|
60142
60083
|
"p",
|
|
60143
60084
|
{
|
|
60144
|
-
className:
|
|
60085
|
+
className: classNames108(
|
|
60145
60086
|
"max-w-xs text-xs leading-5",
|
|
60146
60087
|
resolve(surfaces).faintText
|
|
60147
60088
|
),
|
|
@@ -60152,10 +60093,10 @@ var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) =>
|
|
|
60152
60093
|
]
|
|
60153
60094
|
}
|
|
60154
60095
|
);
|
|
60155
|
-
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */
|
|
60096
|
+
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ jsx297(
|
|
60156
60097
|
"span",
|
|
60157
60098
|
{
|
|
60158
|
-
className:
|
|
60099
|
+
className: classNames108(
|
|
60159
60100
|
"text-[10px] font-semibold uppercase tracking-widest",
|
|
60160
60101
|
resolve(surfaces).faintText,
|
|
60161
60102
|
className
|
|
@@ -60163,7 +60104,7 @@ var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ jsx298
|
|
|
60163
60104
|
children
|
|
60164
60105
|
}
|
|
60165
60106
|
);
|
|
60166
|
-
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */
|
|
60107
|
+
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */ jsx297("span", { className: classNames108("text-xs", resolve(surfaces).mutedText, className), children });
|
|
60167
60108
|
var WorkflowBadge = ({
|
|
60168
60109
|
children,
|
|
60169
60110
|
status,
|
|
@@ -60171,14 +60112,14 @@ var WorkflowBadge = ({
|
|
|
60171
60112
|
tone
|
|
60172
60113
|
}) => {
|
|
60173
60114
|
const tokens = getStatusTokens(status, palette);
|
|
60174
|
-
return /* @__PURE__ */
|
|
60115
|
+
return /* @__PURE__ */ jsx297(
|
|
60175
60116
|
Pill_default,
|
|
60176
60117
|
{
|
|
60177
60118
|
size: "xs",
|
|
60178
60119
|
uppercase: true,
|
|
60179
60120
|
tone: tone ?? tokens.pillTone,
|
|
60180
60121
|
variant: "outline",
|
|
60181
|
-
className:
|
|
60122
|
+
className: classNames108(
|
|
60182
60123
|
"shrink-0 font-medium",
|
|
60183
60124
|
tone ? `bg-${tone}-100 dark:bg-${tone}-900` : tokens.pillFill
|
|
60184
60125
|
),
|
|
@@ -60186,17 +60127,177 @@ var WorkflowBadge = ({
|
|
|
60186
60127
|
}
|
|
60187
60128
|
);
|
|
60188
60129
|
};
|
|
60189
|
-
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */
|
|
60190
|
-
/* @__PURE__ */
|
|
60191
|
-
/* @__PURE__ */
|
|
60130
|
+
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */ jsxs180("div", { className: "min-w-0", children: [
|
|
60131
|
+
/* @__PURE__ */ jsx297(SectionTitle, { surfaces, children: label }),
|
|
60132
|
+
/* @__PURE__ */ jsx297("p", { className: "mt-1 text-sm font-medium text-neutral-800 dark:text-neutral-100", children: value })
|
|
60192
60133
|
] });
|
|
60193
|
-
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */
|
|
60194
|
-
/* @__PURE__ */
|
|
60195
|
-
/* @__PURE__ */
|
|
60134
|
+
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */ jsxs180("span", { className: "inline-flex items-center gap-1", children: [
|
|
60135
|
+
/* @__PURE__ */ jsx297("span", { className: "font-semibold text-neutral-900 dark:text-white", children: count }),
|
|
60136
|
+
/* @__PURE__ */ jsx297("span", { className: resolve(surfaces).mutedText, children: label })
|
|
60196
60137
|
] });
|
|
60197
60138
|
|
|
60139
|
+
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
60140
|
+
import { jsx as jsx298, jsxs as jsxs181 } from "react/jsx-runtime";
|
|
60141
|
+
var WorkflowSummaryCard = ({
|
|
60142
|
+
title,
|
|
60143
|
+
steps,
|
|
60144
|
+
palette,
|
|
60145
|
+
surfaces
|
|
60146
|
+
}) => /* @__PURE__ */ jsxs181("div", { className: "px-5 py-4", children: [
|
|
60147
|
+
/* @__PURE__ */ jsx298(SectionTitle, { surfaces, children: title }),
|
|
60148
|
+
/* @__PURE__ */ jsx298("ul", { className: "mt-3 space-y-3", children: steps.map((step) => /* @__PURE__ */ jsxs181("li", { className: "flex items-start gap-3", children: [
|
|
60149
|
+
/* @__PURE__ */ jsx298(
|
|
60150
|
+
WorkflowStatusNode_default,
|
|
60151
|
+
{
|
|
60152
|
+
status: normalizeStatus(step.status),
|
|
60153
|
+
palette,
|
|
60154
|
+
className: "mt-0.5"
|
|
60155
|
+
}
|
|
60156
|
+
),
|
|
60157
|
+
/* @__PURE__ */ jsxs181("div", { className: "min-w-0 flex-1", children: [
|
|
60158
|
+
/* @__PURE__ */ jsx298("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: step.label }),
|
|
60159
|
+
step.meta && /* @__PURE__ */ jsx298(
|
|
60160
|
+
"p",
|
|
60161
|
+
{
|
|
60162
|
+
className: classNames109(
|
|
60163
|
+
"mt-0.5 text-xs leading-5",
|
|
60164
|
+
surfaces.mutedText
|
|
60165
|
+
),
|
|
60166
|
+
children: step.meta
|
|
60167
|
+
}
|
|
60168
|
+
)
|
|
60169
|
+
] })
|
|
60170
|
+
] }, step.id)) })
|
|
60171
|
+
] });
|
|
60172
|
+
var WorkflowSummaryCard_default = WorkflowSummaryCard;
|
|
60173
|
+
|
|
60174
|
+
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60175
|
+
import { useMemo as useMemo52 } from "react";
|
|
60176
|
+
import classNames113 from "classnames";
|
|
60177
|
+
|
|
60198
60178
|
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60199
|
-
import
|
|
60179
|
+
import React87 from "react";
|
|
60180
|
+
import classNames112 from "classnames";
|
|
60181
|
+
|
|
60182
|
+
// src/components/WorkflowTracker/WorkflowSkeleton.tsx
|
|
60183
|
+
import classNames110 from "classnames";
|
|
60184
|
+
import { jsx as jsx299, jsxs as jsxs182 } from "react/jsx-runtime";
|
|
60185
|
+
var Bar3 = ({
|
|
60186
|
+
width,
|
|
60187
|
+
className
|
|
60188
|
+
}) => /* @__PURE__ */ jsx299(
|
|
60189
|
+
"span",
|
|
60190
|
+
{
|
|
60191
|
+
className: classNames110(
|
|
60192
|
+
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
60193
|
+
className
|
|
60194
|
+
),
|
|
60195
|
+
style: { width }
|
|
60196
|
+
}
|
|
60197
|
+
);
|
|
60198
|
+
var Dot = () => /* @__PURE__ */ jsx299("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
60199
|
+
var WorkflowHeaderSkeleton = ({ hasIcon = false, iconCorner = DEFAULT_SURFACE_CORNER }) => /* @__PURE__ */ jsxs182("div", { className: "mb-5 flex animate-pulse flex-wrap items-start justify-between gap-3 motion-reduce:animate-none", children: [
|
|
60200
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex items-center gap-3", children: [
|
|
60201
|
+
hasIcon && /* @__PURE__ */ jsx299(
|
|
60202
|
+
Bar3,
|
|
60203
|
+
{
|
|
60204
|
+
width: "3rem",
|
|
60205
|
+
className: classNames110("h-12", getSurfaceCornerClass(iconCorner))
|
|
60206
|
+
}
|
|
60207
|
+
),
|
|
60208
|
+
/* @__PURE__ */ jsxs182("div", { className: "space-y-3", children: [
|
|
60209
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "11rem", className: "h-2" }),
|
|
60210
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "16rem", className: "h-6" })
|
|
60211
|
+
] })
|
|
60212
|
+
] }),
|
|
60213
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
60214
|
+
] });
|
|
60215
|
+
var WorkflowRailSkeleton = ({
|
|
60216
|
+
rows = 6
|
|
60217
|
+
}) => /* @__PURE__ */ jsxs182("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60218
|
+
/* @__PURE__ */ jsxs182("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
60219
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex items-center justify-between", children: [
|
|
60220
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "4.5rem" }),
|
|
60221
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "2rem" })
|
|
60222
|
+
] }),
|
|
60223
|
+
/* @__PURE__ */ jsx299("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
60224
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "80%", className: "mt-3" })
|
|
60225
|
+
] }),
|
|
60226
|
+
/* @__PURE__ */ jsx299("div", { className: "space-y-5 px-5 py-5", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ jsxs182("div", { className: "flex items-start gap-3", children: [
|
|
60227
|
+
/* @__PURE__ */ jsx299(Dot, {}),
|
|
60228
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex-1 space-y-2", children: [
|
|
60229
|
+
/* @__PURE__ */ jsx299(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
60230
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "34%", className: "h-2" })
|
|
60231
|
+
] })
|
|
60232
|
+
] }, index)) })
|
|
60233
|
+
] });
|
|
60234
|
+
var WorkflowDetailSkeleton = () => /* @__PURE__ */ jsxs182("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60235
|
+
/* @__PURE__ */ jsxs182("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60236
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex items-center justify-between", children: [
|
|
60237
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "6rem" }),
|
|
60238
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "4rem" })
|
|
60239
|
+
] }),
|
|
60240
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "45%", className: "h-5" }),
|
|
60241
|
+
/* @__PURE__ */ jsxs182("div", { className: "space-y-2", children: [
|
|
60242
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "92%", className: "h-2" }),
|
|
60243
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "70%", className: "h-2" })
|
|
60244
|
+
] }),
|
|
60245
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex gap-10 pt-2", children: [
|
|
60246
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "5rem" }),
|
|
60247
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "6rem" }),
|
|
60248
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "4rem" })
|
|
60249
|
+
] })
|
|
60250
|
+
] }),
|
|
60251
|
+
/* @__PURE__ */ jsx299("div", { className: "border-y border-neutral-200 bg-neutral-50 px-5 py-3 dark:border-neutral-800 dark:bg-white/5 sm:px-6", children: /* @__PURE__ */ jsx299(Bar3, { width: "5rem" }) }),
|
|
60252
|
+
/* @__PURE__ */ jsx299("div", { className: "divide-y divide-neutral-200 dark:divide-neutral-800", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxs182("div", { className: "flex items-center gap-3 px-5 py-4 sm:px-6", children: [
|
|
60253
|
+
/* @__PURE__ */ jsx299(Dot, {}),
|
|
60254
|
+
/* @__PURE__ */ jsx299(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
60255
|
+
/* @__PURE__ */ jsx299("span", { className: "flex-1" }),
|
|
60256
|
+
/* @__PURE__ */ jsx299(Bar3, { width: "3rem" })
|
|
60257
|
+
] }, index)) })
|
|
60258
|
+
] });
|
|
60259
|
+
|
|
60260
|
+
// src/components/WorkflowTracker/WorkflowQuickActions.tsx
|
|
60261
|
+
import classNames111 from "classnames";
|
|
60262
|
+
import { jsx as jsx300 } from "react/jsx-runtime";
|
|
60263
|
+
var WorkflowQuickActions = ({
|
|
60264
|
+
stepId,
|
|
60265
|
+
actions,
|
|
60266
|
+
palette,
|
|
60267
|
+
groupLabel,
|
|
60268
|
+
onAction,
|
|
60269
|
+
className,
|
|
60270
|
+
style
|
|
60271
|
+
}) => {
|
|
60272
|
+
if (!onAction || actions.length === 0) return null;
|
|
60273
|
+
return /* @__PURE__ */ jsx300(
|
|
60274
|
+
"div",
|
|
60275
|
+
{
|
|
60276
|
+
role: "group",
|
|
60277
|
+
"aria-label": groupLabel,
|
|
60278
|
+
className: classNames111("flex flex-wrap gap-1.5", className),
|
|
60279
|
+
style,
|
|
60280
|
+
children: actions.map((action) => /* @__PURE__ */ jsx300(
|
|
60281
|
+
Button_default,
|
|
60282
|
+
{
|
|
60283
|
+
size: "xs",
|
|
60284
|
+
weight: "medium",
|
|
60285
|
+
variant: action.variant ?? "soft",
|
|
60286
|
+
color: action.tone ?? palette.accent,
|
|
60287
|
+
leadingIcon: action.leadingIcon,
|
|
60288
|
+
disabled: action.disabled,
|
|
60289
|
+
onClick: () => onAction(stepId, action.id),
|
|
60290
|
+
children: action.label
|
|
60291
|
+
},
|
|
60292
|
+
action.id
|
|
60293
|
+
))
|
|
60294
|
+
}
|
|
60295
|
+
);
|
|
60296
|
+
};
|
|
60297
|
+
var WorkflowQuickActions_default = WorkflowQuickActions;
|
|
60298
|
+
|
|
60299
|
+
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60300
|
+
import { Fragment as Fragment46, jsx as jsx301, jsxs as jsxs183 } from "react/jsx-runtime";
|
|
60200
60301
|
var CONNECTOR_LEFT = 9;
|
|
60201
60302
|
var CONNECTOR_TOP = 24;
|
|
60202
60303
|
var NESTED_INDENT = 32;
|
|
@@ -60214,16 +60315,16 @@ var NestedSubSteps = ({
|
|
|
60214
60315
|
palette,
|
|
60215
60316
|
surfaces,
|
|
60216
60317
|
onSubStepSelect
|
|
60217
|
-
}) => /* @__PURE__ */
|
|
60318
|
+
}) => /* @__PURE__ */ jsx301(
|
|
60218
60319
|
"div",
|
|
60219
60320
|
{
|
|
60220
|
-
className:
|
|
60321
|
+
className: classNames112("mt-3 rounded-lg p-3", surfaces.nestedBox),
|
|
60221
60322
|
style: { marginLeft: NESTED_INDENT },
|
|
60222
|
-
children: /* @__PURE__ */
|
|
60323
|
+
children: /* @__PURE__ */ jsx301("ul", { className: "space-y-2.5", children: subSteps.map((subStep) => {
|
|
60223
60324
|
const status = normalizeStatus(subStep.status);
|
|
60224
60325
|
const isActive = status === "running" || status === "in_progress";
|
|
60225
|
-
const content = /* @__PURE__ */
|
|
60226
|
-
/* @__PURE__ */
|
|
60326
|
+
const content = /* @__PURE__ */ jsxs183(Fragment46, { children: [
|
|
60327
|
+
/* @__PURE__ */ jsx301(
|
|
60227
60328
|
WorkflowStatusNode_default,
|
|
60228
60329
|
{
|
|
60229
60330
|
status,
|
|
@@ -60231,10 +60332,10 @@ var NestedSubSteps = ({
|
|
|
60231
60332
|
size: "sm"
|
|
60232
60333
|
}
|
|
60233
60334
|
),
|
|
60234
|
-
/* @__PURE__ */
|
|
60335
|
+
/* @__PURE__ */ jsx301(
|
|
60235
60336
|
"span",
|
|
60236
60337
|
{
|
|
60237
|
-
className:
|
|
60338
|
+
className: classNames112(
|
|
60238
60339
|
"text-sm",
|
|
60239
60340
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "text-neutral-600 dark:text-neutral-300"
|
|
60240
60341
|
),
|
|
@@ -60242,7 +60343,7 @@ var NestedSubSteps = ({
|
|
|
60242
60343
|
}
|
|
60243
60344
|
)
|
|
60244
60345
|
] });
|
|
60245
|
-
return /* @__PURE__ */
|
|
60346
|
+
return /* @__PURE__ */ jsx301("li", { children: onSubStepSelect ? /* @__PURE__ */ jsx301(
|
|
60246
60347
|
"button",
|
|
60247
60348
|
{
|
|
60248
60349
|
type: "button",
|
|
@@ -60250,7 +60351,7 @@ var NestedSubSteps = ({
|
|
|
60250
60351
|
className: "flex w-full items-center gap-2.5 rounded-sm text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 focus-visible:ring-offset-2 dark:focus-visible:ring-neutral-500",
|
|
60251
60352
|
children: content
|
|
60252
60353
|
}
|
|
60253
|
-
) : /* @__PURE__ */
|
|
60354
|
+
) : /* @__PURE__ */ jsx301("div", { className: "flex items-center gap-2.5", children: content }) }, subStep.id);
|
|
60254
60355
|
}) })
|
|
60255
60356
|
}
|
|
60256
60357
|
);
|
|
@@ -60267,10 +60368,11 @@ var WorkflowTimeline = ({
|
|
|
60267
60368
|
loadingRows,
|
|
60268
60369
|
emptyState,
|
|
60269
60370
|
onStepSelect,
|
|
60270
|
-
onSubStepSelect
|
|
60371
|
+
onSubStepSelect,
|
|
60372
|
+
onStepAction
|
|
60271
60373
|
}) => {
|
|
60272
60374
|
if (loading) {
|
|
60273
|
-
return /* @__PURE__ */
|
|
60375
|
+
return /* @__PURE__ */ jsx301(WorkflowRailSkeleton, { rows: loadingRows });
|
|
60274
60376
|
}
|
|
60275
60377
|
const isEmpty2 = steps.length === 0;
|
|
60276
60378
|
const tallyEntries = [
|
|
@@ -60279,19 +60381,19 @@ var WorkflowTimeline = ({
|
|
|
60279
60381
|
{ count: tallies.flagged, label: labels.flagged },
|
|
60280
60382
|
{ count: tallies.remaining, label: labels.remaining }
|
|
60281
60383
|
].filter((entry) => entry.count > 0);
|
|
60282
|
-
return /* @__PURE__ */
|
|
60283
|
-
!isEmpty2 && /* @__PURE__ */
|
|
60284
|
-
/* @__PURE__ */
|
|
60285
|
-
/* @__PURE__ */
|
|
60286
|
-
/* @__PURE__ */
|
|
60384
|
+
return /* @__PURE__ */ jsxs183("div", { className: "flex flex-col", children: [
|
|
60385
|
+
!isEmpty2 && /* @__PURE__ */ jsxs183("div", { className: classNames112("border-b px-5 pb-4 pt-5", surfaces.border), children: [
|
|
60386
|
+
/* @__PURE__ */ jsxs183("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
60387
|
+
/* @__PURE__ */ jsx301(SectionTitle, { surfaces, children: labels.progress }),
|
|
60388
|
+
/* @__PURE__ */ jsxs183("span", { className: "text-sm font-semibold text-neutral-900 dark:text-white", children: [
|
|
60287
60389
|
progress,
|
|
60288
60390
|
"%"
|
|
60289
60391
|
] })
|
|
60290
60392
|
] }),
|
|
60291
|
-
/* @__PURE__ */
|
|
60393
|
+
/* @__PURE__ */ jsx301(
|
|
60292
60394
|
Progress_default,
|
|
60293
60395
|
{
|
|
60294
|
-
className:
|
|
60396
|
+
className: classNames112(
|
|
60295
60397
|
"mt-2",
|
|
60296
60398
|
surfaces.translucent ? "bg-white/40 dark:bg-white/15" : "bg-neutral-200 dark:bg-neutral-700"
|
|
60297
60399
|
),
|
|
@@ -60301,8 +60403,8 @@ var WorkflowTimeline = ({
|
|
|
60301
60403
|
motion: "none"
|
|
60302
60404
|
}
|
|
60303
60405
|
),
|
|
60304
|
-
tallyEntries.length > 0 && /* @__PURE__ */
|
|
60305
|
-
index > 0 && /* @__PURE__ */
|
|
60406
|
+
tallyEntries.length > 0 && /* @__PURE__ */ jsx301("div", { className: "mt-3 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs", children: tallyEntries.map((entry, index) => /* @__PURE__ */ jsxs183(React87.Fragment, { children: [
|
|
60407
|
+
index > 0 && /* @__PURE__ */ jsx301(
|
|
60306
60408
|
"span",
|
|
60307
60409
|
{
|
|
60308
60410
|
"aria-hidden": "true",
|
|
@@ -60310,7 +60412,7 @@ var WorkflowTimeline = ({
|
|
|
60310
60412
|
children: "\xB7"
|
|
60311
60413
|
}
|
|
60312
60414
|
),
|
|
60313
|
-
/* @__PURE__ */
|
|
60415
|
+
/* @__PURE__ */ jsx301(
|
|
60314
60416
|
Tally,
|
|
60315
60417
|
{
|
|
60316
60418
|
count: entry.count,
|
|
@@ -60320,7 +60422,7 @@ var WorkflowTimeline = ({
|
|
|
60320
60422
|
)
|
|
60321
60423
|
] }, entry.label)) })
|
|
60322
60424
|
] }),
|
|
60323
|
-
/* @__PURE__ */
|
|
60425
|
+
/* @__PURE__ */ jsx301("div", { className: classNames112(isEmpty2 ? "" : "px-5 py-5"), children: isEmpty2 ? emptyState ?? /* @__PURE__ */ jsx301(
|
|
60324
60426
|
WorkflowPlaceholder,
|
|
60325
60427
|
{
|
|
60326
60428
|
title: labels.empty,
|
|
@@ -60328,14 +60430,14 @@ var WorkflowTimeline = ({
|
|
|
60328
60430
|
palette,
|
|
60329
60431
|
surfaces
|
|
60330
60432
|
}
|
|
60331
|
-
) : /* @__PURE__ */
|
|
60433
|
+
) : /* @__PURE__ */ jsx301("ol", { className: "m-0 list-none p-0", children: steps.map((step, index) => {
|
|
60332
60434
|
const status = normalizeStatus(step.status);
|
|
60333
60435
|
const tokens = getStatusTokens(status, palette);
|
|
60334
60436
|
const isActive = step.id === activeStepId;
|
|
60335
60437
|
const isLast = index === steps.length - 1;
|
|
60336
60438
|
const nested = isActive && step.subSteps && step.subSteps.length > 0 ? step.subSteps : void 0;
|
|
60337
|
-
const rowContent = /* @__PURE__ */
|
|
60338
|
-
/* @__PURE__ */
|
|
60439
|
+
const rowContent = /* @__PURE__ */ jsxs183(Fragment46, { children: [
|
|
60440
|
+
/* @__PURE__ */ jsx301(
|
|
60339
60441
|
WorkflowStatusNode_default,
|
|
60340
60442
|
{
|
|
60341
60443
|
status,
|
|
@@ -60343,19 +60445,19 @@ var WorkflowTimeline = ({
|
|
|
60343
60445
|
className: "mt-0.5"
|
|
60344
60446
|
}
|
|
60345
60447
|
),
|
|
60346
|
-
/* @__PURE__ */
|
|
60347
|
-
/* @__PURE__ */
|
|
60348
|
-
/* @__PURE__ */
|
|
60448
|
+
/* @__PURE__ */ jsxs183("div", { className: "min-w-0 flex-1", children: [
|
|
60449
|
+
/* @__PURE__ */ jsxs183("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
60450
|
+
/* @__PURE__ */ jsx301(
|
|
60349
60451
|
"span",
|
|
60350
60452
|
{
|
|
60351
|
-
className:
|
|
60453
|
+
className: classNames112(
|
|
60352
60454
|
"text-sm",
|
|
60353
60455
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "font-medium text-neutral-700 dark:text-neutral-200"
|
|
60354
60456
|
),
|
|
60355
60457
|
children: step.label
|
|
60356
60458
|
}
|
|
60357
60459
|
),
|
|
60358
|
-
step.badge && /* @__PURE__ */
|
|
60460
|
+
step.badge && /* @__PURE__ */ jsx301(
|
|
60359
60461
|
WorkflowBadge,
|
|
60360
60462
|
{
|
|
60361
60463
|
status,
|
|
@@ -60365,10 +60467,10 @@ var WorkflowTimeline = ({
|
|
|
60365
60467
|
}
|
|
60366
60468
|
)
|
|
60367
60469
|
] }),
|
|
60368
|
-
step.meta && /* @__PURE__ */
|
|
60470
|
+
step.meta && /* @__PURE__ */ jsx301(
|
|
60369
60471
|
"p",
|
|
60370
60472
|
{
|
|
60371
|
-
className:
|
|
60473
|
+
className: classNames112(
|
|
60372
60474
|
"mt-1 text-xs leading-5",
|
|
60373
60475
|
surfaces.mutedText
|
|
60374
60476
|
),
|
|
@@ -60377,24 +60479,24 @@ var WorkflowTimeline = ({
|
|
|
60377
60479
|
)
|
|
60378
60480
|
] })
|
|
60379
60481
|
] });
|
|
60380
|
-
return /* @__PURE__ */
|
|
60482
|
+
return /* @__PURE__ */ jsxs183(
|
|
60381
60483
|
"li",
|
|
60382
60484
|
{
|
|
60383
|
-
className:
|
|
60485
|
+
className: classNames112("relative", !isLast && "pb-5"),
|
|
60384
60486
|
"aria-current": isActive ? "step" : void 0,
|
|
60385
60487
|
children: [
|
|
60386
|
-
!isLast && /* @__PURE__ */
|
|
60488
|
+
!isLast && /* @__PURE__ */ jsx301(
|
|
60387
60489
|
"span",
|
|
60388
60490
|
{
|
|
60389
60491
|
"aria-hidden": "true",
|
|
60390
|
-
className:
|
|
60492
|
+
className: classNames112(
|
|
60391
60493
|
"absolute bottom-0",
|
|
60392
60494
|
tokens.connectorDashed ? `border-l-2 border-dashed ${tokens.connector}` : `w-0.5 rounded-full ${tokens.connector}`
|
|
60393
60495
|
),
|
|
60394
60496
|
style: { left: CONNECTOR_LEFT, top: CONNECTOR_TOP }
|
|
60395
60497
|
}
|
|
60396
60498
|
),
|
|
60397
|
-
onStepSelect ? /* @__PURE__ */
|
|
60499
|
+
onStepSelect ? /* @__PURE__ */ jsx301(
|
|
60398
60500
|
"button",
|
|
60399
60501
|
{
|
|
60400
60502
|
type: "button",
|
|
@@ -60402,8 +60504,19 @@ var WorkflowTimeline = ({
|
|
|
60402
60504
|
className: "flex w-full items-start gap-3 rounded-sm text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 focus-visible:ring-offset-2 dark:focus-visible:ring-neutral-500",
|
|
60403
60505
|
children: rowContent
|
|
60404
60506
|
}
|
|
60405
|
-
) : /* @__PURE__ */
|
|
60406
|
-
|
|
60507
|
+
) : /* @__PURE__ */ jsx301("div", { className: "flex items-start gap-3", children: rowContent }),
|
|
60508
|
+
/* @__PURE__ */ jsx301(
|
|
60509
|
+
WorkflowQuickActions_default,
|
|
60510
|
+
{
|
|
60511
|
+
stepId: step.id,
|
|
60512
|
+
actions: step.actions ?? [],
|
|
60513
|
+
palette,
|
|
60514
|
+
groupLabel: labels.quickActions,
|
|
60515
|
+
onAction: onStepAction,
|
|
60516
|
+
className: "ml-8 mt-2"
|
|
60517
|
+
}
|
|
60518
|
+
),
|
|
60519
|
+
nested && /* @__PURE__ */ jsx301(
|
|
60407
60520
|
NestedSubSteps,
|
|
60408
60521
|
{
|
|
60409
60522
|
stepId: step.id,
|
|
@@ -60418,8 +60531,8 @@ var WorkflowTimeline = ({
|
|
|
60418
60531
|
step.id
|
|
60419
60532
|
);
|
|
60420
60533
|
}) }) }),
|
|
60421
|
-
showLegend && !isEmpty2 && /* @__PURE__ */
|
|
60422
|
-
/* @__PURE__ */
|
|
60534
|
+
showLegend && !isEmpty2 && /* @__PURE__ */ jsx301("div", { className: classNames112("mt-auto border-t px-5 py-4", surfaces.border), children: /* @__PURE__ */ jsx301("ul", { className: "flex flex-wrap gap-x-4 gap-y-2", children: LEGEND_ORDER.map((status) => /* @__PURE__ */ jsxs183("li", { className: "flex items-center gap-2", children: [
|
|
60535
|
+
/* @__PURE__ */ jsx301(
|
|
60423
60536
|
WorkflowStatusNode_default,
|
|
60424
60537
|
{
|
|
60425
60538
|
status,
|
|
@@ -60427,14 +60540,92 @@ var WorkflowTimeline = ({
|
|
|
60427
60540
|
size: "sm"
|
|
60428
60541
|
}
|
|
60429
60542
|
),
|
|
60430
|
-
/* @__PURE__ */
|
|
60543
|
+
/* @__PURE__ */ jsx301("span", { className: classNames112("text-xs", surfaces.mutedText), children: labels.statuses[status] })
|
|
60431
60544
|
] }, status)) }) })
|
|
60432
60545
|
] });
|
|
60433
60546
|
};
|
|
60434
60547
|
var WorkflowTimeline_default = WorkflowTimeline;
|
|
60435
60548
|
|
|
60436
|
-
// src/components/WorkflowTracker/
|
|
60437
|
-
import
|
|
60549
|
+
// src/components/WorkflowTracker/chrome.ts
|
|
60550
|
+
import { useMemo as useMemo51 } from "react";
|
|
60551
|
+
var DEFAULT_LABELS = {
|
|
60552
|
+
progress: "Progress",
|
|
60553
|
+
done: "done",
|
|
60554
|
+
skipped: "skipped",
|
|
60555
|
+
flagged: "flagged",
|
|
60556
|
+
remaining: "remaining",
|
|
60557
|
+
step: "Step",
|
|
60558
|
+
of: "of",
|
|
60559
|
+
elapsed: "Elapsed",
|
|
60560
|
+
owner: "Owner",
|
|
60561
|
+
started: "Started",
|
|
60562
|
+
sla: "SLA",
|
|
60563
|
+
subSteps: "Sub-steps",
|
|
60564
|
+
accepted: "accepted",
|
|
60565
|
+
open: "open",
|
|
60566
|
+
needsAttention: "Needs attention",
|
|
60567
|
+
skippedSteps: "Skipped steps",
|
|
60568
|
+
live: "LIVE \xB7 read-only view",
|
|
60569
|
+
empty: "No steps yet",
|
|
60570
|
+
emptySubtitle: "Steps appear here as soon as the workflow starts.",
|
|
60571
|
+
noActiveStep: "No step selected",
|
|
60572
|
+
details: "Step details",
|
|
60573
|
+
quickActions: "Quick actions",
|
|
60574
|
+
statuses: {
|
|
60575
|
+
done: "Done",
|
|
60576
|
+
in_progress: "In progress",
|
|
60577
|
+
running: "Running",
|
|
60578
|
+
skipped: "Skipped",
|
|
60579
|
+
blocked: "Blocked",
|
|
60580
|
+
attention: "Attention",
|
|
60581
|
+
not_started: "Not started"
|
|
60582
|
+
}
|
|
60583
|
+
};
|
|
60584
|
+
var useWorkflowChrome = ({
|
|
60585
|
+
accentColor = "blue",
|
|
60586
|
+
attentionColor = "rose",
|
|
60587
|
+
blockedColor = "amber",
|
|
60588
|
+
mutedColor = "neutral",
|
|
60589
|
+
variant = "outlined",
|
|
60590
|
+
translucentSurfaces
|
|
60591
|
+
}) => {
|
|
60592
|
+
const translucent = translucentSurfaces ?? isTranslucentVariant(variant);
|
|
60593
|
+
const palette = useMemo51(
|
|
60594
|
+
() => ({
|
|
60595
|
+
accent: accentColor,
|
|
60596
|
+
attention: attentionColor,
|
|
60597
|
+
blocked: blockedColor,
|
|
60598
|
+
muted: mutedColor,
|
|
60599
|
+
translucent
|
|
60600
|
+
}),
|
|
60601
|
+
[accentColor, attentionColor, blockedColor, mutedColor, translucent]
|
|
60602
|
+
);
|
|
60603
|
+
const surfaces = useMemo51(() => getSurfaceTokens(translucent), [translucent]);
|
|
60604
|
+
return { translucent, palette, surfaces };
|
|
60605
|
+
};
|
|
60606
|
+
var resolveLabels = (labelOverrides) => labelOverrides ? {
|
|
60607
|
+
...DEFAULT_LABELS,
|
|
60608
|
+
...labelOverrides,
|
|
60609
|
+
statuses: { ...DEFAULT_LABELS.statuses, ...labelOverrides.statuses }
|
|
60610
|
+
} : DEFAULT_LABELS;
|
|
60611
|
+
var buildCardProps = ({
|
|
60612
|
+
variant = "outlined",
|
|
60613
|
+
cardTone = "neutral",
|
|
60614
|
+
corner = DEFAULT_SURFACE_CORNER,
|
|
60615
|
+
glassOpacity = "light",
|
|
60616
|
+
vibrancy,
|
|
60617
|
+
specularMode,
|
|
60618
|
+
padding = "none"
|
|
60619
|
+
}) => ({
|
|
60620
|
+
variant,
|
|
60621
|
+
tone: cardTone,
|
|
60622
|
+
corner,
|
|
60623
|
+
glassOpacity,
|
|
60624
|
+
vibrancy,
|
|
60625
|
+
specularMode,
|
|
60626
|
+
padding,
|
|
60627
|
+
scrollable: false
|
|
60628
|
+
});
|
|
60438
60629
|
|
|
60439
60630
|
// src/components/WorkflowTracker/derive.ts
|
|
60440
60631
|
var computeProgress = (steps) => {
|
|
@@ -60509,8 +60700,262 @@ var resolveActiveStep = (steps, activeStepId) => {
|
|
|
60509
60700
|
return { step: steps[0], index: 1 };
|
|
60510
60701
|
};
|
|
60511
60702
|
|
|
60703
|
+
// src/components/WorkflowTracker/sampleWorkflow.tsx
|
|
60704
|
+
import { jsx as jsx302, jsxs as jsxs184 } from "react/jsx-runtime";
|
|
60705
|
+
var sampleWorkflow = {
|
|
60706
|
+
eyebrow: "VENDOR ONBOARDING \xB7 REQ-4128",
|
|
60707
|
+
title: "Northwind Logistics GmbH",
|
|
60708
|
+
live: true,
|
|
60709
|
+
activeStepId: "security_questionnaire",
|
|
60710
|
+
steps: [
|
|
60711
|
+
{
|
|
60712
|
+
id: "request_submitted",
|
|
60713
|
+
label: "Request submitted",
|
|
60714
|
+
status: "done",
|
|
60715
|
+
meta: "2m"
|
|
60716
|
+
},
|
|
60717
|
+
{
|
|
60718
|
+
id: "duplicate_check",
|
|
60719
|
+
label: "Duplicate check",
|
|
60720
|
+
status: "skipped",
|
|
60721
|
+
badge: "Not needed",
|
|
60722
|
+
meta: "No match in registry"
|
|
60723
|
+
},
|
|
60724
|
+
{
|
|
60725
|
+
id: "business_verification",
|
|
60726
|
+
label: "Business verification",
|
|
60727
|
+
status: "done",
|
|
60728
|
+
meta: "12m \xB7 3 of 3 sub-steps"
|
|
60729
|
+
},
|
|
60730
|
+
{
|
|
60731
|
+
id: "sanctions_screening",
|
|
60732
|
+
label: "Sanctions screening",
|
|
60733
|
+
status: "done",
|
|
60734
|
+
meta: "4m"
|
|
60735
|
+
},
|
|
60736
|
+
{
|
|
60737
|
+
id: "tax_documents",
|
|
60738
|
+
label: "Tax documents",
|
|
60739
|
+
status: "skipped",
|
|
60740
|
+
badge: "Skipped",
|
|
60741
|
+
meta: "Skipped by M. Reyes \xB7 resume anytime"
|
|
60742
|
+
},
|
|
60743
|
+
{
|
|
60744
|
+
id: "insurance_certificates",
|
|
60745
|
+
label: "Insurance certificates",
|
|
60746
|
+
status: "attention",
|
|
60747
|
+
badge: "Needs attention",
|
|
60748
|
+
meta: "1h 06m \xB7 Liability certificate expired 12 Aug",
|
|
60749
|
+
details: /* @__PURE__ */ jsxs184("div", { className: "space-y-3 px-5 py-4 sm:px-6", children: [
|
|
60750
|
+
/* @__PURE__ */ jsx302("p", { className: "text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: "The liability certificate expired on 12 Aug. A reminder went to the vendor\u2019s compliance contact; the underwriter quote is still pending." }),
|
|
60751
|
+
/* @__PURE__ */ jsx302("ul", { className: "flex flex-wrap gap-2", children: ["reminder-12-aug.pdf", "underwriter-quote.pdf"].map((file) => /* @__PURE__ */ jsx302(
|
|
60752
|
+
"li",
|
|
60753
|
+
{
|
|
60754
|
+
className: "rounded-full border border-neutral-200 px-2.5 py-0.5 text-xs text-neutral-500 dark:border-neutral-700 dark:text-neutral-400",
|
|
60755
|
+
children: file
|
|
60756
|
+
},
|
|
60757
|
+
file
|
|
60758
|
+
)) })
|
|
60759
|
+
] }),
|
|
60760
|
+
actions: [
|
|
60761
|
+
{ id: "review", label: "Review" },
|
|
60762
|
+
{ id: "remind", label: "Remind vendor", tone: "amber" }
|
|
60763
|
+
]
|
|
60764
|
+
},
|
|
60765
|
+
{
|
|
60766
|
+
id: "contract_drafting",
|
|
60767
|
+
label: "Contract drafting",
|
|
60768
|
+
status: "done",
|
|
60769
|
+
meta: "1h 10m"
|
|
60770
|
+
},
|
|
60771
|
+
{
|
|
60772
|
+
id: "security_questionnaire",
|
|
60773
|
+
label: "Security questionnaire",
|
|
60774
|
+
status: "in_progress",
|
|
60775
|
+
badge: "In progress",
|
|
60776
|
+
meta: "24m \xB7 3 of 6 sub-steps",
|
|
60777
|
+
elapsed: "24m",
|
|
60778
|
+
description: "Vendor is completing the long-form questionnaire. Each sub-step unlocks once its evidence file is accepted by the reviewer.",
|
|
60779
|
+
owner: "D. Okafor",
|
|
60780
|
+
startedAt: "19 Aug \xB7 09:12",
|
|
60781
|
+
sla: "Due in 6h",
|
|
60782
|
+
details: /* @__PURE__ */ jsxs184("div", { className: "space-y-5 px-5 py-4 sm:px-6", children: [
|
|
60783
|
+
/* @__PURE__ */ jsxs184("div", { children: [
|
|
60784
|
+
/* @__PURE__ */ jsx302("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Review activity" }),
|
|
60785
|
+
/* @__PURE__ */ jsx302("p", { className: "mt-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: "Reviewer A. Lindqvist is cross-checking the subprocessor list against the master agreement. Uploads appear here as the vendor submits them." })
|
|
60786
|
+
] }),
|
|
60787
|
+
/* @__PURE__ */ jsxs184("div", { children: [
|
|
60788
|
+
/* @__PURE__ */ jsx302("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Files received" }),
|
|
60789
|
+
/* @__PURE__ */ jsx302("ul", { className: "mt-2 flex flex-wrap gap-2", children: [
|
|
60790
|
+
"data-handling-v3.pdf",
|
|
60791
|
+
"pentest-2026.pdf",
|
|
60792
|
+
"soc2-typeii.pdf"
|
|
60793
|
+
].map((file) => /* @__PURE__ */ jsx302(
|
|
60794
|
+
"li",
|
|
60795
|
+
{
|
|
60796
|
+
className: "rounded-full border border-neutral-200 px-2.5 py-0.5 text-xs text-neutral-500 dark:border-neutral-700 dark:text-neutral-400",
|
|
60797
|
+
children: file
|
|
60798
|
+
},
|
|
60799
|
+
file
|
|
60800
|
+
)) })
|
|
60801
|
+
] }),
|
|
60802
|
+
/* @__PURE__ */ jsxs184("div", { children: [
|
|
60803
|
+
/* @__PURE__ */ jsx302("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Open findings" }),
|
|
60804
|
+
/* @__PURE__ */ jsxs184("ul", { className: "mt-2 space-y-2", children: [
|
|
60805
|
+
/* @__PURE__ */ jsxs184("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
60806
|
+
/* @__PURE__ */ jsx302(
|
|
60807
|
+
"span",
|
|
60808
|
+
{
|
|
60809
|
+
"aria-hidden": "true",
|
|
60810
|
+
className: "mt-[9px] size-1.5 shrink-0 rounded-full bg-amber-400"
|
|
60811
|
+
}
|
|
60812
|
+
),
|
|
60813
|
+
"Subprocessor \u201CCloudDot BV\u201D is not covered by the DPA yet"
|
|
60814
|
+
] }),
|
|
60815
|
+
/* @__PURE__ */ jsxs184("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
60816
|
+
/* @__PURE__ */ jsx302(
|
|
60817
|
+
"span",
|
|
60818
|
+
{
|
|
60819
|
+
"aria-hidden": "true",
|
|
60820
|
+
className: "mt-[9px] size-1.5 shrink-0 rounded-full bg-neutral-300 dark:bg-neutral-600"
|
|
60821
|
+
}
|
|
60822
|
+
),
|
|
60823
|
+
"Waiting on the incident-contact annex"
|
|
60824
|
+
] })
|
|
60825
|
+
] })
|
|
60826
|
+
] })
|
|
60827
|
+
] }),
|
|
60828
|
+
subSteps: [
|
|
60829
|
+
{
|
|
60830
|
+
id: "data_handling",
|
|
60831
|
+
label: "Data handling policy",
|
|
60832
|
+
status: "done",
|
|
60833
|
+
badge: "Accepted",
|
|
60834
|
+
duration: "5m"
|
|
60835
|
+
},
|
|
60836
|
+
{
|
|
60837
|
+
id: "pentest",
|
|
60838
|
+
label: "Penetration test report",
|
|
60839
|
+
status: "done",
|
|
60840
|
+
badge: "Accepted",
|
|
60841
|
+
duration: "8m"
|
|
60842
|
+
},
|
|
60843
|
+
{
|
|
60844
|
+
id: "soc2",
|
|
60845
|
+
label: "SOC 2 Type II evidence",
|
|
60846
|
+
status: "done",
|
|
60847
|
+
badge: "Accepted",
|
|
60848
|
+
duration: "11m"
|
|
60849
|
+
},
|
|
60850
|
+
{
|
|
60851
|
+
id: "subprocessor_list",
|
|
60852
|
+
label: "Subprocessor list",
|
|
60853
|
+
status: "running",
|
|
60854
|
+
badge: "Running",
|
|
60855
|
+
note: "Vendor uploading \u2014 2 of 3 files received"
|
|
60856
|
+
},
|
|
60857
|
+
{
|
|
60858
|
+
id: "incident_response",
|
|
60859
|
+
label: "Incident response plan",
|
|
60860
|
+
status: "skipped",
|
|
60861
|
+
badge: "Skipped",
|
|
60862
|
+
note: "Covered by master agreement \xA77"
|
|
60863
|
+
},
|
|
60864
|
+
{
|
|
60865
|
+
id: "business_continuity",
|
|
60866
|
+
label: "Business continuity plan",
|
|
60867
|
+
status: "not_started"
|
|
60868
|
+
}
|
|
60869
|
+
]
|
|
60870
|
+
},
|
|
60871
|
+
{
|
|
60872
|
+
id: "legal_review",
|
|
60873
|
+
label: "Legal review",
|
|
60874
|
+
status: "blocked",
|
|
60875
|
+
badge: "Blocked",
|
|
60876
|
+
meta: "Waiting on Legal \xB7 queued 2d",
|
|
60877
|
+
actions: [{ id: "nudge", label: "Nudge Legal", tone: "violet" }]
|
|
60878
|
+
},
|
|
60879
|
+
{
|
|
60880
|
+
id: "banking_details",
|
|
60881
|
+
label: "Banking details",
|
|
60882
|
+
status: "not_started"
|
|
60883
|
+
},
|
|
60884
|
+
{
|
|
60885
|
+
id: "system_provisioning",
|
|
60886
|
+
label: "System provisioning",
|
|
60887
|
+
status: "not_started"
|
|
60888
|
+
},
|
|
60889
|
+
{ id: "go_live", label: "Go-live", status: "not_started" }
|
|
60890
|
+
]
|
|
60891
|
+
};
|
|
60892
|
+
|
|
60893
|
+
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60894
|
+
import { jsx as jsx303 } from "react/jsx-runtime";
|
|
60895
|
+
var WorkflowTrackerRail = ({
|
|
60896
|
+
data = sampleWorkflow,
|
|
60897
|
+
loading = false,
|
|
60898
|
+
loadingRows = 6,
|
|
60899
|
+
showLegend = true,
|
|
60900
|
+
emptyState,
|
|
60901
|
+
labels: labelOverrides,
|
|
60902
|
+
cardClassName,
|
|
60903
|
+
cardScrollable,
|
|
60904
|
+
onStepSelect,
|
|
60905
|
+
onSubStepSelect,
|
|
60906
|
+
onStepAction,
|
|
60907
|
+
className,
|
|
60908
|
+
style,
|
|
60909
|
+
...styleProps
|
|
60910
|
+
}) => {
|
|
60911
|
+
const steps = data?.steps ?? [];
|
|
60912
|
+
const { palette, surfaces } = useWorkflowChrome(styleProps);
|
|
60913
|
+
const labels = useMemo52(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
60914
|
+
const cardProps = buildCardProps(styleProps);
|
|
60915
|
+
const active = useMemo52(
|
|
60916
|
+
() => resolveActiveStep(steps, data?.activeStepId),
|
|
60917
|
+
[steps, data?.activeStepId]
|
|
60918
|
+
);
|
|
60919
|
+
const progress = useMemo52(() => computeProgress(steps), [steps]);
|
|
60920
|
+
const tallies = useMemo52(() => computeTallies(steps), [steps]);
|
|
60921
|
+
return /* @__PURE__ */ jsx303(
|
|
60922
|
+
Panel_default,
|
|
60923
|
+
{
|
|
60924
|
+
...cardProps,
|
|
60925
|
+
scrollable: cardScrollable ?? false,
|
|
60926
|
+
className: classNames113(className, cardClassName),
|
|
60927
|
+
style,
|
|
60928
|
+
children: /* @__PURE__ */ jsx303(
|
|
60929
|
+
WorkflowTimeline_default,
|
|
60930
|
+
{
|
|
60931
|
+
steps,
|
|
60932
|
+
activeStepId: active?.step.id,
|
|
60933
|
+
palette,
|
|
60934
|
+
surfaces,
|
|
60935
|
+
labels,
|
|
60936
|
+
progress,
|
|
60937
|
+
tallies,
|
|
60938
|
+
showLegend: showLegend && !loading,
|
|
60939
|
+
loading,
|
|
60940
|
+
loadingRows,
|
|
60941
|
+
emptyState,
|
|
60942
|
+
onStepSelect,
|
|
60943
|
+
onSubStepSelect,
|
|
60944
|
+
onStepAction
|
|
60945
|
+
}
|
|
60946
|
+
)
|
|
60947
|
+
}
|
|
60948
|
+
);
|
|
60949
|
+
};
|
|
60950
|
+
var WorkflowTrackerRail_default = WorkflowTrackerRail;
|
|
60951
|
+
|
|
60952
|
+
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
60953
|
+
import { useMemo as useMemo53 } from "react";
|
|
60954
|
+
import classNames115 from "classnames";
|
|
60955
|
+
|
|
60512
60956
|
// src/components/WorkflowTracker/WorkflowDetailPanel.tsx
|
|
60513
|
-
import
|
|
60957
|
+
import classNames114 from "classnames";
|
|
60958
|
+
import { Fragment as Fragment47, jsx as jsx304, jsxs as jsxs185 } from "react/jsx-runtime";
|
|
60514
60959
|
var WorkflowDetailPanel = ({
|
|
60515
60960
|
active,
|
|
60516
60961
|
totalSteps,
|
|
@@ -60518,13 +60963,14 @@ var WorkflowDetailPanel = ({
|
|
|
60518
60963
|
surfaces,
|
|
60519
60964
|
labels,
|
|
60520
60965
|
loading,
|
|
60521
|
-
onSubStepSelect
|
|
60966
|
+
onSubStepSelect,
|
|
60967
|
+
onStepAction
|
|
60522
60968
|
}) => {
|
|
60523
60969
|
if (loading) {
|
|
60524
|
-
return /* @__PURE__ */
|
|
60970
|
+
return /* @__PURE__ */ jsx304(WorkflowDetailSkeleton, {});
|
|
60525
60971
|
}
|
|
60526
60972
|
if (!active) {
|
|
60527
|
-
return /* @__PURE__ */
|
|
60973
|
+
return /* @__PURE__ */ jsx304(
|
|
60528
60974
|
WorkflowPlaceholder,
|
|
60529
60975
|
{
|
|
60530
60976
|
title: labels.noActiveStep,
|
|
@@ -60542,11 +60988,11 @@ var WorkflowDetailPanel = ({
|
|
|
60542
60988
|
step.startedAt ? { label: labels.started, value: step.startedAt } : void 0,
|
|
60543
60989
|
step.sla ? { label: labels.sla, value: step.sla } : void 0
|
|
60544
60990
|
].filter(Boolean);
|
|
60545
|
-
return /* @__PURE__ */
|
|
60546
|
-
/* @__PURE__ */
|
|
60547
|
-
/* @__PURE__ */
|
|
60548
|
-
/* @__PURE__ */
|
|
60549
|
-
/* @__PURE__ */
|
|
60991
|
+
return /* @__PURE__ */ jsxs185("div", { className: "flex flex-col", children: [
|
|
60992
|
+
/* @__PURE__ */ jsxs185("div", { className: "px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60993
|
+
/* @__PURE__ */ jsxs185("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
|
|
60994
|
+
/* @__PURE__ */ jsxs185("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
60995
|
+
/* @__PURE__ */ jsxs185(SectionTitle, { surfaces, children: [
|
|
60550
60996
|
labels.step,
|
|
60551
60997
|
" ",
|
|
60552
60998
|
index,
|
|
@@ -60555,7 +61001,7 @@ var WorkflowDetailPanel = ({
|
|
|
60555
61001
|
" ",
|
|
60556
61002
|
totalSteps
|
|
60557
61003
|
] }),
|
|
60558
|
-
step.badge && /* @__PURE__ */
|
|
61004
|
+
step.badge && /* @__PURE__ */ jsx304(
|
|
60559
61005
|
WorkflowBadge,
|
|
60560
61006
|
{
|
|
60561
61007
|
status,
|
|
@@ -60565,24 +61011,36 @@ var WorkflowDetailPanel = ({
|
|
|
60565
61011
|
}
|
|
60566
61012
|
)
|
|
60567
61013
|
] }),
|
|
60568
|
-
|
|
60569
|
-
|
|
60570
|
-
|
|
60571
|
-
|
|
61014
|
+
/* @__PURE__ */ jsxs185("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-2", children: [
|
|
61015
|
+
step.elapsed && /* @__PURE__ */ jsxs185(SectionMeta, { surfaces, children: [
|
|
61016
|
+
labels.elapsed,
|
|
61017
|
+
" ",
|
|
61018
|
+
step.elapsed
|
|
61019
|
+
] }),
|
|
61020
|
+
/* @__PURE__ */ jsx304(
|
|
61021
|
+
WorkflowQuickActions_default,
|
|
61022
|
+
{
|
|
61023
|
+
stepId: step.id,
|
|
61024
|
+
actions: step.actions ?? [],
|
|
61025
|
+
palette,
|
|
61026
|
+
groupLabel: labels.quickActions,
|
|
61027
|
+
onAction: onStepAction
|
|
61028
|
+
}
|
|
61029
|
+
)
|
|
60572
61030
|
] })
|
|
60573
61031
|
] }),
|
|
60574
|
-
/* @__PURE__ */
|
|
60575
|
-
step.description && /* @__PURE__ */
|
|
61032
|
+
/* @__PURE__ */ jsx304("h3", { className: "mt-3 text-xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-2xl", children: step.label }),
|
|
61033
|
+
step.description && /* @__PURE__ */ jsx304(
|
|
60576
61034
|
"p",
|
|
60577
61035
|
{
|
|
60578
|
-
className:
|
|
61036
|
+
className: classNames114(
|
|
60579
61037
|
"mt-2 max-w-3xl text-sm leading-6",
|
|
60580
61038
|
surfaces.mutedText
|
|
60581
61039
|
),
|
|
60582
61040
|
children: step.description
|
|
60583
61041
|
}
|
|
60584
61042
|
),
|
|
60585
|
-
metaFields.length > 0 && /* @__PURE__ */
|
|
61043
|
+
metaFields.length > 0 && /* @__PURE__ */ jsx304("div", { className: "mt-5 flex flex-wrap gap-x-10 gap-y-4", children: metaFields.map((field) => /* @__PURE__ */ jsx304(
|
|
60586
61044
|
MetaField,
|
|
60587
61045
|
{
|
|
60588
61046
|
label: field.label,
|
|
@@ -60592,18 +61050,18 @@ var WorkflowDetailPanel = ({
|
|
|
60592
61050
|
field.label
|
|
60593
61051
|
)) })
|
|
60594
61052
|
] }),
|
|
60595
|
-
subSteps.length > 0 && /* @__PURE__ */
|
|
60596
|
-
/* @__PURE__ */
|
|
61053
|
+
subSteps.length > 0 && /* @__PURE__ */ jsxs185(Fragment47, { children: [
|
|
61054
|
+
/* @__PURE__ */ jsxs185(
|
|
60597
61055
|
"div",
|
|
60598
61056
|
{
|
|
60599
|
-
className:
|
|
61057
|
+
className: classNames114(
|
|
60600
61058
|
"flex flex-wrap items-center justify-between gap-2 border-y px-5 py-2.5 sm:px-6",
|
|
60601
61059
|
surfaces.border,
|
|
60602
61060
|
surfaces.strip
|
|
60603
61061
|
),
|
|
60604
61062
|
children: [
|
|
60605
|
-
/* @__PURE__ */
|
|
60606
|
-
/* @__PURE__ */
|
|
61063
|
+
/* @__PURE__ */ jsx304(SectionTitle, { surfaces, children: labels.subSteps }),
|
|
61064
|
+
/* @__PURE__ */ jsxs185(SectionMeta, { surfaces, children: [
|
|
60607
61065
|
summary.accepted,
|
|
60608
61066
|
" ",
|
|
60609
61067
|
labels.accepted,
|
|
@@ -60619,24 +61077,24 @@ var WorkflowDetailPanel = ({
|
|
|
60619
61077
|
]
|
|
60620
61078
|
}
|
|
60621
61079
|
),
|
|
60622
|
-
/* @__PURE__ */
|
|
61080
|
+
/* @__PURE__ */ jsx304(
|
|
60623
61081
|
"ul",
|
|
60624
61082
|
{
|
|
60625
|
-
className:
|
|
61083
|
+
className: classNames114(
|
|
60626
61084
|
"m-0 list-none divide-y p-0",
|
|
60627
61085
|
surfaces.divider
|
|
60628
61086
|
),
|
|
60629
61087
|
children: subSteps.map((subStep) => {
|
|
60630
61088
|
const subStatus = normalizeStatus(subStep.status);
|
|
60631
61089
|
const isRunning = subStatus === "running";
|
|
60632
|
-
const rowContent = /* @__PURE__ */
|
|
60633
|
-
/* @__PURE__ */
|
|
60634
|
-
/* @__PURE__ */
|
|
60635
|
-
/* @__PURE__ */
|
|
60636
|
-
subStep.note && /* @__PURE__ */
|
|
61090
|
+
const rowContent = /* @__PURE__ */ jsxs185(Fragment47, { children: [
|
|
61091
|
+
/* @__PURE__ */ jsx304(WorkflowStatusNode_default, { status: subStatus, palette }),
|
|
61092
|
+
/* @__PURE__ */ jsxs185("div", { className: "min-w-0 flex-1", children: [
|
|
61093
|
+
/* @__PURE__ */ jsx304("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: subStep.label }),
|
|
61094
|
+
subStep.note && /* @__PURE__ */ jsx304(
|
|
60637
61095
|
"p",
|
|
60638
61096
|
{
|
|
60639
|
-
className:
|
|
61097
|
+
className: classNames114(
|
|
60640
61098
|
"mt-0.5 text-xs leading-5",
|
|
60641
61099
|
surfaces.mutedText
|
|
60642
61100
|
),
|
|
@@ -60644,7 +61102,7 @@ var WorkflowDetailPanel = ({
|
|
|
60644
61102
|
}
|
|
60645
61103
|
)
|
|
60646
61104
|
] }),
|
|
60647
|
-
subStep.badge && /* @__PURE__ */
|
|
61105
|
+
subStep.badge && /* @__PURE__ */ jsx304(
|
|
60648
61106
|
WorkflowBadge,
|
|
60649
61107
|
{
|
|
60650
61108
|
status: subStatus,
|
|
@@ -60653,10 +61111,10 @@ var WorkflowDetailPanel = ({
|
|
|
60653
61111
|
children: subStep.badge
|
|
60654
61112
|
}
|
|
60655
61113
|
),
|
|
60656
|
-
/* @__PURE__ */
|
|
61114
|
+
/* @__PURE__ */ jsx304(
|
|
60657
61115
|
"span",
|
|
60658
61116
|
{
|
|
60659
|
-
className:
|
|
61117
|
+
className: classNames114(
|
|
60660
61118
|
"w-10 shrink-0 text-right text-xs tabular-nums",
|
|
60661
61119
|
surfaces.faintText
|
|
60662
61120
|
),
|
|
@@ -60664,22 +61122,22 @@ var WorkflowDetailPanel = ({
|
|
|
60664
61122
|
}
|
|
60665
61123
|
)
|
|
60666
61124
|
] });
|
|
60667
|
-
const rowClasses =
|
|
61125
|
+
const rowClasses = classNames114(
|
|
60668
61126
|
"flex w-full items-center gap-3 px-5 py-3 text-left sm:px-6",
|
|
60669
61127
|
isRunning && getRowHighlight(palette.accent, surfaces.translucent)
|
|
60670
61128
|
);
|
|
60671
|
-
return /* @__PURE__ */
|
|
61129
|
+
return /* @__PURE__ */ jsx304("li", { children: onSubStepSelect ? /* @__PURE__ */ jsx304(
|
|
60672
61130
|
"button",
|
|
60673
61131
|
{
|
|
60674
61132
|
type: "button",
|
|
60675
61133
|
onClick: () => onSubStepSelect(step.id, subStep.id),
|
|
60676
|
-
className:
|
|
61134
|
+
className: classNames114(
|
|
60677
61135
|
rowClasses,
|
|
60678
61136
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-400 dark:focus-visible:ring-neutral-500"
|
|
60679
61137
|
),
|
|
60680
61138
|
children: rowContent
|
|
60681
61139
|
}
|
|
60682
|
-
) : /* @__PURE__ */
|
|
61140
|
+
) : /* @__PURE__ */ jsx304("div", { className: rowClasses, children: rowContent }) }, subStep.id);
|
|
60683
61141
|
})
|
|
60684
61142
|
}
|
|
60685
61143
|
)
|
|
@@ -60688,202 +61146,114 @@ var WorkflowDetailPanel = ({
|
|
|
60688
61146
|
};
|
|
60689
61147
|
var WorkflowDetailPanel_default = WorkflowDetailPanel;
|
|
60690
61148
|
|
|
60691
|
-
// src/components/WorkflowTracker/
|
|
60692
|
-
import
|
|
60693
|
-
|
|
60694
|
-
|
|
60695
|
-
|
|
60696
|
-
|
|
60697
|
-
|
|
60698
|
-
|
|
60699
|
-
|
|
60700
|
-
|
|
60701
|
-
|
|
60702
|
-
|
|
60703
|
-
|
|
60704
|
-
|
|
60705
|
-
|
|
60706
|
-
|
|
60707
|
-
|
|
60708
|
-
|
|
60709
|
-
|
|
60710
|
-
|
|
60711
|
-
|
|
60712
|
-
|
|
60713
|
-
|
|
61149
|
+
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
61150
|
+
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
61151
|
+
var WorkflowTrackerStepDetails = ({
|
|
61152
|
+
data = sampleWorkflow,
|
|
61153
|
+
loading = false,
|
|
61154
|
+
labels: labelOverrides,
|
|
61155
|
+
cardClassName,
|
|
61156
|
+
onSubStepSelect,
|
|
61157
|
+
onStepAction,
|
|
61158
|
+
className,
|
|
61159
|
+
style,
|
|
61160
|
+
...styleProps
|
|
61161
|
+
}) => {
|
|
61162
|
+
const steps = data?.steps ?? [];
|
|
61163
|
+
const { palette, surfaces } = useWorkflowChrome(styleProps);
|
|
61164
|
+
const labels = useMemo53(
|
|
61165
|
+
() => resolveLabels(labelOverrides),
|
|
61166
|
+
[labelOverrides]
|
|
61167
|
+
);
|
|
61168
|
+
const cardProps = buildCardProps(styleProps);
|
|
61169
|
+
const active = useMemo53(
|
|
61170
|
+
() => resolveActiveStep(steps, data?.activeStepId),
|
|
61171
|
+
[steps, data?.activeStepId]
|
|
61172
|
+
);
|
|
61173
|
+
return /* @__PURE__ */ jsx305(
|
|
61174
|
+
Panel_default,
|
|
61175
|
+
{
|
|
61176
|
+
...cardProps,
|
|
61177
|
+
className: classNames115(className, cardClassName),
|
|
61178
|
+
style,
|
|
61179
|
+
children: /* @__PURE__ */ jsx305(
|
|
61180
|
+
WorkflowDetailPanel_default,
|
|
60714
61181
|
{
|
|
60715
|
-
|
|
60716
|
-
|
|
60717
|
-
|
|
60718
|
-
|
|
60719
|
-
|
|
61182
|
+
active,
|
|
61183
|
+
totalSteps: steps.length,
|
|
61184
|
+
palette,
|
|
61185
|
+
surfaces,
|
|
61186
|
+
labels,
|
|
61187
|
+
loading,
|
|
61188
|
+
onSubStepSelect,
|
|
61189
|
+
onStepAction
|
|
60720
61190
|
}
|
|
60721
61191
|
)
|
|
60722
|
-
|
|
60723
|
-
|
|
60724
|
-
|
|
60725
|
-
var
|
|
61192
|
+
}
|
|
61193
|
+
);
|
|
61194
|
+
};
|
|
61195
|
+
var WorkflowTrackerStepDetails_default = WorkflowTrackerStepDetails;
|
|
60726
61196
|
|
|
60727
|
-
// src/components/WorkflowTracker/
|
|
60728
|
-
|
|
60729
|
-
|
|
60730
|
-
|
|
60731
|
-
|
|
60732
|
-
|
|
60733
|
-
|
|
60734
|
-
|
|
60735
|
-
|
|
60736
|
-
|
|
60737
|
-
|
|
60738
|
-
|
|
60739
|
-
|
|
60740
|
-
|
|
60741
|
-
|
|
60742
|
-
|
|
60743
|
-
|
|
60744
|
-
|
|
60745
|
-
|
|
60746
|
-
|
|
60747
|
-
{
|
|
60748
|
-
|
|
60749
|
-
|
|
60750
|
-
|
|
60751
|
-
|
|
60752
|
-
|
|
60753
|
-
|
|
60754
|
-
|
|
60755
|
-
|
|
60756
|
-
|
|
60757
|
-
|
|
60758
|
-
|
|
60759
|
-
|
|
60760
|
-
|
|
60761
|
-
|
|
60762
|
-
|
|
60763
|
-
|
|
60764
|
-
|
|
60765
|
-
|
|
60766
|
-
|
|
60767
|
-
|
|
60768
|
-
|
|
60769
|
-
|
|
60770
|
-
|
|
60771
|
-
|
|
60772
|
-
|
|
60773
|
-
|
|
60774
|
-
id: "contract_drafting",
|
|
60775
|
-
label: "Contract drafting",
|
|
60776
|
-
status: "done",
|
|
60777
|
-
meta: "1h 10m"
|
|
60778
|
-
},
|
|
60779
|
-
{
|
|
60780
|
-
id: "security_questionnaire",
|
|
60781
|
-
label: "Security questionnaire",
|
|
60782
|
-
status: "in_progress",
|
|
60783
|
-
badge: "In progress",
|
|
60784
|
-
meta: "24m \xB7 3 of 6 sub-steps",
|
|
60785
|
-
elapsed: "24m",
|
|
60786
|
-
description: "Vendor is completing the long-form questionnaire. Each sub-step unlocks once its evidence file is accepted by the reviewer.",
|
|
60787
|
-
owner: "D. Okafor",
|
|
60788
|
-
startedAt: "19 Aug \xB7 09:12",
|
|
60789
|
-
sla: "Due in 6h",
|
|
60790
|
-
subSteps: [
|
|
60791
|
-
{
|
|
60792
|
-
id: "data_handling",
|
|
60793
|
-
label: "Data handling policy",
|
|
60794
|
-
status: "done",
|
|
60795
|
-
badge: "Accepted",
|
|
60796
|
-
duration: "5m"
|
|
60797
|
-
},
|
|
60798
|
-
{
|
|
60799
|
-
id: "pentest",
|
|
60800
|
-
label: "Penetration test report",
|
|
60801
|
-
status: "done",
|
|
60802
|
-
badge: "Accepted",
|
|
60803
|
-
duration: "8m"
|
|
60804
|
-
},
|
|
60805
|
-
{
|
|
60806
|
-
id: "soc2",
|
|
60807
|
-
label: "SOC 2 Type II evidence",
|
|
60808
|
-
status: "done",
|
|
60809
|
-
badge: "Accepted",
|
|
60810
|
-
duration: "11m"
|
|
60811
|
-
},
|
|
60812
|
-
{
|
|
60813
|
-
id: "subprocessor_list",
|
|
60814
|
-
label: "Subprocessor list",
|
|
60815
|
-
status: "running",
|
|
60816
|
-
badge: "Running",
|
|
60817
|
-
note: "Vendor uploading \u2014 2 of 3 files received"
|
|
60818
|
-
},
|
|
60819
|
-
{
|
|
60820
|
-
id: "incident_response",
|
|
60821
|
-
label: "Incident response plan",
|
|
60822
|
-
status: "skipped",
|
|
60823
|
-
badge: "Skipped",
|
|
60824
|
-
note: "Covered by master agreement \xA77"
|
|
60825
|
-
},
|
|
60826
|
-
{
|
|
60827
|
-
id: "business_continuity",
|
|
60828
|
-
label: "Business continuity plan",
|
|
60829
|
-
status: "not_started"
|
|
60830
|
-
}
|
|
60831
|
-
]
|
|
60832
|
-
},
|
|
60833
|
-
{
|
|
60834
|
-
id: "legal_review",
|
|
60835
|
-
label: "Legal review",
|
|
60836
|
-
status: "blocked",
|
|
60837
|
-
badge: "Blocked",
|
|
60838
|
-
meta: "Waiting on Legal \xB7 queued 2d"
|
|
60839
|
-
},
|
|
60840
|
-
{
|
|
60841
|
-
id: "banking_details",
|
|
60842
|
-
label: "Banking details",
|
|
60843
|
-
status: "not_started"
|
|
60844
|
-
},
|
|
61197
|
+
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61198
|
+
import { useMemo as useMemo54 } from "react";
|
|
61199
|
+
import classNames117 from "classnames";
|
|
61200
|
+
|
|
61201
|
+
// src/components/WorkflowTracker/WorkflowDetailsCard.tsx
|
|
61202
|
+
import classNames116 from "classnames";
|
|
61203
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
61204
|
+
var WorkflowDetailsCard = ({
|
|
61205
|
+
details,
|
|
61206
|
+
ariaLabel,
|
|
61207
|
+
cardProps,
|
|
61208
|
+
className,
|
|
61209
|
+
style
|
|
61210
|
+
}) => /* @__PURE__ */ jsx306(
|
|
61211
|
+
Panel_default,
|
|
61212
|
+
{
|
|
61213
|
+
...cardProps,
|
|
61214
|
+
flexBody: true,
|
|
61215
|
+
className: classNames116("flex-1", className),
|
|
61216
|
+
style,
|
|
61217
|
+
children: /* @__PURE__ */ jsx306(ScrollArea_default, { className: "h-full", mask: true, role: "region", "aria-label": ariaLabel, children: details })
|
|
61218
|
+
}
|
|
61219
|
+
);
|
|
61220
|
+
var WorkflowDetailsCard_default = WorkflowDetailsCard;
|
|
61221
|
+
|
|
61222
|
+
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61223
|
+
import { jsx as jsx307 } from "react/jsx-runtime";
|
|
61224
|
+
var WorkflowTrackerDetails = ({
|
|
61225
|
+
data = sampleWorkflow,
|
|
61226
|
+
loading = false,
|
|
61227
|
+
labels: labelOverrides,
|
|
61228
|
+
cardClassName,
|
|
61229
|
+
className,
|
|
61230
|
+
style,
|
|
61231
|
+
...styleProps
|
|
61232
|
+
}) => {
|
|
61233
|
+
const steps = data?.steps ?? [];
|
|
61234
|
+
const labels = useMemo54(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61235
|
+
const cardProps = buildCardProps(styleProps);
|
|
61236
|
+
const active = useMemo54(
|
|
61237
|
+
() => resolveActiveStep(steps, data?.activeStepId),
|
|
61238
|
+
[steps, data?.activeStepId]
|
|
61239
|
+
);
|
|
61240
|
+
const details = active?.step.details;
|
|
61241
|
+
if (loading || details == null || details === "") return null;
|
|
61242
|
+
return /* @__PURE__ */ jsx307(
|
|
61243
|
+
WorkflowDetailsCard_default,
|
|
60845
61244
|
{
|
|
60846
|
-
|
|
60847
|
-
|
|
60848
|
-
|
|
60849
|
-
|
|
60850
|
-
|
|
60851
|
-
|
|
61245
|
+
details,
|
|
61246
|
+
ariaLabel: labels.details,
|
|
61247
|
+
cardProps,
|
|
61248
|
+
className: classNames117(className, cardClassName),
|
|
61249
|
+
style
|
|
61250
|
+
}
|
|
61251
|
+
);
|
|
60852
61252
|
};
|
|
61253
|
+
var WorkflowTrackerDetails_default = WorkflowTrackerDetails;
|
|
60853
61254
|
|
|
60854
61255
|
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
60855
|
-
import { jsx as
|
|
60856
|
-
var DEFAULT_LABELS = {
|
|
60857
|
-
progress: "Progress",
|
|
60858
|
-
done: "done",
|
|
60859
|
-
skipped: "skipped",
|
|
60860
|
-
flagged: "flagged",
|
|
60861
|
-
remaining: "remaining",
|
|
60862
|
-
step: "Step",
|
|
60863
|
-
of: "of",
|
|
60864
|
-
elapsed: "Elapsed",
|
|
60865
|
-
owner: "Owner",
|
|
60866
|
-
started: "Started",
|
|
60867
|
-
sla: "SLA",
|
|
60868
|
-
subSteps: "Sub-steps",
|
|
60869
|
-
accepted: "accepted",
|
|
60870
|
-
open: "open",
|
|
60871
|
-
needsAttention: "Needs attention",
|
|
60872
|
-
skippedSteps: "Skipped steps",
|
|
60873
|
-
live: "LIVE \xB7 read-only view",
|
|
60874
|
-
empty: "No steps yet",
|
|
60875
|
-
emptySubtitle: "Steps appear here as soon as the workflow starts.",
|
|
60876
|
-
noActiveStep: "No step selected",
|
|
60877
|
-
statuses: {
|
|
60878
|
-
done: "Done",
|
|
60879
|
-
in_progress: "In progress",
|
|
60880
|
-
running: "Running",
|
|
60881
|
-
skipped: "Skipped",
|
|
60882
|
-
blocked: "Blocked",
|
|
60883
|
-
attention: "Attention",
|
|
60884
|
-
not_started: "Not started"
|
|
60885
|
-
}
|
|
60886
|
-
};
|
|
61256
|
+
import { jsx as jsx308, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
60887
61257
|
var WorkflowTracker = ({
|
|
60888
61258
|
data = sampleWorkflow,
|
|
60889
61259
|
accentColor = "blue",
|
|
@@ -60902,6 +61272,8 @@ var WorkflowTracker = ({
|
|
|
60902
61272
|
maxWidth = 1180,
|
|
60903
61273
|
railWidth = 360,
|
|
60904
61274
|
stickyRail = false,
|
|
61275
|
+
fillHeight = false,
|
|
61276
|
+
fillHeightOffset = 0,
|
|
60905
61277
|
loading = false,
|
|
60906
61278
|
loadingRows = 6,
|
|
60907
61279
|
emptyState,
|
|
@@ -60910,81 +61282,58 @@ var WorkflowTracker = ({
|
|
|
60910
61282
|
labels: labelOverrides,
|
|
60911
61283
|
onStepSelect,
|
|
60912
61284
|
onSubStepSelect,
|
|
61285
|
+
onStepAction,
|
|
60913
61286
|
className,
|
|
60914
61287
|
style,
|
|
60915
61288
|
...rest
|
|
60916
61289
|
}) => {
|
|
60917
61290
|
const steps = data?.steps ?? [];
|
|
60918
|
-
const
|
|
60919
|
-
|
|
60920
|
-
|
|
60921
|
-
|
|
60922
|
-
|
|
60923
|
-
const palette = useMemo51(
|
|
60924
|
-
() => ({
|
|
60925
|
-
accent: accentColor,
|
|
60926
|
-
attention: attentionColor,
|
|
60927
|
-
blocked: blockedColor,
|
|
60928
|
-
muted: mutedColor,
|
|
60929
|
-
translucent
|
|
60930
|
-
}),
|
|
60931
|
-
[accentColor, attentionColor, blockedColor, mutedColor, translucent]
|
|
60932
|
-
);
|
|
60933
|
-
const labels = useMemo51(
|
|
60934
|
-
() => ({
|
|
60935
|
-
...DEFAULT_LABELS,
|
|
60936
|
-
...labelOverrides,
|
|
60937
|
-
statuses: {
|
|
60938
|
-
...DEFAULT_LABELS.statuses,
|
|
60939
|
-
...labelOverrides?.statuses
|
|
60940
|
-
}
|
|
60941
|
-
}),
|
|
60942
|
-
[labelOverrides]
|
|
60943
|
-
);
|
|
60944
|
-
const progress = useMemo51(() => computeProgress(steps), [steps]);
|
|
60945
|
-
const tallies = useMemo51(() => computeTallies(steps), [steps]);
|
|
60946
|
-
const active = useMemo51(
|
|
60947
|
-
() => resolveActiveStep(steps, data?.activeStepId),
|
|
60948
|
-
[steps, data?.activeStepId]
|
|
60949
|
-
);
|
|
60950
|
-
const attentionSteps = useMemo51(() => getAttentionSteps(steps), [steps]);
|
|
60951
|
-
const skippedSteps = useMemo51(() => getSkippedSteps(steps), [steps]);
|
|
60952
|
-
const cardProps = {
|
|
61291
|
+
const styleProps = {
|
|
61292
|
+
accentColor,
|
|
61293
|
+
attentionColor,
|
|
61294
|
+
blockedColor,
|
|
61295
|
+
mutedColor,
|
|
60953
61296
|
variant,
|
|
60954
|
-
|
|
61297
|
+
cardTone,
|
|
60955
61298
|
corner,
|
|
60956
61299
|
glassOpacity,
|
|
60957
61300
|
vibrancy,
|
|
60958
61301
|
specularMode,
|
|
60959
61302
|
padding,
|
|
60960
|
-
|
|
61303
|
+
translucentSurfaces
|
|
60961
61304
|
};
|
|
61305
|
+
const { palette, surfaces } = useWorkflowChrome(styleProps);
|
|
61306
|
+
const labels = useMemo55(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61307
|
+
const cardProps = buildCardProps(styleProps);
|
|
61308
|
+
const attentionSteps = useMemo55(() => getAttentionSteps(steps), [steps]);
|
|
61309
|
+
const skippedSteps = useMemo55(() => getSkippedSteps(steps), [steps]);
|
|
60962
61310
|
const railStyle = {
|
|
60963
|
-
"--wt-rail-width": typeof railWidth === "number" ? `${railWidth}px` : railWidth
|
|
61311
|
+
"--wt-rail-width": typeof railWidth === "number" ? `${railWidth}px` : railWidth,
|
|
61312
|
+
"--wt-fill-offset": typeof fillHeightOffset === "number" ? `${fillHeightOffset}px` : fillHeightOffset
|
|
60964
61313
|
};
|
|
60965
|
-
return /* @__PURE__ */
|
|
61314
|
+
return /* @__PURE__ */ jsxs186(
|
|
60966
61315
|
"div",
|
|
60967
61316
|
{
|
|
60968
|
-
className:
|
|
61317
|
+
className: classNames118("@container w-full", className),
|
|
60969
61318
|
style: { maxWidth, ...railStyle, ...style },
|
|
60970
61319
|
"aria-busy": loading || void 0,
|
|
60971
61320
|
...rest,
|
|
60972
61321
|
children: [
|
|
60973
|
-
showHeader && loading && /* @__PURE__ */
|
|
61322
|
+
showHeader && loading && /* @__PURE__ */ jsx308(
|
|
60974
61323
|
WorkflowHeaderSkeleton,
|
|
60975
61324
|
{
|
|
60976
61325
|
hasIcon: Boolean(data?.icon),
|
|
60977
61326
|
iconCorner
|
|
60978
61327
|
}
|
|
60979
61328
|
),
|
|
60980
|
-
showHeader && !loading && /* @__PURE__ */
|
|
60981
|
-
/* @__PURE__ */
|
|
61329
|
+
showHeader && !loading && /* @__PURE__ */ jsxs186("header", { className: "mb-5 flex flex-wrap items-start justify-between gap-3", children: [
|
|
61330
|
+
/* @__PURE__ */ jsxs186("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
60982
61331
|
data?.icon && // `overflow-hidden` plus the shared corner class clips whatever
|
|
60983
61332
|
// the caller passes, so an <img> needs no rounding of its own.
|
|
60984
|
-
/* @__PURE__ */
|
|
61333
|
+
/* @__PURE__ */ jsx308(
|
|
60985
61334
|
"span",
|
|
60986
61335
|
{
|
|
60987
|
-
className:
|
|
61336
|
+
className: classNames118(
|
|
60988
61337
|
"flex h-12 w-12 shrink-0 items-center justify-center overflow-hidden [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
60989
61338
|
getSurfaceCornerClass(iconCorner),
|
|
60990
61339
|
surfaces.chip
|
|
@@ -60992,33 +61341,33 @@ var WorkflowTracker = ({
|
|
|
60992
61341
|
children: data.icon
|
|
60993
61342
|
}
|
|
60994
61343
|
),
|
|
60995
|
-
/* @__PURE__ */
|
|
60996
|
-
data?.eyebrow && /* @__PURE__ */
|
|
61344
|
+
/* @__PURE__ */ jsxs186("div", { className: "min-w-0", children: [
|
|
61345
|
+
data?.eyebrow && /* @__PURE__ */ jsx308(
|
|
60997
61346
|
"p",
|
|
60998
61347
|
{
|
|
60999
|
-
className:
|
|
61348
|
+
className: classNames118(
|
|
61000
61349
|
"text-[11px] font-semibold uppercase tracking-widest",
|
|
61001
61350
|
surfaces.faintText
|
|
61002
61351
|
),
|
|
61003
61352
|
children: data.eyebrow
|
|
61004
61353
|
}
|
|
61005
61354
|
),
|
|
61006
|
-
/* @__PURE__ */
|
|
61355
|
+
/* @__PURE__ */ jsx308("h2", { className: "mt-1 text-2xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-3xl", children: data?.title })
|
|
61007
61356
|
] })
|
|
61008
61357
|
] }),
|
|
61009
|
-
data?.live && /* @__PURE__ */
|
|
61358
|
+
data?.live && /* @__PURE__ */ jsxs186(
|
|
61010
61359
|
Pill_default,
|
|
61011
61360
|
{
|
|
61012
61361
|
size: "md",
|
|
61013
61362
|
tone: mutedColor,
|
|
61014
61363
|
variant: "outline",
|
|
61015
|
-
className:
|
|
61364
|
+
className: classNames118("tracking-wide", surfaces.chip),
|
|
61016
61365
|
children: [
|
|
61017
|
-
/* @__PURE__ */
|
|
61366
|
+
/* @__PURE__ */ jsx308(
|
|
61018
61367
|
"span",
|
|
61019
61368
|
{
|
|
61020
61369
|
"aria-hidden": "true",
|
|
61021
|
-
className:
|
|
61370
|
+
className: classNames118(
|
|
61022
61371
|
"mr-2 inline-block h-1.5 w-1.5 rounded-full",
|
|
61023
61372
|
`bg-${accentColor}-500 dark:bg-${accentColor}-400`
|
|
61024
61373
|
)
|
|
@@ -61029,67 +61378,88 @@ var WorkflowTracker = ({
|
|
|
61029
61378
|
}
|
|
61030
61379
|
)
|
|
61031
61380
|
] }),
|
|
61032
|
-
/* @__PURE__ */
|
|
61033
|
-
|
|
61034
|
-
|
|
61035
|
-
|
|
61036
|
-
|
|
61037
|
-
|
|
61038
|
-
|
|
61039
|
-
|
|
61381
|
+
/* @__PURE__ */ jsxs186(
|
|
61382
|
+
"div",
|
|
61383
|
+
{
|
|
61384
|
+
className: classNames118(
|
|
61385
|
+
"grid grid-cols-1 items-start gap-5 @4xl:grid-cols-[var(--wt-rail-width)_minmax(0,1fr)]",
|
|
61386
|
+
fillHeight && "@4xl:h-[calc(100dvh-var(--wt-fill-offset))]"
|
|
61387
|
+
),
|
|
61388
|
+
children: [
|
|
61389
|
+
/* @__PURE__ */ jsx308(
|
|
61390
|
+
WorkflowTrackerRail_default,
|
|
61040
61391
|
{
|
|
61041
|
-
|
|
61042
|
-
|
|
61043
|
-
palette,
|
|
61044
|
-
surfaces,
|
|
61045
|
-
labels,
|
|
61046
|
-
progress,
|
|
61047
|
-
tallies,
|
|
61048
|
-
showLegend: showLegend && !loading,
|
|
61392
|
+
...styleProps,
|
|
61393
|
+
data,
|
|
61049
61394
|
loading,
|
|
61050
61395
|
loadingRows,
|
|
61396
|
+
showLegend,
|
|
61051
61397
|
emptyState,
|
|
61398
|
+
labels: labelOverrides,
|
|
61399
|
+
cardScrollable: fillHeight,
|
|
61400
|
+
cardClassName: classNames118(
|
|
61401
|
+
stickyRail && !fillHeight && "@4xl:sticky @4xl:top-6",
|
|
61402
|
+
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61403
|
+
),
|
|
61052
61404
|
onStepSelect,
|
|
61053
|
-
onSubStepSelect
|
|
61405
|
+
onSubStepSelect,
|
|
61406
|
+
onStepAction
|
|
61054
61407
|
}
|
|
61055
|
-
)
|
|
61056
|
-
|
|
61057
|
-
|
|
61058
|
-
/* @__PURE__ */ jsxs185("div", { className: "@container flex min-w-0 flex-col gap-5", children: [
|
|
61059
|
-
/* @__PURE__ */ jsx302(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx302(
|
|
61060
|
-
WorkflowDetailPanel_default,
|
|
61061
|
-
{
|
|
61062
|
-
active,
|
|
61063
|
-
totalSteps: steps.length,
|
|
61064
|
-
palette,
|
|
61065
|
-
surfaces,
|
|
61066
|
-
labels,
|
|
61067
|
-
loading,
|
|
61068
|
-
onSubStepSelect
|
|
61069
|
-
}
|
|
61070
|
-
) }),
|
|
61071
|
-
!loading && (attentionSteps.length > 0 || skippedSteps.length > 0) && /* @__PURE__ */ jsxs185("div", { className: "grid grid-cols-1 gap-5 @xl:grid-cols-2", children: [
|
|
61072
|
-
attentionSteps.length > 0 && /* @__PURE__ */ jsx302(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx302(
|
|
61073
|
-
WorkflowSummaryCard_default,
|
|
61074
|
-
{
|
|
61075
|
-
title: labels.needsAttention,
|
|
61076
|
-
steps: attentionSteps,
|
|
61077
|
-
palette,
|
|
61078
|
-
surfaces
|
|
61079
|
-
}
|
|
61080
|
-
) }),
|
|
61081
|
-
skippedSteps.length > 0 && /* @__PURE__ */ jsx302(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx302(
|
|
61082
|
-
WorkflowSummaryCard_default,
|
|
61408
|
+
),
|
|
61409
|
+
/* @__PURE__ */ jsxs186(
|
|
61410
|
+
"div",
|
|
61083
61411
|
{
|
|
61084
|
-
|
|
61085
|
-
|
|
61086
|
-
|
|
61087
|
-
|
|
61412
|
+
className: classNames118(
|
|
61413
|
+
"@container flex min-w-0 flex-col gap-5",
|
|
61414
|
+
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61415
|
+
),
|
|
61416
|
+
children: [
|
|
61417
|
+
/* @__PURE__ */ jsx308(
|
|
61418
|
+
WorkflowTrackerStepDetails_default,
|
|
61419
|
+
{
|
|
61420
|
+
...styleProps,
|
|
61421
|
+
data,
|
|
61422
|
+
loading,
|
|
61423
|
+
labels: labelOverrides,
|
|
61424
|
+
onSubStepSelect,
|
|
61425
|
+
onStepAction
|
|
61426
|
+
}
|
|
61427
|
+
),
|
|
61428
|
+
/* @__PURE__ */ jsx308(
|
|
61429
|
+
WorkflowTrackerDetails_default,
|
|
61430
|
+
{
|
|
61431
|
+
...styleProps,
|
|
61432
|
+
data,
|
|
61433
|
+
loading,
|
|
61434
|
+
labels: labelOverrides
|
|
61435
|
+
}
|
|
61436
|
+
),
|
|
61437
|
+
!loading && (attentionSteps.length > 0 || skippedSteps.length > 0) && /* @__PURE__ */ jsxs186("div", { className: "grid grid-cols-1 gap-5 @xl:grid-cols-2", children: [
|
|
61438
|
+
attentionSteps.length > 0 && /* @__PURE__ */ jsx308(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx308(
|
|
61439
|
+
WorkflowSummaryCard_default,
|
|
61440
|
+
{
|
|
61441
|
+
title: labels.needsAttention,
|
|
61442
|
+
steps: attentionSteps,
|
|
61443
|
+
palette,
|
|
61444
|
+
surfaces
|
|
61445
|
+
}
|
|
61446
|
+
) }),
|
|
61447
|
+
skippedSteps.length > 0 && /* @__PURE__ */ jsx308(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx308(
|
|
61448
|
+
WorkflowSummaryCard_default,
|
|
61449
|
+
{
|
|
61450
|
+
title: labels.skippedSteps,
|
|
61451
|
+
steps: skippedSteps,
|
|
61452
|
+
palette,
|
|
61453
|
+
surfaces
|
|
61454
|
+
}
|
|
61455
|
+
) })
|
|
61456
|
+
] })
|
|
61457
|
+
]
|
|
61088
61458
|
}
|
|
61089
|
-
)
|
|
61090
|
-
]
|
|
61091
|
-
|
|
61092
|
-
|
|
61459
|
+
)
|
|
61460
|
+
]
|
|
61461
|
+
}
|
|
61462
|
+
)
|
|
61093
61463
|
]
|
|
61094
61464
|
}
|
|
61095
61465
|
);
|
|
@@ -61097,9 +61467,9 @@ var WorkflowTracker = ({
|
|
|
61097
61467
|
var WorkflowTracker_default = WorkflowTracker;
|
|
61098
61468
|
|
|
61099
61469
|
// src/components/Gantt/Gantt.tsx
|
|
61100
|
-
import { useCallback as useCallback42, useEffect as useEffect71, useMemo as
|
|
61470
|
+
import { useCallback as useCallback42, useEffect as useEffect71, useMemo as useMemo59, useRef as useRef68, useState as useState79 } from "react";
|
|
61101
61471
|
import { createPortal as createPortal15 } from "react-dom";
|
|
61102
|
-
import
|
|
61472
|
+
import classNames122 from "classnames";
|
|
61103
61473
|
|
|
61104
61474
|
// ../common/gantt/types.ts
|
|
61105
61475
|
var GANTT_ZOOM_PRESETS = [
|
|
@@ -62445,38 +62815,38 @@ var sampleGantt = {
|
|
|
62445
62815
|
};
|
|
62446
62816
|
|
|
62447
62817
|
// src/components/Gantt/GanttScale.tsx
|
|
62448
|
-
import
|
|
62449
|
-
import { jsx as
|
|
62818
|
+
import classNames119 from "classnames";
|
|
62819
|
+
import { jsx as jsx309, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
62450
62820
|
var GanttScale = ({ levels, height }) => {
|
|
62451
62821
|
if (levels.length === 0) {
|
|
62452
|
-
return /* @__PURE__ */
|
|
62822
|
+
return /* @__PURE__ */ jsx309("div", { style: { height } });
|
|
62453
62823
|
}
|
|
62454
62824
|
const coarseHeight = levels.length > 1 ? 24 : height;
|
|
62455
|
-
return /* @__PURE__ */
|
|
62825
|
+
return /* @__PURE__ */ jsx309("div", { className: "flex h-full w-full flex-col", children: levels.map((level, li) => /* @__PURE__ */ jsx309(
|
|
62456
62826
|
"div",
|
|
62457
62827
|
{
|
|
62458
|
-
className:
|
|
62828
|
+
className: classNames119("flex w-full", li === 0 ? "shrink-0" : "min-h-0 flex-1"),
|
|
62459
62829
|
style: li === 0 ? { height: coarseHeight } : void 0,
|
|
62460
|
-
children: level.columns.map((col) => /* @__PURE__ */
|
|
62830
|
+
children: level.columns.map((col) => /* @__PURE__ */ jsxs187(
|
|
62461
62831
|
"div",
|
|
62462
62832
|
{
|
|
62463
|
-
className:
|
|
62833
|
+
className: classNames119(
|
|
62464
62834
|
"flex shrink-0 flex-col items-center justify-center overflow-hidden border-r border-neutral-200/70 dark:border-neutral-800/70",
|
|
62465
62835
|
li === 0 ? "bg-neutral-50/60 dark:bg-neutral-800/40" : "bg-white dark:bg-neutral-900"
|
|
62466
62836
|
),
|
|
62467
62837
|
style: { width: col.width },
|
|
62468
62838
|
children: [
|
|
62469
|
-
/* @__PURE__ */
|
|
62839
|
+
/* @__PURE__ */ jsx309(
|
|
62470
62840
|
"span",
|
|
62471
62841
|
{
|
|
62472
|
-
className:
|
|
62842
|
+
className: classNames119(
|
|
62473
62843
|
"max-w-full truncate px-1 text-[10px] font-semibold uppercase leading-none tracking-wide",
|
|
62474
62844
|
li === 0 ? "text-neutral-700 dark:text-neutral-200" : "text-neutral-500 dark:text-neutral-400"
|
|
62475
62845
|
),
|
|
62476
62846
|
children: col.label
|
|
62477
62847
|
}
|
|
62478
62848
|
),
|
|
62479
|
-
col.subLabel != null && /* @__PURE__ */
|
|
62849
|
+
col.subLabel != null && /* @__PURE__ */ jsx309("span", { className: "max-w-full truncate px-1 text-[9px] font-medium leading-none text-neutral-400 dark:text-neutral-500", children: col.subLabel })
|
|
62480
62850
|
]
|
|
62481
62851
|
},
|
|
62482
62852
|
col.id
|
|
@@ -62489,7 +62859,7 @@ GanttScale.displayName = "GanttScale";
|
|
|
62489
62859
|
|
|
62490
62860
|
// src/components/Gantt/GanttLinkLayer.tsx
|
|
62491
62861
|
import { forwardRef as forwardRef160, useRef as useRef66 } from "react";
|
|
62492
|
-
import { jsx as
|
|
62862
|
+
import { jsx as jsx310, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
62493
62863
|
var GanttLinkLayer = forwardRef160(
|
|
62494
62864
|
function GanttLinkLayer2({
|
|
62495
62865
|
width,
|
|
@@ -62525,24 +62895,24 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62525
62895
|
const pick = pickFromEvent(e) ?? clicked;
|
|
62526
62896
|
if (interactive && onDeleteLink) onDeleteLink(pick.link);
|
|
62527
62897
|
};
|
|
62528
|
-
return /* @__PURE__ */
|
|
62898
|
+
return /* @__PURE__ */ jsxs188(
|
|
62529
62899
|
"div",
|
|
62530
62900
|
{
|
|
62531
62901
|
ref,
|
|
62532
62902
|
className: "pointer-events-none absolute top-0 z-10",
|
|
62533
62903
|
style: { left: offsetLeft, width, height },
|
|
62534
62904
|
children: [
|
|
62535
|
-
/* @__PURE__ */
|
|
62905
|
+
/* @__PURE__ */ jsxs188("svg", { ref: svgRef, width, height, className: "block overflow-visible", children: [
|
|
62536
62906
|
paths.map((p, i) => {
|
|
62537
62907
|
const tokens = getGanttLinkTokens(p.color ?? color);
|
|
62538
62908
|
const sel = selected != null && p.link === selected;
|
|
62539
62909
|
const nodeR = sel ? 4.5 : 3.5;
|
|
62540
|
-
return /* @__PURE__ */
|
|
62910
|
+
return /* @__PURE__ */ jsxs188(
|
|
62541
62911
|
"g",
|
|
62542
62912
|
{
|
|
62543
62913
|
style: sel ? { filter: `drop-shadow(0 0 3px var(--color-${p.color ?? color}-500))` } : void 0,
|
|
62544
62914
|
children: [
|
|
62545
|
-
/* @__PURE__ */
|
|
62915
|
+
/* @__PURE__ */ jsx310(
|
|
62546
62916
|
"path",
|
|
62547
62917
|
{
|
|
62548
62918
|
d: p.d,
|
|
@@ -62558,10 +62928,10 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62558
62928
|
},
|
|
62559
62929
|
onClick: (e) => handlePick(e, p),
|
|
62560
62930
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
62561
|
-
children: /* @__PURE__ */
|
|
62931
|
+
children: /* @__PURE__ */ jsx310("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
62562
62932
|
}
|
|
62563
62933
|
),
|
|
62564
|
-
/* @__PURE__ */
|
|
62934
|
+
/* @__PURE__ */ jsx310(
|
|
62565
62935
|
"path",
|
|
62566
62936
|
{
|
|
62567
62937
|
d: p.d,
|
|
@@ -62577,14 +62947,14 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62577
62947
|
},
|
|
62578
62948
|
onClick: (e) => handlePick(e, p),
|
|
62579
62949
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
62580
|
-
children: /* @__PURE__ */
|
|
62950
|
+
children: /* @__PURE__ */ jsx310("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
62581
62951
|
}
|
|
62582
62952
|
),
|
|
62583
|
-
p.arrow && /* @__PURE__ */
|
|
62584
|
-
/* @__PURE__ */
|
|
62585
|
-
/* @__PURE__ */
|
|
62586
|
-
/* @__PURE__ */
|
|
62587
|
-
/* @__PURE__ */
|
|
62953
|
+
p.arrow && /* @__PURE__ */ jsx310("polygon", { points: p.arrow, className: tokens.fill }),
|
|
62954
|
+
/* @__PURE__ */ jsx310("circle", { cx: p.from.x, cy: p.from.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
62955
|
+
/* @__PURE__ */ jsx310("circle", { cx: p.from.x, cy: p.from.y, r: nodeR, className: tokens.fill }),
|
|
62956
|
+
/* @__PURE__ */ jsx310("circle", { cx: p.to.x, cy: p.to.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
62957
|
+
/* @__PURE__ */ jsx310("circle", { cx: p.to.x, cy: p.to.y, r: nodeR, className: tokens.fill })
|
|
62588
62958
|
]
|
|
62589
62959
|
},
|
|
62590
62960
|
`${p.link.source}->${p.link.target}-${p.type}-${i}`
|
|
@@ -62592,8 +62962,8 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62592
62962
|
}),
|
|
62593
62963
|
rubber && (() => {
|
|
62594
62964
|
const tokens = getGanttLinkTokens(rubber.color);
|
|
62595
|
-
return /* @__PURE__ */
|
|
62596
|
-
/* @__PURE__ */
|
|
62965
|
+
return /* @__PURE__ */ jsxs188("g", { children: [
|
|
62966
|
+
/* @__PURE__ */ jsx310(
|
|
62597
62967
|
"path",
|
|
62598
62968
|
{
|
|
62599
62969
|
d: rubber.d,
|
|
@@ -62604,15 +62974,15 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62604
62974
|
strokeDasharray: "5 3"
|
|
62605
62975
|
}
|
|
62606
62976
|
),
|
|
62607
|
-
rubber.arrow && /* @__PURE__ */
|
|
62608
|
-
/* @__PURE__ */
|
|
62609
|
-
/* @__PURE__ */
|
|
62610
|
-
/* @__PURE__ */
|
|
62611
|
-
/* @__PURE__ */
|
|
62977
|
+
rubber.arrow && /* @__PURE__ */ jsx310("polygon", { points: rubber.arrow, className: tokens.fill }),
|
|
62978
|
+
/* @__PURE__ */ jsx310("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 6, className: tokens.halo }),
|
|
62979
|
+
/* @__PURE__ */ jsx310("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 3.5, className: tokens.fill }),
|
|
62980
|
+
/* @__PURE__ */ jsx310("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 6, className: tokens.halo }),
|
|
62981
|
+
/* @__PURE__ */ jsx310("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 3.5, className: tokens.fill })
|
|
62612
62982
|
] });
|
|
62613
62983
|
})()
|
|
62614
62984
|
] }),
|
|
62615
|
-
canDelete && selMid && /* @__PURE__ */
|
|
62985
|
+
canDelete && selMid && /* @__PURE__ */ jsxs188(
|
|
62616
62986
|
"button",
|
|
62617
62987
|
{
|
|
62618
62988
|
type: "button",
|
|
@@ -62630,7 +63000,7 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62630
63000
|
onClick: () => onDeleteLink(selected),
|
|
62631
63001
|
title: t("kit.gantt.removeDependency"),
|
|
62632
63002
|
children: [
|
|
62633
|
-
/* @__PURE__ */
|
|
63003
|
+
/* @__PURE__ */ jsx310("span", { "aria-hidden": true, children: "\u2715" }),
|
|
62634
63004
|
" ",
|
|
62635
63005
|
t("kit.gantt.delete")
|
|
62636
63006
|
]
|
|
@@ -62644,9 +63014,9 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62644
63014
|
GanttLinkLayer.displayName = "GanttLinkLayer";
|
|
62645
63015
|
|
|
62646
63016
|
// src/components/Gantt/GanttBodyRow.tsx
|
|
62647
|
-
import { useMemo as
|
|
62648
|
-
import
|
|
62649
|
-
import { Fragment as Fragment48, jsx as
|
|
63017
|
+
import { useMemo as useMemo56 } from "react";
|
|
63018
|
+
import classNames120 from "classnames";
|
|
63019
|
+
import { Fragment as Fragment48, jsx as jsx311, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
62650
63020
|
var BAR_HEIGHT = 24;
|
|
62651
63021
|
var MILESTONE_SIZE = 14;
|
|
62652
63022
|
var GanttBodyRow = ({
|
|
@@ -62685,11 +63055,11 @@ var GanttBodyRow = ({
|
|
|
62685
63055
|
const t = useKitT();
|
|
62686
63056
|
const isDraggingThis = row.task != null && drag?.taskId === row.task.id;
|
|
62687
63057
|
const reorderDragging = isDraggingThis && drag?.kind === "reorder";
|
|
62688
|
-
return /* @__PURE__ */
|
|
63058
|
+
return /* @__PURE__ */ jsx311(
|
|
62689
63059
|
"div",
|
|
62690
63060
|
{
|
|
62691
63061
|
"data-row-key": row.key,
|
|
62692
|
-
className:
|
|
63062
|
+
className: classNames120(
|
|
62693
63063
|
// No overflow here: an overflow-hidden row root would become the
|
|
62694
63064
|
// sticky halves' (non-scrolling) scrollport and stop them pinning to
|
|
62695
63065
|
// the left edge while the timeline scrolls. The halves pin the
|
|
@@ -62706,7 +63076,7 @@ var GanttBodyRow = ({
|
|
|
62706
63076
|
boxShadow: `inset 2px 0 0 var(--color-${color}-500)`
|
|
62707
63077
|
} : {}
|
|
62708
63078
|
},
|
|
62709
|
-
children: row.task == null ? /* @__PURE__ */
|
|
63079
|
+
children: row.task == null ? /* @__PURE__ */ jsx311(
|
|
62710
63080
|
LaneHeader,
|
|
62711
63081
|
{
|
|
62712
63082
|
row,
|
|
@@ -62717,20 +63087,20 @@ var GanttBodyRow = ({
|
|
|
62717
63087
|
dividerClass,
|
|
62718
63088
|
liveProgress: liveLane
|
|
62719
63089
|
}
|
|
62720
|
-
) : /* @__PURE__ */
|
|
62721
|
-
/* @__PURE__ */
|
|
63090
|
+
) : /* @__PURE__ */ jsxs189(Fragment48, { children: [
|
|
63091
|
+
/* @__PURE__ */ jsxs189(
|
|
62722
63092
|
"div",
|
|
62723
63093
|
{
|
|
62724
|
-
className:
|
|
63094
|
+
className: classNames120(
|
|
62725
63095
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
62726
63096
|
dividerClass
|
|
62727
63097
|
),
|
|
62728
63098
|
style: { width: leftWidth },
|
|
62729
63099
|
children: [
|
|
62730
|
-
/* @__PURE__ */
|
|
63100
|
+
/* @__PURE__ */ jsx311("div", { className: "flex w-9 shrink-0 items-center justify-center", children: interactive && !row.task.locked && /* @__PURE__ */ jsx311(
|
|
62731
63101
|
"span",
|
|
62732
63102
|
{
|
|
62733
|
-
className:
|
|
63103
|
+
className: classNames120(
|
|
62734
63104
|
"flex cursor-grab touch-none items-center text-neutral-300 transition-opacity active:cursor-grabbing dark:text-neutral-600",
|
|
62735
63105
|
reorderDragging ? "opacity-100" : "opacity-0 group-hover/row:opacity-100"
|
|
62736
63106
|
),
|
|
@@ -62738,10 +63108,10 @@ var GanttBodyRow = ({
|
|
|
62738
63108
|
onPointerDown: (e) => onGripPointerDown(row.key, row.task, e),
|
|
62739
63109
|
title: t("kit.gantt.dragReorder"),
|
|
62740
63110
|
"aria-hidden": "true",
|
|
62741
|
-
children: /* @__PURE__ */
|
|
63111
|
+
children: /* @__PURE__ */ jsx311(Drag, { className: "h-3.5 w-3.5" })
|
|
62742
63112
|
}
|
|
62743
63113
|
) }),
|
|
62744
|
-
columns.map((col, i) => /* @__PURE__ */
|
|
63114
|
+
columns.map((col, i) => /* @__PURE__ */ jsx311(
|
|
62745
63115
|
Cell,
|
|
62746
63116
|
{
|
|
62747
63117
|
col,
|
|
@@ -62762,12 +63132,12 @@ var GanttBodyRow = ({
|
|
|
62762
63132
|
]
|
|
62763
63133
|
}
|
|
62764
63134
|
),
|
|
62765
|
-
/* @__PURE__ */
|
|
63135
|
+
/* @__PURE__ */ jsx311(
|
|
62766
63136
|
"div",
|
|
62767
63137
|
{
|
|
62768
|
-
className:
|
|
63138
|
+
className: classNames120("relative shrink-0 border-b", dividerClass),
|
|
62769
63139
|
style: { width: timelineWidth },
|
|
62770
|
-
children: /* @__PURE__ */
|
|
63140
|
+
children: /* @__PURE__ */ jsx311(
|
|
62771
63141
|
TaskBar,
|
|
62772
63142
|
{
|
|
62773
63143
|
task: row.task,
|
|
@@ -62808,57 +63178,57 @@ var LaneHeader = ({ row, columns, leftWidth, color, onCaretClick, dividerClass =
|
|
|
62808
63178
|
const laneColor = lane.color ?? color;
|
|
62809
63179
|
const tokens = getGanttLaneTokens(laneColor);
|
|
62810
63180
|
const isOpen = lane.open !== false;
|
|
62811
|
-
return /* @__PURE__ */
|
|
62812
|
-
/* @__PURE__ */
|
|
63181
|
+
return /* @__PURE__ */ jsxs189(Fragment48, { children: [
|
|
63182
|
+
/* @__PURE__ */ jsxs189(
|
|
62813
63183
|
"div",
|
|
62814
63184
|
{
|
|
62815
|
-
className:
|
|
63185
|
+
className: classNames120(
|
|
62816
63186
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
62817
63187
|
dividerClass
|
|
62818
63188
|
),
|
|
62819
63189
|
style: { width: leftWidth },
|
|
62820
63190
|
children: [
|
|
62821
|
-
/* @__PURE__ */
|
|
62822
|
-
/* @__PURE__ */
|
|
63191
|
+
/* @__PURE__ */ jsx311("div", { className: classNames120("pointer-events-none absolute inset-0", tokens.band) }),
|
|
63192
|
+
/* @__PURE__ */ jsx311("div", { className: "relative flex w-9 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx311(
|
|
62823
63193
|
"button",
|
|
62824
63194
|
{
|
|
62825
63195
|
type: "button",
|
|
62826
63196
|
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded text-neutral-500 hover:bg-white/60 focus-visible:ring-2 focus-visible:ring-neutral-400 dark:text-neutral-400 dark:hover:bg-white/10",
|
|
62827
63197
|
onClick: () => onCaretClick(lane.id, isOpen),
|
|
62828
63198
|
"aria-label": t(isOpen ? "kit.gantt.collapse" : "kit.gantt.expand", { name: lane.label }),
|
|
62829
|
-
children: /* @__PURE__ */
|
|
63199
|
+
children: /* @__PURE__ */ jsx311(ChevronRight, { className: classNames120("h-3 w-3 transition-transform", isOpen && "rotate-90") })
|
|
62830
63200
|
}
|
|
62831
63201
|
) }),
|
|
62832
|
-
columns.map((col, i) => /* @__PURE__ */
|
|
63202
|
+
columns.map((col, i) => /* @__PURE__ */ jsx311(
|
|
62833
63203
|
"div",
|
|
62834
63204
|
{
|
|
62835
|
-
className:
|
|
63205
|
+
className: classNames120(
|
|
62836
63206
|
"relative flex shrink-0 items-center gap-2 overflow-hidden border-r px-2 last:border-r-0",
|
|
62837
63207
|
dividerClass
|
|
62838
63208
|
),
|
|
62839
63209
|
style: { width: col.width ?? "160px" },
|
|
62840
|
-
children: i === 0 ? /* @__PURE__ */
|
|
62841
|
-
/* @__PURE__ */
|
|
62842
|
-
lane.description && /* @__PURE__ */
|
|
62843
|
-
row.childCount > 0 && /* @__PURE__ */
|
|
62844
|
-
] }) : col.key === "progress" ? /* @__PURE__ */
|
|
63210
|
+
children: i === 0 ? /* @__PURE__ */ jsxs189(Fragment48, { children: [
|
|
63211
|
+
/* @__PURE__ */ jsx311("span", { className: classNames120("truncate text-[13px] font-semibold", tokens.label), children: lane.label }),
|
|
63212
|
+
lane.description && /* @__PURE__ */ jsx311("span", { className: "hidden truncate text-[11px] text-neutral-500 dark:text-neutral-400 lg:inline", children: lane.description }),
|
|
63213
|
+
row.childCount > 0 && /* @__PURE__ */ jsx311("span", { className: "shrink-0 rounded-full bg-white/70 px-1.5 py-0.5 text-[10px] font-semibold text-neutral-600 dark:bg-white/10 dark:text-neutral-300", children: row.childCount })
|
|
63214
|
+
] }) : col.key === "progress" ? /* @__PURE__ */ jsx311(ProgressCell, { value: liveProgress ?? row.progress ?? 0, barClass: tokens.chip }) : null
|
|
62845
63215
|
},
|
|
62846
63216
|
col.key
|
|
62847
63217
|
))
|
|
62848
63218
|
]
|
|
62849
63219
|
}
|
|
62850
63220
|
),
|
|
62851
|
-
/* @__PURE__ */
|
|
63221
|
+
/* @__PURE__ */ jsx311("div", { className: classNames120("relative min-w-0 flex-1 border-b", dividerClass), children: /* @__PURE__ */ jsx311("div", { className: classNames120("absolute inset-0", tokens.band) }) })
|
|
62852
63222
|
] });
|
|
62853
63223
|
};
|
|
62854
63224
|
var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, renderCell, liveProgress, liveRollup, rowProgress, dividerClass = "border-neutral-100 dark:border-neutral-800" }) => {
|
|
62855
63225
|
const t = useKitT();
|
|
62856
63226
|
const value = col.key === "name" ? task.name : col.key === "owner" ? task.owner : col.key === "progress" ? isGroup ? liveRollup ?? rowProgress ?? 0 : liveProgress ?? task.progress ?? 0 : task.values?.[col.key] ?? null;
|
|
62857
63227
|
const custom = col.key !== "name" && renderCell ? renderCell(value, task, col) : null;
|
|
62858
|
-
return /* @__PURE__ */
|
|
63228
|
+
return /* @__PURE__ */ jsx311(
|
|
62859
63229
|
"div",
|
|
62860
63230
|
{
|
|
62861
|
-
className:
|
|
63231
|
+
className: classNames120(
|
|
62862
63232
|
"flex shrink-0 items-center gap-1.5 overflow-hidden border-r px-2 text-[12.5px] last:border-r-0",
|
|
62863
63233
|
dividerClass
|
|
62864
63234
|
),
|
|
@@ -62866,50 +63236,50 @@ var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, render
|
|
|
62866
63236
|
width: col.width ?? "160px",
|
|
62867
63237
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
62868
63238
|
},
|
|
62869
|
-
children: first ? /* @__PURE__ */
|
|
62870
|
-
/* @__PURE__ */
|
|
63239
|
+
children: first ? /* @__PURE__ */ jsxs189(Fragment48, { children: [
|
|
63240
|
+
/* @__PURE__ */ jsx311("span", { className: "shrink-0", style: { width: depth * 14 + 18 }, children: isGroup && /* @__PURE__ */ jsx311(
|
|
62871
63241
|
"button",
|
|
62872
63242
|
{
|
|
62873
63243
|
type: "button",
|
|
62874
63244
|
className: "flex h-4 w-4 items-center justify-center rounded text-neutral-400 hover:bg-neutral-100 hover:text-neutral-600 focus-visible:ring-2 focus-visible:ring-neutral-400 dark:hover:bg-white/10 dark:hover:text-neutral-300",
|
|
62875
63245
|
onClick: () => onCaretClick(task.id, task.open !== false),
|
|
62876
63246
|
"aria-label": t(task.open === false ? "kit.gantt.expand" : "kit.gantt.collapse", { name: task.name }),
|
|
62877
|
-
children: /* @__PURE__ */
|
|
63247
|
+
children: /* @__PURE__ */ jsx311(ChevronRight, { className: classNames120("h-3 w-3 transition-transform", task.open !== false && "rotate-90") })
|
|
62878
63248
|
}
|
|
62879
63249
|
) }),
|
|
62880
|
-
isGroup && childCount > 0 ? /* @__PURE__ */
|
|
62881
|
-
/* @__PURE__ */
|
|
62882
|
-
/* @__PURE__ */
|
|
62883
|
-
] }) : /* @__PURE__ */
|
|
62884
|
-
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */
|
|
62885
|
-
/* @__PURE__ */
|
|
63250
|
+
isGroup && childCount > 0 ? /* @__PURE__ */ jsxs189("span", { className: "flex min-w-0 items-center gap-1 font-semibold text-neutral-800 dark:text-neutral-100", children: [
|
|
63251
|
+
/* @__PURE__ */ jsx311("span", { className: "truncate", children: task.name }),
|
|
63252
|
+
/* @__PURE__ */ jsx311("span", { className: "shrink-0 rounded-full bg-neutral-100 px-1 text-[10px] font-semibold text-neutral-500 dark:bg-white/10 dark:text-neutral-400", children: childCount })
|
|
63253
|
+
] }) : /* @__PURE__ */ jsx311("span", { className: "truncate font-medium text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63254
|
+
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */ jsxs189("span", { className: "flex min-w-0 items-center gap-1.5 text-neutral-600 dark:text-neutral-400", children: [
|
|
63255
|
+
/* @__PURE__ */ jsx311(
|
|
62886
63256
|
"span",
|
|
62887
63257
|
{
|
|
62888
|
-
className:
|
|
63258
|
+
className: classNames120(
|
|
62889
63259
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[8px] font-bold uppercase text-white",
|
|
62890
63260
|
getGanttBarTokens(task.color ?? "blue").fill
|
|
62891
63261
|
),
|
|
62892
63262
|
children: String(value).slice(0, 1)
|
|
62893
63263
|
}
|
|
62894
63264
|
),
|
|
62895
|
-
/* @__PURE__ */
|
|
62896
|
-
] }) : /* @__PURE__ */
|
|
63265
|
+
/* @__PURE__ */ jsx311("span", { className: "truncate", children: String(value) })
|
|
63266
|
+
] }) : /* @__PURE__ */ jsx311("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : col.kind === "progress" ? /* @__PURE__ */ jsx311(ProgressCell, { value: typeof value === "number" ? value : 0 }) : col.kind === "badge" ? task.badge != null ? /* @__PURE__ */ jsx311(
|
|
62897
63267
|
"span",
|
|
62898
63268
|
{
|
|
62899
|
-
className:
|
|
63269
|
+
className: classNames120(
|
|
62900
63270
|
"rounded-full px-1.5 py-0.5 text-[10px] font-semibold",
|
|
62901
63271
|
getGanttBarTokens(task.badgeColor ?? "neutral").fill,
|
|
62902
63272
|
"text-white"
|
|
62903
63273
|
),
|
|
62904
63274
|
children: task.badge
|
|
62905
63275
|
}
|
|
62906
|
-
) : /* @__PURE__ */
|
|
63276
|
+
) : /* @__PURE__ */ jsx311("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : custom != null ? custom : /* @__PURE__ */ jsx311("span", { className: "truncate text-neutral-600 dark:text-neutral-400", children: value == null || value === "" ? "\u2014" : String(value) })
|
|
62907
63277
|
}
|
|
62908
63278
|
);
|
|
62909
63279
|
};
|
|
62910
|
-
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */
|
|
62911
|
-
/* @__PURE__ */
|
|
62912
|
-
/* @__PURE__ */
|
|
63280
|
+
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */ jsxs189("span", { className: "flex w-full items-center gap-1.5", children: [
|
|
63281
|
+
/* @__PURE__ */ jsx311("span", { className: "h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-neutral-200/80 dark:bg-white/10", children: /* @__PURE__ */ jsx311("span", { className: classNames120("block h-full rounded-full", barClass), style: { width: `${Math.round(value * 100)}%` } }) }),
|
|
63282
|
+
/* @__PURE__ */ jsxs189("span", { className: "w-7 shrink-0 text-right text-[10px] font-semibold tabular-nums text-neutral-500 dark:text-neutral-400", children: [
|
|
62913
63283
|
Math.round(value * 100),
|
|
62914
63284
|
"%"
|
|
62915
63285
|
] })
|
|
@@ -62941,7 +63311,7 @@ var TaskBar = ({
|
|
|
62941
63311
|
const t = useKitT();
|
|
62942
63312
|
const milestone = task.type === "milestone";
|
|
62943
63313
|
const barColor = task.color ?? color;
|
|
62944
|
-
const tokens =
|
|
63314
|
+
const tokens = useMemo56(() => getGanttBarTokens(barColor), [barColor]);
|
|
62945
63315
|
const startMs = liveDates ? liveDates.start : toMs(task.start);
|
|
62946
63316
|
const endMs = liveDates ? liveDates.end : toMs(task.end);
|
|
62947
63317
|
const left = dateToX(startMs, rangeStart, zoom);
|
|
@@ -62966,7 +63336,7 @@ var TaskBar = ({
|
|
|
62966
63336
|
pct: progressPct
|
|
62967
63337
|
});
|
|
62968
63338
|
if (milestone) {
|
|
62969
|
-
return /* @__PURE__ */
|
|
63339
|
+
return /* @__PURE__ */ jsxs189(
|
|
62970
63340
|
"div",
|
|
62971
63341
|
{
|
|
62972
63342
|
role: "button",
|
|
@@ -62974,7 +63344,7 @@ var TaskBar = ({
|
|
|
62974
63344
|
"aria-label": ariaLabel,
|
|
62975
63345
|
title: ariaLabel,
|
|
62976
63346
|
"data-gantt-bar": task.id,
|
|
62977
|
-
className:
|
|
63347
|
+
className: classNames120(
|
|
62978
63348
|
"absolute z-10 flex cursor-pointer items-center gap-1.5 outline-none",
|
|
62979
63349
|
selected && selectionTokens.ring,
|
|
62980
63350
|
"rounded"
|
|
@@ -62984,13 +63354,13 @@ var TaskBar = ({
|
|
|
62984
63354
|
onClick: () => onSelect(task.id),
|
|
62985
63355
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
62986
63356
|
children: [
|
|
62987
|
-
/* @__PURE__ */
|
|
62988
|
-
/* @__PURE__ */
|
|
63357
|
+
/* @__PURE__ */ jsx311("span", { className: classNames120("h-3.5 w-3.5 shrink-0 rotate-45 rounded-[2px] shadow-sm", tokens.milestone) }),
|
|
63358
|
+
/* @__PURE__ */ jsx311("span", { className: "truncate text-[11px] font-semibold text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
62989
63359
|
]
|
|
62990
63360
|
}
|
|
62991
63361
|
);
|
|
62992
63362
|
}
|
|
62993
|
-
return /* @__PURE__ */
|
|
63363
|
+
return /* @__PURE__ */ jsxs189(
|
|
62994
63364
|
"div",
|
|
62995
63365
|
{
|
|
62996
63366
|
role: "button",
|
|
@@ -62998,7 +63368,7 @@ var TaskBar = ({
|
|
|
62998
63368
|
"aria-label": ariaLabel,
|
|
62999
63369
|
title: `${task.name} \xB7 ${formatDateTime(startMs, locale)} \u2192 ${formatDateTime(endMs, locale)} \xB7 ${progressPct}%`,
|
|
63000
63370
|
"data-gantt-bar": task.id,
|
|
63001
|
-
className:
|
|
63371
|
+
className: classNames120(
|
|
63002
63372
|
"group/bar absolute z-10 cursor-grab touch-none rounded-md shadow-sm outline-none transition-shadow active:cursor-grabbing",
|
|
63003
63373
|
tokens.base,
|
|
63004
63374
|
tokens.rim,
|
|
@@ -63015,17 +63385,17 @@ var TaskBar = ({
|
|
|
63015
63385
|
onClick: () => onSelect(task.id),
|
|
63016
63386
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63017
63387
|
children: [
|
|
63018
|
-
progress > 0 && /* @__PURE__ */
|
|
63388
|
+
progress > 0 && /* @__PURE__ */ jsx311(
|
|
63019
63389
|
"div",
|
|
63020
63390
|
{
|
|
63021
|
-
className:
|
|
63391
|
+
className: classNames120("absolute inset-y-0 left-0 rounded-l-md", tokens.progress),
|
|
63022
63392
|
style: { width: `${progress * 100}%` }
|
|
63023
63393
|
}
|
|
63024
63394
|
),
|
|
63025
|
-
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */
|
|
63395
|
+
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */ jsx311(
|
|
63026
63396
|
"div",
|
|
63027
63397
|
{
|
|
63028
|
-
className:
|
|
63398
|
+
className: classNames120(
|
|
63029
63399
|
"absolute inset-y-0 z-20 w-2 cursor-ew-resize touch-none opacity-0 transition-opacity group-hover/bar:opacity-100",
|
|
63030
63400
|
liveProgress != null && "opacity-100"
|
|
63031
63401
|
),
|
|
@@ -63033,10 +63403,10 @@ var TaskBar = ({
|
|
|
63033
63403
|
onPointerDown: (e) => onProgressPointerDown(task, e),
|
|
63034
63404
|
title: labels.progress,
|
|
63035
63405
|
"aria-hidden": "true",
|
|
63036
|
-
children: /* @__PURE__ */
|
|
63406
|
+
children: /* @__PURE__ */ jsx311("div", { className: "mx-auto h-full w-0.5 rounded-full bg-white/90" })
|
|
63037
63407
|
}
|
|
63038
63408
|
),
|
|
63039
|
-
liveProgress != null && /* @__PURE__ */
|
|
63409
|
+
liveProgress != null && /* @__PURE__ */ jsxs189(
|
|
63040
63410
|
"div",
|
|
63041
63411
|
{
|
|
63042
63412
|
className: "pointer-events-none absolute -top-5 z-30 -translate-x-1/2 rounded-full bg-neutral-900/90 px-1.5 py-px text-[10px] font-semibold tabular-nums text-white shadow-md",
|
|
@@ -63047,31 +63417,31 @@ var TaskBar = ({
|
|
|
63047
63417
|
]
|
|
63048
63418
|
}
|
|
63049
63419
|
),
|
|
63050
|
-
showName && (renderBar != null ? /* @__PURE__ */
|
|
63051
|
-
canEdit && /* @__PURE__ */
|
|
63052
|
-
/* @__PURE__ */
|
|
63420
|
+
showName && (renderBar != null ? /* @__PURE__ */ jsx311("div", { className: classNames120("pointer-events-none absolute inset-0 flex items-center px-1.5 text-[11px] font-medium", labelText), children: renderBar(task, { taskId: task.id, left, width, top, height: row.height, milestone: false }) }) : /* @__PURE__ */ jsx311("span", { className: classNames120("pointer-events-none absolute inset-0 flex items-center truncate px-1.5 text-[11px] font-medium", labelText), children: task.name })),
|
|
63421
|
+
canEdit && /* @__PURE__ */ jsxs189(Fragment48, { children: [
|
|
63422
|
+
/* @__PURE__ */ jsx311(
|
|
63053
63423
|
"div",
|
|
63054
63424
|
{
|
|
63055
63425
|
className: "absolute inset-y-0 -left-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63056
63426
|
onPointerDown: (e) => onResizePointerDown(task, "start", e),
|
|
63057
63427
|
title: t("kit.gantt.resizeStart"),
|
|
63058
63428
|
"aria-hidden": "true",
|
|
63059
|
-
children: /* @__PURE__ */
|
|
63429
|
+
children: /* @__PURE__ */ jsx311("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63060
63430
|
}
|
|
63061
63431
|
),
|
|
63062
|
-
/* @__PURE__ */
|
|
63432
|
+
/* @__PURE__ */ jsx311(
|
|
63063
63433
|
"div",
|
|
63064
63434
|
{
|
|
63065
63435
|
className: "absolute inset-y-0 -right-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63066
63436
|
onPointerDown: (e) => onResizePointerDown(task, "end", e),
|
|
63067
63437
|
title: t("kit.gantt.resizeEnd"),
|
|
63068
63438
|
"aria-hidden": "true",
|
|
63069
|
-
children: /* @__PURE__ */
|
|
63439
|
+
children: /* @__PURE__ */ jsx311("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63070
63440
|
}
|
|
63071
63441
|
)
|
|
63072
63442
|
] }),
|
|
63073
|
-
canEdit && /* @__PURE__ */
|
|
63074
|
-
/* @__PURE__ */
|
|
63443
|
+
canEdit && /* @__PURE__ */ jsxs189(Fragment48, { children: [
|
|
63444
|
+
/* @__PURE__ */ jsx311(
|
|
63075
63445
|
"button",
|
|
63076
63446
|
{
|
|
63077
63447
|
type: "button",
|
|
@@ -63082,7 +63452,7 @@ var TaskBar = ({
|
|
|
63082
63452
|
"aria-label": t("kit.gantt.linkFromStart", { task: task.name })
|
|
63083
63453
|
}
|
|
63084
63454
|
),
|
|
63085
|
-
/* @__PURE__ */
|
|
63455
|
+
/* @__PURE__ */ jsx311(
|
|
63086
63456
|
"button",
|
|
63087
63457
|
{
|
|
63088
63458
|
type: "button",
|
|
@@ -63100,9 +63470,9 @@ var TaskBar = ({
|
|
|
63100
63470
|
};
|
|
63101
63471
|
|
|
63102
63472
|
// src/components/Gantt/GanttToolbar.tsx
|
|
63103
|
-
import { useMemo as
|
|
63104
|
-
import
|
|
63105
|
-
import { jsx as
|
|
63473
|
+
import { useMemo as useMemo57 } from "react";
|
|
63474
|
+
import classNames121 from "classnames";
|
|
63475
|
+
import { jsx as jsx312, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
63106
63476
|
function nearestPreset(zoom, presets) {
|
|
63107
63477
|
let best = null;
|
|
63108
63478
|
let bestDist = Infinity;
|
|
@@ -63129,25 +63499,25 @@ var GanttToolbar = ({
|
|
|
63129
63499
|
Month: t("kit.gantt.zoomMonth"),
|
|
63130
63500
|
Quarter: t("kit.gantt.zoomQuarter")
|
|
63131
63501
|
};
|
|
63132
|
-
const active =
|
|
63133
|
-
const chrome =
|
|
63502
|
+
const active = useMemo57(() => nearestPreset(zoom, presets), [zoom, presets]);
|
|
63503
|
+
const chrome = useMemo57(
|
|
63134
63504
|
() => getSurfaceVariantClasses(variant, "neutral"),
|
|
63135
63505
|
[variant]
|
|
63136
63506
|
);
|
|
63137
|
-
return /* @__PURE__ */
|
|
63507
|
+
return /* @__PURE__ */ jsxs190(
|
|
63138
63508
|
"div",
|
|
63139
63509
|
{
|
|
63140
|
-
className:
|
|
63510
|
+
className: classNames121(
|
|
63141
63511
|
"pointer-events-auto flex items-center gap-1 rounded-lg p-1",
|
|
63142
63512
|
chrome
|
|
63143
63513
|
),
|
|
63144
63514
|
children: [
|
|
63145
|
-
/* @__PURE__ */
|
|
63515
|
+
/* @__PURE__ */ jsx312("div", { className: "flex items-center rounded-md bg-neutral-100 p-0.5 dark:bg-neutral-800", children: presets.map((p) => /* @__PURE__ */ jsx312(
|
|
63146
63516
|
"button",
|
|
63147
63517
|
{
|
|
63148
63518
|
type: "button",
|
|
63149
63519
|
onClick: () => onZoomTo(p.value),
|
|
63150
|
-
className:
|
|
63520
|
+
className: classNames121(
|
|
63151
63521
|
"rounded px-1.5 py-0.5 text-[10.5px] font-semibold transition-colors",
|
|
63152
63522
|
active === p.value ? "bg-white text-neutral-900 shadow-sm dark:bg-neutral-600 dark:text-white" : "text-neutral-500 hover:text-neutral-800 dark:text-neutral-400 dark:hover:text-neutral-200"
|
|
63153
63523
|
),
|
|
@@ -63155,9 +63525,9 @@ var GanttToolbar = ({
|
|
|
63155
63525
|
},
|
|
63156
63526
|
p.label
|
|
63157
63527
|
)) }),
|
|
63158
|
-
/* @__PURE__ */
|
|
63159
|
-
/* @__PURE__ */
|
|
63160
|
-
/* @__PURE__ */
|
|
63528
|
+
/* @__PURE__ */ jsx312("div", { className: "mx-0.5 h-4 w-px bg-neutral-200 dark:bg-neutral-700" }),
|
|
63529
|
+
/* @__PURE__ */ jsx312(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1 / 1.25), "aria-label": t("kit.gantt.zoomOut"), children: /* @__PURE__ */ jsx312("span", { className: "text-xs font-semibold leading-none", children: "\u2212" }) }),
|
|
63530
|
+
/* @__PURE__ */ jsx312(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1.25), "aria-label": t("kit.gantt.zoomIn"), children: /* @__PURE__ */ jsx312("span", { className: "text-xs font-semibold leading-none", children: "+" }) })
|
|
63161
63531
|
]
|
|
63162
63532
|
}
|
|
63163
63533
|
);
|
|
@@ -63165,7 +63535,7 @@ var GanttToolbar = ({
|
|
|
63165
63535
|
GanttToolbar.displayName = "GanttToolbar";
|
|
63166
63536
|
|
|
63167
63537
|
// src/components/Gantt/useGanttDrag.ts
|
|
63168
|
-
import { useCallback as useCallback41, useEffect as useEffect70, useMemo as
|
|
63538
|
+
import { useCallback as useCallback41, useEffect as useEffect70, useMemo as useMemo58, useRef as useRef67, useState as useState78 } from "react";
|
|
63169
63539
|
function useGanttDrag(opts) {
|
|
63170
63540
|
const [drag, setDrag] = useState78(null);
|
|
63171
63541
|
const [linkSelected, setLinkSelected] = useState78(null);
|
|
@@ -63483,7 +63853,7 @@ function useGanttDrag(opts) {
|
|
|
63483
63853
|
},
|
|
63484
63854
|
[beginDrag, timelineX, rowY]
|
|
63485
63855
|
);
|
|
63486
|
-
const rubber =
|
|
63856
|
+
const rubber = useMemo58(() => {
|
|
63487
63857
|
if (!drag || drag.kind !== "link") return null;
|
|
63488
63858
|
const source = barGeom(drag.taskId);
|
|
63489
63859
|
if (!source) return null;
|
|
@@ -63515,7 +63885,7 @@ function useGanttDrag(opts) {
|
|
|
63515
63885
|
}
|
|
63516
63886
|
|
|
63517
63887
|
// src/components/Gantt/Gantt.tsx
|
|
63518
|
-
import { jsx as
|
|
63888
|
+
import { jsx as jsx313, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
63519
63889
|
var HEADER_HEIGHT = 52;
|
|
63520
63890
|
var GRIP_WIDTH = 36;
|
|
63521
63891
|
var DEFAULT_COLUMNS = [
|
|
@@ -63574,7 +63944,7 @@ var Gantt = ({
|
|
|
63574
63944
|
const t = useKitT();
|
|
63575
63945
|
const kitEngine = useKitEngine();
|
|
63576
63946
|
const dateLocale = locale ?? kitEngine.locale;
|
|
63577
|
-
const allLabels =
|
|
63947
|
+
const allLabels = useMemo59(
|
|
63578
63948
|
() => ({
|
|
63579
63949
|
loading: t("kit.gantt.loading"),
|
|
63580
63950
|
empty: t("kit.gantt.empty"),
|
|
@@ -63597,7 +63967,7 @@ var Gantt = ({
|
|
|
63597
63967
|
title: c.key === "name" ? allLabels.task : c.key === "owner" ? t("kit.gantt.colOwner") : t("kit.gantt.colProgress")
|
|
63598
63968
|
}));
|
|
63599
63969
|
const interactive = editable ?? Boolean(onTasksChange || onLinksChange || onReorder);
|
|
63600
|
-
const surfaceText =
|
|
63970
|
+
const surfaceText = useMemo59(() => getSurfaceTextTokens(variant), [variant]);
|
|
63601
63971
|
const [internalZoom, setInternalZoom] = useState79(initialZoom);
|
|
63602
63972
|
const zoom = zoomProp ?? internalZoom;
|
|
63603
63973
|
const setZoom = useCallback42(
|
|
@@ -63660,30 +64030,30 @@ var Gantt = ({
|
|
|
63660
64030
|
return next;
|
|
63661
64031
|
});
|
|
63662
64032
|
}, []);
|
|
63663
|
-
const effectiveTasks =
|
|
64033
|
+
const effectiveTasks = useMemo59(() => {
|
|
63664
64034
|
let out = tasks;
|
|
63665
64035
|
if (collapsed.size > 0) {
|
|
63666
64036
|
out = out.map((t2) => collapsed.has(t2.id) ? { ...t2, open: false } : t2);
|
|
63667
64037
|
}
|
|
63668
64038
|
return out;
|
|
63669
64039
|
}, [tasks, collapsed]);
|
|
63670
|
-
const effectiveLanes =
|
|
64040
|
+
const effectiveLanes = useMemo59(() => {
|
|
63671
64041
|
if (closedLanes.size === 0) return lanes;
|
|
63672
64042
|
return (lanes ?? []).map(
|
|
63673
64043
|
(l) => closedLanes.has(l.id) ? { ...l, open: false } : l
|
|
63674
64044
|
);
|
|
63675
64045
|
}, [lanes, closedLanes]);
|
|
63676
|
-
const committedModel =
|
|
64046
|
+
const committedModel = useMemo59(
|
|
63677
64047
|
() => buildRows(effectiveTasks, effectiveLanes, rowOrder, rowHeight2),
|
|
63678
64048
|
[effectiveTasks, effectiveLanes, rowOrder, rowHeight2]
|
|
63679
64049
|
);
|
|
63680
|
-
const range =
|
|
64050
|
+
const range = useMemo59(() => {
|
|
63681
64051
|
const starts = tasks.map((t2) => toMs(t2.start));
|
|
63682
64052
|
const ends = tasks.map((t2) => toMs(t2.end));
|
|
63683
64053
|
return computeViewRange(starts, ends);
|
|
63684
64054
|
}, [tasks]);
|
|
63685
64055
|
const timelineWidth = rangeWidth(range.start, range.end, zoom);
|
|
63686
|
-
const scaleLevels =
|
|
64056
|
+
const scaleLevels = useMemo59(
|
|
63687
64057
|
() => buildTimeScale(range.start, range.end, zoom, dateLocale),
|
|
63688
64058
|
[range, zoom, dateLocale]
|
|
63689
64059
|
);
|
|
@@ -63700,7 +64070,7 @@ var Gantt = ({
|
|
|
63700
64070
|
const m = /^(\d+(?:\.\d+)?)px$/.exec(col.width ?? "");
|
|
63701
64071
|
return m ? Number(m[1]) : 160;
|
|
63702
64072
|
};
|
|
63703
|
-
const sizedColumns =
|
|
64073
|
+
const sizedColumns = useMemo59(
|
|
63704
64074
|
() => resolvedColumns.map((c) => ({ ...c, width: `${effectiveColWidth(c)}px` })),
|
|
63705
64075
|
[resolvedColumns, colWidths]
|
|
63706
64076
|
);
|
|
@@ -63708,7 +64078,7 @@ var Gantt = ({
|
|
|
63708
64078
|
effectiveWidthsRef.current = Object.fromEntries(
|
|
63709
64079
|
sizedColumns.map((c) => [c.key, effectiveColWidth(c)])
|
|
63710
64080
|
);
|
|
63711
|
-
const leftWidth =
|
|
64081
|
+
const leftWidth = useMemo59(
|
|
63712
64082
|
() => GRIP_WIDTH + resolvedColumns.reduce((sum, c) => sum + effectiveColWidth(c), 0),
|
|
63713
64083
|
[resolvedColumns, colWidths]
|
|
63714
64084
|
);
|
|
@@ -63817,12 +64187,12 @@ var Gantt = ({
|
|
|
63817
64187
|
rowOrder,
|
|
63818
64188
|
setSelected
|
|
63819
64189
|
});
|
|
63820
|
-
const liveReorder =
|
|
64190
|
+
const liveReorder = useMemo59(() => {
|
|
63821
64191
|
const d = dragApi.drag;
|
|
63822
64192
|
if (d?.kind !== "reorder" || d.beforeId === void 0) return null;
|
|
63823
64193
|
return applyRowReorder(effectiveTasks, d.taskId, d.beforeId, rowOrder);
|
|
63824
64194
|
}, [dragApi.drag, effectiveTasks, rowOrder]);
|
|
63825
|
-
const liveModel =
|
|
64195
|
+
const liveModel = useMemo59(
|
|
63826
64196
|
() => liveReorder ? buildRows(
|
|
63827
64197
|
liveReorder.tasks,
|
|
63828
64198
|
effectiveLanes,
|
|
@@ -63832,7 +64202,7 @@ var Gantt = ({
|
|
|
63832
64202
|
[liveReorder, effectiveLanes, rowHeight2, committedModel]
|
|
63833
64203
|
);
|
|
63834
64204
|
liveRowsRef.current = liveModel.rows;
|
|
63835
|
-
const bars =
|
|
64205
|
+
const bars = useMemo59(() => {
|
|
63836
64206
|
const map = /* @__PURE__ */ new Map();
|
|
63837
64207
|
for (const row of liveModel.rows) {
|
|
63838
64208
|
if (!row.task) continue;
|
|
@@ -63988,22 +64358,22 @@ var Gantt = ({
|
|
|
63988
64358
|
const drag = dragApi.drag;
|
|
63989
64359
|
const dragTask = drag?.taskId ? committedModel.tasksById.get(drag.taskId) : void 0;
|
|
63990
64360
|
const reorderLineY = drag?.kind === "reorder" && drag.beforeId !== void 0 ? reorderPreviewTop(liveModel.rows, `task:${drag.taskId}`, drag.beforeId) : null;
|
|
63991
|
-
const dragSubtree =
|
|
64361
|
+
const dragSubtree = useMemo59(() => {
|
|
63992
64362
|
if (dragApi.drag?.kind !== "reorder") return null;
|
|
63993
64363
|
return reorderDragSubtree(
|
|
63994
64364
|
liveModel.rows,
|
|
63995
64365
|
`task:${dragApi.drag.taskId}`
|
|
63996
64366
|
);
|
|
63997
64367
|
}, [dragApi.drag, liveModel.rows]);
|
|
63998
|
-
const dragSubtreeKeys =
|
|
64368
|
+
const dragSubtreeKeys = useMemo59(
|
|
63999
64369
|
() => new Set((dragSubtree ?? []).map((r) => r.key)),
|
|
64000
64370
|
[dragSubtree]
|
|
64001
64371
|
);
|
|
64002
|
-
const dragSubtreeHeight =
|
|
64372
|
+
const dragSubtreeHeight = useMemo59(
|
|
64003
64373
|
() => (dragSubtree ?? []).reduce((sum, r) => sum + r.height, 0),
|
|
64004
64374
|
[dragSubtree]
|
|
64005
64375
|
);
|
|
64006
|
-
const liveDragDates =
|
|
64376
|
+
const liveDragDates = useMemo59(() => {
|
|
64007
64377
|
if (!drag || !dragTask) return null;
|
|
64008
64378
|
if (drag.kind !== "move" && drag.kind !== "resize-start" && drag.kind !== "resize-end") return null;
|
|
64009
64379
|
return applyDragDates(
|
|
@@ -64014,7 +64384,7 @@ var Gantt = ({
|
|
|
64014
64384
|
);
|
|
64015
64385
|
}, [drag, dragTask, zoom, snap2]);
|
|
64016
64386
|
const liveDragProgress = drag?.kind === "progress" && drag.liveProgress != null ? drag.liveProgress : null;
|
|
64017
|
-
const dragOverride =
|
|
64387
|
+
const dragOverride = useMemo59(() => {
|
|
64018
64388
|
if (!drag || !dragTask) return null;
|
|
64019
64389
|
if (drag.kind === "progress" && drag.liveProgress != null) {
|
|
64020
64390
|
return { ...dragTask, progress: drag.liveProgress };
|
|
@@ -64024,11 +64394,11 @@ var Gantt = ({
|
|
|
64024
64394
|
}
|
|
64025
64395
|
return null;
|
|
64026
64396
|
}, [drag, dragTask, liveDragDates]);
|
|
64027
|
-
const liveLaneProgress =
|
|
64397
|
+
const liveLaneProgress = useMemo59(
|
|
64028
64398
|
() => dragOverride && dragTask ? laneRollupProgress(effectiveTasks, dragTask.id, dragOverride) : null,
|
|
64029
64399
|
[dragOverride, dragTask, effectiveTasks]
|
|
64030
64400
|
);
|
|
64031
|
-
const liveGroupProgress =
|
|
64401
|
+
const liveGroupProgress = useMemo59(() => {
|
|
64032
64402
|
if (!dragOverride || !dragTask) return null;
|
|
64033
64403
|
const byId = new Map(effectiveTasks.map((t2) => [t2.id, t2]));
|
|
64034
64404
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -64040,7 +64410,7 @@ var Gantt = ({
|
|
|
64040
64410
|
}
|
|
64041
64411
|
return m.size > 0 ? m : null;
|
|
64042
64412
|
}, [dragOverride, dragTask, effectiveTasks]);
|
|
64043
|
-
const liveLinkBars =
|
|
64413
|
+
const liveLinkBars = useMemo59(() => {
|
|
64044
64414
|
if (!liveDragDates || !dragTask) return bars;
|
|
64045
64415
|
const g = bars.get(dragTask.id);
|
|
64046
64416
|
if (!g) return bars;
|
|
@@ -64049,12 +64419,12 @@ var Gantt = ({
|
|
|
64049
64419
|
if (left === g.left && width === g.width) return bars;
|
|
64050
64420
|
return new Map(bars).set(dragTask.id, { ...g, left, width });
|
|
64051
64421
|
}, [bars, liveDragDates, dragTask, range, zoom]);
|
|
64052
|
-
const linkPaths =
|
|
64422
|
+
const linkPaths = useMemo59(
|
|
64053
64423
|
() => computeLinkPaths(links, liveLinkBars, color),
|
|
64054
64424
|
[links, liveLinkBars, color]
|
|
64055
64425
|
);
|
|
64056
|
-
const linkFan =
|
|
64057
|
-
return /* @__PURE__ */
|
|
64426
|
+
const linkFan = useMemo59(() => computeLinkFanOffsets(links, bars), [links, bars]);
|
|
64427
|
+
return /* @__PURE__ */ jsx313(
|
|
64058
64428
|
Panel_default,
|
|
64059
64429
|
{
|
|
64060
64430
|
ref: rootRef,
|
|
@@ -64072,31 +64442,31 @@ var Gantt = ({
|
|
|
64072
64442
|
"aria-label": t("kit.gantt.root"),
|
|
64073
64443
|
onKeyDown: onRootKeyDown,
|
|
64074
64444
|
onPointerDown: handleRootPointerDown,
|
|
64075
|
-
children: /* @__PURE__ */
|
|
64076
|
-
/* @__PURE__ */
|
|
64445
|
+
children: /* @__PURE__ */ jsxs191("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
64446
|
+
/* @__PURE__ */ jsxs191(
|
|
64077
64447
|
"div",
|
|
64078
64448
|
{
|
|
64079
|
-
className:
|
|
64449
|
+
className: classNames122(
|
|
64080
64450
|
"flex shrink-0 items-center gap-3 border-b px-4 py-3",
|
|
64081
64451
|
surfaceText.divider
|
|
64082
64452
|
),
|
|
64083
64453
|
children: [
|
|
64084
|
-
hasNode(icon) && /* @__PURE__ */
|
|
64454
|
+
hasNode(icon) && /* @__PURE__ */ jsx313(
|
|
64085
64455
|
"div",
|
|
64086
64456
|
{
|
|
64087
|
-
className:
|
|
64457
|
+
className: classNames122(
|
|
64088
64458
|
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
64089
64459
|
getSurfaceVariantClasses(variant, "neutral")
|
|
64090
64460
|
),
|
|
64091
64461
|
children: icon
|
|
64092
64462
|
}
|
|
64093
64463
|
),
|
|
64094
|
-
(title != null || subtitle != null) && /* @__PURE__ */
|
|
64095
|
-
subtitle != null && /* @__PURE__ */
|
|
64096
|
-
title != null && /* @__PURE__ */
|
|
64464
|
+
(title != null || subtitle != null) && /* @__PURE__ */ jsxs191("div", { className: "min-w-0 flex-1", children: [
|
|
64465
|
+
subtitle != null && /* @__PURE__ */ jsx313("div", { className: "truncate text-[11px] font-semibold uppercase tracking-wider text-neutral-500 dark:text-neutral-400", children: subtitle }),
|
|
64466
|
+
title != null && /* @__PURE__ */ jsx313("div", { className: "truncate text-lg font-semibold text-neutral-900 dark:text-white", children: title })
|
|
64097
64467
|
] }),
|
|
64098
|
-
hasNode(actions) && /* @__PURE__ */
|
|
64099
|
-
/* @__PURE__ */
|
|
64468
|
+
hasNode(actions) && /* @__PURE__ */ jsx313("div", { className: "flex shrink-0 items-center gap-2", children: actions }),
|
|
64469
|
+
/* @__PURE__ */ jsx313("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ jsx313(
|
|
64100
64470
|
GanttToolbar,
|
|
64101
64471
|
{
|
|
64102
64472
|
variant,
|
|
@@ -64109,31 +64479,31 @@ var Gantt = ({
|
|
|
64109
64479
|
]
|
|
64110
64480
|
}
|
|
64111
64481
|
),
|
|
64112
|
-
/* @__PURE__ */
|
|
64482
|
+
/* @__PURE__ */ jsxs191(
|
|
64113
64483
|
"div",
|
|
64114
64484
|
{
|
|
64115
|
-
className:
|
|
64485
|
+
className: classNames122(
|
|
64116
64486
|
"relative flex shrink-0 items-stretch border-b",
|
|
64117
64487
|
surfaceText.divider
|
|
64118
64488
|
),
|
|
64119
64489
|
style: { height: HEADER_HEIGHT },
|
|
64120
64490
|
children: [
|
|
64121
|
-
/* @__PURE__ */
|
|
64491
|
+
/* @__PURE__ */ jsxs191(
|
|
64122
64492
|
"div",
|
|
64123
64493
|
{
|
|
64124
|
-
className:
|
|
64494
|
+
className: classNames122(
|
|
64125
64495
|
"flex items-stretch border-r bg-white dark:bg-neutral-900",
|
|
64126
64496
|
surfaceText.divider
|
|
64127
64497
|
),
|
|
64128
64498
|
style: { width: leftWidth },
|
|
64129
64499
|
children: [
|
|
64130
|
-
/* @__PURE__ */
|
|
64500
|
+
/* @__PURE__ */ jsx313("div", { className: "w-9 shrink-0" }),
|
|
64131
64501
|
sizedColumns.map((col) => {
|
|
64132
64502
|
const resizable = resizableColumns && col.resizable !== false;
|
|
64133
|
-
return /* @__PURE__ */
|
|
64503
|
+
return /* @__PURE__ */ jsxs191(
|
|
64134
64504
|
"div",
|
|
64135
64505
|
{
|
|
64136
|
-
className:
|
|
64506
|
+
className: classNames122(
|
|
64137
64507
|
"relative flex shrink-0 items-center border-r px-2 text-[11px] font-semibold uppercase tracking-wide text-neutral-600 last:border-r-0 dark:text-neutral-400",
|
|
64138
64508
|
surfaceText.divider
|
|
64139
64509
|
),
|
|
@@ -64142,7 +64512,7 @@ var Gantt = ({
|
|
|
64142
64512
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
64143
64513
|
},
|
|
64144
64514
|
children: [
|
|
64145
|
-
/* @__PURE__ */
|
|
64515
|
+
/* @__PURE__ */ jsx313("span", { className: "truncate", children: col.title }),
|
|
64146
64516
|
resizable && /* Resize handle — Table's header-edge pattern: an 8px hit
|
|
64147
64517
|
area whose 1px line sits exactly on the column border.
|
|
64148
64518
|
Absolute insets stop at the padding edge (1px inside
|
|
@@ -64151,7 +64521,7 @@ var Gantt = ({
|
|
|
64151
64521
|
the border's own pixel. The cell carries no
|
|
64152
64522
|
overflow-hidden so the line can paint over the border
|
|
64153
64523
|
(the title span truncates itself). */
|
|
64154
|
-
/* @__PURE__ */
|
|
64524
|
+
/* @__PURE__ */ jsx313(
|
|
64155
64525
|
"div",
|
|
64156
64526
|
{
|
|
64157
64527
|
role: "separator",
|
|
@@ -64160,7 +64530,7 @@ var Gantt = ({
|
|
|
64160
64530
|
className: "group/rh absolute inset-y-0 -right-px z-10 flex w-2 cursor-col-resize select-none items-stretch justify-end",
|
|
64161
64531
|
onPointerDown: (e) => startColumnResize(e, col.key),
|
|
64162
64532
|
title: t("kit.gantt.resizeColumn", { column: col.title }),
|
|
64163
|
-
children: /* @__PURE__ */
|
|
64533
|
+
children: /* @__PURE__ */ jsx313(
|
|
64164
64534
|
"div",
|
|
64165
64535
|
{
|
|
64166
64536
|
className: "h-full w-px bg-neutral-300 transition-colors group-hover/rh:bg-neutral-400 dark:bg-neutral-600 dark:group-hover/rh:bg-neutral-500",
|
|
@@ -64177,30 +64547,30 @@ var Gantt = ({
|
|
|
64177
64547
|
]
|
|
64178
64548
|
}
|
|
64179
64549
|
),
|
|
64180
|
-
/* @__PURE__ */
|
|
64550
|
+
/* @__PURE__ */ jsx313("div", { className: "relative min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsxs191(
|
|
64181
64551
|
"div",
|
|
64182
64552
|
{
|
|
64183
64553
|
ref: headerScaleRef,
|
|
64184
64554
|
className: "relative h-full",
|
|
64185
64555
|
style: { width: timelineWidth },
|
|
64186
64556
|
children: [
|
|
64187
|
-
/* @__PURE__ */
|
|
64188
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */
|
|
64557
|
+
/* @__PURE__ */ jsx313(GanttScale, { levels: scaleLevels, height: HEADER_HEIGHT }),
|
|
64558
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ jsx313(
|
|
64189
64559
|
"div",
|
|
64190
64560
|
{
|
|
64191
|
-
className:
|
|
64561
|
+
className: classNames122(
|
|
64192
64562
|
"pointer-events-none absolute inset-y-0 z-[1] border-l-2",
|
|
64193
64563
|
todayTokens.line
|
|
64194
64564
|
),
|
|
64195
64565
|
style: { left: todayX }
|
|
64196
64566
|
}
|
|
64197
64567
|
),
|
|
64198
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */
|
|
64568
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ jsx313(
|
|
64199
64569
|
"div",
|
|
64200
64570
|
{
|
|
64201
64571
|
className: "pointer-events-none absolute top-1 z-10 -translate-x-1/2",
|
|
64202
64572
|
style: { left: todayX },
|
|
64203
|
-
children: /* @__PURE__ */
|
|
64573
|
+
children: /* @__PURE__ */ jsx313("span", { className: classNames122("rounded-full px-2 py-0.5 text-[10px] font-semibold text-white shadow-sm", todayTokens.chip), children: allLabels.today })
|
|
64204
64574
|
}
|
|
64205
64575
|
)
|
|
64206
64576
|
]
|
|
@@ -64209,20 +64579,20 @@ var Gantt = ({
|
|
|
64209
64579
|
]
|
|
64210
64580
|
}
|
|
64211
64581
|
),
|
|
64212
|
-
/* @__PURE__ */
|
|
64582
|
+
/* @__PURE__ */ jsx313(
|
|
64213
64583
|
"div",
|
|
64214
64584
|
{
|
|
64215
64585
|
ref: scrollRef,
|
|
64216
64586
|
className: `gantt-scroller min-h-0 flex-1 overflow-auto overscroll-contain [&::-webkit-scrollbar]:h-1.5 ${THIN_SCROLLBAR}`,
|
|
64217
64587
|
onScroll: syncHeaderScale,
|
|
64218
|
-
children: /* @__PURE__ */
|
|
64219
|
-
/* @__PURE__ */
|
|
64588
|
+
children: /* @__PURE__ */ jsx313("div", { style: { width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER, minWidth: "100%" }, children: loading ? /* @__PURE__ */ jsx313(GanttSkeleton, { rows: 12, rowHeight: rowHeight2, leftWidth }) : isEmpty2 ? /* @__PURE__ */ jsx313("div", { className: "flex items-center justify-center text-sm text-neutral-500", style: { height: bodyHeight || 160, width: leftWidth + timelineWidth }, children: emptyState ?? allLabels.empty }) : /* @__PURE__ */ jsxs191("div", { className: "relative", style: { height: bodyHeight }, children: [
|
|
64589
|
+
/* @__PURE__ */ jsxs191(
|
|
64220
64590
|
"div",
|
|
64221
64591
|
{
|
|
64222
64592
|
className: "pointer-events-none absolute inset-y-0 z-0",
|
|
64223
64593
|
style: { left: leftWidth, width: timelineWidth },
|
|
64224
64594
|
children: [
|
|
64225
|
-
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */
|
|
64595
|
+
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */ jsx313(
|
|
64226
64596
|
"div",
|
|
64227
64597
|
{
|
|
64228
64598
|
className: "absolute inset-y-0 border-r border-neutral-100 dark:border-neutral-800",
|
|
@@ -64230,10 +64600,10 @@ var Gantt = ({
|
|
|
64230
64600
|
},
|
|
64231
64601
|
c.id
|
|
64232
64602
|
)),
|
|
64233
|
-
todayVisible && /* @__PURE__ */
|
|
64603
|
+
todayVisible && /* @__PURE__ */ jsx313(
|
|
64234
64604
|
"div",
|
|
64235
64605
|
{
|
|
64236
|
-
className:
|
|
64606
|
+
className: classNames122("absolute inset-y-0 border-l-2", todayTokens.line),
|
|
64237
64607
|
style: { left: todayX }
|
|
64238
64608
|
}
|
|
64239
64609
|
)
|
|
@@ -64243,7 +64613,7 @@ var Gantt = ({
|
|
|
64243
64613
|
liveModel.rows.map((row) => {
|
|
64244
64614
|
const isDragSource = drag?.kind === "reorder" && row.task != null && row.task.id === drag.taskId;
|
|
64245
64615
|
if (isDragSource) {
|
|
64246
|
-
return /* @__PURE__ */
|
|
64616
|
+
return /* @__PURE__ */ jsx313(
|
|
64247
64617
|
"div",
|
|
64248
64618
|
{
|
|
64249
64619
|
"data-row-key": row.key,
|
|
@@ -64251,7 +64621,7 @@ var Gantt = ({
|
|
|
64251
64621
|
"aria-hidden": "true",
|
|
64252
64622
|
className: "pointer-events-none flex border-b",
|
|
64253
64623
|
style: { height: dragSubtreeHeight || row.height },
|
|
64254
|
-
children: /* @__PURE__ */
|
|
64624
|
+
children: /* @__PURE__ */ jsx313(
|
|
64255
64625
|
"div",
|
|
64256
64626
|
{
|
|
64257
64627
|
className: "m-1 flex-1 rounded-md border-2 border-dashed",
|
|
@@ -64268,7 +64638,7 @@ var Gantt = ({
|
|
|
64268
64638
|
if (drag?.kind === "reorder" && dragSubtreeKeys.has(row.key)) {
|
|
64269
64639
|
return null;
|
|
64270
64640
|
}
|
|
64271
|
-
return /* @__PURE__ */
|
|
64641
|
+
return /* @__PURE__ */ jsx313(
|
|
64272
64642
|
GanttBodyRow,
|
|
64273
64643
|
{
|
|
64274
64644
|
row,
|
|
@@ -64306,7 +64676,7 @@ var Gantt = ({
|
|
|
64306
64676
|
row.key
|
|
64307
64677
|
);
|
|
64308
64678
|
}),
|
|
64309
|
-
/* @__PURE__ */
|
|
64679
|
+
/* @__PURE__ */ jsx313(
|
|
64310
64680
|
GanttLinkLayer,
|
|
64311
64681
|
{
|
|
64312
64682
|
ref: overlayRef,
|
|
@@ -64322,7 +64692,7 @@ var Gantt = ({
|
|
|
64322
64692
|
onDeleteLink: interactive && onLinksChange ? deleteSelectedLink : void 0
|
|
64323
64693
|
}
|
|
64324
64694
|
),
|
|
64325
|
-
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */
|
|
64695
|
+
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */ jsx313(
|
|
64326
64696
|
"div",
|
|
64327
64697
|
{
|
|
64328
64698
|
className: "pointer-events-none absolute z-30 h-0.5 rounded-full",
|
|
@@ -64342,7 +64712,7 @@ var Gantt = ({
|
|
|
64342
64712
|
// there is no filtered/overflowing ancestor and the fixed
|
|
64343
64713
|
// clone always tracks the viewport pointer.
|
|
64344
64714
|
createPortal15(
|
|
64345
|
-
/* @__PURE__ */
|
|
64715
|
+
/* @__PURE__ */ jsx313(
|
|
64346
64716
|
"div",
|
|
64347
64717
|
{
|
|
64348
64718
|
"data-gantt-drag-clone": "true",
|
|
@@ -64353,14 +64723,14 @@ var Gantt = ({
|
|
|
64353
64723
|
top: drag.clientY - (drag.grabOffset?.y ?? 0),
|
|
64354
64724
|
width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER
|
|
64355
64725
|
},
|
|
64356
|
-
children: /* @__PURE__ */
|
|
64726
|
+
children: /* @__PURE__ */ jsx313(
|
|
64357
64727
|
"div",
|
|
64358
64728
|
{
|
|
64359
64729
|
className: "overflow-hidden rounded-lg bg-white/95 shadow-2xl backdrop-blur-sm dark:bg-neutral-900/95",
|
|
64360
64730
|
style: {
|
|
64361
64731
|
boxShadow: `0 8px 32px rgba(0, 0, 0, 0.28), inset 2px 0 0 var(--color-${color}-500)`
|
|
64362
64732
|
},
|
|
64363
|
-
children: dragSubtree.map((row) => /* @__PURE__ */
|
|
64733
|
+
children: dragSubtree.map((row) => /* @__PURE__ */ jsx313(
|
|
64364
64734
|
GanttBodyRow,
|
|
64365
64735
|
{
|
|
64366
64736
|
row,
|
|
@@ -64403,7 +64773,7 @@ var Gantt = ({
|
|
|
64403
64773
|
),
|
|
64404
64774
|
document.body
|
|
64405
64775
|
),
|
|
64406
|
-
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */
|
|
64776
|
+
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */ jsx313(
|
|
64407
64777
|
"div",
|
|
64408
64778
|
{
|
|
64409
64779
|
className: "pointer-events-none absolute z-50 rounded-md bg-neutral-900/90 px-2 py-1 text-[11px] font-medium text-white shadow-lg dark:bg-neutral-700/95",
|
|
@@ -64434,13 +64804,13 @@ var GanttSkeleton = ({
|
|
|
64434
64804
|
rows,
|
|
64435
64805
|
rowHeight: rowHeight2,
|
|
64436
64806
|
leftWidth
|
|
64437
|
-
}) => /* @__PURE__ */
|
|
64438
|
-
/* @__PURE__ */
|
|
64807
|
+
}) => /* @__PURE__ */ jsx313("div", { className: "animate-pulse", "aria-busy": "true", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxs191("div", { className: "flex", style: { height: rowHeight2 }, children: [
|
|
64808
|
+
/* @__PURE__ */ jsx313(
|
|
64439
64809
|
"div",
|
|
64440
64810
|
{
|
|
64441
64811
|
className: "sticky left-0 flex items-center border-b border-neutral-100 bg-white px-3 dark:border-neutral-800 dark:bg-neutral-900",
|
|
64442
64812
|
style: { width: leftWidth },
|
|
64443
|
-
children: /* @__PURE__ */
|
|
64813
|
+
children: /* @__PURE__ */ jsx313(
|
|
64444
64814
|
"div",
|
|
64445
64815
|
{
|
|
64446
64816
|
className: "h-3 rounded-full bg-neutral-200 dark:bg-neutral-700",
|
|
@@ -64449,7 +64819,7 @@ var GanttSkeleton = ({
|
|
|
64449
64819
|
)
|
|
64450
64820
|
}
|
|
64451
64821
|
),
|
|
64452
|
-
/* @__PURE__ */
|
|
64822
|
+
/* @__PURE__ */ jsx313("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx313(
|
|
64453
64823
|
"div",
|
|
64454
64824
|
{
|
|
64455
64825
|
className: "absolute top-1/2 h-4 -translate-y-1/2 rounded-md bg-neutral-200/80 dark:bg-neutral-700/60",
|
|
@@ -64467,13 +64837,13 @@ import {
|
|
|
64467
64837
|
useCallback as useCallback43,
|
|
64468
64838
|
useContext as useContext8,
|
|
64469
64839
|
useEffect as useEffect72,
|
|
64470
|
-
useMemo as
|
|
64840
|
+
useMemo as useMemo60,
|
|
64471
64841
|
useRef as useRef69,
|
|
64472
64842
|
useState as useState80
|
|
64473
64843
|
} from "react";
|
|
64474
64844
|
import { createPortal as createPortal16 } from "react-dom";
|
|
64475
|
-
import
|
|
64476
|
-
import { jsx as
|
|
64845
|
+
import classNames123 from "classnames";
|
|
64846
|
+
import { jsx as jsx314, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
64477
64847
|
var BottomSheetContext = createContext8(null);
|
|
64478
64848
|
var TRANSITION_MS2 = 260;
|
|
64479
64849
|
var renderSlot = (slot, controls) => {
|
|
@@ -64527,13 +64897,13 @@ var BottomSheetProvider = ({
|
|
|
64527
64897
|
},
|
|
64528
64898
|
[]
|
|
64529
64899
|
);
|
|
64530
|
-
const controls =
|
|
64900
|
+
const controls = useMemo60(
|
|
64531
64901
|
() => ({
|
|
64532
64902
|
dismiss: dismissSheet
|
|
64533
64903
|
}),
|
|
64534
64904
|
[dismissSheet]
|
|
64535
64905
|
);
|
|
64536
|
-
const contextValue =
|
|
64906
|
+
const contextValue = useMemo60(
|
|
64537
64907
|
() => ({
|
|
64538
64908
|
presentSheet,
|
|
64539
64909
|
dismissSheet,
|
|
@@ -64543,11 +64913,11 @@ var BottomSheetProvider = ({
|
|
|
64543
64913
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
64544
64914
|
);
|
|
64545
64915
|
const overlayNode = typeof document !== "undefined" && sheet ? createPortal16(
|
|
64546
|
-
/* @__PURE__ */
|
|
64547
|
-
/* @__PURE__ */
|
|
64916
|
+
/* @__PURE__ */ jsxs192("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
64917
|
+
/* @__PURE__ */ jsx314(
|
|
64548
64918
|
"div",
|
|
64549
64919
|
{
|
|
64550
|
-
className:
|
|
64920
|
+
className: classNames123(
|
|
64551
64921
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
64552
64922
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
64553
64923
|
),
|
|
@@ -64557,24 +64927,24 @@ var BottomSheetProvider = ({
|
|
|
64557
64927
|
}
|
|
64558
64928
|
}
|
|
64559
64929
|
),
|
|
64560
|
-
/* @__PURE__ */
|
|
64930
|
+
/* @__PURE__ */ jsx314("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ jsxs192(
|
|
64561
64931
|
"section",
|
|
64562
64932
|
{
|
|
64563
64933
|
role: "dialog",
|
|
64564
64934
|
"aria-modal": "true",
|
|
64565
|
-
className:
|
|
64935
|
+
className: classNames123(
|
|
64566
64936
|
"pointer-events-auto ml-auto flex w-full flex-col rounded-t-3xl border border-slate-200 bg-white shadow-2xl transition-transform duration-300 dark:border-slate-700 dark:bg-slate-900",
|
|
64567
64937
|
sheet.className,
|
|
64568
64938
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
64569
64939
|
),
|
|
64570
64940
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
64571
64941
|
children: [
|
|
64572
|
-
/* @__PURE__ */
|
|
64573
|
-
/* @__PURE__ */
|
|
64574
|
-
sheet.title && /* @__PURE__ */
|
|
64575
|
-
sheet.description && /* @__PURE__ */
|
|
64942
|
+
/* @__PURE__ */ jsxs192("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
64943
|
+
/* @__PURE__ */ jsxs192("div", { className: "space-y-1", children: [
|
|
64944
|
+
sheet.title && /* @__PURE__ */ jsx314("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
64945
|
+
sheet.description && /* @__PURE__ */ jsx314("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
64576
64946
|
] }),
|
|
64577
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */
|
|
64947
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ jsx314(
|
|
64578
64948
|
IconButton_default,
|
|
64579
64949
|
{
|
|
64580
64950
|
icon: "Close",
|
|
@@ -64586,15 +64956,15 @@ var BottomSheetProvider = ({
|
|
|
64586
64956
|
}
|
|
64587
64957
|
)
|
|
64588
64958
|
] }),
|
|
64589
|
-
/* @__PURE__ */
|
|
64590
|
-
sheet.actions && /* @__PURE__ */
|
|
64959
|
+
/* @__PURE__ */ jsx314("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ jsx314("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
64960
|
+
sheet.actions && /* @__PURE__ */ jsx314("div", { className: "flex flex-wrap items-center justify-end gap-3 border-t border-slate-200 px-6 py-4 dark:border-slate-800", children: renderSlot(sheet.actions, controls) })
|
|
64591
64961
|
]
|
|
64592
64962
|
}
|
|
64593
64963
|
) })
|
|
64594
64964
|
] }),
|
|
64595
64965
|
document.body
|
|
64596
64966
|
) : null;
|
|
64597
|
-
return /* @__PURE__ */
|
|
64967
|
+
return /* @__PURE__ */ jsxs192(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
64598
64968
|
children,
|
|
64599
64969
|
overlayNode
|
|
64600
64970
|
] });
|
|
@@ -65234,8 +65604,8 @@ var SYSTEM_VARIABLES = [
|
|
|
65234
65604
|
];
|
|
65235
65605
|
|
|
65236
65606
|
// src/components/MetricBar.tsx
|
|
65237
|
-
import
|
|
65238
|
-
import { jsx as
|
|
65607
|
+
import classNames124 from "classnames";
|
|
65608
|
+
import { jsx as jsx315 } from "react/jsx-runtime";
|
|
65239
65609
|
var MetricBar = ({
|
|
65240
65610
|
label,
|
|
65241
65611
|
value,
|
|
@@ -65245,7 +65615,7 @@ var MetricBar = ({
|
|
|
65245
65615
|
size = "sm",
|
|
65246
65616
|
className,
|
|
65247
65617
|
...rest
|
|
65248
|
-
}) => /* @__PURE__ */
|
|
65618
|
+
}) => /* @__PURE__ */ jsx315(
|
|
65249
65619
|
Progress_default,
|
|
65250
65620
|
{
|
|
65251
65621
|
...rest,
|
|
@@ -65255,7 +65625,7 @@ var MetricBar = ({
|
|
|
65255
65625
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
65256
65626
|
size,
|
|
65257
65627
|
color: tone ?? color ?? "blue",
|
|
65258
|
-
className:
|
|
65628
|
+
className: classNames124("w-full", className)
|
|
65259
65629
|
}
|
|
65260
65630
|
);
|
|
65261
65631
|
MetricBar.displayName = "MetricBar";
|
|
@@ -65576,6 +65946,9 @@ export {
|
|
|
65576
65946
|
WorkflowRailSkeleton,
|
|
65577
65947
|
WorkflowStatusNode_default as WorkflowStatusNode,
|
|
65578
65948
|
WorkflowTracker_default as WorkflowTracker,
|
|
65949
|
+
WorkflowTrackerDetails_default as WorkflowTrackerDetails,
|
|
65950
|
+
WorkflowTrackerRail_default as WorkflowTrackerRail,
|
|
65951
|
+
WorkflowTrackerStepDetails_default as WorkflowTrackerStepDetails,
|
|
65579
65952
|
areaPathFromPoints,
|
|
65580
65953
|
bandAreaPath,
|
|
65581
65954
|
buildColumns,
|