@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.cjs
CHANGED
|
@@ -106,6 +106,7 @@ __export(src_exports, {
|
|
|
106
106
|
DEFAULT_LAYOUT_OPTIONS: () => DEFAULT_LAYOUT_OPTIONS,
|
|
107
107
|
DEFAULT_SERIES_PALETTE: () => DEFAULT_SERIES_PALETTE,
|
|
108
108
|
DEFAULT_SURFACE_CORNER: () => DEFAULT_SURFACE_CORNER,
|
|
109
|
+
DEFAULT_SURFACE_GUTTER: () => DEFAULT_SURFACE_GUTTER,
|
|
109
110
|
DEFAULT_SURFACE_PADDING: () => DEFAULT_SURFACE_PADDING,
|
|
110
111
|
DEFAULT_SURFACE_TONE: () => DEFAULT_SURFACE_TONE,
|
|
111
112
|
DEFAULT_TOAST_GAP_PX: () => DEFAULT_TOAST_GAP_PX,
|
|
@@ -256,6 +257,7 @@ __export(src_exports, {
|
|
|
256
257
|
STAT_PAGER_PLACEMENTS: () => STAT_PAGER_PLACEMENTS,
|
|
257
258
|
SURFACE_CORNERS: () => SURFACE_CORNERS,
|
|
258
259
|
SURFACE_GLASS_RIM: () => SURFACE_GLASS_RIM,
|
|
260
|
+
SURFACE_GUTTER_AXES: () => SURFACE_GUTTER_AXES,
|
|
259
261
|
SURFACE_PADDINGS: () => SURFACE_PADDINGS,
|
|
260
262
|
SURFACE_TO_BUTTON_VARIANT: () => SURFACE_TO_BUTTON_VARIANT,
|
|
261
263
|
SURFACE_VARIANTS: () => SURFACE_VARIANTS,
|
|
@@ -350,6 +352,7 @@ __export(src_exports, {
|
|
|
350
352
|
WorkflowTracker: () => WorkflowTracker_default,
|
|
351
353
|
WorkflowTrackerDetails: () => WorkflowTrackerDetails_default,
|
|
352
354
|
WorkflowTrackerRail: () => WorkflowTrackerRail_default,
|
|
355
|
+
WorkflowTrackerRollups: () => WorkflowTrackerRollups_default,
|
|
353
356
|
WorkflowTrackerStepDetails: () => WorkflowTrackerStepDetails_default,
|
|
354
357
|
areaPathFromPoints: () => areaPathFromPoints,
|
|
355
358
|
bandAreaPath: () => bandAreaPath,
|
|
@@ -488,6 +491,7 @@ __export(src_exports, {
|
|
|
488
491
|
getStepperTonePalette: () => getStepperTonePalette,
|
|
489
492
|
getSurfaceCornerClass: () => getSurfaceCornerClass,
|
|
490
493
|
getSurfaceCornerRem: () => getSurfaceCornerRem,
|
|
494
|
+
getSurfaceGutterClass: () => getSurfaceGutterClass,
|
|
491
495
|
getSurfacePaddingClass: () => getSurfacePaddingClass,
|
|
492
496
|
getSurfacePaddingClasses: () => getSurfacePaddingClasses,
|
|
493
497
|
getSurfaceTextTokens: () => getSurfaceTextTokens,
|
|
@@ -5969,6 +5973,15 @@ var getSurfacePaddingClass = (padding) => surfacePaddingClasses[padding] ?? surf
|
|
|
5969
5973
|
var getSurfacePaddingClasses = () => ({
|
|
5970
5974
|
...surfacePaddingClasses
|
|
5971
5975
|
});
|
|
5976
|
+
var SURFACE_GUTTER_AXES = ["top", "right", "bottom", "left"];
|
|
5977
|
+
var surfaceGutterClasses = {
|
|
5978
|
+
top: { none: "mt-0", xs: "mt-2", sm: "mt-4", md: "mt-6", lg: "mt-8", xl: "mt-10" },
|
|
5979
|
+
right: { none: "mr-0", xs: "mr-2", sm: "mr-4", md: "mr-6", lg: "mr-8", xl: "mr-10" },
|
|
5980
|
+
bottom: { none: "mb-0", xs: "mb-2", sm: "mb-4", md: "mb-6", lg: "mb-8", xl: "mb-10" },
|
|
5981
|
+
left: { none: "ml-0", xs: "ml-2", sm: "ml-4", md: "ml-6", lg: "ml-8", xl: "ml-10" }
|
|
5982
|
+
};
|
|
5983
|
+
var DEFAULT_SURFACE_GUTTER = "none";
|
|
5984
|
+
var getSurfaceGutterClass = (axis, gutter) => surfaceGutterClasses[axis][gutter] ?? surfaceGutterClasses[axis][DEFAULT_SURFACE_GUTTER];
|
|
5972
5985
|
var NEUTRAL_TONES = [
|
|
5973
5986
|
"neutral",
|
|
5974
5987
|
"slate",
|
|
@@ -22037,10 +22050,23 @@ var PageHeader = ({
|
|
|
22037
22050
|
children,
|
|
22038
22051
|
variant = "default",
|
|
22039
22052
|
accentColor = "blue",
|
|
22053
|
+
padding,
|
|
22054
|
+
paddingTop,
|
|
22055
|
+
paddingRight,
|
|
22056
|
+
paddingBottom,
|
|
22057
|
+
paddingLeft,
|
|
22058
|
+
corner = DEFAULT_SURFACE_CORNER,
|
|
22040
22059
|
className = "",
|
|
22041
22060
|
...rest
|
|
22042
22061
|
}) => {
|
|
22043
22062
|
const surface = variant === "default" ? null : getSidebarSurfaceTokens(variant, accentColor);
|
|
22063
|
+
const pair = surface ? "xs" : "none";
|
|
22064
|
+
const gutter = {
|
|
22065
|
+
top: paddingTop ?? padding ?? pair,
|
|
22066
|
+
right: paddingRight ?? padding ?? pair,
|
|
22067
|
+
bottom: paddingBottom ?? padding ?? "none",
|
|
22068
|
+
left: paddingLeft ?? padding ?? "none"
|
|
22069
|
+
};
|
|
22044
22070
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
22045
22071
|
"header",
|
|
22046
22072
|
{
|
|
@@ -22048,9 +22074,12 @@ var PageHeader = ({
|
|
|
22048
22074
|
className: (0, import_classnames51.default)(
|
|
22049
22075
|
"flex w-full items-center justify-between gap-4 px-5",
|
|
22050
22076
|
SIDE_MENU_HEADER_HEIGHT,
|
|
22077
|
+
getSurfaceGutterClass("top", gutter.top),
|
|
22078
|
+
getSurfaceGutterClass("right", gutter.right),
|
|
22079
|
+
getSurfaceGutterClass("bottom", gutter.bottom),
|
|
22080
|
+
getSurfaceGutterClass("left", gutter.left),
|
|
22081
|
+
getSurfaceCornerClass(corner),
|
|
22051
22082
|
surface ? (0, import_classnames51.default)(
|
|
22052
|
-
surface.offset,
|
|
22053
|
-
surface.radius,
|
|
22054
22083
|
"border",
|
|
22055
22084
|
surface.border,
|
|
22056
22085
|
surface.shadow,
|
|
@@ -60187,14 +60216,97 @@ var TreeView = ({
|
|
|
60187
60216
|
var TreeView_default = TreeView;
|
|
60188
60217
|
|
|
60189
60218
|
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
60190
|
-
var
|
|
60191
|
-
var
|
|
60219
|
+
var import_react283 = require("react");
|
|
60220
|
+
var import_classnames119 = __toESM(require("classnames"), 1);
|
|
60192
60221
|
|
|
60193
|
-
// src/components/WorkflowTracker/
|
|
60194
|
-
var
|
|
60222
|
+
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60223
|
+
var import_react279 = require("react");
|
|
60224
|
+
var import_classnames112 = __toESM(require("classnames"), 1);
|
|
60195
60225
|
|
|
60196
|
-
// src/components/WorkflowTracker/
|
|
60226
|
+
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60227
|
+
var import_react277 = __toESM(require("react"), 1);
|
|
60228
|
+
var import_classnames111 = __toESM(require("classnames"), 1);
|
|
60229
|
+
|
|
60230
|
+
// src/components/WorkflowTracker/WorkflowSkeleton.tsx
|
|
60197
60231
|
var import_classnames107 = __toESM(require("classnames"), 1);
|
|
60232
|
+
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
60233
|
+
var Bar3 = ({
|
|
60234
|
+
width,
|
|
60235
|
+
className
|
|
60236
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
60237
|
+
"span",
|
|
60238
|
+
{
|
|
60239
|
+
className: (0, import_classnames107.default)(
|
|
60240
|
+
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
60241
|
+
className
|
|
60242
|
+
),
|
|
60243
|
+
style: { width }
|
|
60244
|
+
}
|
|
60245
|
+
);
|
|
60246
|
+
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime296.jsx)("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
60247
|
+
var WorkflowHeaderSkeleton = ({ hasIcon = false, iconCorner = DEFAULT_SURFACE_CORNER }) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "mb-5 flex animate-pulse flex-wrap items-start justify-between gap-3 motion-reduce:animate-none", children: [
|
|
60248
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
60249
|
+
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime296.jsx)(
|
|
60250
|
+
Bar3,
|
|
60251
|
+
{
|
|
60252
|
+
width: "3rem",
|
|
60253
|
+
className: (0, import_classnames107.default)("h-12", getSurfaceCornerClass(iconCorner))
|
|
60254
|
+
}
|
|
60255
|
+
),
|
|
60256
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "space-y-3", children: [
|
|
60257
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "11rem", className: "h-2" }),
|
|
60258
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "16rem", className: "h-6" })
|
|
60259
|
+
] })
|
|
60260
|
+
] }),
|
|
60261
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
60262
|
+
] });
|
|
60263
|
+
var WorkflowRailSkeleton = ({
|
|
60264
|
+
rows = 6
|
|
60265
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60266
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
60267
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60268
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "4.5rem" }),
|
|
60269
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "2rem" })
|
|
60270
|
+
] }),
|
|
60271
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
60272
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "80%", className: "mt-3" })
|
|
60273
|
+
] }),
|
|
60274
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "space-y-5 px-5 py-5", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
60275
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Dot, {}),
|
|
60276
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
60277
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
60278
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "34%", className: "h-2" })
|
|
60279
|
+
] })
|
|
60280
|
+
] }, index)) })
|
|
60281
|
+
] });
|
|
60282
|
+
var WorkflowDetailSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60283
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60284
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60285
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "6rem" }),
|
|
60286
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "4rem" })
|
|
60287
|
+
] }),
|
|
60288
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "45%", className: "h-5" }),
|
|
60289
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "space-y-2", children: [
|
|
60290
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "92%", className: "h-2" }),
|
|
60291
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "70%", className: "h-2" })
|
|
60292
|
+
] }),
|
|
60293
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex gap-10 pt-2", children: [
|
|
60294
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "5rem" }),
|
|
60295
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "6rem" }),
|
|
60296
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "4rem" })
|
|
60297
|
+
] })
|
|
60298
|
+
] }),
|
|
60299
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("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__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "5rem" }) }),
|
|
60300
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("div", { className: "divide-y divide-neutral-200 dark:divide-neutral-800", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime296.jsxs)("div", { className: "flex items-center gap-3 px-5 py-4 sm:px-6", children: [
|
|
60301
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Dot, {}),
|
|
60302
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
60303
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)("span", { className: "flex-1" }),
|
|
60304
|
+
/* @__PURE__ */ (0, import_jsx_runtime296.jsx)(Bar3, { width: "3rem" })
|
|
60305
|
+
] }, index)) })
|
|
60306
|
+
] });
|
|
60307
|
+
|
|
60308
|
+
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
60309
|
+
var import_classnames108 = __toESM(require("classnames"), 1);
|
|
60198
60310
|
|
|
60199
60311
|
// src/components/WorkflowTracker/surfaces.ts
|
|
60200
60312
|
var isTranslucentVariant = (variant) => getSurfaceTextTokens(variant).translucent;
|
|
@@ -60332,13 +60444,13 @@ var getStatusTokens = (status, palette) => {
|
|
|
60332
60444
|
};
|
|
60333
60445
|
|
|
60334
60446
|
// src/components/WorkflowTracker/WorkflowStatusNode.tsx
|
|
60335
|
-
var
|
|
60447
|
+
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
60336
60448
|
var sizeTokens11 = {
|
|
60337
60449
|
sm: { node: "h-4 w-4", glyph: "h-2.5 w-2.5" },
|
|
60338
60450
|
md: { node: "h-5 w-5", glyph: "h-3 w-3" },
|
|
60339
60451
|
lg: { node: "h-9 w-9", glyph: "h-5 w-5" }
|
|
60340
60452
|
};
|
|
60341
|
-
var DashedRing = ({ className }) => /* @__PURE__ */ (0,
|
|
60453
|
+
var DashedRing = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("svg", { viewBox: "0 0 20 20", "aria-hidden": "true", className, children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
60342
60454
|
"circle",
|
|
60343
60455
|
{
|
|
60344
60456
|
cx: "10",
|
|
@@ -60351,7 +60463,7 @@ var DashedRing = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime296.js
|
|
|
60351
60463
|
strokeLinecap: "round"
|
|
60352
60464
|
}
|
|
60353
60465
|
) });
|
|
60354
|
-
var AlertGlyph = ({ className }) => /* @__PURE__ */ (0,
|
|
60466
|
+
var AlertGlyph = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime297.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", className, children: /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
60355
60467
|
"path",
|
|
60356
60468
|
{
|
|
60357
60469
|
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",
|
|
@@ -60366,33 +60478,33 @@ var WorkflowStatusNode = ({
|
|
|
60366
60478
|
}) => {
|
|
60367
60479
|
const tokens = getStatusTokens(status, palette);
|
|
60368
60480
|
const { node, glyph } = sizeTokens11[size];
|
|
60369
|
-
return /* @__PURE__ */ (0,
|
|
60481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
60370
60482
|
"span",
|
|
60371
60483
|
{
|
|
60372
60484
|
"aria-hidden": "true",
|
|
60373
|
-
className: (0,
|
|
60485
|
+
className: (0, import_classnames108.default)("relative inline-flex shrink-0", node, className),
|
|
60374
60486
|
children: [
|
|
60375
|
-
tokens.pulse && /* @__PURE__ */ (0,
|
|
60487
|
+
tokens.pulse && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(
|
|
60376
60488
|
"span",
|
|
60377
60489
|
{
|
|
60378
|
-
className: (0,
|
|
60490
|
+
className: (0, import_classnames108.default)(
|
|
60379
60491
|
"absolute inset-0 animate-ping rounded-full opacity-60 motion-reduce:hidden",
|
|
60380
60492
|
`bg-${tokens.tone}-300 dark:bg-${tokens.tone}-500`
|
|
60381
60493
|
)
|
|
60382
60494
|
}
|
|
60383
60495
|
),
|
|
60384
|
-
/* @__PURE__ */ (0,
|
|
60496
|
+
/* @__PURE__ */ (0, import_jsx_runtime297.jsxs)(
|
|
60385
60497
|
"span",
|
|
60386
60498
|
{
|
|
60387
|
-
className: (0,
|
|
60499
|
+
className: (0, import_classnames108.default)(
|
|
60388
60500
|
"relative inline-flex h-full w-full items-center justify-center rounded-full",
|
|
60389
60501
|
tokens.node
|
|
60390
60502
|
),
|
|
60391
60503
|
children: [
|
|
60392
|
-
tokens.glyph === "check" && /* @__PURE__ */ (0,
|
|
60393
|
-
tokens.glyph === "pause" && /* @__PURE__ */ (0,
|
|
60394
|
-
tokens.glyph === "alert" && /* @__PURE__ */ (0,
|
|
60395
|
-
tokens.glyph === "dashed" && /* @__PURE__ */ (0,
|
|
60504
|
+
tokens.glyph === "check" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Check, { className: (0, import_classnames108.default)(glyph, tokens.glyphClass) }),
|
|
60505
|
+
tokens.glyph === "pause" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(Pause, { className: (0, import_classnames108.default)(glyph, tokens.glyphClass) }),
|
|
60506
|
+
tokens.glyph === "alert" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(AlertGlyph, { className: (0, import_classnames108.default)(glyph, tokens.glyphClass) }),
|
|
60507
|
+
tokens.glyph === "dashed" && /* @__PURE__ */ (0, import_jsx_runtime297.jsx)(DashedRing, { className: (0, import_classnames108.default)("h-full w-full", tokens.glyphClass) })
|
|
60396
60508
|
]
|
|
60397
60509
|
}
|
|
60398
60510
|
)
|
|
@@ -60402,34 +60514,73 @@ var WorkflowStatusNode = ({
|
|
|
60402
60514
|
};
|
|
60403
60515
|
var WorkflowStatusNode_default = WorkflowStatusNode;
|
|
60404
60516
|
|
|
60517
|
+
// src/components/WorkflowTracker/WorkflowQuickActions.tsx
|
|
60518
|
+
var import_classnames109 = __toESM(require("classnames"), 1);
|
|
60519
|
+
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
60520
|
+
var WorkflowQuickActions = ({
|
|
60521
|
+
stepId,
|
|
60522
|
+
actions,
|
|
60523
|
+
palette,
|
|
60524
|
+
groupLabel,
|
|
60525
|
+
onAction,
|
|
60526
|
+
className,
|
|
60527
|
+
style
|
|
60528
|
+
}) => {
|
|
60529
|
+
if (!onAction || actions.length === 0) return null;
|
|
60530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60531
|
+
"div",
|
|
60532
|
+
{
|
|
60533
|
+
role: "group",
|
|
60534
|
+
"aria-label": groupLabel,
|
|
60535
|
+
className: (0, import_classnames109.default)("flex flex-wrap gap-1.5", className),
|
|
60536
|
+
style,
|
|
60537
|
+
children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60538
|
+
Button_default,
|
|
60539
|
+
{
|
|
60540
|
+
size: "xs",
|
|
60541
|
+
weight: "medium",
|
|
60542
|
+
variant: action.variant ?? "soft",
|
|
60543
|
+
color: action.tone ?? palette.accent,
|
|
60544
|
+
leadingIcon: action.leadingIcon,
|
|
60545
|
+
disabled: action.disabled,
|
|
60546
|
+
onClick: () => onAction(stepId, action.id),
|
|
60547
|
+
children: action.label
|
|
60548
|
+
},
|
|
60549
|
+
action.id
|
|
60550
|
+
))
|
|
60551
|
+
}
|
|
60552
|
+
);
|
|
60553
|
+
};
|
|
60554
|
+
var WorkflowQuickActions_default = WorkflowQuickActions;
|
|
60555
|
+
|
|
60405
60556
|
// src/components/WorkflowTracker/parts.tsx
|
|
60406
|
-
var
|
|
60407
|
-
var
|
|
60557
|
+
var import_classnames110 = __toESM(require("classnames"), 1);
|
|
60558
|
+
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
60408
60559
|
var resolve = (surfaces) => surfaces ?? getSurfaceTokens(false);
|
|
60409
|
-
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */ (0,
|
|
60560
|
+
var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)(
|
|
60410
60561
|
"div",
|
|
60411
60562
|
{
|
|
60412
|
-
className: (0,
|
|
60563
|
+
className: (0, import_classnames110.default)(
|
|
60413
60564
|
"flex flex-col items-center justify-center gap-3 px-6 py-10 text-center",
|
|
60414
60565
|
className
|
|
60415
60566
|
),
|
|
60416
60567
|
children: [
|
|
60417
|
-
/* @__PURE__ */ (0,
|
|
60418
|
-
/* @__PURE__ */ (0,
|
|
60419
|
-
/* @__PURE__ */ (0,
|
|
60568
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(WorkflowStatusNode_default, { status: "not_started", palette, size: "lg" }),
|
|
60569
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-1", children: [
|
|
60570
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60420
60571
|
"p",
|
|
60421
60572
|
{
|
|
60422
|
-
className: (0,
|
|
60573
|
+
className: (0, import_classnames110.default)(
|
|
60423
60574
|
"text-sm font-semibold",
|
|
60424
60575
|
resolve(surfaces).mutedText
|
|
60425
60576
|
),
|
|
60426
60577
|
children: title
|
|
60427
60578
|
}
|
|
60428
60579
|
),
|
|
60429
|
-
subtitle && /* @__PURE__ */ (0,
|
|
60580
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60430
60581
|
"p",
|
|
60431
60582
|
{
|
|
60432
|
-
className: (0,
|
|
60583
|
+
className: (0, import_classnames110.default)(
|
|
60433
60584
|
"max-w-xs text-xs leading-5",
|
|
60434
60585
|
resolve(surfaces).faintText
|
|
60435
60586
|
),
|
|
@@ -60440,10 +60591,10 @@ var WorkflowPlaceholder = ({ title, subtitle, palette, surfaces, className }) =>
|
|
|
60440
60591
|
]
|
|
60441
60592
|
}
|
|
60442
60593
|
);
|
|
60443
|
-
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ (0,
|
|
60594
|
+
var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60444
60595
|
"span",
|
|
60445
60596
|
{
|
|
60446
|
-
className: (0,
|
|
60597
|
+
className: (0, import_classnames110.default)(
|
|
60447
60598
|
"text-[10px] font-semibold uppercase tracking-widest",
|
|
60448
60599
|
resolve(surfaces).faintText,
|
|
60449
60600
|
className
|
|
@@ -60451,7 +60602,7 @@ var SectionTitle = ({ children, surfaces, className }) => /* @__PURE__ */ (0, im
|
|
|
60451
60602
|
children
|
|
60452
60603
|
}
|
|
60453
60604
|
);
|
|
60454
|
-
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */ (0,
|
|
60605
|
+
var SectionMeta = ({ children, surfaces, className }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: (0, import_classnames110.default)("text-xs", resolve(surfaces).mutedText, className), children });
|
|
60455
60606
|
var WorkflowBadge = ({
|
|
60456
60607
|
children,
|
|
60457
60608
|
status,
|
|
@@ -60459,14 +60610,14 @@ var WorkflowBadge = ({
|
|
|
60459
60610
|
tone
|
|
60460
60611
|
}) => {
|
|
60461
60612
|
const tokens = getStatusTokens(status, palette);
|
|
60462
|
-
return /* @__PURE__ */ (0,
|
|
60613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60463
60614
|
Pill_default,
|
|
60464
60615
|
{
|
|
60465
60616
|
size: "xs",
|
|
60466
60617
|
uppercase: true,
|
|
60467
60618
|
tone: tone ?? tokens.pillTone,
|
|
60468
60619
|
variant: "outline",
|
|
60469
|
-
className: (0,
|
|
60620
|
+
className: (0, import_classnames110.default)(
|
|
60470
60621
|
"shrink-0 font-medium",
|
|
60471
60622
|
tone ? `bg-${tone}-100 dark:bg-${tone}-900` : tokens.pillFill
|
|
60472
60623
|
),
|
|
@@ -60474,177 +60625,17 @@ var WorkflowBadge = ({
|
|
|
60474
60625
|
}
|
|
60475
60626
|
);
|
|
60476
60627
|
};
|
|
60477
|
-
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */ (0,
|
|
60478
|
-
/* @__PURE__ */ (0,
|
|
60479
|
-
/* @__PURE__ */ (0,
|
|
60628
|
+
var MetaField = ({ label, value, surfaces }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "min-w-0", children: [
|
|
60629
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(SectionTitle, { surfaces, children: label }),
|
|
60630
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("p", { className: "mt-1 text-sm font-medium text-neutral-800 dark:text-neutral-100", children: value })
|
|
60480
60631
|
] });
|
|
60481
|
-
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */ (0,
|
|
60482
|
-
/* @__PURE__ */ (0,
|
|
60483
|
-
/* @__PURE__ */ (0,
|
|
60632
|
+
var Tally = ({ count, label, surfaces }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("span", { className: "inline-flex items-center gap-1", children: [
|
|
60633
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "font-semibold text-neutral-900 dark:text-white", children: count }),
|
|
60634
|
+
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: resolve(surfaces).mutedText, children: label })
|
|
60484
60635
|
] });
|
|
60485
60636
|
|
|
60486
|
-
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
60487
|
-
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
60488
|
-
var WorkflowSummaryCard = ({
|
|
60489
|
-
title,
|
|
60490
|
-
steps,
|
|
60491
|
-
palette,
|
|
60492
|
-
surfaces
|
|
60493
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: "px-5 py-4", children: [
|
|
60494
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(SectionTitle, { surfaces, children: title }),
|
|
60495
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("ul", { className: "mt-3 space-y-3", children: steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("li", { className: "flex items-start gap-3", children: [
|
|
60496
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60497
|
-
WorkflowStatusNode_default,
|
|
60498
|
-
{
|
|
60499
|
-
status: normalizeStatus(step.status),
|
|
60500
|
-
palette,
|
|
60501
|
-
className: "mt-0.5"
|
|
60502
|
-
}
|
|
60503
|
-
),
|
|
60504
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
60505
|
-
/* @__PURE__ */ (0, import_jsx_runtime298.jsx)("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: step.label }),
|
|
60506
|
-
step.meta && /* @__PURE__ */ (0, import_jsx_runtime298.jsx)(
|
|
60507
|
-
"p",
|
|
60508
|
-
{
|
|
60509
|
-
className: (0, import_classnames109.default)(
|
|
60510
|
-
"mt-0.5 text-xs leading-5",
|
|
60511
|
-
surfaces.mutedText
|
|
60512
|
-
),
|
|
60513
|
-
children: step.meta
|
|
60514
|
-
}
|
|
60515
|
-
)
|
|
60516
|
-
] })
|
|
60517
|
-
] }, step.id)) })
|
|
60518
|
-
] });
|
|
60519
|
-
var WorkflowSummaryCard_default = WorkflowSummaryCard;
|
|
60520
|
-
|
|
60521
|
-
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
60522
|
-
var import_react279 = require("react");
|
|
60523
|
-
var import_classnames113 = __toESM(require("classnames"), 1);
|
|
60524
|
-
|
|
60525
60637
|
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60526
|
-
var import_react277 = __toESM(require("react"), 1);
|
|
60527
|
-
var import_classnames112 = __toESM(require("classnames"), 1);
|
|
60528
|
-
|
|
60529
|
-
// src/components/WorkflowTracker/WorkflowSkeleton.tsx
|
|
60530
|
-
var import_classnames110 = __toESM(require("classnames"), 1);
|
|
60531
|
-
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
60532
|
-
var Bar3 = ({
|
|
60533
|
-
width,
|
|
60534
|
-
className
|
|
60535
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60536
|
-
"span",
|
|
60537
|
-
{
|
|
60538
|
-
className: (0, import_classnames110.default)(
|
|
60539
|
-
"block h-2.5 rounded-full bg-neutral-200 dark:bg-neutral-800",
|
|
60540
|
-
className
|
|
60541
|
-
),
|
|
60542
|
-
style: { width }
|
|
60543
|
-
}
|
|
60544
|
-
);
|
|
60545
|
-
var Dot = () => /* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "h-5 w-5 shrink-0 rounded-full bg-neutral-200 dark:bg-neutral-800" });
|
|
60546
|
-
var WorkflowHeaderSkeleton = ({ hasIcon = false, iconCorner = DEFAULT_SURFACE_CORNER }) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "mb-5 flex animate-pulse flex-wrap items-start justify-between gap-3 motion-reduce:animate-none", children: [
|
|
60547
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
60548
|
-
hasIcon && /* @__PURE__ */ (0, import_jsx_runtime299.jsx)(
|
|
60549
|
-
Bar3,
|
|
60550
|
-
{
|
|
60551
|
-
width: "3rem",
|
|
60552
|
-
className: (0, import_classnames110.default)("h-12", getSurfaceCornerClass(iconCorner))
|
|
60553
|
-
}
|
|
60554
|
-
),
|
|
60555
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-3", children: [
|
|
60556
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "11rem", className: "h-2" }),
|
|
60557
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "16rem", className: "h-6" })
|
|
60558
|
-
] })
|
|
60559
|
-
] }),
|
|
60560
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "9rem", className: "h-6 rounded-full" })
|
|
60561
|
-
] });
|
|
60562
|
-
var WorkflowRailSkeleton = ({
|
|
60563
|
-
rows = 6
|
|
60564
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60565
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "border-b border-neutral-200 px-5 pb-4 pt-5 dark:border-neutral-800", children: [
|
|
60566
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60567
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "4.5rem" }),
|
|
60568
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "2rem" })
|
|
60569
|
-
] }),
|
|
60570
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "mt-3 block h-1 w-full rounded-full bg-neutral-200 dark:bg-neutral-800" }),
|
|
60571
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "80%", className: "mt-3" })
|
|
60572
|
-
] }),
|
|
60573
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "space-y-5 px-5 py-5", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
60574
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Dot, {}),
|
|
60575
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
60576
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: index % 2 === 0 ? "62%" : "48%" }),
|
|
60577
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "34%", className: "h-2" })
|
|
60578
|
-
] })
|
|
60579
|
-
] }, index)) })
|
|
60580
|
-
] });
|
|
60581
|
-
var WorkflowDetailSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "animate-pulse motion-reduce:animate-none", children: [
|
|
60582
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-4 px-5 pb-6 pt-5 sm:px-6", children: [
|
|
60583
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
60584
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "6rem" }),
|
|
60585
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "4rem" })
|
|
60586
|
-
] }),
|
|
60587
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "45%", className: "h-5" }),
|
|
60588
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "space-y-2", children: [
|
|
60589
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "92%", className: "h-2" }),
|
|
60590
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "70%", className: "h-2" })
|
|
60591
|
-
] }),
|
|
60592
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex gap-10 pt-2", children: [
|
|
60593
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "5rem" }),
|
|
60594
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "6rem" }),
|
|
60595
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "4rem" })
|
|
60596
|
-
] })
|
|
60597
|
-
] }),
|
|
60598
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("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__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "5rem" }) }),
|
|
60599
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("div", { className: "divide-y divide-neutral-200 dark:divide-neutral-800", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime299.jsxs)("div", { className: "flex items-center gap-3 px-5 py-4 sm:px-6", children: [
|
|
60600
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Dot, {}),
|
|
60601
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: index === 1 ? "38%" : "30%" }),
|
|
60602
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)("span", { className: "flex-1" }),
|
|
60603
|
-
/* @__PURE__ */ (0, import_jsx_runtime299.jsx)(Bar3, { width: "3rem" })
|
|
60604
|
-
] }, index)) })
|
|
60605
|
-
] });
|
|
60606
|
-
|
|
60607
|
-
// src/components/WorkflowTracker/WorkflowQuickActions.tsx
|
|
60608
|
-
var import_classnames111 = __toESM(require("classnames"), 1);
|
|
60609
60638
|
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
60610
|
-
var WorkflowQuickActions = ({
|
|
60611
|
-
stepId,
|
|
60612
|
-
actions,
|
|
60613
|
-
palette,
|
|
60614
|
-
groupLabel,
|
|
60615
|
-
onAction,
|
|
60616
|
-
className,
|
|
60617
|
-
style
|
|
60618
|
-
}) => {
|
|
60619
|
-
if (!onAction || actions.length === 0) return null;
|
|
60620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60621
|
-
"div",
|
|
60622
|
-
{
|
|
60623
|
-
role: "group",
|
|
60624
|
-
"aria-label": groupLabel,
|
|
60625
|
-
className: (0, import_classnames111.default)("flex flex-wrap gap-1.5", className),
|
|
60626
|
-
style,
|
|
60627
|
-
children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60628
|
-
Button_default,
|
|
60629
|
-
{
|
|
60630
|
-
size: "xs",
|
|
60631
|
-
weight: "medium",
|
|
60632
|
-
variant: action.variant ?? "soft",
|
|
60633
|
-
color: action.tone ?? palette.accent,
|
|
60634
|
-
leadingIcon: action.leadingIcon,
|
|
60635
|
-
disabled: action.disabled,
|
|
60636
|
-
onClick: () => onAction(stepId, action.id),
|
|
60637
|
-
children: action.label
|
|
60638
|
-
},
|
|
60639
|
-
action.id
|
|
60640
|
-
))
|
|
60641
|
-
}
|
|
60642
|
-
);
|
|
60643
|
-
};
|
|
60644
|
-
var WorkflowQuickActions_default = WorkflowQuickActions;
|
|
60645
|
-
|
|
60646
|
-
// src/components/WorkflowTracker/WorkflowTimeline.tsx
|
|
60647
|
-
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
60648
60639
|
var CONNECTOR_LEFT = 9;
|
|
60649
60640
|
var CONNECTOR_TOP = 24;
|
|
60650
60641
|
var NESTED_INDENT = 32;
|
|
@@ -60662,16 +60653,16 @@ var NestedSubSteps = ({
|
|
|
60662
60653
|
palette,
|
|
60663
60654
|
surfaces,
|
|
60664
60655
|
onSubStepSelect
|
|
60665
|
-
}) => /* @__PURE__ */ (0,
|
|
60656
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60666
60657
|
"div",
|
|
60667
60658
|
{
|
|
60668
|
-
className: (0,
|
|
60659
|
+
className: (0, import_classnames111.default)("mt-3 rounded-lg p-3", surfaces.nestedBox),
|
|
60669
60660
|
style: { marginLeft: NESTED_INDENT },
|
|
60670
|
-
children: /* @__PURE__ */ (0,
|
|
60661
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ul", { className: "space-y-2.5", children: subSteps.map((subStep) => {
|
|
60671
60662
|
const status = normalizeStatus(subStep.status);
|
|
60672
60663
|
const isActive = status === "running" || status === "in_progress";
|
|
60673
|
-
const content = /* @__PURE__ */ (0,
|
|
60674
|
-
/* @__PURE__ */ (0,
|
|
60664
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
|
|
60665
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60675
60666
|
WorkflowStatusNode_default,
|
|
60676
60667
|
{
|
|
60677
60668
|
status,
|
|
@@ -60679,10 +60670,10 @@ var NestedSubSteps = ({
|
|
|
60679
60670
|
size: "sm"
|
|
60680
60671
|
}
|
|
60681
60672
|
),
|
|
60682
|
-
/* @__PURE__ */ (0,
|
|
60673
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60683
60674
|
"span",
|
|
60684
60675
|
{
|
|
60685
|
-
className: (0,
|
|
60676
|
+
className: (0, import_classnames111.default)(
|
|
60686
60677
|
"text-sm",
|
|
60687
60678
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "text-neutral-600 dark:text-neutral-300"
|
|
60688
60679
|
),
|
|
@@ -60690,7 +60681,7 @@ var NestedSubSteps = ({
|
|
|
60690
60681
|
}
|
|
60691
60682
|
)
|
|
60692
60683
|
] });
|
|
60693
|
-
return /* @__PURE__ */ (0,
|
|
60684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("li", { children: onSubStepSelect ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60694
60685
|
"button",
|
|
60695
60686
|
{
|
|
60696
60687
|
type: "button",
|
|
@@ -60698,7 +60689,7 @@ var NestedSubSteps = ({
|
|
|
60698
60689
|
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",
|
|
60699
60690
|
children: content
|
|
60700
60691
|
}
|
|
60701
|
-
) : /* @__PURE__ */ (0,
|
|
60692
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "flex items-center gap-2.5", children: content }) }, subStep.id);
|
|
60702
60693
|
}) })
|
|
60703
60694
|
}
|
|
60704
60695
|
);
|
|
@@ -60719,7 +60710,7 @@ var WorkflowTimeline = ({
|
|
|
60719
60710
|
onStepAction
|
|
60720
60711
|
}) => {
|
|
60721
60712
|
if (loading) {
|
|
60722
|
-
return /* @__PURE__ */ (0,
|
|
60713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(WorkflowRailSkeleton, { rows: loadingRows });
|
|
60723
60714
|
}
|
|
60724
60715
|
const isEmpty2 = steps.length === 0;
|
|
60725
60716
|
const tallyEntries = [
|
|
@@ -60728,19 +60719,19 @@ var WorkflowTimeline = ({
|
|
|
60728
60719
|
{ count: tallies.flagged, label: labels.flagged },
|
|
60729
60720
|
{ count: tallies.remaining, label: labels.remaining }
|
|
60730
60721
|
].filter((entry) => entry.count > 0);
|
|
60731
|
-
return /* @__PURE__ */ (0,
|
|
60732
|
-
!isEmpty2 && /* @__PURE__ */ (0,
|
|
60733
|
-
/* @__PURE__ */ (0,
|
|
60734
|
-
/* @__PURE__ */ (0,
|
|
60735
|
-
/* @__PURE__ */ (0,
|
|
60722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "flex flex-col", children: [
|
|
60723
|
+
!isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: (0, import_classnames111.default)("border-b px-5 pb-4 pt-5", surfaces.border), children: [
|
|
60724
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
60725
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(SectionTitle, { surfaces, children: labels.progress }),
|
|
60726
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("span", { className: "text-sm font-semibold text-neutral-900 dark:text-white", children: [
|
|
60736
60727
|
progress,
|
|
60737
60728
|
"%"
|
|
60738
60729
|
] })
|
|
60739
60730
|
] }),
|
|
60740
|
-
/* @__PURE__ */ (0,
|
|
60731
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60741
60732
|
Progress_default,
|
|
60742
60733
|
{
|
|
60743
|
-
className: (0,
|
|
60734
|
+
className: (0, import_classnames111.default)(
|
|
60744
60735
|
"mt-2",
|
|
60745
60736
|
surfaces.translucent ? "bg-white/40 dark:bg-white/15" : "bg-neutral-200 dark:bg-neutral-700"
|
|
60746
60737
|
),
|
|
@@ -60750,8 +60741,8 @@ var WorkflowTimeline = ({
|
|
|
60750
60741
|
motion: "none"
|
|
60751
60742
|
}
|
|
60752
60743
|
),
|
|
60753
|
-
tallyEntries.length > 0 && /* @__PURE__ */ (0,
|
|
60754
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
60744
|
+
tallyEntries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "mt-3 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs", children: tallyEntries.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_react277.default.Fragment, { children: [
|
|
60745
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60755
60746
|
"span",
|
|
60756
60747
|
{
|
|
60757
60748
|
"aria-hidden": "true",
|
|
@@ -60759,7 +60750,7 @@ var WorkflowTimeline = ({
|
|
|
60759
60750
|
children: "\xB7"
|
|
60760
60751
|
}
|
|
60761
60752
|
),
|
|
60762
|
-
/* @__PURE__ */ (0,
|
|
60753
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60763
60754
|
Tally,
|
|
60764
60755
|
{
|
|
60765
60756
|
count: entry.count,
|
|
@@ -60769,7 +60760,7 @@ var WorkflowTimeline = ({
|
|
|
60769
60760
|
)
|
|
60770
60761
|
] }, entry.label)) })
|
|
60771
60762
|
] }),
|
|
60772
|
-
/* @__PURE__ */ (0,
|
|
60763
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: (0, import_classnames111.default)(isEmpty2 ? "" : "px-5 py-5"), children: isEmpty2 ? emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60773
60764
|
WorkflowPlaceholder,
|
|
60774
60765
|
{
|
|
60775
60766
|
title: labels.empty,
|
|
@@ -60777,14 +60768,14 @@ var WorkflowTimeline = ({
|
|
|
60777
60768
|
palette,
|
|
60778
60769
|
surfaces
|
|
60779
60770
|
}
|
|
60780
|
-
) : /* @__PURE__ */ (0,
|
|
60771
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ol", { className: "m-0 list-none p-0", children: steps.map((step, index) => {
|
|
60781
60772
|
const status = normalizeStatus(step.status);
|
|
60782
60773
|
const tokens = getStatusTokens(status, palette);
|
|
60783
60774
|
const isActive = step.id === activeStepId;
|
|
60784
60775
|
const isLast = index === steps.length - 1;
|
|
60785
60776
|
const nested = isActive && step.subSteps && step.subSteps.length > 0 ? step.subSteps : void 0;
|
|
60786
|
-
const rowContent = /* @__PURE__ */ (0,
|
|
60787
|
-
/* @__PURE__ */ (0,
|
|
60777
|
+
const rowContent = /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(import_jsx_runtime300.Fragment, { children: [
|
|
60778
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60788
60779
|
WorkflowStatusNode_default,
|
|
60789
60780
|
{
|
|
60790
60781
|
status,
|
|
@@ -60792,19 +60783,19 @@ var WorkflowTimeline = ({
|
|
|
60792
60783
|
className: "mt-0.5"
|
|
60793
60784
|
}
|
|
60794
60785
|
),
|
|
60795
|
-
/* @__PURE__ */ (0,
|
|
60796
|
-
/* @__PURE__ */ (0,
|
|
60797
|
-
/* @__PURE__ */ (0,
|
|
60786
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
60787
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
60788
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60798
60789
|
"span",
|
|
60799
60790
|
{
|
|
60800
|
-
className: (0,
|
|
60791
|
+
className: (0, import_classnames111.default)(
|
|
60801
60792
|
"text-sm",
|
|
60802
60793
|
isActive ? "font-semibold text-neutral-900 dark:text-white" : "font-medium text-neutral-700 dark:text-neutral-200"
|
|
60803
60794
|
),
|
|
60804
60795
|
children: step.label
|
|
60805
60796
|
}
|
|
60806
60797
|
),
|
|
60807
|
-
step.badge && /* @__PURE__ */ (0,
|
|
60798
|
+
step.badge && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60808
60799
|
WorkflowBadge,
|
|
60809
60800
|
{
|
|
60810
60801
|
status,
|
|
@@ -60814,10 +60805,10 @@ var WorkflowTimeline = ({
|
|
|
60814
60805
|
}
|
|
60815
60806
|
)
|
|
60816
60807
|
] }),
|
|
60817
|
-
step.meta && /* @__PURE__ */ (0,
|
|
60808
|
+
step.meta && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60818
60809
|
"p",
|
|
60819
60810
|
{
|
|
60820
|
-
className: (0,
|
|
60811
|
+
className: (0, import_classnames111.default)(
|
|
60821
60812
|
"mt-1 text-xs leading-5",
|
|
60822
60813
|
surfaces.mutedText
|
|
60823
60814
|
),
|
|
@@ -60826,24 +60817,24 @@ var WorkflowTimeline = ({
|
|
|
60826
60817
|
)
|
|
60827
60818
|
] })
|
|
60828
60819
|
] });
|
|
60829
|
-
return /* @__PURE__ */ (0,
|
|
60820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)(
|
|
60830
60821
|
"li",
|
|
60831
60822
|
{
|
|
60832
|
-
className: (0,
|
|
60823
|
+
className: (0, import_classnames111.default)("relative", !isLast && "pb-5"),
|
|
60833
60824
|
"aria-current": isActive ? "step" : void 0,
|
|
60834
60825
|
children: [
|
|
60835
|
-
!isLast && /* @__PURE__ */ (0,
|
|
60826
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60836
60827
|
"span",
|
|
60837
60828
|
{
|
|
60838
60829
|
"aria-hidden": "true",
|
|
60839
|
-
className: (0,
|
|
60830
|
+
className: (0, import_classnames111.default)(
|
|
60840
60831
|
"absolute bottom-0",
|
|
60841
60832
|
tokens.connectorDashed ? `border-l-2 border-dashed ${tokens.connector}` : `w-0.5 rounded-full ${tokens.connector}`
|
|
60842
60833
|
),
|
|
60843
60834
|
style: { left: CONNECTOR_LEFT, top: CONNECTOR_TOP }
|
|
60844
60835
|
}
|
|
60845
60836
|
),
|
|
60846
|
-
onStepSelect ? /* @__PURE__ */ (0,
|
|
60837
|
+
onStepSelect ? /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60847
60838
|
"button",
|
|
60848
60839
|
{
|
|
60849
60840
|
type: "button",
|
|
@@ -60851,8 +60842,8 @@ var WorkflowTimeline = ({
|
|
|
60851
60842
|
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",
|
|
60852
60843
|
children: rowContent
|
|
60853
60844
|
}
|
|
60854
|
-
) : /* @__PURE__ */ (0,
|
|
60855
|
-
/* @__PURE__ */ (0,
|
|
60845
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: "flex items-start gap-3", children: rowContent }),
|
|
60846
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60856
60847
|
WorkflowQuickActions_default,
|
|
60857
60848
|
{
|
|
60858
60849
|
stepId: step.id,
|
|
@@ -60863,7 +60854,7 @@ var WorkflowTimeline = ({
|
|
|
60863
60854
|
className: "ml-8 mt-2"
|
|
60864
60855
|
}
|
|
60865
60856
|
),
|
|
60866
|
-
nested && /* @__PURE__ */ (0,
|
|
60857
|
+
nested && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60867
60858
|
NestedSubSteps,
|
|
60868
60859
|
{
|
|
60869
60860
|
stepId: step.id,
|
|
@@ -60878,8 +60869,8 @@ var WorkflowTimeline = ({
|
|
|
60878
60869
|
step.id
|
|
60879
60870
|
);
|
|
60880
60871
|
}) }) }),
|
|
60881
|
-
showLegend && !isEmpty2 && /* @__PURE__ */ (0,
|
|
60882
|
-
/* @__PURE__ */ (0,
|
|
60872
|
+
showLegend && !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("div", { className: (0, import_classnames111.default)("mt-auto border-t px-5 py-4", surfaces.border), children: /* @__PURE__ */ (0, import_jsx_runtime300.jsx)("ul", { className: "flex flex-wrap gap-x-4 gap-y-2", children: LEGEND_ORDER.map((status) => /* @__PURE__ */ (0, import_jsx_runtime300.jsxs)("li", { className: "flex items-center gap-2", children: [
|
|
60873
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
60883
60874
|
WorkflowStatusNode_default,
|
|
60884
60875
|
{
|
|
60885
60876
|
status,
|
|
@@ -60887,7 +60878,7 @@ var WorkflowTimeline = ({
|
|
|
60887
60878
|
size: "sm"
|
|
60888
60879
|
}
|
|
60889
60880
|
),
|
|
60890
|
-
/* @__PURE__ */ (0,
|
|
60881
|
+
/* @__PURE__ */ (0, import_jsx_runtime300.jsx)("span", { className: (0, import_classnames111.default)("text-xs", surfaces.mutedText), children: labels.statuses[status] })
|
|
60891
60882
|
] }, status)) }) })
|
|
60892
60883
|
] });
|
|
60893
60884
|
};
|
|
@@ -61048,7 +61039,7 @@ var resolveActiveStep = (steps, activeStepId) => {
|
|
|
61048
61039
|
};
|
|
61049
61040
|
|
|
61050
61041
|
// src/components/WorkflowTracker/sampleWorkflow.tsx
|
|
61051
|
-
var
|
|
61042
|
+
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
61052
61043
|
var sampleWorkflow = {
|
|
61053
61044
|
eyebrow: "VENDOR ONBOARDING \xB7 REQ-4128",
|
|
61054
61045
|
title: "Northwind Logistics GmbH",
|
|
@@ -61093,9 +61084,9 @@ var sampleWorkflow = {
|
|
|
61093
61084
|
status: "attention",
|
|
61094
61085
|
badge: "Needs attention",
|
|
61095
61086
|
meta: "1h 06m \xB7 Liability certificate expired 12 Aug",
|
|
61096
|
-
details: /* @__PURE__ */ (0,
|
|
61097
|
-
/* @__PURE__ */ (0,
|
|
61098
|
-
/* @__PURE__ */ (0,
|
|
61087
|
+
details: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { className: "space-y-3 px-5 py-4 sm:px-6", children: [
|
|
61088
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("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." }),
|
|
61089
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("ul", { className: "flex flex-wrap gap-2", children: ["reminder-12-aug.pdf", "underwriter-quote.pdf"].map((file) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61099
61090
|
"li",
|
|
61100
61091
|
{
|
|
61101
61092
|
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",
|
|
@@ -61126,18 +61117,18 @@ var sampleWorkflow = {
|
|
|
61126
61117
|
owner: "D. Okafor",
|
|
61127
61118
|
startedAt: "19 Aug \xB7 09:12",
|
|
61128
61119
|
sla: "Due in 6h",
|
|
61129
|
-
details: /* @__PURE__ */ (0,
|
|
61130
|
-
/* @__PURE__ */ (0,
|
|
61131
|
-
/* @__PURE__ */ (0,
|
|
61132
|
-
/* @__PURE__ */ (0,
|
|
61120
|
+
details: /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { className: "space-y-5 px-5 py-4 sm:px-6", children: [
|
|
61121
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { children: [
|
|
61122
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Review activity" }),
|
|
61123
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("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." })
|
|
61133
61124
|
] }),
|
|
61134
|
-
/* @__PURE__ */ (0,
|
|
61135
|
-
/* @__PURE__ */ (0,
|
|
61136
|
-
/* @__PURE__ */ (0,
|
|
61125
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { children: [
|
|
61126
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Files received" }),
|
|
61127
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("ul", { className: "mt-2 flex flex-wrap gap-2", children: [
|
|
61137
61128
|
"data-handling-v3.pdf",
|
|
61138
61129
|
"pentest-2026.pdf",
|
|
61139
61130
|
"soc2-typeii.pdf"
|
|
61140
|
-
].map((file) => /* @__PURE__ */ (0,
|
|
61131
|
+
].map((file) => /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61141
61132
|
"li",
|
|
61142
61133
|
{
|
|
61143
61134
|
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",
|
|
@@ -61146,11 +61137,11 @@ var sampleWorkflow = {
|
|
|
61146
61137
|
file
|
|
61147
61138
|
)) })
|
|
61148
61139
|
] }),
|
|
61149
|
-
/* @__PURE__ */ (0,
|
|
61150
|
-
/* @__PURE__ */ (0,
|
|
61151
|
-
/* @__PURE__ */ (0,
|
|
61152
|
-
/* @__PURE__ */ (0,
|
|
61153
|
-
/* @__PURE__ */ (0,
|
|
61140
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("div", { children: [
|
|
61141
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-widest text-neutral-400 dark:text-neutral-500", children: "Open findings" }),
|
|
61142
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("ul", { className: "mt-2 space-y-2", children: [
|
|
61143
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
61144
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61154
61145
|
"span",
|
|
61155
61146
|
{
|
|
61156
61147
|
"aria-hidden": "true",
|
|
@@ -61159,8 +61150,8 @@ var sampleWorkflow = {
|
|
|
61159
61150
|
),
|
|
61160
61151
|
"Subprocessor \u201CCloudDot BV\u201D is not covered by the DPA yet"
|
|
61161
61152
|
] }),
|
|
61162
|
-
/* @__PURE__ */ (0,
|
|
61163
|
-
/* @__PURE__ */ (0,
|
|
61153
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsxs)("li", { className: "flex items-start gap-2 text-sm leading-6 text-neutral-600 dark:text-neutral-300", children: [
|
|
61154
|
+
/* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
|
|
61164
61155
|
"span",
|
|
61165
61156
|
{
|
|
61166
61157
|
"aria-hidden": "true",
|
|
@@ -61238,7 +61229,7 @@ var sampleWorkflow = {
|
|
|
61238
61229
|
};
|
|
61239
61230
|
|
|
61240
61231
|
// src/components/WorkflowTracker/WorkflowTrackerRail.tsx
|
|
61241
|
-
var
|
|
61232
|
+
var import_jsx_runtime302 = require("react/jsx-runtime");
|
|
61242
61233
|
var WorkflowTrackerRail = ({
|
|
61243
61234
|
data = sampleWorkflow,
|
|
61244
61235
|
loading = false,
|
|
@@ -61265,14 +61256,14 @@ var WorkflowTrackerRail = ({
|
|
|
61265
61256
|
);
|
|
61266
61257
|
const progress = (0, import_react279.useMemo)(() => computeProgress(steps), [steps]);
|
|
61267
61258
|
const tallies = (0, import_react279.useMemo)(() => computeTallies(steps), [steps]);
|
|
61268
|
-
return /* @__PURE__ */ (0,
|
|
61259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
61269
61260
|
Panel_default,
|
|
61270
61261
|
{
|
|
61271
61262
|
...cardProps,
|
|
61272
61263
|
scrollable: cardScrollable ?? false,
|
|
61273
|
-
className: (0,
|
|
61264
|
+
className: (0, import_classnames112.default)(className, cardClassName),
|
|
61274
61265
|
style,
|
|
61275
|
-
children: /* @__PURE__ */ (0,
|
|
61266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime302.jsx)(
|
|
61276
61267
|
WorkflowTimeline_default,
|
|
61277
61268
|
{
|
|
61278
61269
|
steps,
|
|
@@ -61298,11 +61289,11 @@ var WorkflowTrackerRail_default = WorkflowTrackerRail;
|
|
|
61298
61289
|
|
|
61299
61290
|
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
61300
61291
|
var import_react280 = require("react");
|
|
61301
|
-
var
|
|
61292
|
+
var import_classnames114 = __toESM(require("classnames"), 1);
|
|
61302
61293
|
|
|
61303
61294
|
// src/components/WorkflowTracker/WorkflowDetailPanel.tsx
|
|
61304
|
-
var
|
|
61305
|
-
var
|
|
61295
|
+
var import_classnames113 = __toESM(require("classnames"), 1);
|
|
61296
|
+
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
61306
61297
|
var WorkflowDetailPanel = ({
|
|
61307
61298
|
active,
|
|
61308
61299
|
totalSteps,
|
|
@@ -61314,10 +61305,10 @@ var WorkflowDetailPanel = ({
|
|
|
61314
61305
|
onStepAction
|
|
61315
61306
|
}) => {
|
|
61316
61307
|
if (loading) {
|
|
61317
|
-
return /* @__PURE__ */ (0,
|
|
61308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(WorkflowDetailSkeleton, {});
|
|
61318
61309
|
}
|
|
61319
61310
|
if (!active) {
|
|
61320
|
-
return /* @__PURE__ */ (0,
|
|
61311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61321
61312
|
WorkflowPlaceholder,
|
|
61322
61313
|
{
|
|
61323
61314
|
title: labels.noActiveStep,
|
|
@@ -61335,11 +61326,11 @@ var WorkflowDetailPanel = ({
|
|
|
61335
61326
|
step.startedAt ? { label: labels.started, value: step.startedAt } : void 0,
|
|
61336
61327
|
step.sla ? { label: labels.sla, value: step.sla } : void 0
|
|
61337
61328
|
].filter(Boolean);
|
|
61338
|
-
return /* @__PURE__ */ (0,
|
|
61339
|
-
/* @__PURE__ */ (0,
|
|
61340
|
-
/* @__PURE__ */ (0,
|
|
61341
|
-
/* @__PURE__ */ (0,
|
|
61342
|
-
/* @__PURE__ */ (0,
|
|
61329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-col", children: [
|
|
61330
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "px-5 pb-6 pt-5 sm:px-6", children: [
|
|
61331
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
|
|
61332
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
61333
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(SectionTitle, { surfaces, children: [
|
|
61343
61334
|
labels.step,
|
|
61344
61335
|
" ",
|
|
61345
61336
|
index,
|
|
@@ -61348,7 +61339,7 @@ var WorkflowDetailPanel = ({
|
|
|
61348
61339
|
" ",
|
|
61349
61340
|
totalSteps
|
|
61350
61341
|
] }),
|
|
61351
|
-
step.badge && /* @__PURE__ */ (0,
|
|
61342
|
+
step.badge && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61352
61343
|
WorkflowBadge,
|
|
61353
61344
|
{
|
|
61354
61345
|
status,
|
|
@@ -61358,13 +61349,13 @@ var WorkflowDetailPanel = ({
|
|
|
61358
61349
|
}
|
|
61359
61350
|
)
|
|
61360
61351
|
] }),
|
|
61361
|
-
/* @__PURE__ */ (0,
|
|
61362
|
-
step.elapsed && /* @__PURE__ */ (0,
|
|
61352
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-2", children: [
|
|
61353
|
+
step.elapsed && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(SectionMeta, { surfaces, children: [
|
|
61363
61354
|
labels.elapsed,
|
|
61364
61355
|
" ",
|
|
61365
61356
|
step.elapsed
|
|
61366
61357
|
] }),
|
|
61367
|
-
/* @__PURE__ */ (0,
|
|
61358
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61368
61359
|
WorkflowQuickActions_default,
|
|
61369
61360
|
{
|
|
61370
61361
|
stepId: step.id,
|
|
@@ -61376,18 +61367,18 @@ var WorkflowDetailPanel = ({
|
|
|
61376
61367
|
)
|
|
61377
61368
|
] })
|
|
61378
61369
|
] }),
|
|
61379
|
-
/* @__PURE__ */ (0,
|
|
61380
|
-
step.description && /* @__PURE__ */ (0,
|
|
61370
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("h3", { className: "mt-3 text-xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-2xl", children: step.label }),
|
|
61371
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61381
61372
|
"p",
|
|
61382
61373
|
{
|
|
61383
|
-
className: (0,
|
|
61374
|
+
className: (0, import_classnames113.default)(
|
|
61384
61375
|
"mt-2 max-w-3xl text-sm leading-6",
|
|
61385
61376
|
surfaces.mutedText
|
|
61386
61377
|
),
|
|
61387
61378
|
children: step.description
|
|
61388
61379
|
}
|
|
61389
61380
|
),
|
|
61390
|
-
metaFields.length > 0 && /* @__PURE__ */ (0,
|
|
61381
|
+
metaFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: "mt-5 flex flex-wrap gap-x-10 gap-y-4", children: metaFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61391
61382
|
MetaField,
|
|
61392
61383
|
{
|
|
61393
61384
|
label: field.label,
|
|
@@ -61397,18 +61388,18 @@ var WorkflowDetailPanel = ({
|
|
|
61397
61388
|
field.label
|
|
61398
61389
|
)) })
|
|
61399
61390
|
] }),
|
|
61400
|
-
subSteps.length > 0 && /* @__PURE__ */ (0,
|
|
61401
|
-
/* @__PURE__ */ (0,
|
|
61391
|
+
subSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
|
|
61392
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(
|
|
61402
61393
|
"div",
|
|
61403
61394
|
{
|
|
61404
|
-
className: (0,
|
|
61395
|
+
className: (0, import_classnames113.default)(
|
|
61405
61396
|
"flex flex-wrap items-center justify-between gap-2 border-y px-5 py-2.5 sm:px-6",
|
|
61406
61397
|
surfaces.border,
|
|
61407
61398
|
surfaces.strip
|
|
61408
61399
|
),
|
|
61409
61400
|
children: [
|
|
61410
|
-
/* @__PURE__ */ (0,
|
|
61411
|
-
/* @__PURE__ */ (0,
|
|
61401
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(SectionTitle, { surfaces, children: labels.subSteps }),
|
|
61402
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(SectionMeta, { surfaces, children: [
|
|
61412
61403
|
summary.accepted,
|
|
61413
61404
|
" ",
|
|
61414
61405
|
labels.accepted,
|
|
@@ -61424,24 +61415,24 @@ var WorkflowDetailPanel = ({
|
|
|
61424
61415
|
]
|
|
61425
61416
|
}
|
|
61426
61417
|
),
|
|
61427
|
-
/* @__PURE__ */ (0,
|
|
61418
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61428
61419
|
"ul",
|
|
61429
61420
|
{
|
|
61430
|
-
className: (0,
|
|
61421
|
+
className: (0, import_classnames113.default)(
|
|
61431
61422
|
"m-0 list-none divide-y p-0",
|
|
61432
61423
|
surfaces.divider
|
|
61433
61424
|
),
|
|
61434
61425
|
children: subSteps.map((subStep) => {
|
|
61435
61426
|
const subStatus = normalizeStatus(subStep.status);
|
|
61436
61427
|
const isRunning = subStatus === "running";
|
|
61437
|
-
const rowContent = /* @__PURE__ */ (0,
|
|
61438
|
-
/* @__PURE__ */ (0,
|
|
61439
|
-
/* @__PURE__ */ (0,
|
|
61440
|
-
/* @__PURE__ */ (0,
|
|
61441
|
-
subStep.note && /* @__PURE__ */ (0,
|
|
61428
|
+
const rowContent = /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)(import_jsx_runtime303.Fragment, { children: [
|
|
61429
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(WorkflowStatusNode_default, { status: subStatus, palette }),
|
|
61430
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
61431
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: subStep.label }),
|
|
61432
|
+
subStep.note && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61442
61433
|
"p",
|
|
61443
61434
|
{
|
|
61444
|
-
className: (0,
|
|
61435
|
+
className: (0, import_classnames113.default)(
|
|
61445
61436
|
"mt-0.5 text-xs leading-5",
|
|
61446
61437
|
surfaces.mutedText
|
|
61447
61438
|
),
|
|
@@ -61449,7 +61440,7 @@ var WorkflowDetailPanel = ({
|
|
|
61449
61440
|
}
|
|
61450
61441
|
)
|
|
61451
61442
|
] }),
|
|
61452
|
-
subStep.badge && /* @__PURE__ */ (0,
|
|
61443
|
+
subStep.badge && /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61453
61444
|
WorkflowBadge,
|
|
61454
61445
|
{
|
|
61455
61446
|
status: subStatus,
|
|
@@ -61458,10 +61449,10 @@ var WorkflowDetailPanel = ({
|
|
|
61458
61449
|
children: subStep.badge
|
|
61459
61450
|
}
|
|
61460
61451
|
),
|
|
61461
|
-
/* @__PURE__ */ (0,
|
|
61452
|
+
/* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61462
61453
|
"span",
|
|
61463
61454
|
{
|
|
61464
|
-
className: (0,
|
|
61455
|
+
className: (0, import_classnames113.default)(
|
|
61465
61456
|
"w-10 shrink-0 text-right text-xs tabular-nums",
|
|
61466
61457
|
surfaces.faintText
|
|
61467
61458
|
),
|
|
@@ -61469,22 +61460,22 @@ var WorkflowDetailPanel = ({
|
|
|
61469
61460
|
}
|
|
61470
61461
|
)
|
|
61471
61462
|
] });
|
|
61472
|
-
const rowClasses = (0,
|
|
61463
|
+
const rowClasses = (0, import_classnames113.default)(
|
|
61473
61464
|
"flex w-full items-center gap-3 px-5 py-3 text-left sm:px-6",
|
|
61474
61465
|
isRunning && getRowHighlight(palette.accent, surfaces.translucent)
|
|
61475
61466
|
);
|
|
61476
|
-
return /* @__PURE__ */ (0,
|
|
61467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("li", { children: onSubStepSelect ? /* @__PURE__ */ (0, import_jsx_runtime303.jsx)(
|
|
61477
61468
|
"button",
|
|
61478
61469
|
{
|
|
61479
61470
|
type: "button",
|
|
61480
61471
|
onClick: () => onSubStepSelect(step.id, subStep.id),
|
|
61481
|
-
className: (0,
|
|
61472
|
+
className: (0, import_classnames113.default)(
|
|
61482
61473
|
rowClasses,
|
|
61483
61474
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-neutral-400 dark:focus-visible:ring-neutral-500"
|
|
61484
61475
|
),
|
|
61485
61476
|
children: rowContent
|
|
61486
61477
|
}
|
|
61487
|
-
) : /* @__PURE__ */ (0,
|
|
61478
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime303.jsx)("div", { className: rowClasses, children: rowContent }) }, subStep.id);
|
|
61488
61479
|
})
|
|
61489
61480
|
}
|
|
61490
61481
|
)
|
|
@@ -61494,7 +61485,7 @@ var WorkflowDetailPanel = ({
|
|
|
61494
61485
|
var WorkflowDetailPanel_default = WorkflowDetailPanel;
|
|
61495
61486
|
|
|
61496
61487
|
// src/components/WorkflowTracker/WorkflowTrackerStepDetails.tsx
|
|
61497
|
-
var
|
|
61488
|
+
var import_jsx_runtime304 = require("react/jsx-runtime");
|
|
61498
61489
|
var WorkflowTrackerStepDetails = ({
|
|
61499
61490
|
data = sampleWorkflow,
|
|
61500
61491
|
loading = false,
|
|
@@ -61517,13 +61508,13 @@ var WorkflowTrackerStepDetails = ({
|
|
|
61517
61508
|
() => resolveActiveStep(steps, data?.activeStepId),
|
|
61518
61509
|
[steps, data?.activeStepId]
|
|
61519
61510
|
);
|
|
61520
|
-
return /* @__PURE__ */ (0,
|
|
61511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
61521
61512
|
Panel_default,
|
|
61522
61513
|
{
|
|
61523
61514
|
...cardProps,
|
|
61524
|
-
className: (0,
|
|
61515
|
+
className: (0, import_classnames114.default)(className, cardClassName),
|
|
61525
61516
|
style,
|
|
61526
|
-
children: /* @__PURE__ */ (0,
|
|
61517
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime304.jsx)(
|
|
61527
61518
|
WorkflowDetailPanel_default,
|
|
61528
61519
|
{
|
|
61529
61520
|
active,
|
|
@@ -61543,31 +61534,31 @@ var WorkflowTrackerStepDetails_default = WorkflowTrackerStepDetails;
|
|
|
61543
61534
|
|
|
61544
61535
|
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61545
61536
|
var import_react281 = require("react");
|
|
61546
|
-
var
|
|
61537
|
+
var import_classnames116 = __toESM(require("classnames"), 1);
|
|
61547
61538
|
|
|
61548
61539
|
// src/components/WorkflowTracker/WorkflowDetailsCard.tsx
|
|
61549
|
-
var
|
|
61550
|
-
var
|
|
61540
|
+
var import_classnames115 = __toESM(require("classnames"), 1);
|
|
61541
|
+
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
61551
61542
|
var WorkflowDetailsCard = ({
|
|
61552
61543
|
details,
|
|
61553
61544
|
ariaLabel,
|
|
61554
61545
|
cardProps,
|
|
61555
61546
|
className,
|
|
61556
61547
|
style
|
|
61557
|
-
}) => /* @__PURE__ */ (0,
|
|
61548
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(
|
|
61558
61549
|
Panel_default,
|
|
61559
61550
|
{
|
|
61560
61551
|
...cardProps,
|
|
61561
61552
|
flexBody: true,
|
|
61562
|
-
className: (0,
|
|
61553
|
+
className: (0, import_classnames115.default)("flex-1", className),
|
|
61563
61554
|
style,
|
|
61564
|
-
children: /* @__PURE__ */ (0,
|
|
61555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime305.jsx)(ScrollArea_default, { className: "h-full", mask: true, role: "region", "aria-label": ariaLabel, children: details })
|
|
61565
61556
|
}
|
|
61566
61557
|
);
|
|
61567
61558
|
var WorkflowDetailsCard_default = WorkflowDetailsCard;
|
|
61568
61559
|
|
|
61569
61560
|
// src/components/WorkflowTracker/WorkflowTrackerDetails.tsx
|
|
61570
|
-
var
|
|
61561
|
+
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
61571
61562
|
var WorkflowTrackerDetails = ({
|
|
61572
61563
|
data = sampleWorkflow,
|
|
61573
61564
|
loading = false,
|
|
@@ -61586,21 +61577,110 @@ var WorkflowTrackerDetails = ({
|
|
|
61586
61577
|
);
|
|
61587
61578
|
const details = active?.step.details;
|
|
61588
61579
|
if (loading || details == null || details === "") return null;
|
|
61589
|
-
return /* @__PURE__ */ (0,
|
|
61580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime306.jsx)(
|
|
61590
61581
|
WorkflowDetailsCard_default,
|
|
61591
61582
|
{
|
|
61592
61583
|
details,
|
|
61593
61584
|
ariaLabel: labels.details,
|
|
61594
61585
|
cardProps,
|
|
61595
|
-
className: (0,
|
|
61586
|
+
className: (0, import_classnames116.default)(className, cardClassName),
|
|
61596
61587
|
style
|
|
61597
61588
|
}
|
|
61598
61589
|
);
|
|
61599
61590
|
};
|
|
61600
61591
|
var WorkflowTrackerDetails_default = WorkflowTrackerDetails;
|
|
61601
61592
|
|
|
61602
|
-
// src/components/WorkflowTracker/
|
|
61593
|
+
// src/components/WorkflowTracker/WorkflowTrackerRollups.tsx
|
|
61594
|
+
var import_react282 = require("react");
|
|
61595
|
+
var import_classnames118 = __toESM(require("classnames"), 1);
|
|
61596
|
+
|
|
61597
|
+
// src/components/WorkflowTracker/WorkflowSummaryCard.tsx
|
|
61598
|
+
var import_classnames117 = __toESM(require("classnames"), 1);
|
|
61599
|
+
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
61600
|
+
var WorkflowSummaryCard = ({
|
|
61601
|
+
title,
|
|
61602
|
+
steps,
|
|
61603
|
+
palette,
|
|
61604
|
+
surfaces
|
|
61605
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: "px-5 py-4", children: [
|
|
61606
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(SectionTitle, { surfaces, children: title }),
|
|
61607
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)("ul", { className: "mt-3 space-y-3", children: steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("li", { className: "flex items-start gap-3", children: [
|
|
61608
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
61609
|
+
WorkflowStatusNode_default,
|
|
61610
|
+
{
|
|
61611
|
+
status: normalizeStatus(step.status),
|
|
61612
|
+
palette,
|
|
61613
|
+
className: "mt-0.5"
|
|
61614
|
+
}
|
|
61615
|
+
),
|
|
61616
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
61617
|
+
/* @__PURE__ */ (0, import_jsx_runtime307.jsx)("p", { className: "text-sm font-medium text-neutral-800 dark:text-neutral-100", children: step.label }),
|
|
61618
|
+
step.meta && /* @__PURE__ */ (0, import_jsx_runtime307.jsx)(
|
|
61619
|
+
"p",
|
|
61620
|
+
{
|
|
61621
|
+
className: (0, import_classnames117.default)(
|
|
61622
|
+
"mt-0.5 text-xs leading-5",
|
|
61623
|
+
surfaces.mutedText
|
|
61624
|
+
),
|
|
61625
|
+
children: step.meta
|
|
61626
|
+
}
|
|
61627
|
+
)
|
|
61628
|
+
] })
|
|
61629
|
+
] }, step.id)) })
|
|
61630
|
+
] });
|
|
61631
|
+
var WorkflowSummaryCard_default = WorkflowSummaryCard;
|
|
61632
|
+
|
|
61633
|
+
// src/components/WorkflowTracker/WorkflowTrackerRollups.tsx
|
|
61603
61634
|
var import_jsx_runtime308 = require("react/jsx-runtime");
|
|
61635
|
+
var WorkflowTrackerRollups = ({
|
|
61636
|
+
data = sampleWorkflow,
|
|
61637
|
+
loading = false,
|
|
61638
|
+
labels: labelOverrides,
|
|
61639
|
+
className,
|
|
61640
|
+
style,
|
|
61641
|
+
...styleProps
|
|
61642
|
+
}) => {
|
|
61643
|
+
const steps = data?.steps ?? [];
|
|
61644
|
+
const { palette, surfaces } = useWorkflowChrome(styleProps);
|
|
61645
|
+
const labels = (0, import_react282.useMemo)(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61646
|
+
const cardProps = buildCardProps(styleProps);
|
|
61647
|
+
const attentionSteps = (0, import_react282.useMemo)(() => getAttentionSteps(steps), [steps]);
|
|
61648
|
+
const skippedSteps = (0, import_react282.useMemo)(() => getSkippedSteps(steps), [steps]);
|
|
61649
|
+
if (loading || attentionSteps.length === 0 && skippedSteps.length === 0) {
|
|
61650
|
+
return null;
|
|
61651
|
+
}
|
|
61652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime308.jsxs)(
|
|
61653
|
+
"div",
|
|
61654
|
+
{
|
|
61655
|
+
className: (0, import_classnames118.default)("grid grid-cols-1 gap-5 @xl:grid-cols-2", className),
|
|
61656
|
+
style,
|
|
61657
|
+
children: [
|
|
61658
|
+
attentionSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Panel_default, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
61659
|
+
WorkflowSummaryCard_default,
|
|
61660
|
+
{
|
|
61661
|
+
title: labels.needsAttention,
|
|
61662
|
+
steps: attentionSteps,
|
|
61663
|
+
palette,
|
|
61664
|
+
surfaces
|
|
61665
|
+
}
|
|
61666
|
+
) }),
|
|
61667
|
+
skippedSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Panel_default, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
61668
|
+
WorkflowSummaryCard_default,
|
|
61669
|
+
{
|
|
61670
|
+
title: labels.skippedSteps,
|
|
61671
|
+
steps: skippedSteps,
|
|
61672
|
+
palette,
|
|
61673
|
+
surfaces
|
|
61674
|
+
}
|
|
61675
|
+
) })
|
|
61676
|
+
]
|
|
61677
|
+
}
|
|
61678
|
+
);
|
|
61679
|
+
};
|
|
61680
|
+
var WorkflowTrackerRollups_default = WorkflowTrackerRollups;
|
|
61681
|
+
|
|
61682
|
+
// src/components/WorkflowTracker/WorkflowTracker.tsx
|
|
61683
|
+
var import_jsx_runtime309 = require("react/jsx-runtime");
|
|
61604
61684
|
var WorkflowTracker = ({
|
|
61605
61685
|
data = sampleWorkflow,
|
|
61606
61686
|
accentColor = "blue",
|
|
@@ -61634,7 +61714,6 @@ var WorkflowTracker = ({
|
|
|
61634
61714
|
style,
|
|
61635
61715
|
...rest
|
|
61636
61716
|
}) => {
|
|
61637
|
-
const steps = data?.steps ?? [];
|
|
61638
61717
|
const styleProps = {
|
|
61639
61718
|
accentColor,
|
|
61640
61719
|
attentionColor,
|
|
@@ -61649,38 +61728,35 @@ var WorkflowTracker = ({
|
|
|
61649
61728
|
padding,
|
|
61650
61729
|
translucentSurfaces
|
|
61651
61730
|
};
|
|
61652
|
-
const {
|
|
61653
|
-
const labels = (0,
|
|
61654
|
-
const cardProps = buildCardProps(styleProps);
|
|
61655
|
-
const attentionSteps = (0, import_react282.useMemo)(() => getAttentionSteps(steps), [steps]);
|
|
61656
|
-
const skippedSteps = (0, import_react282.useMemo)(() => getSkippedSteps(steps), [steps]);
|
|
61731
|
+
const { surfaces } = useWorkflowChrome(styleProps);
|
|
61732
|
+
const labels = (0, import_react283.useMemo)(() => resolveLabels(labelOverrides), [labelOverrides]);
|
|
61657
61733
|
const railStyle = {
|
|
61658
61734
|
"--wt-rail-width": typeof railWidth === "number" ? `${railWidth}px` : railWidth,
|
|
61659
61735
|
"--wt-fill-offset": typeof fillHeightOffset === "number" ? `${fillHeightOffset}px` : fillHeightOffset
|
|
61660
61736
|
};
|
|
61661
|
-
return /* @__PURE__ */ (0,
|
|
61737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61662
61738
|
"div",
|
|
61663
61739
|
{
|
|
61664
|
-
className: (0,
|
|
61740
|
+
className: (0, import_classnames119.default)("@container w-full", className),
|
|
61665
61741
|
style: { maxWidth, ...railStyle, ...style },
|
|
61666
61742
|
"aria-busy": loading || void 0,
|
|
61667
61743
|
...rest,
|
|
61668
61744
|
children: [
|
|
61669
|
-
showHeader && loading && /* @__PURE__ */ (0,
|
|
61745
|
+
showHeader && loading && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61670
61746
|
WorkflowHeaderSkeleton,
|
|
61671
61747
|
{
|
|
61672
61748
|
hasIcon: Boolean(data?.icon),
|
|
61673
61749
|
iconCorner
|
|
61674
61750
|
}
|
|
61675
61751
|
),
|
|
61676
|
-
showHeader && !loading && /* @__PURE__ */ (0,
|
|
61677
|
-
/* @__PURE__ */ (0,
|
|
61752
|
+
showHeader && !loading && /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("header", { className: "mb-5 flex flex-wrap items-start justify-between gap-3", children: [
|
|
61753
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
61678
61754
|
data?.icon && // `overflow-hidden` plus the shared corner class clips whatever
|
|
61679
61755
|
// the caller passes, so an <img> needs no rounding of its own.
|
|
61680
|
-
/* @__PURE__ */ (0,
|
|
61756
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61681
61757
|
"span",
|
|
61682
61758
|
{
|
|
61683
|
-
className: (0,
|
|
61759
|
+
className: (0, import_classnames119.default)(
|
|
61684
61760
|
"flex h-12 w-12 shrink-0 items-center justify-center overflow-hidden [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
61685
61761
|
getSurfaceCornerClass(iconCorner),
|
|
61686
61762
|
surfaces.chip
|
|
@@ -61688,33 +61764,33 @@ var WorkflowTracker = ({
|
|
|
61688
61764
|
children: data.icon
|
|
61689
61765
|
}
|
|
61690
61766
|
),
|
|
61691
|
-
/* @__PURE__ */ (0,
|
|
61692
|
-
data?.eyebrow && /* @__PURE__ */ (0,
|
|
61767
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)("div", { className: "min-w-0", children: [
|
|
61768
|
+
data?.eyebrow && /* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61693
61769
|
"p",
|
|
61694
61770
|
{
|
|
61695
|
-
className: (0,
|
|
61771
|
+
className: (0, import_classnames119.default)(
|
|
61696
61772
|
"text-[11px] font-semibold uppercase tracking-widest",
|
|
61697
61773
|
surfaces.faintText
|
|
61698
61774
|
),
|
|
61699
61775
|
children: data.eyebrow
|
|
61700
61776
|
}
|
|
61701
61777
|
),
|
|
61702
|
-
/* @__PURE__ */ (0,
|
|
61778
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)("h2", { className: "mt-1 text-2xl font-semibold tracking-tight text-neutral-900 dark:text-white sm:text-3xl", children: data?.title })
|
|
61703
61779
|
] })
|
|
61704
61780
|
] }),
|
|
61705
|
-
data?.live && /* @__PURE__ */ (0,
|
|
61781
|
+
data?.live && /* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61706
61782
|
Pill_default,
|
|
61707
61783
|
{
|
|
61708
61784
|
size: "md",
|
|
61709
61785
|
tone: mutedColor,
|
|
61710
61786
|
variant: "outline",
|
|
61711
|
-
className: (0,
|
|
61787
|
+
className: (0, import_classnames119.default)("tracking-wide", surfaces.chip),
|
|
61712
61788
|
children: [
|
|
61713
|
-
/* @__PURE__ */ (0,
|
|
61789
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61714
61790
|
"span",
|
|
61715
61791
|
{
|
|
61716
61792
|
"aria-hidden": "true",
|
|
61717
|
-
className: (0,
|
|
61793
|
+
className: (0, import_classnames119.default)(
|
|
61718
61794
|
"mr-2 inline-block h-1.5 w-1.5 rounded-full",
|
|
61719
61795
|
`bg-${accentColor}-500 dark:bg-${accentColor}-400`
|
|
61720
61796
|
)
|
|
@@ -61725,15 +61801,15 @@ var WorkflowTracker = ({
|
|
|
61725
61801
|
}
|
|
61726
61802
|
)
|
|
61727
61803
|
] }),
|
|
61728
|
-
/* @__PURE__ */ (0,
|
|
61804
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61729
61805
|
"div",
|
|
61730
61806
|
{
|
|
61731
|
-
className: (0,
|
|
61807
|
+
className: (0, import_classnames119.default)(
|
|
61732
61808
|
"grid grid-cols-1 items-start gap-5 @4xl:grid-cols-[var(--wt-rail-width)_minmax(0,1fr)]",
|
|
61733
61809
|
fillHeight && "@4xl:h-[calc(100dvh-var(--wt-fill-offset))]"
|
|
61734
61810
|
),
|
|
61735
61811
|
children: [
|
|
61736
|
-
/* @__PURE__ */ (0,
|
|
61812
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61737
61813
|
WorkflowTrackerRail_default,
|
|
61738
61814
|
{
|
|
61739
61815
|
...styleProps,
|
|
@@ -61744,7 +61820,7 @@ var WorkflowTracker = ({
|
|
|
61744
61820
|
emptyState,
|
|
61745
61821
|
labels: labelOverrides,
|
|
61746
61822
|
cardScrollable: fillHeight,
|
|
61747
|
-
cardClassName: (0,
|
|
61823
|
+
cardClassName: (0, import_classnames119.default)(
|
|
61748
61824
|
stickyRail && !fillHeight && "@4xl:sticky @4xl:top-6",
|
|
61749
61825
|
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61750
61826
|
),
|
|
@@ -61753,15 +61829,15 @@ var WorkflowTracker = ({
|
|
|
61753
61829
|
onStepAction
|
|
61754
61830
|
}
|
|
61755
61831
|
),
|
|
61756
|
-
/* @__PURE__ */ (0,
|
|
61832
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsxs)(
|
|
61757
61833
|
"div",
|
|
61758
61834
|
{
|
|
61759
|
-
className: (0,
|
|
61835
|
+
className: (0, import_classnames119.default)(
|
|
61760
61836
|
"@container flex min-w-0 flex-col gap-5",
|
|
61761
61837
|
fillHeight && "@4xl:min-h-0 @4xl:self-stretch"
|
|
61762
61838
|
),
|
|
61763
61839
|
children: [
|
|
61764
|
-
/* @__PURE__ */ (0,
|
|
61840
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61765
61841
|
WorkflowTrackerStepDetails_default,
|
|
61766
61842
|
{
|
|
61767
61843
|
...styleProps,
|
|
@@ -61772,7 +61848,7 @@ var WorkflowTracker = ({
|
|
|
61772
61848
|
onStepAction
|
|
61773
61849
|
}
|
|
61774
61850
|
),
|
|
61775
|
-
/* @__PURE__ */ (0,
|
|
61851
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61776
61852
|
WorkflowTrackerDetails_default,
|
|
61777
61853
|
{
|
|
61778
61854
|
...styleProps,
|
|
@@ -61781,26 +61857,15 @@ var WorkflowTracker = ({
|
|
|
61781
61857
|
labels: labelOverrides
|
|
61782
61858
|
}
|
|
61783
61859
|
),
|
|
61784
|
-
|
|
61785
|
-
|
|
61786
|
-
|
|
61787
|
-
|
|
61788
|
-
|
|
61789
|
-
|
|
61790
|
-
|
|
61791
|
-
|
|
61792
|
-
|
|
61793
|
-
) }),
|
|
61794
|
-
skippedSteps.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(Panel_default, { ...cardProps, children: /* @__PURE__ */ (0, import_jsx_runtime308.jsx)(
|
|
61795
|
-
WorkflowSummaryCard_default,
|
|
61796
|
-
{
|
|
61797
|
-
title: labels.skippedSteps,
|
|
61798
|
-
steps: skippedSteps,
|
|
61799
|
-
palette,
|
|
61800
|
-
surfaces
|
|
61801
|
-
}
|
|
61802
|
-
) })
|
|
61803
|
-
] })
|
|
61860
|
+
/* @__PURE__ */ (0, import_jsx_runtime309.jsx)(
|
|
61861
|
+
WorkflowTrackerRollups_default,
|
|
61862
|
+
{
|
|
61863
|
+
...styleProps,
|
|
61864
|
+
data,
|
|
61865
|
+
loading,
|
|
61866
|
+
labels: labelOverrides
|
|
61867
|
+
}
|
|
61868
|
+
)
|
|
61804
61869
|
]
|
|
61805
61870
|
}
|
|
61806
61871
|
)
|
|
@@ -61814,9 +61879,9 @@ var WorkflowTracker = ({
|
|
|
61814
61879
|
var WorkflowTracker_default = WorkflowTracker;
|
|
61815
61880
|
|
|
61816
61881
|
// src/components/Gantt/Gantt.tsx
|
|
61817
|
-
var
|
|
61882
|
+
var import_react288 = require("react");
|
|
61818
61883
|
var import_react_dom15 = require("react-dom");
|
|
61819
|
-
var
|
|
61884
|
+
var import_classnames123 = __toESM(require("classnames"), 1);
|
|
61820
61885
|
|
|
61821
61886
|
// ../common/gantt/types.ts
|
|
61822
61887
|
var GANTT_ZOOM_PRESETS = [
|
|
@@ -63162,38 +63227,38 @@ var sampleGantt = {
|
|
|
63162
63227
|
};
|
|
63163
63228
|
|
|
63164
63229
|
// src/components/Gantt/GanttScale.tsx
|
|
63165
|
-
var
|
|
63166
|
-
var
|
|
63230
|
+
var import_classnames120 = __toESM(require("classnames"), 1);
|
|
63231
|
+
var import_jsx_runtime310 = require("react/jsx-runtime");
|
|
63167
63232
|
var GanttScale = ({ levels, height }) => {
|
|
63168
63233
|
if (levels.length === 0) {
|
|
63169
|
-
return /* @__PURE__ */ (0,
|
|
63234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { style: { height } });
|
|
63170
63235
|
}
|
|
63171
63236
|
const coarseHeight = levels.length > 1 ? 24 : height;
|
|
63172
|
-
return /* @__PURE__ */ (0,
|
|
63237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("div", { className: "flex h-full w-full flex-col", children: levels.map((level, li) => /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
63173
63238
|
"div",
|
|
63174
63239
|
{
|
|
63175
|
-
className: (0,
|
|
63240
|
+
className: (0, import_classnames120.default)("flex w-full", li === 0 ? "shrink-0" : "min-h-0 flex-1"),
|
|
63176
63241
|
style: li === 0 ? { height: coarseHeight } : void 0,
|
|
63177
|
-
children: level.columns.map((col) => /* @__PURE__ */ (0,
|
|
63242
|
+
children: level.columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime310.jsxs)(
|
|
63178
63243
|
"div",
|
|
63179
63244
|
{
|
|
63180
|
-
className: (0,
|
|
63245
|
+
className: (0, import_classnames120.default)(
|
|
63181
63246
|
"flex shrink-0 flex-col items-center justify-center overflow-hidden border-r border-neutral-200/70 dark:border-neutral-800/70",
|
|
63182
63247
|
li === 0 ? "bg-neutral-50/60 dark:bg-neutral-800/40" : "bg-white dark:bg-neutral-900"
|
|
63183
63248
|
),
|
|
63184
63249
|
style: { width: col.width },
|
|
63185
63250
|
children: [
|
|
63186
|
-
/* @__PURE__ */ (0,
|
|
63251
|
+
/* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
63187
63252
|
"span",
|
|
63188
63253
|
{
|
|
63189
|
-
className: (0,
|
|
63254
|
+
className: (0, import_classnames120.default)(
|
|
63190
63255
|
"max-w-full truncate px-1 text-[10px] font-semibold uppercase leading-none tracking-wide",
|
|
63191
63256
|
li === 0 ? "text-neutral-700 dark:text-neutral-200" : "text-neutral-500 dark:text-neutral-400"
|
|
63192
63257
|
),
|
|
63193
63258
|
children: col.label
|
|
63194
63259
|
}
|
|
63195
63260
|
),
|
|
63196
|
-
col.subLabel != null && /* @__PURE__ */ (0,
|
|
63261
|
+
col.subLabel != null && /* @__PURE__ */ (0, import_jsx_runtime310.jsx)("span", { className: "max-w-full truncate px-1 text-[9px] font-medium leading-none text-neutral-400 dark:text-neutral-500", children: col.subLabel })
|
|
63197
63262
|
]
|
|
63198
63263
|
},
|
|
63199
63264
|
col.id
|
|
@@ -63205,9 +63270,9 @@ var GanttScale = ({ levels, height }) => {
|
|
|
63205
63270
|
GanttScale.displayName = "GanttScale";
|
|
63206
63271
|
|
|
63207
63272
|
// src/components/Gantt/GanttLinkLayer.tsx
|
|
63208
|
-
var
|
|
63209
|
-
var
|
|
63210
|
-
var GanttLinkLayer = (0,
|
|
63273
|
+
var import_react284 = require("react");
|
|
63274
|
+
var import_jsx_runtime311 = require("react/jsx-runtime");
|
|
63275
|
+
var GanttLinkLayer = (0, import_react284.forwardRef)(
|
|
63211
63276
|
function GanttLinkLayer2({
|
|
63212
63277
|
width,
|
|
63213
63278
|
height,
|
|
@@ -63221,7 +63286,7 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63221
63286
|
onDeleteLink
|
|
63222
63287
|
}, ref) {
|
|
63223
63288
|
const t = useKitT();
|
|
63224
|
-
const svgRef = (0,
|
|
63289
|
+
const svgRef = (0, import_react284.useRef)(null);
|
|
63225
63290
|
const selPath = selected ? paths.find((p) => p.link === selected) : void 0;
|
|
63226
63291
|
const selColor = selPath ? selPath.color ?? color : color;
|
|
63227
63292
|
const selMid = selPath ? { x: (selPath.from.x + selPath.to.x) / 2, y: (selPath.from.y + selPath.to.y) / 2 } : null;
|
|
@@ -63242,24 +63307,24 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63242
63307
|
const pick = pickFromEvent(e) ?? clicked;
|
|
63243
63308
|
if (interactive && onDeleteLink) onDeleteLink(pick.link);
|
|
63244
63309
|
};
|
|
63245
|
-
return /* @__PURE__ */ (0,
|
|
63310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
63246
63311
|
"div",
|
|
63247
63312
|
{
|
|
63248
63313
|
ref,
|
|
63249
63314
|
className: "pointer-events-none absolute top-0 z-10",
|
|
63250
63315
|
style: { left: offsetLeft, width, height },
|
|
63251
63316
|
children: [
|
|
63252
|
-
/* @__PURE__ */ (0,
|
|
63317
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("svg", { ref: svgRef, width, height, className: "block overflow-visible", children: [
|
|
63253
63318
|
paths.map((p, i) => {
|
|
63254
63319
|
const tokens = getGanttLinkTokens(p.color ?? color);
|
|
63255
63320
|
const sel = selected != null && p.link === selected;
|
|
63256
63321
|
const nodeR = sel ? 4.5 : 3.5;
|
|
63257
|
-
return /* @__PURE__ */ (0,
|
|
63322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
63258
63323
|
"g",
|
|
63259
63324
|
{
|
|
63260
63325
|
style: sel ? { filter: `drop-shadow(0 0 3px var(--color-${p.color ?? color}-500))` } : void 0,
|
|
63261
63326
|
children: [
|
|
63262
|
-
/* @__PURE__ */ (0,
|
|
63327
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
63263
63328
|
"path",
|
|
63264
63329
|
{
|
|
63265
63330
|
d: p.d,
|
|
@@ -63275,10 +63340,10 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63275
63340
|
},
|
|
63276
63341
|
onClick: (e) => handlePick(e, p),
|
|
63277
63342
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
63278
|
-
children: /* @__PURE__ */ (0,
|
|
63343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
63279
63344
|
}
|
|
63280
63345
|
),
|
|
63281
|
-
/* @__PURE__ */ (0,
|
|
63346
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
63282
63347
|
"path",
|
|
63283
63348
|
{
|
|
63284
63349
|
d: p.d,
|
|
@@ -63294,14 +63359,14 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63294
63359
|
},
|
|
63295
63360
|
onClick: (e) => handlePick(e, p),
|
|
63296
63361
|
onDoubleClick: (e) => handleDelete(e, p),
|
|
63297
|
-
children: /* @__PURE__ */ (0,
|
|
63362
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("title", { children: `${p.link.source} \u2192 ${p.link.target} (${p.type.toUpperCase()})` })
|
|
63298
63363
|
}
|
|
63299
63364
|
),
|
|
63300
|
-
p.arrow && /* @__PURE__ */ (0,
|
|
63301
|
-
/* @__PURE__ */ (0,
|
|
63302
|
-
/* @__PURE__ */ (0,
|
|
63303
|
-
/* @__PURE__ */ (0,
|
|
63304
|
-
/* @__PURE__ */ (0,
|
|
63365
|
+
p.arrow && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("polygon", { points: p.arrow, className: tokens.fill }),
|
|
63366
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.from.x, cy: p.from.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
63367
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.from.x, cy: p.from.y, r: nodeR, className: tokens.fill }),
|
|
63368
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.to.x, cy: p.to.y, r: nodeR + 2.5, className: tokens.halo }),
|
|
63369
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: p.to.x, cy: p.to.y, r: nodeR, className: tokens.fill })
|
|
63305
63370
|
]
|
|
63306
63371
|
},
|
|
63307
63372
|
`${p.link.source}->${p.link.target}-${p.type}-${i}`
|
|
@@ -63309,8 +63374,8 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63309
63374
|
}),
|
|
63310
63375
|
rubber && (() => {
|
|
63311
63376
|
const tokens = getGanttLinkTokens(rubber.color);
|
|
63312
|
-
return /* @__PURE__ */ (0,
|
|
63313
|
-
/* @__PURE__ */ (0,
|
|
63377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("g", { children: [
|
|
63378
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
|
|
63314
63379
|
"path",
|
|
63315
63380
|
{
|
|
63316
63381
|
d: rubber.d,
|
|
@@ -63321,15 +63386,15 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63321
63386
|
strokeDasharray: "5 3"
|
|
63322
63387
|
}
|
|
63323
63388
|
),
|
|
63324
|
-
rubber.arrow && /* @__PURE__ */ (0,
|
|
63325
|
-
/* @__PURE__ */ (0,
|
|
63326
|
-
/* @__PURE__ */ (0,
|
|
63327
|
-
/* @__PURE__ */ (0,
|
|
63328
|
-
/* @__PURE__ */ (0,
|
|
63389
|
+
rubber.arrow && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)("polygon", { points: rubber.arrow, className: tokens.fill }),
|
|
63390
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 6, className: tokens.halo }),
|
|
63391
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.from.x, cy: rubber.from.y, r: 3.5, className: tokens.fill }),
|
|
63392
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 6, className: tokens.halo }),
|
|
63393
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("circle", { cx: rubber.to.x, cy: rubber.to.y, r: 3.5, className: tokens.fill })
|
|
63329
63394
|
] });
|
|
63330
63395
|
})()
|
|
63331
63396
|
] }),
|
|
63332
|
-
canDelete && selMid && /* @__PURE__ */ (0,
|
|
63397
|
+
canDelete && selMid && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)(
|
|
63333
63398
|
"button",
|
|
63334
63399
|
{
|
|
63335
63400
|
type: "button",
|
|
@@ -63347,7 +63412,7 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63347
63412
|
onClick: () => onDeleteLink(selected),
|
|
63348
63413
|
title: t("kit.gantt.removeDependency"),
|
|
63349
63414
|
children: [
|
|
63350
|
-
/* @__PURE__ */ (0,
|
|
63415
|
+
/* @__PURE__ */ (0, import_jsx_runtime311.jsx)("span", { "aria-hidden": true, children: "\u2715" }),
|
|
63351
63416
|
" ",
|
|
63352
63417
|
t("kit.gantt.delete")
|
|
63353
63418
|
]
|
|
@@ -63361,9 +63426,9 @@ var GanttLinkLayer = (0, import_react283.forwardRef)(
|
|
|
63361
63426
|
GanttLinkLayer.displayName = "GanttLinkLayer";
|
|
63362
63427
|
|
|
63363
63428
|
// src/components/Gantt/GanttBodyRow.tsx
|
|
63364
|
-
var
|
|
63365
|
-
var
|
|
63366
|
-
var
|
|
63429
|
+
var import_react285 = require("react");
|
|
63430
|
+
var import_classnames121 = __toESM(require("classnames"), 1);
|
|
63431
|
+
var import_jsx_runtime312 = require("react/jsx-runtime");
|
|
63367
63432
|
var BAR_HEIGHT = 24;
|
|
63368
63433
|
var MILESTONE_SIZE = 14;
|
|
63369
63434
|
var GanttBodyRow = ({
|
|
@@ -63402,11 +63467,11 @@ var GanttBodyRow = ({
|
|
|
63402
63467
|
const t = useKitT();
|
|
63403
63468
|
const isDraggingThis = row.task != null && drag?.taskId === row.task.id;
|
|
63404
63469
|
const reorderDragging = isDraggingThis && drag?.kind === "reorder";
|
|
63405
|
-
return /* @__PURE__ */ (0,
|
|
63470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63406
63471
|
"div",
|
|
63407
63472
|
{
|
|
63408
63473
|
"data-row-key": row.key,
|
|
63409
|
-
className: (0,
|
|
63474
|
+
className: (0, import_classnames121.default)(
|
|
63410
63475
|
// No overflow here: an overflow-hidden row root would become the
|
|
63411
63476
|
// sticky halves' (non-scrolling) scrollport and stop them pinning to
|
|
63412
63477
|
// the left edge while the timeline scrolls. The halves pin the
|
|
@@ -63423,7 +63488,7 @@ var GanttBodyRow = ({
|
|
|
63423
63488
|
boxShadow: `inset 2px 0 0 var(--color-${color}-500)`
|
|
63424
63489
|
} : {}
|
|
63425
63490
|
},
|
|
63426
|
-
children: row.task == null ? /* @__PURE__ */ (0,
|
|
63491
|
+
children: row.task == null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63427
63492
|
LaneHeader,
|
|
63428
63493
|
{
|
|
63429
63494
|
row,
|
|
@@ -63434,20 +63499,20 @@ var GanttBodyRow = ({
|
|
|
63434
63499
|
dividerClass,
|
|
63435
63500
|
liveProgress: liveLane
|
|
63436
63501
|
}
|
|
63437
|
-
) : /* @__PURE__ */ (0,
|
|
63438
|
-
/* @__PURE__ */ (0,
|
|
63502
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63503
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63439
63504
|
"div",
|
|
63440
63505
|
{
|
|
63441
|
-
className: (0,
|
|
63506
|
+
className: (0, import_classnames121.default)(
|
|
63442
63507
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
63443
63508
|
dividerClass
|
|
63444
63509
|
),
|
|
63445
63510
|
style: { width: leftWidth },
|
|
63446
63511
|
children: [
|
|
63447
|
-
/* @__PURE__ */ (0,
|
|
63512
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "flex w-9 shrink-0 items-center justify-center", children: interactive && !row.task.locked && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63448
63513
|
"span",
|
|
63449
63514
|
{
|
|
63450
|
-
className: (0,
|
|
63515
|
+
className: (0, import_classnames121.default)(
|
|
63451
63516
|
"flex cursor-grab touch-none items-center text-neutral-300 transition-opacity active:cursor-grabbing dark:text-neutral-600",
|
|
63452
63517
|
reorderDragging ? "opacity-100" : "opacity-0 group-hover/row:opacity-100"
|
|
63453
63518
|
),
|
|
@@ -63455,10 +63520,10 @@ var GanttBodyRow = ({
|
|
|
63455
63520
|
onPointerDown: (e) => onGripPointerDown(row.key, row.task, e),
|
|
63456
63521
|
title: t("kit.gantt.dragReorder"),
|
|
63457
63522
|
"aria-hidden": "true",
|
|
63458
|
-
children: /* @__PURE__ */ (0,
|
|
63523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(Drag, { className: "h-3.5 w-3.5" })
|
|
63459
63524
|
}
|
|
63460
63525
|
) }),
|
|
63461
|
-
columns.map((col, i) => /* @__PURE__ */ (0,
|
|
63526
|
+
columns.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63462
63527
|
Cell,
|
|
63463
63528
|
{
|
|
63464
63529
|
col,
|
|
@@ -63479,12 +63544,12 @@ var GanttBodyRow = ({
|
|
|
63479
63544
|
]
|
|
63480
63545
|
}
|
|
63481
63546
|
),
|
|
63482
|
-
/* @__PURE__ */ (0,
|
|
63547
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63483
63548
|
"div",
|
|
63484
63549
|
{
|
|
63485
|
-
className: (0,
|
|
63550
|
+
className: (0, import_classnames121.default)("relative shrink-0 border-b", dividerClass),
|
|
63486
63551
|
style: { width: timelineWidth },
|
|
63487
|
-
children: /* @__PURE__ */ (0,
|
|
63552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63488
63553
|
TaskBar,
|
|
63489
63554
|
{
|
|
63490
63555
|
task: row.task,
|
|
@@ -63525,57 +63590,57 @@ var LaneHeader = ({ row, columns, leftWidth, color, onCaretClick, dividerClass =
|
|
|
63525
63590
|
const laneColor = lane.color ?? color;
|
|
63526
63591
|
const tokens = getGanttLaneTokens(laneColor);
|
|
63527
63592
|
const isOpen = lane.open !== false;
|
|
63528
|
-
return /* @__PURE__ */ (0,
|
|
63529
|
-
/* @__PURE__ */ (0,
|
|
63593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63594
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63530
63595
|
"div",
|
|
63531
63596
|
{
|
|
63532
|
-
className: (0,
|
|
63597
|
+
className: (0, import_classnames121.default)(
|
|
63533
63598
|
"sticky left-0 z-20 flex items-stretch overflow-hidden border-r border-b bg-white dark:bg-neutral-900",
|
|
63534
63599
|
dividerClass
|
|
63535
63600
|
),
|
|
63536
63601
|
style: { width: leftWidth },
|
|
63537
63602
|
children: [
|
|
63538
|
-
/* @__PURE__ */ (0,
|
|
63539
|
-
/* @__PURE__ */ (0,
|
|
63603
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("pointer-events-none absolute inset-0", tokens.band) }),
|
|
63604
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "relative flex w-9 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63540
63605
|
"button",
|
|
63541
63606
|
{
|
|
63542
63607
|
type: "button",
|
|
63543
63608
|
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",
|
|
63544
63609
|
onClick: () => onCaretClick(lane.id, isOpen),
|
|
63545
63610
|
"aria-label": t(isOpen ? "kit.gantt.collapse" : "kit.gantt.expand", { name: lane.label }),
|
|
63546
|
-
children: /* @__PURE__ */ (0,
|
|
63611
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronRight, { className: (0, import_classnames121.default)("h-3 w-3 transition-transform", isOpen && "rotate-90") })
|
|
63547
63612
|
}
|
|
63548
63613
|
) }),
|
|
63549
|
-
columns.map((col, i) => /* @__PURE__ */ (0,
|
|
63614
|
+
columns.map((col, i) => /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63550
63615
|
"div",
|
|
63551
63616
|
{
|
|
63552
|
-
className: (0,
|
|
63617
|
+
className: (0, import_classnames121.default)(
|
|
63553
63618
|
"relative flex shrink-0 items-center gap-2 overflow-hidden border-r px-2 last:border-r-0",
|
|
63554
63619
|
dividerClass
|
|
63555
63620
|
),
|
|
63556
63621
|
style: { width: col.width ?? "160px" },
|
|
63557
|
-
children: i === 0 ? /* @__PURE__ */ (0,
|
|
63558
|
-
/* @__PURE__ */ (0,
|
|
63559
|
-
lane.description && /* @__PURE__ */ (0,
|
|
63560
|
-
row.childCount > 0 && /* @__PURE__ */ (0,
|
|
63561
|
-
] }) : col.key === "progress" ? /* @__PURE__ */ (0,
|
|
63622
|
+
children: i === 0 ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63623
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("truncate text-[13px] font-semibold", tokens.label), children: lane.label }),
|
|
63624
|
+
lane.description && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "hidden truncate text-[11px] text-neutral-500 dark:text-neutral-400 lg:inline", children: lane.description }),
|
|
63625
|
+
row.childCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("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 })
|
|
63626
|
+
] }) : col.key === "progress" ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ProgressCell, { value: liveProgress ?? row.progress ?? 0, barClass: tokens.chip }) : null
|
|
63562
63627
|
},
|
|
63563
63628
|
col.key
|
|
63564
63629
|
))
|
|
63565
63630
|
]
|
|
63566
63631
|
}
|
|
63567
63632
|
),
|
|
63568
|
-
/* @__PURE__ */ (0,
|
|
63633
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("relative min-w-0 flex-1 border-b", dividerClass), children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("absolute inset-0", tokens.band) }) })
|
|
63569
63634
|
] });
|
|
63570
63635
|
};
|
|
63571
63636
|
var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, renderCell, liveProgress, liveRollup, rowProgress, dividerClass = "border-neutral-100 dark:border-neutral-800" }) => {
|
|
63572
63637
|
const t = useKitT();
|
|
63573
63638
|
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;
|
|
63574
63639
|
const custom = col.key !== "name" && renderCell ? renderCell(value, task, col) : null;
|
|
63575
|
-
return /* @__PURE__ */ (0,
|
|
63640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63576
63641
|
"div",
|
|
63577
63642
|
{
|
|
63578
|
-
className: (0,
|
|
63643
|
+
className: (0, import_classnames121.default)(
|
|
63579
63644
|
"flex shrink-0 items-center gap-1.5 overflow-hidden border-r px-2 text-[12.5px] last:border-r-0",
|
|
63580
63645
|
dividerClass
|
|
63581
63646
|
),
|
|
@@ -63583,50 +63648,50 @@ var Cell = ({ col, task, depth, isGroup, childCount, first, onCaretClick, render
|
|
|
63583
63648
|
width: col.width ?? "160px",
|
|
63584
63649
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
63585
63650
|
},
|
|
63586
|
-
children: first ? /* @__PURE__ */ (0,
|
|
63587
|
-
/* @__PURE__ */ (0,
|
|
63651
|
+
children: first ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63652
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "shrink-0", style: { width: depth * 14 + 18 }, children: isGroup && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63588
63653
|
"button",
|
|
63589
63654
|
{
|
|
63590
63655
|
type: "button",
|
|
63591
63656
|
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",
|
|
63592
63657
|
onClick: () => onCaretClick(task.id, task.open !== false),
|
|
63593
63658
|
"aria-label": t(task.open === false ? "kit.gantt.expand" : "kit.gantt.collapse", { name: task.name }),
|
|
63594
|
-
children: /* @__PURE__ */ (0,
|
|
63659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ChevronRight, { className: (0, import_classnames121.default)("h-3 w-3 transition-transform", task.open !== false && "rotate-90") })
|
|
63595
63660
|
}
|
|
63596
63661
|
) }),
|
|
63597
|
-
isGroup && childCount > 0 ? /* @__PURE__ */ (0,
|
|
63598
|
-
/* @__PURE__ */ (0,
|
|
63599
|
-
/* @__PURE__ */ (0,
|
|
63600
|
-
] }) : /* @__PURE__ */ (0,
|
|
63601
|
-
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */ (0,
|
|
63602
|
-
/* @__PURE__ */ (0,
|
|
63662
|
+
isGroup && childCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "flex min-w-0 items-center gap-1 font-semibold text-neutral-800 dark:text-neutral-100", children: [
|
|
63663
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate", children: task.name }),
|
|
63664
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("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 })
|
|
63665
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate font-medium text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63666
|
+
] }) : col.kind === "owner" ? value != null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5 text-neutral-600 dark:text-neutral-400", children: [
|
|
63667
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63603
63668
|
"span",
|
|
63604
63669
|
{
|
|
63605
|
-
className: (0,
|
|
63670
|
+
className: (0, import_classnames121.default)(
|
|
63606
63671
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-[8px] font-bold uppercase text-white",
|
|
63607
63672
|
getGanttBarTokens(task.color ?? "blue").fill
|
|
63608
63673
|
),
|
|
63609
63674
|
children: String(value).slice(0, 1)
|
|
63610
63675
|
}
|
|
63611
63676
|
),
|
|
63612
|
-
/* @__PURE__ */ (0,
|
|
63613
|
-
] }) : /* @__PURE__ */ (0,
|
|
63677
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate", children: String(value) })
|
|
63678
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : col.kind === "progress" ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(ProgressCell, { value: typeof value === "number" ? value : 0 }) : col.kind === "badge" ? task.badge != null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63614
63679
|
"span",
|
|
63615
63680
|
{
|
|
63616
|
-
className: (0,
|
|
63681
|
+
className: (0, import_classnames121.default)(
|
|
63617
63682
|
"rounded-full px-1.5 py-0.5 text-[10px] font-semibold",
|
|
63618
63683
|
getGanttBarTokens(task.badgeColor ?? "neutral").fill,
|
|
63619
63684
|
"text-white"
|
|
63620
63685
|
),
|
|
63621
63686
|
children: task.badge
|
|
63622
63687
|
}
|
|
63623
|
-
) : /* @__PURE__ */ (0,
|
|
63688
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "text-neutral-400 dark:text-neutral-600", children: "\u2014" }) : custom != null ? custom : /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate text-neutral-600 dark:text-neutral-400", children: value == null || value === "" ? "\u2014" : String(value) })
|
|
63624
63689
|
}
|
|
63625
63690
|
);
|
|
63626
63691
|
};
|
|
63627
|
-
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */ (0,
|
|
63628
|
-
/* @__PURE__ */ (0,
|
|
63629
|
-
/* @__PURE__ */ (0,
|
|
63692
|
+
var ProgressCell = ({ value, barClass = "bg-emerald-500" }) => /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "flex w-full items-center gap-1.5", children: [
|
|
63693
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-neutral-200/80 dark:bg-white/10", children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("block h-full rounded-full", barClass), style: { width: `${Math.round(value * 100)}%` } }) }),
|
|
63694
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsxs)("span", { className: "w-7 shrink-0 text-right text-[10px] font-semibold tabular-nums text-neutral-500 dark:text-neutral-400", children: [
|
|
63630
63695
|
Math.round(value * 100),
|
|
63631
63696
|
"%"
|
|
63632
63697
|
] })
|
|
@@ -63658,7 +63723,7 @@ var TaskBar = ({
|
|
|
63658
63723
|
const t = useKitT();
|
|
63659
63724
|
const milestone = task.type === "milestone";
|
|
63660
63725
|
const barColor = task.color ?? color;
|
|
63661
|
-
const tokens = (0,
|
|
63726
|
+
const tokens = (0, import_react285.useMemo)(() => getGanttBarTokens(barColor), [barColor]);
|
|
63662
63727
|
const startMs = liveDates ? liveDates.start : toMs(task.start);
|
|
63663
63728
|
const endMs = liveDates ? liveDates.end : toMs(task.end);
|
|
63664
63729
|
const left = dateToX(startMs, rangeStart, zoom);
|
|
@@ -63683,7 +63748,7 @@ var TaskBar = ({
|
|
|
63683
63748
|
pct: progressPct
|
|
63684
63749
|
});
|
|
63685
63750
|
if (milestone) {
|
|
63686
|
-
return /* @__PURE__ */ (0,
|
|
63751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63687
63752
|
"div",
|
|
63688
63753
|
{
|
|
63689
63754
|
role: "button",
|
|
@@ -63691,7 +63756,7 @@ var TaskBar = ({
|
|
|
63691
63756
|
"aria-label": ariaLabel,
|
|
63692
63757
|
title: ariaLabel,
|
|
63693
63758
|
"data-gantt-bar": task.id,
|
|
63694
|
-
className: (0,
|
|
63759
|
+
className: (0, import_classnames121.default)(
|
|
63695
63760
|
"absolute z-10 flex cursor-pointer items-center gap-1.5 outline-none",
|
|
63696
63761
|
selected && selectionTokens.ring,
|
|
63697
63762
|
"rounded"
|
|
@@ -63701,13 +63766,13 @@ var TaskBar = ({
|
|
|
63701
63766
|
onClick: () => onSelect(task.id),
|
|
63702
63767
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63703
63768
|
children: [
|
|
63704
|
-
/* @__PURE__ */ (0,
|
|
63705
|
-
/* @__PURE__ */ (0,
|
|
63769
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("h-3.5 w-3.5 shrink-0 rotate-45 rounded-[2px] shadow-sm", tokens.milestone) }),
|
|
63770
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)("span", { className: "truncate text-[11px] font-semibold text-neutral-700 dark:text-neutral-300", children: task.name })
|
|
63706
63771
|
]
|
|
63707
63772
|
}
|
|
63708
63773
|
);
|
|
63709
63774
|
}
|
|
63710
|
-
return /* @__PURE__ */ (0,
|
|
63775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63711
63776
|
"div",
|
|
63712
63777
|
{
|
|
63713
63778
|
role: "button",
|
|
@@ -63715,7 +63780,7 @@ var TaskBar = ({
|
|
|
63715
63780
|
"aria-label": ariaLabel,
|
|
63716
63781
|
title: `${task.name} \xB7 ${formatDateTime(startMs, locale)} \u2192 ${formatDateTime(endMs, locale)} \xB7 ${progressPct}%`,
|
|
63717
63782
|
"data-gantt-bar": task.id,
|
|
63718
|
-
className: (0,
|
|
63783
|
+
className: (0, import_classnames121.default)(
|
|
63719
63784
|
"group/bar absolute z-10 cursor-grab touch-none rounded-md shadow-sm outline-none transition-shadow active:cursor-grabbing",
|
|
63720
63785
|
tokens.base,
|
|
63721
63786
|
tokens.rim,
|
|
@@ -63732,17 +63797,17 @@ var TaskBar = ({
|
|
|
63732
63797
|
onClick: () => onSelect(task.id),
|
|
63733
63798
|
onKeyDown: (e) => onBarKeyDown(e, task),
|
|
63734
63799
|
children: [
|
|
63735
|
-
progress > 0 && /* @__PURE__ */ (0,
|
|
63800
|
+
progress > 0 && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63736
63801
|
"div",
|
|
63737
63802
|
{
|
|
63738
|
-
className: (0,
|
|
63803
|
+
className: (0, import_classnames121.default)("absolute inset-y-0 left-0 rounded-l-md", tokens.progress),
|
|
63739
63804
|
style: { width: `${progress * 100}%` }
|
|
63740
63805
|
}
|
|
63741
63806
|
),
|
|
63742
|
-
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */ (0,
|
|
63807
|
+
canEdit && !row.isGroup && progress > 0 && progress < 1 && /* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63743
63808
|
"div",
|
|
63744
63809
|
{
|
|
63745
|
-
className: (0,
|
|
63810
|
+
className: (0, import_classnames121.default)(
|
|
63746
63811
|
"absolute inset-y-0 z-20 w-2 cursor-ew-resize touch-none opacity-0 transition-opacity group-hover/bar:opacity-100",
|
|
63747
63812
|
liveProgress != null && "opacity-100"
|
|
63748
63813
|
),
|
|
@@ -63750,10 +63815,10 @@ var TaskBar = ({
|
|
|
63750
63815
|
onPointerDown: (e) => onProgressPointerDown(task, e),
|
|
63751
63816
|
title: labels.progress,
|
|
63752
63817
|
"aria-hidden": "true",
|
|
63753
|
-
children: /* @__PURE__ */ (0,
|
|
63818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "mx-auto h-full w-0.5 rounded-full bg-white/90" })
|
|
63754
63819
|
}
|
|
63755
63820
|
),
|
|
63756
|
-
liveProgress != null && /* @__PURE__ */ (0,
|
|
63821
|
+
liveProgress != null && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(
|
|
63757
63822
|
"div",
|
|
63758
63823
|
{
|
|
63759
63824
|
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",
|
|
@@ -63764,31 +63829,31 @@ var TaskBar = ({
|
|
|
63764
63829
|
]
|
|
63765
63830
|
}
|
|
63766
63831
|
),
|
|
63767
|
-
showName && (renderBar != null ? /* @__PURE__ */ (0,
|
|
63768
|
-
canEdit && /* @__PURE__ */ (0,
|
|
63769
|
-
/* @__PURE__ */ (0,
|
|
63832
|
+
showName && (renderBar != null ? /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: (0, import_classnames121.default)("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__ */ (0, import_jsx_runtime312.jsx)("span", { className: (0, import_classnames121.default)("pointer-events-none absolute inset-0 flex items-center truncate px-1.5 text-[11px] font-medium", labelText), children: task.name })),
|
|
63833
|
+
canEdit && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63834
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63770
63835
|
"div",
|
|
63771
63836
|
{
|
|
63772
63837
|
className: "absolute inset-y-0 -left-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63773
63838
|
onPointerDown: (e) => onResizePointerDown(task, "start", e),
|
|
63774
63839
|
title: t("kit.gantt.resizeStart"),
|
|
63775
63840
|
"aria-hidden": "true",
|
|
63776
|
-
children: /* @__PURE__ */ (0,
|
|
63841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63777
63842
|
}
|
|
63778
63843
|
),
|
|
63779
|
-
/* @__PURE__ */ (0,
|
|
63844
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63780
63845
|
"div",
|
|
63781
63846
|
{
|
|
63782
63847
|
className: "absolute inset-y-0 -right-1 z-20 w-2 cursor-ew-resize touch-none",
|
|
63783
63848
|
onPointerDown: (e) => onResizePointerDown(task, "end", e),
|
|
63784
63849
|
title: t("kit.gantt.resizeEnd"),
|
|
63785
63850
|
"aria-hidden": "true",
|
|
63786
|
-
children: /* @__PURE__ */ (0,
|
|
63851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime312.jsx)("div", { className: "mx-auto h-full w-1 rounded-full bg-white/0 opacity-0 transition-opacity group-hover/bar:opacity-100" })
|
|
63787
63852
|
}
|
|
63788
63853
|
)
|
|
63789
63854
|
] }),
|
|
63790
|
-
canEdit && /* @__PURE__ */ (0,
|
|
63791
|
-
/* @__PURE__ */ (0,
|
|
63855
|
+
canEdit && /* @__PURE__ */ (0, import_jsx_runtime312.jsxs)(import_jsx_runtime312.Fragment, { children: [
|
|
63856
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63792
63857
|
"button",
|
|
63793
63858
|
{
|
|
63794
63859
|
type: "button",
|
|
@@ -63799,7 +63864,7 @@ var TaskBar = ({
|
|
|
63799
63864
|
"aria-label": t("kit.gantt.linkFromStart", { task: task.name })
|
|
63800
63865
|
}
|
|
63801
63866
|
),
|
|
63802
|
-
/* @__PURE__ */ (0,
|
|
63867
|
+
/* @__PURE__ */ (0, import_jsx_runtime312.jsx)(
|
|
63803
63868
|
"button",
|
|
63804
63869
|
{
|
|
63805
63870
|
type: "button",
|
|
@@ -63817,9 +63882,9 @@ var TaskBar = ({
|
|
|
63817
63882
|
};
|
|
63818
63883
|
|
|
63819
63884
|
// src/components/Gantt/GanttToolbar.tsx
|
|
63820
|
-
var
|
|
63821
|
-
var
|
|
63822
|
-
var
|
|
63885
|
+
var import_react286 = require("react");
|
|
63886
|
+
var import_classnames122 = __toESM(require("classnames"), 1);
|
|
63887
|
+
var import_jsx_runtime313 = require("react/jsx-runtime");
|
|
63823
63888
|
function nearestPreset(zoom, presets) {
|
|
63824
63889
|
let best = null;
|
|
63825
63890
|
let bestDist = Infinity;
|
|
@@ -63846,25 +63911,25 @@ var GanttToolbar = ({
|
|
|
63846
63911
|
Month: t("kit.gantt.zoomMonth"),
|
|
63847
63912
|
Quarter: t("kit.gantt.zoomQuarter")
|
|
63848
63913
|
};
|
|
63849
|
-
const active = (0,
|
|
63850
|
-
const chrome = (0,
|
|
63914
|
+
const active = (0, import_react286.useMemo)(() => nearestPreset(zoom, presets), [zoom, presets]);
|
|
63915
|
+
const chrome = (0, import_react286.useMemo)(
|
|
63851
63916
|
() => getSurfaceVariantClasses(variant, "neutral"),
|
|
63852
63917
|
[variant]
|
|
63853
63918
|
);
|
|
63854
|
-
return /* @__PURE__ */ (0,
|
|
63919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime313.jsxs)(
|
|
63855
63920
|
"div",
|
|
63856
63921
|
{
|
|
63857
|
-
className: (0,
|
|
63922
|
+
className: (0, import_classnames122.default)(
|
|
63858
63923
|
"pointer-events-auto flex items-center gap-1 rounded-lg p-1",
|
|
63859
63924
|
chrome
|
|
63860
63925
|
),
|
|
63861
63926
|
children: [
|
|
63862
|
-
/* @__PURE__ */ (0,
|
|
63927
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "flex items-center rounded-md bg-neutral-100 p-0.5 dark:bg-neutral-800", children: presets.map((p) => /* @__PURE__ */ (0, import_jsx_runtime313.jsx)(
|
|
63863
63928
|
"button",
|
|
63864
63929
|
{
|
|
63865
63930
|
type: "button",
|
|
63866
63931
|
onClick: () => onZoomTo(p.value),
|
|
63867
|
-
className: (0,
|
|
63932
|
+
className: (0, import_classnames122.default)(
|
|
63868
63933
|
"rounded px-1.5 py-0.5 text-[10.5px] font-semibold transition-colors",
|
|
63869
63934
|
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"
|
|
63870
63935
|
),
|
|
@@ -63872,9 +63937,9 @@ var GanttToolbar = ({
|
|
|
63872
63937
|
},
|
|
63873
63938
|
p.label
|
|
63874
63939
|
)) }),
|
|
63875
|
-
/* @__PURE__ */ (0,
|
|
63876
|
-
/* @__PURE__ */ (0,
|
|
63877
|
-
/* @__PURE__ */ (0,
|
|
63940
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)("div", { className: "mx-0.5 h-4 w-px bg-neutral-200 dark:bg-neutral-700" }),
|
|
63941
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1 / 1.25), "aria-label": t("kit.gantt.zoomOut"), children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("span", { className: "text-xs font-semibold leading-none", children: "\u2212" }) }),
|
|
63942
|
+
/* @__PURE__ */ (0, import_jsx_runtime313.jsx)(Button_default, { variant: "ghost", size: "xs", onClick: () => onZoomBy(1.25), "aria-label": t("kit.gantt.zoomIn"), children: /* @__PURE__ */ (0, import_jsx_runtime313.jsx)("span", { className: "text-xs font-semibold leading-none", children: "+" }) })
|
|
63878
63943
|
]
|
|
63879
63944
|
}
|
|
63880
63945
|
);
|
|
@@ -63882,16 +63947,16 @@ var GanttToolbar = ({
|
|
|
63882
63947
|
GanttToolbar.displayName = "GanttToolbar";
|
|
63883
63948
|
|
|
63884
63949
|
// src/components/Gantt/useGanttDrag.ts
|
|
63885
|
-
var
|
|
63950
|
+
var import_react287 = require("react");
|
|
63886
63951
|
function useGanttDrag(opts) {
|
|
63887
|
-
const [drag, setDrag] = (0,
|
|
63888
|
-
const [linkSelected, setLinkSelected] = (0,
|
|
63889
|
-
const optsRef = (0,
|
|
63952
|
+
const [drag, setDrag] = (0, import_react287.useState)(null);
|
|
63953
|
+
const [linkSelected, setLinkSelected] = (0, import_react287.useState)(null);
|
|
63954
|
+
const optsRef = (0, import_react287.useRef)(opts);
|
|
63890
63955
|
optsRef.current = opts;
|
|
63891
|
-
const dragRef = (0,
|
|
63956
|
+
const dragRef = (0, import_react287.useRef)(null);
|
|
63892
63957
|
dragRef.current = drag;
|
|
63893
63958
|
const { rows, zoom, rangeStart, accentColor } = opts;
|
|
63894
|
-
const barGeom = (0,
|
|
63959
|
+
const barGeom = (0, import_react287.useCallback)(
|
|
63895
63960
|
(taskId) => {
|
|
63896
63961
|
const row = rows.find((r) => r.key === `task:${taskId}`);
|
|
63897
63962
|
if (!row?.task) return null;
|
|
@@ -63911,7 +63976,7 @@ function useGanttDrag(opts) {
|
|
|
63911
63976
|
},
|
|
63912
63977
|
[rows, zoom, rangeStart]
|
|
63913
63978
|
);
|
|
63914
|
-
const findTargetBar = (0,
|
|
63979
|
+
const findTargetBar = (0, import_react287.useCallback)(
|
|
63915
63980
|
(x, y, excludeId) => {
|
|
63916
63981
|
const row = rows.find((r) => r.task && y >= r.top && y < r.top + r.height);
|
|
63917
63982
|
if (!row?.task || row.task.id === excludeId) return null;
|
|
@@ -63922,7 +63987,7 @@ function useGanttDrag(opts) {
|
|
|
63922
63987
|
},
|
|
63923
63988
|
[rows, barGeom]
|
|
63924
63989
|
);
|
|
63925
|
-
const allBarGeoms = (0,
|
|
63990
|
+
const allBarGeoms = (0, import_react287.useCallback)(() => {
|
|
63926
63991
|
const out = [];
|
|
63927
63992
|
for (const row of rows) {
|
|
63928
63993
|
if (!row.task) continue;
|
|
@@ -63931,17 +63996,17 @@ function useGanttDrag(opts) {
|
|
|
63931
63996
|
}
|
|
63932
63997
|
return out;
|
|
63933
63998
|
}, [rows, barGeom]);
|
|
63934
|
-
const timelineX = (0,
|
|
63999
|
+
const timelineX = (0, import_react287.useCallback)((clientX) => {
|
|
63935
64000
|
const overlay = optsRef.current.overlayRef.current;
|
|
63936
64001
|
if (!overlay) return 0;
|
|
63937
64002
|
return clientX - overlay.getBoundingClientRect().left;
|
|
63938
64003
|
}, []);
|
|
63939
|
-
const rowY = (0,
|
|
64004
|
+
const rowY = (0, import_react287.useCallback)((clientY) => {
|
|
63940
64005
|
const overlay = optsRef.current.overlayRef.current;
|
|
63941
64006
|
if (!overlay) return 0;
|
|
63942
64007
|
return clientY - overlay.getBoundingClientRect().top;
|
|
63943
64008
|
}, []);
|
|
63944
|
-
(0,
|
|
64009
|
+
(0, import_react287.useEffect)(() => {
|
|
63945
64010
|
if (!drag) return;
|
|
63946
64011
|
const onMove = (e) => {
|
|
63947
64012
|
e.preventDefault();
|
|
@@ -64066,7 +64131,7 @@ function useGanttDrag(opts) {
|
|
|
64066
64131
|
window.removeEventListener("pointerup", onUp);
|
|
64067
64132
|
};
|
|
64068
64133
|
}, [drag != null, timelineX, rowY]);
|
|
64069
|
-
const beginDrag = (0,
|
|
64134
|
+
const beginDrag = (0, import_react287.useCallback)(
|
|
64070
64135
|
(partial, e, focusEl) => {
|
|
64071
64136
|
const o = optsRef.current;
|
|
64072
64137
|
if (!o.interactive) return;
|
|
@@ -64100,7 +64165,7 @@ function useGanttDrag(opts) {
|
|
|
64100
64165
|
},
|
|
64101
64166
|
[timelineX, rowY]
|
|
64102
64167
|
);
|
|
64103
|
-
const onBarPointerDown = (0,
|
|
64168
|
+
const onBarPointerDown = (0, import_react287.useCallback)(
|
|
64104
64169
|
(task, e) => {
|
|
64105
64170
|
if (e.button !== 0) return;
|
|
64106
64171
|
beginDrag(
|
|
@@ -64118,7 +64183,7 @@ function useGanttDrag(opts) {
|
|
|
64118
64183
|
},
|
|
64119
64184
|
[beginDrag, timelineX, rowY]
|
|
64120
64185
|
);
|
|
64121
|
-
const onResizePointerDown = (0,
|
|
64186
|
+
const onResizePointerDown = (0, import_react287.useCallback)(
|
|
64122
64187
|
(task, edge, e) => {
|
|
64123
64188
|
if (e.button !== 0) return;
|
|
64124
64189
|
e.stopPropagation();
|
|
@@ -64137,7 +64202,7 @@ function useGanttDrag(opts) {
|
|
|
64137
64202
|
},
|
|
64138
64203
|
[beginDrag, timelineX, rowY]
|
|
64139
64204
|
);
|
|
64140
|
-
const onGripPointerDown = (0,
|
|
64205
|
+
const onGripPointerDown = (0, import_react287.useCallback)(
|
|
64141
64206
|
(_rowKey, task, e) => {
|
|
64142
64207
|
if (e.button !== 0) return;
|
|
64143
64208
|
const rowEl = e.currentTarget.closest(
|
|
@@ -64162,7 +64227,7 @@ function useGanttDrag(opts) {
|
|
|
64162
64227
|
},
|
|
64163
64228
|
[beginDrag, timelineX, rowY]
|
|
64164
64229
|
);
|
|
64165
|
-
const onLinkHandlePointerDown = (0,
|
|
64230
|
+
const onLinkHandlePointerDown = (0, import_react287.useCallback)(
|
|
64166
64231
|
(task, side, e, fromOffset = 0) => {
|
|
64167
64232
|
if (e.button !== 0) return;
|
|
64168
64233
|
e.stopPropagation();
|
|
@@ -64182,7 +64247,7 @@ function useGanttDrag(opts) {
|
|
|
64182
64247
|
},
|
|
64183
64248
|
[beginDrag, timelineX, rowY]
|
|
64184
64249
|
);
|
|
64185
|
-
const onProgressPointerDown = (0,
|
|
64250
|
+
const onProgressPointerDown = (0, import_react287.useCallback)(
|
|
64186
64251
|
(task, e) => {
|
|
64187
64252
|
if (e.button !== 0) return;
|
|
64188
64253
|
e.stopPropagation();
|
|
@@ -64200,7 +64265,7 @@ function useGanttDrag(opts) {
|
|
|
64200
64265
|
},
|
|
64201
64266
|
[beginDrag, timelineX, rowY]
|
|
64202
64267
|
);
|
|
64203
|
-
const rubber = (0,
|
|
64268
|
+
const rubber = (0, import_react287.useMemo)(() => {
|
|
64204
64269
|
if (!drag || drag.kind !== "link") return null;
|
|
64205
64270
|
const source = barGeom(drag.taskId);
|
|
64206
64271
|
if (!source) return null;
|
|
@@ -64232,7 +64297,7 @@ function useGanttDrag(opts) {
|
|
|
64232
64297
|
}
|
|
64233
64298
|
|
|
64234
64299
|
// src/components/Gantt/Gantt.tsx
|
|
64235
|
-
var
|
|
64300
|
+
var import_jsx_runtime314 = require("react/jsx-runtime");
|
|
64236
64301
|
var HEADER_HEIGHT = 52;
|
|
64237
64302
|
var GRIP_WIDTH = 36;
|
|
64238
64303
|
var DEFAULT_COLUMNS = [
|
|
@@ -64291,7 +64356,7 @@ var Gantt = ({
|
|
|
64291
64356
|
const t = useKitT();
|
|
64292
64357
|
const kitEngine = useKitEngine();
|
|
64293
64358
|
const dateLocale = locale ?? kitEngine.locale;
|
|
64294
|
-
const allLabels = (0,
|
|
64359
|
+
const allLabels = (0, import_react288.useMemo)(
|
|
64295
64360
|
() => ({
|
|
64296
64361
|
loading: t("kit.gantt.loading"),
|
|
64297
64362
|
empty: t("kit.gantt.empty"),
|
|
@@ -64314,10 +64379,10 @@ var Gantt = ({
|
|
|
64314
64379
|
title: c.key === "name" ? allLabels.task : c.key === "owner" ? t("kit.gantt.colOwner") : t("kit.gantt.colProgress")
|
|
64315
64380
|
}));
|
|
64316
64381
|
const interactive = editable ?? Boolean(onTasksChange || onLinksChange || onReorder);
|
|
64317
|
-
const surfaceText = (0,
|
|
64318
|
-
const [internalZoom, setInternalZoom] = (0,
|
|
64382
|
+
const surfaceText = (0, import_react288.useMemo)(() => getSurfaceTextTokens(variant), [variant]);
|
|
64383
|
+
const [internalZoom, setInternalZoom] = (0, import_react288.useState)(initialZoom);
|
|
64319
64384
|
const zoom = zoomProp ?? internalZoom;
|
|
64320
|
-
const setZoom = (0,
|
|
64385
|
+
const setZoom = (0, import_react288.useCallback)(
|
|
64321
64386
|
(z) => {
|
|
64322
64387
|
const clamped = Math.min(maxZoom, Math.max(minZoom, z));
|
|
64323
64388
|
if (onZoomChange) onZoomChange(clamped);
|
|
@@ -64325,33 +64390,33 @@ var Gantt = ({
|
|
|
64325
64390
|
},
|
|
64326
64391
|
[minZoom, maxZoom, onZoomChange]
|
|
64327
64392
|
);
|
|
64328
|
-
const [internalSelection, setInternalSelection] = (0,
|
|
64393
|
+
const [internalSelection, setInternalSelection] = (0, import_react288.useState)(null);
|
|
64329
64394
|
const selectedId = selectedIdProp !== void 0 ? selectedIdProp : internalSelection;
|
|
64330
|
-
const setSelected = (0,
|
|
64395
|
+
const setSelected = (0, import_react288.useCallback)(
|
|
64331
64396
|
(id) => {
|
|
64332
64397
|
onSelect?.(id);
|
|
64333
64398
|
if (selectedIdProp === void 0) setInternalSelection(id);
|
|
64334
64399
|
},
|
|
64335
64400
|
[onSelect, selectedIdProp]
|
|
64336
64401
|
);
|
|
64337
|
-
const [internalOrder, setInternalOrder] = (0,
|
|
64402
|
+
const [internalOrder, setInternalOrder] = (0, import_react288.useState)(void 0);
|
|
64338
64403
|
const rowOrder = rowOrderProp ?? internalOrder;
|
|
64339
|
-
const handleReorder = (0,
|
|
64404
|
+
const handleReorder = (0, import_react288.useCallback)(
|
|
64340
64405
|
(order) => {
|
|
64341
64406
|
onReorder?.(order);
|
|
64342
64407
|
if (rowOrderProp === void 0) setInternalOrder(order);
|
|
64343
64408
|
},
|
|
64344
64409
|
[onReorder, rowOrderProp]
|
|
64345
64410
|
);
|
|
64346
|
-
const [collapsed, setCollapsed] = (0,
|
|
64411
|
+
const [collapsed, setCollapsed] = (0, import_react288.useState)(
|
|
64347
64412
|
() => new Set(tasks.filter((t2) => t2.open === false).map((t2) => t2.id))
|
|
64348
64413
|
);
|
|
64349
|
-
const [closedLanes, setClosedLanes] = (0,
|
|
64414
|
+
const [closedLanes, setClosedLanes] = (0, import_react288.useState)(
|
|
64350
64415
|
() => new Set((lanes ?? []).filter((l) => l.open === false).map((l) => l.id))
|
|
64351
64416
|
);
|
|
64352
|
-
const tasksRef = (0,
|
|
64353
|
-
const lanesRef = (0,
|
|
64354
|
-
(0,
|
|
64417
|
+
const tasksRef = (0, import_react288.useRef)(tasks);
|
|
64418
|
+
const lanesRef = (0, import_react288.useRef)(lanes);
|
|
64419
|
+
(0, import_react288.useEffect)(() => {
|
|
64355
64420
|
if (tasksRef.current !== tasks) {
|
|
64356
64421
|
tasksRef.current = tasks;
|
|
64357
64422
|
setCollapsed(new Set(tasks.filter((t2) => t2.open === false).map((t2) => t2.id)));
|
|
@@ -64361,7 +64426,7 @@ var Gantt = ({
|
|
|
64361
64426
|
setClosedLanes(new Set((lanes ?? []).filter((l) => l.open === false).map((l) => l.id)));
|
|
64362
64427
|
}
|
|
64363
64428
|
}, [tasks, lanes]);
|
|
64364
|
-
const toggleCollapse = (0,
|
|
64429
|
+
const toggleCollapse = (0, import_react288.useCallback)((taskId, isOpen) => {
|
|
64365
64430
|
setCollapsed((prev) => {
|
|
64366
64431
|
const next = new Set(prev);
|
|
64367
64432
|
if (isOpen) next.add(taskId);
|
|
@@ -64369,7 +64434,7 @@ var Gantt = ({
|
|
|
64369
64434
|
return next;
|
|
64370
64435
|
});
|
|
64371
64436
|
}, []);
|
|
64372
|
-
const toggleLane = (0,
|
|
64437
|
+
const toggleLane = (0, import_react288.useCallback)((laneId, isOpen) => {
|
|
64373
64438
|
setClosedLanes((prev) => {
|
|
64374
64439
|
const next = new Set(prev);
|
|
64375
64440
|
if (isOpen) next.add(laneId);
|
|
@@ -64377,37 +64442,37 @@ var Gantt = ({
|
|
|
64377
64442
|
return next;
|
|
64378
64443
|
});
|
|
64379
64444
|
}, []);
|
|
64380
|
-
const effectiveTasks = (0,
|
|
64445
|
+
const effectiveTasks = (0, import_react288.useMemo)(() => {
|
|
64381
64446
|
let out = tasks;
|
|
64382
64447
|
if (collapsed.size > 0) {
|
|
64383
64448
|
out = out.map((t2) => collapsed.has(t2.id) ? { ...t2, open: false } : t2);
|
|
64384
64449
|
}
|
|
64385
64450
|
return out;
|
|
64386
64451
|
}, [tasks, collapsed]);
|
|
64387
|
-
const effectiveLanes = (0,
|
|
64452
|
+
const effectiveLanes = (0, import_react288.useMemo)(() => {
|
|
64388
64453
|
if (closedLanes.size === 0) return lanes;
|
|
64389
64454
|
return (lanes ?? []).map(
|
|
64390
64455
|
(l) => closedLanes.has(l.id) ? { ...l, open: false } : l
|
|
64391
64456
|
);
|
|
64392
64457
|
}, [lanes, closedLanes]);
|
|
64393
|
-
const committedModel = (0,
|
|
64458
|
+
const committedModel = (0, import_react288.useMemo)(
|
|
64394
64459
|
() => buildRows(effectiveTasks, effectiveLanes, rowOrder, rowHeight2),
|
|
64395
64460
|
[effectiveTasks, effectiveLanes, rowOrder, rowHeight2]
|
|
64396
64461
|
);
|
|
64397
|
-
const range = (0,
|
|
64462
|
+
const range = (0, import_react288.useMemo)(() => {
|
|
64398
64463
|
const starts = tasks.map((t2) => toMs(t2.start));
|
|
64399
64464
|
const ends = tasks.map((t2) => toMs(t2.end));
|
|
64400
64465
|
return computeViewRange(starts, ends);
|
|
64401
64466
|
}, [tasks]);
|
|
64402
64467
|
const timelineWidth = rangeWidth(range.start, range.end, zoom);
|
|
64403
|
-
const scaleLevels = (0,
|
|
64468
|
+
const scaleLevels = (0, import_react288.useMemo)(
|
|
64404
64469
|
() => buildTimeScale(range.start, range.end, zoom, dateLocale),
|
|
64405
64470
|
[range, zoom, dateLocale]
|
|
64406
64471
|
);
|
|
64407
|
-
const [colWidths, setColWidths] = (0,
|
|
64472
|
+
const [colWidths, setColWidths] = (0, import_react288.useState)(
|
|
64408
64473
|
() => columnWidths ? { ...columnWidths } : {}
|
|
64409
64474
|
);
|
|
64410
|
-
(0,
|
|
64475
|
+
(0, import_react288.useEffect)(() => {
|
|
64411
64476
|
if (!columnWidths) return;
|
|
64412
64477
|
setColWidths((prev) => ({ ...prev, ...columnWidths }));
|
|
64413
64478
|
}, [columnWidths]);
|
|
@@ -64417,21 +64482,21 @@ var Gantt = ({
|
|
|
64417
64482
|
const m = /^(\d+(?:\.\d+)?)px$/.exec(col.width ?? "");
|
|
64418
64483
|
return m ? Number(m[1]) : 160;
|
|
64419
64484
|
};
|
|
64420
|
-
const sizedColumns = (0,
|
|
64485
|
+
const sizedColumns = (0, import_react288.useMemo)(
|
|
64421
64486
|
() => resolvedColumns.map((c) => ({ ...c, width: `${effectiveColWidth(c)}px` })),
|
|
64422
64487
|
[resolvedColumns, colWidths]
|
|
64423
64488
|
);
|
|
64424
|
-
const effectiveWidthsRef = (0,
|
|
64489
|
+
const effectiveWidthsRef = (0, import_react288.useRef)({});
|
|
64425
64490
|
effectiveWidthsRef.current = Object.fromEntries(
|
|
64426
64491
|
sizedColumns.map((c) => [c.key, effectiveColWidth(c)])
|
|
64427
64492
|
);
|
|
64428
|
-
const leftWidth = (0,
|
|
64493
|
+
const leftWidth = (0, import_react288.useMemo)(
|
|
64429
64494
|
() => GRIP_WIDTH + resolvedColumns.reduce((sum, c) => sum + effectiveColWidth(c), 0),
|
|
64430
64495
|
[resolvedColumns, colWidths]
|
|
64431
64496
|
);
|
|
64432
|
-
const resizingRef = (0,
|
|
64433
|
-
const [resizingKey, setResizingKey] = (0,
|
|
64434
|
-
const startColumnResize = (0,
|
|
64497
|
+
const resizingRef = (0, import_react288.useRef)(null);
|
|
64498
|
+
const [resizingKey, setResizingKey] = (0, import_react288.useState)(null);
|
|
64499
|
+
const startColumnResize = (0, import_react288.useCallback)(
|
|
64435
64500
|
(e, key) => {
|
|
64436
64501
|
if (e.button !== 0) return;
|
|
64437
64502
|
e.preventDefault();
|
|
@@ -64462,23 +64527,23 @@ var Gantt = ({
|
|
|
64462
64527
|
},
|
|
64463
64528
|
[onColumnWidthChange]
|
|
64464
64529
|
);
|
|
64465
|
-
(0,
|
|
64530
|
+
(0, import_react288.useEffect)(
|
|
64466
64531
|
() => () => {
|
|
64467
64532
|
document.body.style.cursor = "";
|
|
64468
64533
|
document.body.style.userSelect = "";
|
|
64469
64534
|
},
|
|
64470
64535
|
[]
|
|
64471
64536
|
);
|
|
64472
|
-
const scrollRef = (0,
|
|
64473
|
-
const overlayRef = (0,
|
|
64474
|
-
const rootRef = (0,
|
|
64475
|
-
const headerScaleRef = (0,
|
|
64476
|
-
const syncHeaderScale = (0,
|
|
64537
|
+
const scrollRef = (0, import_react288.useRef)(null);
|
|
64538
|
+
const overlayRef = (0, import_react288.useRef)(null);
|
|
64539
|
+
const rootRef = (0, import_react288.useRef)(null);
|
|
64540
|
+
const headerScaleRef = (0, import_react288.useRef)(null);
|
|
64541
|
+
const syncHeaderScale = (0, import_react288.useCallback)(() => {
|
|
64477
64542
|
const s = scrollRef.current;
|
|
64478
64543
|
const h = headerScaleRef.current;
|
|
64479
64544
|
if (s && h) h.style.transform = `translateX(${-s.scrollLeft}px)`;
|
|
64480
64545
|
}, []);
|
|
64481
|
-
const zoomBy = (0,
|
|
64546
|
+
const zoomBy = (0, import_react288.useCallback)(
|
|
64482
64547
|
(factor, pointerClientX) => {
|
|
64483
64548
|
const el = scrollRef.current;
|
|
64484
64549
|
const next = Math.min(maxZoom, Math.max(minZoom, zoom * factor));
|
|
@@ -64497,7 +64562,7 @@ var Gantt = ({
|
|
|
64497
64562
|
},
|
|
64498
64563
|
[zoom, minZoom, maxZoom, leftWidth, setZoom]
|
|
64499
64564
|
);
|
|
64500
|
-
(0,
|
|
64565
|
+
(0, import_react288.useEffect)(() => {
|
|
64501
64566
|
const el = scrollRef.current;
|
|
64502
64567
|
if (!el) return;
|
|
64503
64568
|
const onWheel = (e) => {
|
|
@@ -64509,10 +64574,10 @@ var Gantt = ({
|
|
|
64509
64574
|
el.addEventListener("wheel", onWheel, { passive: false });
|
|
64510
64575
|
return () => el.removeEventListener("wheel", onWheel);
|
|
64511
64576
|
}, [zoomBy]);
|
|
64512
|
-
(0,
|
|
64577
|
+
(0, import_react288.useEffect)(() => {
|
|
64513
64578
|
syncHeaderScale();
|
|
64514
64579
|
}, [syncHeaderScale, timelineWidth, zoom, range.start, leftWidth]);
|
|
64515
|
-
const liveRowsRef = (0,
|
|
64580
|
+
const liveRowsRef = (0, import_react288.useRef)(null);
|
|
64516
64581
|
const dragApi = useGanttDrag({
|
|
64517
64582
|
scrollRef,
|
|
64518
64583
|
overlayRef,
|
|
@@ -64534,12 +64599,12 @@ var Gantt = ({
|
|
|
64534
64599
|
rowOrder,
|
|
64535
64600
|
setSelected
|
|
64536
64601
|
});
|
|
64537
|
-
const liveReorder = (0,
|
|
64602
|
+
const liveReorder = (0, import_react288.useMemo)(() => {
|
|
64538
64603
|
const d = dragApi.drag;
|
|
64539
64604
|
if (d?.kind !== "reorder" || d.beforeId === void 0) return null;
|
|
64540
64605
|
return applyRowReorder(effectiveTasks, d.taskId, d.beforeId, rowOrder);
|
|
64541
64606
|
}, [dragApi.drag, effectiveTasks, rowOrder]);
|
|
64542
|
-
const liveModel = (0,
|
|
64607
|
+
const liveModel = (0, import_react288.useMemo)(
|
|
64543
64608
|
() => liveReorder ? buildRows(
|
|
64544
64609
|
liveReorder.tasks,
|
|
64545
64610
|
effectiveLanes,
|
|
@@ -64549,7 +64614,7 @@ var Gantt = ({
|
|
|
64549
64614
|
[liveReorder, effectiveLanes, rowHeight2, committedModel]
|
|
64550
64615
|
);
|
|
64551
64616
|
liveRowsRef.current = liveModel.rows;
|
|
64552
|
-
const bars = (0,
|
|
64617
|
+
const bars = (0, import_react288.useMemo)(() => {
|
|
64553
64618
|
const map = /* @__PURE__ */ new Map();
|
|
64554
64619
|
for (const row of liveModel.rows) {
|
|
64555
64620
|
if (!row.task) continue;
|
|
@@ -64571,7 +64636,7 @@ var Gantt = ({
|
|
|
64571
64636
|
return map;
|
|
64572
64637
|
}, [liveModel.rows, range, zoom]);
|
|
64573
64638
|
const bodyHeight = liveModel.rows.length > 0 ? liveModel.rows[liveModel.rows.length - 1].top + liveModel.rows[liveModel.rows.length - 1].height : 0;
|
|
64574
|
-
const onBarKeyDown = (0,
|
|
64639
|
+
const onBarKeyDown = (0, import_react288.useCallback)(
|
|
64575
64640
|
(e, task) => {
|
|
64576
64641
|
if (!interactive || task.locked || !onTasksChange) return;
|
|
64577
64642
|
const stepMs = snap2 === "hour" ? 36e5 : snap2 === "week" ? 7 * MS_PER_DAY : MS_PER_DAY;
|
|
@@ -64616,7 +64681,7 @@ var Gantt = ({
|
|
|
64616
64681
|
},
|
|
64617
64682
|
[interactive, snap2, tasks, onTasksChange, setSelected]
|
|
64618
64683
|
);
|
|
64619
|
-
const deleteSelectedLink = (0,
|
|
64684
|
+
const deleteSelectedLink = (0, import_react288.useCallback)(() => {
|
|
64620
64685
|
const sel = dragApi.linkSelected;
|
|
64621
64686
|
if (!sel || !interactive || !onLinksChange) return;
|
|
64622
64687
|
const key = (l) => l.id ?? `${l.source}~${l.target}~${l.type ?? "fs"}`;
|
|
@@ -64624,7 +64689,7 @@ var Gantt = ({
|
|
|
64624
64689
|
onLinksChange(links.filter((l) => key(l) !== selKey));
|
|
64625
64690
|
dragApi.setLinkSelected(null);
|
|
64626
64691
|
}, [dragApi, links, interactive, onLinksChange]);
|
|
64627
|
-
const moveSelection = (0,
|
|
64692
|
+
const moveSelection = (0, import_react288.useCallback)(
|
|
64628
64693
|
(where) => {
|
|
64629
64694
|
const rows = liveModel.rows;
|
|
64630
64695
|
if (!rows.length) return;
|
|
@@ -64637,7 +64702,7 @@ var Gantt = ({
|
|
|
64637
64702
|
},
|
|
64638
64703
|
[liveModel.rows, selectedId, setSelected]
|
|
64639
64704
|
);
|
|
64640
|
-
const onRootKeyDown = (0,
|
|
64705
|
+
const onRootKeyDown = (0, import_react288.useCallback)(
|
|
64641
64706
|
(e) => {
|
|
64642
64707
|
if (dragApi.linkSelected) {
|
|
64643
64708
|
if (e.key === "Escape") {
|
|
@@ -64683,14 +64748,14 @@ var Gantt = ({
|
|
|
64683
64748
|
},
|
|
64684
64749
|
[dragApi, deleteSelectedLink, moveSelection, setZoom, zoom]
|
|
64685
64750
|
);
|
|
64686
|
-
const handleSelectLink = (0,
|
|
64751
|
+
const handleSelectLink = (0, import_react288.useCallback)(
|
|
64687
64752
|
(link) => {
|
|
64688
64753
|
dragApi.setLinkSelected(link);
|
|
64689
64754
|
if (link) rootRef.current?.focus();
|
|
64690
64755
|
},
|
|
64691
64756
|
[dragApi]
|
|
64692
64757
|
);
|
|
64693
|
-
const handleRootPointerDown = (0,
|
|
64758
|
+
const handleRootPointerDown = (0, import_react288.useCallback)(
|
|
64694
64759
|
(e) => {
|
|
64695
64760
|
if (e.target.closest?.("[data-gantt-keep-link-selection]")) return;
|
|
64696
64761
|
if (dragApi.linkSelected) dragApi.setLinkSelected(null);
|
|
@@ -64705,22 +64770,22 @@ var Gantt = ({
|
|
|
64705
64770
|
const drag = dragApi.drag;
|
|
64706
64771
|
const dragTask = drag?.taskId ? committedModel.tasksById.get(drag.taskId) : void 0;
|
|
64707
64772
|
const reorderLineY = drag?.kind === "reorder" && drag.beforeId !== void 0 ? reorderPreviewTop(liveModel.rows, `task:${drag.taskId}`, drag.beforeId) : null;
|
|
64708
|
-
const dragSubtree = (0,
|
|
64773
|
+
const dragSubtree = (0, import_react288.useMemo)(() => {
|
|
64709
64774
|
if (dragApi.drag?.kind !== "reorder") return null;
|
|
64710
64775
|
return reorderDragSubtree(
|
|
64711
64776
|
liveModel.rows,
|
|
64712
64777
|
`task:${dragApi.drag.taskId}`
|
|
64713
64778
|
);
|
|
64714
64779
|
}, [dragApi.drag, liveModel.rows]);
|
|
64715
|
-
const dragSubtreeKeys = (0,
|
|
64780
|
+
const dragSubtreeKeys = (0, import_react288.useMemo)(
|
|
64716
64781
|
() => new Set((dragSubtree ?? []).map((r) => r.key)),
|
|
64717
64782
|
[dragSubtree]
|
|
64718
64783
|
);
|
|
64719
|
-
const dragSubtreeHeight = (0,
|
|
64784
|
+
const dragSubtreeHeight = (0, import_react288.useMemo)(
|
|
64720
64785
|
() => (dragSubtree ?? []).reduce((sum, r) => sum + r.height, 0),
|
|
64721
64786
|
[dragSubtree]
|
|
64722
64787
|
);
|
|
64723
|
-
const liveDragDates = (0,
|
|
64788
|
+
const liveDragDates = (0, import_react288.useMemo)(() => {
|
|
64724
64789
|
if (!drag || !dragTask) return null;
|
|
64725
64790
|
if (drag.kind !== "move" && drag.kind !== "resize-start" && drag.kind !== "resize-end") return null;
|
|
64726
64791
|
return applyDragDates(
|
|
@@ -64731,7 +64796,7 @@ var Gantt = ({
|
|
|
64731
64796
|
);
|
|
64732
64797
|
}, [drag, dragTask, zoom, snap2]);
|
|
64733
64798
|
const liveDragProgress = drag?.kind === "progress" && drag.liveProgress != null ? drag.liveProgress : null;
|
|
64734
|
-
const dragOverride = (0,
|
|
64799
|
+
const dragOverride = (0, import_react288.useMemo)(() => {
|
|
64735
64800
|
if (!drag || !dragTask) return null;
|
|
64736
64801
|
if (drag.kind === "progress" && drag.liveProgress != null) {
|
|
64737
64802
|
return { ...dragTask, progress: drag.liveProgress };
|
|
@@ -64741,11 +64806,11 @@ var Gantt = ({
|
|
|
64741
64806
|
}
|
|
64742
64807
|
return null;
|
|
64743
64808
|
}, [drag, dragTask, liveDragDates]);
|
|
64744
|
-
const liveLaneProgress = (0,
|
|
64809
|
+
const liveLaneProgress = (0, import_react288.useMemo)(
|
|
64745
64810
|
() => dragOverride && dragTask ? laneRollupProgress(effectiveTasks, dragTask.id, dragOverride) : null,
|
|
64746
64811
|
[dragOverride, dragTask, effectiveTasks]
|
|
64747
64812
|
);
|
|
64748
|
-
const liveGroupProgress = (0,
|
|
64813
|
+
const liveGroupProgress = (0, import_react288.useMemo)(() => {
|
|
64749
64814
|
if (!dragOverride || !dragTask) return null;
|
|
64750
64815
|
const byId = new Map(effectiveTasks.map((t2) => [t2.id, t2]));
|
|
64751
64816
|
const m = /* @__PURE__ */ new Map();
|
|
@@ -64757,7 +64822,7 @@ var Gantt = ({
|
|
|
64757
64822
|
}
|
|
64758
64823
|
return m.size > 0 ? m : null;
|
|
64759
64824
|
}, [dragOverride, dragTask, effectiveTasks]);
|
|
64760
|
-
const liveLinkBars = (0,
|
|
64825
|
+
const liveLinkBars = (0, import_react288.useMemo)(() => {
|
|
64761
64826
|
if (!liveDragDates || !dragTask) return bars;
|
|
64762
64827
|
const g = bars.get(dragTask.id);
|
|
64763
64828
|
if (!g) return bars;
|
|
@@ -64766,12 +64831,12 @@ var Gantt = ({
|
|
|
64766
64831
|
if (left === g.left && width === g.width) return bars;
|
|
64767
64832
|
return new Map(bars).set(dragTask.id, { ...g, left, width });
|
|
64768
64833
|
}, [bars, liveDragDates, dragTask, range, zoom]);
|
|
64769
|
-
const linkPaths = (0,
|
|
64834
|
+
const linkPaths = (0, import_react288.useMemo)(
|
|
64770
64835
|
() => computeLinkPaths(links, liveLinkBars, color),
|
|
64771
64836
|
[links, liveLinkBars, color]
|
|
64772
64837
|
);
|
|
64773
|
-
const linkFan = (0,
|
|
64774
|
-
return /* @__PURE__ */ (0,
|
|
64838
|
+
const linkFan = (0, import_react288.useMemo)(() => computeLinkFanOffsets(links, bars), [links, bars]);
|
|
64839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64775
64840
|
Panel_default,
|
|
64776
64841
|
{
|
|
64777
64842
|
ref: rootRef,
|
|
@@ -64789,31 +64854,31 @@ var Gantt = ({
|
|
|
64789
64854
|
"aria-label": t("kit.gantt.root"),
|
|
64790
64855
|
onKeyDown: onRootKeyDown,
|
|
64791
64856
|
onPointerDown: handleRootPointerDown,
|
|
64792
|
-
children: /* @__PURE__ */ (0,
|
|
64793
|
-
/* @__PURE__ */ (0,
|
|
64857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
64858
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64794
64859
|
"div",
|
|
64795
64860
|
{
|
|
64796
|
-
className: (0,
|
|
64861
|
+
className: (0, import_classnames123.default)(
|
|
64797
64862
|
"flex shrink-0 items-center gap-3 border-b px-4 py-3",
|
|
64798
64863
|
surfaceText.divider
|
|
64799
64864
|
),
|
|
64800
64865
|
children: [
|
|
64801
|
-
hasNode(icon) && /* @__PURE__ */ (0,
|
|
64866
|
+
hasNode(icon) && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64802
64867
|
"div",
|
|
64803
64868
|
{
|
|
64804
|
-
className: (0,
|
|
64869
|
+
className: (0, import_classnames123.default)(
|
|
64805
64870
|
"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",
|
|
64806
64871
|
getSurfaceVariantClasses(variant, "neutral")
|
|
64807
64872
|
),
|
|
64808
64873
|
children: icon
|
|
64809
64874
|
}
|
|
64810
64875
|
),
|
|
64811
|
-
(title != null || subtitle != null) && /* @__PURE__ */ (0,
|
|
64812
|
-
subtitle != null && /* @__PURE__ */ (0,
|
|
64813
|
-
title != null && /* @__PURE__ */ (0,
|
|
64876
|
+
(title != null || subtitle != null) && /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
64877
|
+
subtitle != null && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "truncate text-[11px] font-semibold uppercase tracking-wider text-neutral-500 dark:text-neutral-400", children: subtitle }),
|
|
64878
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "truncate text-lg font-semibold text-neutral-900 dark:text-white", children: title })
|
|
64814
64879
|
] }),
|
|
64815
|
-
hasNode(actions) && /* @__PURE__ */ (0,
|
|
64816
|
-
/* @__PURE__ */ (0,
|
|
64880
|
+
hasNode(actions) && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions }),
|
|
64881
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "ml-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64817
64882
|
GanttToolbar,
|
|
64818
64883
|
{
|
|
64819
64884
|
variant,
|
|
@@ -64826,31 +64891,31 @@ var Gantt = ({
|
|
|
64826
64891
|
]
|
|
64827
64892
|
}
|
|
64828
64893
|
),
|
|
64829
|
-
/* @__PURE__ */ (0,
|
|
64894
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64830
64895
|
"div",
|
|
64831
64896
|
{
|
|
64832
|
-
className: (0,
|
|
64897
|
+
className: (0, import_classnames123.default)(
|
|
64833
64898
|
"relative flex shrink-0 items-stretch border-b",
|
|
64834
64899
|
surfaceText.divider
|
|
64835
64900
|
),
|
|
64836
64901
|
style: { height: HEADER_HEIGHT },
|
|
64837
64902
|
children: [
|
|
64838
|
-
/* @__PURE__ */ (0,
|
|
64903
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64839
64904
|
"div",
|
|
64840
64905
|
{
|
|
64841
|
-
className: (0,
|
|
64906
|
+
className: (0, import_classnames123.default)(
|
|
64842
64907
|
"flex items-stretch border-r bg-white dark:bg-neutral-900",
|
|
64843
64908
|
surfaceText.divider
|
|
64844
64909
|
),
|
|
64845
64910
|
style: { width: leftWidth },
|
|
64846
64911
|
children: [
|
|
64847
|
-
/* @__PURE__ */ (0,
|
|
64912
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "w-9 shrink-0" }),
|
|
64848
64913
|
sizedColumns.map((col) => {
|
|
64849
64914
|
const resizable = resizableColumns && col.resizable !== false;
|
|
64850
|
-
return /* @__PURE__ */ (0,
|
|
64915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64851
64916
|
"div",
|
|
64852
64917
|
{
|
|
64853
|
-
className: (0,
|
|
64918
|
+
className: (0, import_classnames123.default)(
|
|
64854
64919
|
"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",
|
|
64855
64920
|
surfaceText.divider
|
|
64856
64921
|
),
|
|
@@ -64859,7 +64924,7 @@ var Gantt = ({
|
|
|
64859
64924
|
justifyContent: col.align === "center" ? "center" : col.align === "right" ? "flex-end" : "flex-start"
|
|
64860
64925
|
},
|
|
64861
64926
|
children: [
|
|
64862
|
-
/* @__PURE__ */ (0,
|
|
64927
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: "truncate", children: col.title }),
|
|
64863
64928
|
resizable && /* Resize handle — Table's header-edge pattern: an 8px hit
|
|
64864
64929
|
area whose 1px line sits exactly on the column border.
|
|
64865
64930
|
Absolute insets stop at the padding edge (1px inside
|
|
@@ -64868,7 +64933,7 @@ var Gantt = ({
|
|
|
64868
64933
|
the border's own pixel. The cell carries no
|
|
64869
64934
|
overflow-hidden so the line can paint over the border
|
|
64870
64935
|
(the title span truncates itself). */
|
|
64871
|
-
/* @__PURE__ */ (0,
|
|
64936
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64872
64937
|
"div",
|
|
64873
64938
|
{
|
|
64874
64939
|
role: "separator",
|
|
@@ -64877,7 +64942,7 @@ var Gantt = ({
|
|
|
64877
64942
|
className: "group/rh absolute inset-y-0 -right-px z-10 flex w-2 cursor-col-resize select-none items-stretch justify-end",
|
|
64878
64943
|
onPointerDown: (e) => startColumnResize(e, col.key),
|
|
64879
64944
|
title: t("kit.gantt.resizeColumn", { column: col.title }),
|
|
64880
|
-
children: /* @__PURE__ */ (0,
|
|
64945
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64881
64946
|
"div",
|
|
64882
64947
|
{
|
|
64883
64948
|
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",
|
|
@@ -64894,30 +64959,30 @@ var Gantt = ({
|
|
|
64894
64959
|
]
|
|
64895
64960
|
}
|
|
64896
64961
|
),
|
|
64897
|
-
/* @__PURE__ */ (0,
|
|
64962
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "relative min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64898
64963
|
"div",
|
|
64899
64964
|
{
|
|
64900
64965
|
ref: headerScaleRef,
|
|
64901
64966
|
className: "relative h-full",
|
|
64902
64967
|
style: { width: timelineWidth },
|
|
64903
64968
|
children: [
|
|
64904
|
-
/* @__PURE__ */ (0,
|
|
64905
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0,
|
|
64969
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(GanttScale, { levels: scaleLevels, height: HEADER_HEIGHT }),
|
|
64970
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64906
64971
|
"div",
|
|
64907
64972
|
{
|
|
64908
|
-
className: (0,
|
|
64973
|
+
className: (0, import_classnames123.default)(
|
|
64909
64974
|
"pointer-events-none absolute inset-y-0 z-[1] border-l-2",
|
|
64910
64975
|
todayTokens.line
|
|
64911
64976
|
),
|
|
64912
64977
|
style: { left: todayX }
|
|
64913
64978
|
}
|
|
64914
64979
|
),
|
|
64915
|
-
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0,
|
|
64980
|
+
todayVisible && !loading && !isEmpty2 && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64916
64981
|
"div",
|
|
64917
64982
|
{
|
|
64918
64983
|
className: "pointer-events-none absolute top-1 z-10 -translate-x-1/2",
|
|
64919
64984
|
style: { left: todayX },
|
|
64920
|
-
children: /* @__PURE__ */ (0,
|
|
64985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("span", { className: (0, import_classnames123.default)("rounded-full px-2 py-0.5 text-[10px] font-semibold text-white shadow-sm", todayTokens.chip), children: allLabels.today })
|
|
64921
64986
|
}
|
|
64922
64987
|
)
|
|
64923
64988
|
]
|
|
@@ -64926,20 +64991,20 @@ var Gantt = ({
|
|
|
64926
64991
|
]
|
|
64927
64992
|
}
|
|
64928
64993
|
),
|
|
64929
|
-
/* @__PURE__ */ (0,
|
|
64994
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64930
64995
|
"div",
|
|
64931
64996
|
{
|
|
64932
64997
|
ref: scrollRef,
|
|
64933
64998
|
className: `gantt-scroller min-h-0 flex-1 overflow-auto overscroll-contain [&::-webkit-scrollbar]:h-1.5 ${THIN_SCROLLBAR}`,
|
|
64934
64999
|
onScroll: syncHeaderScale,
|
|
64935
|
-
children: /* @__PURE__ */ (0,
|
|
64936
|
-
/* @__PURE__ */ (0,
|
|
65000
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { style: { width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER, minWidth: "100%" }, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(GanttSkeleton, { rows: 12, rowHeight: rowHeight2, leftWidth }) : isEmpty2 ? /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "flex items-center justify-center text-sm text-neutral-500", style: { height: bodyHeight || 160, width: leftWidth + timelineWidth }, children: emptyState ?? allLabels.empty }) : /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "relative", style: { height: bodyHeight }, children: [
|
|
65001
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsxs)(
|
|
64937
65002
|
"div",
|
|
64938
65003
|
{
|
|
64939
65004
|
className: "pointer-events-none absolute inset-y-0 z-0",
|
|
64940
65005
|
style: { left: leftWidth, width: timelineWidth },
|
|
64941
65006
|
children: [
|
|
64942
|
-
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */ (0,
|
|
65007
|
+
scaleLevels.length > 0 && scaleLevels[scaleLevels.length - 1].columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64943
65008
|
"div",
|
|
64944
65009
|
{
|
|
64945
65010
|
className: "absolute inset-y-0 border-r border-neutral-100 dark:border-neutral-800",
|
|
@@ -64947,10 +65012,10 @@ var Gantt = ({
|
|
|
64947
65012
|
},
|
|
64948
65013
|
c.id
|
|
64949
65014
|
)),
|
|
64950
|
-
todayVisible && /* @__PURE__ */ (0,
|
|
65015
|
+
todayVisible && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64951
65016
|
"div",
|
|
64952
65017
|
{
|
|
64953
|
-
className: (0,
|
|
65018
|
+
className: (0, import_classnames123.default)("absolute inset-y-0 border-l-2", todayTokens.line),
|
|
64954
65019
|
style: { left: todayX }
|
|
64955
65020
|
}
|
|
64956
65021
|
)
|
|
@@ -64960,7 +65025,7 @@ var Gantt = ({
|
|
|
64960
65025
|
liveModel.rows.map((row) => {
|
|
64961
65026
|
const isDragSource = drag?.kind === "reorder" && row.task != null && row.task.id === drag.taskId;
|
|
64962
65027
|
if (isDragSource) {
|
|
64963
|
-
return /* @__PURE__ */ (0,
|
|
65028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64964
65029
|
"div",
|
|
64965
65030
|
{
|
|
64966
65031
|
"data-row-key": row.key,
|
|
@@ -64968,7 +65033,7 @@ var Gantt = ({
|
|
|
64968
65033
|
"aria-hidden": "true",
|
|
64969
65034
|
className: "pointer-events-none flex border-b",
|
|
64970
65035
|
style: { height: dragSubtreeHeight || row.height },
|
|
64971
|
-
children: /* @__PURE__ */ (0,
|
|
65036
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64972
65037
|
"div",
|
|
64973
65038
|
{
|
|
64974
65039
|
className: "m-1 flex-1 rounded-md border-2 border-dashed",
|
|
@@ -64985,7 +65050,7 @@ var Gantt = ({
|
|
|
64985
65050
|
if (drag?.kind === "reorder" && dragSubtreeKeys.has(row.key)) {
|
|
64986
65051
|
return null;
|
|
64987
65052
|
}
|
|
64988
|
-
return /* @__PURE__ */ (0,
|
|
65053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
64989
65054
|
GanttBodyRow,
|
|
64990
65055
|
{
|
|
64991
65056
|
row,
|
|
@@ -65023,7 +65088,7 @@ var Gantt = ({
|
|
|
65023
65088
|
row.key
|
|
65024
65089
|
);
|
|
65025
65090
|
}),
|
|
65026
|
-
/* @__PURE__ */ (0,
|
|
65091
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65027
65092
|
GanttLinkLayer,
|
|
65028
65093
|
{
|
|
65029
65094
|
ref: overlayRef,
|
|
@@ -65039,7 +65104,7 @@ var Gantt = ({
|
|
|
65039
65104
|
onDeleteLink: interactive && onLinksChange ? deleteSelectedLink : void 0
|
|
65040
65105
|
}
|
|
65041
65106
|
),
|
|
65042
|
-
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */ (0,
|
|
65107
|
+
drag?.kind === "reorder" && reorderLineY != null && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65043
65108
|
"div",
|
|
65044
65109
|
{
|
|
65045
65110
|
className: "pointer-events-none absolute z-30 h-0.5 rounded-full",
|
|
@@ -65059,7 +65124,7 @@ var Gantt = ({
|
|
|
65059
65124
|
// there is no filtered/overflowing ancestor and the fixed
|
|
65060
65125
|
// clone always tracks the viewport pointer.
|
|
65061
65126
|
(0, import_react_dom15.createPortal)(
|
|
65062
|
-
/* @__PURE__ */ (0,
|
|
65127
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65063
65128
|
"div",
|
|
65064
65129
|
{
|
|
65065
65130
|
"data-gantt-drag-clone": "true",
|
|
@@ -65070,14 +65135,14 @@ var Gantt = ({
|
|
|
65070
65135
|
top: drag.clientY - (drag.grabOffset?.y ?? 0),
|
|
65071
65136
|
width: leftWidth + timelineWidth + LINK_RIGHT_GUTTER
|
|
65072
65137
|
},
|
|
65073
|
-
children: /* @__PURE__ */ (0,
|
|
65138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65074
65139
|
"div",
|
|
65075
65140
|
{
|
|
65076
65141
|
className: "overflow-hidden rounded-lg bg-white/95 shadow-2xl backdrop-blur-sm dark:bg-neutral-900/95",
|
|
65077
65142
|
style: {
|
|
65078
65143
|
boxShadow: `0 8px 32px rgba(0, 0, 0, 0.28), inset 2px 0 0 var(--color-${color}-500)`
|
|
65079
65144
|
},
|
|
65080
|
-
children: dragSubtree.map((row) => /* @__PURE__ */ (0,
|
|
65145
|
+
children: dragSubtree.map((row) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65081
65146
|
GanttBodyRow,
|
|
65082
65147
|
{
|
|
65083
65148
|
row,
|
|
@@ -65120,7 +65185,7 @@ var Gantt = ({
|
|
|
65120
65185
|
),
|
|
65121
65186
|
document.body
|
|
65122
65187
|
),
|
|
65123
|
-
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */ (0,
|
|
65188
|
+
drag && drag.kind !== "reorder" && dragTask && liveDragDates && /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65124
65189
|
"div",
|
|
65125
65190
|
{
|
|
65126
65191
|
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",
|
|
@@ -65151,13 +65216,13 @@ var GanttSkeleton = ({
|
|
|
65151
65216
|
rows,
|
|
65152
65217
|
rowHeight: rowHeight2,
|
|
65153
65218
|
leftWidth
|
|
65154
|
-
}) => /* @__PURE__ */ (0,
|
|
65155
|
-
/* @__PURE__ */ (0,
|
|
65219
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "animate-pulse", "aria-busy": "true", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime314.jsxs)("div", { className: "flex", style: { height: rowHeight2 }, children: [
|
|
65220
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65156
65221
|
"div",
|
|
65157
65222
|
{
|
|
65158
65223
|
className: "sticky left-0 flex items-center border-b border-neutral-100 bg-white px-3 dark:border-neutral-800 dark:bg-neutral-900",
|
|
65159
65224
|
style: { width: leftWidth },
|
|
65160
|
-
children: /* @__PURE__ */ (0,
|
|
65225
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65161
65226
|
"div",
|
|
65162
65227
|
{
|
|
65163
65228
|
className: "h-3 rounded-full bg-neutral-200 dark:bg-neutral-700",
|
|
@@ -65166,7 +65231,7 @@ var GanttSkeleton = ({
|
|
|
65166
65231
|
)
|
|
65167
65232
|
}
|
|
65168
65233
|
),
|
|
65169
|
-
/* @__PURE__ */ (0,
|
|
65234
|
+
/* @__PURE__ */ (0, import_jsx_runtime314.jsx)("div", { className: "relative flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime314.jsx)(
|
|
65170
65235
|
"div",
|
|
65171
65236
|
{
|
|
65172
65237
|
className: "absolute top-1/2 h-4 -translate-y-1/2 rounded-md bg-neutral-200/80 dark:bg-neutral-700/60",
|
|
@@ -65179,11 +65244,11 @@ var GanttSkeleton = ({
|
|
|
65179
65244
|
] }, i)) });
|
|
65180
65245
|
|
|
65181
65246
|
// src/contexts/BottomSheetContext.tsx
|
|
65182
|
-
var
|
|
65247
|
+
var import_react289 = require("react");
|
|
65183
65248
|
var import_react_dom16 = require("react-dom");
|
|
65184
|
-
var
|
|
65185
|
-
var
|
|
65186
|
-
var BottomSheetContext = (0,
|
|
65249
|
+
var import_classnames124 = __toESM(require("classnames"), 1);
|
|
65250
|
+
var import_jsx_runtime315 = require("react/jsx-runtime");
|
|
65251
|
+
var BottomSheetContext = (0, import_react289.createContext)(null);
|
|
65187
65252
|
var TRANSITION_MS2 = 260;
|
|
65188
65253
|
var renderSlot = (slot, controls) => {
|
|
65189
65254
|
if (!slot) {
|
|
@@ -65194,13 +65259,13 @@ var renderSlot = (slot, controls) => {
|
|
|
65194
65259
|
var BottomSheetProvider = ({
|
|
65195
65260
|
children
|
|
65196
65261
|
}) => {
|
|
65197
|
-
const [sheet, setSheet] = (0,
|
|
65198
|
-
const [isVisible, setIsVisible] = (0,
|
|
65199
|
-
const pendingCloseRef = (0,
|
|
65200
|
-
const dismissSheet = (0,
|
|
65262
|
+
const [sheet, setSheet] = (0, import_react289.useState)(null);
|
|
65263
|
+
const [isVisible, setIsVisible] = (0, import_react289.useState)(false);
|
|
65264
|
+
const pendingCloseRef = (0, import_react289.useRef)(null);
|
|
65265
|
+
const dismissSheet = (0, import_react289.useCallback)(() => {
|
|
65201
65266
|
setIsVisible(false);
|
|
65202
65267
|
}, []);
|
|
65203
|
-
const presentSheet = (0,
|
|
65268
|
+
const presentSheet = (0, import_react289.useCallback)((options) => {
|
|
65204
65269
|
if (pendingCloseRef.current) {
|
|
65205
65270
|
clearTimeout(pendingCloseRef.current);
|
|
65206
65271
|
pendingCloseRef.current = null;
|
|
@@ -65213,7 +65278,7 @@ var BottomSheetProvider = ({
|
|
|
65213
65278
|
setTimeout(animateIn, 0);
|
|
65214
65279
|
}
|
|
65215
65280
|
}, []);
|
|
65216
|
-
(0,
|
|
65281
|
+
(0, import_react289.useEffect)(() => {
|
|
65217
65282
|
if (!isVisible && sheet) {
|
|
65218
65283
|
pendingCloseRef.current = setTimeout(() => {
|
|
65219
65284
|
sheet.onClose?.();
|
|
@@ -65228,7 +65293,7 @@ var BottomSheetProvider = ({
|
|
|
65228
65293
|
}
|
|
65229
65294
|
return void 0;
|
|
65230
65295
|
}, [isVisible, sheet]);
|
|
65231
|
-
(0,
|
|
65296
|
+
(0, import_react289.useEffect)(
|
|
65232
65297
|
() => () => {
|
|
65233
65298
|
if (pendingCloseRef.current) {
|
|
65234
65299
|
clearTimeout(pendingCloseRef.current);
|
|
@@ -65236,13 +65301,13 @@ var BottomSheetProvider = ({
|
|
|
65236
65301
|
},
|
|
65237
65302
|
[]
|
|
65238
65303
|
);
|
|
65239
|
-
const controls = (0,
|
|
65304
|
+
const controls = (0, import_react289.useMemo)(
|
|
65240
65305
|
() => ({
|
|
65241
65306
|
dismiss: dismissSheet
|
|
65242
65307
|
}),
|
|
65243
65308
|
[dismissSheet]
|
|
65244
65309
|
);
|
|
65245
|
-
const contextValue = (0,
|
|
65310
|
+
const contextValue = (0, import_react289.useMemo)(
|
|
65246
65311
|
() => ({
|
|
65247
65312
|
presentSheet,
|
|
65248
65313
|
dismissSheet,
|
|
@@ -65252,11 +65317,11 @@ var BottomSheetProvider = ({
|
|
|
65252
65317
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
65253
65318
|
);
|
|
65254
65319
|
const overlayNode = typeof document !== "undefined" && sheet ? (0, import_react_dom16.createPortal)(
|
|
65255
|
-
/* @__PURE__ */ (0,
|
|
65256
|
-
/* @__PURE__ */ (0,
|
|
65320
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
65321
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
65257
65322
|
"div",
|
|
65258
65323
|
{
|
|
65259
|
-
className: (0,
|
|
65324
|
+
className: (0, import_classnames124.default)(
|
|
65260
65325
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
65261
65326
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
65262
65327
|
),
|
|
@@ -65266,24 +65331,24 @@ var BottomSheetProvider = ({
|
|
|
65266
65331
|
}
|
|
65267
65332
|
}
|
|
65268
65333
|
),
|
|
65269
|
-
/* @__PURE__ */ (0,
|
|
65334
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(
|
|
65270
65335
|
"section",
|
|
65271
65336
|
{
|
|
65272
65337
|
role: "dialog",
|
|
65273
65338
|
"aria-modal": "true",
|
|
65274
|
-
className: (0,
|
|
65339
|
+
className: (0, import_classnames124.default)(
|
|
65275
65340
|
"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",
|
|
65276
65341
|
sheet.className,
|
|
65277
65342
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
65278
65343
|
),
|
|
65279
65344
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
65280
65345
|
children: [
|
|
65281
|
-
/* @__PURE__ */ (0,
|
|
65282
|
-
/* @__PURE__ */ (0,
|
|
65283
|
-
sheet.title && /* @__PURE__ */ (0,
|
|
65284
|
-
sheet.description && /* @__PURE__ */ (0,
|
|
65346
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
65347
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsxs)("div", { className: "space-y-1", children: [
|
|
65348
|
+
sheet.title && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
65349
|
+
sheet.description && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
65285
65350
|
] }),
|
|
65286
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */ (0,
|
|
65351
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)(
|
|
65287
65352
|
IconButton_default,
|
|
65288
65353
|
{
|
|
65289
65354
|
icon: "Close",
|
|
@@ -65295,21 +65360,21 @@ var BottomSheetProvider = ({
|
|
|
65295
65360
|
}
|
|
65296
65361
|
)
|
|
65297
65362
|
] }),
|
|
65298
|
-
/* @__PURE__ */ (0,
|
|
65299
|
-
sheet.actions && /* @__PURE__ */ (0,
|
|
65363
|
+
/* @__PURE__ */ (0, import_jsx_runtime315.jsx)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
65364
|
+
sheet.actions && /* @__PURE__ */ (0, import_jsx_runtime315.jsx)("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) })
|
|
65300
65365
|
]
|
|
65301
65366
|
}
|
|
65302
65367
|
) })
|
|
65303
65368
|
] }),
|
|
65304
65369
|
document.body
|
|
65305
65370
|
) : null;
|
|
65306
|
-
return /* @__PURE__ */ (0,
|
|
65371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime315.jsxs)(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
65307
65372
|
children,
|
|
65308
65373
|
overlayNode
|
|
65309
65374
|
] });
|
|
65310
65375
|
};
|
|
65311
65376
|
var useBottomSheet = () => {
|
|
65312
|
-
const context = (0,
|
|
65377
|
+
const context = (0, import_react289.useContext)(BottomSheetContext);
|
|
65313
65378
|
if (!context) {
|
|
65314
65379
|
throw new Error("useBottomSheet must be used within a BottomSheetProvider");
|
|
65315
65380
|
}
|
|
@@ -65943,8 +66008,8 @@ var SYSTEM_VARIABLES = [
|
|
|
65943
66008
|
];
|
|
65944
66009
|
|
|
65945
66010
|
// src/components/MetricBar.tsx
|
|
65946
|
-
var
|
|
65947
|
-
var
|
|
66011
|
+
var import_classnames125 = __toESM(require("classnames"), 1);
|
|
66012
|
+
var import_jsx_runtime316 = require("react/jsx-runtime");
|
|
65948
66013
|
var MetricBar = ({
|
|
65949
66014
|
label,
|
|
65950
66015
|
value,
|
|
@@ -65954,7 +66019,7 @@ var MetricBar = ({
|
|
|
65954
66019
|
size = "sm",
|
|
65955
66020
|
className,
|
|
65956
66021
|
...rest
|
|
65957
|
-
}) => /* @__PURE__ */ (0,
|
|
66022
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime316.jsx)(
|
|
65958
66023
|
Progress_default,
|
|
65959
66024
|
{
|
|
65960
66025
|
...rest,
|
|
@@ -65964,7 +66029,7 @@ var MetricBar = ({
|
|
|
65964
66029
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
65965
66030
|
size,
|
|
65966
66031
|
color: tone ?? color ?? "blue",
|
|
65967
|
-
className: (0,
|
|
66032
|
+
className: (0, import_classnames125.default)("w-full", className)
|
|
65968
66033
|
}
|
|
65969
66034
|
);
|
|
65970
66035
|
MetricBar.displayName = "MetricBar";
|
|
@@ -66044,6 +66109,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66044
66109
|
DEFAULT_LAYOUT_OPTIONS,
|
|
66045
66110
|
DEFAULT_SERIES_PALETTE,
|
|
66046
66111
|
DEFAULT_SURFACE_CORNER,
|
|
66112
|
+
DEFAULT_SURFACE_GUTTER,
|
|
66047
66113
|
DEFAULT_SURFACE_PADDING,
|
|
66048
66114
|
DEFAULT_SURFACE_TONE,
|
|
66049
66115
|
DEFAULT_TOAST_GAP_PX,
|
|
@@ -66194,6 +66260,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66194
66260
|
STAT_PAGER_PLACEMENTS,
|
|
66195
66261
|
SURFACE_CORNERS,
|
|
66196
66262
|
SURFACE_GLASS_RIM,
|
|
66263
|
+
SURFACE_GUTTER_AXES,
|
|
66197
66264
|
SURFACE_PADDINGS,
|
|
66198
66265
|
SURFACE_TO_BUTTON_VARIANT,
|
|
66199
66266
|
SURFACE_VARIANTS,
|
|
@@ -66288,6 +66355,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66288
66355
|
WorkflowTracker,
|
|
66289
66356
|
WorkflowTrackerDetails,
|
|
66290
66357
|
WorkflowTrackerRail,
|
|
66358
|
+
WorkflowTrackerRollups,
|
|
66291
66359
|
WorkflowTrackerStepDetails,
|
|
66292
66360
|
areaPathFromPoints,
|
|
66293
66361
|
bandAreaPath,
|
|
@@ -66426,6 +66494,7 @@ MetricBar.displayName = "MetricBar";
|
|
|
66426
66494
|
getStepperTonePalette,
|
|
66427
66495
|
getSurfaceCornerClass,
|
|
66428
66496
|
getSurfaceCornerRem,
|
|
66497
|
+
getSurfaceGutterClass,
|
|
66429
66498
|
getSurfacePaddingClass,
|
|
66430
66499
|
getSurfacePaddingClasses,
|
|
66431
66500
|
getSurfaceTextTokens,
|