@cjlapao/ui-kit 0.2.4 → 0.2.5
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/{CapsuleBlueprint-DwDZ7nii.d.cts → CapsuleBlueprint-BI0jdbTt.d.cts} +16 -1
- package/dist/{CapsuleBlueprint-DwDZ7nii.d.ts → CapsuleBlueprint-BI0jdbTt.d.ts} +16 -1
- package/dist/index.cjs +709 -640
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -0
- package/dist/index.d.cts +70 -12
- package/dist/index.d.ts +70 -12
- package/dist/index.js +643 -578
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5338,6 +5338,15 @@ var getSurfacePaddingClass = (padding) => surfacePaddingClasses[padding] ?? surf
|
|
|
5338
5338
|
var getSurfacePaddingClasses = () => ({
|
|
5339
5339
|
...surfacePaddingClasses
|
|
5340
5340
|
});
|
|
5341
|
+
var SURFACE_GUTTER_AXES = ["top", "right", "bottom", "left"];
|
|
5342
|
+
var surfaceGutterClasses = {
|
|
5343
|
+
top: { none: "mt-0", xs: "mt-2", sm: "mt-4", md: "mt-6", lg: "mt-8", xl: "mt-10" },
|
|
5344
|
+
right: { none: "mr-0", xs: "mr-2", sm: "mr-4", md: "mr-6", lg: "mr-8", xl: "mr-10" },
|
|
5345
|
+
bottom: { none: "mb-0", xs: "mb-2", sm: "mb-4", md: "mb-6", lg: "mb-8", xl: "mb-10" },
|
|
5346
|
+
left: { none: "ml-0", xs: "ml-2", sm: "ml-4", md: "ml-6", lg: "ml-8", xl: "ml-10" }
|
|
5347
|
+
};
|
|
5348
|
+
var DEFAULT_SURFACE_GUTTER = "none";
|
|
5349
|
+
var getSurfaceGutterClass = (axis, gutter) => surfaceGutterClasses[axis][gutter] ?? surfaceGutterClasses[axis][DEFAULT_SURFACE_GUTTER];
|
|
5341
5350
|
var NEUTRAL_TONES = [
|
|
5342
5351
|
"neutral",
|
|
5343
5352
|
"slate",
|
|
@@ -21519,10 +21528,23 @@ var PageHeader = ({
|
|
|
21519
21528
|
children,
|
|
21520
21529
|
variant = "default",
|
|
21521
21530
|
accentColor = "blue",
|
|
21531
|
+
padding,
|
|
21532
|
+
paddingTop,
|
|
21533
|
+
paddingRight,
|
|
21534
|
+
paddingBottom,
|
|
21535
|
+
paddingLeft,
|
|
21536
|
+
corner = DEFAULT_SURFACE_CORNER,
|
|
21522
21537
|
className = "",
|
|
21523
21538
|
...rest
|
|
21524
21539
|
}) => {
|
|
21525
21540
|
const surface = variant === "default" ? null : getSidebarSurfaceTokens(variant, accentColor);
|
|
21541
|
+
const pair = surface ? "xs" : "none";
|
|
21542
|
+
const gutter = {
|
|
21543
|
+
top: paddingTop ?? padding ?? pair,
|
|
21544
|
+
right: paddingRight ?? padding ?? pair,
|
|
21545
|
+
bottom: paddingBottom ?? padding ?? "none",
|
|
21546
|
+
left: paddingLeft ?? padding ?? "none"
|
|
21547
|
+
};
|
|
21526
21548
|
return /* @__PURE__ */ jsxs97(
|
|
21527
21549
|
"header",
|
|
21528
21550
|
{
|
|
@@ -21530,9 +21552,12 @@ var PageHeader = ({
|
|
|
21530
21552
|
className: classNames51(
|
|
21531
21553
|
"flex w-full items-center justify-between gap-4 px-5",
|
|
21532
21554
|
SIDE_MENU_HEADER_HEIGHT,
|
|
21555
|
+
getSurfaceGutterClass("top", gutter.top),
|
|
21556
|
+
getSurfaceGutterClass("right", gutter.right),
|
|
21557
|
+
getSurfaceGutterClass("bottom", gutter.bottom),
|
|
21558
|
+
getSurfaceGutterClass("left", gutter.left),
|
|
21559
|
+
getSurfaceCornerClass(corner),
|
|
21533
21560
|
surface ? classNames51(
|
|
21534
|
-
surface.offset,
|
|
21535
|
-
surface.radius,
|
|
21536
21561
|
"border",
|
|
21537
21562
|
surface.border,
|
|
21538
21563
|
surface.shadow,
|
|
@@ -59840,14 +59865,97 @@ var TreeView = ({
|
|
|
59840
59865
|
var TreeView_default = TreeView;
|
|
59841
59866
|
|
|
59842
59867
|
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
59843
|
-
import { useMemo as
|
|
59844
|
-
import
|
|
59868
|
+
import { useMemo as useMemo56 } from "react";
|
|
59869
|
+
import classNames119 from "classnames";
|
|
59845
59870
|
|
|
59846
|
-
// src/components/WorkflowTracker/
|
|
59847
|
-
import
|
|
59871
|
+
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
59872
|
+
import { useMemo as useMemo52 } from "react";
|
|
59873
|
+
import classNames112 from "classnames";
|
|
59848
59874
|
|
|
59849
|
-
// src/components/WorkflowTracker/
|
|
59875
|
+
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
59876
|
+
import React87 from "react";
|
|
59877
|
+
import classNames111 from "classnames";
|
|
59878
|
+
|
|
59879
|
+
// src/components/WorkflowTracker/WorkflowSkeleton.tsx
|
|
59850
59880
|
import classNames107 from "classnames";
|
|
59881
|
+
import { jsx as jsx296, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
59882
|
+
var Bar3 = ({
|
|
59883
|
+
width,
|
|
59884
|
+
className
|
|
59885
|
+
}) => /* @__PURE__ */ jsx296(
|
|
59886
|
+
"span",
|
|
59887
|
+
{
|
|
59888
|
+
className: classNames107(
|
|
59889
|
+
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
59890
|
+
className
|
|
59891
|
+
),
|
|
59892
|
+
style: { width }
|
|
59893
|
+
}
|
|
59894
|
+
);
|
|
59895
|
+
var Dot = () => /* @__PURE__ */ jsx296("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
59896
|
+
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: [
|
|
59897
|
+
/* @__PURE__ */ jsxs179("div", { className: "flex items-center gap-3", children: [
|
|
59898
|
+
hasIcon && /* @__PURE__ */ jsx296(
|
|
59899
|
+
Bar3,
|
|
59900
|
+
{
|
|
59901
|
+
width: "3rem",
|
|
59902
|
+
className: classNames107("h-12", getSurfaceCornerClass(iconCorner))
|
|
59903
|
+
}
|
|
59904
|
+
),
|
|
59905
|
+
/* @__PURE__ */ jsxs179("div", { className: "space-y-3", children: [
|
|
59906
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "11rem", className: "h-2" }),
|
|
59907
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "16rem", className: "h-6" })
|
|
59908
|
+
] })
|
|
59909
|
+
] }),
|
|
59910
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
59911
|
+
] });
|
|
59912
|
+
var WorkflowRailSkeleton = ({
|
|
59913
|
+
rows = 6
|
|
59914
|
+
}) => /* @__PURE__ */ jsxs179("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
59915
|
+
/* @__PURE__ */ jsxs179("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
59916
|
+
/* @__PURE__ */ jsxs179("div", { className: "flex items-center justify-between", children: [
|
|
59917
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "4.5rem" }),
|
|
59918
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "2rem" })
|
|
59919
|
+
] }),
|
|
59920
|
+
/* @__PURE__ */ jsx296("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
59921
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "80%", className: "mt-3" })
|
|
59922
|
+
] }),
|
|
59923
|
+
/* @__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: [
|
|
59924
|
+
/* @__PURE__ */ jsx296(Dot, {}),
|
|
59925
|
+
/* @__PURE__ */ jsxs179("div", { className: "flex-1 space-y-2", children: [
|
|
59926
|
+
/* @__PURE__ */ jsx296(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
59927
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "34%", className: "h-2" })
|
|
59928
|
+
] })
|
|
59929
|
+
] }, index)) })
|
|
59930
|
+
] });
|
|
59931
|
+
var WorkflowDetailSkeleton = () => /* @__PURE__ */ jsxs179("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
59932
|
+
/* @__PURE__ */ jsxs179("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
59933
|
+
/* @__PURE__ */ jsxs179("div", { className: "flex items-center justify-between", children: [
|
|
59934
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "6rem" }),
|
|
59935
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "4rem" })
|
|
59936
|
+
] }),
|
|
59937
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "45%", className: "h-5" }),
|
|
59938
|
+
/* @__PURE__ */ jsxs179("div", { className: "space-y-2", children: [
|
|
59939
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "92%", className: "h-2" }),
|
|
59940
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "70%", className: "h-2" })
|
|
59941
|
+
] }),
|
|
59942
|
+
/* @__PURE__ */ jsxs179("div", { className: "flex gap-10 pt-2", children: [
|
|
59943
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "5rem" }),
|
|
59944
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "6rem" }),
|
|
59945
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "4rem" })
|
|
59946
|
+
] })
|
|
59947
|
+
] }),
|
|
59948
|
+
/* @__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" }) }),
|
|
59949
|
+
/* @__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: [
|
|
59950
|
+
/* @__PURE__ */ jsx296(Dot, {}),
|
|
59951
|
+
/* @__PURE__ */ jsx296(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
59952
|
+
/* @__PURE__ */ jsx296("span", { className: "flex-1" }),
|
|
59953
|
+
/* @__PURE__ */ jsx296(Bar3, { width: "3rem" })
|
|
59954
|
+
] }, index)) })
|
|
59955
|
+
] });
|
|
59956
|
+
|
|
59957
|
+
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
59958
|
+
import classNames108 from "classnames";
|
|
59851
59959
|
|
|
59852
59960
|
// src/components/WorkflowTracker/surfaces.ts
|
|
59853
59961
|
var isTranslucentVariant = (variant) => getSurfaceTextTokens(variant).translucent;
|
|
@@ -59985,13 +60093,13 @@ var getStatusTokens = (status, palette) => {
|
|
|
59985
60093
|
};
|
|
59986
60094
|
|
|
59987
60095
|
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
59988
|
-
import { jsx as
|
|
60096
|
+
import { jsx as jsx297, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
59989
60097
|
var sizeTokens11 = {
|
|
59990
60098
|
sm: { node: "h-4 w-4", glyph: "h-2.5 w-2.5" },
|
|
59991
60099
|
md: { node: "h-5 w-5", glyph: "h-3 w-3" },
|
|
59992
60100
|
lg: { node: "h-9 w-9", glyph: "h-5 w-5" }
|
|
59993
60101
|
};
|
|
59994
|
-
var DashedRing = ({ className }) => /* @__PURE__ */
|
|
60102
|
+
var DashedRing = ({ className }) => /* @__PURE__ */ jsx297("svg", { viewBox: "0 0 20 20", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx297(
|
|
59995
60103
|
"circle",
|
|
59996
60104
|
{
|
|
59997
60105
|
cx: "10",
|
|
@@ -60004,7 +60112,7 @@ var DashedRing = ({ className }) => /* @__PURE__ */ jsx296("svg", { viewBox: "0
|
|
|
60004
60112
|
strokeLinecap: "round"
|
|
60005
60113
|
}
|
|
60006
60114
|
) });
|
|
60007
|
-
var AlertGlyph = ({ className }) => /* @__PURE__ */
|
|
60115
|
+
var AlertGlyph = ({ className }) => /* @__PURE__ */ jsx297("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx297(
|
|
60008
60116
|
"path",
|
|
60009
60117
|
{
|
|
60010
60118
|
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",
|
|
@@ -60019,33 +60127,33 @@ var WorkflowStatusNode = ({
|
|
|
60019
60127
|
}) => {
|
|
60020
60128
|
const tokens = getStatusTokens(status, palette);
|
|
60021
60129
|
const { node, glyph } = sizeTokens11[size];
|
|
60022
|
-
return /* @__PURE__ */
|
|
60130
|
+
return /* @__PURE__ */ jsxs180(
|
|
60023
60131
|
"span",
|
|
60024
60132
|
{
|
|
60025
60133
|
"aria-hidden": "true",
|
|
60026
|
-
className:
|
|
60134
|
+
className: classNames108("relative inline-flex shrink-0", node, className),
|
|
60027
60135
|
children: [
|
|
60028
|
-
tokens.pulse && /* @__PURE__ */
|
|
60136
|
+
tokens.pulse && /* @__PURE__ */ jsx297(
|
|
60029
60137
|
"span",
|
|
60030
60138
|
{
|
|
60031
|
-
className:
|
|
60139
|
+
className: classNames108(
|
|
60032
60140
|
"absolute inset-0 animate-ping rounded-full opacity-60 motion-reduce:hidden",
|
|
60033
60141
|
`bg-${tokens.tone}-300 dark:bg-${tokens.tone}-500`
|
|
60034
60142
|
)
|
|
60035
60143
|
}
|
|
60036
60144
|
),
|
|
60037
|
-
/* @__PURE__ */
|
|
60145
|
+
/* @__PURE__ */ jsxs180(
|
|
60038
60146
|
"span",
|
|
60039
60147
|
{
|
|
60040
|
-
className:
|
|
60148
|
+
className: classNames108(
|
|
60041
60149
|
"relative inline-flex h-full w-full items-center justify-center rounded-full",
|
|
60042
60150
|
tokens.node
|
|
60043
60151
|
),
|
|
60044
60152
|
children: [
|
|
60045
|
-
tokens.glyph === "check" && /* @__PURE__ */
|
|
60046
|
-
tokens.glyph === "pause" && /* @__PURE__ */
|
|
60047
|
-
tokens.glyph === "alert" && /* @__PURE__ */
|
|
60048
|
-
tokens.glyph === "dashed" && /* @__PURE__ */
|
|
60153
|
+
tokens.glyph === "check" && /* @__PURE__ */ jsx297(Check, { className: classNames108(glyph, tokens.glyphClass) }),
|
|
60154
|
+
tokens.glyph === "pause" && /* @__PURE__ */ jsx297(Pause, { className: classNames108(glyph, tokens.glyphClass) }),
|
|
60155
|
+
tokens.glyph === "alert" && /* @__PURE__ */ jsx297(AlertGlyph, { className: classNames108(glyph, tokens.glyphClass) }),
|
|
60156
|
+
tokens.glyph === "dashed" && /* @__PURE__ */ jsx297(DashedRing, { className: classNames108("h-full w-full", tokens.glyphClass) })
|
|
60049
60157
|
]
|
|
60050
60158
|
}
|
|
60051
60159
|
)
|
|
@@ -60055,34 +60163,73 @@ var WorkflowStatusNode = ({
|
|
|
60055
60163
|
};
|
|
60056
60164
|
var WorkflowStatusNode_default = WorkflowStatusNode;
|
|
60057
60165
|
|
|
60166
|
+
// src/components/WorkflowTracker/WorkflowQuickActions.tsx
|
|
60167
|
+
import classNames109 from "classnames";
|
|
60168
|
+
import { jsx as jsx298 } from "react/jsx-runtime";
|
|
60169
|
+
var WorkflowQuickActions = ({
|
|
60170
|
+
stepId,
|
|
60171
|
+
actions,
|
|
60172
|
+
palette,
|
|
60173
|
+
groupLabel,
|
|
60174
|
+
onAction,
|
|
60175
|
+
className,
|
|
60176
|
+
style
|
|
60177
|
+
}) => {
|
|
60178
|
+
if (!onAction || actions.length === 0) return null;
|
|
60179
|
+
return /* @__PURE__ */ jsx298(
|
|
60180
|
+
"div",
|
|
60181
|
+
{
|
|
60182
|
+
role: "group",
|
|
60183
|
+
"aria-label": groupLabel,
|
|
60184
|
+
className: classNames109("flex flex-wrap gap-1.5", className),
|
|
60185
|
+
style,
|
|
60186
|
+
children: actions.map((action) => /* @__PURE__ */ jsx298(
|
|
60187
|
+
Button_default,
|
|
60188
|
+
{
|
|
60189
|
+
size: "xs",
|
|
60190
|
+
weight: "medium",
|
|
60191
|
+
variant: action.variant ?? "soft",
|
|
60192
|
+
color: action.tone ?? palette.accent,
|
|
60193
|
+
leadingIcon: action.leadingIcon,
|
|
60194
|
+
disabled: action.disabled,
|
|
60195
|
+
onClick: () => onAction(stepId, action.id),
|
|
60196
|
+
children: action.label
|
|
60197
|
+
},
|
|
60198
|
+
action.id
|
|
60199
|
+
))
|
|
60200
|
+
}
|
|
60201
|
+
);
|
|
60202
|
+
};
|
|
60203
|
+
var WorkflowQuickActions_default = WorkflowQuickActions;
|
|
60204
|
+
|
|
60058
60205
|
// src/components/WorkflowTracker/parts.tsx
|
|
60059
|
-
import
|
|
60060
|
-
import { jsx as
|
|
60206
|
+
import classNames110 from "classnames";
|
|
60207
|
+
import { jsx as jsx299, jsxs as jsxs181 } from "react/jsx-runtime";
|
|
60061
60208
|
var resolve = (surfaces) => surfaces ?? getSurfaceTokens(false);
|
|
60062
|
-
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */
|
|
60209
|
+
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */ jsxs181(
|
|
60063
60210
|
"div",
|
|
60064
60211
|
{
|
|
60065
|
-
className:
|
|
60212
|
+
className: classNames110(
|
|
60066
60213
|
"flex flex-col items-center justify-center gap-3 px-6 py-10 text-center",
|
|
60067
60214
|
className
|
|
60068
60215
|
),
|
|
60069
60216
|
children: [
|
|
60070
|
-
/* @__PURE__ */
|
|
60071
|
-
/* @__PURE__ */
|
|
60072
|
-
/* @__PURE__ */
|
|
60217
|
+
/* @__PURE__ */ jsx299(WorkflowStatusNode_default, { status: "not_started", palette, size: "lg" }),
|
|
60218
|
+
/* @__PURE__ */ jsxs181("div", { className: "space-y-1", children: [
|
|
60219
|
+
/* @__PURE__ */ jsx299(
|
|
60073
60220
|
"p",
|
|
60074
60221
|
{
|
|
60075
|
-
className:
|
|
60222
|
+
className: classNames110(
|
|
60076
60223
|
"text-sm font-semibold",
|
|
60077
60224
|
resolve(surfaces).mutedText
|
|
60078
60225
|
),
|
|
60079
60226
|
children: title
|
|
60080
60227
|
}
|
|
60081
60228
|
),
|
|
60082
|
-
subtitle && /* @__PURE__ */
|
|
60229
|
+
subtitle && /* @__PURE__ */ jsx299(
|
|
60083
60230
|
"p",
|
|
60084
60231
|
{
|
|
60085
|
-
className:
|
|
60232
|
+
className: classNames110(
|
|
60086
60233
|
"max-w-xs text-xs leading-5",
|
|
60087
60234
|
resolve(surfaces).faintText
|
|
60088
60235
|
),
|
|
@@ -60093,10 +60240,10 @@ var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) =>
|
|
|
60093
60240
|
]
|
|
60094
60241
|
}
|
|
60095
60242
|
);
|
|
60096
|
-
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */
|
|
60243
|
+
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ jsx299(
|
|
60097
60244
|
"span",
|
|
60098
60245
|
{
|
|
60099
|
-
className:
|
|
60246
|
+
className: classNames110(
|
|
60100
60247
|
"text-[10px] font-semibold uppercase tracking-widest",
|
|
60101
60248
|
resolve(surfaces).faintText,
|
|
60102
60249
|
className
|
|
@@ -60104,7 +60251,7 @@ var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ jsx297
|
|
|
60104
60251
|
children
|
|
60105
60252
|
}
|
|
60106
60253
|
);
|
|
60107
|
-
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */
|
|
60254
|
+
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */ jsx299("span", { className: classNames110("text-xs", resolve(surfaces).mutedText, className), children });
|
|
60108
60255
|
var WorkflowBadge = ({
|
|
60109
60256
|
children,
|
|
60110
60257
|
status,
|
|
@@ -60112,14 +60259,14 @@ var WorkflowBadge = ({
|
|
|
60112
60259
|
tone
|
|
60113
60260
|
}) => {
|
|
60114
60261
|
const tokens = getStatusTokens(status, palette);
|
|
60115
|
-
return /* @__PURE__ */
|
|
60262
|
+
return /* @__PURE__ */ jsx299(
|
|
60116
60263
|
Pill_default,
|
|
60117
60264
|
{
|
|
60118
60265
|
size: "xs",
|
|
60119
60266
|
uppercase: true,
|
|
60120
60267
|
tone: tone ?? tokens.pillTone,
|
|
60121
60268
|
variant: "outline",
|
|
60122
|
-
className:
|
|
60269
|
+
className: classNames110(
|
|
60123
60270
|
"shrink-0 font-medium",
|
|
60124
60271
|
tone ? `bg-${tone}-100 dark:bg-${tone}-900` : tokens.pillFill
|
|
60125
60272
|
),
|
|
@@ -60127,177 +60274,17 @@ var WorkflowBadge = ({
|
|
|
60127
60274
|
}
|
|
60128
60275
|
);
|
|
60129
60276
|
};
|
|
60130
|
-
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */
|
|
60131
|
-
/* @__PURE__ */
|
|
60132
|
-
/* @__PURE__ */
|
|
60277
|
+
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */ jsxs181("div", { className: "min-w-0", children: [
|
|
60278
|
+
/* @__PURE__ */ jsx299(SectionTitle, { surfaces, children: label }),
|
|
60279
|
+
/* @__PURE__ */ jsx299("p", { className: "mt-1 text-sm font-medium text-neutral-800 dark:text-neutral-100", children: value })
|
|
60133
60280
|
] });
|
|
60134
|
-
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */
|
|
60135
|
-
/* @__PURE__ */
|
|
60136
|
-
/* @__PURE__ */
|
|
60137
|
-
] });
|
|
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)) })
|
|
60281
|
+
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */ jsxs181("span", { className: "inline-flex items-center gap-1", children: [
|
|
60282
|
+
/* @__PURE__ */ jsx299("span", { className: "font-semibold text-neutral-900 dark:text-white", children: count }),
|
|
60283
|
+
/* @__PURE__ */ jsx299("span", { className: resolve(surfaces).mutedText, children: label })
|
|
60171
60284
|
] });
|
|
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
|
-
|
|
60178
|
-
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
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
60285
|
|
|
60299
60286
|
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60300
|
-
import { Fragment as Fragment46, jsx as
|
|
60287
|
+
import { Fragment as Fragment46, jsx as jsx300, jsxs as jsxs182 } from "react/jsx-runtime";
|
|
60301
60288
|
var CONNECTOR_LEFT = 9;
|
|
60302
60289
|
var CONNECTOR_TOP = 24;
|
|
60303
60290
|
var NESTED_INDENT = 32;
|
|
@@ -60315,16 +60302,16 @@ var NestedSubSteps = ({
|
|
|
60315
60302
|
palette,
|
|
60316
60303
|
surfaces,
|
|
60317
60304
|
onSubStepSelect
|
|
60318
|
-
}) => /* @__PURE__ */
|
|
60305
|
+
}) => /* @__PURE__ */ jsx300(
|
|
60319
60306
|
"div",
|
|
60320
60307
|
{
|
|
60321
|
-
className:
|
|
60308
|
+
className: classNames111("mt-3 rounded-lg p-3", surfaces.nestedBox),
|
|
60322
60309
|
style: { marginLeft: NESTED_INDENT },
|
|
60323
|
-
children: /* @__PURE__ */
|
|
60310
|
+
children: /* @__PURE__ */ jsx300("ul", { className: "space-y-2.5", children: subSteps.map((subStep) => {
|
|
60324
60311
|
const status = normalizeStatus(subStep.status);
|
|
60325
60312
|
const isActive = status === "running" || status === "in_progress";
|
|
60326
|
-
const content = /* @__PURE__ */
|
|
60327
|
-
/* @__PURE__ */
|
|
60313
|
+
const content = /* @__PURE__ */ jsxs182(Fragment46, { children: [
|
|
60314
|
+
/* @__PURE__ */ jsx300(
|
|
60328
60315
|
WorkflowStatusNode_default,
|
|
60329
60316
|
{
|
|
60330
60317
|
status,
|
|
@@ -60332,10 +60319,10 @@ var NestedSubSteps = ({
|
|
|
60332
60319
|
size: "sm"
|
|
60333
60320
|
}
|
|
60334
60321
|
),
|
|
60335
|
-
/* @__PURE__ */
|
|
60322
|
+
/* @__PURE__ */ jsx300(
|
|
60336
60323
|
"span",
|
|
60337
60324
|
{
|
|
60338
|
-
className:
|
|
60325
|
+
className: classNames111(
|
|
60339
60326
|
"text-sm",
|
|
60340
60327
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "text-neutral-600 dark:text-neutral-300"
|
|
60341
60328
|
),
|
|
@@ -60343,7 +60330,7 @@ var NestedSubSteps = ({
|
|
|
60343
60330
|
}
|
|
60344
60331
|
)
|
|
60345
60332
|
] });
|
|
60346
|
-
return /* @__PURE__ */
|
|
60333
|
+
return /* @__PURE__ */ jsx300("li", { children: onSubStepSelect ? /* @__PURE__ */ jsx300(
|
|
60347
60334
|
"button",
|
|
60348
60335
|
{
|
|
60349
60336
|
type: "button",
|
|
@@ -60351,7 +60338,7 @@ var NestedSubSteps = ({
|
|
|
60351
60338
|
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",
|
|
60352
60339
|
children: content
|
|
60353
60340
|
}
|
|
60354
|
-
) : /* @__PURE__ */
|
|
60341
|
+
) : /* @__PURE__ */ jsx300("div", { className: "flex items-center gap-2.5", children: content }) }, subStep.id);
|
|
60355
60342
|
}) })
|
|
60356
60343
|
}
|
|
60357
60344
|
);
|
|
@@ -60372,7 +60359,7 @@ var WorkflowTimeline = ({
|
|
|
60372
60359
|
onStepAction
|
|
60373
60360
|
}) => {
|
|
60374
60361
|
if (loading) {
|
|
60375
|
-
return /* @__PURE__ */
|
|
60362
|
+
return /* @__PURE__ */ jsx300(WorkflowRailSkeleton, { rows: loadingRows });
|
|
60376
60363
|
}
|
|
60377
60364
|
const isEmpty2 = steps.length === 0;
|
|
60378
60365
|
const tallyEntries = [
|
|
@@ -60381,19 +60368,19 @@ var WorkflowTimeline = ({
|
|
|
60381
60368
|
{ count: tallies.flagged, label: labels.flagged },
|
|
60382
60369
|
{ count: tallies.remaining, label: labels.remaining }
|
|
60383
60370
|
].filter((entry) => entry.count > 0);
|
|
60384
|
-
return /* @__PURE__ */
|
|
60385
|
-
!isEmpty2 && /* @__PURE__ */
|
|
60386
|
-
/* @__PURE__ */
|
|
60387
|
-
/* @__PURE__ */
|
|
60388
|
-
/* @__PURE__ */
|
|
60371
|
+
return /* @__PURE__ */ jsxs182("div", { className: "flex flex-col", children: [
|
|
60372
|
+
!isEmpty2 && /* @__PURE__ */ jsxs182("div", { className: classNames111("border-b px-5 pb-4 pt-5", surfaces.border), children: [
|
|
60373
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
60374
|
+
/* @__PURE__ */ jsx300(SectionTitle, { surfaces, children: labels.progress }),
|
|
60375
|
+
/* @__PURE__ */ jsxs182("span", { className: "text-sm font-semibold text-neutral-900 dark:text-white", children: [
|
|
60389
60376
|
progress,
|
|
60390
60377
|
"%"
|
|
60391
60378
|
] })
|
|
60392
60379
|
] }),
|
|
60393
|
-
/* @__PURE__ */
|
|
60380
|
+
/* @__PURE__ */ jsx300(
|
|
60394
60381
|
Progress_default,
|
|
60395
60382
|
{
|
|
60396
|
-
className:
|
|
60383
|
+
className: classNames111(
|
|
60397
60384
|
"mt-2",
|
|
60398
60385
|
surfaces.translucent ? "bg-white/40 dark:bg-white/15" : "bg-neutral-200 dark:bg-neutral-700"
|
|
60399
60386
|
),
|
|
@@ -60403,8 +60390,8 @@ var WorkflowTimeline = ({
|
|
|
60403
60390
|
motion: "none"
|
|
60404
60391
|
}
|
|
60405
60392
|
),
|
|
60406
|
-
tallyEntries.length > 0 && /* @__PURE__ */
|
|
60407
|
-
index > 0 && /* @__PURE__ */
|
|
60393
|
+
tallyEntries.length > 0 && /* @__PURE__ */ jsx300("div", { className: "mt-3 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs", children: tallyEntries.map((entry, index) => /* @__PURE__ */ jsxs182(React87.Fragment, { children: [
|
|
60394
|
+
index > 0 && /* @__PURE__ */ jsx300(
|
|
60408
60395
|
"span",
|
|
60409
60396
|
{
|
|
60410
60397
|
"aria-hidden": "true",
|
|
@@ -60412,7 +60399,7 @@ var WorkflowTimeline = ({
|
|
|
60412
60399
|
children: "\xB7"
|
|
60413
60400
|
}
|
|
60414
60401
|
),
|
|
60415
|
-
/* @__PURE__ */
|
|
60402
|
+
/* @__PURE__ */ jsx300(
|
|
60416
60403
|
Tally,
|
|
60417
60404
|
{
|
|
60418
60405
|
count: entry.count,
|
|
@@ -60422,7 +60409,7 @@ var WorkflowTimeline = ({
|
|
|
60422
60409
|
)
|
|
60423
60410
|
] }, entry.label)) })
|
|
60424
60411
|
] }),
|
|
60425
|
-
/* @__PURE__ */
|
|
60412
|
+
/* @__PURE__ */ jsx300("div", { className: classNames111(isEmpty2 ? "" : "px-5 py-5"), children: isEmpty2 ? emptyState ?? /* @__PURE__ */ jsx300(
|
|
60426
60413
|
WorkflowPlaceholder,
|
|
60427
60414
|
{
|
|
60428
60415
|
title: labels.empty,
|
|
@@ -60430,14 +60417,14 @@ var WorkflowTimeline = ({
|
|
|
60430
60417
|
palette,
|
|
60431
60418
|
surfaces
|
|
60432
60419
|
}
|
|
60433
|
-
) : /* @__PURE__ */
|
|
60420
|
+
) : /* @__PURE__ */ jsx300("ol", { className: "m-0 list-none p-0", children: steps.map((step, index) => {
|
|
60434
60421
|
const status = normalizeStatus(step.status);
|
|
60435
60422
|
const tokens = getStatusTokens(status, palette);
|
|
60436
60423
|
const isActive = step.id === activeStepId;
|
|
60437
60424
|
const isLast = index === steps.length - 1;
|
|
60438
60425
|
const nested = isActive && step.subSteps && step.subSteps.length > 0 ? step.subSteps : void 0;
|
|
60439
|
-
const rowContent = /* @__PURE__ */
|
|
60440
|
-
/* @__PURE__ */
|
|
60426
|
+
const rowContent = /* @__PURE__ */ jsxs182(Fragment46, { children: [
|
|
60427
|
+
/* @__PURE__ */ jsx300(
|
|
60441
60428
|
WorkflowStatusNode_default,
|
|
60442
60429
|
{
|
|
60443
60430
|
status,
|
|
@@ -60445,19 +60432,19 @@ var WorkflowTimeline = ({
|
|
|
60445
60432
|
className: "mt-0.5"
|
|
60446
60433
|
}
|
|
60447
60434
|
),
|
|
60448
|
-
/* @__PURE__ */
|
|
60449
|
-
/* @__PURE__ */
|
|
60450
|
-
/* @__PURE__ */
|
|
60435
|
+
/* @__PURE__ */ jsxs182("div", { className: "min-w-0 flex-1", children: [
|
|
60436
|
+
/* @__PURE__ */ jsxs182("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
60437
|
+
/* @__PURE__ */ jsx300(
|
|
60451
60438
|
"span",
|
|
60452
60439
|
{
|
|
60453
|
-
className:
|
|
60440
|
+
className: classNames111(
|
|
60454
60441
|
"text-sm",
|
|
60455
60442
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "font-medium text-neutral-700 dark:text-neutral-200"
|
|
60456
60443
|
),
|
|
60457
60444
|
children: step.label
|
|
60458
60445
|
}
|
|
60459
60446
|
),
|
|
60460
|
-
step.badge && /* @__PURE__ */
|
|
60447
|
+
step.badge && /* @__PURE__ */ jsx300(
|
|
60461
60448
|
WorkflowBadge,
|
|
60462
60449
|
{
|
|
60463
60450
|
status,
|
|
@@ -60467,10 +60454,10 @@ var WorkflowTimeline = ({
|
|
|
60467
60454
|
}
|
|
60468
60455
|
)
|
|
60469
60456
|
] }),
|
|
60470
|
-
step.meta && /* @__PURE__ */
|
|
60457
|
+
step.meta && /* @__PURE__ */ jsx300(
|
|
60471
60458
|
"p",
|
|
60472
60459
|
{
|
|
60473
|
-
className:
|
|
60460
|
+
className: classNames111(
|
|
60474
60461
|
"mt-1 text-xs leading-5",
|
|
60475
60462
|
surfaces.mutedText
|
|
60476
60463
|
),
|
|
@@ -60479,24 +60466,24 @@ var WorkflowTimeline = ({
|
|
|
60479
60466
|
)
|
|
60480
60467
|
] })
|
|
60481
60468
|
] });
|
|
60482
|
-
return /* @__PURE__ */
|
|
60469
|
+
return /* @__PURE__ */ jsxs182(
|
|
60483
60470
|
"li",
|
|
60484
60471
|
{
|
|
60485
|
-
className:
|
|
60472
|
+
className: classNames111("relative", !isLast && "pb-5"),
|
|
60486
60473
|
"aria-current": isActive ? "step" : void 0,
|
|
60487
60474
|
children: [
|
|
60488
|
-
!isLast && /* @__PURE__ */
|
|
60475
|
+
!isLast && /* @__PURE__ */ jsx300(
|
|
60489
60476
|
"span",
|
|
60490
60477
|
{
|
|
60491
60478
|
"aria-hidden": "true",
|
|
60492
|
-
className:
|
|
60479
|
+
className: classNames111(
|
|
60493
60480
|
"absolute bottom-0",
|
|
60494
60481
|
tokens.connectorDashed ? `border-l-2 border-dashed ${tokens.connector}` : `w-0.5 rounded-full ${tokens.connector}`
|
|
60495
60482
|
),
|
|
60496
60483
|
style: { left: CONNECTOR_LEFT, top: CONNECTOR_TOP }
|
|
60497
60484
|
}
|
|
60498
60485
|
),
|
|
60499
|
-
onStepSelect ? /* @__PURE__ */
|
|
60486
|
+
onStepSelect ? /* @__PURE__ */ jsx300(
|
|
60500
60487
|
"button",
|
|
60501
60488
|
{
|
|
60502
60489
|
type: "button",
|
|
@@ -60504,8 +60491,8 @@ var WorkflowTimeline = ({
|
|
|
60504
60491
|
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",
|
|
60505
60492
|
children: rowContent
|
|
60506
60493
|
}
|
|
60507
|
-
) : /* @__PURE__ */
|
|
60508
|
-
/* @__PURE__ */
|
|
60494
|
+
) : /* @__PURE__ */ jsx300("div", { className: "flex items-start gap-3", children: rowContent }),
|
|
60495
|
+
/* @__PURE__ */ jsx300(
|
|
60509
60496
|
WorkflowQuickActions_default,
|
|
60510
60497
|
{
|
|
60511
60498
|
stepId: step.id,
|
|
@@ -60516,7 +60503,7 @@ var WorkflowTimeline = ({
|
|
|
60516
60503
|
className: "ml-8 mt-2"
|
|
60517
60504
|
}
|
|
60518
60505
|
),
|
|
60519
|
-
nested && /* @__PURE__ */
|
|
60506
|
+
nested && /* @__PURE__ */ jsx300(
|
|
60520
60507
|
NestedSubSteps,
|
|
60521
60508
|
{
|
|
60522
60509
|
stepId: step.id,
|
|
@@ -60531,8 +60518,8 @@ var WorkflowTimeline = ({
|
|
|
60531
60518
|
step.id
|
|
60532
60519
|
);
|
|
60533
60520
|
}) }) }),
|
|
60534
|
-
showLegend && !isEmpty2 && /* @__PURE__ */
|
|
60535
|
-
/* @__PURE__ */
|
|
60521
|
+
showLegend && !isEmpty2 && /* @__PURE__ */ jsx300("div", { className: classNames111("mt-auto border-t px-5 py-4", surfaces.border), children: /* @__PURE__ */ jsx300("ul", { className: "flex flex-wrap gap-x-4 gap-y-2", children: LEGEND_ORDER.map((status) => /* @__PURE__ */ jsxs182("li", { className: "flex items-center gap-2", children: [
|
|
60522
|
+
/* @__PURE__ */ jsx300(
|
|
60536
60523
|
WorkflowStatusNode_default,
|
|
60537
60524
|
{
|
|
60538
60525
|
status,
|
|
@@ -60540,7 +60527,7 @@ var WorkflowTimeline = ({
|
|
|
60540
60527
|
size: "sm"
|
|
60541
60528
|
}
|
|
60542
60529
|
),
|
|
60543
|
-
/* @__PURE__ */
|
|
60530
|
+
/* @__PURE__ */ jsx300("span", { className: classNames111("text-xs", surfaces.mutedText), children: labels.statuses[status] })
|
|
60544
60531
|
] }, status)) }) })
|
|
60545
60532
|
] });
|
|
60546
60533
|
};
|
|
@@ -60701,7 +60688,7 @@ var resolveActiveStep = (steps, activeStepId) => {
|
|
|
60701
60688
|
};
|
|
60702
60689
|
|
|
60703
60690
|
// src/components/WorkflowTracker/sampleWorkflow.tsx
|
|
60704
|
-
import { jsx as
|
|
60691
|
+
import { jsx as jsx301, jsxs as jsxs183 } from "react/jsx-runtime";
|
|
60705
60692
|
var sampleWorkflow = {
|
|
60706
60693
|
eyebrow: "VENDOR ONBOARDING \xB7 REQ-4128",
|
|
60707
60694
|
title: "Northwind Logistics GmbH",
|
|
@@ -60746,9 +60733,9 @@ var sampleWorkflow = {
|
|
|
60746
60733
|
status: "attention",
|
|
60747
60734
|
badge: "Needs attention",
|
|
60748
60735
|
meta: "1h 06m \xB7 Liability certificate expired 12 Aug",
|
|
60749
|
-
details: /* @__PURE__ */
|
|
60750
|
-
/* @__PURE__ */
|
|
60751
|
-
/* @__PURE__ */
|
|
60736
|
+
details: /* @__PURE__ */ jsxs183("div", { className: "space-y-3 px-5 py-4 sm:px-6", children: [
|
|
60737
|
+
/* @__PURE__ */ jsx301("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." }),
|
|
60738
|
+
/* @__PURE__ */ jsx301("ul", { className: "flex flex-wrap gap-2", children: ["reminder-12-aug.pdf", "underwriter-quote.pdf"].map((file) => /* @__PURE__ */ jsx301(
|
|
60752
60739
|
"li",
|
|
60753
60740
|
{
|
|
60754
60741
|
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",
|
|
@@ -60779,18 +60766,18 @@ var sampleWorkflow = {
|
|
|
60779
60766
|
owner: "D. Okafor",
|
|
60780
60767
|
startedAt: "19 Aug \xB7 09:12",
|
|
60781
60768
|
sla: "Due in 6h",
|
|
60782
|
-
details: /* @__PURE__ */
|
|
60783
|
-
/* @__PURE__ */
|
|
60784
|
-
/* @__PURE__ */
|
|
60785
|
-
/* @__PURE__ */
|
|
60769
|
+
details: /* @__PURE__ */ jsxs183("div", { className: "space-y-5 px-5 py-4 sm:px-6", children: [
|
|
60770
|
+
/* @__PURE__ */ jsxs183("div", { children: [
|
|
60771
|
+
/* @__PURE__ */ jsx301("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Review activity" }),
|
|
60772
|
+
/* @__PURE__ */ jsx301("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
60773
|
] }),
|
|
60787
|
-
/* @__PURE__ */
|
|
60788
|
-
/* @__PURE__ */
|
|
60789
|
-
/* @__PURE__ */
|
|
60774
|
+
/* @__PURE__ */ jsxs183("div", { children: [
|
|
60775
|
+
/* @__PURE__ */ jsx301("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Files received" }),
|
|
60776
|
+
/* @__PURE__ */ jsx301("ul", { className: "mt-2 flex flex-wrap gap-2", children: [
|
|
60790
60777
|
"data-handling-v3.pdf",
|
|
60791
60778
|
"pentest-2026.pdf",
|
|
60792
60779
|
"soc2-typeii.pdf"
|
|
60793
|
-
].map((file) => /* @__PURE__ */
|
|
60780
|
+
].map((file) => /* @__PURE__ */ jsx301(
|
|
60794
60781
|
"li",
|
|
60795
60782
|
{
|
|
60796
60783
|
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",
|
|
@@ -60799,11 +60786,11 @@ var sampleWorkflow = {
|
|
|
60799
60786
|
file
|
|
60800
60787
|
)) })
|
|
60801
60788
|
] }),
|
|
60802
|
-
/* @__PURE__ */
|
|
60803
|
-
/* @__PURE__ */
|
|
60804
|
-
/* @__PURE__ */
|
|
60805
|
-
/* @__PURE__ */
|
|
60806
|
-
/* @__PURE__ */
|
|
60789
|
+
/* @__PURE__ */ jsxs183("div", { children: [
|
|
60790
|
+
/* @__PURE__ */ jsx301("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Open findings" }),
|
|
60791
|
+
/* @__PURE__ */ jsxs183("ul", { className: "mt-2 space-y-2", children: [
|
|
60792
|
+
/* @__PURE__ */ jsxs183("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
60793
|
+
/* @__PURE__ */ jsx301(
|
|
60807
60794
|
"span",
|
|
60808
60795
|
{
|
|
60809
60796
|
"aria-hidden": "true",
|
|
@@ -60812,8 +60799,8 @@ var sampleWorkflow = {
|
|
|
60812
60799
|
),
|
|
60813
60800
|
"Subprocessor \u201CCloudDot BV\u201D is not covered by the DPA yet"
|
|
60814
60801
|
] }),
|
|
60815
|
-
/* @__PURE__ */
|
|
60816
|
-
/* @__PURE__ */
|
|
60802
|
+
/* @__PURE__ */ jsxs183("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
60803
|
+
/* @__PURE__ */ jsx301(
|
|
60817
60804
|
"span",
|
|
60818
60805
|
{
|
|
60819
60806
|
"aria-hidden": "true",
|
|
@@ -60891,7 +60878,7 @@ var sampleWorkflow = {
|
|
|
60891
60878
|
};
|
|
60892
60879
|
|
|
60893
60880
|
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60894
|
-
import { jsx as
|
|
60881
|
+
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
60895
60882
|
var WorkflowTrackerRail = ({
|
|
60896
60883
|
data = sampleWorkflow,
|
|
60897
60884
|
loading = false,
|
|
@@ -60918,14 +60905,14 @@ var WorkflowTrackerRail = ({
|
|
|
60918
60905
|
);
|
|
60919
60906
|
const progress = useMemo52(() => computeProgress(steps), [steps]);
|
|
60920
60907
|
const tallies = useMemo52(() => computeTallies(steps), [steps]);
|
|
60921
|
-
return /* @__PURE__ */
|
|
60908
|
+
return /* @__PURE__ */ jsx302(
|
|
60922
60909
|
Panel_default,
|
|
60923
60910
|
{
|
|
60924
60911
|
...cardProps,
|
|
60925
60912
|
scrollable: cardScrollable ?? false,
|
|
60926
|
-
className:
|
|
60913
|
+
className: classNames112(className, cardClassName),
|
|
60927
60914
|
style,
|
|
60928
|
-
children: /* @__PURE__ */
|
|
60915
|
+
children: /* @__PURE__ */ jsx302(
|
|
60929
60916
|
WorkflowTimeline_default,
|
|
60930
60917
|
{
|
|
60931
60918
|
steps,
|
|
@@ -60951,11 +60938,11 @@ var WorkflowTrackerRail_default = WorkflowTrackerRail;
|
|
|
60951
60938
|
|
|
60952
60939
|
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
60953
60940
|
import { useMemo as useMemo53 } from "react";
|
|
60954
|
-
import
|
|
60941
|
+
import classNames114 from "classnames";
|
|
60955
60942
|
|
|
60956
60943
|
// src/components/WorkflowTracker/WorkflowDetailPanel.tsx
|
|
60957
|
-
import
|
|
60958
|
-
import { Fragment as Fragment47, jsx as
|
|
60944
|
+
import classNames113 from "classnames";
|
|
60945
|
+
import { Fragment as Fragment47, jsx as jsx303, jsxs as jsxs184 } from "react/jsx-runtime";
|
|
60959
60946
|
var WorkflowDetailPanel = ({
|
|
60960
60947
|
active,
|
|
60961
60948
|
totalSteps,
|
|
@@ -60967,10 +60954,10 @@ var WorkflowDetailPanel = ({
|
|
|
60967
60954
|
onStepAction
|
|
60968
60955
|
}) => {
|
|
60969
60956
|
if (loading) {
|
|
60970
|
-
return /* @__PURE__ */
|
|
60957
|
+
return /* @__PURE__ */ jsx303(WorkflowDetailSkeleton, {});
|
|
60971
60958
|
}
|
|
60972
60959
|
if (!active) {
|
|
60973
|
-
return /* @__PURE__ */
|
|
60960
|
+
return /* @__PURE__ */ jsx303(
|
|
60974
60961
|
WorkflowPlaceholder,
|
|
60975
60962
|
{
|
|
60976
60963
|
title: labels.noActiveStep,
|
|
@@ -60988,11 +60975,11 @@ var WorkflowDetailPanel = ({
|
|
|
60988
60975
|
step.startedAt ? { label: labels.started, value: step.startedAt } : void 0,
|
|
60989
60976
|
step.sla ? { label: labels.sla, value: step.sla } : void 0
|
|
60990
60977
|
].filter(Boolean);
|
|
60991
|
-
return /* @__PURE__ */
|
|
60992
|
-
/* @__PURE__ */
|
|
60993
|
-
/* @__PURE__ */
|
|
60994
|
-
/* @__PURE__ */
|
|
60995
|
-
/* @__PURE__ */
|
|
60978
|
+
return /* @__PURE__ */ jsxs184("div", { className: "flex flex-col", children: [
|
|
60979
|
+
/* @__PURE__ */ jsxs184("div", { className: "px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60980
|
+
/* @__PURE__ */ jsxs184("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
|
|
60981
|
+
/* @__PURE__ */ jsxs184("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
60982
|
+
/* @__PURE__ */ jsxs184(SectionTitle, { surfaces, children: [
|
|
60996
60983
|
labels.step,
|
|
60997
60984
|
" ",
|
|
60998
60985
|
index,
|
|
@@ -61001,7 +60988,7 @@ var WorkflowDetailPanel = ({
|
|
|
61001
60988
|
" ",
|
|
61002
60989
|
totalSteps
|
|
61003
60990
|
] }),
|
|
61004
|
-
step.badge && /* @__PURE__ */
|
|
60991
|
+
step.badge && /* @__PURE__ */ jsx303(
|
|
61005
60992
|
WorkflowBadge,
|
|
61006
60993
|
{
|
|
61007
60994
|
status,
|
|
@@ -61011,13 +60998,13 @@ var WorkflowDetailPanel = ({
|
|
|
61011
60998
|
}
|
|
61012
60999
|
)
|
|
61013
61000
|
] }),
|
|
61014
|
-
/* @__PURE__ */
|
|
61015
|
-
step.elapsed && /* @__PURE__ */
|
|
61001
|
+
/* @__PURE__ */ jsxs184("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-2", children: [
|
|
61002
|
+
step.elapsed && /* @__PURE__ */ jsxs184(SectionMeta, { surfaces, children: [
|
|
61016
61003
|
labels.elapsed,
|
|
61017
61004
|
" ",
|
|
61018
61005
|
step.elapsed
|
|
61019
61006
|
] }),
|
|
61020
|
-
/* @__PURE__ */
|
|
61007
|
+
/* @__PURE__ */ jsx303(
|
|
61021
61008
|
WorkflowQuickActions_default,
|
|
61022
61009
|
{
|
|
61023
61010
|
stepId: step.id,
|
|
@@ -61029,18 +61016,18 @@ var WorkflowDetailPanel = ({
|
|
|
61029
61016
|
)
|
|
61030
61017
|
] })
|
|
61031
61018
|
] }),
|
|
61032
|
-
/* @__PURE__ */
|
|
61033
|
-
step.description && /* @__PURE__ */
|
|
61019
|
+
/* @__PURE__ */ jsx303("h3", { className: "mt-3 text-xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-2xl", children: step.label }),
|
|
61020
|
+
step.description && /* @__PURE__ */ jsx303(
|
|
61034
61021
|
"p",
|
|
61035
61022
|
{
|
|
61036
|
-
className:
|
|
61023
|
+
className: classNames113(
|
|
61037
61024
|
"mt-2 max-w-3xl text-sm leading-6",
|
|
61038
61025
|
surfaces.mutedText
|
|
61039
61026
|
),
|
|
61040
61027
|
children: step.description
|
|
61041
61028
|
}
|
|
61042
61029
|
),
|
|
61043
|
-
metaFields.length > 0 && /* @__PURE__ */
|
|
61030
|
+
metaFields.length > 0 && /* @__PURE__ */ jsx303("div", { className: "mt-5 flex flex-wrap gap-x-10 gap-y-4", children: metaFields.map((field) => /* @__PURE__ */ jsx303(
|
|
61044
61031
|
MetaField,
|
|
61045
61032
|
{
|
|
61046
61033
|
label: field.label,
|
|
@@ -61050,18 +61037,18 @@ var WorkflowDetailPanel = ({
|
|
|
61050
61037
|
field.label
|
|
61051
61038
|
)) })
|
|
61052
61039
|
] }),
|
|
61053
|
-
subSteps.length > 0 && /* @__PURE__ */
|
|
61054
|
-
/* @__PURE__ */
|
|
61040
|
+
subSteps.length > 0 && /* @__PURE__ */ jsxs184(Fragment47, { children: [
|
|
61041
|
+
/* @__PURE__ */ jsxs184(
|
|
61055
61042
|
"div",
|
|
61056
61043
|
{
|
|
61057
|
-
className:
|
|
61044
|
+
className: classNames113(
|
|
61058
61045
|
"flex flex-wrap items-center justify-between gap-2 border-y px-5 py-2.5 sm:px-6",
|
|
61059
61046
|
surfaces.border,
|
|
61060
61047
|
surfaces.strip
|
|
61061
61048
|
),
|
|
61062
61049
|
children: [
|
|
61063
|
-
/* @__PURE__ */
|
|
61064
|
-
/* @__PURE__ */
|
|
61050
|
+
/* @__PURE__ */ jsx303(SectionTitle, { surfaces, children: labels.subSteps }),
|
|
61051
|
+
/* @__PURE__ */ jsxs184(SectionMeta, { surfaces, children: [
|
|
61065
61052
|
summary.accepted,
|
|
61066
61053
|
" ",
|
|
61067
61054
|
labels.accepted,
|
|
@@ -61077,24 +61064,24 @@ var WorkflowDetailPanel = ({
|
|
|
61077
61064
|
]
|
|
61078
61065
|
}
|
|
61079
61066
|
),
|
|
61080
|
-
/* @__PURE__ */
|
|
61067
|
+
/* @__PURE__ */ jsx303(
|
|
61081
61068
|
"ul",
|
|
61082
61069
|
{
|
|
61083
|
-
className:
|
|
61070
|
+
className: classNames113(
|
|
61084
61071
|
"m-0 list-none divide-y p-0",
|
|
61085
61072
|
surfaces.divider
|
|
61086
61073
|
),
|
|
61087
61074
|
children: subSteps.map((subStep) => {
|
|
61088
61075
|
const subStatus = normalizeStatus(subStep.status);
|
|
61089
61076
|
const isRunning = subStatus === "running";
|
|
61090
|
-
const rowContent = /* @__PURE__ */
|
|
61091
|
-
/* @__PURE__ */
|
|
61092
|
-
/* @__PURE__ */
|
|
61093
|
-
/* @__PURE__ */
|
|
61094
|
-
subStep.note && /* @__PURE__ */
|
|
61077
|
+
const rowContent = /* @__PURE__ */ jsxs184(Fragment47, { children: [
|
|
61078
|
+
/* @__PURE__ */ jsx303(WorkflowStatusNode_default, { status: subStatus, palette }),
|
|
61079
|
+
/* @__PURE__ */ jsxs184("div", { className: "min-w-0 flex-1", children: [
|
|
61080
|
+
/* @__PURE__ */ jsx303("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: subStep.label }),
|
|
61081
|
+
subStep.note && /* @__PURE__ */ jsx303(
|
|
61095
61082
|
"p",
|
|
61096
61083
|
{
|
|
61097
|
-
className:
|
|
61084
|
+
className: classNames113(
|
|
61098
61085
|
"mt-0.5 text-xs leading-5",
|
|
61099
61086
|
surfaces.mutedText
|
|
61100
61087
|
),
|
|
@@ -61102,7 +61089,7 @@ var WorkflowDetailPanel = ({
|
|
|
61102
61089
|
}
|
|
61103
61090
|
)
|
|
61104
61091
|
] }),
|
|
61105
|
-
subStep.badge && /* @__PURE__ */
|
|
61092
|
+
subStep.badge && /* @__PURE__ */ jsx303(
|
|
61106
61093
|
WorkflowBadge,
|
|
61107
61094
|
{
|
|
61108
61095
|
status: subStatus,
|
|
@@ -61111,10 +61098,10 @@ var WorkflowDetailPanel = ({
|
|
|
61111
61098
|
children: subStep.badge
|
|
61112
61099
|
}
|
|
61113
61100
|
),
|
|
61114
|
-
/* @__PURE__ */
|
|
61101
|
+
/* @__PURE__ */ jsx303(
|
|
61115
61102
|
"span",
|
|
61116
61103
|
{
|
|
61117
|
-
className:
|
|
61104
|
+
className: classNames113(
|
|
61118
61105
|
"w-10 shrink-0 text-right text-xs tabular-nums",
|
|
61119
61106
|
surfaces.faintText
|
|
61120
61107
|
),
|
|
@@ -61122,22 +61109,22 @@ var WorkflowDetailPanel = ({
|
|
|
61122
61109
|
}
|
|
61123
61110
|
)
|
|
61124
61111
|
] });
|
|
61125
|
-
const rowClasses =
|
|
61112
|
+
const rowClasses = classNames113(
|
|
61126
61113
|
"flex w-full items-center gap-3 px-5 py-3 text-left sm:px-6",
|
|
61127
61114
|
isRunning && getRowHighlight(palette.accent, surfaces.translucent)
|
|
61128
61115
|
);
|
|
61129
|
-
return /* @__PURE__ */
|
|
61116
|
+
return /* @__PURE__ */ jsx303("li", { children: onSubStepSelect ? /* @__PURE__ */ jsx303(
|
|
61130
61117
|
"button",
|
|
61131
61118
|
{
|
|
61132
61119
|
type: "button",
|
|
61133
61120
|
onClick: () => onSubStepSelect(step.id, subStep.id),
|
|
61134
|
-
className:
|
|
61121
|
+
className: classNames113(
|
|
61135
61122
|
rowClasses,
|
|
61136
61123
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-400 dark:focus-visible:ring-neutral-500"
|
|
61137
61124
|
),
|
|
61138
61125
|
children: rowContent
|
|
61139
61126
|
}
|
|
61140
|
-
) : /* @__PURE__ */
|
|
61127
|
+
) : /* @__PURE__ */ jsx303("div", { className: rowClasses, children: rowContent }) }, subStep.id);
|
|
61141
61128
|
})
|
|
61142
61129
|
}
|
|
61143
61130
|
)
|
|
@@ -61147,7 +61134,7 @@ var WorkflowDetailPanel = ({
|
|
|
61147
61134
|
var WorkflowDetailPanel_default = WorkflowDetailPanel;
|
|
61148
61135
|
|
|
61149
61136
|
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
61150
|
-
import { jsx as
|
|
61137
|
+
import { jsx as jsx304 } from "react/jsx-runtime";
|
|
61151
61138
|
var WorkflowTrackerStepDetails = ({
|
|
61152
61139
|
data = sampleWorkflow,
|
|
61153
61140
|
loading = false,
|
|
@@ -61170,13 +61157,13 @@ var WorkflowTrackerStepDetails = ({
|
|
|
61170
61157
|
() => resolveActiveStep(steps, data?.activeStepId),
|
|
61171
61158
|
[steps, data?.activeStepId]
|
|
61172
61159
|
);
|
|
61173
|
-
return /* @__PURE__ */
|
|
61160
|
+
return /* @__PURE__ */ jsx304(
|
|
61174
61161
|
Panel_default,
|
|
61175
61162
|
{
|
|
61176
61163
|
...cardProps,
|
|
61177
|
-
className:
|
|
61164
|
+
className: classNames114(className, cardClassName),
|
|
61178
61165
|
style,
|
|
61179
|
-
children: /* @__PURE__ */
|
|
61166
|
+
children: /* @__PURE__ */ jsx304(
|
|
61180
61167
|
WorkflowDetailPanel_default,
|
|
61181
61168
|
{
|
|
61182
61169
|
active,
|
|
@@ -61196,31 +61183,31 @@ var WorkflowTrackerStepDetails_default = WorkflowTrackerStepDetails;
|
|
|
61196
61183
|
|
|
61197
61184
|
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61198
61185
|
import { useMemo as useMemo54 } from "react";
|
|
61199
|
-
import
|
|
61186
|
+
import classNames116 from "classnames";
|
|
61200
61187
|
|
|
61201
61188
|
// src/components/WorkflowTracker/WorkflowDetailsCard.tsx
|
|
61202
|
-
import
|
|
61203
|
-
import { jsx as
|
|
61189
|
+
import classNames115 from "classnames";
|
|
61190
|
+
import { jsx as jsx305 } from "react/jsx-runtime";
|
|
61204
61191
|
var WorkflowDetailsCard = ({
|
|
61205
61192
|
details,
|
|
61206
61193
|
ariaLabel,
|
|
61207
61194
|
cardProps,
|
|
61208
61195
|
className,
|
|
61209
61196
|
style
|
|
61210
|
-
}) => /* @__PURE__ */
|
|
61197
|
+
}) => /* @__PURE__ */ jsx305(
|
|
61211
61198
|
Panel_default,
|
|
61212
61199
|
{
|
|
61213
61200
|
...cardProps,
|
|
61214
61201
|
flexBody: true,
|
|
61215
|
-
className:
|
|
61202
|
+
className: classNames115("flex-1", className),
|
|
61216
61203
|
style,
|
|
61217
|
-
children: /* @__PURE__ */
|
|
61204
|
+
children: /* @__PURE__ */ jsx305(ScrollArea_default, { className: "h-full", mask: true, role: "region", "aria-label": ariaLabel, children: details })
|
|
61218
61205
|
}
|
|
61219
61206
|
);
|
|
61220
61207
|
var WorkflowDetailsCard_default = WorkflowDetailsCard;
|
|
61221
61208
|
|
|
61222
61209
|
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61223
|
-
import { jsx as
|
|
61210
|
+
import { jsx as jsx306 } from "react/jsx-runtime";
|
|
61224
61211
|
var WorkflowTrackerDetails = ({
|
|
61225
61212
|
data = sampleWorkflow,
|
|
61226
61213
|
loading = false,
|
|
@@ -61239,21 +61226,110 @@ var WorkflowTrackerDetails = ({
|
|
|
61239
61226
|
);
|
|
61240
61227
|
const details = active?.step.details;
|
|
61241
61228
|
if (loading || details == null || details === "") return null;
|
|
61242
|
-
return /* @__PURE__ */
|
|
61229
|
+
return /* @__PURE__ */ jsx306(
|
|
61243
61230
|
WorkflowDetailsCard_default,
|
|
61244
61231
|
{
|
|
61245
61232
|
details,
|
|
61246
61233
|
ariaLabel: labels.details,
|
|
61247
61234
|
cardProps,
|
|
61248
|
-
className:
|
|
61235
|
+
className: classNames116(className, cardClassName),
|
|
61249
61236
|
style
|
|
61250
61237
|
}
|
|
61251
61238
|
);
|
|
61252
61239
|
};
|
|
61253
61240
|
var WorkflowTrackerDetails_default = WorkflowTrackerDetails;
|
|
61254
61241
|
|
|
61255
|
-
// src/components/WorkflowTracker/
|
|
61242
|
+
// src/components/WorkflowTracker/WorkflowTrackerRollups.tsx
|
|
61243
|
+
import { useMemo as useMemo55 } from "react";
|
|
61244
|
+
import classNames118 from "classnames";
|
|
61245
|
+
|
|
61246
|
+
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
61247
|
+
import classNames117 from "classnames";
|
|
61248
|
+
import { jsx as jsx307, jsxs as jsxs185 } from "react/jsx-runtime";
|
|
61249
|
+
var WorkflowSummaryCard = ({
|
|
61250
|
+
title,
|
|
61251
|
+
steps,
|
|
61252
|
+
palette,
|
|
61253
|
+
surfaces
|
|
61254
|
+
}) => /* @__PURE__ */ jsxs185("div", { className: "px-5 py-4", children: [
|
|
61255
|
+
/* @__PURE__ */ jsx307(SectionTitle, { surfaces, children: title }),
|
|
61256
|
+
/* @__PURE__ */ jsx307("ul", { className: "mt-3 space-y-3", children: steps.map((step) => /* @__PURE__ */ jsxs185("li", { className: "flex items-start gap-3", children: [
|
|
61257
|
+
/* @__PURE__ */ jsx307(
|
|
61258
|
+
WorkflowStatusNode_default,
|
|
61259
|
+
{
|
|
61260
|
+
status: normalizeStatus(step.status),
|
|
61261
|
+
palette,
|
|
61262
|
+
className: "mt-0.5"
|
|
61263
|
+
}
|
|
61264
|
+
),
|
|
61265
|
+
/* @__PURE__ */ jsxs185("div", { className: "min-w-0 flex-1", children: [
|
|
61266
|
+
/* @__PURE__ */ jsx307("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: step.label }),
|
|
61267
|
+
step.meta && /* @__PURE__ */ jsx307(
|
|
61268
|
+
"p",
|
|
61269
|
+
{
|
|
61270
|
+
className: classNames117(
|
|
61271
|
+
"mt-0.5 text-xs leading-5",
|
|
61272
|
+
surfaces.mutedText
|
|
61273
|
+
),
|
|
61274
|
+
children: step.meta
|
|
61275
|
+
}
|
|
61276
|
+
)
|
|
61277
|
+
] })
|
|
61278
|
+
] }, step.id)) })
|
|
61279
|
+
] });
|
|
61280
|
+
var WorkflowSummaryCard_default = WorkflowSummaryCard;
|
|
61281
|
+
|
|
61282
|
+
// src/components/WorkflowTracker/WorkflowTrackerRollups.tsx
|
|
61256
61283
|
import { jsx as jsx308, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
61284
|
+
var WorkflowTrackerRollups = ({
|
|
61285
|
+
data = sampleWorkflow,
|
|
61286
|
+
loading = false,
|
|
61287
|
+
labels: labelOverrides,
|
|
61288
|
+
className,
|
|
61289
|
+
style,
|
|
61290
|
+
...styleProps
|
|
61291
|
+
}) => {
|
|
61292
|
+
const steps = data?.steps ?? [];
|
|
61293
|
+
const { palette, surfaces } = useWorkflowChrome(styleProps);
|
|
61294
|
+
const labels = useMemo55(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61295
|
+
const cardProps = buildCardProps(styleProps);
|
|
61296
|
+
const attentionSteps = useMemo55(() => getAttentionSteps(steps), [steps]);
|
|
61297
|
+
const skippedSteps = useMemo55(() => getSkippedSteps(steps), [steps]);
|
|
61298
|
+
if (loading || attentionSteps.length === 0 && skippedSteps.length === 0) {
|
|
61299
|
+
return null;
|
|
61300
|
+
}
|
|
61301
|
+
return /* @__PURE__ */ jsxs186(
|
|
61302
|
+
"div",
|
|
61303
|
+
{
|
|
61304
|
+
className: classNames118("grid grid-cols-1 gap-5 @xl:grid-cols-2", className),
|
|
61305
|
+
style,
|
|
61306
|
+
children: [
|
|
61307
|
+
attentionSteps.length > 0 && /* @__PURE__ */ jsx308(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx308(
|
|
61308
|
+
WorkflowSummaryCard_default,
|
|
61309
|
+
{
|
|
61310
|
+
title: labels.needsAttention,
|
|
61311
|
+
steps: attentionSteps,
|
|
61312
|
+
palette,
|
|
61313
|
+
surfaces
|
|
61314
|
+
}
|
|
61315
|
+
) }),
|
|
61316
|
+
skippedSteps.length > 0 && /* @__PURE__ */ jsx308(Panel_default, { ...cardProps, children: /* @__PURE__ */ jsx308(
|
|
61317
|
+
WorkflowSummaryCard_default,
|
|
61318
|
+
{
|
|
61319
|
+
title: labels.skippedSteps,
|
|
61320
|
+
steps: skippedSteps,
|
|
61321
|
+
palette,
|
|
61322
|
+
surfaces
|
|
61323
|
+
}
|
|
61324
|
+
) })
|
|
61325
|
+
]
|
|
61326
|
+
}
|
|
61327
|
+
);
|
|
61328
|
+
};
|
|
61329
|
+
var WorkflowTrackerRollups_default = WorkflowTrackerRollups;
|
|
61330
|
+
|
|
61331
|
+
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
61332
|
+
import { jsx as jsx309, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
61257
61333
|
var WorkflowTracker = ({
|
|
61258
61334
|
data = sampleWorkflow,
|
|
61259
61335
|
accentColor = "blue",
|
|
@@ -61287,7 +61363,6 @@ var WorkflowTracker = ({
|
|
|
61287
61363
|
style,
|
|
61288
61364
|
...rest
|
|
61289
61365
|
}) => {
|
|
61290
|
-
const steps = data?.steps ?? [];
|
|
61291
61366
|
const styleProps = {
|
|
61292
61367
|
accentColor,
|
|
61293
61368
|
attentionColor,
|
|
@@ -61302,38 +61377,35 @@ var WorkflowTracker = ({
|
|
|
61302
61377
|
padding,
|
|
61303
61378
|
translucentSurfaces
|
|
61304
61379
|
};
|
|
61305
|
-
const {
|
|
61306
|
-
const labels =
|
|
61307
|
-
const cardProps = buildCardProps(styleProps);
|
|
61308
|
-
const attentionSteps = useMemo55(() => getAttentionSteps(steps), [steps]);
|
|
61309
|
-
const skippedSteps = useMemo55(() => getSkippedSteps(steps), [steps]);
|
|
61380
|
+
const { surfaces } = useWorkflowChrome(styleProps);
|
|
61381
|
+
const labels = useMemo56(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61310
61382
|
const railStyle = {
|
|
61311
61383
|
"--wt-rail-width": typeof railWidth === "number" ? `${railWidth}px` : railWidth,
|
|
61312
61384
|
"--wt-fill-offset": typeof fillHeightOffset === "number" ? `${fillHeightOffset}px` : fillHeightOffset
|
|
61313
61385
|
};
|
|
61314
|
-
return /* @__PURE__ */
|
|
61386
|
+
return /* @__PURE__ */ jsxs187(
|
|
61315
61387
|
"div",
|
|
61316
61388
|
{
|
|
61317
|
-
className:
|
|
61389
|
+
className: classNames119("@container w-full", className),
|
|
61318
61390
|
style: { maxWidth, ...railStyle, ...style },
|
|
61319
61391
|
"aria-busy": loading || void 0,
|
|
61320
61392
|
...rest,
|
|
61321
61393
|
children: [
|
|
61322
|
-
showHeader && loading && /* @__PURE__ */
|
|
61394
|
+
showHeader && loading && /* @__PURE__ */ jsx309(
|
|
61323
61395
|
WorkflowHeaderSkeleton,
|
|
61324
61396
|
{
|
|
61325
61397
|
hasIcon: Boolean(data?.icon),
|
|
61326
61398
|
iconCorner
|
|
61327
61399
|
}
|
|
61328
61400
|
),
|
|
61329
|
-
showHeader && !loading && /* @__PURE__ */
|
|
61330
|
-
/* @__PURE__ */
|
|
61401
|
+
showHeader && !loading && /* @__PURE__ */ jsxs187("header", { className: "mb-5 flex flex-wrap items-start justify-between gap-3", children: [
|
|
61402
|
+
/* @__PURE__ */ jsxs187("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
61331
61403
|
data?.icon && // `overflow-hidden` plus the shared corner class clips whatever
|
|
61332
61404
|
// the caller passes, so an <img> needs no rounding of its own.
|
|
61333
|
-
/* @__PURE__ */
|
|
61405
|
+
/* @__PURE__ */ jsx309(
|
|
61334
61406
|
"span",
|
|
61335
61407
|
{
|
|
61336
|
-
className:
|
|
61408
|
+
className: classNames119(
|
|
61337
61409
|
"flex h-12 w-12 shrink-0 items-center justify-center overflow-hidden [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
61338
61410
|
getSurfaceCornerClass(iconCorner),
|
|
61339
61411
|
surfaces.chip
|
|
@@ -61341,33 +61413,33 @@ var WorkflowTracker = ({
|
|
|
61341
61413
|
children: data.icon
|
|
61342
61414
|
}
|
|
61343
61415
|
),
|
|
61344
|
-
/* @__PURE__ */
|
|
61345
|
-
data?.eyebrow && /* @__PURE__ */
|
|
61416
|
+
/* @__PURE__ */ jsxs187("div", { className: "min-w-0", children: [
|
|
61417
|
+
data?.eyebrow && /* @__PURE__ */ jsx309(
|
|
61346
61418
|
"p",
|
|
61347
61419
|
{
|
|
61348
|
-
className:
|
|
61420
|
+
className: classNames119(
|
|
61349
61421
|
"text-[11px] font-semibold uppercase tracking-widest",
|
|
61350
61422
|
surfaces.faintText
|
|
61351
61423
|
),
|
|
61352
61424
|
children: data.eyebrow
|
|
61353
61425
|
}
|
|
61354
61426
|
),
|
|
61355
|
-
/* @__PURE__ */
|
|
61427
|
+
/* @__PURE__ */ jsx309("h2", { className: "mt-1 text-2xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-3xl", children: data?.title })
|
|
61356
61428
|
] })
|
|
61357
61429
|
] }),
|
|
61358
|
-
data?.live && /* @__PURE__ */
|
|
61430
|
+
data?.live && /* @__PURE__ */ jsxs187(
|
|
61359
61431
|
Pill_default,
|
|
61360
61432
|
{
|
|
61361
61433
|
size: "md",
|
|
61362
61434
|
tone: mutedColor,
|
|
61363
61435
|
variant: "outline",
|
|
61364
|
-
className:
|
|
61436
|
+
className: classNames119("tracking-wide", surfaces.chip),
|
|
61365
61437
|
children: [
|
|
61366
|
-
/* @__PURE__ */
|
|
61438
|
+
/* @__PURE__ */ jsx309(
|
|
61367
61439
|
"span",
|
|
61368
61440
|
{
|
|
61369
61441
|
"aria-hidden": "true",
|
|
61370
|
-
className:
|
|
61442
|
+
className: classNames119(
|
|
61371
61443
|
"mr-2 inline-block h-1.5 w-1.5 rounded-full",
|
|
61372
61444
|
`bg-${accentColor}-500 dark:bg-${accentColor}-400`
|
|
61373
61445
|
)
|
|
@@ -61378,15 +61450,15 @@ var WorkflowTracker = ({
|
|
|
61378
61450
|
}
|
|
61379
61451
|
)
|
|
61380
61452
|
] }),
|
|
61381
|
-
/* @__PURE__ */
|
|
61453
|
+
/* @__PURE__ */ jsxs187(
|
|
61382
61454
|
"div",
|
|
61383
61455
|
{
|
|
61384
|
-
className:
|
|
61456
|
+
className: classNames119(
|
|
61385
61457
|
"grid grid-cols-1 items-start gap-5 @4xl:grid-cols-[var(--wt-rail-width)_minmax(0,1fr)]",
|
|
61386
61458
|
fillHeight && "@4xl:h-[calc(100dvh-var(--wt-fill-offset))]"
|
|
61387
61459
|
),
|
|
61388
61460
|
children: [
|
|
61389
|
-
/* @__PURE__ */
|
|
61461
|
+
/* @__PURE__ */ jsx309(
|
|
61390
61462
|
WorkflowTrackerRail_default,
|
|
61391
61463
|
{
|
|
61392
61464
|
...styleProps,
|
|
@@ -61397,7 +61469,7 @@ var WorkflowTracker = ({
|
|
|
61397
61469
|
emptyState,
|
|
61398
61470
|
labels: labelOverrides,
|
|
61399
61471
|
cardScrollable: fillHeight,
|
|
61400
|
-
cardClassName:
|
|
61472
|
+
cardClassName: classNames119(
|
|
61401
61473
|
stickyRail && !fillHeight && "@4xl:sticky @4xl:top-6",
|
|
61402
61474
|
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61403
61475
|
),
|
|
@@ -61406,15 +61478,15 @@ var WorkflowTracker = ({
|
|
|
61406
61478
|
onStepAction
|
|
61407
61479
|
}
|
|
61408
61480
|
),
|
|
61409
|
-
/* @__PURE__ */
|
|
61481
|
+
/* @__PURE__ */ jsxs187(
|
|
61410
61482
|
"div",
|
|
61411
61483
|
{
|
|
61412
|
-
className:
|
|
61484
|
+
className: classNames119(
|
|
61413
61485
|
"@container flex min-w-0 flex-col gap-5",
|
|
61414
61486
|
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61415
61487
|
),
|
|
61416
61488
|
children: [
|
|
61417
|
-
/* @__PURE__ */
|
|
61489
|
+
/* @__PURE__ */ jsx309(
|
|
61418
61490
|
WorkflowTrackerStepDetails_default,
|
|
61419
61491
|
{
|
|
61420
61492
|
...styleProps,
|
|
@@ -61425,7 +61497,7 @@ var WorkflowTracker = ({
|
|
|
61425
61497
|
onStepAction
|
|
61426
61498
|
}
|
|
61427
61499
|
),
|
|
61428
|
-
/* @__PURE__ */
|
|
61500
|
+
/* @__PURE__ */ jsx309(
|
|
61429
61501
|
WorkflowTrackerDetails_default,
|
|
61430
61502
|
{
|
|
61431
61503
|
...styleProps,
|
|
@@ -61434,26 +61506,15 @@ var WorkflowTracker = ({
|
|
|
61434
61506
|
labels: labelOverrides
|
|
61435
61507
|
}
|
|
61436
61508
|
),
|
|
61437
|
-
|
|
61438
|
-
|
|
61439
|
-
|
|
61440
|
-
|
|
61441
|
-
|
|
61442
|
-
|
|
61443
|
-
|
|
61444
|
-
|
|
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
|
-
] })
|
|
61509
|
+
/* @__PURE__ */ jsx309(
|
|
61510
|
+
WorkflowTrackerRollups_default,
|
|
61511
|
+
{
|
|
61512
|
+
...styleProps,
|
|
61513
|
+
data,
|
|
61514
|
+
loading,
|
|
61515
|
+
labels: labelOverrides
|
|
61516
|
+
}
|
|
61517
|
+
)
|
|
61457
61518
|
]
|
|
61458
61519
|
}
|
|
61459
61520
|
)
|
|
@@ -61467,9 +61528,9 @@ var WorkflowTracker = ({
|
|
|
61467
61528
|
var WorkflowTracker_default = WorkflowTracker;
|
|
61468
61529
|
|
|
61469
61530
|
// src/components/Gantt/Gantt.tsx
|
|
61470
|
-
import { useCallback as useCallback42, useEffect as useEffect71, useMemo as
|
|
61531
|
+
import { useCallback as useCallback42, useEffect as useEffect71, useMemo as useMemo60, useRef as useRef68, useState as useState79 } from "react";
|
|
61471
61532
|
import { createPortal as createPortal15 } from "react-dom";
|
|
61472
|
-
import
|
|
61533
|
+
import classNames123 from "classnames";
|
|
61473
61534
|
|
|
61474
61535
|
// ../common/gantt/types.ts
|
|
61475
61536
|
var GANTT_ZOOM_PRESETS = [
|
|
@@ -62815,38 +62876,38 @@ var sampleGantt = {
|
|
|
62815
62876
|
};
|
|
62816
62877
|
|
|
62817
62878
|
// src/components/Gantt/GanttScale.tsx
|
|
62818
|
-
import
|
|
62819
|
-
import { jsx as
|
|
62879
|
+
import classNames120 from "classnames";
|
|
62880
|
+
import { jsx as jsx310, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
62820
62881
|
var GanttScale = ({ levels, height }) => {
|
|
62821
62882
|
if (levels.length === 0) {
|
|
62822
|
-
return /* @__PURE__ */
|
|
62883
|
+
return /* @__PURE__ */ jsx310("div", { style: { height } });
|
|
62823
62884
|
}
|
|
62824
62885
|
const coarseHeight = levels.length > 1 ? 24 : height;
|
|
62825
|
-
return /* @__PURE__ */
|
|
62886
|
+
return /* @__PURE__ */ jsx310("div", { className: "flex h-full w-full flex-col", children: levels.map((level, li) => /* @__PURE__ */ jsx310(
|
|
62826
62887
|
"div",
|
|
62827
62888
|
{
|
|
62828
|
-
className:
|
|
62889
|
+
className: classNames120("flex w-full", li === 0 ? "shrink-0" : "min-h-0 flex-1"),
|
|
62829
62890
|
style: li === 0 ? { height: coarseHeight } : void 0,
|
|
62830
|
-
children: level.columns.map((col) => /* @__PURE__ */
|
|
62891
|
+
children: level.columns.map((col) => /* @__PURE__ */ jsxs188(
|
|
62831
62892
|
"div",
|
|
62832
62893
|
{
|
|
62833
|
-
className:
|
|
62894
|
+
className: classNames120(
|
|
62834
62895
|
"flex shrink-0 flex-col items-center justify-center overflow-hidden border-r border-neutral-200/70 dark:border-neutral-800/70",
|
|
62835
62896
|
li === 0 ? "bg-neutral-50/60 dark:bg-neutral-800/40" : "bg-white dark:bg-neutral-900"
|
|
62836
62897
|
),
|
|
62837
62898
|
style: { width: col.width },
|
|
62838
62899
|
children: [
|
|
62839
|
-
/* @__PURE__ */
|
|
62900
|
+
/* @__PURE__ */ jsx310(
|
|
62840
62901
|
"span",
|
|
62841
62902
|
{
|
|
62842
|
-
className:
|
|
62903
|
+
className: classNames120(
|
|
62843
62904
|
"max-w-full truncate px-1 text-[10px] font-semibold uppercase leading-none tracking-wide",
|
|
62844
62905
|
li === 0 ? "text-neutral-700 dark:text-neutral-200" : "text-neutral-500 dark:text-neutral-400"
|
|
62845
62906
|
),
|
|
62846
62907
|
children: col.label
|
|
62847
62908
|
}
|
|
62848
62909
|
),
|
|
62849
|
-
col.subLabel != null && /* @__PURE__ */
|
|
62910
|
+
col.subLabel != null && /* @__PURE__ */ jsx310("span", { className: "max-w-full truncate px-1 text-[9px] font-medium leading-none text-neutral-400 dark:text-neutral-500", children: col.subLabel })
|
|
62850
62911
|
]
|
|
62851
62912
|
},
|
|
62852
62913
|
col.id
|
|
@@ -62859,7 +62920,7 @@ GanttScale.displayName = "GanttScale";
|
|
|
62859
62920
|
|
|
62860
62921
|
// src/components/Gantt/GanttLinkLayer.tsx
|
|
62861
62922
|
import { forwardRef as forwardRef160, useRef as useRef66 } from "react";
|
|
62862
|
-
import { jsx as
|
|
62923
|
+
import { jsx as jsx311, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
62863
62924
|
var GanttLinkLayer = forwardRef160(
|
|
62864
62925
|
function GanttLinkLayer2({
|
|
62865
62926
|
width,
|
|
@@ -62895,24 +62956,24 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62895
62956
|
const pick = pickFromEvent(e) ?? clicked;
|
|
62896
62957
|
if (interactive && onDeleteLink) onDeleteLink(pick.link);
|
|
62897
62958
|
};
|
|
62898
|
-
return /* @__PURE__ */
|
|
62959
|
+
return /* @__PURE__ */ jsxs189(
|
|
62899
62960
|
"div",
|
|
62900
62961
|
{
|
|
62901
62962
|
ref,
|
|
62902
62963
|
className: "pointer-events-none absolute top-0 z-10",
|
|
62903
62964
|
style: { left: offsetLeft, width, height },
|
|
62904
62965
|
children: [
|
|
62905
|
-
/* @__PURE__ */
|
|
62966
|
+
/* @__PURE__ */ jsxs189("svg", { ref: svgRef, width, height, className: "block overflow-visible", children: [
|
|
62906
62967
|
paths.map((p, i) => {
|
|
62907
62968
|
const tokens = getGanttLinkTokens(p.color ?? color);
|
|
62908
62969
|
const sel = selected != null && p.link === selected;
|
|
62909
62970
|
const nodeR = sel ? 4.5 : 3.5;
|
|
62910
|
-
return /* @__PURE__ */
|
|
62971
|
+
return /* @__PURE__ */ jsxs189(
|
|
62911
62972
|
"g",
|
|
62912
62973
|
{
|
|
62913
62974
|
style: sel ? { filter: `drop-shadow(0 0 3px var(--color-${p.color ?? color}-500))` } : void 0,
|
|
62914
62975
|
children: [
|
|
62915
|
-
/* @__PURE__ */
|
|
62976
|
+
/* @__PURE__ */ jsx311(
|
|
62916
62977
|
"path",
|
|
62917
62978
|
{
|
|
62918
62979
|
d: p.d,
|
|
@@ -62928,10 +62989,10 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62928
62989
|
},
|
|
62929
62990
|
onClick: (e) => handlePick(e, p),
|
|
62930
62991
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
62931
|
-
children: /* @__PURE__ */
|
|
62992
|
+
children: /* @__PURE__ */ jsx311("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
62932
62993
|
}
|
|
62933
62994
|
),
|
|
62934
|
-
/* @__PURE__ */
|
|
62995
|
+
/* @__PURE__ */ jsx311(
|
|
62935
62996
|
"path",
|
|
62936
62997
|
{
|
|
62937
62998
|
d: p.d,
|
|
@@ -62947,14 +63008,14 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62947
63008
|
},
|
|
62948
63009
|
onClick: (e) => handlePick(e, p),
|
|
62949
63010
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
62950
|
-
children: /* @__PURE__ */
|
|
63011
|
+
children: /* @__PURE__ */ jsx311("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
62951
63012
|
}
|
|
62952
63013
|
),
|
|
62953
|
-
p.arrow && /* @__PURE__ */
|
|
62954
|
-
/* @__PURE__ */
|
|
62955
|
-
/* @__PURE__ */
|
|
62956
|
-
/* @__PURE__ */
|
|
62957
|
-
/* @__PURE__ */
|
|
63014
|
+
p.arrow && /* @__PURE__ */ jsx311("polygon", { points: p.arrow, className: tokens.fill }),
|
|
63015
|
+
/* @__PURE__ */ jsx311("circle", { cx: p.from.x, cy: p.from.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
63016
|
+
/* @__PURE__ */ jsx311("circle", { cx: p.from.x, cy: p.from.y, r: nodeR, className: tokens.fill }),
|
|
63017
|
+
/* @__PURE__ */ jsx311("circle", { cx: p.to.x, cy: p.to.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
63018
|
+
/* @__PURE__ */ jsx311("circle", { cx: p.to.x, cy: p.to.y, r: nodeR, className: tokens.fill })
|
|
62958
63019
|
]
|
|
62959
63020
|
},
|
|
62960
63021
|
`${p.link.source}->${p.link.target}-${p.type}-${i}`
|
|
@@ -62962,8 +63023,8 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62962
63023
|
}),
|
|
62963
63024
|
rubber && (() => {
|
|
62964
63025
|
const tokens = getGanttLinkTokens(rubber.color);
|
|
62965
|
-
return /* @__PURE__ */
|
|
62966
|
-
/* @__PURE__ */
|
|
63026
|
+
return /* @__PURE__ */ jsxs189("g", { children: [
|
|
63027
|
+
/* @__PURE__ */ jsx311(
|
|
62967
63028
|
"path",
|
|
62968
63029
|
{
|
|
62969
63030
|
d: rubber.d,
|
|
@@ -62974,15 +63035,15 @@ var GanttLinkLayer = forwardRef160(
|
|
|
62974
63035
|
strokeDasharray: "5 3"
|
|
62975
63036
|
}
|
|
62976
63037
|
),
|
|
62977
|
-
rubber.arrow && /* @__PURE__ */
|
|
62978
|
-
/* @__PURE__ */
|
|
62979
|
-
/* @__PURE__ */
|
|
62980
|
-
/* @__PURE__ */
|
|
62981
|
-
/* @__PURE__ */
|
|
63038
|
+
rubber.arrow && /* @__PURE__ */ jsx311("polygon", { points: rubber.arrow, className: tokens.fill }),
|
|
63039
|
+
/* @__PURE__ */ jsx311("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 6, className: tokens.halo }),
|
|
63040
|
+
/* @__PURE__ */ jsx311("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 3.5, className: tokens.fill }),
|
|
63041
|
+
/* @__PURE__ */ jsx311("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 6, className: tokens.halo }),
|
|
63042
|
+
/* @__PURE__ */ jsx311("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 3.5, className: tokens.fill })
|
|
62982
63043
|
] });
|
|
62983
63044
|
})()
|
|
62984
63045
|
] }),
|
|
62985
|
-
canDelete && selMid && /* @__PURE__ */
|
|
63046
|
+
canDelete && selMid && /* @__PURE__ */ jsxs189(
|
|
62986
63047
|
"button",
|
|
62987
63048
|
{
|
|
62988
63049
|
type: "button",
|
|
@@ -63000,7 +63061,7 @@ var GanttLinkLayer = forwardRef160(
|
|
|
63000
63061
|
onClick: () => onDeleteLink(selected),
|
|
63001
63062
|
title: t("kit.gantt.removeDependency"),
|
|
63002
63063
|
children: [
|
|
63003
|
-
/* @__PURE__ */
|
|
63064
|
+
/* @__PURE__ */ jsx311("span", { "aria-hidden": true, children: "\u2715" }),
|
|
63004
63065
|
" ",
|
|
63005
63066
|
t("kit.gantt.delete")
|
|
63006
63067
|
]
|
|
@@ -63014,9 +63075,9 @@ var GanttLinkLayer = forwardRef160(
|
|
|
63014
63075
|
GanttLinkLayer.displayName = "GanttLinkLayer";
|
|
63015
63076
|
|
|
63016
63077
|
// src/components/Gantt/GanttBodyRow.tsx
|
|
63017
|
-
import { useMemo as
|
|
63018
|
-
import
|
|
63019
|
-
import { Fragment as Fragment48, jsx as
|
|
63078
|
+
import { useMemo as useMemo57 } from "react";
|
|
63079
|
+
import classNames121 from "classnames";
|
|
63080
|
+
import { Fragment as Fragment48, jsx as jsx312, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
63020
63081
|
var BAR_HEIGHT = 24;
|
|
63021
63082
|
var MILESTONE_SIZE = 14;
|
|
63022
63083
|
var GanttBodyRow = ({
|
|
@@ -63055,11 +63116,11 @@ var GanttBodyRow = ({
|
|
|
63055
63116
|
const t = useKitT();
|
|
63056
63117
|
const isDraggingThis = row.task != null && drag?.taskId === row.task.id;
|
|
63057
63118
|
const reorderDragging = isDraggingThis && drag?.kind === "reorder";
|
|
63058
|
-
return /* @__PURE__ */
|
|
63119
|
+
return /* @__PURE__ */ jsx312(
|
|
63059
63120
|
"div",
|
|
63060
63121
|
{
|
|
63061
63122
|
"data-row-key": row.key,
|
|
63062
|
-
className:
|
|
63123
|
+
className: classNames121(
|
|
63063
63124
|
// No overflow here: an overflow-hidden row root would become the
|
|
63064
63125
|
// sticky halves' (non-scrolling) scrollport and stop them pinning to
|
|
63065
63126
|
// the left edge while the timeline scrolls. The halves pin the
|
|
@@ -63076,7 +63137,7 @@ var GanttBodyRow = ({
|
|
|
63076
63137
|
boxShadow: `inset 2px 0 0 var(--color-${color}-500)`
|
|
63077
63138
|
} : {}
|
|
63078
63139
|
},
|
|
63079
|
-
children: row.task == null ? /* @__PURE__ */
|
|
63140
|
+
children: row.task == null ? /* @__PURE__ */ jsx312(
|
|
63080
63141
|
LaneHeader,
|
|
63081
63142
|
{
|
|
63082
63143
|
row,
|
|
@@ -63087,20 +63148,20 @@ var GanttBodyRow = ({
|
|
|
63087
63148
|
dividerClass,
|
|
63088
63149
|
liveProgress: liveLane
|
|
63089
63150
|
}
|
|
63090
|
-
) : /* @__PURE__ */
|
|
63091
|
-
/* @__PURE__ */
|
|
63151
|
+
) : /* @__PURE__ */ jsxs190(Fragment48, { children: [
|
|
63152
|
+
/* @__PURE__ */ jsxs190(
|
|
63092
63153
|
"div",
|
|
63093
63154
|
{
|
|
63094
|
-
className:
|
|
63155
|
+
className: classNames121(
|
|
63095
63156
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
63096
63157
|
dividerClass
|
|
63097
63158
|
),
|
|
63098
63159
|
style: { width: leftWidth },
|
|
63099
63160
|
children: [
|
|
63100
|
-
/* @__PURE__ */
|
|
63161
|
+
/* @__PURE__ */ jsx312("div", { className: "flex w-9 shrink-0 items-center justify-center", children: interactive && !row.task.locked && /* @__PURE__ */ jsx312(
|
|
63101
63162
|
"span",
|
|
63102
63163
|
{
|
|
63103
|
-
className:
|
|
63164
|
+
className: classNames121(
|
|
63104
63165
|
"flex cursor-grab touch-none items-center text-neutral-300 transition-opacity active:cursor-grabbing dark:text-neutral-600",
|
|
63105
63166
|
reorderDragging ? "opacity-100" : "opacity-0 group-hover/row:opacity-100"
|
|
63106
63167
|
),
|
|
@@ -63108,10 +63169,10 @@ var GanttBodyRow = ({
|
|
|
63108
63169
|
onPointerDown: (e) => onGripPointerDown(row.key, row.task, e),
|
|
63109
63170
|
title: t("kit.gantt.dragReorder"),
|
|
63110
63171
|
"aria-hidden": "true",
|
|
63111
|
-
children: /* @__PURE__ */
|
|
63172
|
+
children: /* @__PURE__ */ jsx312(Drag, { className: "h-3.5 w-3.5" })
|
|
63112
63173
|
}
|
|
63113
63174
|
) }),
|
|
63114
|
-
columns.map((col, i) => /* @__PURE__ */
|
|
63175
|
+
columns.map((col, i) => /* @__PURE__ */ jsx312(
|
|
63115
63176
|
Cell,
|
|
63116
63177
|
{
|
|
63117
63178
|
col,
|
|
@@ -63132,12 +63193,12 @@ var GanttBodyRow = ({
|
|
|
63132
63193
|
]
|
|
63133
63194
|
}
|
|
63134
63195
|
),
|
|
63135
|
-
/* @__PURE__ */
|
|
63196
|
+
/* @__PURE__ */ jsx312(
|
|
63136
63197
|
"div",
|
|
63137
63198
|
{
|
|
63138
|
-
className:
|
|
63199
|
+
className: classNames121("relative shrink-0 border-b", dividerClass),
|
|
63139
63200
|
style: { width: timelineWidth },
|
|
63140
|
-
children: /* @__PURE__ */
|
|
63201
|
+
children: /* @__PURE__ */ jsx312(
|
|
63141
63202
|
TaskBar,
|
|
63142
63203
|
{
|
|
63143
63204
|
task: row.task,
|
|
@@ -63178,57 +63239,57 @@ var LaneHeader = ({ row, columns, leftWidth, color, onCaretClick, dividerClass =
|
|
|
63178
63239
|
const laneColor = lane.color ?? color;
|
|
63179
63240
|
const tokens = getGanttLaneTokens(laneColor);
|
|
63180
63241
|
const isOpen = lane.open !== false;
|
|
63181
|
-
return /* @__PURE__ */
|
|
63182
|
-
/* @__PURE__ */
|
|
63242
|
+
return /* @__PURE__ */ jsxs190(Fragment48, { children: [
|
|
63243
|
+
/* @__PURE__ */ jsxs190(
|
|
63183
63244
|
"div",
|
|
63184
63245
|
{
|
|
63185
|
-
className:
|
|
63246
|
+
className: classNames121(
|
|
63186
63247
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
63187
63248
|
dividerClass
|
|
63188
63249
|
),
|
|
63189
63250
|
style: { width: leftWidth },
|
|
63190
63251
|
children: [
|
|
63191
|
-
/* @__PURE__ */
|
|
63192
|
-
/* @__PURE__ */
|
|
63252
|
+
/* @__PURE__ */ jsx312("div", { className: classNames121("pointer-events-none absolute inset-0", tokens.band) }),
|
|
63253
|
+
/* @__PURE__ */ jsx312("div", { className: "relative flex w-9 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx312(
|
|
63193
63254
|
"button",
|
|
63194
63255
|
{
|
|
63195
63256
|
type: "button",
|
|
63196
63257
|
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",
|
|
63197
63258
|
onClick: () => onCaretClick(lane.id, isOpen),
|
|
63198
63259
|
"aria-label": t(isOpen ? "kit.gantt.collapse" : "kit.gantt.expand", { name: lane.label }),
|
|
63199
|
-
children: /* @__PURE__ */
|
|
63260
|
+
children: /* @__PURE__ */ jsx312(ChevronRight, { className: classNames121("h-3 w-3 transition-transform", isOpen && "rotate-90") })
|
|
63200
63261
|
}
|
|
63201
63262
|
) }),
|
|
63202
|
-
columns.map((col, i) => /* @__PURE__ */
|
|
63263
|
+
columns.map((col, i) => /* @__PURE__ */ jsx312(
|
|
63203
63264
|
"div",
|
|
63204
63265
|
{
|
|
63205
|
-
className:
|
|
63266
|
+
className: classNames121(
|
|
63206
63267
|
"relative flex shrink-0 items-center gap-2 overflow-hidden border-r px-2 last:border-r-0",
|
|
63207
63268
|
dividerClass
|
|
63208
63269
|
),
|
|
63209
63270
|
style: { width: col.width ?? "160px" },
|
|
63210
|
-
children: i === 0 ? /* @__PURE__ */
|
|
63211
|
-
/* @__PURE__ */
|
|
63212
|
-
lane.description && /* @__PURE__ */
|
|
63213
|
-
row.childCount > 0 && /* @__PURE__ */
|
|
63214
|
-
] }) : col.key === "progress" ? /* @__PURE__ */
|
|
63271
|
+
children: i === 0 ? /* @__PURE__ */ jsxs190(Fragment48, { children: [
|
|
63272
|
+
/* @__PURE__ */ jsx312("span", { className: classNames121("truncate text-[13px] font-semibold", tokens.label), children: lane.label }),
|
|
63273
|
+
lane.description && /* @__PURE__ */ jsx312("span", { className: "hidden truncate text-[11px] text-neutral-500 dark:text-neutral-400 lg:inline", children: lane.description }),
|
|
63274
|
+
row.childCount > 0 && /* @__PURE__ */ jsx312("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 })
|
|
63275
|
+
] }) : col.key === "progress" ? /* @__PURE__ */ jsx312(ProgressCell, { value: liveProgress ?? row.progress ?? 0, barClass: tokens.chip }) : null
|
|
63215
63276
|
},
|
|
63216
63277
|
col.key
|
|
63217
63278
|
))
|
|
63218
63279
|
]
|
|
63219
63280
|
}
|
|
63220
63281
|
),
|
|
63221
|
-
/* @__PURE__ */
|
|
63282
|
+
/* @__PURE__ */ jsx312("div", { className: classNames121("relative min-w-0 flex-1 border-b", dividerClass), children: /* @__PURE__ */ jsx312("div", { className: classNames121("absolute inset-0", tokens.band) }) })
|
|
63222
63283
|
] });
|
|
63223
63284
|
};
|
|
63224
63285
|
var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, renderCell, liveProgress, liveRollup, rowProgress, dividerClass = "border-neutral-100 dark:border-neutral-800" }) => {
|
|
63225
63286
|
const t = useKitT();
|
|
63226
63287
|
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;
|
|
63227
63288
|
const custom = col.key !== "name" && renderCell ? renderCell(value, task, col) : null;
|
|
63228
|
-
return /* @__PURE__ */
|
|
63289
|
+
return /* @__PURE__ */ jsx312(
|
|
63229
63290
|
"div",
|
|
63230
63291
|
{
|
|
63231
|
-
className:
|
|
63292
|
+
className: classNames121(
|
|
63232
63293
|
"flex shrink-0 items-center gap-1.5 overflow-hidden border-r px-2 text-[12.5px] last:border-r-0",
|
|
63233
63294
|
dividerClass
|
|
63234
63295
|
),
|
|
@@ -63236,50 +63297,50 @@ var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, render
|
|
|
63236
63297
|
width: col.width ?? "160px",
|
|
63237
63298
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
63238
63299
|
},
|
|
63239
|
-
children: first ? /* @__PURE__ */
|
|
63240
|
-
/* @__PURE__ */
|
|
63300
|
+
children: first ? /* @__PURE__ */ jsxs190(Fragment48, { children: [
|
|
63301
|
+
/* @__PURE__ */ jsx312("span", { className: "shrink-0", style: { width: depth * 14 + 18 }, children: isGroup && /* @__PURE__ */ jsx312(
|
|
63241
63302
|
"button",
|
|
63242
63303
|
{
|
|
63243
63304
|
type: "button",
|
|
63244
63305
|
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",
|
|
63245
63306
|
onClick: () => onCaretClick(task.id, task.open !== false),
|
|
63246
63307
|
"aria-label": t(task.open === false ? "kit.gantt.expand" : "kit.gantt.collapse", { name: task.name }),
|
|
63247
|
-
children: /* @__PURE__ */
|
|
63308
|
+
children: /* @__PURE__ */ jsx312(ChevronRight, { className: classNames121("h-3 w-3 transition-transform", task.open !== false && "rotate-90") })
|
|
63248
63309
|
}
|
|
63249
63310
|
) }),
|
|
63250
|
-
isGroup && childCount > 0 ? /* @__PURE__ */
|
|
63251
|
-
/* @__PURE__ */
|
|
63252
|
-
/* @__PURE__ */
|
|
63253
|
-
] }) : /* @__PURE__ */
|
|
63254
|
-
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */
|
|
63255
|
-
/* @__PURE__ */
|
|
63311
|
+
isGroup && childCount > 0 ? /* @__PURE__ */ jsxs190("span", { className: "flex min-w-0 items-center gap-1 font-semibold text-neutral-800 dark:text-neutral-100", children: [
|
|
63312
|
+
/* @__PURE__ */ jsx312("span", { className: "truncate", children: task.name }),
|
|
63313
|
+
/* @__PURE__ */ jsx312("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 })
|
|
63314
|
+
] }) : /* @__PURE__ */ jsx312("span", { className: "truncate font-medium text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63315
|
+
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */ jsxs190("span", { className: "flex min-w-0 items-center gap-1.5 text-neutral-600 dark:text-neutral-400", children: [
|
|
63316
|
+
/* @__PURE__ */ jsx312(
|
|
63256
63317
|
"span",
|
|
63257
63318
|
{
|
|
63258
|
-
className:
|
|
63319
|
+
className: classNames121(
|
|
63259
63320
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[8px] font-bold uppercase text-white",
|
|
63260
63321
|
getGanttBarTokens(task.color ?? "blue").fill
|
|
63261
63322
|
),
|
|
63262
63323
|
children: String(value).slice(0, 1)
|
|
63263
63324
|
}
|
|
63264
63325
|
),
|
|
63265
|
-
/* @__PURE__ */
|
|
63266
|
-
] }) : /* @__PURE__ */
|
|
63326
|
+
/* @__PURE__ */ jsx312("span", { className: "truncate", children: String(value) })
|
|
63327
|
+
] }) : /* @__PURE__ */ jsx312("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : col.kind === "progress" ? /* @__PURE__ */ jsx312(ProgressCell, { value: typeof value === "number" ? value : 0 }) : col.kind === "badge" ? task.badge != null ? /* @__PURE__ */ jsx312(
|
|
63267
63328
|
"span",
|
|
63268
63329
|
{
|
|
63269
|
-
className:
|
|
63330
|
+
className: classNames121(
|
|
63270
63331
|
"rounded-full px-1.5 py-0.5 text-[10px] font-semibold",
|
|
63271
63332
|
getGanttBarTokens(task.badgeColor ?? "neutral").fill,
|
|
63272
63333
|
"text-white"
|
|
63273
63334
|
),
|
|
63274
63335
|
children: task.badge
|
|
63275
63336
|
}
|
|
63276
|
-
) : /* @__PURE__ */
|
|
63337
|
+
) : /* @__PURE__ */ jsx312("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : custom != null ? custom : /* @__PURE__ */ jsx312("span", { className: "truncate text-neutral-600 dark:text-neutral-400", children: value == null || value === "" ? "\u2014" : String(value) })
|
|
63277
63338
|
}
|
|
63278
63339
|
);
|
|
63279
63340
|
};
|
|
63280
|
-
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */
|
|
63281
|
-
/* @__PURE__ */
|
|
63282
|
-
/* @__PURE__ */
|
|
63341
|
+
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */ jsxs190("span", { className: "flex w-full items-center gap-1.5", children: [
|
|
63342
|
+
/* @__PURE__ */ jsx312("span", { className: "h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-neutral-200/80 dark:bg-white/10", children: /* @__PURE__ */ jsx312("span", { className: classNames121("block h-full rounded-full", barClass), style: { width: `${Math.round(value * 100)}%` } }) }),
|
|
63343
|
+
/* @__PURE__ */ jsxs190("span", { className: "w-7 shrink-0 text-right text-[10px] font-semibold tabular-nums text-neutral-500 dark:text-neutral-400", children: [
|
|
63283
63344
|
Math.round(value * 100),
|
|
63284
63345
|
"%"
|
|
63285
63346
|
] })
|
|
@@ -63311,7 +63372,7 @@ var TaskBar = ({
|
|
|
63311
63372
|
const t = useKitT();
|
|
63312
63373
|
const milestone = task.type === "milestone";
|
|
63313
63374
|
const barColor = task.color ?? color;
|
|
63314
|
-
const tokens =
|
|
63375
|
+
const tokens = useMemo57(() => getGanttBarTokens(barColor), [barColor]);
|
|
63315
63376
|
const startMs = liveDates ? liveDates.start : toMs(task.start);
|
|
63316
63377
|
const endMs = liveDates ? liveDates.end : toMs(task.end);
|
|
63317
63378
|
const left = dateToX(startMs, rangeStart, zoom);
|
|
@@ -63336,7 +63397,7 @@ var TaskBar = ({
|
|
|
63336
63397
|
pct: progressPct
|
|
63337
63398
|
});
|
|
63338
63399
|
if (milestone) {
|
|
63339
|
-
return /* @__PURE__ */
|
|
63400
|
+
return /* @__PURE__ */ jsxs190(
|
|
63340
63401
|
"div",
|
|
63341
63402
|
{
|
|
63342
63403
|
role: "button",
|
|
@@ -63344,7 +63405,7 @@ var TaskBar = ({
|
|
|
63344
63405
|
"aria-label": ariaLabel,
|
|
63345
63406
|
title: ariaLabel,
|
|
63346
63407
|
"data-gantt-bar": task.id,
|
|
63347
|
-
className:
|
|
63408
|
+
className: classNames121(
|
|
63348
63409
|
"absolute z-10 flex cursor-pointer items-center gap-1.5 outline-none",
|
|
63349
63410
|
selected && selectionTokens.ring,
|
|
63350
63411
|
"rounded"
|
|
@@ -63354,13 +63415,13 @@ var TaskBar = ({
|
|
|
63354
63415
|
onClick: () => onSelect(task.id),
|
|
63355
63416
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63356
63417
|
children: [
|
|
63357
|
-
/* @__PURE__ */
|
|
63358
|
-
/* @__PURE__ */
|
|
63418
|
+
/* @__PURE__ */ jsx312("span", { className: classNames121("h-3.5 w-3.5 shrink-0 rotate-45 rounded-[2px] shadow-sm", tokens.milestone) }),
|
|
63419
|
+
/* @__PURE__ */ jsx312("span", { className: "truncate text-[11px] font-semibold text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63359
63420
|
]
|
|
63360
63421
|
}
|
|
63361
63422
|
);
|
|
63362
63423
|
}
|
|
63363
|
-
return /* @__PURE__ */
|
|
63424
|
+
return /* @__PURE__ */ jsxs190(
|
|
63364
63425
|
"div",
|
|
63365
63426
|
{
|
|
63366
63427
|
role: "button",
|
|
@@ -63368,7 +63429,7 @@ var TaskBar = ({
|
|
|
63368
63429
|
"aria-label": ariaLabel,
|
|
63369
63430
|
title: `${task.name} \xB7 ${formatDateTime(startMs, locale)} \u2192 ${formatDateTime(endMs, locale)} \xB7 ${progressPct}%`,
|
|
63370
63431
|
"data-gantt-bar": task.id,
|
|
63371
|
-
className:
|
|
63432
|
+
className: classNames121(
|
|
63372
63433
|
"group/bar absolute z-10 cursor-grab touch-none rounded-md shadow-sm outline-none transition-shadow active:cursor-grabbing",
|
|
63373
63434
|
tokens.base,
|
|
63374
63435
|
tokens.rim,
|
|
@@ -63385,17 +63446,17 @@ var TaskBar = ({
|
|
|
63385
63446
|
onClick: () => onSelect(task.id),
|
|
63386
63447
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63387
63448
|
children: [
|
|
63388
|
-
progress > 0 && /* @__PURE__ */
|
|
63449
|
+
progress > 0 && /* @__PURE__ */ jsx312(
|
|
63389
63450
|
"div",
|
|
63390
63451
|
{
|
|
63391
|
-
className:
|
|
63452
|
+
className: classNames121("absolute inset-y-0 left-0 rounded-l-md", tokens.progress),
|
|
63392
63453
|
style: { width: `${progress * 100}%` }
|
|
63393
63454
|
}
|
|
63394
63455
|
),
|
|
63395
|
-
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */
|
|
63456
|
+
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */ jsx312(
|
|
63396
63457
|
"div",
|
|
63397
63458
|
{
|
|
63398
|
-
className:
|
|
63459
|
+
className: classNames121(
|
|
63399
63460
|
"absolute inset-y-0 z-20 w-2 cursor-ew-resize touch-none opacity-0 transition-opacity group-hover/bar:opacity-100",
|
|
63400
63461
|
liveProgress != null && "opacity-100"
|
|
63401
63462
|
),
|
|
@@ -63403,10 +63464,10 @@ var TaskBar = ({
|
|
|
63403
63464
|
onPointerDown: (e) => onProgressPointerDown(task, e),
|
|
63404
63465
|
title: labels.progress,
|
|
63405
63466
|
"aria-hidden": "true",
|
|
63406
|
-
children: /* @__PURE__ */
|
|
63467
|
+
children: /* @__PURE__ */ jsx312("div", { className: "mx-auto h-full w-0.5 rounded-full bg-white/90" })
|
|
63407
63468
|
}
|
|
63408
63469
|
),
|
|
63409
|
-
liveProgress != null && /* @__PURE__ */
|
|
63470
|
+
liveProgress != null && /* @__PURE__ */ jsxs190(
|
|
63410
63471
|
"div",
|
|
63411
63472
|
{
|
|
63412
63473
|
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",
|
|
@@ -63417,31 +63478,31 @@ var TaskBar = ({
|
|
|
63417
63478
|
]
|
|
63418
63479
|
}
|
|
63419
63480
|
),
|
|
63420
|
-
showName && (renderBar != null ? /* @__PURE__ */
|
|
63421
|
-
canEdit && /* @__PURE__ */
|
|
63422
|
-
/* @__PURE__ */
|
|
63481
|
+
showName && (renderBar != null ? /* @__PURE__ */ jsx312("div", { className: classNames121("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__ */ jsx312("span", { className: classNames121("pointer-events-none absolute inset-0 flex items-center truncate px-1.5 text-[11px] font-medium", labelText), children: task.name })),
|
|
63482
|
+
canEdit && /* @__PURE__ */ jsxs190(Fragment48, { children: [
|
|
63483
|
+
/* @__PURE__ */ jsx312(
|
|
63423
63484
|
"div",
|
|
63424
63485
|
{
|
|
63425
63486
|
className: "absolute inset-y-0 -left-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63426
63487
|
onPointerDown: (e) => onResizePointerDown(task, "start", e),
|
|
63427
63488
|
title: t("kit.gantt.resizeStart"),
|
|
63428
63489
|
"aria-hidden": "true",
|
|
63429
|
-
children: /* @__PURE__ */
|
|
63490
|
+
children: /* @__PURE__ */ jsx312("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63430
63491
|
}
|
|
63431
63492
|
),
|
|
63432
|
-
/* @__PURE__ */
|
|
63493
|
+
/* @__PURE__ */ jsx312(
|
|
63433
63494
|
"div",
|
|
63434
63495
|
{
|
|
63435
63496
|
className: "absolute inset-y-0 -right-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63436
63497
|
onPointerDown: (e) => onResizePointerDown(task, "end", e),
|
|
63437
63498
|
title: t("kit.gantt.resizeEnd"),
|
|
63438
63499
|
"aria-hidden": "true",
|
|
63439
|
-
children: /* @__PURE__ */
|
|
63500
|
+
children: /* @__PURE__ */ jsx312("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63440
63501
|
}
|
|
63441
63502
|
)
|
|
63442
63503
|
] }),
|
|
63443
|
-
canEdit && /* @__PURE__ */
|
|
63444
|
-
/* @__PURE__ */
|
|
63504
|
+
canEdit && /* @__PURE__ */ jsxs190(Fragment48, { children: [
|
|
63505
|
+
/* @__PURE__ */ jsx312(
|
|
63445
63506
|
"button",
|
|
63446
63507
|
{
|
|
63447
63508
|
type: "button",
|
|
@@ -63452,7 +63513,7 @@ var TaskBar = ({
|
|
|
63452
63513
|
"aria-label": t("kit.gantt.linkFromStart", { task: task.name })
|
|
63453
63514
|
}
|
|
63454
63515
|
),
|
|
63455
|
-
/* @__PURE__ */
|
|
63516
|
+
/* @__PURE__ */ jsx312(
|
|
63456
63517
|
"button",
|
|
63457
63518
|
{
|
|
63458
63519
|
type: "button",
|
|
@@ -63470,9 +63531,9 @@ var TaskBar = ({
|
|
|
63470
63531
|
};
|
|
63471
63532
|
|
|
63472
63533
|
// src/components/Gantt/GanttToolbar.tsx
|
|
63473
|
-
import { useMemo as
|
|
63474
|
-
import
|
|
63475
|
-
import { jsx as
|
|
63534
|
+
import { useMemo as useMemo58 } from "react";
|
|
63535
|
+
import classNames122 from "classnames";
|
|
63536
|
+
import { jsx as jsx313, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
63476
63537
|
function nearestPreset(zoom, presets) {
|
|
63477
63538
|
let best = null;
|
|
63478
63539
|
let bestDist = Infinity;
|
|
@@ -63499,25 +63560,25 @@ var GanttToolbar = ({
|
|
|
63499
63560
|
Month: t("kit.gantt.zoomMonth"),
|
|
63500
63561
|
Quarter: t("kit.gantt.zoomQuarter")
|
|
63501
63562
|
};
|
|
63502
|
-
const active =
|
|
63503
|
-
const chrome =
|
|
63563
|
+
const active = useMemo58(() => nearestPreset(zoom, presets), [zoom, presets]);
|
|
63564
|
+
const chrome = useMemo58(
|
|
63504
63565
|
() => getSurfaceVariantClasses(variant, "neutral"),
|
|
63505
63566
|
[variant]
|
|
63506
63567
|
);
|
|
63507
|
-
return /* @__PURE__ */
|
|
63568
|
+
return /* @__PURE__ */ jsxs191(
|
|
63508
63569
|
"div",
|
|
63509
63570
|
{
|
|
63510
|
-
className:
|
|
63571
|
+
className: classNames122(
|
|
63511
63572
|
"pointer-events-auto flex items-center gap-1 rounded-lg p-1",
|
|
63512
63573
|
chrome
|
|
63513
63574
|
),
|
|
63514
63575
|
children: [
|
|
63515
|
-
/* @__PURE__ */
|
|
63576
|
+
/* @__PURE__ */ jsx313("div", { className: "flex items-center rounded-md bg-neutral-100 p-0.5 dark:bg-neutral-800", children: presets.map((p) => /* @__PURE__ */ jsx313(
|
|
63516
63577
|
"button",
|
|
63517
63578
|
{
|
|
63518
63579
|
type: "button",
|
|
63519
63580
|
onClick: () => onZoomTo(p.value),
|
|
63520
|
-
className:
|
|
63581
|
+
className: classNames122(
|
|
63521
63582
|
"rounded px-1.5 py-0.5 text-[10.5px] font-semibold transition-colors",
|
|
63522
63583
|
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"
|
|
63523
63584
|
),
|
|
@@ -63525,9 +63586,9 @@ var GanttToolbar = ({
|
|
|
63525
63586
|
},
|
|
63526
63587
|
p.label
|
|
63527
63588
|
)) }),
|
|
63528
|
-
/* @__PURE__ */
|
|
63529
|
-
/* @__PURE__ */
|
|
63530
|
-
/* @__PURE__ */
|
|
63589
|
+
/* @__PURE__ */ jsx313("div", { className: "mx-0.5 h-4 w-px bg-neutral-200 dark:bg-neutral-700" }),
|
|
63590
|
+
/* @__PURE__ */ jsx313(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1 / 1.25), "aria-label": t("kit.gantt.zoomOut"), children: /* @__PURE__ */ jsx313("span", { className: "text-xs font-semibold leading-none", children: "\u2212" }) }),
|
|
63591
|
+
/* @__PURE__ */ jsx313(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1.25), "aria-label": t("kit.gantt.zoomIn"), children: /* @__PURE__ */ jsx313("span", { className: "text-xs font-semibold leading-none", children: "+" }) })
|
|
63531
63592
|
]
|
|
63532
63593
|
}
|
|
63533
63594
|
);
|
|
@@ -63535,7 +63596,7 @@ var GanttToolbar = ({
|
|
|
63535
63596
|
GanttToolbar.displayName = "GanttToolbar";
|
|
63536
63597
|
|
|
63537
63598
|
// src/components/Gantt/useGanttDrag.ts
|
|
63538
|
-
import { useCallback as useCallback41, useEffect as useEffect70, useMemo as
|
|
63599
|
+
import { useCallback as useCallback41, useEffect as useEffect70, useMemo as useMemo59, useRef as useRef67, useState as useState78 } from "react";
|
|
63539
63600
|
function useGanttDrag(opts) {
|
|
63540
63601
|
const [drag, setDrag] = useState78(null);
|
|
63541
63602
|
const [linkSelected, setLinkSelected] = useState78(null);
|
|
@@ -63853,7 +63914,7 @@ function useGanttDrag(opts) {
|
|
|
63853
63914
|
},
|
|
63854
63915
|
[beginDrag, timelineX, rowY]
|
|
63855
63916
|
);
|
|
63856
|
-
const rubber =
|
|
63917
|
+
const rubber = useMemo59(() => {
|
|
63857
63918
|
if (!drag || drag.kind !== "link") return null;
|
|
63858
63919
|
const source = barGeom(drag.taskId);
|
|
63859
63920
|
if (!source) return null;
|
|
@@ -63885,7 +63946,7 @@ function useGanttDrag(opts) {
|
|
|
63885
63946
|
}
|
|
63886
63947
|
|
|
63887
63948
|
// src/components/Gantt/Gantt.tsx
|
|
63888
|
-
import { jsx as
|
|
63949
|
+
import { jsx as jsx314, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
63889
63950
|
var HEADER_HEIGHT = 52;
|
|
63890
63951
|
var GRIP_WIDTH = 36;
|
|
63891
63952
|
var DEFAULT_COLUMNS = [
|
|
@@ -63944,7 +64005,7 @@ var Gantt = ({
|
|
|
63944
64005
|
const t = useKitT();
|
|
63945
64006
|
const kitEngine = useKitEngine();
|
|
63946
64007
|
const dateLocale = locale ?? kitEngine.locale;
|
|
63947
|
-
const allLabels =
|
|
64008
|
+
const allLabels = useMemo60(
|
|
63948
64009
|
() => ({
|
|
63949
64010
|
loading: t("kit.gantt.loading"),
|
|
63950
64011
|
empty: t("kit.gantt.empty"),
|
|
@@ -63967,7 +64028,7 @@ var Gantt = ({
|
|
|
63967
64028
|
title: c.key === "name" ? allLabels.task : c.key === "owner" ? t("kit.gantt.colOwner") : t("kit.gantt.colProgress")
|
|
63968
64029
|
}));
|
|
63969
64030
|
const interactive = editable ?? Boolean(onTasksChange || onLinksChange || onReorder);
|
|
63970
|
-
const surfaceText =
|
|
64031
|
+
const surfaceText = useMemo60(() => getSurfaceTextTokens(variant), [variant]);
|
|
63971
64032
|
const [internalZoom, setInternalZoom] = useState79(initialZoom);
|
|
63972
64033
|
const zoom = zoomProp ?? internalZoom;
|
|
63973
64034
|
const setZoom = useCallback42(
|
|
@@ -64030,30 +64091,30 @@ var Gantt = ({
|
|
|
64030
64091
|
return next;
|
|
64031
64092
|
});
|
|
64032
64093
|
}, []);
|
|
64033
|
-
const effectiveTasks =
|
|
64094
|
+
const effectiveTasks = useMemo60(() => {
|
|
64034
64095
|
let out = tasks;
|
|
64035
64096
|
if (collapsed.size > 0) {
|
|
64036
64097
|
out = out.map((t2) => collapsed.has(t2.id) ? { ...t2, open: false } : t2);
|
|
64037
64098
|
}
|
|
64038
64099
|
return out;
|
|
64039
64100
|
}, [tasks, collapsed]);
|
|
64040
|
-
const effectiveLanes =
|
|
64101
|
+
const effectiveLanes = useMemo60(() => {
|
|
64041
64102
|
if (closedLanes.size === 0) return lanes;
|
|
64042
64103
|
return (lanes ?? []).map(
|
|
64043
64104
|
(l) => closedLanes.has(l.id) ? { ...l, open: false } : l
|
|
64044
64105
|
);
|
|
64045
64106
|
}, [lanes, closedLanes]);
|
|
64046
|
-
const committedModel =
|
|
64107
|
+
const committedModel = useMemo60(
|
|
64047
64108
|
() => buildRows(effectiveTasks, effectiveLanes, rowOrder, rowHeight2),
|
|
64048
64109
|
[effectiveTasks, effectiveLanes, rowOrder, rowHeight2]
|
|
64049
64110
|
);
|
|
64050
|
-
const range =
|
|
64111
|
+
const range = useMemo60(() => {
|
|
64051
64112
|
const starts = tasks.map((t2) => toMs(t2.start));
|
|
64052
64113
|
const ends = tasks.map((t2) => toMs(t2.end));
|
|
64053
64114
|
return computeViewRange(starts, ends);
|
|
64054
64115
|
}, [tasks]);
|
|
64055
64116
|
const timelineWidth = rangeWidth(range.start, range.end, zoom);
|
|
64056
|
-
const scaleLevels =
|
|
64117
|
+
const scaleLevels = useMemo60(
|
|
64057
64118
|
() => buildTimeScale(range.start, range.end, zoom, dateLocale),
|
|
64058
64119
|
[range, zoom, dateLocale]
|
|
64059
64120
|
);
|
|
@@ -64070,7 +64131,7 @@ var Gantt = ({
|
|
|
64070
64131
|
const m = /^(\d+(?:\.\d+)?)px$/.exec(col.width ?? "");
|
|
64071
64132
|
return m ? Number(m[1]) : 160;
|
|
64072
64133
|
};
|
|
64073
|
-
const sizedColumns =
|
|
64134
|
+
const sizedColumns = useMemo60(
|
|
64074
64135
|
() => resolvedColumns.map((c) => ({ ...c, width: `${effectiveColWidth(c)}px` })),
|
|
64075
64136
|
[resolvedColumns, colWidths]
|
|
64076
64137
|
);
|
|
@@ -64078,7 +64139,7 @@ var Gantt = ({
|
|
|
64078
64139
|
effectiveWidthsRef.current = Object.fromEntries(
|
|
64079
64140
|
sizedColumns.map((c) => [c.key, effectiveColWidth(c)])
|
|
64080
64141
|
);
|
|
64081
|
-
const leftWidth =
|
|
64142
|
+
const leftWidth = useMemo60(
|
|
64082
64143
|
() => GRIP_WIDTH + resolvedColumns.reduce((sum, c) => sum + effectiveColWidth(c), 0),
|
|
64083
64144
|
[resolvedColumns, colWidths]
|
|
64084
64145
|
);
|
|
@@ -64187,12 +64248,12 @@ var Gantt = ({
|
|
|
64187
64248
|
rowOrder,
|
|
64188
64249
|
setSelected
|
|
64189
64250
|
});
|
|
64190
|
-
const liveReorder =
|
|
64251
|
+
const liveReorder = useMemo60(() => {
|
|
64191
64252
|
const d = dragApi.drag;
|
|
64192
64253
|
if (d?.kind !== "reorder" || d.beforeId === void 0) return null;
|
|
64193
64254
|
return applyRowReorder(effectiveTasks, d.taskId, d.beforeId, rowOrder);
|
|
64194
64255
|
}, [dragApi.drag, effectiveTasks, rowOrder]);
|
|
64195
|
-
const liveModel =
|
|
64256
|
+
const liveModel = useMemo60(
|
|
64196
64257
|
() => liveReorder ? buildRows(
|
|
64197
64258
|
liveReorder.tasks,
|
|
64198
64259
|
effectiveLanes,
|
|
@@ -64202,7 +64263,7 @@ var Gantt = ({
|
|
|
64202
64263
|
[liveReorder, effectiveLanes, rowHeight2, committedModel]
|
|
64203
64264
|
);
|
|
64204
64265
|
liveRowsRef.current = liveModel.rows;
|
|
64205
|
-
const bars =
|
|
64266
|
+
const bars = useMemo60(() => {
|
|
64206
64267
|
const map = /* @__PURE__ */ new Map();
|
|
64207
64268
|
for (const row of liveModel.rows) {
|
|
64208
64269
|
if (!row.task) continue;
|
|
@@ -64358,22 +64419,22 @@ var Gantt = ({
|
|
|
64358
64419
|
const drag = dragApi.drag;
|
|
64359
64420
|
const dragTask = drag?.taskId ? committedModel.tasksById.get(drag.taskId) : void 0;
|
|
64360
64421
|
const reorderLineY = drag?.kind === "reorder" && drag.beforeId !== void 0 ? reorderPreviewTop(liveModel.rows, `task:${drag.taskId}`, drag.beforeId) : null;
|
|
64361
|
-
const dragSubtree =
|
|
64422
|
+
const dragSubtree = useMemo60(() => {
|
|
64362
64423
|
if (dragApi.drag?.kind !== "reorder") return null;
|
|
64363
64424
|
return reorderDragSubtree(
|
|
64364
64425
|
liveModel.rows,
|
|
64365
64426
|
`task:${dragApi.drag.taskId}`
|
|
64366
64427
|
);
|
|
64367
64428
|
}, [dragApi.drag, liveModel.rows]);
|
|
64368
|
-
const dragSubtreeKeys =
|
|
64429
|
+
const dragSubtreeKeys = useMemo60(
|
|
64369
64430
|
() => new Set((dragSubtree ?? []).map((r) => r.key)),
|
|
64370
64431
|
[dragSubtree]
|
|
64371
64432
|
);
|
|
64372
|
-
const dragSubtreeHeight =
|
|
64433
|
+
const dragSubtreeHeight = useMemo60(
|
|
64373
64434
|
() => (dragSubtree ?? []).reduce((sum, r) => sum + r.height, 0),
|
|
64374
64435
|
[dragSubtree]
|
|
64375
64436
|
);
|
|
64376
|
-
const liveDragDates =
|
|
64437
|
+
const liveDragDates = useMemo60(() => {
|
|
64377
64438
|
if (!drag || !dragTask) return null;
|
|
64378
64439
|
if (drag.kind !== "move" && drag.kind !== "resize-start" && drag.kind !== "resize-end") return null;
|
|
64379
64440
|
return applyDragDates(
|
|
@@ -64384,7 +64445,7 @@ var Gantt = ({
|
|
|
64384
64445
|
);
|
|
64385
64446
|
}, [drag, dragTask, zoom, snap2]);
|
|
64386
64447
|
const liveDragProgress = drag?.kind === "progress" && drag.liveProgress != null ? drag.liveProgress : null;
|
|
64387
|
-
const dragOverride =
|
|
64448
|
+
const dragOverride = useMemo60(() => {
|
|
64388
64449
|
if (!drag || !dragTask) return null;
|
|
64389
64450
|
if (drag.kind === "progress" && drag.liveProgress != null) {
|
|
64390
64451
|
return { ...dragTask, progress: drag.liveProgress };
|
|
@@ -64394,11 +64455,11 @@ var Gantt = ({
|
|
|
64394
64455
|
}
|
|
64395
64456
|
return null;
|
|
64396
64457
|
}, [drag, dragTask, liveDragDates]);
|
|
64397
|
-
const liveLaneProgress =
|
|
64458
|
+
const liveLaneProgress = useMemo60(
|
|
64398
64459
|
() => dragOverride && dragTask ? laneRollupProgress(effectiveTasks, dragTask.id, dragOverride) : null,
|
|
64399
64460
|
[dragOverride, dragTask, effectiveTasks]
|
|
64400
64461
|
);
|
|
64401
|
-
const liveGroupProgress =
|
|
64462
|
+
const liveGroupProgress = useMemo60(() => {
|
|
64402
64463
|
if (!dragOverride || !dragTask) return null;
|
|
64403
64464
|
const byId = new Map(effectiveTasks.map((t2) => [t2.id, t2]));
|
|
64404
64465
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -64410,7 +64471,7 @@ var Gantt = ({
|
|
|
64410
64471
|
}
|
|
64411
64472
|
return m.size > 0 ? m : null;
|
|
64412
64473
|
}, [dragOverride, dragTask, effectiveTasks]);
|
|
64413
|
-
const liveLinkBars =
|
|
64474
|
+
const liveLinkBars = useMemo60(() => {
|
|
64414
64475
|
if (!liveDragDates || !dragTask) return bars;
|
|
64415
64476
|
const g = bars.get(dragTask.id);
|
|
64416
64477
|
if (!g) return bars;
|
|
@@ -64419,12 +64480,12 @@ var Gantt = ({
|
|
|
64419
64480
|
if (left === g.left && width === g.width) return bars;
|
|
64420
64481
|
return new Map(bars).set(dragTask.id, { ...g, left, width });
|
|
64421
64482
|
}, [bars, liveDragDates, dragTask, range, zoom]);
|
|
64422
|
-
const linkPaths =
|
|
64483
|
+
const linkPaths = useMemo60(
|
|
64423
64484
|
() => computeLinkPaths(links, liveLinkBars, color),
|
|
64424
64485
|
[links, liveLinkBars, color]
|
|
64425
64486
|
);
|
|
64426
|
-
const linkFan =
|
|
64427
|
-
return /* @__PURE__ */
|
|
64487
|
+
const linkFan = useMemo60(() => computeLinkFanOffsets(links, bars), [links, bars]);
|
|
64488
|
+
return /* @__PURE__ */ jsx314(
|
|
64428
64489
|
Panel_default,
|
|
64429
64490
|
{
|
|
64430
64491
|
ref: rootRef,
|
|
@@ -64442,31 +64503,31 @@ var Gantt = ({
|
|
|
64442
64503
|
"aria-label": t("kit.gantt.root"),
|
|
64443
64504
|
onKeyDown: onRootKeyDown,
|
|
64444
64505
|
onPointerDown: handleRootPointerDown,
|
|
64445
|
-
children: /* @__PURE__ */
|
|
64446
|
-
/* @__PURE__ */
|
|
64506
|
+
children: /* @__PURE__ */ jsxs192("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
64507
|
+
/* @__PURE__ */ jsxs192(
|
|
64447
64508
|
"div",
|
|
64448
64509
|
{
|
|
64449
|
-
className:
|
|
64510
|
+
className: classNames123(
|
|
64450
64511
|
"flex shrink-0 items-center gap-3 border-b px-4 py-3",
|
|
64451
64512
|
surfaceText.divider
|
|
64452
64513
|
),
|
|
64453
64514
|
children: [
|
|
64454
|
-
hasNode(icon) && /* @__PURE__ */
|
|
64515
|
+
hasNode(icon) && /* @__PURE__ */ jsx314(
|
|
64455
64516
|
"div",
|
|
64456
64517
|
{
|
|
64457
|
-
className:
|
|
64518
|
+
className: classNames123(
|
|
64458
64519
|
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
64459
64520
|
getSurfaceVariantClasses(variant, "neutral")
|
|
64460
64521
|
),
|
|
64461
64522
|
children: icon
|
|
64462
64523
|
}
|
|
64463
64524
|
),
|
|
64464
|
-
(title != null || subtitle != null) && /* @__PURE__ */
|
|
64465
|
-
subtitle != null && /* @__PURE__ */
|
|
64466
|
-
title != null && /* @__PURE__ */
|
|
64525
|
+
(title != null || subtitle != null) && /* @__PURE__ */ jsxs192("div", { className: "min-w-0 flex-1", children: [
|
|
64526
|
+
subtitle != null && /* @__PURE__ */ jsx314("div", { className: "truncate text-[11px] font-semibold uppercase tracking-wider text-neutral-500 dark:text-neutral-400", children: subtitle }),
|
|
64527
|
+
title != null && /* @__PURE__ */ jsx314("div", { className: "truncate text-lg font-semibold text-neutral-900 dark:text-white", children: title })
|
|
64467
64528
|
] }),
|
|
64468
|
-
hasNode(actions) && /* @__PURE__ */
|
|
64469
|
-
/* @__PURE__ */
|
|
64529
|
+
hasNode(actions) && /* @__PURE__ */ jsx314("div", { className: "flex shrink-0 items-center gap-2", children: actions }),
|
|
64530
|
+
/* @__PURE__ */ jsx314("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ jsx314(
|
|
64470
64531
|
GanttToolbar,
|
|
64471
64532
|
{
|
|
64472
64533
|
variant,
|
|
@@ -64479,31 +64540,31 @@ var Gantt = ({
|
|
|
64479
64540
|
]
|
|
64480
64541
|
}
|
|
64481
64542
|
),
|
|
64482
|
-
/* @__PURE__ */
|
|
64543
|
+
/* @__PURE__ */ jsxs192(
|
|
64483
64544
|
"div",
|
|
64484
64545
|
{
|
|
64485
|
-
className:
|
|
64546
|
+
className: classNames123(
|
|
64486
64547
|
"relative flex shrink-0 items-stretch border-b",
|
|
64487
64548
|
surfaceText.divider
|
|
64488
64549
|
),
|
|
64489
64550
|
style: { height: HEADER_HEIGHT },
|
|
64490
64551
|
children: [
|
|
64491
|
-
/* @__PURE__ */
|
|
64552
|
+
/* @__PURE__ */ jsxs192(
|
|
64492
64553
|
"div",
|
|
64493
64554
|
{
|
|
64494
|
-
className:
|
|
64555
|
+
className: classNames123(
|
|
64495
64556
|
"flex items-stretch border-r bg-white dark:bg-neutral-900",
|
|
64496
64557
|
surfaceText.divider
|
|
64497
64558
|
),
|
|
64498
64559
|
style: { width: leftWidth },
|
|
64499
64560
|
children: [
|
|
64500
|
-
/* @__PURE__ */
|
|
64561
|
+
/* @__PURE__ */ jsx314("div", { className: "w-9 shrink-0" }),
|
|
64501
64562
|
sizedColumns.map((col) => {
|
|
64502
64563
|
const resizable = resizableColumns && col.resizable !== false;
|
|
64503
|
-
return /* @__PURE__ */
|
|
64564
|
+
return /* @__PURE__ */ jsxs192(
|
|
64504
64565
|
"div",
|
|
64505
64566
|
{
|
|
64506
|
-
className:
|
|
64567
|
+
className: classNames123(
|
|
64507
64568
|
"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",
|
|
64508
64569
|
surfaceText.divider
|
|
64509
64570
|
),
|
|
@@ -64512,7 +64573,7 @@ var Gantt = ({
|
|
|
64512
64573
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
64513
64574
|
},
|
|
64514
64575
|
children: [
|
|
64515
|
-
/* @__PURE__ */
|
|
64576
|
+
/* @__PURE__ */ jsx314("span", { className: "truncate", children: col.title }),
|
|
64516
64577
|
resizable && /* Resize handle — Table's header-edge pattern: an 8px hit
|
|
64517
64578
|
area whose 1px line sits exactly on the column border.
|
|
64518
64579
|
Absolute insets stop at the padding edge (1px inside
|
|
@@ -64521,7 +64582,7 @@ var Gantt = ({
|
|
|
64521
64582
|
the border's own pixel. The cell carries no
|
|
64522
64583
|
overflow-hidden so the line can paint over the border
|
|
64523
64584
|
(the title span truncates itself). */
|
|
64524
|
-
/* @__PURE__ */
|
|
64585
|
+
/* @__PURE__ */ jsx314(
|
|
64525
64586
|
"div",
|
|
64526
64587
|
{
|
|
64527
64588
|
role: "separator",
|
|
@@ -64530,7 +64591,7 @@ var Gantt = ({
|
|
|
64530
64591
|
className: "group/rh absolute inset-y-0 -right-px z-10 flex w-2 cursor-col-resize select-none items-stretch justify-end",
|
|
64531
64592
|
onPointerDown: (e) => startColumnResize(e, col.key),
|
|
64532
64593
|
title: t("kit.gantt.resizeColumn", { column: col.title }),
|
|
64533
|
-
children: /* @__PURE__ */
|
|
64594
|
+
children: /* @__PURE__ */ jsx314(
|
|
64534
64595
|
"div",
|
|
64535
64596
|
{
|
|
64536
64597
|
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",
|
|
@@ -64547,30 +64608,30 @@ var Gantt = ({
|
|
|
64547
64608
|
]
|
|
64548
64609
|
}
|
|
64549
64610
|
),
|
|
64550
|
-
/* @__PURE__ */
|
|
64611
|
+
/* @__PURE__ */ jsx314("div", { className: "relative min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsxs192(
|
|
64551
64612
|
"div",
|
|
64552
64613
|
{
|
|
64553
64614
|
ref: headerScaleRef,
|
|
64554
64615
|
className: "relative h-full",
|
|
64555
64616
|
style: { width: timelineWidth },
|
|
64556
64617
|
children: [
|
|
64557
|
-
/* @__PURE__ */
|
|
64558
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */
|
|
64618
|
+
/* @__PURE__ */ jsx314(GanttScale, { levels: scaleLevels, height: HEADER_HEIGHT }),
|
|
64619
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ jsx314(
|
|
64559
64620
|
"div",
|
|
64560
64621
|
{
|
|
64561
|
-
className:
|
|
64622
|
+
className: classNames123(
|
|
64562
64623
|
"pointer-events-none absolute inset-y-0 z-[1] border-l-2",
|
|
64563
64624
|
todayTokens.line
|
|
64564
64625
|
),
|
|
64565
64626
|
style: { left: todayX }
|
|
64566
64627
|
}
|
|
64567
64628
|
),
|
|
64568
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */
|
|
64629
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ jsx314(
|
|
64569
64630
|
"div",
|
|
64570
64631
|
{
|
|
64571
64632
|
className: "pointer-events-none absolute top-1 z-10 -translate-x-1/2",
|
|
64572
64633
|
style: { left: todayX },
|
|
64573
|
-
children: /* @__PURE__ */
|
|
64634
|
+
children: /* @__PURE__ */ jsx314("span", { className: classNames123("rounded-full px-2 py-0.5 text-[10px] font-semibold text-white shadow-sm", todayTokens.chip), children: allLabels.today })
|
|
64574
64635
|
}
|
|
64575
64636
|
)
|
|
64576
64637
|
]
|
|
@@ -64579,20 +64640,20 @@ var Gantt = ({
|
|
|
64579
64640
|
]
|
|
64580
64641
|
}
|
|
64581
64642
|
),
|
|
64582
|
-
/* @__PURE__ */
|
|
64643
|
+
/* @__PURE__ */ jsx314(
|
|
64583
64644
|
"div",
|
|
64584
64645
|
{
|
|
64585
64646
|
ref: scrollRef,
|
|
64586
64647
|
className: `gantt-scroller min-h-0 flex-1 overflow-auto overscroll-contain [&::-webkit-scrollbar]:h-1.5 ${THIN_SCROLLBAR}`,
|
|
64587
64648
|
onScroll: syncHeaderScale,
|
|
64588
|
-
children: /* @__PURE__ */
|
|
64589
|
-
/* @__PURE__ */
|
|
64649
|
+
children: /* @__PURE__ */ jsx314("div", { style: { width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER, minWidth: "100%" }, children: loading ? /* @__PURE__ */ jsx314(GanttSkeleton, { rows: 12, rowHeight: rowHeight2, leftWidth }) : isEmpty2 ? /* @__PURE__ */ jsx314("div", { className: "flex items-center justify-center text-sm text-neutral-500", style: { height: bodyHeight || 160, width: leftWidth + timelineWidth }, children: emptyState ?? allLabels.empty }) : /* @__PURE__ */ jsxs192("div", { className: "relative", style: { height: bodyHeight }, children: [
|
|
64650
|
+
/* @__PURE__ */ jsxs192(
|
|
64590
64651
|
"div",
|
|
64591
64652
|
{
|
|
64592
64653
|
className: "pointer-events-none absolute inset-y-0 z-0",
|
|
64593
64654
|
style: { left: leftWidth, width: timelineWidth },
|
|
64594
64655
|
children: [
|
|
64595
|
-
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */
|
|
64656
|
+
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */ jsx314(
|
|
64596
64657
|
"div",
|
|
64597
64658
|
{
|
|
64598
64659
|
className: "absolute inset-y-0 border-r border-neutral-100 dark:border-neutral-800",
|
|
@@ -64600,10 +64661,10 @@ var Gantt = ({
|
|
|
64600
64661
|
},
|
|
64601
64662
|
c.id
|
|
64602
64663
|
)),
|
|
64603
|
-
todayVisible && /* @__PURE__ */
|
|
64664
|
+
todayVisible && /* @__PURE__ */ jsx314(
|
|
64604
64665
|
"div",
|
|
64605
64666
|
{
|
|
64606
|
-
className:
|
|
64667
|
+
className: classNames123("absolute inset-y-0 border-l-2", todayTokens.line),
|
|
64607
64668
|
style: { left: todayX }
|
|
64608
64669
|
}
|
|
64609
64670
|
)
|
|
@@ -64613,7 +64674,7 @@ var Gantt = ({
|
|
|
64613
64674
|
liveModel.rows.map((row) => {
|
|
64614
64675
|
const isDragSource = drag?.kind === "reorder" && row.task != null && row.task.id === drag.taskId;
|
|
64615
64676
|
if (isDragSource) {
|
|
64616
|
-
return /* @__PURE__ */
|
|
64677
|
+
return /* @__PURE__ */ jsx314(
|
|
64617
64678
|
"div",
|
|
64618
64679
|
{
|
|
64619
64680
|
"data-row-key": row.key,
|
|
@@ -64621,7 +64682,7 @@ var Gantt = ({
|
|
|
64621
64682
|
"aria-hidden": "true",
|
|
64622
64683
|
className: "pointer-events-none flex border-b",
|
|
64623
64684
|
style: { height: dragSubtreeHeight || row.height },
|
|
64624
|
-
children: /* @__PURE__ */
|
|
64685
|
+
children: /* @__PURE__ */ jsx314(
|
|
64625
64686
|
"div",
|
|
64626
64687
|
{
|
|
64627
64688
|
className: "m-1 flex-1 rounded-md border-2 border-dashed",
|
|
@@ -64638,7 +64699,7 @@ var Gantt = ({
|
|
|
64638
64699
|
if (drag?.kind === "reorder" && dragSubtreeKeys.has(row.key)) {
|
|
64639
64700
|
return null;
|
|
64640
64701
|
}
|
|
64641
|
-
return /* @__PURE__ */
|
|
64702
|
+
return /* @__PURE__ */ jsx314(
|
|
64642
64703
|
GanttBodyRow,
|
|
64643
64704
|
{
|
|
64644
64705
|
row,
|
|
@@ -64676,7 +64737,7 @@ var Gantt = ({
|
|
|
64676
64737
|
row.key
|
|
64677
64738
|
);
|
|
64678
64739
|
}),
|
|
64679
|
-
/* @__PURE__ */
|
|
64740
|
+
/* @__PURE__ */ jsx314(
|
|
64680
64741
|
GanttLinkLayer,
|
|
64681
64742
|
{
|
|
64682
64743
|
ref: overlayRef,
|
|
@@ -64692,7 +64753,7 @@ var Gantt = ({
|
|
|
64692
64753
|
onDeleteLink: interactive && onLinksChange ? deleteSelectedLink : void 0
|
|
64693
64754
|
}
|
|
64694
64755
|
),
|
|
64695
|
-
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */
|
|
64756
|
+
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */ jsx314(
|
|
64696
64757
|
"div",
|
|
64697
64758
|
{
|
|
64698
64759
|
className: "pointer-events-none absolute z-30 h-0.5 rounded-full",
|
|
@@ -64712,7 +64773,7 @@ var Gantt = ({
|
|
|
64712
64773
|
// there is no filtered/overflowing ancestor and the fixed
|
|
64713
64774
|
// clone always tracks the viewport pointer.
|
|
64714
64775
|
createPortal15(
|
|
64715
|
-
/* @__PURE__ */
|
|
64776
|
+
/* @__PURE__ */ jsx314(
|
|
64716
64777
|
"div",
|
|
64717
64778
|
{
|
|
64718
64779
|
"data-gantt-drag-clone": "true",
|
|
@@ -64723,14 +64784,14 @@ var Gantt = ({
|
|
|
64723
64784
|
top: drag.clientY - (drag.grabOffset?.y ?? 0),
|
|
64724
64785
|
width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER
|
|
64725
64786
|
},
|
|
64726
|
-
children: /* @__PURE__ */
|
|
64787
|
+
children: /* @__PURE__ */ jsx314(
|
|
64727
64788
|
"div",
|
|
64728
64789
|
{
|
|
64729
64790
|
className: "overflow-hidden rounded-lg bg-white/95 shadow-2xl backdrop-blur-sm dark:bg-neutral-900/95",
|
|
64730
64791
|
style: {
|
|
64731
64792
|
boxShadow: `0 8px 32px rgba(0, 0, 0, 0.28), inset 2px 0 0 var(--color-${color}-500)`
|
|
64732
64793
|
},
|
|
64733
|
-
children: dragSubtree.map((row) => /* @__PURE__ */
|
|
64794
|
+
children: dragSubtree.map((row) => /* @__PURE__ */ jsx314(
|
|
64734
64795
|
GanttBodyRow,
|
|
64735
64796
|
{
|
|
64736
64797
|
row,
|
|
@@ -64773,7 +64834,7 @@ var Gantt = ({
|
|
|
64773
64834
|
),
|
|
64774
64835
|
document.body
|
|
64775
64836
|
),
|
|
64776
|
-
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */
|
|
64837
|
+
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */ jsx314(
|
|
64777
64838
|
"div",
|
|
64778
64839
|
{
|
|
64779
64840
|
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",
|
|
@@ -64804,13 +64865,13 @@ var GanttSkeleton = ({
|
|
|
64804
64865
|
rows,
|
|
64805
64866
|
rowHeight: rowHeight2,
|
|
64806
64867
|
leftWidth
|
|
64807
|
-
}) => /* @__PURE__ */
|
|
64808
|
-
/* @__PURE__ */
|
|
64868
|
+
}) => /* @__PURE__ */ jsx314("div", { className: "animate-pulse", "aria-busy": "true", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsxs192("div", { className: "flex", style: { height: rowHeight2 }, children: [
|
|
64869
|
+
/* @__PURE__ */ jsx314(
|
|
64809
64870
|
"div",
|
|
64810
64871
|
{
|
|
64811
64872
|
className: "sticky left-0 flex items-center border-b border-neutral-100 bg-white px-3 dark:border-neutral-800 dark:bg-neutral-900",
|
|
64812
64873
|
style: { width: leftWidth },
|
|
64813
|
-
children: /* @__PURE__ */
|
|
64874
|
+
children: /* @__PURE__ */ jsx314(
|
|
64814
64875
|
"div",
|
|
64815
64876
|
{
|
|
64816
64877
|
className: "h-3 rounded-full bg-neutral-200 dark:bg-neutral-700",
|
|
@@ -64819,7 +64880,7 @@ var GanttSkeleton = ({
|
|
|
64819
64880
|
)
|
|
64820
64881
|
}
|
|
64821
64882
|
),
|
|
64822
|
-
/* @__PURE__ */
|
|
64883
|
+
/* @__PURE__ */ jsx314("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx314(
|
|
64823
64884
|
"div",
|
|
64824
64885
|
{
|
|
64825
64886
|
className: "absolute top-1/2 h-4 -translate-y-1/2 rounded-md bg-neutral-200/80 dark:bg-neutral-700/60",
|
|
@@ -64837,13 +64898,13 @@ import {
|
|
|
64837
64898
|
useCallback as useCallback43,
|
|
64838
64899
|
useContext as useContext8,
|
|
64839
64900
|
useEffect as useEffect72,
|
|
64840
|
-
useMemo as
|
|
64901
|
+
useMemo as useMemo61,
|
|
64841
64902
|
useRef as useRef69,
|
|
64842
64903
|
useState as useState80
|
|
64843
64904
|
} from "react";
|
|
64844
64905
|
import { createPortal as createPortal16 } from "react-dom";
|
|
64845
|
-
import
|
|
64846
|
-
import { jsx as
|
|
64906
|
+
import classNames124 from "classnames";
|
|
64907
|
+
import { jsx as jsx315, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
64847
64908
|
var BottomSheetContext = createContext8(null);
|
|
64848
64909
|
var TRANSITION_MS2 = 260;
|
|
64849
64910
|
var renderSlot = (slot, controls) => {
|
|
@@ -64897,13 +64958,13 @@ var BottomSheetProvider = ({
|
|
|
64897
64958
|
},
|
|
64898
64959
|
[]
|
|
64899
64960
|
);
|
|
64900
|
-
const controls =
|
|
64961
|
+
const controls = useMemo61(
|
|
64901
64962
|
() => ({
|
|
64902
64963
|
dismiss: dismissSheet
|
|
64903
64964
|
}),
|
|
64904
64965
|
[dismissSheet]
|
|
64905
64966
|
);
|
|
64906
|
-
const contextValue =
|
|
64967
|
+
const contextValue = useMemo61(
|
|
64907
64968
|
() => ({
|
|
64908
64969
|
presentSheet,
|
|
64909
64970
|
dismissSheet,
|
|
@@ -64913,11 +64974,11 @@ var BottomSheetProvider = ({
|
|
|
64913
64974
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
64914
64975
|
);
|
|
64915
64976
|
const overlayNode = typeof document !== "undefined" && sheet ? createPortal16(
|
|
64916
|
-
/* @__PURE__ */
|
|
64917
|
-
/* @__PURE__ */
|
|
64977
|
+
/* @__PURE__ */ jsxs193("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
64978
|
+
/* @__PURE__ */ jsx315(
|
|
64918
64979
|
"div",
|
|
64919
64980
|
{
|
|
64920
|
-
className:
|
|
64981
|
+
className: classNames124(
|
|
64921
64982
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
64922
64983
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
64923
64984
|
),
|
|
@@ -64927,24 +64988,24 @@ var BottomSheetProvider = ({
|
|
|
64927
64988
|
}
|
|
64928
64989
|
}
|
|
64929
64990
|
),
|
|
64930
|
-
/* @__PURE__ */
|
|
64991
|
+
/* @__PURE__ */ jsx315("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ jsxs193(
|
|
64931
64992
|
"section",
|
|
64932
64993
|
{
|
|
64933
64994
|
role: "dialog",
|
|
64934
64995
|
"aria-modal": "true",
|
|
64935
|
-
className:
|
|
64996
|
+
className: classNames124(
|
|
64936
64997
|
"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",
|
|
64937
64998
|
sheet.className,
|
|
64938
64999
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
64939
65000
|
),
|
|
64940
65001
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
64941
65002
|
children: [
|
|
64942
|
-
/* @__PURE__ */
|
|
64943
|
-
/* @__PURE__ */
|
|
64944
|
-
sheet.title && /* @__PURE__ */
|
|
64945
|
-
sheet.description && /* @__PURE__ */
|
|
65003
|
+
/* @__PURE__ */ jsxs193("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
65004
|
+
/* @__PURE__ */ jsxs193("div", { className: "space-y-1", children: [
|
|
65005
|
+
sheet.title && /* @__PURE__ */ jsx315("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
65006
|
+
sheet.description && /* @__PURE__ */ jsx315("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
64946
65007
|
] }),
|
|
64947
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */
|
|
65008
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ jsx315(
|
|
64948
65009
|
IconButton_default,
|
|
64949
65010
|
{
|
|
64950
65011
|
icon: "Close",
|
|
@@ -64956,15 +65017,15 @@ var BottomSheetProvider = ({
|
|
|
64956
65017
|
}
|
|
64957
65018
|
)
|
|
64958
65019
|
] }),
|
|
64959
|
-
/* @__PURE__ */
|
|
64960
|
-
sheet.actions && /* @__PURE__ */
|
|
65020
|
+
/* @__PURE__ */ jsx315("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ jsx315("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
65021
|
+
sheet.actions && /* @__PURE__ */ jsx315("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) })
|
|
64961
65022
|
]
|
|
64962
65023
|
}
|
|
64963
65024
|
) })
|
|
64964
65025
|
] }),
|
|
64965
65026
|
document.body
|
|
64966
65027
|
) : null;
|
|
64967
|
-
return /* @__PURE__ */
|
|
65028
|
+
return /* @__PURE__ */ jsxs193(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
64968
65029
|
children,
|
|
64969
65030
|
overlayNode
|
|
64970
65031
|
] });
|
|
@@ -65604,8 +65665,8 @@ var SYSTEM_VARIABLES = [
|
|
|
65604
65665
|
];
|
|
65605
65666
|
|
|
65606
65667
|
// src/components/MetricBar.tsx
|
|
65607
|
-
import
|
|
65608
|
-
import { jsx as
|
|
65668
|
+
import classNames125 from "classnames";
|
|
65669
|
+
import { jsx as jsx316 } from "react/jsx-runtime";
|
|
65609
65670
|
var MetricBar = ({
|
|
65610
65671
|
label,
|
|
65611
65672
|
value,
|
|
@@ -65615,7 +65676,7 @@ var MetricBar = ({
|
|
|
65615
65676
|
size = "sm",
|
|
65616
65677
|
className,
|
|
65617
65678
|
...rest
|
|
65618
|
-
}) => /* @__PURE__ */
|
|
65679
|
+
}) => /* @__PURE__ */ jsx316(
|
|
65619
65680
|
Progress_default,
|
|
65620
65681
|
{
|
|
65621
65682
|
...rest,
|
|
@@ -65625,7 +65686,7 @@ var MetricBar = ({
|
|
|
65625
65686
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
65626
65687
|
size,
|
|
65627
65688
|
color: tone ?? color ?? "blue",
|
|
65628
|
-
className:
|
|
65689
|
+
className: classNames125("w-full", className)
|
|
65629
65690
|
}
|
|
65630
65691
|
);
|
|
65631
65692
|
MetricBar.displayName = "MetricBar";
|
|
@@ -65704,6 +65765,7 @@ export {
|
|
|
65704
65765
|
DEFAULT_LAYOUT_OPTIONS,
|
|
65705
65766
|
DEFAULT_SERIES_PALETTE,
|
|
65706
65767
|
DEFAULT_SURFACE_CORNER,
|
|
65768
|
+
DEFAULT_SURFACE_GUTTER,
|
|
65707
65769
|
DEFAULT_SURFACE_PADDING,
|
|
65708
65770
|
DEFAULT_SURFACE_TONE,
|
|
65709
65771
|
DEFAULT_TOAST_GAP_PX,
|
|
@@ -65854,6 +65916,7 @@ export {
|
|
|
65854
65916
|
STAT_PAGER_PLACEMENTS,
|
|
65855
65917
|
SURFACE_CORNERS,
|
|
65856
65918
|
SURFACE_GLASS_RIM,
|
|
65919
|
+
SURFACE_GUTTER_AXES,
|
|
65857
65920
|
SURFACE_PADDINGS,
|
|
65858
65921
|
SURFACE_TO_BUTTON_VARIANT,
|
|
65859
65922
|
SURFACE_VARIANTS,
|
|
@@ -65948,6 +66011,7 @@ export {
|
|
|
65948
66011
|
WorkflowTracker_default as WorkflowTracker,
|
|
65949
66012
|
WorkflowTrackerDetails_default as WorkflowTrackerDetails,
|
|
65950
66013
|
WorkflowTrackerRail_default as WorkflowTrackerRail,
|
|
66014
|
+
WorkflowTrackerRollups_default as WorkflowTrackerRollups,
|
|
65951
66015
|
WorkflowTrackerStepDetails_default as WorkflowTrackerStepDetails,
|
|
65952
66016
|
areaPathFromPoints,
|
|
65953
66017
|
bandAreaPath,
|
|
@@ -66086,6 +66150,7 @@ export {
|
|
|
66086
66150
|
getStepperTonePalette,
|
|
66087
66151
|
getSurfaceCornerClass,
|
|
66088
66152
|
getSurfaceCornerRem,
|
|
66153
|
+
getSurfaceGutterClass,
|
|
66089
66154
|
getSurfacePaddingClass,
|
|
66090
66155
|
getSurfacePaddingClasses,
|
|
66091
66156
|
getSurfaceTextTokens,
|