@cjlapao/ui-kit 0.2.12 → 0.2.14
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-BTIiqZAG.d.cts → CapsuleBlueprint-sug3nUbg.d.cts} +13 -1
- package/dist/{CapsuleBlueprint-BTIiqZAG.d.ts → CapsuleBlueprint-sug3nUbg.d.ts} +13 -1
- package/dist/index.cjs +286 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +82 -0
- package/dist/index.d.cts +108 -39
- package/dist/index.d.ts +108 -39
- package/dist/index.js +280 -134
- 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 +1 -1
package/dist/index.js
CHANGED
|
@@ -5287,6 +5287,9 @@ var surfaceCornerRem = {
|
|
|
5287
5287
|
};
|
|
5288
5288
|
var DEFAULT_SURFACE_CORNER = "rounded-md";
|
|
5289
5289
|
var COLLAPSED_RAIL_WIDTH = 56;
|
|
5290
|
+
var PANEL_SLIDE_DURATION_MS = 450;
|
|
5291
|
+
var PANEL_SLIDE_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
5292
|
+
var panelSlideTransition = (...properties) => properties.map((property) => `${property} ${PANEL_SLIDE_DURATION_MS}ms ${PANEL_SLIDE_EASING}`).join(", ");
|
|
5290
5293
|
var DEFAULT_CONTROL_CORNER = "rounded-lg";
|
|
5291
5294
|
var SURFACE_VARIANT_FOR_FIELD = {
|
|
5292
5295
|
flat: "outlined",
|
|
@@ -14285,7 +14288,13 @@ var CollapseToggleButton = ({
|
|
|
14285
14288
|
size = "sm",
|
|
14286
14289
|
...rest
|
|
14287
14290
|
}) => {
|
|
14288
|
-
const
|
|
14291
|
+
const towardEdge = !collapsed;
|
|
14292
|
+
const rotation = {
|
|
14293
|
+
right: towardEdge ? "" : "rotate-180",
|
|
14294
|
+
left: towardEdge ? "rotate-180" : "",
|
|
14295
|
+
bottom: towardEdge ? "rotate-90" : "-rotate-90",
|
|
14296
|
+
top: towardEdge ? "-rotate-90" : "rotate-90"
|
|
14297
|
+
}[edge];
|
|
14289
14298
|
return /* @__PURE__ */ jsx172(
|
|
14290
14299
|
IconButton_default,
|
|
14291
14300
|
{
|
|
@@ -14294,7 +14303,7 @@ var CollapseToggleButton = ({
|
|
|
14294
14303
|
{
|
|
14295
14304
|
className: classNames23(
|
|
14296
14305
|
"transition-transform duration-200 motion-reduce:transition-none",
|
|
14297
|
-
|
|
14306
|
+
rotation
|
|
14298
14307
|
)
|
|
14299
14308
|
}
|
|
14300
14309
|
),
|
|
@@ -22464,6 +22473,10 @@ var PageHeader = ({
|
|
|
22464
22473
|
children,
|
|
22465
22474
|
variant = "default",
|
|
22466
22475
|
accentColor = "blue",
|
|
22476
|
+
tone = "neutral",
|
|
22477
|
+
glassOpacity,
|
|
22478
|
+
vibrancy,
|
|
22479
|
+
specularMode,
|
|
22467
22480
|
padding,
|
|
22468
22481
|
paddingTop,
|
|
22469
22482
|
paddingRight,
|
|
@@ -22473,7 +22486,9 @@ var PageHeader = ({
|
|
|
22473
22486
|
className = "",
|
|
22474
22487
|
...rest
|
|
22475
22488
|
}) => {
|
|
22476
|
-
const
|
|
22489
|
+
const plain = variant === "none" || variant === "plain";
|
|
22490
|
+
const sharedSurface = !plain && variant !== "default" && variant !== "floating" && variant !== "floating-glass";
|
|
22491
|
+
const surface = variant === "floating" || variant === "floating-glass" ? getSidebarSurfaceTokens(variant, accentColor) : null;
|
|
22477
22492
|
const pair = surface ? "xs" : "none";
|
|
22478
22493
|
const gutter = {
|
|
22479
22494
|
top: paddingTop ?? padding ?? pair,
|
|
@@ -22486,7 +22501,7 @@ var PageHeader = ({
|
|
|
22486
22501
|
{
|
|
22487
22502
|
...rest,
|
|
22488
22503
|
className: classNames53(
|
|
22489
|
-
"flex w-full items-center justify-between gap-4 px-5",
|
|
22504
|
+
"relative isolate flex w-full shrink-0 items-center justify-between gap-4 px-5",
|
|
22490
22505
|
SIDE_MENU_HEADER_HEIGHT,
|
|
22491
22506
|
getSurfaceGutterClass("top", gutter.top),
|
|
22492
22507
|
getSurfaceGutterClass("right", gutter.right),
|
|
@@ -22498,10 +22513,24 @@ var PageHeader = ({
|
|
|
22498
22513
|
surface.border,
|
|
22499
22514
|
surface.shadow,
|
|
22500
22515
|
surface.fill
|
|
22501
|
-
) : classNames53("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
|
|
22516
|
+
) : !sharedSurface && !plain && classNames53("border-b", SIDE_MENU_HEADER_FILL, SIDE_MENU_HEADER_SEAM),
|
|
22502
22517
|
className
|
|
22503
22518
|
),
|
|
22504
22519
|
children: [
|
|
22520
|
+
sharedSurface && /* @__PURE__ */ jsx203("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 -z-10", style: { borderRadius: "inherit" }, children: /* @__PURE__ */ jsx203(
|
|
22521
|
+
Panel_default,
|
|
22522
|
+
{
|
|
22523
|
+
variant,
|
|
22524
|
+
tone,
|
|
22525
|
+
glassOpacity,
|
|
22526
|
+
vibrancy,
|
|
22527
|
+
specularMode,
|
|
22528
|
+
padding: "none",
|
|
22529
|
+
corner: "none",
|
|
22530
|
+
className: "h-full w-full",
|
|
22531
|
+
style: { borderRadius: "inherit" }
|
|
22532
|
+
}
|
|
22533
|
+
) }),
|
|
22505
22534
|
/* @__PURE__ */ jsx203("div", { className: GROUP_CLASS2, children: start }),
|
|
22506
22535
|
/* @__PURE__ */ jsx203("div", { className: GROUP_CLASS2, children: center }),
|
|
22507
22536
|
/* @__PURE__ */ jsx203("div", { className: GROUP_CLASS2, children: end }),
|
|
@@ -42966,6 +42995,21 @@ import React60, {
|
|
|
42966
42995
|
useRef as useRef51,
|
|
42967
42996
|
useState as useState52
|
|
42968
42997
|
} from "react";
|
|
42998
|
+
|
|
42999
|
+
// ../common/theme/noise.ts
|
|
43000
|
+
var NOISE_BACKGROUND_IMAGE = `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`;
|
|
43001
|
+
var LIGHT = "mix-blend-multiply opacity-[0.08]";
|
|
43002
|
+
var DARK = "mix-blend-overlay opacity-[0.4]";
|
|
43003
|
+
function getNoiseBlendClasses(scheme = "auto") {
|
|
43004
|
+
if (scheme === "light") return LIGHT;
|
|
43005
|
+
if (scheme === "dark") return DARK;
|
|
43006
|
+
return `${LIGHT} dark:mix-blend-overlay dark:opacity-[0.4]`;
|
|
43007
|
+
}
|
|
43008
|
+
function getNoiseBackgroundSize(scale) {
|
|
43009
|
+
return scale !== void 0 && Number.isFinite(scale) && scale > 0 ? `${200 * scale}px ${200 * scale}px` : void 0;
|
|
43010
|
+
}
|
|
43011
|
+
|
|
43012
|
+
// src/components/SideMenu.tsx
|
|
42969
43013
|
import { Fragment as Fragment33, jsx as jsx259, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
42970
43014
|
var EMPTY_VIEW_OPTIONS = [];
|
|
42971
43015
|
var NOISE_STYLE = {
|
|
@@ -43310,6 +43354,7 @@ var SideMenu = ({
|
|
|
43310
43354
|
footerDetails,
|
|
43311
43355
|
footerDetailsTone,
|
|
43312
43356
|
noise = false,
|
|
43357
|
+
noiseScale,
|
|
43313
43358
|
loading = false,
|
|
43314
43359
|
loaderType = "skeleton",
|
|
43315
43360
|
loaderTitle,
|
|
@@ -43960,7 +44005,8 @@ var SideMenu = ({
|
|
|
43960
44005
|
"div",
|
|
43961
44006
|
{
|
|
43962
44007
|
className: `absolute inset-0 opacity-[0.4] pointer-events-none mix-blend-overlay ${surface.radius}`,
|
|
43963
|
-
|
|
44008
|
+
"data-sidemenu-noise": true,
|
|
44009
|
+
style: { ...NOISE_STYLE, backgroundSize: getNoiseBackgroundSize(noiseScale) }
|
|
43964
44010
|
}
|
|
43965
44011
|
),
|
|
43966
44012
|
/* @__PURE__ */ jsx259(
|
|
@@ -44312,18 +44358,6 @@ import {
|
|
|
44312
44358
|
useState as useState55
|
|
44313
44359
|
} from "react";
|
|
44314
44360
|
import classNames80 from "classnames";
|
|
44315
|
-
|
|
44316
|
-
// ../common/theme/noise.ts
|
|
44317
|
-
var NOISE_BACKGROUND_IMAGE = `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`;
|
|
44318
|
-
var LIGHT = "mix-blend-multiply opacity-[0.08]";
|
|
44319
|
-
var DARK = "mix-blend-overlay opacity-[0.4]";
|
|
44320
|
-
function getNoiseBlendClasses(scheme = "auto") {
|
|
44321
|
-
if (scheme === "light") return LIGHT;
|
|
44322
|
-
if (scheme === "dark") return DARK;
|
|
44323
|
-
return `${LIGHT} dark:mix-blend-overlay dark:opacity-[0.4]`;
|
|
44324
|
-
}
|
|
44325
|
-
|
|
44326
|
-
// src/components/SidePanel.tsx
|
|
44327
44361
|
import { Fragment as Fragment36, jsx as jsx263, jsxs as jsxs148 } from "react/jsx-runtime";
|
|
44328
44362
|
var LEGACY_PANEL_VARIANTS = {
|
|
44329
44363
|
sidebar: "elevated",
|
|
@@ -44333,20 +44367,46 @@ var LEGACY_PANEL_VARIANTS = {
|
|
|
44333
44367
|
};
|
|
44334
44368
|
var resolvePanelVariant2 = (variant) => variant in LEGACY_PANEL_VARIANTS ? LEGACY_PANEL_VARIANTS[variant] : variant;
|
|
44335
44369
|
var getSidePanelTextTokens = (variant) => getSurfaceTextTokens(resolvePanelVariant2(variant));
|
|
44336
|
-
var
|
|
44370
|
+
var INSET_GAP = {
|
|
44371
|
+
xs: { x: "inset-x-1", y: "inset-y-1", px: "px-1", py: "py-1" },
|
|
44372
|
+
sm: { x: "inset-x-2", y: "inset-y-2", px: "px-2", py: "py-2" },
|
|
44373
|
+
md: { x: "inset-x-4", y: "inset-y-4", px: "px-4", py: "py-4" },
|
|
44374
|
+
lg: { x: "inset-x-6", y: "inset-y-6", px: "px-6", py: "py-6" },
|
|
44375
|
+
xl: { x: "inset-x-8", y: "inset-y-8", px: "px-8", py: "py-8" }
|
|
44376
|
+
};
|
|
44377
|
+
var INSET_BORDER = {
|
|
44378
|
+
right: "border-y border-l",
|
|
44379
|
+
left: "border-y border-r",
|
|
44380
|
+
top: "border-x border-b",
|
|
44381
|
+
bottom: "border-x border-t"
|
|
44382
|
+
};
|
|
44383
|
+
var FLUSH_BORDER = {
|
|
44384
|
+
right: "border-l",
|
|
44385
|
+
left: "border-r",
|
|
44386
|
+
top: "border-b",
|
|
44387
|
+
bottom: "border-t"
|
|
44388
|
+
};
|
|
44389
|
+
var BAR_INSET = {
|
|
44390
|
+
none: { x: "inset-x-0", y: "inset-y-0" },
|
|
44391
|
+
rounded: { x: "inset-x-1", y: "inset-y-1" },
|
|
44392
|
+
"rounded-sm": { x: "inset-x-2", y: "inset-y-2" },
|
|
44393
|
+
"rounded-md": { x: "inset-x-4", y: "inset-y-4" },
|
|
44394
|
+
"rounded-lg": { x: "inset-x-6", y: "inset-y-6" },
|
|
44395
|
+
"rounded-xl": { x: "inset-x-8", y: "inset-y-8" }
|
|
44396
|
+
};
|
|
44337
44397
|
var INNER_CORNER = {
|
|
44338
44398
|
// (`"auto"` is absent by design: SidePanel's own default is `rounded`, and
|
|
44339
44399
|
// corner lookups below resolve it to the theme default.)
|
|
44340
|
-
none: { right: "", left: "" },
|
|
44341
|
-
rounded: { right: "rounded-l-sm", left: "rounded-r-sm" },
|
|
44342
|
-
"rounded-sm": { right: "rounded-l-lg", left: "rounded-r-lg" },
|
|
44343
|
-
"rounded-md": { right: "rounded-l-2xl", left: "rounded-r-2xl" },
|
|
44344
|
-
"rounded-lg": { right: "rounded-l-3xl", left: "rounded-r-3xl" },
|
|
44345
|
-
"rounded-xl": { right: "rounded-l-4xl", left: "rounded-r-4xl" }
|
|
44346
|
-
};
|
|
44347
|
-
var SIDE_PANEL_SIDES = ["left", "right"];
|
|
44348
|
-
var OPEN_DURATION_MS =
|
|
44349
|
-
var OPEN_EASING =
|
|
44400
|
+
none: { right: "", left: "", top: "", bottom: "" },
|
|
44401
|
+
rounded: { right: "rounded-l-sm", left: "rounded-r-sm", top: "rounded-b-sm", bottom: "rounded-t-sm" },
|
|
44402
|
+
"rounded-sm": { right: "rounded-l-lg", left: "rounded-r-lg", top: "rounded-b-lg", bottom: "rounded-t-lg" },
|
|
44403
|
+
"rounded-md": { right: "rounded-l-2xl", left: "rounded-r-2xl", top: "rounded-b-2xl", bottom: "rounded-t-2xl" },
|
|
44404
|
+
"rounded-lg": { right: "rounded-l-3xl", left: "rounded-r-3xl", top: "rounded-b-3xl", bottom: "rounded-t-3xl" },
|
|
44405
|
+
"rounded-xl": { right: "rounded-l-4xl", left: "rounded-r-4xl", top: "rounded-b-4xl", bottom: "rounded-t-4xl" }
|
|
44406
|
+
};
|
|
44407
|
+
var SIDE_PANEL_SIDES = ["left", "right", "top", "bottom"];
|
|
44408
|
+
var OPEN_DURATION_MS = PANEL_SLIDE_DURATION_MS;
|
|
44409
|
+
var OPEN_EASING = PANEL_SLIDE_EASING;
|
|
44350
44410
|
var SIZE_TOKENS4 = {
|
|
44351
44411
|
xs: {
|
|
44352
44412
|
pad: "px-2 py-1.5",
|
|
@@ -44381,11 +44441,15 @@ var SIZE_TOKENS4 = {
|
|
|
44381
44441
|
};
|
|
44382
44442
|
var SidePanel = ({
|
|
44383
44443
|
isOpen,
|
|
44444
|
+
docked = false,
|
|
44384
44445
|
onClose,
|
|
44385
44446
|
title,
|
|
44386
44447
|
subtitle,
|
|
44387
44448
|
icon,
|
|
44388
44449
|
width = 420,
|
|
44450
|
+
height = 240,
|
|
44451
|
+
minHeight = 120,
|
|
44452
|
+
maxHeight = 600,
|
|
44389
44453
|
headerActions,
|
|
44390
44454
|
footer,
|
|
44391
44455
|
children,
|
|
@@ -44405,6 +44469,7 @@ var SidePanel = ({
|
|
|
44405
44469
|
side = "right",
|
|
44406
44470
|
overlay = false,
|
|
44407
44471
|
noise = false,
|
|
44472
|
+
noiseScale,
|
|
44408
44473
|
inset,
|
|
44409
44474
|
corner = DEFAULT_SURFACE_CORNER,
|
|
44410
44475
|
collapsible = false,
|
|
@@ -44416,6 +44481,7 @@ var SidePanel = ({
|
|
|
44416
44481
|
}) => {
|
|
44417
44482
|
const t = useKitT();
|
|
44418
44483
|
warnIfMissingTitle("SidePanel", title);
|
|
44484
|
+
const vertical = side === "top" || side === "bottom";
|
|
44419
44485
|
const effectiveTone = tone ?? color ?? "neutral";
|
|
44420
44486
|
const sizeToken = SIZE_TOKENS4[size] ?? SIZE_TOKENS4.md;
|
|
44421
44487
|
const legacyVariant = variant in LEGACY_PANEL_VARIANTS;
|
|
@@ -44429,10 +44495,13 @@ var SidePanel = ({
|
|
|
44429
44495
|
surfaceTone
|
|
44430
44496
|
);
|
|
44431
44497
|
const surfaceText = getSidePanelTextTokens(variant);
|
|
44432
|
-
const
|
|
44433
|
-
const
|
|
44434
|
-
const
|
|
44435
|
-
const
|
|
44498
|
+
const insetValue = inset ?? surface.offset !== "";
|
|
44499
|
+
const insetSize = insetValue === true ? "md" : insetValue === false || insetValue === "none" ? null : insetValue;
|
|
44500
|
+
const isInset = insetSize !== null;
|
|
44501
|
+
const insetGap = insetSize ? INSET_GAP[insetSize] : null;
|
|
44502
|
+
const cornerClass = docked ? getSurfaceCornerClass(corner) : INNER_CORNER[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][side];
|
|
44503
|
+
const borderClass = surface.border ? `${surface.border} ${docked ? "border" : isInset ? INSET_BORDER[side] : surface.borderSides === "all" ? "border" : FLUSH_BORDER[side]}` : "";
|
|
44504
|
+
const shadowClass = side === "right" ? surface.shadowRight : surface.shadow;
|
|
44436
44505
|
const [mounted, setMounted] = useState55(isOpen);
|
|
44437
44506
|
const [entered, setEntered] = useState55(isOpen);
|
|
44438
44507
|
const prevOpenRef = useRef52(isOpen);
|
|
@@ -44453,10 +44522,11 @@ var SidePanel = ({
|
|
|
44453
44522
|
}, [mounted, isOpen, entered]);
|
|
44454
44523
|
const handleTransitionEnd = (event) => {
|
|
44455
44524
|
if (event.target !== event.currentTarget) return;
|
|
44456
|
-
if (event.propertyName !== "width") return;
|
|
44525
|
+
if (event.propertyName !== (vertical ? "height" : "width")) return;
|
|
44457
44526
|
if (!isOpen) setMounted(false);
|
|
44458
44527
|
};
|
|
44459
44528
|
const [currentWidth, setCurrentWidth] = useState55(width);
|
|
44529
|
+
const [currentHeight, setCurrentHeight] = useState55(height);
|
|
44460
44530
|
const isDraggingRef = useRef52(false);
|
|
44461
44531
|
const [isDragging, setIsDragging] = useState55(false);
|
|
44462
44532
|
const startXRef = useRef52(0);
|
|
@@ -44464,15 +44534,25 @@ var SidePanel = ({
|
|
|
44464
44534
|
useEffect54(() => {
|
|
44465
44535
|
if (!isDraggingRef.current) setCurrentWidth(width);
|
|
44466
44536
|
}, [width]);
|
|
44537
|
+
useEffect54(() => {
|
|
44538
|
+
if (!isDraggingRef.current) setCurrentHeight(height);
|
|
44539
|
+
}, [height]);
|
|
44467
44540
|
const onMouseDown = useCallback32(
|
|
44468
44541
|
(e) => {
|
|
44469
44542
|
if (!resizable) return;
|
|
44470
44543
|
e.preventDefault();
|
|
44471
44544
|
isDraggingRef.current = true;
|
|
44472
44545
|
setIsDragging(true);
|
|
44473
|
-
startXRef.current = e.clientX;
|
|
44474
|
-
startWidthRef.current = currentWidth;
|
|
44546
|
+
startXRef.current = vertical ? e.clientY : e.clientX;
|
|
44547
|
+
startWidthRef.current = vertical ? currentHeight : currentWidth;
|
|
44475
44548
|
const onMouseMove = (ev) => {
|
|
44549
|
+
if (vertical) {
|
|
44550
|
+
const delta2 = side === "bottom" ? startXRef.current - ev.clientY : ev.clientY - startXRef.current;
|
|
44551
|
+
setCurrentHeight(
|
|
44552
|
+
Math.min(maxHeight, Math.max(minHeight, startWidthRef.current + delta2))
|
|
44553
|
+
);
|
|
44554
|
+
return;
|
|
44555
|
+
}
|
|
44476
44556
|
const delta = side === "right" ? startXRef.current - ev.clientX : ev.clientX - startXRef.current;
|
|
44477
44557
|
const next = Math.min(
|
|
44478
44558
|
maxWidth,
|
|
@@ -44481,7 +44561,7 @@ var SidePanel = ({
|
|
|
44481
44561
|
setCurrentWidth(next);
|
|
44482
44562
|
};
|
|
44483
44563
|
document.body.style.userSelect = "none";
|
|
44484
|
-
document.body.style.cursor = "col-resize";
|
|
44564
|
+
document.body.style.cursor = vertical ? "row-resize" : "col-resize";
|
|
44485
44565
|
const onMouseUp = () => {
|
|
44486
44566
|
isDraggingRef.current = false;
|
|
44487
44567
|
setIsDragging(false);
|
|
@@ -44493,9 +44573,10 @@ var SidePanel = ({
|
|
|
44493
44573
|
window.addEventListener("mousemove", onMouseMove);
|
|
44494
44574
|
window.addEventListener("mouseup", onMouseUp);
|
|
44495
44575
|
},
|
|
44496
|
-
[resizable, currentWidth, minWidth, maxWidth, side]
|
|
44576
|
+
[resizable, vertical, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight, side]
|
|
44497
44577
|
);
|
|
44498
44578
|
const resolvedWidth = resizable ? currentWidth : width;
|
|
44579
|
+
const resolvedHeight = resizable ? currentHeight : height;
|
|
44499
44580
|
const [internalCollapsed, setInternalCollapsed] = useState55(defaultCollapsed);
|
|
44500
44581
|
const isCollapsed = collapsible && (collapsed ?? internalCollapsed);
|
|
44501
44582
|
const toggleCollapsed = () => {
|
|
@@ -44504,6 +44585,7 @@ var SidePanel = ({
|
|
|
44504
44585
|
onCollapsedChange?.(next);
|
|
44505
44586
|
};
|
|
44506
44587
|
const shellWidth = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedWidth;
|
|
44588
|
+
const shellHeight = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedHeight;
|
|
44507
44589
|
const collapseButton = (label) => /* @__PURE__ */ jsx263(
|
|
44508
44590
|
CollapseToggleButton,
|
|
44509
44591
|
{
|
|
@@ -44518,39 +44600,38 @@ var SidePanel = ({
|
|
|
44518
44600
|
(e) => {
|
|
44519
44601
|
if (!resizable) return;
|
|
44520
44602
|
const step = 20;
|
|
44521
|
-
const
|
|
44522
|
-
const
|
|
44603
|
+
const growKey = { right: "ArrowLeft", left: "ArrowRight", bottom: "ArrowUp", top: "ArrowDown" }[side];
|
|
44604
|
+
const shrinkKey = { right: "ArrowRight", left: "ArrowLeft", bottom: "ArrowDown", top: "ArrowUp" }[side];
|
|
44605
|
+
const grow = e.key === growKey;
|
|
44606
|
+
const shrink = e.key === shrinkKey;
|
|
44607
|
+
const [min, max, current, set] = vertical ? [minHeight, maxHeight, currentHeight, setCurrentHeight] : [minWidth, maxWidth, currentWidth, setCurrentWidth];
|
|
44523
44608
|
if (e.key === "Home") {
|
|
44524
44609
|
e.preventDefault();
|
|
44525
|
-
|
|
44610
|
+
set(min);
|
|
44526
44611
|
return;
|
|
44527
44612
|
}
|
|
44528
44613
|
if (e.key === "End") {
|
|
44529
44614
|
e.preventDefault();
|
|
44530
|
-
|
|
44615
|
+
set(max);
|
|
44531
44616
|
return;
|
|
44532
44617
|
}
|
|
44533
44618
|
if (!grow && !shrink) return;
|
|
44534
44619
|
e.preventDefault();
|
|
44535
|
-
|
|
44536
|
-
Math.min(
|
|
44537
|
-
maxWidth,
|
|
44538
|
-
Math.max(minWidth, currentWidth + (grow ? step : -step))
|
|
44539
|
-
)
|
|
44540
|
-
);
|
|
44620
|
+
set(Math.min(max, Math.max(min, current + (grow ? step : -step))));
|
|
44541
44621
|
},
|
|
44542
|
-
[resizable, side, currentWidth, minWidth, maxWidth]
|
|
44622
|
+
[resizable, vertical, side, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight]
|
|
44543
44623
|
);
|
|
44544
|
-
if (!mounted) return null;
|
|
44545
|
-
const edgeOffset = entered ? shellWidth : 0;
|
|
44624
|
+
if (!mounted || docked && !isOpen) return null;
|
|
44625
|
+
const edgeOffset = entered ? vertical ? shellHeight : shellWidth : 0;
|
|
44546
44626
|
const barTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-70 group-active:opacity-100`;
|
|
44547
|
-
const
|
|
44627
|
+
const gripTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`;
|
|
44628
|
+
const edgeProperty = side;
|
|
44548
44629
|
const handleStyle = {
|
|
44549
44630
|
[edgeProperty]: edgeOffset,
|
|
44550
44631
|
transition: isDragging ? void 0 : `${edgeProperty} ${OPEN_DURATION_MS}ms ${OPEN_EASING}, opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
|
|
44551
44632
|
};
|
|
44552
44633
|
const handleParked = isCollapsed;
|
|
44553
|
-
|
|
44634
|
+
const panel = /* @__PURE__ */ jsxs148(Fragment36, { children: [
|
|
44554
44635
|
/* @__PURE__ */ jsxs148(
|
|
44555
44636
|
"div",
|
|
44556
44637
|
{
|
|
@@ -44558,22 +44639,22 @@ var SidePanel = ({
|
|
|
44558
44639
|
"data-sp-shell": true,
|
|
44559
44640
|
"data-collapsed": collapsible ? isCollapsed : void 0,
|
|
44560
44641
|
className: classNames80(
|
|
44561
|
-
"absolute z-40 overflow-hidden",
|
|
44562
|
-
|
|
44563
|
-
|
|
44642
|
+
docked ? classNames80("relative shrink-0 overflow-hidden", vertical ? "w-full" : "h-full") : "absolute z-40 overflow-hidden",
|
|
44643
|
+
!docked && (vertical ? insetGap ? insetGap.x : "left-0 w-full" : insetGap ? insetGap.y : "top-0 h-full"),
|
|
44644
|
+
!docked && { right: "right-0", left: "left-0", top: "top-0", bottom: "bottom-0" }[side],
|
|
44564
44645
|
cornerClass,
|
|
44565
44646
|
legacyVariant && borderClass,
|
|
44566
44647
|
legacyVariant ? shadowClass : panelOuterChrome
|
|
44567
44648
|
),
|
|
44568
44649
|
style: {
|
|
44569
|
-
width: entered ? shellWidth : 0,
|
|
44650
|
+
...vertical ? { height: entered ? shellHeight : 0 } : { width: entered ? shellWidth : 0 },
|
|
44570
44651
|
// Inline rather than `transition-[width] duration-… ease-…`: an
|
|
44571
44652
|
// arbitrary easing utility would have to survive the safelist, and
|
|
44572
44653
|
// this curve is not themeable anyway. It decelerates hard at the end,
|
|
44573
44654
|
// which is what stops the panel feeling like it snaps into place.
|
|
44574
44655
|
// Suppressed while resizing so the panel tracks the pointer exactly
|
|
44575
44656
|
// rather than lagging a third of a second behind it.
|
|
44576
|
-
transition: isDragging ? void 0 :
|
|
44657
|
+
transition: isDragging ? void 0 : `${vertical ? "height" : "width"} ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
|
|
44577
44658
|
},
|
|
44578
44659
|
onTransitionEnd: handleTransitionEnd,
|
|
44579
44660
|
children: [
|
|
@@ -44613,7 +44694,7 @@ var SidePanel = ({
|
|
|
44613
44694
|
getNoiseBlendClasses(),
|
|
44614
44695
|
cornerClass
|
|
44615
44696
|
),
|
|
44616
|
-
style: { backgroundImage: NOISE_BACKGROUND_IMAGE }
|
|
44697
|
+
style: { backgroundImage: NOISE_BACKGROUND_IMAGE, backgroundSize: getNoiseBackgroundSize(noiseScale) }
|
|
44617
44698
|
}
|
|
44618
44699
|
),
|
|
44619
44700
|
/* @__PURE__ */ jsxs148(
|
|
@@ -44623,12 +44704,13 @@ var SidePanel = ({
|
|
|
44623
44704
|
inert: isCollapsed || void 0,
|
|
44624
44705
|
"aria-hidden": isCollapsed || void 0,
|
|
44625
44706
|
className: classNames80(
|
|
44626
|
-
"
|
|
44707
|
+
"flex flex-col transition-opacity duration-200 motion-reduce:transition-none",
|
|
44708
|
+
side === "top" ? "absolute inset-x-0 bottom-0" : "relative h-full",
|
|
44627
44709
|
side === "left" && "ml-auto",
|
|
44628
44710
|
isCollapsed && "opacity-0",
|
|
44629
44711
|
className
|
|
44630
44712
|
),
|
|
44631
|
-
style: { width: resolvedWidth },
|
|
44713
|
+
style: vertical ? { height: resolvedHeight } : { width: resolvedWidth },
|
|
44632
44714
|
onKeyDown,
|
|
44633
44715
|
children: [
|
|
44634
44716
|
/* @__PURE__ */ jsxs148(
|
|
@@ -44665,7 +44747,9 @@ var SidePanel = ({
|
|
|
44665
44747
|
)
|
|
44666
44748
|
] }),
|
|
44667
44749
|
/* @__PURE__ */ jsxs148("div", { className: "flex shrink-0 items-center gap-1 pt-0.5", children: [
|
|
44668
|
-
collapsible && collapseButton(
|
|
44750
|
+
collapsible && collapseButton(
|
|
44751
|
+
t("kit.sidepanel.collapse")
|
|
44752
|
+
),
|
|
44669
44753
|
headerActions,
|
|
44670
44754
|
onClose && !collapsible && /* @__PURE__ */ jsx263(
|
|
44671
44755
|
IconButton_default,
|
|
@@ -44692,10 +44776,10 @@ var SidePanel = ({
|
|
|
44692
44776
|
{
|
|
44693
44777
|
"data-sp-collapsed": true,
|
|
44694
44778
|
className: classNames80(
|
|
44695
|
-
"absolute
|
|
44696
|
-
side === "right" ? "left-0" : "right-0"
|
|
44779
|
+
"absolute flex items-center gap-3",
|
|
44780
|
+
vertical ? "inset-x-0 top-0 flex-row px-3" : classNames80("inset-y-0 flex-col py-3", side === "right" ? "left-0" : "right-0")
|
|
44697
44781
|
),
|
|
44698
|
-
style: { width: COLLAPSED_RAIL_WIDTH },
|
|
44782
|
+
style: vertical ? { height: COLLAPSED_RAIL_WIDTH } : { width: COLLAPSED_RAIL_WIDTH },
|
|
44699
44783
|
children: [
|
|
44700
44784
|
collapseButton(t("kit.sidepanel.expand")),
|
|
44701
44785
|
(collapsedLabel ?? title) && /* @__PURE__ */ jsx263(
|
|
@@ -44703,7 +44787,8 @@ var SidePanel = ({
|
|
|
44703
44787
|
{
|
|
44704
44788
|
"data-sp-collapsed-label": true,
|
|
44705
44789
|
className: classNames80(
|
|
44706
|
-
"
|
|
44790
|
+
"truncate text-xs font-semibold uppercase tracking-[0.2em]",
|
|
44791
|
+
vertical ? "min-w-0" : "min-h-0 [writing-mode:vertical-rl]",
|
|
44707
44792
|
surfaceText.muted
|
|
44708
44793
|
),
|
|
44709
44794
|
children: collapsedLabel ?? title
|
|
@@ -44715,7 +44800,7 @@ var SidePanel = ({
|
|
|
44715
44800
|
]
|
|
44716
44801
|
}
|
|
44717
44802
|
),
|
|
44718
|
-
overlay && /* @__PURE__ */ jsx263(
|
|
44803
|
+
overlay && !docked && /* @__PURE__ */ jsx263(
|
|
44719
44804
|
"div",
|
|
44720
44805
|
{
|
|
44721
44806
|
"aria-hidden": "true",
|
|
@@ -44744,15 +44829,16 @@ var SidePanel = ({
|
|
|
44744
44829
|
onKeyDown: handleParked ? void 0 : onSeparatorKeyDown,
|
|
44745
44830
|
role: handleParked ? void 0 : "separator",
|
|
44746
44831
|
"aria-hidden": handleParked || void 0,
|
|
44747
|
-
"aria-orientation": handleParked ? void 0 : "vertical",
|
|
44832
|
+
"aria-orientation": handleParked ? void 0 : vertical ? "horizontal" : "vertical",
|
|
44748
44833
|
"aria-label": handleParked ? void 0 : t("kit.sidepanel.resize"),
|
|
44749
|
-
"aria-valuenow": handleParked ? void 0 : resolvedWidth,
|
|
44750
|
-
"aria-valuemin": handleParked ? void 0 : minWidth,
|
|
44751
|
-
"aria-valuemax": handleParked ? void 0 : maxWidth,
|
|
44834
|
+
"aria-valuenow": handleParked ? void 0 : vertical ? resolvedHeight : resolvedWidth,
|
|
44835
|
+
"aria-valuemin": handleParked ? void 0 : vertical ? minHeight : minWidth,
|
|
44836
|
+
"aria-valuemax": handleParked ? void 0 : vertical ? maxHeight : maxWidth,
|
|
44752
44837
|
tabIndex: handleParked ? -1 : 0,
|
|
44753
44838
|
className: classNames80(
|
|
44754
|
-
"group absolute z-40
|
|
44755
|
-
|
|
44839
|
+
"group absolute z-40 bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400 dark:focus-visible:ring-blue-500",
|
|
44840
|
+
vertical ? "h-3 cursor-row-resize" : "w-3 cursor-col-resize",
|
|
44841
|
+
vertical ? insetGap ? insetGap.x : "inset-x-0" : insetGap ? insetGap.y : "inset-y-0",
|
|
44756
44842
|
handleParked && "pointer-events-none opacity-0"
|
|
44757
44843
|
),
|
|
44758
44844
|
style: handleStyle,
|
|
@@ -44763,8 +44849,16 @@ var SidePanel = ({
|
|
|
44763
44849
|
className: classNames80(
|
|
44764
44850
|
// A hairline bar, centred on the panel edge (2px wide at -1px),
|
|
44765
44851
|
// so the grip below sits on it as a bulge on one centre line.
|
|
44766
|
-
|
|
44767
|
-
|
|
44852
|
+
// Inset by the corner radius, so the line stops where the
|
|
44853
|
+
// rounded corner starts instead of running past the curve.
|
|
44854
|
+
"absolute rounded-full transition duration-150",
|
|
44855
|
+
BAR_INSET[corner === "auto" ? DEFAULT_SURFACE_CORNER : corner][vertical ? "x" : "y"],
|
|
44856
|
+
{
|
|
44857
|
+
right: "w-0.5 -right-px",
|
|
44858
|
+
left: "w-0.5 -left-px",
|
|
44859
|
+
bottom: "h-0.5 -bottom-px",
|
|
44860
|
+
top: "h-0.5 -top-px"
|
|
44861
|
+
}[side],
|
|
44768
44862
|
barTone
|
|
44769
44863
|
)
|
|
44770
44864
|
}
|
|
@@ -44775,8 +44869,8 @@ var SidePanel = ({
|
|
|
44775
44869
|
"aria-hidden": "true",
|
|
44776
44870
|
"data-sp-grip": true,
|
|
44777
44871
|
className: classNames80(
|
|
44778
|
-
"pointer-events-none absolute
|
|
44779
|
-
side === "right" ? "-right-0.5" : "-left-0.5"
|
|
44872
|
+
"pointer-events-none absolute",
|
|
44873
|
+
vertical ? classNames80("left-1/2 h-1 w-10 -translate-x-1/2", side === "bottom" ? "-bottom-0.5" : "-top-0.5") : classNames80("top-1/2 h-10 w-1 -translate-y-1/2", side === "right" ? "-right-0.5" : "-left-0.5")
|
|
44780
44874
|
),
|
|
44781
44875
|
children: [
|
|
44782
44876
|
/* @__PURE__ */ jsx263(
|
|
@@ -44784,8 +44878,8 @@ var SidePanel = ({
|
|
|
44784
44878
|
{
|
|
44785
44879
|
"data-sp-grip-rest": true,
|
|
44786
44880
|
className: classNames80(
|
|
44787
|
-
"absolute inset-0 rounded-full bg-neutral-
|
|
44788
|
-
isDragging ? "opacity-0" : "opacity-
|
|
44881
|
+
"absolute inset-0 rounded-full bg-neutral-300 transition-opacity duration-150 dark:bg-neutral-600",
|
|
44882
|
+
isDragging ? "opacity-0" : "opacity-100 group-hover:opacity-0 group-focus-visible:opacity-0"
|
|
44789
44883
|
)
|
|
44790
44884
|
}
|
|
44791
44885
|
),
|
|
@@ -44793,7 +44887,7 @@ var SidePanel = ({
|
|
|
44793
44887
|
"span",
|
|
44794
44888
|
{
|
|
44795
44889
|
"data-sp-grip-active": true,
|
|
44796
|
-
className: classNames80("absolute inset-0 rounded-full transition duration-150",
|
|
44890
|
+
className: classNames80("absolute inset-0 rounded-full transition duration-150", gripTone)
|
|
44797
44891
|
}
|
|
44798
44892
|
)
|
|
44799
44893
|
]
|
|
@@ -44803,6 +44897,20 @@ var SidePanel = ({
|
|
|
44803
44897
|
}
|
|
44804
44898
|
)
|
|
44805
44899
|
] });
|
|
44900
|
+
return docked ? /* @__PURE__ */ jsx263(
|
|
44901
|
+
"div",
|
|
44902
|
+
{
|
|
44903
|
+
"data-sp-dock": true,
|
|
44904
|
+
className: classNames80(
|
|
44905
|
+
"relative flex shrink-0",
|
|
44906
|
+
vertical ? "w-full flex-col" : "h-full",
|
|
44907
|
+
// Inset docked: the gap is padding on the wrapper, so the panel is
|
|
44908
|
+
// shorter (narrower) than its zone; the handle matches it above.
|
|
44909
|
+
insetGap && (vertical ? insetGap.px : insetGap.py)
|
|
44910
|
+
),
|
|
44911
|
+
children: panel
|
|
44912
|
+
}
|
|
44913
|
+
) : panel;
|
|
44806
44914
|
};
|
|
44807
44915
|
var SidePanel_default = SidePanel;
|
|
44808
44916
|
|
|
@@ -65666,6 +65774,7 @@ var WorkflowTrackerRail = ({
|
|
|
65666
65774
|
defaultCollapsed = false,
|
|
65667
65775
|
onCollapsedChange,
|
|
65668
65776
|
fillHeight = false,
|
|
65777
|
+
flush = true,
|
|
65669
65778
|
expandLabel = "Expand workflow rail",
|
|
65670
65779
|
collapseLabel = "Collapse workflow rail",
|
|
65671
65780
|
renderStepPopover,
|
|
@@ -65708,15 +65817,19 @@ var WorkflowTrackerRail = ({
|
|
|
65708
65817
|
scrollable: false,
|
|
65709
65818
|
flexBody: scrollBody,
|
|
65710
65819
|
className: classNames115(
|
|
65711
|
-
collapsible && "max-w-full shrink-0
|
|
65820
|
+
collapsible && "max-w-full shrink-0",
|
|
65712
65821
|
fillHeight && "h-full min-h-0 self-stretch",
|
|
65713
65822
|
className,
|
|
65714
65823
|
cardClassName
|
|
65715
65824
|
),
|
|
65716
65825
|
style: collapsible ? {
|
|
65826
|
+
// SidePanel's curve, not `duration-200 ease-in-out` (which read
|
|
65827
|
+
// as a snap). Padding rides it too: collapsing drops it to none,
|
|
65828
|
+
// and snapping it mid-sweep was a visible jump.
|
|
65829
|
+
transition: panelSlideTransition("width", "padding"),
|
|
65717
65830
|
...style,
|
|
65718
65831
|
width: isCollapsed ? COLLAPSED_RAIL_WIDTH : style?.width ?? 360,
|
|
65719
|
-
...
|
|
65832
|
+
...flush ? side === "left" ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
|
|
65720
65833
|
} : style,
|
|
65721
65834
|
"aria-busy": loading || void 0,
|
|
65722
65835
|
"data-collapsed": collapsible ? isCollapsed : void 0,
|
|
@@ -72774,7 +72887,7 @@ function gradientBackdropCss(colors3, s) {
|
|
|
72774
72887
|
import { jsx as jsx330, jsxs as jsxs206 } from "react/jsx-runtime";
|
|
72775
72888
|
var GRADIENT_BACKDROP_SCHEMES = ["auto", "light", "dark"];
|
|
72776
72889
|
var GradientBackdrop = React104.forwardRef(
|
|
72777
|
-
({ theme = "slate", scheme = "auto", noise = false, className, style, children, ...rest }, ref) => {
|
|
72890
|
+
({ theme = "slate", scheme = "auto", noise = false, noiseScale, className, style, children, ...rest }, ref) => {
|
|
72778
72891
|
const themeKey = typeof theme === "string" ? theme : JSON.stringify(theme);
|
|
72779
72892
|
const resolved = useMemo67(() => {
|
|
72780
72893
|
const t = resolveGradientBackdropTheme(theme);
|
|
@@ -72808,7 +72921,11 @@ var GradientBackdrop = React104.forwardRef(
|
|
|
72808
72921
|
"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",
|
|
72809
72922
|
getNoiseBlendClasses(scheme)
|
|
72810
72923
|
),
|
|
72811
|
-
style: {
|
|
72924
|
+
style: {
|
|
72925
|
+
backgroundImage: NOISE_BACKGROUND_IMAGE,
|
|
72926
|
+
backgroundSize: getNoiseBackgroundSize(noiseScale),
|
|
72927
|
+
backgroundRepeat: "repeat"
|
|
72928
|
+
}
|
|
72812
72929
|
}
|
|
72813
72930
|
),
|
|
72814
72931
|
children
|
|
@@ -73315,6 +73432,29 @@ var TerminalTabs = forwardRef165(
|
|
|
73315
73432
|
}
|
|
73316
73433
|
);
|
|
73317
73434
|
|
|
73435
|
+
// src/components/PageBodyLayout.tsx
|
|
73436
|
+
import classNames141 from "classnames";
|
|
73437
|
+
import { Fragment as Fragment53, jsx as jsx334, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
73438
|
+
var PAGE_BODY_LAYOUT_VARIANTS = ["none", ...SURFACE_VARIANTS];
|
|
73439
|
+
function PageBodyLayout({ header, left, right, bottom, children, className, minCenterWidth = 240, minCenterHeight = 120, gap = 8, variant = "outlined", ...surface }) {
|
|
73440
|
+
const plain = variant === "none" || variant === "plain";
|
|
73441
|
+
const body = /* @__PURE__ */ jsxs208(Fragment53, { children: [
|
|
73442
|
+
header && /* @__PURE__ */ jsx334("div", { className: "shrink-0", children: header }),
|
|
73443
|
+
/* @__PURE__ */ jsx334("div", { className: classNames141("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ jsxs208("div", { className: "flex h-full min-h-0", style: { minWidth: "fit-content", gap, ...plain ? { paddingTop: header ? gap : 0 } : { padding: gap } }, children: [
|
|
73444
|
+
hasZone(left) && /* @__PURE__ */ jsx334("div", { "data-page-region": "left", className: "flex min-h-0 shrink-0", children: left }),
|
|
73445
|
+
/* @__PURE__ */ jsxs208("div", { className: "flex min-h-0 flex-1 flex-col", style: { gap, minWidth: minCenterWidth }, children: [
|
|
73446
|
+
/* @__PURE__ */ jsx334("div", { "data-page-region": "center", className: classNames141("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), style: { minHeight: minCenterHeight }, children }),
|
|
73447
|
+
hasZone(bottom) && /* @__PURE__ */ jsx334("div", { "data-page-region": "bottom", className: "flex min-w-0 shrink-0 flex-col", children: bottom })
|
|
73448
|
+
] }),
|
|
73449
|
+
hasZone(right) && /* @__PURE__ */ jsx334("div", { "data-page-region": "right", className: "flex min-h-0 shrink-0", children: right })
|
|
73450
|
+
] }) })
|
|
73451
|
+
] });
|
|
73452
|
+
return plain ? /* @__PURE__ */ jsx334("div", { "data-page-layout": "none", className: classNames141("flex h-full min-h-0 min-w-0 flex-col", className), children: body }) : /* @__PURE__ */ jsx334(Panel_default, { ...surface, variant, padding: "none", scrollable: false, flexBody: true, className: classNames141("h-full min-h-0 min-w-0", className), children: body });
|
|
73453
|
+
}
|
|
73454
|
+
function hasZone(node) {
|
|
73455
|
+
return node != null && node !== false;
|
|
73456
|
+
}
|
|
73457
|
+
|
|
73318
73458
|
// src/contexts/BottomSheetContext.tsx
|
|
73319
73459
|
import {
|
|
73320
73460
|
createContext as createContext9,
|
|
@@ -73326,8 +73466,8 @@ import {
|
|
|
73326
73466
|
useState as useState96
|
|
73327
73467
|
} from "react";
|
|
73328
73468
|
import { createPortal as createPortal19 } from "react-dom";
|
|
73329
|
-
import
|
|
73330
|
-
import { jsx as
|
|
73469
|
+
import classNames142 from "classnames";
|
|
73470
|
+
import { jsx as jsx335, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
73331
73471
|
var BottomSheetContext = createContext9(null);
|
|
73332
73472
|
var TRANSITION_MS2 = 260;
|
|
73333
73473
|
var renderSlot = (slot, controls) => {
|
|
@@ -73397,11 +73537,11 @@ var BottomSheetProvider = ({
|
|
|
73397
73537
|
[presentSheet, dismissSheet, sheet, isVisible]
|
|
73398
73538
|
);
|
|
73399
73539
|
const overlayNode = typeof document !== "undefined" && sheet ? createPortal19(
|
|
73400
|
-
/* @__PURE__ */
|
|
73401
|
-
/* @__PURE__ */
|
|
73540
|
+
/* @__PURE__ */ jsxs209("div", { className: "pointer-events-none fixed inset-0 z-[70] flex items-end justify-center", children: [
|
|
73541
|
+
/* @__PURE__ */ jsx335(
|
|
73402
73542
|
"div",
|
|
73403
73543
|
{
|
|
73404
|
-
className:
|
|
73544
|
+
className: classNames142(
|
|
73405
73545
|
"absolute inset-0 bg-neutral-900/40 transition-opacity duration-300",
|
|
73406
73546
|
isVisible ? "opacity-100 pointer-events-auto" : "opacity-0"
|
|
73407
73547
|
),
|
|
@@ -73411,24 +73551,24 @@ var BottomSheetProvider = ({
|
|
|
73411
73551
|
}
|
|
73412
73552
|
}
|
|
73413
73553
|
),
|
|
73414
|
-
/* @__PURE__ */
|
|
73554
|
+
/* @__PURE__ */ jsx335("div", { className: "relative w-full max-w-4xl px-4 pb-4 sm:px-8", children: /* @__PURE__ */ jsxs209(
|
|
73415
73555
|
"section",
|
|
73416
73556
|
{
|
|
73417
73557
|
role: "dialog",
|
|
73418
73558
|
"aria-modal": "true",
|
|
73419
|
-
className:
|
|
73559
|
+
className: classNames142(
|
|
73420
73560
|
"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",
|
|
73421
73561
|
sheet.className,
|
|
73422
73562
|
isVisible ? "translate-y-0" : "translate-y-full"
|
|
73423
73563
|
),
|
|
73424
73564
|
style: { minHeight: "25vh", maxHeight: "85vh" },
|
|
73425
73565
|
children: [
|
|
73426
|
-
/* @__PURE__ */
|
|
73427
|
-
/* @__PURE__ */
|
|
73428
|
-
sheet.title && /* @__PURE__ */
|
|
73429
|
-
sheet.description && /* @__PURE__ */
|
|
73566
|
+
/* @__PURE__ */ jsxs209("header", { className: "flex items-start justify-between gap-3 border-b border-slate-200 px-6 py-4 dark:border-slate-800", children: [
|
|
73567
|
+
/* @__PURE__ */ jsxs209("div", { className: "space-y-1", children: [
|
|
73568
|
+
sheet.title && /* @__PURE__ */ jsx335("div", { className: "text-base font-semibold text-slate-900 dark:text-slate-100", children: sheet.title }),
|
|
73569
|
+
sheet.description && /* @__PURE__ */ jsx335("p", { className: "text-sm text-slate-500 dark:text-slate-300", children: sheet.description })
|
|
73430
73570
|
] }),
|
|
73431
|
-
(sheet.showCloseButton ?? true) && /* @__PURE__ */
|
|
73571
|
+
(sheet.showCloseButton ?? true) && /* @__PURE__ */ jsx335(
|
|
73432
73572
|
IconButton_default,
|
|
73433
73573
|
{
|
|
73434
73574
|
icon: "Close",
|
|
@@ -73440,15 +73580,15 @@ var BottomSheetProvider = ({
|
|
|
73440
73580
|
}
|
|
73441
73581
|
)
|
|
73442
73582
|
] }),
|
|
73443
|
-
/* @__PURE__ */
|
|
73444
|
-
sheet.actions && /* @__PURE__ */
|
|
73583
|
+
/* @__PURE__ */ jsx335("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: renderSlot(sheet.content, controls) ?? /* @__PURE__ */ jsx335("p", { className: "text-sm text-slate-500", children: "No content provided." }) }),
|
|
73584
|
+
sheet.actions && /* @__PURE__ */ jsx335("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) })
|
|
73445
73585
|
]
|
|
73446
73586
|
}
|
|
73447
73587
|
) })
|
|
73448
73588
|
] }),
|
|
73449
73589
|
document.body
|
|
73450
73590
|
) : null;
|
|
73451
|
-
return /* @__PURE__ */
|
|
73591
|
+
return /* @__PURE__ */ jsxs209(BottomSheetContext.Provider, { value: contextValue, children: [
|
|
73452
73592
|
children,
|
|
73453
73593
|
overlayNode
|
|
73454
73594
|
] });
|
|
@@ -74088,8 +74228,8 @@ var SYSTEM_VARIABLES = [
|
|
|
74088
74228
|
];
|
|
74089
74229
|
|
|
74090
74230
|
// src/components/MetricBar.tsx
|
|
74091
|
-
import
|
|
74092
|
-
import { jsx as
|
|
74231
|
+
import classNames143 from "classnames";
|
|
74232
|
+
import { jsx as jsx336 } from "react/jsx-runtime";
|
|
74093
74233
|
var MetricBar = ({
|
|
74094
74234
|
label,
|
|
74095
74235
|
value,
|
|
@@ -74099,7 +74239,7 @@ var MetricBar = ({
|
|
|
74099
74239
|
size = "sm",
|
|
74100
74240
|
className,
|
|
74101
74241
|
...rest
|
|
74102
|
-
}) => /* @__PURE__ */
|
|
74242
|
+
}) => /* @__PURE__ */ jsx336(
|
|
74103
74243
|
Progress_default,
|
|
74104
74244
|
{
|
|
74105
74245
|
...rest,
|
|
@@ -74109,7 +74249,7 @@ var MetricBar = ({
|
|
|
74109
74249
|
formatValue: value !== void 0 ? () => String(value) : void 0,
|
|
74110
74250
|
size,
|
|
74111
74251
|
color: tone ?? color ?? "blue",
|
|
74112
|
-
className:
|
|
74252
|
+
className: classNames143("w-full", className)
|
|
74113
74253
|
}
|
|
74114
74254
|
);
|
|
74115
74255
|
MetricBar.displayName = "MetricBar";
|
|
@@ -74469,7 +74609,7 @@ function useNetworkCanvas(options) {
|
|
|
74469
74609
|
}
|
|
74470
74610
|
|
|
74471
74611
|
// src/components/NetworkGraph/NetworkGraph.tsx
|
|
74472
|
-
import { jsx as
|
|
74612
|
+
import { jsx as jsx337, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
74473
74613
|
var NO_COMMUNITIES = [];
|
|
74474
74614
|
var NO_HIGHLIGHTS = [];
|
|
74475
74615
|
function NetworkGraph({
|
|
@@ -74635,7 +74775,7 @@ function NetworkGraph({
|
|
|
74635
74775
|
}, [visibleNodes, query]);
|
|
74636
74776
|
const graphHeight = Number.isFinite(height) ? Math.max(160, height) : 480;
|
|
74637
74777
|
const resolvedLegendTone = legendTone === "auto" ? tone : legendTone;
|
|
74638
|
-
const legendContent = /* @__PURE__ */
|
|
74778
|
+
const legendContent = /* @__PURE__ */ jsxs210(
|
|
74639
74779
|
"fieldset",
|
|
74640
74780
|
{
|
|
74641
74781
|
disabled: locked,
|
|
@@ -74644,8 +74784,8 @@ function NetworkGraph({
|
|
|
74644
74784
|
maxHeight: legendPanel ? Math.max(96, graphHeight - 64) : graphHeight
|
|
74645
74785
|
},
|
|
74646
74786
|
children: [
|
|
74647
|
-
/* @__PURE__ */
|
|
74648
|
-
/* @__PURE__ */
|
|
74787
|
+
/* @__PURE__ */ jsx337("legend", { className: "mb-3 text-xs font-semibold uppercase tracking-widest", children: t("kit.networkGraph.communities") }),
|
|
74788
|
+
/* @__PURE__ */ jsx337(
|
|
74649
74789
|
Checkbox_default,
|
|
74650
74790
|
{
|
|
74651
74791
|
size: "sm",
|
|
@@ -74656,8 +74796,8 @@ function NetworkGraph({
|
|
|
74656
74796
|
onChange: (event) => filter(event.target.checked ? model.groups.map((g) => g.id) : [])
|
|
74657
74797
|
}
|
|
74658
74798
|
),
|
|
74659
|
-
model.groups.map((group) => /* @__PURE__ */
|
|
74660
|
-
/* @__PURE__ */
|
|
74799
|
+
model.groups.map((group) => /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-between gap-2", children: [
|
|
74800
|
+
/* @__PURE__ */ jsx337(
|
|
74661
74801
|
Checkbox_default,
|
|
74662
74802
|
{
|
|
74663
74803
|
size: "sm",
|
|
@@ -74669,12 +74809,12 @@ function NetworkGraph({
|
|
|
74669
74809
|
)
|
|
74670
74810
|
}
|
|
74671
74811
|
),
|
|
74672
|
-
/* @__PURE__ */
|
|
74812
|
+
/* @__PURE__ */ jsx337("span", { className: "text-xs tabular-nums opacity-60", children: counts.get(group.id) ?? 0 })
|
|
74673
74813
|
] }, group.id))
|
|
74674
74814
|
]
|
|
74675
74815
|
}
|
|
74676
74816
|
);
|
|
74677
|
-
return /* @__PURE__ */
|
|
74817
|
+
return /* @__PURE__ */ jsx337(
|
|
74678
74818
|
Panel_default,
|
|
74679
74819
|
{
|
|
74680
74820
|
...panelProps,
|
|
@@ -74685,7 +74825,7 @@ function NetworkGraph({
|
|
|
74685
74825
|
loading,
|
|
74686
74826
|
clickable: false,
|
|
74687
74827
|
scrollable: false,
|
|
74688
|
-
children: /* @__PURE__ */
|
|
74828
|
+
children: /* @__PURE__ */ jsxs210(
|
|
74689
74829
|
"div",
|
|
74690
74830
|
{
|
|
74691
74831
|
className: "flex min-w-0 flex-col gap-3",
|
|
@@ -74693,7 +74833,7 @@ function NetworkGraph({
|
|
|
74693
74833
|
"aria-label": ariaLabel ?? t("kit.networkGraph.name"),
|
|
74694
74834
|
"aria-disabled": locked || void 0,
|
|
74695
74835
|
children: [
|
|
74696
|
-
showControls && /* @__PURE__ */
|
|
74836
|
+
showControls && /* @__PURE__ */ jsx337("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx337("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx337(
|
|
74697
74837
|
Combobox_default,
|
|
74698
74838
|
{
|
|
74699
74839
|
size: "sm",
|
|
@@ -74715,7 +74855,7 @@ function NetworkGraph({
|
|
|
74715
74855
|
}
|
|
74716
74856
|
}
|
|
74717
74857
|
) }) }),
|
|
74718
|
-
/* @__PURE__ */
|
|
74858
|
+
/* @__PURE__ */ jsxs210(
|
|
74719
74859
|
"div",
|
|
74720
74860
|
{
|
|
74721
74861
|
ref: layoutRef,
|
|
@@ -74723,13 +74863,13 @@ function NetworkGraph({
|
|
|
74723
74863
|
style: { flexDirection: legendOnRight ? "row" : "column" },
|
|
74724
74864
|
"data-legend-position": legendOnRight ? "right" : "bottom",
|
|
74725
74865
|
children: [
|
|
74726
|
-
/* @__PURE__ */
|
|
74866
|
+
/* @__PURE__ */ jsxs210(
|
|
74727
74867
|
"div",
|
|
74728
74868
|
{
|
|
74729
74869
|
className: "relative min-w-0 flex-1",
|
|
74730
74870
|
style: { height: graphHeight, minHeight: graphHeight },
|
|
74731
74871
|
children: [
|
|
74732
|
-
/* @__PURE__ */
|
|
74872
|
+
/* @__PURE__ */ jsx337(
|
|
74733
74873
|
"canvas",
|
|
74734
74874
|
{
|
|
74735
74875
|
ref: canvas.canvasRef,
|
|
@@ -74798,11 +74938,11 @@ function NetworkGraph({
|
|
|
74798
74938
|
}
|
|
74799
74939
|
}
|
|
74800
74940
|
),
|
|
74801
|
-
showControls && /* @__PURE__ */
|
|
74802
|
-
/* @__PURE__ */
|
|
74941
|
+
showControls && /* @__PURE__ */ jsxs210("div", { className: "absolute bottom-3 right-3 z-10 flex items-center gap-0.5 rounded-lg border border-neutral-200 bg-white/90 p-1 shadow-sm backdrop-blur dark:border-neutral-700 dark:bg-neutral-900/90", children: [
|
|
74942
|
+
/* @__PURE__ */ jsx337(
|
|
74803
74943
|
IconButton_default,
|
|
74804
74944
|
{
|
|
74805
|
-
icon: /* @__PURE__ */
|
|
74945
|
+
icon: /* @__PURE__ */ jsxs210(
|
|
74806
74946
|
"svg",
|
|
74807
74947
|
{
|
|
74808
74948
|
viewBox: "0 0 24 24",
|
|
@@ -74813,10 +74953,10 @@ function NetworkGraph({
|
|
|
74813
74953
|
strokeLinejoin: "round",
|
|
74814
74954
|
"aria-hidden": "true",
|
|
74815
74955
|
children: [
|
|
74816
|
-
/* @__PURE__ */
|
|
74817
|
-
/* @__PURE__ */
|
|
74818
|
-
/* @__PURE__ */
|
|
74819
|
-
/* @__PURE__ */
|
|
74956
|
+
/* @__PURE__ */ jsx337("path", { d: "M4 9V5a1 1 0 0 1 1-1h4" }),
|
|
74957
|
+
/* @__PURE__ */ jsx337("path", { d: "M15 4h4a1 1 0 0 1 1 1v4" }),
|
|
74958
|
+
/* @__PURE__ */ jsx337("path", { d: "M20 15v4a1 1 0 0 1-1 1h-4" }),
|
|
74959
|
+
/* @__PURE__ */ jsx337("path", { d: "M9 20H5a1 1 0 0 1-1-1v-4" })
|
|
74820
74960
|
]
|
|
74821
74961
|
}
|
|
74822
74962
|
),
|
|
@@ -74829,10 +74969,10 @@ function NetworkGraph({
|
|
|
74829
74969
|
onClick: canvas.fit
|
|
74830
74970
|
}
|
|
74831
74971
|
),
|
|
74832
|
-
/* @__PURE__ */
|
|
74972
|
+
/* @__PURE__ */ jsx337(
|
|
74833
74973
|
IconButton_default,
|
|
74834
74974
|
{
|
|
74835
|
-
icon: /* @__PURE__ */
|
|
74975
|
+
icon: /* @__PURE__ */ jsx337(
|
|
74836
74976
|
"svg",
|
|
74837
74977
|
{
|
|
74838
74978
|
viewBox: "0 0 24 24",
|
|
@@ -74841,7 +74981,7 @@ function NetworkGraph({
|
|
|
74841
74981
|
strokeWidth: 2,
|
|
74842
74982
|
strokeLinecap: "round",
|
|
74843
74983
|
"aria-hidden": "true",
|
|
74844
|
-
children: /* @__PURE__ */
|
|
74984
|
+
children: /* @__PURE__ */ jsx337("path", { d: "M6 12h12" })
|
|
74845
74985
|
}
|
|
74846
74986
|
),
|
|
74847
74987
|
size: "xs",
|
|
@@ -74853,7 +74993,7 @@ function NetworkGraph({
|
|
|
74853
74993
|
onClick: () => canvas.zoomBy(0.8)
|
|
74854
74994
|
}
|
|
74855
74995
|
),
|
|
74856
|
-
/* @__PURE__ */
|
|
74996
|
+
/* @__PURE__ */ jsxs210(
|
|
74857
74997
|
"span",
|
|
74858
74998
|
{
|
|
74859
74999
|
className: "min-w-[3.5ch] px-1 text-center text-[11px] tabular-nums text-neutral-500 dark:text-neutral-400",
|
|
@@ -74864,7 +75004,7 @@ function NetworkGraph({
|
|
|
74864
75004
|
]
|
|
74865
75005
|
}
|
|
74866
75006
|
),
|
|
74867
|
-
/* @__PURE__ */
|
|
75007
|
+
/* @__PURE__ */ jsx337(
|
|
74868
75008
|
IconButton_default,
|
|
74869
75009
|
{
|
|
74870
75010
|
icon: "Add",
|
|
@@ -74877,7 +75017,7 @@ function NetworkGraph({
|
|
|
74877
75017
|
onClick: () => canvas.zoomBy(1.25)
|
|
74878
75018
|
}
|
|
74879
75019
|
),
|
|
74880
|
-
/* @__PURE__ */
|
|
75020
|
+
/* @__PURE__ */ jsx337(
|
|
74881
75021
|
IconButton_default,
|
|
74882
75022
|
{
|
|
74883
75023
|
icon: "Reset",
|
|
@@ -74895,18 +75035,18 @@ function NetworkGraph({
|
|
|
74895
75035
|
}
|
|
74896
75036
|
)
|
|
74897
75037
|
] }),
|
|
74898
|
-
!visibleNodes.length && /* @__PURE__ */
|
|
75038
|
+
!visibleNodes.length && /* @__PURE__ */ jsx337("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center text-sm", children: emptyMessage ?? t("kit.networkGraph.empty") })
|
|
74899
75039
|
]
|
|
74900
75040
|
}
|
|
74901
75041
|
),
|
|
74902
|
-
showCommunities && model.groups.length > 0 && /* @__PURE__ */
|
|
75042
|
+
showCommunities && model.groups.length > 0 && /* @__PURE__ */ jsx337(
|
|
74903
75043
|
"div",
|
|
74904
75044
|
{
|
|
74905
75045
|
className: "min-w-0 shrink-0",
|
|
74906
75046
|
style: {
|
|
74907
75047
|
width: legendOnRight ? legendPanel ? 224 : 192 : "100%"
|
|
74908
75048
|
},
|
|
74909
|
-
children: legendPanel ? /* @__PURE__ */
|
|
75049
|
+
children: legendPanel ? /* @__PURE__ */ jsx337(
|
|
74910
75050
|
Panel_default,
|
|
74911
75051
|
{
|
|
74912
75052
|
variant: legendVariant === "auto" ? variant : legendVariant,
|
|
@@ -74925,8 +75065,8 @@ function NetworkGraph({
|
|
|
74925
75065
|
]
|
|
74926
75066
|
}
|
|
74927
75067
|
),
|
|
74928
|
-
/* @__PURE__ */
|
|
74929
|
-
/* @__PURE__ */
|
|
75068
|
+
/* @__PURE__ */ jsx337("p", { id: helpId, className: "text-xs opacity-70", children: t("kit.networkGraph.instructions") }),
|
|
75069
|
+
/* @__PURE__ */ jsx337(
|
|
74930
75070
|
"p",
|
|
74931
75071
|
{
|
|
74932
75072
|
role: "status",
|
|
@@ -75138,8 +75278,12 @@ export {
|
|
|
75138
75278
|
OTP_VARIANTS,
|
|
75139
75279
|
OrganizationChart_default as OrganizationChart,
|
|
75140
75280
|
PAGED_PANEL_LOADERS,
|
|
75281
|
+
PAGE_BODY_LAYOUT_VARIANTS,
|
|
75282
|
+
SURFACE_VARIANTS as PAGE_HEADER_VARIANTS,
|
|
75141
75283
|
PANEL_HERO_TITLE_ELEMENTS,
|
|
75142
75284
|
PANEL_HERO_VARIANTS,
|
|
75285
|
+
PANEL_SLIDE_DURATION_MS,
|
|
75286
|
+
PANEL_SLIDE_EASING,
|
|
75143
75287
|
PANEL_TONE_FOR_FIELD,
|
|
75144
75288
|
PANE_EMPTY_STATE_SIZE,
|
|
75145
75289
|
PILL_CORNERS,
|
|
@@ -75152,6 +75296,7 @@ export {
|
|
|
75152
75296
|
PROGRESS_MOTION_DIRECTIONS,
|
|
75153
75297
|
PROGRESS_MOTION_SPEEDS,
|
|
75154
75298
|
PT_KIT_CATALOG,
|
|
75299
|
+
PageBodyLayout,
|
|
75155
75300
|
PageHeader_default as PageHeader,
|
|
75156
75301
|
PagedPanel_default as PagedPanel,
|
|
75157
75302
|
Panel_default as Panel,
|
|
@@ -75529,6 +75674,7 @@ export {
|
|
|
75529
75674
|
normalizeString,
|
|
75530
75675
|
normalizeStringToUpper,
|
|
75531
75676
|
oklchToHex,
|
|
75677
|
+
panelSlideTransition,
|
|
75532
75678
|
parseImageSource,
|
|
75533
75679
|
parseMessage,
|
|
75534
75680
|
parseSmartVariable,
|